orcaq 1.0.32 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (628) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/4by6-f6q.js +982 -0
  3. package/.output/public/_nuxt/8Ppmjv9D.js +1 -0
  4. package/.output/public/_nuxt/B1qjkRVO.js +1 -0
  5. package/.output/public/_nuxt/B3KEisfc.js +1 -0
  6. package/.output/public/_nuxt/B4ebLeWY.js +9 -0
  7. package/.output/public/_nuxt/{IitECNfD.js → B6hH0qos.js} +1 -1
  8. package/.output/public/_nuxt/{BUDtG__q.js → B7HEMfgt.js} +1 -1
  9. package/.output/public/_nuxt/B84SvUzr.js +1 -0
  10. package/.output/public/_nuxt/BDXvbRNW.js +1 -0
  11. package/.output/public/_nuxt/BGRcizqy.js +1 -0
  12. package/.output/public/_nuxt/{ClYziJpO.js → BGVGiigU.js} +1 -1
  13. package/.output/public/_nuxt/{ZdjmUBoX.js → BJYf67_H.js} +1 -1
  14. package/.output/public/_nuxt/BOK5ZFNK.js +1 -0
  15. package/.output/public/_nuxt/BPY2ud8g.js +1 -0
  16. package/.output/public/_nuxt/BSONoRG4.js +2 -0
  17. package/.output/public/_nuxt/BT53m-su.js +1 -0
  18. package/.output/public/_nuxt/BTJSh8in.js +2 -0
  19. package/.output/public/_nuxt/BVpt8J3a.js +1 -0
  20. package/.output/public/_nuxt/{BhUkpIlA.js → BdDEVolW.js} +1 -1
  21. package/.output/public/_nuxt/{C27bL9Es.js → BeNILdbT.js} +1 -1
  22. package/.output/public/_nuxt/{Dnx67EG9.js → BmU9CNkM.js} +1 -1
  23. package/.output/public/_nuxt/{DLHYqHwF.js → BnFDcr74.js} +1 -1
  24. package/.output/public/_nuxt/{sE-55p4e.js → BprXyYdv.js} +1 -1
  25. package/.output/public/_nuxt/{BCcTASq_.js → Bq7otXBA.js} +1 -1
  26. package/.output/public/_nuxt/{B_PBOfFN.js → BqyO8OjC.js} +93 -93
  27. package/.output/public/_nuxt/Bs1og3h1.js +10 -0
  28. package/.output/public/_nuxt/Bs2DgR_z.js +1 -0
  29. package/.output/public/_nuxt/{BsoQBloB.js → BvUhrUEH.js} +1 -1
  30. package/.output/public/_nuxt/{DkggUtNN.js → BxDrCsPf.js} +1 -1
  31. package/.output/public/_nuxt/BxrwrGYE.js +1 -0
  32. package/.output/public/_nuxt/By0aUn7N.js +1 -0
  33. package/.output/public/_nuxt/{C07rlnlv.js → ByOuUnNS.js} +1 -1
  34. package/.output/public/_nuxt/C177_GoB.js +1 -0
  35. package/.output/public/_nuxt/{DcfsxCxL.js → C1jMZ4hc.js} +1 -1
  36. package/.output/public/_nuxt/C5bgdIOp.js +1 -0
  37. package/.output/public/_nuxt/C69a9jD3.js +67 -0
  38. package/.output/public/_nuxt/C8AyZ3_X.js +2 -0
  39. package/.output/public/_nuxt/C8KplD68.js +1 -0
  40. package/.output/public/_nuxt/CA99KAte.js +3 -0
  41. package/.output/public/_nuxt/{CvTHaPAO.js → CE8aasoy.js} +1 -1
  42. package/.output/public/_nuxt/{DkY69STm.js → CEvNlevo.js} +1 -1
  43. package/.output/public/_nuxt/{B8JnYxjr.js → CKqvNpN3.js} +1 -1
  44. package/.output/public/_nuxt/CNF1h1lI.js +1 -0
  45. package/.output/public/_nuxt/COAycMg4.js +1 -0
  46. package/.output/public/_nuxt/CR6_eO9a.js +6 -0
  47. package/.output/public/_nuxt/{D4jn2f-6.js → CREZ9f0O.js} +4 -4
  48. package/.output/public/_nuxt/CS5ItJPR.js +39 -0
  49. package/.output/public/_nuxt/CcK14gfI.js +1 -0
  50. package/.output/public/_nuxt/{DnxDSFih.js → Ci43mke5.js} +3 -3
  51. package/.output/public/_nuxt/CjouDEjz.js +1 -0
  52. package/.output/public/_nuxt/Cp5lMcfd.js +1 -0
  53. package/.output/public/_nuxt/CpYiq1Wv.js +1 -0
  54. package/.output/public/_nuxt/{DVxTxYP4.js → CrLqg4B0.js} +1 -1
  55. package/.output/public/_nuxt/{BJxYuvXF.js → CvcedJeQ.js} +1 -1
  56. package/.output/public/_nuxt/{FIJP2AmN.js → Cvq07PgE.js} +1 -1
  57. package/.output/public/_nuxt/CwmbX4-U.js +1 -0
  58. package/.output/public/_nuxt/{B27ECqWz.js → Cx6s86aR.js} +1 -1
  59. package/.output/public/_nuxt/{DDYV6jDr.js → CybtvDjH.js} +1 -1
  60. package/.output/public/_nuxt/CzB2y8br.js +18 -0
  61. package/.output/public/_nuxt/{-p9JbKy8.js → D-YUpbah.js} +3 -3
  62. package/.output/public/_nuxt/D60Pzl_V.js +1 -0
  63. package/.output/public/_nuxt/D9BYd7AV.js +1 -0
  64. package/.output/public/_nuxt/D9dEqMyH.js +152 -0
  65. package/.output/public/_nuxt/DCJ49Fnq.js +1 -0
  66. package/.output/public/_nuxt/{gO22NLpn.js → DESYlybj.js} +1 -1
  67. package/.output/public/_nuxt/DFM-aCBX.js +1 -0
  68. package/.output/public/_nuxt/{DRKnK1N_.js → DHnNoguE.js} +1 -1
  69. package/.output/public/_nuxt/{ChkFTcxr.js → DJqZzQsX.js} +1 -1
  70. package/.output/public/_nuxt/DNNdcUH4.js +1 -0
  71. package/.output/public/_nuxt/{LFK46Fls.js → DNdM2ZyK.js} +1 -1
  72. package/.output/public/_nuxt/{CVliJ52o.js → DQT4eICL.js} +1 -1
  73. package/.output/public/_nuxt/{CffFK_qY.js → DWBoXz89.js} +1 -1
  74. package/.output/public/_nuxt/DXp9fCib.js +20 -0
  75. package/.output/public/_nuxt/{ACOLmAuq.js → DaKikgWm.js} +1 -1
  76. package/.output/public/_nuxt/{B9zSkyFO.js → DaMyovpr.js} +1 -1
  77. package/.output/public/_nuxt/DeBdxlx0.js +1 -0
  78. package/.output/public/_nuxt/{trZyeId5.js → DhKwXzSk.js} +1 -1
  79. package/.output/public/_nuxt/{C6Vqzp-9.js → DkadXn5U.js} +1 -1
  80. package/.output/public/_nuxt/Dkikh2OC.js +22 -0
  81. package/.output/public/_nuxt/DlOyXrKK.js +1 -0
  82. package/.output/public/_nuxt/{UqWhjgOc.js → Dpl6-lqE.js} +1 -1
  83. package/.output/public/_nuxt/DqA_edEU.js +1 -0
  84. package/.output/public/_nuxt/DqxL2Lpl.js +1 -0
  85. package/.output/public/_nuxt/Dt3rfvTn.js +1 -0
  86. package/.output/public/_nuxt/Dt5h0Tys.js +1 -0
  87. package/.output/public/_nuxt/DwrSZ8Vj.js +1 -0
  88. package/.output/public/_nuxt/DwyFZZT6.js +1 -0
  89. package/.output/public/_nuxt/EM8J-XL1.js +7 -0
  90. package/.output/public/_nuxt/ESKvsKwc.js +1 -0
  91. package/.output/public/_nuxt/{CWGdTiOD.js → F5lCgNdb.js} +1 -1
  92. package/.output/public/_nuxt/H5m89x1B.js +1 -0
  93. package/.output/public/_nuxt/{CwdIiq6J.js → PUe8M07P.js} +2 -2
  94. package/.output/public/_nuxt/{Cjgqfl1g.js → TEF-nDfP.js} +1 -1
  95. package/.output/public/_nuxt/{DNZpxuwM.js → TuKV3Ilv.js} +1 -1
  96. package/.output/public/_nuxt/V5LvXMJl.js +1 -0
  97. package/.output/public/_nuxt/{c_huf6xz.js → YJvNy3iu.js} +27 -27
  98. package/.output/public/_nuxt/{C7C8tPlA.js → ZObQcd0X.js} +1 -1
  99. package/.output/public/_nuxt/{CHOD7i6O.js → b_MfGg1c.js} +1 -1
  100. package/.output/public/_nuxt/builds/latest.json +1 -1
  101. package/.output/public/_nuxt/builds/meta/455d4da4-6357-4478-8703-78a79ccbbc0f.json +1 -0
  102. package/.output/public/_nuxt/entry.qdzR7QFr.css +1 -0
  103. package/.output/public/_nuxt/fpuEgQ7C.js +12 -0
  104. package/.output/public/_nuxt/jU7fkvuR.js +1 -0
  105. package/.output/public/_nuxt/{CSTzT9hP.js → lHkFwi3L.js} +1 -1
  106. package/.output/public/_nuxt/{BQOaPJzs.js → minLMBmY.js} +1 -1
  107. package/.output/public/_nuxt/pQ8l8BR2.js +1 -0
  108. package/.output/public/_nuxt/xYXqL1eV.js +1 -0
  109. package/.output/public/_nuxt/xxfb8w7n.js +1 -0
  110. package/.output/server/chunks/_/create-adapter.mjs +36 -7
  111. package/.output/server/chunks/_/create-adapter.mjs.map +1 -1
  112. package/.output/server/chunks/_/database-error.mjs +10 -0
  113. package/.output/server/chunks/_/database-error.mjs.map +1 -1
  114. package/.output/server/chunks/_/database-roles.factory.mjs +126 -22
  115. package/.output/server/chunks/_/database-roles.factory.mjs.map +1 -1
  116. package/.output/server/chunks/_/db-connection.mjs +721 -81
  117. package/.output/server/chunks/_/db-connection.mjs.map +1 -1
  118. package/.output/server/chunks/_/functions.factory.mjs +97 -6
  119. package/.output/server/chunks/_/functions.factory.mjs.map +1 -1
  120. package/.output/server/chunks/_/instance-insights.factory.mjs +106 -7
  121. package/.output/server/chunks/_/instance-insights.factory.mjs.map +1 -1
  122. package/.output/server/chunks/_/metadata.factory.mjs +912 -43
  123. package/.output/server/chunks/_/metadata.factory.mjs.map +1 -1
  124. package/.output/server/chunks/_/native-backup-jobs.mjs +1302 -0
  125. package/.output/server/chunks/_/native-backup-jobs.mjs.map +1 -0
  126. package/.output/server/chunks/_/query.factory.mjs +536 -14
  127. package/.output/server/chunks/_/query.factory.mjs.map +1 -1
  128. package/.output/server/chunks/_/schemaMeta.type.mjs +13 -0
  129. package/.output/server/chunks/_/schemaMeta.type.mjs.map +1 -0
  130. package/.output/server/chunks/_/tables.factory.mjs +905 -37
  131. package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
  132. package/.output/server/chunks/_/type-alias.constants.mjs +242 -0
  133. package/.output/server/chunks/_/type-alias.constants.mjs.map +1 -0
  134. package/.output/server/chunks/_/views.factory.mjs +106 -8
  135. package/.output/server/chunks/_/views.factory.mjs.map +1 -1
  136. package/.output/server/chunks/build/client.manifest.mjs +676 -672
  137. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  138. package/.output/server/chunks/nitro/nitro.mjs +1046 -751
  139. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  140. package/.output/server/chunks/routes/api/ai/agent.mjs +30 -79
  141. package/.output/server/chunks/routes/api/ai/agent.mjs.map +1 -1
  142. package/.output/server/chunks/routes/api/database-export/export-database.mjs +26 -124
  143. package/.output/server/chunks/routes/api/database-export/export-database.mjs.map +1 -1
  144. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs +52 -0
  145. package/.output/server/chunks/routes/api/database-export/jobs/_jobId/download.get.mjs.map +1 -0
  146. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs +43 -0
  147. package/.output/server/chunks/routes/api/database-export/jobs/_jobId_.get.mjs.map +1 -0
  148. package/.output/server/chunks/routes/api/database-import/import-database.mjs +69 -134
  149. package/.output/server/chunks/routes/api/database-import/import-database.mjs.map +1 -1
  150. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs +43 -0
  151. package/.output/server/chunks/routes/api/database-import/jobs/_jobId_.get.mjs.map +1 -0
  152. package/.output/server/chunks/routes/api/database-roles/create-role.mjs +2 -0
  153. package/.output/server/chunks/routes/api/database-roles/create-role.mjs.map +1 -1
  154. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs +2 -0
  155. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs.map +1 -1
  156. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs +2 -0
  157. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs.map +1 -1
  158. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs +2 -0
  159. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs.map +1 -1
  160. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs +2 -0
  161. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs.map +1 -1
  162. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs +2 -0
  163. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs.map +1 -1
  164. package/.output/server/chunks/routes/api/database-roles/get-role.mjs +2 -0
  165. package/.output/server/chunks/routes/api/database-roles/get-role.mjs.map +1 -1
  166. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs +2 -0
  167. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs.map +1 -1
  168. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs +2 -0
  169. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs.map +1 -1
  170. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs +2 -0
  171. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs.map +1 -1
  172. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs +2 -0
  173. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs.map +1 -1
  174. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs +2 -0
  175. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs.map +1 -1
  176. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs +2 -0
  177. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs.map +1 -1
  178. package/.output/server/chunks/routes/api/functions/definition.post.mjs +3 -1
  179. package/.output/server/chunks/routes/api/functions/definition.post.mjs.map +1 -1
  180. package/.output/server/chunks/routes/api/functions/delete.post.mjs +3 -1
  181. package/.output/server/chunks/routes/api/functions/delete.post.mjs.map +1 -1
  182. package/.output/server/chunks/routes/api/functions/overview.post.mjs +3 -1
  183. package/.output/server/chunks/routes/api/functions/overview.post.mjs.map +1 -1
  184. package/.output/server/chunks/routes/api/functions/rename.post.mjs +3 -1
  185. package/.output/server/chunks/routes/api/functions/rename.post.mjs.map +1 -1
  186. package/.output/server/chunks/routes/api/functions/signature.post.mjs +3 -1
  187. package/.output/server/chunks/routes/api/functions/signature.post.mjs.map +1 -1
  188. package/.output/server/chunks/routes/api/functions/update.post.mjs +24 -6
  189. package/.output/server/chunks/routes/api/functions/update.post.mjs.map +1 -1
  190. package/.output/server/chunks/routes/api/index.post.mjs +63 -0
  191. package/.output/server/chunks/routes/api/index.post.mjs.map +1 -0
  192. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs +2 -0
  193. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs.map +1 -1
  194. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs +2 -0
  195. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs.map +1 -1
  196. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs +2 -0
  197. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs.map +1 -1
  198. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs +2 -0
  199. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs.map +1 -1
  200. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs +2 -0
  201. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs.map +1 -1
  202. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs +2 -0
  203. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs.map +1 -1
  204. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs +2 -0
  205. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs.map +1 -1
  206. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs +2 -0
  207. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs.map +1 -1
  208. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +10 -4
  209. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -1
  210. package/.output/server/chunks/routes/api/metadata/erd.post.mjs +4 -0
  211. package/.output/server/chunks/routes/api/metadata/erd.post.mjs.map +1 -1
  212. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs +4 -0
  213. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs.map +1 -1
  214. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs +4 -0
  215. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs.map +1 -1
  216. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs +80 -7
  217. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs.map +1 -1
  218. package/.output/server/chunks/routes/api/query/execute.post.mjs +3 -1
  219. package/.output/server/chunks/routes/api/query/execute.post.mjs.map +1 -1
  220. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs +3 -1
  221. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs.map +1 -1
  222. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs +3 -1
  223. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs.map +1 -1
  224. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs +3 -1
  225. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs.map +1 -1
  226. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs +3 -1
  227. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs.map +1 -1
  228. package/.output/server/chunks/routes/api/tables/ddl.post.mjs +3 -1
  229. package/.output/server/chunks/routes/api/tables/ddl.post.mjs.map +1 -1
  230. package/.output/server/chunks/routes/api/tables/export.post.mjs +4 -2
  231. package/.output/server/chunks/routes/api/tables/export.post.mjs.map +1 -1
  232. package/.output/server/chunks/routes/api/tables/indexes.post.mjs +3 -1
  233. package/.output/server/chunks/routes/api/tables/indexes.post.mjs.map +1 -1
  234. package/.output/server/chunks/routes/api/tables/meta.post.mjs +3 -1
  235. package/.output/server/chunks/routes/api/tables/meta.post.mjs.map +1 -1
  236. package/.output/server/chunks/routes/api/tables/overview.post.mjs +3 -1
  237. package/.output/server/chunks/routes/api/tables/overview.post.mjs.map +1 -1
  238. package/.output/server/chunks/routes/api/tables/rls.post.mjs +3 -1
  239. package/.output/server/chunks/routes/api/tables/rls.post.mjs.map +1 -1
  240. package/.output/server/chunks/routes/api/tables/rules.post.mjs +3 -1
  241. package/.output/server/chunks/routes/api/tables/rules.post.mjs.map +1 -1
  242. package/.output/server/chunks/routes/api/tables/size.post.mjs +3 -1
  243. package/.output/server/chunks/routes/api/tables/size.post.mjs.map +1 -1
  244. package/.output/server/chunks/routes/api/tables/structure.post.mjs +3 -1
  245. package/.output/server/chunks/routes/api/tables/structure.post.mjs.map +1 -1
  246. package/.output/server/chunks/routes/api/tables/triggers.post.mjs +3 -1
  247. package/.output/server/chunks/routes/api/tables/triggers.post.mjs.map +1 -1
  248. package/.output/server/chunks/routes/api/views/definition.post.mjs +2 -0
  249. package/.output/server/chunks/routes/api/views/definition.post.mjs.map +1 -1
  250. package/.output/server/chunks/routes/api/views/dependencies.post.mjs +2 -0
  251. package/.output/server/chunks/routes/api/views/dependencies.post.mjs.map +1 -1
  252. package/.output/server/chunks/routes/api/views/explain.post.mjs +2 -0
  253. package/.output/server/chunks/routes/api/views/explain.post.mjs.map +1 -1
  254. package/.output/server/chunks/routes/api/views/indexes.post.mjs +2 -0
  255. package/.output/server/chunks/routes/api/views/indexes.post.mjs.map +1 -1
  256. package/.output/server/chunks/routes/api/views/meta.post.mjs +2 -0
  257. package/.output/server/chunks/routes/api/views/meta.post.mjs.map +1 -1
  258. package/.output/server/chunks/routes/api/views/overview.post.mjs +2 -0
  259. package/.output/server/chunks/routes/api/views/overview.post.mjs.map +1 -1
  260. package/.output/server/chunks/routes/renderer.mjs +1 -1
  261. package/.output/server/index.mjs +1 -1
  262. package/.output/server/node_modules/aws-ssl-profiles/lib/index.js +13 -0
  263. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/defaults.js +2888 -0
  264. package/.output/server/node_modules/aws-ssl-profiles/lib/profiles/ca/proxies.js +111 -0
  265. package/.output/server/node_modules/aws-ssl-profiles/package.json +52 -0
  266. package/.output/server/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  267. package/.output/server/node_modules/better-sqlite3/lib/database.js +90 -0
  268. package/.output/server/node_modules/better-sqlite3/lib/index.js +3 -0
  269. package/.output/server/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  270. package/.output/server/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  271. package/.output/server/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  272. package/.output/server/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  273. package/.output/server/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  274. package/.output/server/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  275. package/.output/server/node_modules/better-sqlite3/lib/methods/table.js +189 -0
  276. package/.output/server/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  277. package/.output/server/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  278. package/.output/server/node_modules/better-sqlite3/lib/sqlite-error.js +20 -0
  279. package/.output/server/node_modules/better-sqlite3/lib/util.js +12 -0
  280. package/.output/server/node_modules/better-sqlite3/package.json +59 -0
  281. package/.output/server/node_modules/cpu-features/build/Release/cpufeatures.node +0 -0
  282. package/.output/server/node_modules/cpu-features/lib/index.js +5 -0
  283. package/.output/server/node_modules/cpu-features/package.json +40 -0
  284. package/.output/server/node_modules/denque/index.js +481 -0
  285. package/.output/server/node_modules/denque/package.json +58 -0
  286. package/.output/server/node_modules/generate-function/index.js +181 -0
  287. package/.output/server/node_modules/generate-function/package.json +32 -0
  288. package/.output/server/node_modules/iconv-lite/encodings/dbcs-codec.js +532 -0
  289. package/.output/server/node_modules/iconv-lite/encodings/dbcs-data.js +185 -0
  290. package/.output/server/node_modules/iconv-lite/encodings/index.js +23 -0
  291. package/.output/server/node_modules/iconv-lite/encodings/internal.js +218 -0
  292. package/.output/server/node_modules/iconv-lite/encodings/sbcs-codec.js +75 -0
  293. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
  294. package/.output/server/node_modules/iconv-lite/encodings/sbcs-data.js +178 -0
  295. package/.output/server/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
  296. package/.output/server/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
  297. package/.output/server/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
  298. package/.output/server/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
  299. package/.output/server/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
  300. package/.output/server/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
  301. package/.output/server/node_modules/iconv-lite/encodings/tables/gbk-added.json +56 -0
  302. package/.output/server/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
  303. package/.output/server/node_modules/iconv-lite/encodings/utf16.js +187 -0
  304. package/.output/server/node_modules/iconv-lite/encodings/utf32.js +307 -0
  305. package/.output/server/node_modules/iconv-lite/encodings/utf7.js +283 -0
  306. package/.output/server/node_modules/iconv-lite/lib/bom-handling.js +48 -0
  307. package/.output/server/node_modules/iconv-lite/lib/helpers/merge-exports.js +13 -0
  308. package/.output/server/node_modules/iconv-lite/lib/index.js +182 -0
  309. package/.output/server/node_modules/iconv-lite/lib/streams.js +105 -0
  310. package/.output/server/node_modules/iconv-lite/package.json +70 -0
  311. package/.output/server/node_modules/is-property/is-property.js +5 -0
  312. package/.output/server/node_modules/is-property/package.json +36 -0
  313. package/.output/server/node_modules/long/package.json +58 -0
  314. package/.output/server/node_modules/long/umd/index.js +1622 -0
  315. package/.output/server/node_modules/long/umd/package.json +3 -0
  316. package/.output/server/node_modules/lru.min/lib/index.js +248 -0
  317. package/.output/server/node_modules/lru.min/package.json +87 -0
  318. package/.output/server/node_modules/mysql2/index.js +77 -0
  319. package/.output/server/node_modules/mysql2/lib/auth_41.js +95 -0
  320. package/.output/server/node_modules/mysql2/lib/auth_plugins/caching_sha2_password.js +115 -0
  321. package/.output/server/node_modules/mysql2/lib/auth_plugins/index.js +8 -0
  322. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_clear_password.js +17 -0
  323. package/.output/server/node_modules/mysql2/lib/auth_plugins/mysql_native_password.js +34 -0
  324. package/.output/server/node_modules/mysql2/lib/auth_plugins/sha256_password.js +74 -0
  325. package/.output/server/node_modules/mysql2/lib/base/connection.js +1139 -0
  326. package/.output/server/node_modules/mysql2/lib/base/pool.js +343 -0
  327. package/.output/server/node_modules/mysql2/lib/commands/auth_switch.js +151 -0
  328. package/.output/server/node_modules/mysql2/lib/commands/binlog_dump.js +109 -0
  329. package/.output/server/node_modules/mysql2/lib/commands/change_user.js +68 -0
  330. package/.output/server/node_modules/mysql2/lib/commands/client_handshake.js +386 -0
  331. package/.output/server/node_modules/mysql2/lib/commands/close_statement.js +18 -0
  332. package/.output/server/node_modules/mysql2/lib/commands/command.js +54 -0
  333. package/.output/server/node_modules/mysql2/lib/commands/execute.js +116 -0
  334. package/.output/server/node_modules/mysql2/lib/commands/index.js +29 -0
  335. package/.output/server/node_modules/mysql2/lib/commands/ping.js +36 -0
  336. package/.output/server/node_modules/mysql2/lib/commands/prepare.js +143 -0
  337. package/.output/server/node_modules/mysql2/lib/commands/query.js +365 -0
  338. package/.output/server/node_modules/mysql2/lib/commands/quit.js +29 -0
  339. package/.output/server/node_modules/mysql2/lib/commands/register_slave.js +27 -0
  340. package/.output/server/node_modules/mysql2/lib/commands/reset_connection.js +29 -0
  341. package/.output/server/node_modules/mysql2/lib/commands/server_handshake.js +205 -0
  342. package/.output/server/node_modules/mysql2/lib/compressed_protocol.js +153 -0
  343. package/.output/server/node_modules/mysql2/lib/connection.js +12 -0
  344. package/.output/server/node_modules/mysql2/lib/connection_config.js +299 -0
  345. package/.output/server/node_modules/mysql2/lib/constants/charset_encodings.js +317 -0
  346. package/.output/server/node_modules/mysql2/lib/constants/charsets.js +317 -0
  347. package/.output/server/node_modules/mysql2/lib/constants/client.js +39 -0
  348. package/.output/server/node_modules/mysql2/lib/constants/commands.js +37 -0
  349. package/.output/server/node_modules/mysql2/lib/constants/cursor.js +9 -0
  350. package/.output/server/node_modules/mysql2/lib/constants/encoding_charset.js +50 -0
  351. package/.output/server/node_modules/mysql2/lib/constants/errors.js +3973 -0
  352. package/.output/server/node_modules/mysql2/lib/constants/field_flags.js +20 -0
  353. package/.output/server/node_modules/mysql2/lib/constants/server_status.js +44 -0
  354. package/.output/server/node_modules/mysql2/lib/constants/session_track.js +11 -0
  355. package/.output/server/node_modules/mysql2/lib/constants/ssl_profiles.js +11 -0
  356. package/.output/server/node_modules/mysql2/lib/constants/types.js +64 -0
  357. package/.output/server/node_modules/mysql2/lib/create_connection.js +10 -0
  358. package/.output/server/node_modules/mysql2/lib/create_pool.js +10 -0
  359. package/.output/server/node_modules/mysql2/lib/create_pool_cluster.js +9 -0
  360. package/.output/server/node_modules/mysql2/lib/helpers.js +83 -0
  361. package/.output/server/node_modules/mysql2/lib/packet_parser.js +195 -0
  362. package/.output/server/node_modules/mysql2/lib/packets/auth_next_factor.js +35 -0
  363. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request.js +38 -0
  364. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_request_more_data.js +33 -0
  365. package/.output/server/node_modules/mysql2/lib/packets/auth_switch_response.js +30 -0
  366. package/.output/server/node_modules/mysql2/lib/packets/binary_row.js +95 -0
  367. package/.output/server/node_modules/mysql2/lib/packets/binlog_dump.js +33 -0
  368. package/.output/server/node_modules/mysql2/lib/packets/binlog_query_statusvars.js +115 -0
  369. package/.output/server/node_modules/mysql2/lib/packets/change_user.js +97 -0
  370. package/.output/server/node_modules/mysql2/lib/packets/close_statement.js +21 -0
  371. package/.output/server/node_modules/mysql2/lib/packets/column_definition.js +291 -0
  372. package/.output/server/node_modules/mysql2/lib/packets/encode_parameter.js +69 -0
  373. package/.output/server/node_modules/mysql2/lib/packets/execute.js +177 -0
  374. package/.output/server/node_modules/mysql2/lib/packets/handshake.js +112 -0
  375. package/.output/server/node_modules/mysql2/lib/packets/handshake_response.js +173 -0
  376. package/.output/server/node_modules/mysql2/lib/packets/index.js +154 -0
  377. package/.output/server/node_modules/mysql2/lib/packets/packet.js +978 -0
  378. package/.output/server/node_modules/mysql2/lib/packets/prepare_statement.js +27 -0
  379. package/.output/server/node_modules/mysql2/lib/packets/prepared_statement_header.js +16 -0
  380. package/.output/server/node_modules/mysql2/lib/packets/query.js +102 -0
  381. package/.output/server/node_modules/mysql2/lib/packets/register_slave.js +46 -0
  382. package/.output/server/node_modules/mysql2/lib/packets/reset_connection.js +17 -0
  383. package/.output/server/node_modules/mysql2/lib/packets/resultset_header.js +124 -0
  384. package/.output/server/node_modules/mysql2/lib/packets/ssl_request.js +25 -0
  385. package/.output/server/node_modules/mysql2/lib/packets/text_row.js +47 -0
  386. package/.output/server/node_modules/mysql2/lib/parsers/binary_parser.js +235 -0
  387. package/.output/server/node_modules/mysql2/lib/parsers/parser_cache.js +68 -0
  388. package/.output/server/node_modules/mysql2/lib/parsers/static_binary_parser.js +213 -0
  389. package/.output/server/node_modules/mysql2/lib/parsers/static_text_parser.js +152 -0
  390. package/.output/server/node_modules/mysql2/lib/parsers/string.js +50 -0
  391. package/.output/server/node_modules/mysql2/lib/parsers/text_parser.js +214 -0
  392. package/.output/server/node_modules/mysql2/lib/pool.js +12 -0
  393. package/.output/server/node_modules/mysql2/lib/pool_cluster.js +375 -0
  394. package/.output/server/node_modules/mysql2/lib/pool_config.js +34 -0
  395. package/.output/server/node_modules/mysql2/lib/pool_connection.js +81 -0
  396. package/.output/server/node_modules/mysql2/lib/promise/capture_local_err.js +25 -0
  397. package/.output/server/node_modules/mysql2/lib/promise/connection.js +237 -0
  398. package/.output/server/node_modules/mysql2/lib/promise/inherit_events.js +27 -0
  399. package/.output/server/node_modules/mysql2/lib/promise/make_done_cb.js +16 -0
  400. package/.output/server/node_modules/mysql2/lib/promise/pool.js +118 -0
  401. package/.output/server/node_modules/mysql2/lib/promise/pool_cluster.js +59 -0
  402. package/.output/server/node_modules/mysql2/lib/promise/pool_connection.js +19 -0
  403. package/.output/server/node_modules/mysql2/lib/promise/prepared_statement_info.js +35 -0
  404. package/.output/server/node_modules/mysql2/lib/server.js +37 -0
  405. package/.output/server/node_modules/mysql2/lib/tracing.js +81 -0
  406. package/.output/server/node_modules/mysql2/package.json +95 -0
  407. package/.output/server/node_modules/mysql2/promise.js +209 -0
  408. package/.output/server/node_modules/named-placeholders/index.js +179 -0
  409. package/.output/server/node_modules/named-placeholders/package.json +36 -0
  410. package/.output/server/node_modules/oracledb/index.js +27 -0
  411. package/.output/server/node_modules/oracledb/lib/aqDeqOptions.js +186 -0
  412. package/.output/server/node_modules/oracledb/lib/aqEnqOptions.js +81 -0
  413. package/.output/server/node_modules/oracledb/lib/aqMessage.js +149 -0
  414. package/.output/server/node_modules/oracledb/lib/aqQueue.js +293 -0
  415. package/.output/server/node_modules/oracledb/lib/connection.js +1842 -0
  416. package/.output/server/node_modules/oracledb/lib/constants.js +210 -0
  417. package/.output/server/node_modules/oracledb/lib/dbObject.js +606 -0
  418. package/.output/server/node_modules/oracledb/lib/errors.js +1046 -0
  419. package/.output/server/node_modules/oracledb/lib/future.js +53 -0
  420. package/.output/server/node_modules/oracledb/lib/impl/aqDeqOptions.js +206 -0
  421. package/.output/server/node_modules/oracledb/lib/impl/aqEnqOptions.js +89 -0
  422. package/.output/server/node_modules/oracledb/lib/impl/aqMessage.js +134 -0
  423. package/.output/server/node_modules/oracledb/lib/impl/aqQueue.js +82 -0
  424. package/.output/server/node_modules/oracledb/lib/impl/base.js +45 -0
  425. package/.output/server/node_modules/oracledb/lib/impl/connection.js +671 -0
  426. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/buffer.js +1214 -0
  427. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/constants.js +110 -0
  428. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/oson.js +852 -0
  429. package/.output/server/node_modules/oracledb/lib/impl/datahandlers/vector.js +197 -0
  430. package/.output/server/node_modules/oracledb/lib/impl/dbObject.js +159 -0
  431. package/.output/server/node_modules/oracledb/lib/impl/index.js +59 -0
  432. package/.output/server/node_modules/oracledb/lib/impl/lob.js +113 -0
  433. package/.output/server/node_modules/oracledb/lib/impl/pool.js +230 -0
  434. package/.output/server/node_modules/oracledb/lib/impl/resultset.js +307 -0
  435. package/.output/server/node_modules/oracledb/lib/impl/sodaCollection.js +175 -0
  436. package/.output/server/node_modules/oracledb/lib/impl/sodaDatabase.js +82 -0
  437. package/.output/server/node_modules/oracledb/lib/impl/sodaDocCursor.js +64 -0
  438. package/.output/server/node_modules/oracledb/lib/impl/sodaDocument.js +89 -0
  439. package/.output/server/node_modules/oracledb/lib/impl/sodaOperation.js +110 -0
  440. package/.output/server/node_modules/oracledb/lib/lob.js +315 -0
  441. package/.output/server/node_modules/oracledb/lib/oracledb.js +1716 -0
  442. package/.output/server/node_modules/oracledb/lib/pool.js +873 -0
  443. package/.output/server/node_modules/oracledb/lib/poolStatistics.js +143 -0
  444. package/.output/server/node_modules/oracledb/lib/queryStream.js +119 -0
  445. package/.output/server/node_modules/oracledb/lib/resultset.js +368 -0
  446. package/.output/server/node_modules/oracledb/lib/settings.js +221 -0
  447. package/.output/server/node_modules/oracledb/lib/sodaCollection.js +284 -0
  448. package/.output/server/node_modules/oracledb/lib/sodaDatabase.js +176 -0
  449. package/.output/server/node_modules/oracledb/lib/sodaDocCursor.js +82 -0
  450. package/.output/server/node_modules/oracledb/lib/sodaDocument.js +125 -0
  451. package/.output/server/node_modules/oracledb/lib/sodaOperation.js +236 -0
  452. package/.output/server/node_modules/oracledb/lib/thin/aq.js +475 -0
  453. package/.output/server/node_modules/oracledb/lib/thin/connection.js +1504 -0
  454. package/.output/server/node_modules/oracledb/lib/thin/dbObject.js +737 -0
  455. package/.output/server/node_modules/oracledb/lib/thin/index.js +40 -0
  456. package/.output/server/node_modules/oracledb/lib/thin/lob.js +380 -0
  457. package/.output/server/node_modules/oracledb/lib/thin/pool.js +738 -0
  458. package/.output/server/node_modules/oracledb/lib/thin/protocol/capabilities.js +145 -0
  459. package/.output/server/node_modules/oracledb/lib/thin/protocol/constants.js +872 -0
  460. package/.output/server/node_modules/oracledb/lib/thin/protocol/encryptDecrypt.js +197 -0
  461. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqArray.js +238 -0
  462. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqBase.js +305 -0
  463. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqDeq.js +164 -0
  464. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/aqEnq.js +135 -0
  465. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/auth.js +376 -0
  466. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/base.js +568 -0
  467. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/commit.js +56 -0
  468. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/dataType.js +401 -0
  469. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/execute.js +358 -0
  470. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fastAuth.js +83 -0
  471. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/fetch.js +64 -0
  472. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/index.js +59 -0
  473. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/lobOp.js +195 -0
  474. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/logOff.js +52 -0
  475. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/ping.js +56 -0
  476. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/protocol.js +97 -0
  477. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/rollback.js +56 -0
  478. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/sessionRelease.js +60 -0
  479. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionChangeState.js +99 -0
  480. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/transactionSwitch.js +147 -0
  481. package/.output/server/node_modules/oracledb/lib/thin/protocol/messages/withData.js +920 -0
  482. package/.output/server/node_modules/oracledb/lib/thin/protocol/packet.js +631 -0
  483. package/.output/server/node_modules/oracledb/lib/thin/protocol/protocol.js +240 -0
  484. package/.output/server/node_modules/oracledb/lib/thin/protocol/utils.js +82 -0
  485. package/.output/server/node_modules/oracledb/lib/thin/resultSet.js +122 -0
  486. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ANO.js +438 -0
  487. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/connStrategy.js +316 -0
  488. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/constants.js +210 -0
  489. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ezConnectResolver.js +466 -0
  490. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/navNodes.js +904 -0
  491. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/networkSession.js +733 -0
  492. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js +609 -0
  493. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/nvStrToNvPair.js +780 -0
  494. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/packet.js +439 -0
  495. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/paramParser.js +239 -0
  496. package/.output/server/node_modules/oracledb/lib/thin/sqlnet/sessionAtts.js +198 -0
  497. package/.output/server/node_modules/oracledb/lib/thin/statement.js +573 -0
  498. package/.output/server/node_modules/oracledb/lib/thin/statementCache.js +195 -0
  499. package/.output/server/node_modules/oracledb/lib/thin/util.js +254 -0
  500. package/.output/server/node_modules/oracledb/lib/traceHandler.js +133 -0
  501. package/.output/server/node_modules/oracledb/lib/transformer.js +279 -0
  502. package/.output/server/node_modules/oracledb/lib/types.js +592 -0
  503. package/.output/server/node_modules/oracledb/lib/util.js +648 -0
  504. package/.output/server/node_modules/oracledb/lib/version.js +36 -0
  505. package/.output/server/node_modules/oracledb/package.json +48 -0
  506. package/.output/server/node_modules/sql-escaper/lib/index.js +398 -0
  507. package/.output/server/node_modules/sql-escaper/package.json +81 -0
  508. package/.output/server/node_modules/sqlite3/build/Release/node_sqlite3.node +0 -0
  509. package/.output/server/node_modules/ssh2/lib/protocol/crypto/build/Release/sshcrypto.node +0 -0
  510. package/.output/server/package.json +14 -18
  511. package/package.json +2 -2
  512. package/.output/public/_nuxt/019vQzZn.js +0 -1
  513. package/.output/public/_nuxt/0lRW_xjL.js +0 -1
  514. package/.output/public/_nuxt/B6EI6PpE.js +0 -1
  515. package/.output/public/_nuxt/B9Mt45db.js +0 -1
  516. package/.output/public/_nuxt/BKltSiU0.js +0 -1
  517. package/.output/public/_nuxt/BM4vnZvX.js +0 -732
  518. package/.output/public/_nuxt/BNYR501z.js +0 -1
  519. package/.output/public/_nuxt/BVLVn__t.js +0 -9
  520. package/.output/public/_nuxt/BY1l0S_M.js +0 -1
  521. package/.output/public/_nuxt/BaseCodeEditor.SAr2eD8R.css +0 -1
  522. package/.output/public/_nuxt/BcvJQkv0.js +0 -1
  523. package/.output/public/_nuxt/BdN9B2_l.js +0 -160
  524. package/.output/public/_nuxt/BflvengI.js +0 -1
  525. package/.output/public/_nuxt/BgolbRTO.js +0 -1
  526. package/.output/public/_nuxt/BwISH3M4.js +0 -1
  527. package/.output/public/_nuxt/C-M4q4KX.js +0 -1
  528. package/.output/public/_nuxt/C2Ziircr.js +0 -1
  529. package/.output/public/_nuxt/C3NWXcpd.js +0 -39
  530. package/.output/public/_nuxt/C5p44jKD.js +0 -1
  531. package/.output/public/_nuxt/C617vhDd.js +0 -1
  532. package/.output/public/_nuxt/C8S0o4Gy.js +0 -1
  533. package/.output/public/_nuxt/CNlsVoWh.js +0 -1
  534. package/.output/public/_nuxt/CWkPMmwS.js +0 -2
  535. package/.output/public/_nuxt/Cgy4ijjN.js +0 -67
  536. package/.output/public/_nuxt/ClBBUcFW.js +0 -1
  537. package/.output/public/_nuxt/CuRyxljq.js +0 -1
  538. package/.output/public/_nuxt/Cx4Bnfq1.js +0 -2
  539. package/.output/public/_nuxt/D-H6_V16.js +0 -1
  540. package/.output/public/_nuxt/D-SDqguC.js +0 -1
  541. package/.output/public/_nuxt/D-XwprNU.js +0 -6
  542. package/.output/public/_nuxt/D3G5Xy_-.js +0 -1
  543. package/.output/public/_nuxt/D9o5Pdvp.js +0 -1
  544. package/.output/public/_nuxt/DFArp87o.js +0 -1
  545. package/.output/public/_nuxt/DFZIXzfU.js +0 -1
  546. package/.output/public/_nuxt/DHRNt0p9.js +0 -1
  547. package/.output/public/_nuxt/DLKku6fV.js +0 -1
  548. package/.output/public/_nuxt/DWgjNKGq.js +0 -152
  549. package/.output/public/_nuxt/DYm57BZk.js +0 -2
  550. package/.output/public/_nuxt/DaQw8gVp.js +0 -1
  551. package/.output/public/_nuxt/DgnsV5Qb.js +0 -1
  552. package/.output/public/_nuxt/Do5Fyo7J.js +0 -1
  553. package/.output/public/_nuxt/Dqirx7MF.js +0 -1
  554. package/.output/public/_nuxt/GoTwJjoS.js +0 -39
  555. package/.output/public/_nuxt/Hs25HoUO.js +0 -22
  556. package/.output/public/_nuxt/J2CvNR3L.js +0 -1
  557. package/.output/public/_nuxt/LK6Q8l0D.js +0 -1
  558. package/.output/public/_nuxt/Oh9SO2qg.js +0 -1
  559. package/.output/public/_nuxt/P_8UoGnr.js +0 -72
  560. package/.output/public/_nuxt/V5yaR3hv.js +0 -2
  561. package/.output/public/_nuxt/XWTuAj6n.js +0 -1
  562. package/.output/public/_nuxt/XqwbcqcW.js +0 -1
  563. package/.output/public/_nuxt/Yzrsuije.js +0 -1
  564. package/.output/public/_nuxt/_8UrUcVF.js +0 -1
  565. package/.output/public/_nuxt/builds/meta/27a307c3-bfc5-4ccd-94b8-387eb94981bb.json +0 -1
  566. package/.output/public/_nuxt/cKBf5-av.js +0 -1
  567. package/.output/public/_nuxt/entry.DeK5kcSi.css +0 -1
  568. package/.output/public/_nuxt/kc-op4gz.js +0 -12
  569. package/.output/public/_nuxt/kehy-5uo.js +0 -1
  570. package/.output/public/_nuxt/lSaGvORn.js +0 -10
  571. package/.output/public/_nuxt/lY3EyFEK.js +0 -1
  572. package/.output/public/_nuxt/tMhdAKU2.js +0 -3
  573. package/.output/public/_nuxt/uyCIL8xw.js +0 -1
  574. package/.output/server/node_modules/cross-spawn/index.js +0 -39
  575. package/.output/server/node_modules/cross-spawn/lib/enoent.js +0 -59
  576. package/.output/server/node_modules/cross-spawn/lib/parse.js +0 -91
  577. package/.output/server/node_modules/cross-spawn/lib/util/escape.js +0 -47
  578. package/.output/server/node_modules/cross-spawn/lib/util/readShebang.js +0 -23
  579. package/.output/server/node_modules/cross-spawn/lib/util/resolveCommand.js +0 -52
  580. package/.output/server/node_modules/cross-spawn/package.json +0 -73
  581. package/.output/server/node_modules/execa/index.js +0 -268
  582. package/.output/server/node_modules/execa/lib/command.js +0 -52
  583. package/.output/server/node_modules/execa/lib/error.js +0 -88
  584. package/.output/server/node_modules/execa/lib/kill.js +0 -115
  585. package/.output/server/node_modules/execa/lib/promise.js +0 -46
  586. package/.output/server/node_modules/execa/lib/stdio.js +0 -52
  587. package/.output/server/node_modules/execa/lib/stream.js +0 -97
  588. package/.output/server/node_modules/execa/package.json +0 -74
  589. package/.output/server/node_modules/get-stream/buffer-stream.js +0 -52
  590. package/.output/server/node_modules/get-stream/index.js +0 -61
  591. package/.output/server/node_modules/get-stream/package.json +0 -47
  592. package/.output/server/node_modules/human-signals/build/src/core.js +0 -273
  593. package/.output/server/node_modules/human-signals/build/src/main.js +0 -71
  594. package/.output/server/node_modules/human-signals/build/src/realtime.js +0 -19
  595. package/.output/server/node_modules/human-signals/build/src/signals.js +0 -35
  596. package/.output/server/node_modules/human-signals/package.json +0 -64
  597. package/.output/server/node_modules/is-stream/index.js +0 -28
  598. package/.output/server/node_modules/is-stream/package.json +0 -42
  599. package/.output/server/node_modules/isexe/index.js +0 -57
  600. package/.output/server/node_modules/isexe/mode.js +0 -41
  601. package/.output/server/node_modules/isexe/package.json +0 -31
  602. package/.output/server/node_modules/isexe/windows.js +0 -42
  603. package/.output/server/node_modules/merge-stream/index.js +0 -41
  604. package/.output/server/node_modules/merge-stream/package.json +0 -19
  605. package/.output/server/node_modules/mimic-fn/index.js +0 -13
  606. package/.output/server/node_modules/mimic-fn/package.json +0 -42
  607. package/.output/server/node_modules/npm-run-path/index.js +0 -47
  608. package/.output/server/node_modules/npm-run-path/package.json +0 -44
  609. package/.output/server/node_modules/onetime/index.js +0 -44
  610. package/.output/server/node_modules/onetime/package.json +0 -43
  611. package/.output/server/node_modules/path-key/index.js +0 -16
  612. package/.output/server/node_modules/path-key/package.json +0 -39
  613. package/.output/server/node_modules/pg-dump-restore/lib/common.js +0 -33
  614. package/.output/server/node_modules/pg-dump-restore/lib/index.js +0 -9
  615. package/.output/server/node_modules/pg-dump-restore/lib/pg-dump.js +0 -95
  616. package/.output/server/node_modules/pg-dump-restore/lib/pg-restore.js +0 -87
  617. package/.output/server/node_modules/pg-dump-restore/package.json +0 -66
  618. package/.output/server/node_modules/shebang-command/index.js +0 -19
  619. package/.output/server/node_modules/shebang-command/package.json +0 -34
  620. package/.output/server/node_modules/shebang-regex/index.js +0 -2
  621. package/.output/server/node_modules/shebang-regex/package.json +0 -35
  622. package/.output/server/node_modules/signal-exit/index.js +0 -202
  623. package/.output/server/node_modules/signal-exit/package.json +0 -38
  624. package/.output/server/node_modules/signal-exit/signals.js +0 -53
  625. package/.output/server/node_modules/strip-final-newline/index.js +0 -16
  626. package/.output/server/node_modules/strip-final-newline/package.json +0 -40
  627. package/.output/server/node_modules/which/package.json +0 -43
  628. package/.output/server/node_modules/which/which.js +0 -125
@@ -1,4 +1,4 @@
1
- var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fn=(t,e,n)=>dv(t,typeof e!="symbol"?e+"":e,n);import{fn as hv,a4 as ir}from"./BM4vnZvX.js";function Ye(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function pv(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function cs(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Xm{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.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 Ye(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 Ws(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Jm(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Zm(t){return Ws(t)&&typeof t.fullText=="string"}class We{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 We(()=>({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 ht})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=mv(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 We(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ht:{done:!1,value:e(i)}})}filter(e){return new We(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ht})}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 We(()=>({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(Co(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ht})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new We(()=>({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(Co(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ht})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new We(()=>{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 We(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ht:this.nextFn(n.state)))}distinct(e){return new We(()=>({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 ht})}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 mv(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Co(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Qm=new We(()=>{},()=>ht),ht=Object.freeze({done:!0,value:void 0});function Re(...t){if(t.length===1){const e=t[0];if(e instanceof We)return e;if(Co(e))return new We(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new We(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ht)}return t.length>1?new We(()=>({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++];Co(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ht}):Qm}class wf extends We{constructor(e,n,r){super(()=>({iterators:r!=null&&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 ht})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pu;(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})(Pu||(Pu={}));function Iu(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ye(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Iu(i,e))}):Ye(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Iu(r,e)))}function ic(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function yn(t){const n=fo(t).$document;if(!n)throw new Error("AST node has no document.");return n}function fo(t){for(;t.$container;)t=t.$container;return t}function Pd(t){return Pt(t)?t.ref?[t.ref]:[]:Un(t)?t.items.map(e=>e.ref):[]}function Cf(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new We(()=>({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(Ye(s)){if(r.keyIndex++,Id(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(Ye(o)&&Id(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ht})}function da(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e))}function Tn(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e),{includeRoot:!0})}function Id(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?Fv(n,e):!1}function No(t){return new We(()=>({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(Pt(r)||Un(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(Pt(s)||Un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ht})}function gv(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]=eg(i.defaultValue))}function eg(t){return Array.isArray(t)?[...t.map(eg)]:t}const dt={$type:"AbstractElement",cardinality:"cardinality"};function yv(t){return te.isInstance(t,dt.$type)}const ho={$type:"AbstractParserRule"};function ha(t){return te.isInstance(t,ho.$type)}const Ha={$type:"AbstractRule"},Ct={$type:"AbstractType"},yr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function sc(t){return te.isInstance(t,yr.$type)}const po={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function tg(t){return te.isInstance(t,po.$type)}const kd={$type:"ArrayLiteral",elements:"elements"},Od={$type:"ArrayType",elementType:"elementType"},Tr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return te.isInstance(t,Tr.$type)}const ku={$type:"BooleanLiteral",true:"true"};function Tv(t){return te.isInstance(t,ku.$type)}const vr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function vv(t){return te.isInstance(t,vr.$type)}const Vr={$type:"Condition"},mo={$type:"Conjunction",left:"left",right:"right"};function $v(t){return te.isInstance(t,mo.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function ac(t){return te.isInstance(t,$r.$type)}const go={$type:"Disjunction",left:"left",right:"right"};function Rv(t){return te.isInstance(t,go.$type)}const Ou={$type:"EndOfFile",cardinality:"cardinality"};function Ev(t){return te.isInstance(t,Ou.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Ld={$type:"GrammarImport",path:"path"},ei={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nf(t){return te.isInstance(t,ei.$type)}const Lu={$type:"InferredType",name:"name"};function ng(t){return te.isInstance(t,Lu.$type)}const un={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return te.isInstance(t,un.$type)}const Xc={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},xd={$type:"InfixRuleOperators",precedences:"precedences"},ks={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Av(t){return te.isInstance(t,ks.$type)}const Os={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return te.isInstance(t,Os.$type)}const Va={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},ti={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _v(t){return te.isInstance(t,ti.$type)}const xu={$type:"Negation",value:"value"};function Sv(t){return te.isInstance(t,xu.$type)}const Md={$type:"NumberLiteral",value:"value"},Ya={$type:"Parameter",name:"name"},Mu={$type:"ParameterReference",parameter:"parameter"};function bv(t){return te.isInstance(t,Mu.$type)}const Gt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Sn(t){return te.isInstance(t,Gt.$type)}const Jc={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ni={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function wv(t){return te.isInstance(t,ni.$type)}const Du={$type:"ReturnType",name:"name"};function Cv(t){return te.isInstance(t,Du.$type)}const ri={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return te.isInstance(t,ri.$type)}const Ls={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Nv(t){return te.isInstance(t,Ls.$type)}const Dd={$type:"StringLiteral",value:"value"},ii={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Pv(t){return te.isInstance(t,ii.$type)}const Tt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},si={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Iv(t){return te.isInstance(t,si.$type)}const Gn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function bn(t){return te.isInstance(t,Gn.$type)}const ai={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function kv(t){return te.isInstance(t,ai.$type)}const yo={$type:"Type",name:"name",type:"type"};function Ov(t){return te.isInstance(t,yo.$type)}const us={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},ls={$type:"TypeDefinition"},Fd={$type:"UnionType",types:"types"},To={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function rg(t){return te.isInstance(t,To.$type)}const oi={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Lv(t){return te.isInstance(t,oi.$type)}const fs={$type:"ValueLiteral"},xs={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function xv(t){return te.isInstance(t,xs.$type)}class ig extends Xm{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:ho.$type,properties:{},superTypes:[Ha.$type,Ct.$type]},AbstractRule:{name:Ha.$type,properties:{},superTypes:[]},AbstractType:{name:Ct.$type,properties:{},superTypes:[]},Action:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},feature:{name:yr.feature},inferredType:{name:yr.inferredType},operator:{name:yr.operator},type:{name:yr.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Alternatives:{name:po.$type,properties:{cardinality:{name:po.cardinality},elements:{name:po.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:kd.$type,properties:{elements:{name:kd.elements,defaultValue:[]}},superTypes:[fs.$type]},ArrayType:{name:Od.$type,properties:{elementType:{name:Od.elementType}},superTypes:[ls.$type]},Assignment:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},feature:{name:Tr.feature},operator:{name:Tr.operator},predicate:{name:Tr.predicate},terminal:{name:Tr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:ku.$type,properties:{true:{name:ku.true,defaultValue:!1}},superTypes:[Vr.$type,fs.$type]},CharacterRange:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},left:{name:vr.left},lookahead:{name:vr.lookahead},parenthesized:{name:vr.parenthesized,defaultValue:!1},right:{name:vr.right}},superTypes:[Tt.$type]},Condition:{name:Vr.$type,properties:{},superTypes:[]},Conjunction:{name:mo.$type,properties:{left:{name:mo.left},right:{name:mo.right}},superTypes:[Vr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Disjunction:{name:go.$type,properties:{left:{name:go.left},right:{name:go.right}},superTypes:[Vr.$type]},EndOfFile:{name:Ou.$type,properties:{cardinality:{name:Ou.cardinality}},superTypes:[dt.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Ld.$type,properties:{path:{name:Ld.path}},superTypes:[]},Group:{name:ei.$type,properties:{cardinality:{name:ei.cardinality},elements:{name:ei.elements,defaultValue:[]},guardCondition:{name:ei.guardCondition},predicate:{name:ei.predicate}},superTypes:[dt.$type]},InferredType:{name:Lu.$type,properties:{name:{name:Lu.name}},superTypes:[Ct.$type]},InfixRule:{name:un.$type,properties:{call:{name:un.call},dataType:{name:un.dataType},inferredType:{name:un.inferredType},name:{name:un.name},operators:{name:un.operators},parameters:{name:un.parameters,defaultValue:[]},returnType:{name:un.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},InfixRuleOperatorList:{name:Xc.$type,properties:{associativity:{name:Xc.associativity},operators:{name:Xc.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:xd.$type,properties:{precedences:{name:xd.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ks.$type,properties:{attributes:{name:ks.attributes,defaultValue:[]},name:{name:ks.name},superTypes:{name:ks.superTypes,defaultValue:[],referenceType:Ct.$type}},superTypes:[Ct.$type]},Keyword:{name:Os.$type,properties:{cardinality:{name:Os.cardinality},predicate:{name:Os.predicate},value:{name:Os.value}},superTypes:[dt.$type]},NamedArgument:{name:Va.$type,properties:{calledByName:{name:Va.calledByName,defaultValue:!1},parameter:{name:Va.parameter,referenceType:Ya.$type},value:{name:Va.value}},superTypes:[]},NegatedToken:{name:ti.$type,properties:{cardinality:{name:ti.cardinality},lookahead:{name:ti.lookahead},parenthesized:{name:ti.parenthesized,defaultValue:!1},terminal:{name:ti.terminal}},superTypes:[Tt.$type]},Negation:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[Vr.$type]},NumberLiteral:{name:Md.$type,properties:{value:{name:Md.value}},superTypes:[fs.$type]},Parameter:{name:Ya.$type,properties:{name:{name:Ya.name}},superTypes:[]},ParameterReference:{name:Mu.$type,properties:{parameter:{name:Mu.parameter,referenceType:Ya.$type}},superTypes:[Vr.$type]},ParserRule:{name:Gt.$type,properties:{dataType:{name:Gt.dataType},definition:{name:Gt.definition},entry:{name:Gt.entry,defaultValue:!1},fragment:{name:Gt.fragment,defaultValue:!1},inferredType:{name:Gt.inferredType},name:{name:Gt.name},parameters:{name:Gt.parameters,defaultValue:[]},returnType:{name:Gt.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},ReferenceType:{name:Jc.$type,properties:{isMulti:{name:Jc.isMulti,defaultValue:!1},referenceType:{name:Jc.referenceType}},superTypes:[ls.$type]},RegexToken:{name:ni.$type,properties:{cardinality:{name:ni.cardinality},lookahead:{name:ni.lookahead},parenthesized:{name:ni.parenthesized,defaultValue:!1},regex:{name:ni.regex}},superTypes:[Tt.$type]},ReturnType:{name:Du.$type,properties:{name:{name:Du.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Ha.$type}},superTypes:[dt.$type]},SimpleType:{name:Ls.$type,properties:{primitiveType:{name:Ls.primitiveType},stringType:{name:Ls.stringType},typeRef:{name:Ls.typeRef,referenceType:Ct.$type}},superTypes:[ls.$type]},StringLiteral:{name:Dd.$type,properties:{value:{name:Dd.value}},superTypes:[fs.$type]},TerminalAlternatives:{name:ii.$type,properties:{cardinality:{name:ii.cardinality},elements:{name:ii.elements,defaultValue:[]},lookahead:{name:ii.lookahead},parenthesized:{name:ii.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalElement:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality},lookahead:{name:Tt.lookahead},parenthesized:{name:Tt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:si.$type,properties:{cardinality:{name:si.cardinality},elements:{name:si.elements,defaultValue:[]},lookahead:{name:si.lookahead},parenthesized:{name:si.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalRule:{name:Gn.$type,properties:{definition:{name:Gn.definition},fragment:{name:Gn.fragment,defaultValue:!1},hidden:{name:Gn.hidden,defaultValue:!1},name:{name:Gn.name},type:{name:Gn.type}},superTypes:[Ha.$type]},TerminalRuleCall:{name:ai.$type,properties:{cardinality:{name:ai.cardinality},lookahead:{name:ai.lookahead},parenthesized:{name:ai.parenthesized,defaultValue:!1},rule:{name:ai.rule,referenceType:Gn.$type}},superTypes:[Tt.$type]},Type:{name:yo.$type,properties:{name:{name:yo.name},type:{name:yo.type}},superTypes:[Ct.$type]},TypeAttribute:{name:us.$type,properties:{defaultValue:{name:us.defaultValue},isOptional:{name:us.isOptional,defaultValue:!1},name:{name:us.name},type:{name:us.type}},superTypes:[]},TypeDefinition:{name:ls.$type,properties:{},superTypes:[]},UnionType:{name:Fd.$type,properties:{types:{name:Fd.types,defaultValue:[]}},superTypes:[ls.$type]},UnorderedGroup:{name:To.$type,properties:{cardinality:{name:To.cardinality},elements:{name:To.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:oi.$type,properties:{cardinality:{name:oi.cardinality},lookahead:{name:oi.lookahead},parenthesized:{name:oi.parenthesized,defaultValue:!1},terminal:{name:oi.terminal}},superTypes:[Tt.$type]},ValueLiteral:{name:fs.$type,properties:{},superTypes:[]},Wildcard:{name:xs.$type,properties:{cardinality:{name:xs.cardinality},lookahead:{name:xs.lookahead},parenthesized:{name:xs.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]}}}}const te=new ig;function Fu(t){return new wf(t,e=>Ws(e)?e.content:[],{includeRoot:!0})}function Mv(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Gu(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Io(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var hn;(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"})(hn||(hn={}));function Dv(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return hn.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return hn.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?hn.Inside:n?hn.OverlapBack:r?hn.OverlapFront:hn.Outside}function Fv(t,e){return Dv(t,e)>hn.After}const Gv=/^[\w\p{L}]$/u;function jv(t,e){if(t){const n=Uv(t,!0);if(n&&Gd(n,e))return n;if(Zm(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Gd(s,e))return s}}}}function Gd(t,e){return Jm(t)&&e.includes(t.tokenType.name)}function Uv(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 sg extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function pa(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Zc(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function ds(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Yr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function zv(){throw Error("Internal Error - Should never get here!")}function jd(t){return t.type==="Character"}const ko=[];for(let t=W("0");t<=W("9");t++)ko.push(t);const Oo=[W("_")].concat(ko);for(let t=W("a");t<=W("z");t++)Oo.push(t);for(let t=W("A");t<=W("Z");t++)Oo.push(t);const Ud=[W(" "),W("\f"),W(`
1
+ var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Fn=(t,e,n)=>dv(t,typeof e!="symbol"?e+"":e,n);import{fV as hv,al as ir}from"./4by6-f6q.js";function Ye(t){return typeof t=="object"&&t!==null&&typeof t.$type=="string"}function Pt(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"ref"in t}function Un(t){return typeof t=="object"&&t!==null&&typeof t.$refText=="string"&&"items"in t}function pv(t){return typeof t=="object"&&t!==null&&typeof t.name=="string"&&typeof t.type=="string"&&typeof t.path=="string"}function cs(t){return typeof t=="object"&&t!==null&&typeof t.info=="object"&&typeof t.message=="string"}class Xm{constructor(){this.subtypes={},this.allSubtypes={}}getAllTypes(){return Object.keys(this.types)}getReferenceType(e){var i;const n=this.types[e.container.$type];if(!n)throw new Error(`Type ${e.container.$type||"undefined"} not found.`);const r=(i=n.properties[e.property])==null?void 0:i.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 Ye(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 Ws(t){return typeof t=="object"&&t!==null&&Array.isArray(t.content)}function Jm(t){return typeof t=="object"&&t!==null&&typeof t.tokenType=="object"}function Zm(t){return Ws(t)&&typeof t.fullText=="string"}class We{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 We(()=>({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 ht})}join(e=","){const n=this.iterator();let r="",i,s=!1;do i=n.next(),i.done||(s&&(r+=e),r+=mv(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 We(this.startFn,n=>{const{done:r,value:i}=this.nextFn(n);return r?ht:{done:!1,value:e(i)}})}filter(e){return new We(this.startFn,n=>{let r;do if(r=this.nextFn(n),!r.done&&e(r.value))return r;while(!r.done);return ht})}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 We(()=>({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(Co(s))n.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}}while(n.iterator);return ht})}flat(e){if(e===void 0&&(e=1),e<=0)return this;const n=e>1?this.flat(e-1):this;return new We(()=>({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(Co(s))r.iterator=s[Symbol.iterator]();else return{done:!1,value:s}}while(r.iterator);return ht})}head(){const n=this.iterator().next();if(!n.done)return n.value}tail(e=1){return new We(()=>{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 We(()=>({size:0,state:this.startFn()}),n=>(n.size++,n.size>e?ht:this.nextFn(n.state)))}distinct(e){return new We(()=>({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 ht})}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 mv(t){return typeof t=="string"?t:typeof t>"u"?"undefined":typeof t.toString=="function"?t.toString():Object.prototype.toString.call(t)}function Co(t){return!!t&&typeof t[Symbol.iterator]=="function"}const Qm=new We(()=>{},()=>ht),ht=Object.freeze({done:!0,value:void 0});function Re(...t){if(t.length===1){const e=t[0];if(e instanceof We)return e;if(Co(e))return new We(()=>e[Symbol.iterator](),n=>n.next());if(typeof e.length=="number")return new We(()=>({index:0}),n=>n.index<e.length?{done:!1,value:e[n.index++]}:ht)}return t.length>1?new We(()=>({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++];Co(n)?e.iterator=n[Symbol.iterator]():n&&typeof n.length=="number"&&(e.array=n)}}while(e.iterator||e.array||e.collIndex<t.length);return ht}):Qm}class wf extends We{constructor(e,n,r){super(()=>({iterators:r!=null&&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 ht})}iterator(){const e={state:this.startFn(),next:()=>this.nextFn(e.state),prune:()=>{e.state.pruned=!0},[Symbol.iterator]:()=>e};return e}}var Pu;(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})(Pu||(Pu={}));function Iu(t,e={}){for(const[n,r]of Object.entries(t))n.startsWith("$")||(Array.isArray(r)?r.forEach((i,s)=>{Ye(i)&&(i.$container=t,i.$containerProperty=n,i.$containerIndex=s,e.deep&&Iu(i,e))}):Ye(r)&&(r.$container=t,r.$containerProperty=n,e.deep&&Iu(r,e)))}function ic(t,e){let n=t;for(;n;){if(e(n))return n;n=n.$container}}function yn(t){const n=fo(t).$document;if(!n)throw new Error("AST node has no document.");return n}function fo(t){for(;t.$container;)t=t.$container;return t}function Pd(t){return Pt(t)?t.ref?[t.ref]:[]:Un(t)?t.items.map(e=>e.ref):[]}function Cf(t,e){if(!t)throw new Error("Node must be an AstNode.");const n=e==null?void 0:e.range;return new We(()=>({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(Ye(s)){if(r.keyIndex++,Id(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(Ye(o)&&Id(o,n))return{done:!1,value:o}}r.arrayIndex=0}}r.keyIndex++}return ht})}function da(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e))}function Tn(t,e){if(!t)throw new Error("Root node must be an AstNode.");return new wf(t,n=>Cf(n,e),{includeRoot:!0})}function Id(t,e){var r;if(!e)return!0;const n=(r=t.$cstNode)==null?void 0:r.range;return n?Fv(n,e):!1}function No(t){return new We(()=>({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(Pt(r)||Un(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(Pt(s)||Un(r))return{done:!1,value:{reference:s,container:t,property:n,index:i}}}e.arrayIndex=0}}e.keyIndex++}return ht})}function gv(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]=eg(i.defaultValue))}function eg(t){return Array.isArray(t)?[...t.map(eg)]:t}const dt={$type:"AbstractElement",cardinality:"cardinality"};function yv(t){return te.isInstance(t,dt.$type)}const ho={$type:"AbstractParserRule"};function ha(t){return te.isInstance(t,ho.$type)}const Va={$type:"AbstractRule"},Ct={$type:"AbstractType"},yr={$type:"Action",cardinality:"cardinality",feature:"feature",inferredType:"inferredType",operator:"operator",type:"type"};function sc(t){return te.isInstance(t,yr.$type)}const po={$type:"Alternatives",cardinality:"cardinality",elements:"elements"};function tg(t){return te.isInstance(t,po.$type)}const kd={$type:"ArrayLiteral",elements:"elements"},Od={$type:"ArrayType",elementType:"elementType"},Tr={$type:"Assignment",cardinality:"cardinality",feature:"feature",operator:"operator",predicate:"predicate",terminal:"terminal"};function Sr(t){return te.isInstance(t,Tr.$type)}const ku={$type:"BooleanLiteral",true:"true"};function Tv(t){return te.isInstance(t,ku.$type)}const vr={$type:"CharacterRange",cardinality:"cardinality",left:"left",lookahead:"lookahead",parenthesized:"parenthesized",right:"right"};function vv(t){return te.isInstance(t,vr.$type)}const Hr={$type:"Condition"},mo={$type:"Conjunction",left:"left",right:"right"};function $v(t){return te.isInstance(t,mo.$type)}const $r={$type:"CrossReference",cardinality:"cardinality",deprecatedSyntax:"deprecatedSyntax",isMulti:"isMulti",terminal:"terminal",type:"type"};function ac(t){return te.isInstance(t,$r.$type)}const go={$type:"Disjunction",left:"left",right:"right"};function Rv(t){return te.isInstance(t,go.$type)}const Ou={$type:"EndOfFile",cardinality:"cardinality"};function Ev(t){return te.isInstance(t,Ou.$type)}const sr={$type:"Grammar",imports:"imports",interfaces:"interfaces",isDeclared:"isDeclared",name:"name",rules:"rules",types:"types"},Ld={$type:"GrammarImport",path:"path"},ei={$type:"Group",cardinality:"cardinality",elements:"elements",guardCondition:"guardCondition",predicate:"predicate"};function Nf(t){return te.isInstance(t,ei.$type)}const Lu={$type:"InferredType",name:"name"};function ng(t){return te.isInstance(t,Lu.$type)}const un={$type:"InfixRule",call:"call",dataType:"dataType",inferredType:"inferredType",name:"name",operators:"operators",parameters:"parameters",returnType:"returnType"};function Po(t){return te.isInstance(t,un.$type)}const Xc={$type:"InfixRuleOperatorList",associativity:"associativity",operators:"operators"},xd={$type:"InfixRuleOperators",precedences:"precedences"},ks={$type:"Interface",attributes:"attributes",name:"name",superTypes:"superTypes"};function Av(t){return te.isInstance(t,ks.$type)}const Os={$type:"Keyword",cardinality:"cardinality",predicate:"predicate",value:"value"};function br(t){return te.isInstance(t,Os.$type)}const Ha={$type:"NamedArgument",calledByName:"calledByName",parameter:"parameter",value:"value"},ti={$type:"NegatedToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function _v(t){return te.isInstance(t,ti.$type)}const xu={$type:"Negation",value:"value"};function Sv(t){return te.isInstance(t,xu.$type)}const Md={$type:"NumberLiteral",value:"value"},Ya={$type:"Parameter",name:"name"},Mu={$type:"ParameterReference",parameter:"parameter"};function bv(t){return te.isInstance(t,Mu.$type)}const Gt={$type:"ParserRule",dataType:"dataType",definition:"definition",entry:"entry",fragment:"fragment",inferredType:"inferredType",name:"name",parameters:"parameters",returnType:"returnType"};function Sn(t){return te.isInstance(t,Gt.$type)}const Jc={$type:"ReferenceType",isMulti:"isMulti",referenceType:"referenceType"},ni={$type:"RegexToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",regex:"regex"};function wv(t){return te.isInstance(t,ni.$type)}const Du={$type:"ReturnType",name:"name"};function Cv(t){return te.isInstance(t,Du.$type)}const ri={$type:"RuleCall",arguments:"arguments",cardinality:"cardinality",predicate:"predicate",rule:"rule"};function wr(t){return te.isInstance(t,ri.$type)}const Ls={$type:"SimpleType",primitiveType:"primitiveType",stringType:"stringType",typeRef:"typeRef"};function Nv(t){return te.isInstance(t,Ls.$type)}const Dd={$type:"StringLiteral",value:"value"},ii={$type:"TerminalAlternatives",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Pv(t){return te.isInstance(t,ii.$type)}const Tt={$type:"TerminalElement",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"},si={$type:"TerminalGroup",cardinality:"cardinality",elements:"elements",lookahead:"lookahead",parenthesized:"parenthesized"};function Iv(t){return te.isInstance(t,si.$type)}const Gn={$type:"TerminalRule",definition:"definition",fragment:"fragment",hidden:"hidden",name:"name",type:"type"};function bn(t){return te.isInstance(t,Gn.$type)}const ai={$type:"TerminalRuleCall",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",rule:"rule"};function kv(t){return te.isInstance(t,ai.$type)}const yo={$type:"Type",name:"name",type:"type"};function Ov(t){return te.isInstance(t,yo.$type)}const us={$type:"TypeAttribute",defaultValue:"defaultValue",isOptional:"isOptional",name:"name",type:"type"},ls={$type:"TypeDefinition"},Fd={$type:"UnionType",types:"types"},To={$type:"UnorderedGroup",cardinality:"cardinality",elements:"elements"};function rg(t){return te.isInstance(t,To.$type)}const oi={$type:"UntilToken",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized",terminal:"terminal"};function Lv(t){return te.isInstance(t,oi.$type)}const fs={$type:"ValueLiteral"},xs={$type:"Wildcard",cardinality:"cardinality",lookahead:"lookahead",parenthesized:"parenthesized"};function xv(t){return te.isInstance(t,xs.$type)}class ig extends Xm{constructor(){super(...arguments),this.types={AbstractElement:{name:dt.$type,properties:{cardinality:{name:dt.cardinality}},superTypes:[]},AbstractParserRule:{name:ho.$type,properties:{},superTypes:[Va.$type,Ct.$type]},AbstractRule:{name:Va.$type,properties:{},superTypes:[]},AbstractType:{name:Ct.$type,properties:{},superTypes:[]},Action:{name:yr.$type,properties:{cardinality:{name:yr.cardinality},feature:{name:yr.feature},inferredType:{name:yr.inferredType},operator:{name:yr.operator},type:{name:yr.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Alternatives:{name:po.$type,properties:{cardinality:{name:po.cardinality},elements:{name:po.elements,defaultValue:[]}},superTypes:[dt.$type]},ArrayLiteral:{name:kd.$type,properties:{elements:{name:kd.elements,defaultValue:[]}},superTypes:[fs.$type]},ArrayType:{name:Od.$type,properties:{elementType:{name:Od.elementType}},superTypes:[ls.$type]},Assignment:{name:Tr.$type,properties:{cardinality:{name:Tr.cardinality},feature:{name:Tr.feature},operator:{name:Tr.operator},predicate:{name:Tr.predicate},terminal:{name:Tr.terminal}},superTypes:[dt.$type]},BooleanLiteral:{name:ku.$type,properties:{true:{name:ku.true,defaultValue:!1}},superTypes:[Hr.$type,fs.$type]},CharacterRange:{name:vr.$type,properties:{cardinality:{name:vr.cardinality},left:{name:vr.left},lookahead:{name:vr.lookahead},parenthesized:{name:vr.parenthesized,defaultValue:!1},right:{name:vr.right}},superTypes:[Tt.$type]},Condition:{name:Hr.$type,properties:{},superTypes:[]},Conjunction:{name:mo.$type,properties:{left:{name:mo.left},right:{name:mo.right}},superTypes:[Hr.$type]},CrossReference:{name:$r.$type,properties:{cardinality:{name:$r.cardinality},deprecatedSyntax:{name:$r.deprecatedSyntax,defaultValue:!1},isMulti:{name:$r.isMulti,defaultValue:!1},terminal:{name:$r.terminal},type:{name:$r.type,referenceType:Ct.$type}},superTypes:[dt.$type]},Disjunction:{name:go.$type,properties:{left:{name:go.left},right:{name:go.right}},superTypes:[Hr.$type]},EndOfFile:{name:Ou.$type,properties:{cardinality:{name:Ou.cardinality}},superTypes:[dt.$type]},Grammar:{name:sr.$type,properties:{imports:{name:sr.imports,defaultValue:[]},interfaces:{name:sr.interfaces,defaultValue:[]},isDeclared:{name:sr.isDeclared,defaultValue:!1},name:{name:sr.name},rules:{name:sr.rules,defaultValue:[]},types:{name:sr.types,defaultValue:[]}},superTypes:[]},GrammarImport:{name:Ld.$type,properties:{path:{name:Ld.path}},superTypes:[]},Group:{name:ei.$type,properties:{cardinality:{name:ei.cardinality},elements:{name:ei.elements,defaultValue:[]},guardCondition:{name:ei.guardCondition},predicate:{name:ei.predicate}},superTypes:[dt.$type]},InferredType:{name:Lu.$type,properties:{name:{name:Lu.name}},superTypes:[Ct.$type]},InfixRule:{name:un.$type,properties:{call:{name:un.call},dataType:{name:un.dataType},inferredType:{name:un.inferredType},name:{name:un.name},operators:{name:un.operators},parameters:{name:un.parameters,defaultValue:[]},returnType:{name:un.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},InfixRuleOperatorList:{name:Xc.$type,properties:{associativity:{name:Xc.associativity},operators:{name:Xc.operators,defaultValue:[]}},superTypes:[]},InfixRuleOperators:{name:xd.$type,properties:{precedences:{name:xd.precedences,defaultValue:[]}},superTypes:[]},Interface:{name:ks.$type,properties:{attributes:{name:ks.attributes,defaultValue:[]},name:{name:ks.name},superTypes:{name:ks.superTypes,defaultValue:[],referenceType:Ct.$type}},superTypes:[Ct.$type]},Keyword:{name:Os.$type,properties:{cardinality:{name:Os.cardinality},predicate:{name:Os.predicate},value:{name:Os.value}},superTypes:[dt.$type]},NamedArgument:{name:Ha.$type,properties:{calledByName:{name:Ha.calledByName,defaultValue:!1},parameter:{name:Ha.parameter,referenceType:Ya.$type},value:{name:Ha.value}},superTypes:[]},NegatedToken:{name:ti.$type,properties:{cardinality:{name:ti.cardinality},lookahead:{name:ti.lookahead},parenthesized:{name:ti.parenthesized,defaultValue:!1},terminal:{name:ti.terminal}},superTypes:[Tt.$type]},Negation:{name:xu.$type,properties:{value:{name:xu.value}},superTypes:[Hr.$type]},NumberLiteral:{name:Md.$type,properties:{value:{name:Md.value}},superTypes:[fs.$type]},Parameter:{name:Ya.$type,properties:{name:{name:Ya.name}},superTypes:[]},ParameterReference:{name:Mu.$type,properties:{parameter:{name:Mu.parameter,referenceType:Ya.$type}},superTypes:[Hr.$type]},ParserRule:{name:Gt.$type,properties:{dataType:{name:Gt.dataType},definition:{name:Gt.definition},entry:{name:Gt.entry,defaultValue:!1},fragment:{name:Gt.fragment,defaultValue:!1},inferredType:{name:Gt.inferredType},name:{name:Gt.name},parameters:{name:Gt.parameters,defaultValue:[]},returnType:{name:Gt.returnType,referenceType:Ct.$type}},superTypes:[ho.$type]},ReferenceType:{name:Jc.$type,properties:{isMulti:{name:Jc.isMulti,defaultValue:!1},referenceType:{name:Jc.referenceType}},superTypes:[ls.$type]},RegexToken:{name:ni.$type,properties:{cardinality:{name:ni.cardinality},lookahead:{name:ni.lookahead},parenthesized:{name:ni.parenthesized,defaultValue:!1},regex:{name:ni.regex}},superTypes:[Tt.$type]},ReturnType:{name:Du.$type,properties:{name:{name:Du.name}},superTypes:[]},RuleCall:{name:ri.$type,properties:{arguments:{name:ri.arguments,defaultValue:[]},cardinality:{name:ri.cardinality},predicate:{name:ri.predicate},rule:{name:ri.rule,referenceType:Va.$type}},superTypes:[dt.$type]},SimpleType:{name:Ls.$type,properties:{primitiveType:{name:Ls.primitiveType},stringType:{name:Ls.stringType},typeRef:{name:Ls.typeRef,referenceType:Ct.$type}},superTypes:[ls.$type]},StringLiteral:{name:Dd.$type,properties:{value:{name:Dd.value}},superTypes:[fs.$type]},TerminalAlternatives:{name:ii.$type,properties:{cardinality:{name:ii.cardinality},elements:{name:ii.elements,defaultValue:[]},lookahead:{name:ii.lookahead},parenthesized:{name:ii.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalElement:{name:Tt.$type,properties:{cardinality:{name:Tt.cardinality},lookahead:{name:Tt.lookahead},parenthesized:{name:Tt.parenthesized,defaultValue:!1}},superTypes:[dt.$type]},TerminalGroup:{name:si.$type,properties:{cardinality:{name:si.cardinality},elements:{name:si.elements,defaultValue:[]},lookahead:{name:si.lookahead},parenthesized:{name:si.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]},TerminalRule:{name:Gn.$type,properties:{definition:{name:Gn.definition},fragment:{name:Gn.fragment,defaultValue:!1},hidden:{name:Gn.hidden,defaultValue:!1},name:{name:Gn.name},type:{name:Gn.type}},superTypes:[Va.$type]},TerminalRuleCall:{name:ai.$type,properties:{cardinality:{name:ai.cardinality},lookahead:{name:ai.lookahead},parenthesized:{name:ai.parenthesized,defaultValue:!1},rule:{name:ai.rule,referenceType:Gn.$type}},superTypes:[Tt.$type]},Type:{name:yo.$type,properties:{name:{name:yo.name},type:{name:yo.type}},superTypes:[Ct.$type]},TypeAttribute:{name:us.$type,properties:{defaultValue:{name:us.defaultValue},isOptional:{name:us.isOptional,defaultValue:!1},name:{name:us.name},type:{name:us.type}},superTypes:[]},TypeDefinition:{name:ls.$type,properties:{},superTypes:[]},UnionType:{name:Fd.$type,properties:{types:{name:Fd.types,defaultValue:[]}},superTypes:[ls.$type]},UnorderedGroup:{name:To.$type,properties:{cardinality:{name:To.cardinality},elements:{name:To.elements,defaultValue:[]}},superTypes:[dt.$type]},UntilToken:{name:oi.$type,properties:{cardinality:{name:oi.cardinality},lookahead:{name:oi.lookahead},parenthesized:{name:oi.parenthesized,defaultValue:!1},terminal:{name:oi.terminal}},superTypes:[Tt.$type]},ValueLiteral:{name:fs.$type,properties:{},superTypes:[]},Wildcard:{name:xs.$type,properties:{cardinality:{name:xs.cardinality},lookahead:{name:xs.lookahead},parenthesized:{name:xs.parenthesized,defaultValue:!1}},superTypes:[Tt.$type]}}}}const te=new ig;function Fu(t){return new wf(t,e=>Ws(e)?e.content:[],{includeRoot:!0})}function Mv(t,e){for(;t.container;)if(t=t.container,t===e)return!0;return!1}function Gu(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function Io(t){if(!t)return;const{offset:e,end:n,range:r}=t;return{range:r,offset:e,end:n,length:n-e}}var hn;(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"})(hn||(hn={}));function Dv(t,e){if(t.end.line<e.start.line||t.end.line===e.start.line&&t.end.character<=e.start.character)return hn.Before;if(t.start.line>e.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character)return hn.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?hn.Inside:n?hn.OverlapBack:r?hn.OverlapFront:hn.Outside}function Fv(t,e){return Dv(t,e)>hn.After}const Gv=/^[\w\p{L}]$/u;function jv(t,e){if(t){const n=Uv(t,!0);if(n&&Gd(n,e))return n;if(Zm(t)){const r=t.content.findIndex(i=>!i.hidden);for(let i=r-1;i>=0;i--){const s=t.content[i];if(Gd(s,e))return s}}}}function Gd(t,e){return Jm(t)&&e.includes(t.tokenType.name)}function Uv(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 sg extends Error{constructor(e,n){super(e?`${n} at ${e.range.start.line}:${e.range.start.character}`:n)}}function pa(t,e="Error: Got unexpected value."){throw new Error(e)}function W(t){return t.charCodeAt(0)}function Zc(t,e){Array.isArray(t)?t.forEach(function(n){e.push(n)}):e.push(t)}function ds(t,e){if(t[e]===!0)throw"duplicate flag "+e;t[e],t[e]=!0}function Yr(t){if(t===void 0)throw Error("Internal Error - Should never get here!");return!0}function zv(){throw Error("Internal Error - Should never get here!")}function jd(t){return t.type==="Character"}const ko=[];for(let t=W("0");t<=W("9");t++)ko.push(t);const Oo=[W("_")].concat(ko);for(let t=W("a");t<=W("z");t++)Oo.push(t);for(let t=W("A");t<=W("Z");t++)Oo.push(t);const Ud=[W(" "),W("\f"),W(`
2
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")],qv=/[0-9a-fA-F]/,Xa=/[0-9]/,Bv=/[1-9]/;class ag{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":ds(r,"global");break;case"i":ds(r,"ignoreCase");break;case"m":ds(r,"multiLine");break;case"u":ds(r,"unicode");break;case"y":ds(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}}Yr(n);const r=this.disjunction();return this.consumeChar(")"),{type:n,value:r,loc:this.loc(e)}}return zv()}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;Yr(n);break}if(!(e===!0&&n===void 0)&&Yr(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()),Yr(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
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=ko;break;case"D":e=ko,n=!0;break;case"s":e=Ud;break;case"S":e=Ud,n=!0;break;case"w":e=Oo;break;case"W":e=Oo,n=!0;break}if(Yr(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
4
  `);break;case"r":e=W("\r");break;case"t":e=W(" ");break;case"v":e=W("\v");break}if(Yr(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`
@@ -6,10 +6,10 @@ var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,config
6
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(Bv.test(e)===!1)throw Error("Expecting a positive integer");for(;Xa.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}integerIncludingZero(){let e=this.popChar();if(Xa.test(e)===!1)throw Error("Expecting an integer");for(;Xa.test(this.peekChar(0));)e+=this.popChar();return parseInt(e,10)}patternCharacter(){const e=this.popChar();switch(e){case`
7
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 Xa.test(this.peekChar(0))}isClassAtom(e=0){switch(this.peekChar(e)){case"]":case`
8
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(qv.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 oc{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 Wv=/\r?\n/gm,Kv=new ag;class Hv extends oc{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===`
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(qv.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 oc{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 Wv=/\r?\n/gm,Kv=new ag;class Vv extends oc{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
10
  `&&(this.multiline=!0),e.quantifier)this.isStarting=!1,this.endRegexpStack=[];else{const r=cc(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 Qc=new Hv;function Vv(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Qc.reset(t),Qc.visit(Kv.pattern(t)),Qc.multiline}catch{return!1}}const Yv=`\f
12
- \r \v              \u2028\u2029   \uFEFF`.split("");function og(t){const e=typeof t=="string"?new RegExp(t):t;return Yv.some(n=>e.test(n))}function cc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xv(t,e){const n=Jv(t),r=e.match(n);return!!r&&r[0].length>0}function Jv(t){typeof t=="string"&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let s="",a;function o(u){s+=n.substr(r,u),r+=u}function c(u){s+="(?:"+n.substr(r,u)+"|$)",r+=u}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 Zv(t){return t.rules.find(e=>Sn(e)&&e.entry)}function Qv(t){return t.rules.filter(e=>bn(e)&&e.hidden)}function cg(t,e){const n=new Set,r=Zv(t);if(!r)return new Set(t.rules);const i=[r].concat(Qv(t));for(const a of i)ug(a,n,e);const s=new Set;for(const a of t.rules)(n.has(a.name)||bn(a)&&a.hidden)&&s.add(a);return s}function ug(t,e,n){e.add(t.name),da(t).forEach(r=>{if(wr(r)||n){const i=r.rule.ref;i&&!e.has(i.name)&&ug(i,e,n)}})}function e$(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=fg(t.type.ref);return e==null?void 0:e.terminal}}function t$(t){return t.hidden&&!og(If(t))}function n$(t,e){return!t||!e?[]:Pf(t,e,t.astNode,!0)}function lg(t,e,n){if(!t||!e)return;const r=Pf(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 Pf(t,e,n,r){if(!r){const i=ic(t.grammarSource,Sr);if(i&&i.feature===e)return[t]}return Ws(t)&&t.astNode===n?t.content.flatMap(i=>Pf(i,e,n,!1)):[]}function r$(t,e,n){if(!t)return;const r=i$(t,e,t==null?void 0: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 i$(t,e,n){if(t.astNode!==n)return[];if(br(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=Fu(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===n?br(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function s$(t){var n;const e=t.astNode;for(;e===((n=t.container)==null?void 0:n.astNode);){const r=ic(t.grammarSource,Sr);if(r)return r;t=t.container}}function fg(t){let e=t;return ng(e)&&(sc(e.$container)?e=e.$container.$container:ha(e.$container)?e=e.$container:pa(e.$container)),dg(t,e,new Map)}function dg(t,e,n){var i;function r(s,a){let o;return ic(s,Sr)||(o=dg(a,a,n)),n.set(t,o),o}if(n.has(t))return n.get(t);n.set(t,void 0);for(const s of da(e)){if(Sr(s)&&s.feature.toLowerCase()==="name")return n.set(t,s),s;if(wr(s)&&Sn(s.rule.ref))return r(s,s.rule.ref);if(Nv(s)&&((i=s.typeRef)!=null&&i.ref))return r(s,s.typeRef.ref)}}function hg(t){return pg(t,new Set)}function pg(t,e){if(e.has(t))return!0;e.add(t);for(const n of da(t))if(wr(n)){if(!n.rule.ref||Sn(n.rule.ref)&&!pg(n.rule.ref,e)||Po(n.rule.ref))return!1}else{if(Sr(n))return!1;if(sc(n))return!1}return!!t.definition}function mg(t){if(!bn(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 Ks(t){if(ha(t))return Sn(t)&&hg(t)?t.name:mg(t)??t.name;if(Av(t)||Ov(t)||Cv(t))return t.name;if(sc(t)){const e=a$(t);if(e)return e}else if(ng(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function a$(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return Ks(t.type.ref)}function o$(t){var e;return bn(t)?((e=t.type)==null?void 0:e.name)??"string":mg(t)??t.name}function If(t){const e={s:!1,i:!1,u:!1},n=qi(t.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const kf=/[\s\S]/.source;function qi(t,e){var n;if(Pv(t))return c$(t);if(Iv(t))return u$(t);if(vv(t))return d$(t);if(kv(t)){const r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return vn(qi(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(_v(t))return f$(t);if(Lv(t))return l$(t);if(wv(t)){const r=t.regex.lastIndexOf("/"),i=t.regex.substring(1,r),s=t.regex.substring(r+1);return e&&(e.i=s.includes("i"),e.s=s.includes("s"),e.u=s.includes("u")),vn(i,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(xv(t))return vn(kf,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(n=t==null?void 0:t.$cstNode)==null?void 0:n.text}`)}}}function c$(t){return vn(t.elements.map(e=>qi(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function u$(t){return vn(t.elements.map(e=>qi(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function l$(t){return vn(`${kf}*?${qi(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function f$(t){return vn(`(?!${qi(t.terminal)})${kf}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function d$(t){return t.right?vn(`[${eu(t.left)}-${eu(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):vn(eu(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function eu(t){return cc(t.value)}function vn(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function h$(t){const e=[],n=t.Grammar;for(const r of n.rules)bn(r)&&t$(r)&&Vv(If(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:Gv}}var gg=typeof global=="object"&&global&&global.Object===Object&&global,p$=typeof self=="object"&&self&&self.Object===Object&&self,Kt=gg||p$||Function("return this")(),Rt=Kt.Symbol,yg=Object.prototype,m$=yg.hasOwnProperty,g$=yg.toString,hs=Rt?Rt.toStringTag:void 0;function y$(t){var e=m$.call(t,hs),n=t[hs];try{t[hs]=void 0;var r=!0}catch{}var i=g$.call(t);return r&&(e?t[hs]=n:delete t[hs]),i}var T$=Object.prototype,v$=T$.toString;function $$(t){return v$.call(t)}var R$="[object Null]",E$="[object Undefined]",zd=Rt?Rt.toStringTag:void 0;function Yn(t){return t==null?t===void 0?E$:R$:zd&&zd in Object(t)?y$(t):$$(t)}function Ot(t){return t!=null&&typeof t=="object"}var A$="[object Symbol]";function uc(t){return typeof t=="symbol"||Ot(t)&&Yn(t)==A$}function lc(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Q=Array.isArray,qd=Rt?Rt.prototype:void 0,Bd=qd?qd.toString:void 0;function Tg(t){if(typeof t=="string")return t;if(Q(t))return lc(t,Tg)+"";if(uc(t))return Bd?Bd.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var _$=/\s/;function S$(t){for(var e=t.length;e--&&_$.test(t.charAt(e)););return e}var b$=/^\s+/;function w$(t){return t&&t.slice(0,S$(t)+1).replace(b$,"")}function Et(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Wd=NaN,C$=/^[-+]0x[0-9a-f]+$/i,N$=/^0b[01]+$/i,P$=/^0o[0-7]+$/i,I$=parseInt;function k$(t){if(typeof t=="number")return t;if(uc(t))return Wd;if(Et(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Et(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=w$(t);var n=N$.test(t);return n||P$.test(t)?I$(t.slice(2),n?2:8):C$.test(t)?Wd:+t}var O$=1/0,L$=17976931348623157e292;function x$(t){if(!t)return t===0?t:0;if(t=k$(t),t===O$||t===-1/0){var e=t<0?-1:1;return e*L$}return t===t?t:0}function fc(t){var e=x$(t),n=e%1;return e===e?n?e-n:e:0}function ma(t){return t}var M$="[object AsyncFunction]",D$="[object Function]",F$="[object GeneratorFunction]",G$="[object Proxy]";function wn(t){if(!Et(t))return!1;var e=Yn(t);return e==D$||e==F$||e==M$||e==G$}var tu=Kt["__core-js_shared__"],Kd=function(){var t=/[^.]+$/.exec(tu&&tu.keys&&tu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function j$(t){return!!Kd&&Kd in t}var U$=Function.prototype,z$=U$.toString;function xr(t){if(t!=null){try{return z$.call(t)}catch{}try{return t+""}catch{}}return""}var q$=/[\\^$.*+?()[\]{}|]/g,B$=/^\[object .+?Constructor\]$/,W$=Function.prototype,K$=Object.prototype,H$=W$.toString,V$=K$.hasOwnProperty,Y$=RegExp("^"+H$.call(V$).replace(q$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X$(t){if(!Et(t)||j$(t))return!1;var e=wn(t)?Y$:B$;return e.test(xr(t))}function J$(t,e){return t==null?void 0:t[e]}function Mr(t,e){var n=J$(t,e);return X$(n)?n:void 0}var ju=Mr(Kt,"WeakMap"),Hd=Object.create,Z$=function(){function t(){}return function(e){if(!Et(e))return{};if(Hd)return Hd(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q$(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Fe(){}function eR(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var tR=800,nR=16,rR=Date.now;function iR(t){var e=0,n=0;return function(){var r=rR(),i=nR-(r-n);if(n=r,i>0){if(++e>=tR)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function sR(t){return function(){return t}}var Lo=function(){try{var t=Mr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),aR=Lo?function(t,e){return Lo(t,"toString",{configurable:!0,enumerable:!1,value:sR(e),writable:!0})}:ma,oR=iR(aR);function vg(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function $g(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function cR(t){return t!==t}function uR(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Of(t,e,n){return e===e?uR(t,e,n):$g(t,cR,n)}function Rg(t,e){var n=t==null?0:t.length;return!!n&&Of(t,e,0)>-1}var lR=9007199254740991,fR=/^(?:0|[1-9]\d*)$/;function dc(t,e){var n=typeof t;return e=e??lR,!!e&&(n=="number"||n!="symbol"&&fR.test(t))&&t>-1&&t%1==0&&t<e}function Lf(t,e,n){e=="__proto__"&&Lo?Lo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ga(t,e){return t===e||t!==t&&e!==e}var dR=Object.prototype,hR=dR.hasOwnProperty;function hc(t,e,n){var r=t[e];(!(hR.call(t,e)&&ga(r,n))||n===void 0&&!(e in t))&&Lf(t,e,n)}function ya(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var o=e[s],c=void 0;c===void 0&&(c=t[o]),i?Lf(n,o,c):hc(n,o,c)}return n}var Vd=Math.max;function pR(t,e,n){return e=Vd(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Vd(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),Q$(t,this,o)}}function xf(t,e){return oR(pR(t,e,ma),t+"")}var mR=9007199254740991;function Mf(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mR}function Ht(t){return t!=null&&Mf(t.length)&&!wn(t)}function Eg(t,e,n){if(!Et(n))return!1;var r=typeof e;return(r=="number"?Ht(n)&&dc(e,n.length):r=="string"&&e in n)?ga(n[e],t):!1}function gR(t){return xf(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&Eg(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var o=n[r];o&&t(e,o,r,s)}return e})}var yR=Object.prototype;function Ta(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||yR;return t===n}function TR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var vR="[object Arguments]";function Yd(t){return Ot(t)&&Yn(t)==vR}var Ag=Object.prototype,$R=Ag.hasOwnProperty,RR=Ag.propertyIsEnumerable,pc=Yd(function(){return arguments}())?Yd:function(t){return Ot(t)&&$R.call(t,"callee")&&!RR.call(t,"callee")};function ER(){return!1}var _g=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xd=_g&&typeof module=="object"&&module&&!module.nodeType&&module,AR=Xd&&Xd.exports===_g,Jd=AR?Kt.Buffer:void 0,_R=Jd?Jd.isBuffer:void 0,Hs=_R||ER,SR="[object Arguments]",bR="[object Array]",wR="[object Boolean]",CR="[object Date]",NR="[object Error]",PR="[object Function]",IR="[object Map]",kR="[object Number]",OR="[object Object]",LR="[object RegExp]",xR="[object Set]",MR="[object String]",DR="[object WeakMap]",FR="[object ArrayBuffer]",GR="[object DataView]",jR="[object Float32Array]",UR="[object Float64Array]",zR="[object Int8Array]",qR="[object Int16Array]",BR="[object Int32Array]",WR="[object Uint8Array]",KR="[object Uint8ClampedArray]",HR="[object Uint16Array]",VR="[object Uint32Array]",de={};de[jR]=de[UR]=de[zR]=de[qR]=de[BR]=de[WR]=de[KR]=de[HR]=de[VR]=!0;de[SR]=de[bR]=de[FR]=de[wR]=de[GR]=de[CR]=de[NR]=de[PR]=de[IR]=de[kR]=de[OR]=de[LR]=de[xR]=de[MR]=de[DR]=!1;function YR(t){return Ot(t)&&Mf(t.length)&&!!de[Yn(t)]}function mc(t){return function(e){return t(e)}}var Sg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Us=Sg&&typeof module=="object"&&module&&!module.nodeType&&module,XR=Us&&Us.exports===Sg,nu=XR&&gg.process,zn=function(){try{var t=Us&&Us.require&&Us.require("util").types;return t||nu&&nu.binding&&nu.binding("util")}catch{}}(),Zd=zn&&zn.isTypedArray,Df=Zd?mc(Zd):YR,JR=Object.prototype,ZR=JR.hasOwnProperty;function bg(t,e){var n=Q(t),r=!n&&pc(t),i=!n&&!r&&Hs(t),s=!n&&!r&&!i&&Df(t),a=n||r||i||s,o=a?TR(t.length,String):[],c=o.length;for(var u in t)(e||ZR.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||dc(u,c)))&&o.push(u);return o}function wg(t,e){return function(n){return t(e(n))}}var QR=wg(Object.keys,Object),eE=Object.prototype,tE=eE.hasOwnProperty;function Cg(t){if(!Ta(t))return QR(t);var e=[];for(var n in Object(t))tE.call(t,n)&&n!="constructor"&&e.push(n);return e}function At(t){return Ht(t)?bg(t):Cg(t)}var nE=Object.prototype,rE=nE.hasOwnProperty,Uu=gR(function(t,e){if(Ta(e)||Ht(e)){ya(e,At(e),t);return}for(var n in e)rE.call(e,n)&&hc(t,n,e[n])});function iE(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var sE=Object.prototype,aE=sE.hasOwnProperty;function oE(t){if(!Et(t))return iE(t);var e=Ta(t),n=[];for(var r in t)r=="constructor"&&(e||!aE.call(t,r))||n.push(r);return n}function Ff(t){return Ht(t)?bg(t,!0):oE(t)}var cE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uE=/^\w*$/;function Gf(t,e){if(Q(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||uc(t)?!0:uE.test(t)||!cE.test(t)||e!=null&&t in Object(e)}var Vs=Mr(Object,"create");function lE(){this.__data__=Vs?Vs(null):{},this.size=0}function fE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dE="__lodash_hash_undefined__",hE=Object.prototype,pE=hE.hasOwnProperty;function mE(t){var e=this.__data__;if(Vs){var n=e[t];return n===dE?void 0:n}return pE.call(e,t)?e[t]:void 0}var gE=Object.prototype,yE=gE.hasOwnProperty;function TE(t){var e=this.__data__;return Vs?e[t]!==void 0:yE.call(e,t)}var vE="__lodash_hash_undefined__";function $E(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Vs&&e===void 0?vE:e,this}function Cr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cr.prototype.clear=lE;Cr.prototype.delete=fE;Cr.prototype.get=mE;Cr.prototype.has=TE;Cr.prototype.set=$E;function RE(){this.__data__=[],this.size=0}function gc(t,e){for(var n=t.length;n--;)if(ga(t[n][0],e))return n;return-1}var EE=Array.prototype,AE=EE.splice;function _E(t){var e=this.__data__,n=gc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():AE.call(e,n,1),--this.size,!0}function SE(t){var e=this.__data__,n=gc(e,t);return n<0?void 0:e[n][1]}function bE(t){return gc(this.__data__,t)>-1}function wE(t,e){var n=this.__data__,r=gc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Cn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=RE;Cn.prototype.delete=_E;Cn.prototype.get=SE;Cn.prototype.has=bE;Cn.prototype.set=wE;var Ys=Mr(Kt,"Map");function CE(){this.size=0,this.__data__={hash:new Cr,map:new(Ys||Cn),string:new Cr}}function NE(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function yc(t,e){var n=t.__data__;return NE(e)?n[typeof e=="string"?"string":"hash"]:n.map}function PE(t){var e=yc(this,t).delete(t);return this.size-=e?1:0,e}function IE(t){return yc(this,t).get(t)}function kE(t){return yc(this,t).has(t)}function OE(t,e){var n=yc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Nn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Nn.prototype.clear=CE;Nn.prototype.delete=PE;Nn.prototype.get=IE;Nn.prototype.has=kE;Nn.prototype.set=OE;var LE="Expected a function";function jf(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(LE);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(jf.Cache||Nn),n}jf.Cache=Nn;var xE=500;function ME(t){var e=jf(t,function(r){return n.size===xE&&n.clear(),r}),n=e.cache;return e}var DE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FE=/\\(\\)?/g,GE=ME(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(DE,function(n,r,i,s){e.push(i?s.replace(FE,"$1"):r||n)}),e});function jE(t){return t==null?"":Tg(t)}function Tc(t,e){return Q(t)?t:Gf(t,e)?[t]:GE(jE(t))}function va(t){if(typeof t=="string"||uc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Uf(t,e){e=Tc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[va(e[n++])];return n&&n==r?t:void 0}function UE(t,e,n){var r=t==null?void 0:Uf(t,e);return r===void 0?n:r}function zf(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Qd=Rt?Rt.isConcatSpreadable:void 0;function zE(t){return Q(t)||pc(t)||!!(Qd&&t&&t[Qd])}function qf(t,e,n,r,i){var s=-1,a=t.length;for(n||(n=zE),i||(i=[]);++s<a;){var o=t[s];n(o)?zf(i,o):r||(i[i.length]=o)}return i}function It(t){var e=t==null?0:t.length;return e?qf(t):[]}var Ng=wg(Object.getPrototypeOf,Object);function Pg(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 qE(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function BE(){this.__data__=new Cn,this.size=0}function WE(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function KE(t){return this.__data__.get(t)}function HE(t){return this.__data__.has(t)}var VE=200;function YE(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Ys||r.length<VE-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(t,e),this.size=n.size,this}function zt(t){var e=this.__data__=new Cn(t);this.size=e.size}zt.prototype.clear=BE;zt.prototype.delete=WE;zt.prototype.get=KE;zt.prototype.has=HE;zt.prototype.set=YE;function XE(t,e){return t&&ya(e,At(e),t)}function JE(t,e){return t&&ya(e,Ff(e),t)}var Ig=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eh=Ig&&typeof module=="object"&&module&&!module.nodeType&&module,ZE=eh&&eh.exports===Ig,th=ZE?Kt.Buffer:void 0,nh=th?th.allocUnsafe:void 0;function QE(t,e){var n=t.length,r=nh?nh(n):new t.constructor(n);return t.copy(r),r}function Bf(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function kg(){return[]}var eA=Object.prototype,tA=eA.propertyIsEnumerable,rh=Object.getOwnPropertySymbols,Wf=rh?function(t){return t==null?[]:(t=Object(t),Bf(rh(t),function(e){return tA.call(t,e)}))}:kg;function nA(t,e){return ya(t,Wf(t),e)}var rA=Object.getOwnPropertySymbols,Og=rA?function(t){for(var e=[];t;)zf(e,Wf(t)),t=Ng(t);return e}:kg;function iA(t,e){return ya(t,Og(t),e)}function Lg(t,e,n){var r=e(t);return Q(t)?r:zf(r,n(t))}function zu(t){return Lg(t,At,Wf)}function sA(t){return Lg(t,Ff,Og)}var qu=Mr(Kt,"DataView"),Bu=Mr(Kt,"Promise"),mi=Mr(Kt,"Set"),ih="[object Map]",aA="[object Object]",sh="[object Promise]",ah="[object Set]",oh="[object WeakMap]",ch="[object DataView]",oA=xr(qu),cA=xr(Ys),uA=xr(Bu),lA=xr(mi),fA=xr(ju),vt=Yn;(qu&&vt(new qu(new ArrayBuffer(1)))!=ch||Ys&&vt(new Ys)!=ih||Bu&&vt(Bu.resolve())!=sh||mi&&vt(new mi)!=ah||ju&&vt(new ju)!=oh)&&(vt=function(t){var e=Yn(t),n=e==aA?t.constructor:void 0,r=n?xr(n):"";if(r)switch(r){case oA:return ch;case cA:return ih;case uA:return sh;case lA:return ah;case fA:return oh}return e});var dA=Object.prototype,hA=dA.hasOwnProperty;function pA(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&hA.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var xo=Kt.Uint8Array;function mA(t){var e=new t.constructor(t.byteLength);return new xo(e).set(new xo(t)),e}function gA(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var yA=/\w*$/;function TA(t){var e=new t.constructor(t.source,yA.exec(t));return e.lastIndex=t.lastIndex,e}var uh=Rt?Rt.prototype:void 0,lh=uh?uh.valueOf:void 0;function vA(t){return lh?Object(lh.call(t)):{}}function $A(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var RA="[object Boolean]",EA="[object Date]",AA="[object Map]",_A="[object Number]",SA="[object RegExp]",bA="[object Set]",wA="[object String]",CA="[object Symbol]",NA="[object ArrayBuffer]",PA="[object DataView]",IA="[object Float32Array]",kA="[object Float64Array]",OA="[object Int8Array]",LA="[object Int16Array]",xA="[object Int32Array]",MA="[object Uint8Array]",DA="[object Uint8ClampedArray]",FA="[object Uint16Array]",GA="[object Uint32Array]";function jA(t,e,n){var r=t.constructor;switch(e){case NA:return mA(t);case RA:case EA:return new r(+t);case PA:return gA(t);case IA:case kA:case OA:case LA:case xA:case MA:case DA:case FA:case GA:return $A(t);case AA:return new r;case _A:case wA:return new r(t);case SA:return TA(t);case bA:return new r;case CA:return vA(t)}}function UA(t){return typeof t.constructor=="function"&&!Ta(t)?Z$(Ng(t)):{}}var zA="[object Map]";function qA(t){return Ot(t)&&vt(t)==zA}var fh=zn&&zn.isMap,BA=fh?mc(fh):qA,WA="[object Set]";function KA(t){return Ot(t)&&vt(t)==WA}var dh=zn&&zn.isSet,HA=dh?mc(dh):KA,VA=2,xg="[object Arguments]",YA="[object Array]",XA="[object Boolean]",JA="[object Date]",ZA="[object Error]",Mg="[object Function]",QA="[object GeneratorFunction]",e_="[object Map]",t_="[object Number]",Dg="[object Object]",n_="[object RegExp]",r_="[object Set]",i_="[object String]",s_="[object Symbol]",a_="[object WeakMap]",o_="[object ArrayBuffer]",c_="[object DataView]",u_="[object Float32Array]",l_="[object Float64Array]",f_="[object Int8Array]",d_="[object Int16Array]",h_="[object Int32Array]",p_="[object Uint8Array]",m_="[object Uint8ClampedArray]",g_="[object Uint16Array]",y_="[object Uint32Array]",ue={};ue[xg]=ue[YA]=ue[o_]=ue[c_]=ue[XA]=ue[JA]=ue[u_]=ue[l_]=ue[f_]=ue[d_]=ue[h_]=ue[e_]=ue[t_]=ue[Dg]=ue[n_]=ue[r_]=ue[i_]=ue[s_]=ue[p_]=ue[m_]=ue[g_]=ue[y_]=!0;ue[ZA]=ue[Mg]=ue[a_]=!1;function vo(t,e,n,r,i,s){var a,o=e&VA;if(a!==void 0)return a;if(!Et(t))return t;var c=Q(t);if(c)return a=pA(t),eR(t,a);var u=vt(t),l=u==Mg||u==QA;if(Hs(t))return QE(t);if(u==Dg||u==xg||l&&!i)return a=l?{}:UA(t),o?iA(t,JE(a,t)):nA(t,XE(a,t));if(!ue[u])return i?t:{};a=jA(t,u),s||(s=new zt);var f=s.get(t);if(f)return f;s.set(t,a),HA(t)?t.forEach(function(y){a.add(vo(y,e,n,y,t,s))}):BA(t)&&t.forEach(function(y,E){a.set(E,vo(y,e,n,E,t,s))});var d=zu,p=c?void 0:d(t);return vg(p||t,function(y,E){p&&(E=y,y=t[E]),hc(a,E,vo(y,e,n,E,t,s))}),a}var T_=4;function Ve(t){return vo(t,T_)}function $a(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}var v_="__lodash_hash_undefined__";function $_(t){return this.__data__.set(t,v_),this}function R_(t){return this.__data__.has(t)}function xi(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Nn;++e<n;)this.add(t[e])}xi.prototype.add=xi.prototype.push=$_;xi.prototype.has=R_;function Fg(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Kf(t,e){return t.has(e)}var E_=1,A_=2;function Gg(t,e,n,r,i,s){var a=n&E_,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&A_?new xi:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!Fg(e,function(A,_){if(!Kf(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function __(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Hf(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var S_=1,b_=2,w_="[object Boolean]",C_="[object Date]",N_="[object Error]",P_="[object Map]",I_="[object Number]",k_="[object RegExp]",O_="[object Set]",L_="[object String]",x_="[object Symbol]",M_="[object ArrayBuffer]",D_="[object DataView]",hh=Rt?Rt.prototype:void 0,ru=hh?hh.valueOf:void 0;function F_(t,e,n,r,i,s,a){switch(n){case D_:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M_:return!(t.byteLength!=e.byteLength||!s(new xo(t),new xo(e)));case w_:case C_:case I_:return ga(+t,+e);case N_:return t.name==e.name&&t.message==e.message;case k_:case L_:return t==e+"";case P_:var o=__;case O_:var c=r&S_;if(o||(o=Hf),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=b_,a.set(t,e);var l=Gg(o(t),o(e),r,i,s,a);return a.delete(t),l;case x_:if(ru)return ru.call(t)==ru.call(e)}return!1}var G_=1,j_=Object.prototype,U_=j_.hasOwnProperty;function z_(t,e,n,r,i,s){var a=n&G_,o=zu(t),c=o.length,u=zu(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:U_.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var q_=1,ph="[object Arguments]",mh="[object Array]",Ja="[object Object]",B_=Object.prototype,gh=B_.hasOwnProperty;function W_(t,e,n,r,i,s){var a=Q(t),o=Q(e),c=a?mh:vt(t),u=o?mh:vt(e);c=c==ph?Ja:c,u=u==ph?Ja:u;var l=c==Ja,f=u==Ja,d=c==u;if(d&&Hs(t)){if(!Hs(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new zt),a||Df(t)?Gg(t,e,n,r,i,s):F_(t,e,c,n,r,i,s);if(!(n&q_)){var p=l&&gh.call(t,"__wrapped__"),y=f&&gh.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new zt),i(E,C,n,r,s)}}return d?(s||(s=new zt),z_(t,e,n,r,i,s)):!1}function Vf(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ot(t)&&!Ot(e)?t!==t&&e!==e:W_(t,e,n,r,Vf,i)}var K_=1,H_=2;function V_(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new zt,f;if(!(f===void 0?Vf(u,c,K_|H_,r,l):f))return!1}}return!0}function jg(t){return t===t&&!Et(t)}function Y_(t){for(var e=At(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,jg(i)]}return e}function Ug(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function X_(t){var e=Y_(t);return e.length==1&&e[0][2]?Ug(e[0][0],e[0][1]):function(n){return n===t||V_(n,t,e)}}function J_(t,e){return t!=null&&e in Object(t)}function zg(t,e,n){e=Tc(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=va(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&Mf(i)&&dc(a,i)&&(Q(t)||pc(t)))}function Z_(t,e){return t!=null&&zg(t,e,J_)}var Q_=1,eS=2;function tS(t,e){return Gf(t)&&jg(e)?Ug(va(t),e):function(n){var r=UE(n,t);return r===void 0&&r===e?Z_(n,t):Vf(e,r,Q_|eS)}}function nS(t){return function(e){return e==null?void 0:e[t]}}function rS(t){return function(e){return Uf(e,t)}}function iS(t){return Gf(t)?nS(va(t)):rS(t)}function Vt(t){return typeof t=="function"?t:t==null?ma:typeof t=="object"?Q(t)?tS(t[0],t[1]):X_(t):iS(t)}function sS(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 aS(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var oS=aS();function cS(t,e){return t&&oS(t,e,At)}function uS(t,e){return function(n,r){if(n==null)return n;if(!Ht(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Dr=uS(cS);function lS(t,e,n,r){return Dr(t,function(i,s,a){e(r,i,n(i),a)}),r}function fS(t,e){return function(n,r){var i=Q(n)?sS:lS,s=e?e():{};return i(n,t,Vt(r),s)}}var qg=Object.prototype,dS=qg.hasOwnProperty,Yf=xf(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Eg(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],a=Ff(s),o=-1,c=a.length;++o<c;){var u=a[o],l=t[u];(l===void 0||ga(l,qg[u])&&!dS.call(t,u))&&(t[u]=s[u])}return t});function yh(t){return Ot(t)&&Ht(t)}var hS=200;function pS(t,e,n,r){var i=-1,s=Rg,a=!0,o=t.length,c=[],u=e.length;if(!o)return c;e.length>=hS&&(s=Kf,a=!1,e=new xi(e));e:for(;++i<o;){var l=t[i],f=l;if(l=l!==0?l:0,a&&f===f){for(var d=u;d--;)if(e[d]===f)continue e;c.push(l)}else s(e,f,r)||c.push(l)}return c}var vc=xf(function(t,e){return yh(t)?pS(t,qf(e,1,yh,!0)):[]});function Nr(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Be(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:fc(e),Pg(t,e<0?0:e,r)):[]}function Xs(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:fc(e),e=r-e,Pg(t,0,e<0?0:e)):[]}function mS(t){return typeof t=="function"?t:ma}function K(t,e){var n=Q(t)?vg:Dr;return n(t,mS(e))}function gS(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 yS(t,e){var n=!0;return Dr(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function qt(t,e,n){var r=Q(t)?gS:yS;return r(t,Vt(e))}function Bg(t,e){var n=[];return Dr(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function _t(t,e){var n=Q(t)?Bf:Bg;return n(t,Vt(e))}function TS(t){return function(e,n,r){var i=Object(e);if(!Ht(e)){var s=Vt(n);e=At(e),n=function(o){return s(i[o],o,i)}}var a=t(e,n,r);return a>-1?i[s?e[a]:a]:void 0}}var vS=Math.max;function $S(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:fc(n);return i<0&&(i=vS(r+i,0)),$g(t,Vt(e),i)}var Mi=TS($S);function Lt(t){return t&&t.length?t[0]:void 0}function RS(t,e){var n=-1,r=Ht(t)?Array(t.length):[];return Dr(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function j(t,e){var n=Q(t)?lc:RS;return n(t,Vt(e))}function $t(t,e){return qf(j(t,e))}var ES=Object.prototype,AS=ES.hasOwnProperty,_S=fS(function(t,e,n){AS.call(t,n)?t[n].push(e):Lf(t,n,[e])}),SS=Object.prototype,bS=SS.hasOwnProperty;function wS(t,e){return t!=null&&bS.call(t,e)}function q(t,e){return t!=null&&zg(t,e,wS)}var CS="[object String]";function xt(t){return typeof t=="string"||!Q(t)&&Ot(t)&&Yn(t)==CS}function NS(t,e){return lc(e,function(n){return t[n]})}function De(t){return t==null?[]:NS(t,At(t))}var PS=Math.max;function ot(t,e,n,r){t=Ht(t)?t:De(t),n=n?fc(n):0;var i=t.length;return n<0&&(n=PS(i+n,0)),xt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Of(t,e,n)>-1}function Th(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Of(t,e,i)}var IS="[object Map]",kS="[object Set]",OS=Object.prototype,LS=OS.hasOwnProperty;function le(t){if(t==null)return!0;if(Ht(t)&&(Q(t)||typeof t=="string"||typeof t.splice=="function"||Hs(t)||Df(t)||pc(t)))return!t.length;var e=vt(t);if(e==IS||e==kS)return!t.size;if(Ta(t))return!Cg(t).length;for(var n in t)if(LS.call(t,n))return!1;return!0}var xS="[object RegExp]";function MS(t){return Ot(t)&&Yn(t)==xS}var vh=zn&&zn.isRegExp,qn=vh?mc(vh):MS;function En(t){return t===void 0}var DS="Expected a function";function FS(t){if(typeof t!="function")throw new TypeError(DS);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 GS(t,e,n,r){if(!Et(t))return t;e=Tc(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var c=va(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var l=o[c];u=void 0,u===void 0&&(u=Et(l)?l:dc(e[i+1])?[]:{})}hc(o,c,u),o=o[c]}return t}function jS(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var a=e[r],o=Uf(t,a);n(o,a)&&GS(s,Tc(a,t),o)}return s}function US(t,e){if(t==null)return{};var n=lc(sA(t),function(r){return[r]});return e=Vt(e),jS(t,n,function(r,i){return e(r,i[0])})}function zS(t,e,n,r,i){return i(t,function(s,a,o){n=r?(r=!1,s):e(n,s,a,o)}),n}function mt(t,e,n){var r=Q(t)?qE:zS,i=arguments.length<3;return r(t,Vt(e),n,i,Dr)}function $c(t,e){var n=Q(t)?Bf:Bg;return n(t,FS(Vt(e)))}function qS(t,e){var n;return Dr(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function BS(t,e,n){var r=Q(t)?Fg:qS;return r(t,Vt(e))}var WS=1/0,KS=mi&&1/Hf(new mi([,-0]))[1]==WS?function(t){return new mi(t)}:Fe,HS=200;function VS(t,e,n){var r=-1,i=Rg,s=t.length,a=!0,o=[],c=o;if(s>=HS){var u=KS(t);if(u)return Hf(u);a=!1,i=Kf,c=new xi}else c=o;e:for(;++r<s;){var l=t[r],f=l;if(l=l!==0?l:0,a&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;o.push(l)}else i(c,f,n)||(c!==o&&c.push(f),o.push(l))}return o}function Xf(t){return t&&t.length?VS(t):[]}function Wu(t){console&&console.error&&console.error(`Error: ${t}`)}function Wg(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Kg(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function Hg(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}var Vg=typeof global=="object"&&global&&global.Object===Object&&global,YS=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Vg||YS||Function("return this")(),Bn=Pn.Symbol,Yg=Object.prototype,XS=Yg.hasOwnProperty,JS=Yg.toString,ps=Bn?Bn.toStringTag:void 0;function ZS(t){var e=XS.call(t,ps),n=t[ps];try{t[ps]=void 0;var r=!0}catch{}var i=JS.call(t);return r&&(e?t[ps]=n:delete t[ps]),i}var QS=Object.prototype,eb=QS.toString;function tb(t){return eb.call(t)}var nb="[object Null]",rb="[object Undefined]",$h=Bn?Bn.toStringTag:void 0;function Xn(t){return t==null?t===void 0?rb:nb:$h&&$h in Object(t)?ZS(t):tb(t)}function Wn(t){return t!=null&&typeof t=="object"}var ib="[object Symbol]";function Rc(t){return typeof t=="symbol"||Wn(t)&&Xn(t)==ib}function Ec(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var st=Array.isArray,Rh=Bn?Bn.prototype:void 0,Eh=Rh?Rh.toString:void 0;function Xg(t){if(typeof t=="string")return t;if(st(t))return Ec(t,Xg)+"";if(Rc(t))return Eh?Eh.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var sb=/\s/;function ab(t){for(var e=t.length;e--&&sb.test(t.charAt(e)););return e}var ob=/^\s+/;function cb(t){return t&&t.slice(0,ab(t)+1).replace(ob,"")}function An(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ah=NaN,ub=/^[-+]0x[0-9a-f]+$/i,lb=/^0b[01]+$/i,fb=/^0o[0-7]+$/i,db=parseInt;function hb(t){if(typeof t=="number")return t;if(Rc(t))return Ah;if(An(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=An(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cb(t);var n=lb.test(t);return n||fb.test(t)?db(t.slice(2),n?2:8):ub.test(t)?Ah:+t}var pb=1/0,mb=17976931348623157e292;function gb(t){if(!t)return t===0?t:0;if(t=hb(t),t===pb||t===-1/0){var e=t<0?-1:1;return e*mb}return t===t?t:0}function yb(t){var e=gb(t),n=e%1;return e===e?n?e-n:e:0}function Ac(t){return t}var Tb="[object AsyncFunction]",vb="[object Function]",$b="[object GeneratorFunction]",Rb="[object Proxy]";function Jg(t){if(!An(t))return!1;var e=Xn(t);return e==vb||e==$b||e==Tb||e==Rb}var iu=Pn["__core-js_shared__"],_h=function(){var t=/[^.]+$/.exec(iu&&iu.keys&&iu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Eb(t){return!!_h&&_h in t}var Ab=Function.prototype,_b=Ab.toString;function Fr(t){if(t!=null){try{return _b.call(t)}catch{}try{return t+""}catch{}}return""}var Sb=/[\\^$.*+?()[\]{}|]/g,bb=/^\[object .+?Constructor\]$/,wb=Function.prototype,Cb=Object.prototype,Nb=wb.toString,Pb=Cb.hasOwnProperty,Ib=RegExp("^"+Nb.call(Pb).replace(Sb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kb(t){if(!An(t)||Eb(t))return!1;var e=Jg(t)?Ib:bb;return e.test(Fr(t))}function Ob(t,e){return t==null?void 0:t[e]}function Gr(t,e){var n=Ob(t,e);return kb(n)?n:void 0}var Ku=Gr(Pn,"WeakMap");function Lb(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var xb=800,Mb=16,Db=Date.now;function Fb(t){var e=0,n=0;return function(){var r=Db(),i=Mb-(r-n);if(n=r,i>0){if(++e>=xb)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Gb(t){return function(){return t}}var Mo=function(){try{var t=Gr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jb=Mo?function(t,e){return Mo(t,"toString",{configurable:!0,enumerable:!1,value:Gb(e),writable:!0})}:Ac,Ub=Fb(jb);function zb(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function qb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Bb(t){return t!==t}function Wb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kb(t,e,n){return e===e?Wb(t,e,n):qb(t,Bb,n)}var Hb=9007199254740991,Vb=/^(?:0|[1-9]\d*)$/;function _c(t,e){var n=typeof t;return e=e??Hb,!!e&&(n=="number"||n!="symbol"&&Vb.test(t))&&t>-1&&t%1==0&&t<e}function Zg(t,e,n){e=="__proto__"&&Mo?Mo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Sc(t,e){return t===e||t!==t&&e!==e}var Yb=Object.prototype,Xb=Yb.hasOwnProperty;function Jf(t,e,n){var r=t[e];(!(Xb.call(t,e)&&Sc(r,n))||n===void 0&&!(e in t))&&Zg(t,e,n)}function Jb(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var o=e[s],c=void 0;c===void 0&&(c=t[o]),i?Zg(n,o,c):Jf(n,o,c)}return n}var Sh=Math.max;function Zb(t,e,n){return e=Sh(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Sh(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),Lb(t,this,o)}}function Qb(t,e){return Ub(Zb(t,e,Ac),t+"")}var ew=9007199254740991;function Zf(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ew}function jr(t){return t!=null&&Zf(t.length)&&!Jg(t)}function tw(t,e,n){if(!An(n))return!1;var r=typeof e;return(r=="number"?jr(n)&&_c(e,n.length):r=="string"&&e in n)?Sc(n[e],t):!1}function nw(t){return Qb(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&tw(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var o=n[r];o&&t(e,o,r,s)}return e})}var rw=Object.prototype;function Qf(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||rw;return t===n}function iw(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var sw="[object Arguments]";function bh(t){return Wn(t)&&Xn(t)==sw}var Qg=Object.prototype,aw=Qg.hasOwnProperty,ow=Qg.propertyIsEnumerable,ey=bh(function(){return arguments}())?bh:function(t){return Wn(t)&&aw.call(t,"callee")&&!ow.call(t,"callee")};function cw(){return!1}var ty=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wh=ty&&typeof module=="object"&&module&&!module.nodeType&&module,uw=wh&&wh.exports===ty,Ch=uw?Pn.Buffer:void 0,lw=Ch?Ch.isBuffer:void 0,Hu=lw||cw,fw="[object Arguments]",dw="[object Array]",hw="[object Boolean]",pw="[object Date]",mw="[object Error]",gw="[object Function]",yw="[object Map]",Tw="[object Number]",vw="[object Object]",$w="[object RegExp]",Rw="[object Set]",Ew="[object String]",Aw="[object WeakMap]",_w="[object ArrayBuffer]",Sw="[object DataView]",bw="[object Float32Array]",ww="[object Float64Array]",Cw="[object Int8Array]",Nw="[object Int16Array]",Pw="[object Int32Array]",Iw="[object Uint8Array]",kw="[object Uint8ClampedArray]",Ow="[object Uint16Array]",Lw="[object Uint32Array]",he={};he[bw]=he[ww]=he[Cw]=he[Nw]=he[Pw]=he[Iw]=he[kw]=he[Ow]=he[Lw]=!0;he[fw]=he[dw]=he[_w]=he[hw]=he[Sw]=he[pw]=he[mw]=he[gw]=he[yw]=he[Tw]=he[vw]=he[$w]=he[Rw]=he[Ew]=he[Aw]=!1;function xw(t){return Wn(t)&&Zf(t.length)&&!!he[Xn(t)]}function ny(t){return function(e){return t(e)}}var ry=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zs=ry&&typeof module=="object"&&module&&!module.nodeType&&module,Mw=zs&&zs.exports===ry,su=Mw&&Vg.process,Do=function(){try{var t=zs&&zs.require&&zs.require("util").types;return t||su&&su.binding&&su.binding("util")}catch{}}(),Nh=Do&&Do.isTypedArray,iy=Nh?ny(Nh):xw,Dw=Object.prototype,Fw=Dw.hasOwnProperty;function sy(t,e){var n=st(t),r=!n&&ey(t),i=!n&&!r&&Hu(t),s=!n&&!r&&!i&&iy(t),a=n||r||i||s,o=a?iw(t.length,String):[],c=o.length;for(var u in t)(e||Fw.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_c(u,c)))&&o.push(u);return o}function ay(t,e){return function(n){return t(e(n))}}var Gw=ay(Object.keys,Object),jw=Object.prototype,Uw=jw.hasOwnProperty;function zw(t){if(!Qf(t))return Gw(t);var e=[];for(var n in Object(t))Uw.call(t,n)&&n!="constructor"&&e.push(n);return e}function Ra(t){return jr(t)?sy(t):zw(t)}var qw=Object.prototype,Bw=qw.hasOwnProperty,Yt=nw(function(t,e){if(Qf(e)||jr(e)){Jb(e,Ra(e),t);return}for(var n in e)Bw.call(e,n)&&Jf(t,n,e[n])});function Ww(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var Kw=Object.prototype,Hw=Kw.hasOwnProperty;function Vw(t){if(!An(t))return Ww(t);var e=Qf(t),n=[];for(var r in t)r=="constructor"&&(e||!Hw.call(t,r))||n.push(r);return n}function Yw(t){return jr(t)?sy(t,!0):Vw(t)}var Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jw=/^\w*$/;function ed(t,e){if(st(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Rc(t)?!0:Jw.test(t)||!Xw.test(t)||e!=null&&t in Object(e)}var Js=Gr(Object,"create");function Zw(){this.__data__=Js?Js(null):{},this.size=0}function Qw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eC="__lodash_hash_undefined__",tC=Object.prototype,nC=tC.hasOwnProperty;function rC(t){var e=this.__data__;if(Js){var n=e[t];return n===eC?void 0:n}return nC.call(e,t)?e[t]:void 0}var iC=Object.prototype,sC=iC.hasOwnProperty;function aC(t){var e=this.__data__;return Js?e[t]!==void 0:sC.call(e,t)}var oC="__lodash_hash_undefined__";function cC(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Js&&e===void 0?oC:e,this}function Pr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Pr.prototype.clear=Zw;Pr.prototype.delete=Qw;Pr.prototype.get=rC;Pr.prototype.has=aC;Pr.prototype.set=cC;function uC(){this.__data__=[],this.size=0}function bc(t,e){for(var n=t.length;n--;)if(Sc(t[n][0],e))return n;return-1}var lC=Array.prototype,fC=lC.splice;function dC(t){var e=this.__data__,n=bc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():fC.call(e,n,1),--this.size,!0}function hC(t){var e=this.__data__,n=bc(e,t);return n<0?void 0:e[n][1]}function pC(t){return bc(this.__data__,t)>-1}function mC(t,e){var n=this.__data__,r=bc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function In(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=uC;In.prototype.delete=dC;In.prototype.get=hC;In.prototype.has=pC;In.prototype.set=mC;var Zs=Gr(Pn,"Map");function gC(){this.size=0,this.__data__={hash:new Pr,map:new(Zs||In),string:new Pr}}function yC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function wc(t,e){var n=t.__data__;return yC(e)?n[typeof e=="string"?"string":"hash"]:n.map}function TC(t){var e=wc(this,t).delete(t);return this.size-=e?1:0,e}function vC(t){return wc(this,t).get(t)}function $C(t){return wc(this,t).has(t)}function RC(t,e){var n=wc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function kn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kn.prototype.clear=gC;kn.prototype.delete=TC;kn.prototype.get=vC;kn.prototype.has=$C;kn.prototype.set=RC;var EC="Expected a function";function td(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(EC);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(td.Cache||kn),n}td.Cache=kn;var AC=500;function _C(t){var e=td(t,function(r){return n.size===AC&&n.clear(),r}),n=e.cache;return e}var SC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bC=/\\(\\)?/g,wC=_C(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(SC,function(n,r,i,s){e.push(i?s.replace(bC,"$1"):r||n)}),e});function CC(t){return t==null?"":Xg(t)}function Cc(t,e){return st(t)?t:ed(t,e)?[t]:wC(CC(t))}function Ea(t){if(typeof t=="string"||Rc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function nd(t,e){e=Cc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Ea(e[n++])];return n&&n==r?t:void 0}function NC(t,e,n){var r=t==null?void 0:nd(t,e);return r===void 0?n:r}function oy(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var PC=ay(Object.getPrototypeOf,Object);function IC(){this.__data__=new In,this.size=0}function kC(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function OC(t){return this.__data__.get(t)}function LC(t){return this.__data__.has(t)}var xC=200;function MC(t,e){var n=this.__data__;if(n instanceof In){var r=n.__data__;if(!Zs||r.length<xC-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new kn(r)}return n.set(t,e),this.size=n.size,this}function $n(t){var e=this.__data__=new In(t);this.size=e.size}$n.prototype.clear=IC;$n.prototype.delete=kC;$n.prototype.get=OC;$n.prototype.has=LC;$n.prototype.set=MC;function DC(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function cy(){return[]}var FC=Object.prototype,GC=FC.propertyIsEnumerable,Ph=Object.getOwnPropertySymbols,uy=Ph?function(t){return t==null?[]:(t=Object(t),DC(Ph(t),function(e){return GC.call(t,e)}))}:cy,jC=Object.getOwnPropertySymbols,UC=jC?function(t){for(var e=[];t;)oy(e,uy(t)),t=PC(t);return e}:cy;function ly(t,e,n){var r=e(t);return st(t)?r:oy(r,n(t))}function Ih(t){return ly(t,Ra,uy)}function zC(t){return ly(t,Yw,UC)}var Vu=Gr(Pn,"DataView"),Yu=Gr(Pn,"Promise"),Xu=Gr(Pn,"Set"),kh="[object Map]",qC="[object Object]",Oh="[object Promise]",Lh="[object Set]",xh="[object WeakMap]",Mh="[object DataView]",BC=Fr(Vu),WC=Fr(Zs),KC=Fr(Yu),HC=Fr(Xu),VC=Fr(Ku),jn=Xn;(Vu&&jn(new Vu(new ArrayBuffer(1)))!=Mh||Zs&&jn(new Zs)!=kh||Yu&&jn(Yu.resolve())!=Oh||Xu&&jn(new Xu)!=Lh||Ku&&jn(new Ku)!=xh)&&(jn=function(t){var e=Xn(t),n=e==qC?t.constructor:void 0,r=n?Fr(n):"";if(r)switch(r){case BC:return Mh;case WC:return kh;case KC:return Oh;case HC:return Lh;case VC:return xh}return e});var Dh=Pn.Uint8Array,YC="__lodash_hash_undefined__";function XC(t){return this.__data__.set(t,YC),this}function JC(t){return this.__data__.has(t)}function Fo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kn;++e<n;)this.add(t[e])}Fo.prototype.add=Fo.prototype.push=XC;Fo.prototype.has=JC;function fy(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function ZC(t,e){return t.has(e)}var QC=1,eN=2;function dy(t,e,n,r,i,s){var a=n&QC,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&eN?new Fo:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!fy(e,function(A,_){if(!ZC(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function tN(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function nN(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var rN=1,iN=2,sN="[object Boolean]",aN="[object Date]",oN="[object Error]",cN="[object Map]",uN="[object Number]",lN="[object RegExp]",fN="[object Set]",dN="[object String]",hN="[object Symbol]",pN="[object ArrayBuffer]",mN="[object DataView]",Fh=Bn?Bn.prototype:void 0,au=Fh?Fh.valueOf:void 0;function gN(t,e,n,r,i,s,a){switch(n){case mN:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case pN:return!(t.byteLength!=e.byteLength||!s(new Dh(t),new Dh(e)));case sN:case aN:case uN:return Sc(+t,+e);case oN:return t.name==e.name&&t.message==e.message;case lN:case dN:return t==e+"";case cN:var o=tN;case fN:var c=r&rN;if(o||(o=nN),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=iN,a.set(t,e);var l=dy(o(t),o(e),r,i,s,a);return a.delete(t),l;case hN:if(au)return au.call(t)==au.call(e)}return!1}var yN=1,TN=Object.prototype,vN=TN.hasOwnProperty;function $N(t,e,n,r,i,s){var a=n&yN,o=Ih(t),c=o.length,u=Ih(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:vN.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var RN=1,Gh="[object Arguments]",jh="[object Array]",Za="[object Object]",EN=Object.prototype,Uh=EN.hasOwnProperty;function AN(t,e,n,r,i,s){var a=st(t),o=st(e),c=a?jh:jn(t),u=o?jh:jn(e);c=c==Gh?Za:c,u=u==Gh?Za:u;var l=c==Za,f=u==Za,d=c==u;if(d&&Hu(t)){if(!Hu(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new $n),a||iy(t)?dy(t,e,n,r,i,s):gN(t,e,c,n,r,i,s);if(!(n&RN)){var p=l&&Uh.call(t,"__wrapped__"),y=f&&Uh.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new $n),i(E,C,n,r,s)}}return d?(s||(s=new $n),$N(t,e,n,r,i,s)):!1}function rd(t,e,n,r,i){return t===e?!0:t==null||e==null||!Wn(t)&&!Wn(e)?t!==t&&e!==e:AN(t,e,n,r,rd,i)}var _N=1,SN=2;function bN(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new $n,f;if(!(f===void 0?rd(u,c,_N|SN,r,l):f))return!1}}return!0}function hy(t){return t===t&&!An(t)}function wN(t){for(var e=Ra(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,hy(i)]}return e}function py(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function CN(t){var e=wN(t);return e.length==1&&e[0][2]?py(e[0][0],e[0][1]):function(n){return n===t||bN(n,t,e)}}function NN(t,e){return t!=null&&e in Object(t)}function PN(t,e,n){e=Cc(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=Ea(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&Zf(i)&&_c(a,i)&&(st(t)||ey(t)))}function IN(t,e){return t!=null&&PN(t,e,NN)}var kN=1,ON=2;function LN(t,e){return ed(t)&&hy(e)?py(Ea(t),e):function(n){var r=NC(n,t);return r===void 0&&r===e?IN(n,t):rd(e,r,kN|ON)}}function xN(t){return function(e){return e==null?void 0:e[t]}}function MN(t){return function(e){return nd(e,t)}}function DN(t){return ed(t)?xN(Ea(t)):MN(t)}function Nc(t){return typeof t=="function"?t:t==null?Ac:typeof t=="object"?st(t)?LN(t[0],t[1]):CN(t):DN(t)}function FN(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var GN=FN();function jN(t,e){return t&&GN(t,e,Ra)}function UN(t,e){return function(n,r){if(n==null)return n;if(!jr(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Pc=UN(jN);function zN(t){return typeof t=="function"?t:Ac}function qN(t,e){var n=st(t)?zb:Pc;return n(t,zN(e))}function BN(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 WN(t,e){var n=!0;return Pc(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function KN(t,e,n){var r=st(t)?BN:WN;return r(t,Nc(e))}function HN(t,e){var n=-1,r=jr(t)?Array(t.length):[];return Pc(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function my(t,e){var n=st(t)?Ec:HN;return n(t,Nc(e))}var VN="[object String]";function Go(t){return typeof t=="string"||!st(t)&&Wn(t)&&Xn(t)==VN}function YN(t,e){return Ec(e,function(n){return t[n]})}function XN(t){return t==null?[]:YN(t,Ra(t))}var JN=Math.max;function ZN(t,e,n,r){t=jr(t)?t:XN(t),n=n?yb(n):0;var i=t.length;return n<0&&(n=JN(i+n,0)),Go(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Kb(t,e,n)>-1}var QN="[object RegExp]";function eP(t){return Wn(t)&&Xn(t)==QN}var zh=Do&&Do.isRegExp,tP=zh?ny(zh):eP;function nP(t,e,n,r){if(!An(t))return t;e=Cc(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var c=Ea(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var l=o[c];u=void 0,u===void 0&&(u=An(l)?l:_c(e[i+1])?[]:{})}Jf(o,c,u),o=o[c]}return t}function rP(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var a=e[r],o=nd(t,a);n(o,a)&&nP(s,Cc(a,t),o)}return s}function Xt(t,e){if(t==null)return{};var n=Ec(zC(t),function(r){return[r]});return e=Nc(e),rP(t,n,function(r,i){return e(r,i[0])})}function iP(t,e){var n;return Pc(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function sP(t,e,n){var r=st(t)?fy:iP;return r(t,Nc(e))}function aP(t){return oP(t)?t.LABEL:t.name}function oP(t){return Go(t.LABEL)&&t.LABEL!==""}class Jt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),qN(this.definition,n=>{n.accept(e)})}}class tt extends Jt{constructor(e){super([]),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Bi extends Jt{constructor(e){super(e.definition),this.orgText="",Yt(this,Xt(e,n=>n!==void 0))}}class at extends Jt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Yt(this,Xt(e,n=>n!==void 0))}}let He=class extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}};class gt extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class yt extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class we extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class ct extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class ut extends Jt{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,Yt(this,Xt(e,n=>n!==void 0))}}class me{constructor(e){this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}accept(e){e.visit(this)}}function cP(t){return my(t,$o)}function $o(t){function e(n){return my(n,$o)}if(t instanceof tt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Go(t.label)&&(n.label=t.label),n}else{if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof He)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof gt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof yt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:$o(new me({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionWithSeparator",idx:t.idx,separator:$o(new me({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof we)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ut)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof me){const n={type:"Terminal",name:t.terminalType.name,label:aP(t.terminalType),idx:t.idx};Go(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=tP(r)?r.source:r),n}else{if(t instanceof Bi)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}class Wi{visit(e){const n=e;switch(n.constructor){case tt:return this.visitNonTerminal(n);case at:return this.visitAlternative(n);case He:return this.visitOption(n);case gt:return this.visitRepetitionMandatory(n);case yt:return this.visitRepetitionMandatoryWithSeparator(n);case ct:return this.visitRepetitionWithSeparator(n);case we:return this.visitRepetition(n);case ut:return this.visitAlternation(n);case me:return this.visitTerminal(n);case Bi: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 uP(t){return t instanceof at||t instanceof He||t instanceof we||t instanceof gt||t instanceof yt||t instanceof ct||t instanceof me||t instanceof Bi}function jo(t,e=[]){return t instanceof He||t instanceof we||t instanceof ct?!0:t instanceof ut?sP(t.definition,r=>jo(r,e)):t instanceof tt&&ZN(e,t)?!1:t instanceof Jt?(t instanceof tt&&e.push(t),KN(t.definition,r=>jo(r,e))):!1}function lP(t){return t instanceof ut}function jt(t){if(t instanceof tt)return"SUBRULE";if(t instanceof He)return"OPTION";if(t instanceof ut)return"OR";if(t instanceof gt)return"AT_LEAST_ONE";if(t instanceof yt)return"AT_LEAST_ONE_SEP";if(t instanceof ct)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof me)return"CONSUME";throw Error("non exhaustive match")}class Ic{walk(e,n=[]){K(e.definition,(r,i)=>{const s=Be(e.definition,i+1);if(r instanceof tt)this.walkProdRef(r,s,n);else if(r instanceof me)this.walkTerminal(r,s,n);else if(r instanceof at)this.walkFlat(r,s,n);else if(r instanceof He)this.walkOption(r,s,n);else if(r instanceof gt)this.walkAtLeastOne(r,s,n);else if(r instanceof yt)this.walkAtLeastOneSep(r,s,n);else if(r instanceof ct)this.walkManySep(r,s,n);else if(r instanceof we)this.walkMany(r,s,n);else if(r instanceof ut)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 He({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=qh(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new He({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=qh(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);K(e.definition,s=>{const a=new at({definition:[s]});this.walk(a,i)})}}function qh(t,e,n){return[new He({definition:[new me({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function Aa(t){if(t instanceof tt)return Aa(t.referencedRule);if(t instanceof me)return hP(t);if(uP(t))return fP(t);if(lP(t))return dP(t);throw Error("non exhaustive match")}function fP(t){let e=[];const n=t.definition;let r=0,i=n.length>r,s,a=!0;for(;i&&a;)s=n[r],a=jo(s),e=e.concat(Aa(s)),r=r+1,i=n.length>r;return Xf(e)}function dP(t){const e=j(t.definition,n=>Aa(n));return Xf(It(e))}function hP(t){return[t.terminalType]}const gy="_~IN~_";class pP extends Ic{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=gP(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),a=new at({definition:s}),o=Aa(a);this.follows[i]=o}}function mP(t){const e={};return K(t,n=>{const r=new pP(n).startWalking();Uu(e,r)}),e}function gP(t,e){return t.name+e+gy}let Ro={};const yP=new ag;function kc(t){const e=t.toString();if(Ro.hasOwnProperty(e))return Ro[e];{const n=yP.pattern(e);return Ro[e]=n,n}}function TP(){Ro={}}const yy="Complement Sets are not supported for first char optimization",Uo=`Unable to use "first char" lexer optimizations:
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 Qc=new Vv;function Hv(t){try{return typeof t=="string"&&(t=new RegExp(t)),t=t.toString(),Qc.reset(t),Qc.visit(Kv.pattern(t)),Qc.multiline}catch{return!1}}const Yv=`\f
12
+ \r \v              \u2028\u2029   \uFEFF`.split("");function og(t){const e=typeof t=="string"?new RegExp(t):t;return Yv.some(n=>e.test(n))}function cc(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Xv(t,e){const n=Jv(t),r=e.match(n);return!!r&&r[0].length>0}function Jv(t){typeof t=="string"&&(t=new RegExp(t));const e=t,n=t.source;let r=0;function i(){let s="",a;function o(u){s+=n.substr(r,u),r+=u}function c(u){s+="(?:"+n.substr(r,u)+"|$)",r+=u}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 Zv(t){return t.rules.find(e=>Sn(e)&&e.entry)}function Qv(t){return t.rules.filter(e=>bn(e)&&e.hidden)}function cg(t,e){const n=new Set,r=Zv(t);if(!r)return new Set(t.rules);const i=[r].concat(Qv(t));for(const a of i)ug(a,n,e);const s=new Set;for(const a of t.rules)(n.has(a.name)||bn(a)&&a.hidden)&&s.add(a);return s}function ug(t,e,n){e.add(t.name),da(t).forEach(r=>{if(wr(r)||n){const i=r.rule.ref;i&&!e.has(i.name)&&ug(i,e,n)}})}function e$(t){if(t.terminal)return t.terminal;if(t.type.ref){const e=fg(t.type.ref);return e==null?void 0:e.terminal}}function t$(t){return t.hidden&&!og(If(t))}function n$(t,e){return!t||!e?[]:Pf(t,e,t.astNode,!0)}function lg(t,e,n){if(!t||!e)return;const r=Pf(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 Pf(t,e,n,r){if(!r){const i=ic(t.grammarSource,Sr);if(i&&i.feature===e)return[t]}return Ws(t)&&t.astNode===n?t.content.flatMap(i=>Pf(i,e,n,!1)):[]}function r$(t,e,n){if(!t)return;const r=i$(t,e,t==null?void 0: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 i$(t,e,n){if(t.astNode!==n)return[];if(br(t.grammarSource)&&t.grammarSource.value===e)return[t];const r=Fu(t).iterator();let i;const s=[];do if(i=r.next(),!i.done){const a=i.value;a.astNode===n?br(a.grammarSource)&&a.grammarSource.value===e&&s.push(a):r.prune()}while(!i.done);return s}function s$(t){var n;const e=t.astNode;for(;e===((n=t.container)==null?void 0:n.astNode);){const r=ic(t.grammarSource,Sr);if(r)return r;t=t.container}}function fg(t){let e=t;return ng(e)&&(sc(e.$container)?e=e.$container.$container:ha(e.$container)?e=e.$container:pa(e.$container)),dg(t,e,new Map)}function dg(t,e,n){var i;function r(s,a){let o;return ic(s,Sr)||(o=dg(a,a,n)),n.set(t,o),o}if(n.has(t))return n.get(t);n.set(t,void 0);for(const s of da(e)){if(Sr(s)&&s.feature.toLowerCase()==="name")return n.set(t,s),s;if(wr(s)&&Sn(s.rule.ref))return r(s,s.rule.ref);if(Nv(s)&&((i=s.typeRef)!=null&&i.ref))return r(s,s.typeRef.ref)}}function hg(t){return pg(t,new Set)}function pg(t,e){if(e.has(t))return!0;e.add(t);for(const n of da(t))if(wr(n)){if(!n.rule.ref||Sn(n.rule.ref)&&!pg(n.rule.ref,e)||Po(n.rule.ref))return!1}else{if(Sr(n))return!1;if(sc(n))return!1}return!!t.definition}function mg(t){if(!bn(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 Ks(t){if(ha(t))return Sn(t)&&hg(t)?t.name:mg(t)??t.name;if(Av(t)||Ov(t)||Cv(t))return t.name;if(sc(t)){const e=a$(t);if(e)return e}else if(ng(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function a$(t){var e;if(t.inferredType)return t.inferredType.name;if((e=t.type)!=null&&e.ref)return Ks(t.type.ref)}function o$(t){var e;return bn(t)?((e=t.type)==null?void 0:e.name)??"string":mg(t)??t.name}function If(t){const e={s:!1,i:!1,u:!1},n=qi(t.definition,e),r=Object.entries(e).filter(([,i])=>i).map(([i])=>i).join("");return new RegExp(n,r)}const kf=/[\s\S]/.source;function qi(t,e){var n;if(Pv(t))return c$(t);if(Iv(t))return u$(t);if(vv(t))return d$(t);if(kv(t)){const r=t.rule.ref;if(!r)throw new Error("Missing rule reference.");return vn(qi(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}else{if(_v(t))return f$(t);if(Lv(t))return l$(t);if(wv(t)){const r=t.regex.lastIndexOf("/"),i=t.regex.substring(1,r),s=t.regex.substring(r+1);return e&&(e.i=s.includes("i"),e.s=s.includes("s"),e.u=s.includes("u")),vn(i,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}else{if(xv(t))return vn(kf,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized});throw new Error(`Invalid terminal element: ${t==null?void 0:t.$type}, ${(n=t==null?void 0:t.$cstNode)==null?void 0:n.text}`)}}}function c$(t){return vn(t.elements.map(e=>qi(e)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function u$(t){return vn(t.elements.map(e=>qi(e)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function l$(t){return vn(`${kf}*?${qi(t.terminal)}`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function f$(t){return vn(`(?!${qi(t.terminal)})${kf}*?`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized})}function d$(t){return t.right?vn(`[${eu(t.left)}-${eu(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1}):vn(eu(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,parenthesized:t.parenthesized,wrap:!1})}function eu(t){return cc(t.value)}function vn(t,e){return(e.parenthesized||e.lookahead||e.wrap!==!1)&&(t=`(${e.lookahead??(e.parenthesized?"":"?:")}${t})`),e.cardinality?`${t}${e.cardinality}`:t}function h$(t){const e=[],n=t.Grammar;for(const r of n.rules)bn(r)&&t$(r)&&Hv(If(r))&&e.push(r.name);return{multilineCommentRules:e,nameRegexp:Gv}}var gg=typeof global=="object"&&global&&global.Object===Object&&global,p$=typeof self=="object"&&self&&self.Object===Object&&self,Kt=gg||p$||Function("return this")(),Rt=Kt.Symbol,yg=Object.prototype,m$=yg.hasOwnProperty,g$=yg.toString,hs=Rt?Rt.toStringTag:void 0;function y$(t){var e=m$.call(t,hs),n=t[hs];try{t[hs]=void 0;var r=!0}catch{}var i=g$.call(t);return r&&(e?t[hs]=n:delete t[hs]),i}var T$=Object.prototype,v$=T$.toString;function $$(t){return v$.call(t)}var R$="[object Null]",E$="[object Undefined]",zd=Rt?Rt.toStringTag:void 0;function Yn(t){return t==null?t===void 0?E$:R$:zd&&zd in Object(t)?y$(t):$$(t)}function Ot(t){return t!=null&&typeof t=="object"}var A$="[object Symbol]";function uc(t){return typeof t=="symbol"||Ot(t)&&Yn(t)==A$}function lc(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Q=Array.isArray,qd=Rt?Rt.prototype:void 0,Bd=qd?qd.toString:void 0;function Tg(t){if(typeof t=="string")return t;if(Q(t))return lc(t,Tg)+"";if(uc(t))return Bd?Bd.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var _$=/\s/;function S$(t){for(var e=t.length;e--&&_$.test(t.charAt(e)););return e}var b$=/^\s+/;function w$(t){return t&&t.slice(0,S$(t)+1).replace(b$,"")}function Et(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Wd=NaN,C$=/^[-+]0x[0-9a-f]+$/i,N$=/^0b[01]+$/i,P$=/^0o[0-7]+$/i,I$=parseInt;function k$(t){if(typeof t=="number")return t;if(uc(t))return Wd;if(Et(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Et(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=w$(t);var n=N$.test(t);return n||P$.test(t)?I$(t.slice(2),n?2:8):C$.test(t)?Wd:+t}var O$=1/0,L$=17976931348623157e292;function x$(t){if(!t)return t===0?t:0;if(t=k$(t),t===O$||t===-1/0){var e=t<0?-1:1;return e*L$}return t===t?t:0}function fc(t){var e=x$(t),n=e%1;return e===e?n?e-n:e:0}function ma(t){return t}var M$="[object AsyncFunction]",D$="[object Function]",F$="[object GeneratorFunction]",G$="[object Proxy]";function wn(t){if(!Et(t))return!1;var e=Yn(t);return e==D$||e==F$||e==M$||e==G$}var tu=Kt["__core-js_shared__"],Kd=function(){var t=/[^.]+$/.exec(tu&&tu.keys&&tu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function j$(t){return!!Kd&&Kd in t}var U$=Function.prototype,z$=U$.toString;function xr(t){if(t!=null){try{return z$.call(t)}catch{}try{return t+""}catch{}}return""}var q$=/[\\^$.*+?()[\]{}|]/g,B$=/^\[object .+?Constructor\]$/,W$=Function.prototype,K$=Object.prototype,V$=W$.toString,H$=K$.hasOwnProperty,Y$=RegExp("^"+V$.call(H$).replace(q$,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function X$(t){if(!Et(t)||j$(t))return!1;var e=wn(t)?Y$:B$;return e.test(xr(t))}function J$(t,e){return t==null?void 0:t[e]}function Mr(t,e){var n=J$(t,e);return X$(n)?n:void 0}var ju=Mr(Kt,"WeakMap"),Vd=Object.create,Z$=function(){function t(){}return function(e){if(!Et(e))return{};if(Vd)return Vd(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Q$(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Fe(){}function eR(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var tR=800,nR=16,rR=Date.now;function iR(t){var e=0,n=0;return function(){var r=rR(),i=nR-(r-n);if(n=r,i>0){if(++e>=tR)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function sR(t){return function(){return t}}var Lo=function(){try{var t=Mr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),aR=Lo?function(t,e){return Lo(t,"toString",{configurable:!0,enumerable:!1,value:sR(e),writable:!0})}:ma,oR=iR(aR);function vg(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function $g(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function cR(t){return t!==t}function uR(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Of(t,e,n){return e===e?uR(t,e,n):$g(t,cR,n)}function Rg(t,e){var n=t==null?0:t.length;return!!n&&Of(t,e,0)>-1}var lR=9007199254740991,fR=/^(?:0|[1-9]\d*)$/;function dc(t,e){var n=typeof t;return e=e??lR,!!e&&(n=="number"||n!="symbol"&&fR.test(t))&&t>-1&&t%1==0&&t<e}function Lf(t,e,n){e=="__proto__"&&Lo?Lo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ga(t,e){return t===e||t!==t&&e!==e}var dR=Object.prototype,hR=dR.hasOwnProperty;function hc(t,e,n){var r=t[e];(!(hR.call(t,e)&&ga(r,n))||n===void 0&&!(e in t))&&Lf(t,e,n)}function ya(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var o=e[s],c=void 0;c===void 0&&(c=t[o]),i?Lf(n,o,c):hc(n,o,c)}return n}var Hd=Math.max;function pR(t,e,n){return e=Hd(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Hd(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),Q$(t,this,o)}}function xf(t,e){return oR(pR(t,e,ma),t+"")}var mR=9007199254740991;function Mf(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=mR}function Vt(t){return t!=null&&Mf(t.length)&&!wn(t)}function Eg(t,e,n){if(!Et(n))return!1;var r=typeof e;return(r=="number"?Vt(n)&&dc(e,n.length):r=="string"&&e in n)?ga(n[e],t):!1}function gR(t){return xf(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&Eg(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var o=n[r];o&&t(e,o,r,s)}return e})}var yR=Object.prototype;function Ta(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||yR;return t===n}function TR(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var vR="[object Arguments]";function Yd(t){return Ot(t)&&Yn(t)==vR}var Ag=Object.prototype,$R=Ag.hasOwnProperty,RR=Ag.propertyIsEnumerable,pc=Yd(function(){return arguments}())?Yd:function(t){return Ot(t)&&$R.call(t,"callee")&&!RR.call(t,"callee")};function ER(){return!1}var _g=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Xd=_g&&typeof module=="object"&&module&&!module.nodeType&&module,AR=Xd&&Xd.exports===_g,Jd=AR?Kt.Buffer:void 0,_R=Jd?Jd.isBuffer:void 0,Vs=_R||ER,SR="[object Arguments]",bR="[object Array]",wR="[object Boolean]",CR="[object Date]",NR="[object Error]",PR="[object Function]",IR="[object Map]",kR="[object Number]",OR="[object Object]",LR="[object RegExp]",xR="[object Set]",MR="[object String]",DR="[object WeakMap]",FR="[object ArrayBuffer]",GR="[object DataView]",jR="[object Float32Array]",UR="[object Float64Array]",zR="[object Int8Array]",qR="[object Int16Array]",BR="[object Int32Array]",WR="[object Uint8Array]",KR="[object Uint8ClampedArray]",VR="[object Uint16Array]",HR="[object Uint32Array]",de={};de[jR]=de[UR]=de[zR]=de[qR]=de[BR]=de[WR]=de[KR]=de[VR]=de[HR]=!0;de[SR]=de[bR]=de[FR]=de[wR]=de[GR]=de[CR]=de[NR]=de[PR]=de[IR]=de[kR]=de[OR]=de[LR]=de[xR]=de[MR]=de[DR]=!1;function YR(t){return Ot(t)&&Mf(t.length)&&!!de[Yn(t)]}function mc(t){return function(e){return t(e)}}var Sg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Us=Sg&&typeof module=="object"&&module&&!module.nodeType&&module,XR=Us&&Us.exports===Sg,nu=XR&&gg.process,zn=function(){try{var t=Us&&Us.require&&Us.require("util").types;return t||nu&&nu.binding&&nu.binding("util")}catch{}}(),Zd=zn&&zn.isTypedArray,Df=Zd?mc(Zd):YR,JR=Object.prototype,ZR=JR.hasOwnProperty;function bg(t,e){var n=Q(t),r=!n&&pc(t),i=!n&&!r&&Vs(t),s=!n&&!r&&!i&&Df(t),a=n||r||i||s,o=a?TR(t.length,String):[],c=o.length;for(var u in t)(e||ZR.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||dc(u,c)))&&o.push(u);return o}function wg(t,e){return function(n){return t(e(n))}}var QR=wg(Object.keys,Object),eE=Object.prototype,tE=eE.hasOwnProperty;function Cg(t){if(!Ta(t))return QR(t);var e=[];for(var n in Object(t))tE.call(t,n)&&n!="constructor"&&e.push(n);return e}function At(t){return Vt(t)?bg(t):Cg(t)}var nE=Object.prototype,rE=nE.hasOwnProperty,Uu=gR(function(t,e){if(Ta(e)||Vt(e)){ya(e,At(e),t);return}for(var n in e)rE.call(e,n)&&hc(t,n,e[n])});function iE(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var sE=Object.prototype,aE=sE.hasOwnProperty;function oE(t){if(!Et(t))return iE(t);var e=Ta(t),n=[];for(var r in t)r=="constructor"&&(e||!aE.call(t,r))||n.push(r);return n}function Ff(t){return Vt(t)?bg(t,!0):oE(t)}var cE=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uE=/^\w*$/;function Gf(t,e){if(Q(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||uc(t)?!0:uE.test(t)||!cE.test(t)||e!=null&&t in Object(e)}var Hs=Mr(Object,"create");function lE(){this.__data__=Hs?Hs(null):{},this.size=0}function fE(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var dE="__lodash_hash_undefined__",hE=Object.prototype,pE=hE.hasOwnProperty;function mE(t){var e=this.__data__;if(Hs){var n=e[t];return n===dE?void 0:n}return pE.call(e,t)?e[t]:void 0}var gE=Object.prototype,yE=gE.hasOwnProperty;function TE(t){var e=this.__data__;return Hs?e[t]!==void 0:yE.call(e,t)}var vE="__lodash_hash_undefined__";function $E(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Hs&&e===void 0?vE:e,this}function Cr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cr.prototype.clear=lE;Cr.prototype.delete=fE;Cr.prototype.get=mE;Cr.prototype.has=TE;Cr.prototype.set=$E;function RE(){this.__data__=[],this.size=0}function gc(t,e){for(var n=t.length;n--;)if(ga(t[n][0],e))return n;return-1}var EE=Array.prototype,AE=EE.splice;function _E(t){var e=this.__data__,n=gc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():AE.call(e,n,1),--this.size,!0}function SE(t){var e=this.__data__,n=gc(e,t);return n<0?void 0:e[n][1]}function bE(t){return gc(this.__data__,t)>-1}function wE(t,e){var n=this.__data__,r=gc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function Cn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Cn.prototype.clear=RE;Cn.prototype.delete=_E;Cn.prototype.get=SE;Cn.prototype.has=bE;Cn.prototype.set=wE;var Ys=Mr(Kt,"Map");function CE(){this.size=0,this.__data__={hash:new Cr,map:new(Ys||Cn),string:new Cr}}function NE(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function yc(t,e){var n=t.__data__;return NE(e)?n[typeof e=="string"?"string":"hash"]:n.map}function PE(t){var e=yc(this,t).delete(t);return this.size-=e?1:0,e}function IE(t){return yc(this,t).get(t)}function kE(t){return yc(this,t).has(t)}function OE(t,e){var n=yc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function Nn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Nn.prototype.clear=CE;Nn.prototype.delete=PE;Nn.prototype.get=IE;Nn.prototype.has=kE;Nn.prototype.set=OE;var LE="Expected a function";function jf(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(LE);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(jf.Cache||Nn),n}jf.Cache=Nn;var xE=500;function ME(t){var e=jf(t,function(r){return n.size===xE&&n.clear(),r}),n=e.cache;return e}var DE=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,FE=/\\(\\)?/g,GE=ME(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(DE,function(n,r,i,s){e.push(i?s.replace(FE,"$1"):r||n)}),e});function jE(t){return t==null?"":Tg(t)}function Tc(t,e){return Q(t)?t:Gf(t,e)?[t]:GE(jE(t))}function va(t){if(typeof t=="string"||uc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function Uf(t,e){e=Tc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[va(e[n++])];return n&&n==r?t:void 0}function UE(t,e,n){var r=t==null?void 0:Uf(t,e);return r===void 0?n:r}function zf(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Qd=Rt?Rt.isConcatSpreadable:void 0;function zE(t){return Q(t)||pc(t)||!!(Qd&&t&&t[Qd])}function qf(t,e,n,r,i){var s=-1,a=t.length;for(n||(n=zE),i||(i=[]);++s<a;){var o=t[s];n(o)?zf(i,o):r||(i[i.length]=o)}return i}function It(t){var e=t==null?0:t.length;return e?qf(t):[]}var Ng=wg(Object.getPrototypeOf,Object);function Pg(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 qE(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function BE(){this.__data__=new Cn,this.size=0}function WE(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function KE(t){return this.__data__.get(t)}function VE(t){return this.__data__.has(t)}var HE=200;function YE(t,e){var n=this.__data__;if(n instanceof Cn){var r=n.__data__;if(!Ys||r.length<HE-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Nn(r)}return n.set(t,e),this.size=n.size,this}function zt(t){var e=this.__data__=new Cn(t);this.size=e.size}zt.prototype.clear=BE;zt.prototype.delete=WE;zt.prototype.get=KE;zt.prototype.has=VE;zt.prototype.set=YE;function XE(t,e){return t&&ya(e,At(e),t)}function JE(t,e){return t&&ya(e,Ff(e),t)}var Ig=typeof exports=="object"&&exports&&!exports.nodeType&&exports,eh=Ig&&typeof module=="object"&&module&&!module.nodeType&&module,ZE=eh&&eh.exports===Ig,th=ZE?Kt.Buffer:void 0,nh=th?th.allocUnsafe:void 0;function QE(t,e){var n=t.length,r=nh?nh(n):new t.constructor(n);return t.copy(r),r}function Bf(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function kg(){return[]}var eA=Object.prototype,tA=eA.propertyIsEnumerable,rh=Object.getOwnPropertySymbols,Wf=rh?function(t){return t==null?[]:(t=Object(t),Bf(rh(t),function(e){return tA.call(t,e)}))}:kg;function nA(t,e){return ya(t,Wf(t),e)}var rA=Object.getOwnPropertySymbols,Og=rA?function(t){for(var e=[];t;)zf(e,Wf(t)),t=Ng(t);return e}:kg;function iA(t,e){return ya(t,Og(t),e)}function Lg(t,e,n){var r=e(t);return Q(t)?r:zf(r,n(t))}function zu(t){return Lg(t,At,Wf)}function sA(t){return Lg(t,Ff,Og)}var qu=Mr(Kt,"DataView"),Bu=Mr(Kt,"Promise"),mi=Mr(Kt,"Set"),ih="[object Map]",aA="[object Object]",sh="[object Promise]",ah="[object Set]",oh="[object WeakMap]",ch="[object DataView]",oA=xr(qu),cA=xr(Ys),uA=xr(Bu),lA=xr(mi),fA=xr(ju),vt=Yn;(qu&&vt(new qu(new ArrayBuffer(1)))!=ch||Ys&&vt(new Ys)!=ih||Bu&&vt(Bu.resolve())!=sh||mi&&vt(new mi)!=ah||ju&&vt(new ju)!=oh)&&(vt=function(t){var e=Yn(t),n=e==aA?t.constructor:void 0,r=n?xr(n):"";if(r)switch(r){case oA:return ch;case cA:return ih;case uA:return sh;case lA:return ah;case fA:return oh}return e});var dA=Object.prototype,hA=dA.hasOwnProperty;function pA(t){var e=t.length,n=new t.constructor(e);return e&&typeof t[0]=="string"&&hA.call(t,"index")&&(n.index=t.index,n.input=t.input),n}var xo=Kt.Uint8Array;function mA(t){var e=new t.constructor(t.byteLength);return new xo(e).set(new xo(t)),e}function gA(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}var yA=/\w*$/;function TA(t){var e=new t.constructor(t.source,yA.exec(t));return e.lastIndex=t.lastIndex,e}var uh=Rt?Rt.prototype:void 0,lh=uh?uh.valueOf:void 0;function vA(t){return lh?Object(lh.call(t)):{}}function $A(t,e){var n=t.buffer;return new t.constructor(n,t.byteOffset,t.length)}var RA="[object Boolean]",EA="[object Date]",AA="[object Map]",_A="[object Number]",SA="[object RegExp]",bA="[object Set]",wA="[object String]",CA="[object Symbol]",NA="[object ArrayBuffer]",PA="[object DataView]",IA="[object Float32Array]",kA="[object Float64Array]",OA="[object Int8Array]",LA="[object Int16Array]",xA="[object Int32Array]",MA="[object Uint8Array]",DA="[object Uint8ClampedArray]",FA="[object Uint16Array]",GA="[object Uint32Array]";function jA(t,e,n){var r=t.constructor;switch(e){case NA:return mA(t);case RA:case EA:return new r(+t);case PA:return gA(t);case IA:case kA:case OA:case LA:case xA:case MA:case DA:case FA:case GA:return $A(t);case AA:return new r;case _A:case wA:return new r(t);case SA:return TA(t);case bA:return new r;case CA:return vA(t)}}function UA(t){return typeof t.constructor=="function"&&!Ta(t)?Z$(Ng(t)):{}}var zA="[object Map]";function qA(t){return Ot(t)&&vt(t)==zA}var fh=zn&&zn.isMap,BA=fh?mc(fh):qA,WA="[object Set]";function KA(t){return Ot(t)&&vt(t)==WA}var dh=zn&&zn.isSet,VA=dh?mc(dh):KA,HA=2,xg="[object Arguments]",YA="[object Array]",XA="[object Boolean]",JA="[object Date]",ZA="[object Error]",Mg="[object Function]",QA="[object GeneratorFunction]",e_="[object Map]",t_="[object Number]",Dg="[object Object]",n_="[object RegExp]",r_="[object Set]",i_="[object String]",s_="[object Symbol]",a_="[object WeakMap]",o_="[object ArrayBuffer]",c_="[object DataView]",u_="[object Float32Array]",l_="[object Float64Array]",f_="[object Int8Array]",d_="[object Int16Array]",h_="[object Int32Array]",p_="[object Uint8Array]",m_="[object Uint8ClampedArray]",g_="[object Uint16Array]",y_="[object Uint32Array]",ue={};ue[xg]=ue[YA]=ue[o_]=ue[c_]=ue[XA]=ue[JA]=ue[u_]=ue[l_]=ue[f_]=ue[d_]=ue[h_]=ue[e_]=ue[t_]=ue[Dg]=ue[n_]=ue[r_]=ue[i_]=ue[s_]=ue[p_]=ue[m_]=ue[g_]=ue[y_]=!0;ue[ZA]=ue[Mg]=ue[a_]=!1;function vo(t,e,n,r,i,s){var a,o=e&HA;if(a!==void 0)return a;if(!Et(t))return t;var c=Q(t);if(c)return a=pA(t),eR(t,a);var u=vt(t),l=u==Mg||u==QA;if(Vs(t))return QE(t);if(u==Dg||u==xg||l&&!i)return a=l?{}:UA(t),o?iA(t,JE(a,t)):nA(t,XE(a,t));if(!ue[u])return i?t:{};a=jA(t,u),s||(s=new zt);var f=s.get(t);if(f)return f;s.set(t,a),VA(t)?t.forEach(function(y){a.add(vo(y,e,n,y,t,s))}):BA(t)&&t.forEach(function(y,E){a.set(E,vo(y,e,n,E,t,s))});var d=zu,p=c?void 0:d(t);return vg(p||t,function(y,E){p&&(E=y,y=t[E]),hc(a,E,vo(y,e,n,E,t,s))}),a}var T_=4;function He(t){return vo(t,T_)}function $a(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}var v_="__lodash_hash_undefined__";function $_(t){return this.__data__.set(t,v_),this}function R_(t){return this.__data__.has(t)}function xi(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new Nn;++e<n;)this.add(t[e])}xi.prototype.add=xi.prototype.push=$_;xi.prototype.has=R_;function Fg(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Kf(t,e){return t.has(e)}var E_=1,A_=2;function Gg(t,e,n,r,i,s){var a=n&E_,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&A_?new xi:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!Fg(e,function(A,_){if(!Kf(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function __(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function Vf(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var S_=1,b_=2,w_="[object Boolean]",C_="[object Date]",N_="[object Error]",P_="[object Map]",I_="[object Number]",k_="[object RegExp]",O_="[object Set]",L_="[object String]",x_="[object Symbol]",M_="[object ArrayBuffer]",D_="[object DataView]",hh=Rt?Rt.prototype:void 0,ru=hh?hh.valueOf:void 0;function F_(t,e,n,r,i,s,a){switch(n){case D_:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case M_:return!(t.byteLength!=e.byteLength||!s(new xo(t),new xo(e)));case w_:case C_:case I_:return ga(+t,+e);case N_:return t.name==e.name&&t.message==e.message;case k_:case L_:return t==e+"";case P_:var o=__;case O_:var c=r&S_;if(o||(o=Vf),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=b_,a.set(t,e);var l=Gg(o(t),o(e),r,i,s,a);return a.delete(t),l;case x_:if(ru)return ru.call(t)==ru.call(e)}return!1}var G_=1,j_=Object.prototype,U_=j_.hasOwnProperty;function z_(t,e,n,r,i,s){var a=n&G_,o=zu(t),c=o.length,u=zu(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:U_.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var q_=1,ph="[object Arguments]",mh="[object Array]",Ja="[object Object]",B_=Object.prototype,gh=B_.hasOwnProperty;function W_(t,e,n,r,i,s){var a=Q(t),o=Q(e),c=a?mh:vt(t),u=o?mh:vt(e);c=c==ph?Ja:c,u=u==ph?Ja:u;var l=c==Ja,f=u==Ja,d=c==u;if(d&&Vs(t)){if(!Vs(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new zt),a||Df(t)?Gg(t,e,n,r,i,s):F_(t,e,c,n,r,i,s);if(!(n&q_)){var p=l&&gh.call(t,"__wrapped__"),y=f&&gh.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new zt),i(E,C,n,r,s)}}return d?(s||(s=new zt),z_(t,e,n,r,i,s)):!1}function Hf(t,e,n,r,i){return t===e?!0:t==null||e==null||!Ot(t)&&!Ot(e)?t!==t&&e!==e:W_(t,e,n,r,Hf,i)}var K_=1,V_=2;function H_(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new zt,f;if(!(f===void 0?Hf(u,c,K_|V_,r,l):f))return!1}}return!0}function jg(t){return t===t&&!Et(t)}function Y_(t){for(var e=At(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,jg(i)]}return e}function Ug(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function X_(t){var e=Y_(t);return e.length==1&&e[0][2]?Ug(e[0][0],e[0][1]):function(n){return n===t||H_(n,t,e)}}function J_(t,e){return t!=null&&e in Object(t)}function zg(t,e,n){e=Tc(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=va(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&Mf(i)&&dc(a,i)&&(Q(t)||pc(t)))}function Z_(t,e){return t!=null&&zg(t,e,J_)}var Q_=1,eS=2;function tS(t,e){return Gf(t)&&jg(e)?Ug(va(t),e):function(n){var r=UE(n,t);return r===void 0&&r===e?Z_(n,t):Hf(e,r,Q_|eS)}}function nS(t){return function(e){return e==null?void 0:e[t]}}function rS(t){return function(e){return Uf(e,t)}}function iS(t){return Gf(t)?nS(va(t)):rS(t)}function Ht(t){return typeof t=="function"?t:t==null?ma:typeof t=="object"?Q(t)?tS(t[0],t[1]):X_(t):iS(t)}function sS(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 aS(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var oS=aS();function cS(t,e){return t&&oS(t,e,At)}function uS(t,e){return function(n,r){if(n==null)return n;if(!Vt(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Dr=uS(cS);function lS(t,e,n,r){return Dr(t,function(i,s,a){e(r,i,n(i),a)}),r}function fS(t,e){return function(n,r){var i=Q(n)?sS:lS,s=e?e():{};return i(n,t,Ht(r),s)}}var qg=Object.prototype,dS=qg.hasOwnProperty,Yf=xf(function(t,e){t=Object(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&Eg(e[0],e[1],i)&&(r=1);++n<r;)for(var s=e[n],a=Ff(s),o=-1,c=a.length;++o<c;){var u=a[o],l=t[u];(l===void 0||ga(l,qg[u])&&!dS.call(t,u))&&(t[u]=s[u])}return t});function yh(t){return Ot(t)&&Vt(t)}var hS=200;function pS(t,e,n,r){var i=-1,s=Rg,a=!0,o=t.length,c=[],u=e.length;if(!o)return c;e.length>=hS&&(s=Kf,a=!1,e=new xi(e));e:for(;++i<o;){var l=t[i],f=l;if(l=l!==0?l:0,a&&f===f){for(var d=u;d--;)if(e[d]===f)continue e;c.push(l)}else s(e,f,r)||c.push(l)}return c}var vc=xf(function(t,e){return yh(t)?pS(t,qf(e,1,yh,!0)):[]});function Nr(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function Be(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:fc(e),Pg(t,e<0?0:e,r)):[]}function Xs(t,e,n){var r=t==null?0:t.length;return r?(e=e===void 0?1:fc(e),e=r-e,Pg(t,0,e<0?0:e)):[]}function mS(t){return typeof t=="function"?t:ma}function K(t,e){var n=Q(t)?vg:Dr;return n(t,mS(e))}function gS(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 yS(t,e){var n=!0;return Dr(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function qt(t,e,n){var r=Q(t)?gS:yS;return r(t,Ht(e))}function Bg(t,e){var n=[];return Dr(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function _t(t,e){var n=Q(t)?Bf:Bg;return n(t,Ht(e))}function TS(t){return function(e,n,r){var i=Object(e);if(!Vt(e)){var s=Ht(n);e=At(e),n=function(o){return s(i[o],o,i)}}var a=t(e,n,r);return a>-1?i[s?e[a]:a]:void 0}}var vS=Math.max;function $S(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=n==null?0:fc(n);return i<0&&(i=vS(r+i,0)),$g(t,Ht(e),i)}var Mi=TS($S);function Lt(t){return t&&t.length?t[0]:void 0}function RS(t,e){var n=-1,r=Vt(t)?Array(t.length):[];return Dr(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function j(t,e){var n=Q(t)?lc:RS;return n(t,Ht(e))}function $t(t,e){return qf(j(t,e))}var ES=Object.prototype,AS=ES.hasOwnProperty,_S=fS(function(t,e,n){AS.call(t,n)?t[n].push(e):Lf(t,n,[e])}),SS=Object.prototype,bS=SS.hasOwnProperty;function wS(t,e){return t!=null&&bS.call(t,e)}function q(t,e){return t!=null&&zg(t,e,wS)}var CS="[object String]";function xt(t){return typeof t=="string"||!Q(t)&&Ot(t)&&Yn(t)==CS}function NS(t,e){return lc(e,function(n){return t[n]})}function De(t){return t==null?[]:NS(t,At(t))}var PS=Math.max;function ot(t,e,n,r){t=Vt(t)?t:De(t),n=n?fc(n):0;var i=t.length;return n<0&&(n=PS(i+n,0)),xt(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Of(t,e,n)>-1}function Th(t,e,n){var r=t==null?0:t.length;if(!r)return-1;var i=0;return Of(t,e,i)}var IS="[object Map]",kS="[object Set]",OS=Object.prototype,LS=OS.hasOwnProperty;function le(t){if(t==null)return!0;if(Vt(t)&&(Q(t)||typeof t=="string"||typeof t.splice=="function"||Vs(t)||Df(t)||pc(t)))return!t.length;var e=vt(t);if(e==IS||e==kS)return!t.size;if(Ta(t))return!Cg(t).length;for(var n in t)if(LS.call(t,n))return!1;return!0}var xS="[object RegExp]";function MS(t){return Ot(t)&&Yn(t)==xS}var vh=zn&&zn.isRegExp,qn=vh?mc(vh):MS;function En(t){return t===void 0}var DS="Expected a function";function FS(t){if(typeof t!="function")throw new TypeError(DS);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 GS(t,e,n,r){if(!Et(t))return t;e=Tc(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var c=va(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var l=o[c];u=void 0,u===void 0&&(u=Et(l)?l:dc(e[i+1])?[]:{})}hc(o,c,u),o=o[c]}return t}function jS(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var a=e[r],o=Uf(t,a);n(o,a)&&GS(s,Tc(a,t),o)}return s}function US(t,e){if(t==null)return{};var n=lc(sA(t),function(r){return[r]});return e=Ht(e),jS(t,n,function(r,i){return e(r,i[0])})}function zS(t,e,n,r,i){return i(t,function(s,a,o){n=r?(r=!1,s):e(n,s,a,o)}),n}function mt(t,e,n){var r=Q(t)?qE:zS,i=arguments.length<3;return r(t,Ht(e),n,i,Dr)}function $c(t,e){var n=Q(t)?Bf:Bg;return n(t,FS(Ht(e)))}function qS(t,e){var n;return Dr(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function BS(t,e,n){var r=Q(t)?Fg:qS;return r(t,Ht(e))}var WS=1/0,KS=mi&&1/Vf(new mi([,-0]))[1]==WS?function(t){return new mi(t)}:Fe,VS=200;function HS(t,e,n){var r=-1,i=Rg,s=t.length,a=!0,o=[],c=o;if(s>=VS){var u=KS(t);if(u)return Vf(u);a=!1,i=Kf,c=new xi}else c=o;e:for(;++r<s;){var l=t[r],f=l;if(l=l!==0?l:0,a&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;o.push(l)}else i(c,f,n)||(c!==o&&c.push(f),o.push(l))}return o}function Xf(t){return t&&t.length?HS(t):[]}function Wu(t){console&&console.error&&console.error(`Error: ${t}`)}function Wg(t){console&&console.warn&&console.warn(`Warning: ${t}`)}function Kg(t){const e=new Date().getTime(),n=t();return{time:new Date().getTime()-e,value:n}}function Vg(t){function e(){}e.prototype=t;const n=new e;function r(){return typeof n.bar}return r(),r(),t}var Hg=typeof global=="object"&&global&&global.Object===Object&&global,YS=typeof self=="object"&&self&&self.Object===Object&&self,Pn=Hg||YS||Function("return this")(),Bn=Pn.Symbol,Yg=Object.prototype,XS=Yg.hasOwnProperty,JS=Yg.toString,ps=Bn?Bn.toStringTag:void 0;function ZS(t){var e=XS.call(t,ps),n=t[ps];try{t[ps]=void 0;var r=!0}catch{}var i=JS.call(t);return r&&(e?t[ps]=n:delete t[ps]),i}var QS=Object.prototype,eb=QS.toString;function tb(t){return eb.call(t)}var nb="[object Null]",rb="[object Undefined]",$h=Bn?Bn.toStringTag:void 0;function Xn(t){return t==null?t===void 0?rb:nb:$h&&$h in Object(t)?ZS(t):tb(t)}function Wn(t){return t!=null&&typeof t=="object"}var ib="[object Symbol]";function Rc(t){return typeof t=="symbol"||Wn(t)&&Xn(t)==ib}function Ec(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var st=Array.isArray,Rh=Bn?Bn.prototype:void 0,Eh=Rh?Rh.toString:void 0;function Xg(t){if(typeof t=="string")return t;if(st(t))return Ec(t,Xg)+"";if(Rc(t))return Eh?Eh.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}var sb=/\s/;function ab(t){for(var e=t.length;e--&&sb.test(t.charAt(e)););return e}var ob=/^\s+/;function cb(t){return t&&t.slice(0,ab(t)+1).replace(ob,"")}function An(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Ah=NaN,ub=/^[-+]0x[0-9a-f]+$/i,lb=/^0b[01]+$/i,fb=/^0o[0-7]+$/i,db=parseInt;function hb(t){if(typeof t=="number")return t;if(Rc(t))return Ah;if(An(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=An(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=cb(t);var n=lb.test(t);return n||fb.test(t)?db(t.slice(2),n?2:8):ub.test(t)?Ah:+t}var pb=1/0,mb=17976931348623157e292;function gb(t){if(!t)return t===0?t:0;if(t=hb(t),t===pb||t===-1/0){var e=t<0?-1:1;return e*mb}return t===t?t:0}function yb(t){var e=gb(t),n=e%1;return e===e?n?e-n:e:0}function Ac(t){return t}var Tb="[object AsyncFunction]",vb="[object Function]",$b="[object GeneratorFunction]",Rb="[object Proxy]";function Jg(t){if(!An(t))return!1;var e=Xn(t);return e==vb||e==$b||e==Tb||e==Rb}var iu=Pn["__core-js_shared__"],_h=function(){var t=/[^.]+$/.exec(iu&&iu.keys&&iu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Eb(t){return!!_h&&_h in t}var Ab=Function.prototype,_b=Ab.toString;function Fr(t){if(t!=null){try{return _b.call(t)}catch{}try{return t+""}catch{}}return""}var Sb=/[\\^$.*+?()[\]{}|]/g,bb=/^\[object .+?Constructor\]$/,wb=Function.prototype,Cb=Object.prototype,Nb=wb.toString,Pb=Cb.hasOwnProperty,Ib=RegExp("^"+Nb.call(Pb).replace(Sb,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kb(t){if(!An(t)||Eb(t))return!1;var e=Jg(t)?Ib:bb;return e.test(Fr(t))}function Ob(t,e){return t==null?void 0:t[e]}function Gr(t,e){var n=Ob(t,e);return kb(n)?n:void 0}var Ku=Gr(Pn,"WeakMap");function Lb(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}var xb=800,Mb=16,Db=Date.now;function Fb(t){var e=0,n=0;return function(){var r=Db(),i=Mb-(r-n);if(n=r,i>0){if(++e>=xb)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function Gb(t){return function(){return t}}var Mo=function(){try{var t=Gr(Object,"defineProperty");return t({},"",{}),t}catch{}}(),jb=Mo?function(t,e){return Mo(t,"toString",{configurable:!0,enumerable:!1,value:Gb(e),writable:!0})}:Ac,Ub=Fb(jb);function zb(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function qb(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Bb(t){return t!==t}function Wb(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kb(t,e,n){return e===e?Wb(t,e,n):qb(t,Bb,n)}var Vb=9007199254740991,Hb=/^(?:0|[1-9]\d*)$/;function _c(t,e){var n=typeof t;return e=e??Vb,!!e&&(n=="number"||n!="symbol"&&Hb.test(t))&&t>-1&&t%1==0&&t<e}function Zg(t,e,n){e=="__proto__"&&Mo?Mo(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Sc(t,e){return t===e||t!==t&&e!==e}var Yb=Object.prototype,Xb=Yb.hasOwnProperty;function Jf(t,e,n){var r=t[e];(!(Xb.call(t,e)&&Sc(r,n))||n===void 0&&!(e in t))&&Zg(t,e,n)}function Jb(t,e,n,r){var i=!n;n||(n={});for(var s=-1,a=e.length;++s<a;){var o=e[s],c=void 0;c===void 0&&(c=t[o]),i?Zg(n,o,c):Jf(n,o,c)}return n}var Sh=Math.max;function Zb(t,e,n){return e=Sh(e===void 0?t.length-1:e,0),function(){for(var r=arguments,i=-1,s=Sh(r.length-e,0),a=Array(s);++i<s;)a[i]=r[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=r[i];return o[e]=n(a),Lb(t,this,o)}}function Qb(t,e){return Ub(Zb(t,e,Ac),t+"")}var ew=9007199254740991;function Zf(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=ew}function jr(t){return t!=null&&Zf(t.length)&&!Jg(t)}function tw(t,e,n){if(!An(n))return!1;var r=typeof e;return(r=="number"?jr(n)&&_c(e,n.length):r=="string"&&e in n)?Sc(n[e],t):!1}function nw(t){return Qb(function(e,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=t.length>3&&typeof s=="function"?(i--,s):void 0,a&&tw(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++r<i;){var o=n[r];o&&t(e,o,r,s)}return e})}var rw=Object.prototype;function Qf(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||rw;return t===n}function iw(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}var sw="[object Arguments]";function bh(t){return Wn(t)&&Xn(t)==sw}var Qg=Object.prototype,aw=Qg.hasOwnProperty,ow=Qg.propertyIsEnumerable,ey=bh(function(){return arguments}())?bh:function(t){return Wn(t)&&aw.call(t,"callee")&&!ow.call(t,"callee")};function cw(){return!1}var ty=typeof exports=="object"&&exports&&!exports.nodeType&&exports,wh=ty&&typeof module=="object"&&module&&!module.nodeType&&module,uw=wh&&wh.exports===ty,Ch=uw?Pn.Buffer:void 0,lw=Ch?Ch.isBuffer:void 0,Vu=lw||cw,fw="[object Arguments]",dw="[object Array]",hw="[object Boolean]",pw="[object Date]",mw="[object Error]",gw="[object Function]",yw="[object Map]",Tw="[object Number]",vw="[object Object]",$w="[object RegExp]",Rw="[object Set]",Ew="[object String]",Aw="[object WeakMap]",_w="[object ArrayBuffer]",Sw="[object DataView]",bw="[object Float32Array]",ww="[object Float64Array]",Cw="[object Int8Array]",Nw="[object Int16Array]",Pw="[object Int32Array]",Iw="[object Uint8Array]",kw="[object Uint8ClampedArray]",Ow="[object Uint16Array]",Lw="[object Uint32Array]",he={};he[bw]=he[ww]=he[Cw]=he[Nw]=he[Pw]=he[Iw]=he[kw]=he[Ow]=he[Lw]=!0;he[fw]=he[dw]=he[_w]=he[hw]=he[Sw]=he[pw]=he[mw]=he[gw]=he[yw]=he[Tw]=he[vw]=he[$w]=he[Rw]=he[Ew]=he[Aw]=!1;function xw(t){return Wn(t)&&Zf(t.length)&&!!he[Xn(t)]}function ny(t){return function(e){return t(e)}}var ry=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zs=ry&&typeof module=="object"&&module&&!module.nodeType&&module,Mw=zs&&zs.exports===ry,su=Mw&&Hg.process,Do=function(){try{var t=zs&&zs.require&&zs.require("util").types;return t||su&&su.binding&&su.binding("util")}catch{}}(),Nh=Do&&Do.isTypedArray,iy=Nh?ny(Nh):xw,Dw=Object.prototype,Fw=Dw.hasOwnProperty;function sy(t,e){var n=st(t),r=!n&&ey(t),i=!n&&!r&&Vu(t),s=!n&&!r&&!i&&iy(t),a=n||r||i||s,o=a?iw(t.length,String):[],c=o.length;for(var u in t)(e||Fw.call(t,u))&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||_c(u,c)))&&o.push(u);return o}function ay(t,e){return function(n){return t(e(n))}}var Gw=ay(Object.keys,Object),jw=Object.prototype,Uw=jw.hasOwnProperty;function zw(t){if(!Qf(t))return Gw(t);var e=[];for(var n in Object(t))Uw.call(t,n)&&n!="constructor"&&e.push(n);return e}function Ra(t){return jr(t)?sy(t):zw(t)}var qw=Object.prototype,Bw=qw.hasOwnProperty,Yt=nw(function(t,e){if(Qf(e)||jr(e)){Jb(e,Ra(e),t);return}for(var n in e)Bw.call(e,n)&&Jf(t,n,e[n])});function Ww(t){var e=[];if(t!=null)for(var n in Object(t))e.push(n);return e}var Kw=Object.prototype,Vw=Kw.hasOwnProperty;function Hw(t){if(!An(t))return Ww(t);var e=Qf(t),n=[];for(var r in t)r=="constructor"&&(e||!Vw.call(t,r))||n.push(r);return n}function Yw(t){return jr(t)?sy(t,!0):Hw(t)}var Xw=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Jw=/^\w*$/;function ed(t,e){if(st(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||Rc(t)?!0:Jw.test(t)||!Xw.test(t)||e!=null&&t in Object(e)}var Js=Gr(Object,"create");function Zw(){this.__data__=Js?Js(null):{},this.size=0}function Qw(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var eC="__lodash_hash_undefined__",tC=Object.prototype,nC=tC.hasOwnProperty;function rC(t){var e=this.__data__;if(Js){var n=e[t];return n===eC?void 0:n}return nC.call(e,t)?e[t]:void 0}var iC=Object.prototype,sC=iC.hasOwnProperty;function aC(t){var e=this.__data__;return Js?e[t]!==void 0:sC.call(e,t)}var oC="__lodash_hash_undefined__";function cC(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Js&&e===void 0?oC:e,this}function Pr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Pr.prototype.clear=Zw;Pr.prototype.delete=Qw;Pr.prototype.get=rC;Pr.prototype.has=aC;Pr.prototype.set=cC;function uC(){this.__data__=[],this.size=0}function bc(t,e){for(var n=t.length;n--;)if(Sc(t[n][0],e))return n;return-1}var lC=Array.prototype,fC=lC.splice;function dC(t){var e=this.__data__,n=bc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():fC.call(e,n,1),--this.size,!0}function hC(t){var e=this.__data__,n=bc(e,t);return n<0?void 0:e[n][1]}function pC(t){return bc(this.__data__,t)>-1}function mC(t,e){var n=this.__data__,r=bc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function In(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}In.prototype.clear=uC;In.prototype.delete=dC;In.prototype.get=hC;In.prototype.has=pC;In.prototype.set=mC;var Zs=Gr(Pn,"Map");function gC(){this.size=0,this.__data__={hash:new Pr,map:new(Zs||In),string:new Pr}}function yC(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function wc(t,e){var n=t.__data__;return yC(e)?n[typeof e=="string"?"string":"hash"]:n.map}function TC(t){var e=wc(this,t).delete(t);return this.size-=e?1:0,e}function vC(t){return wc(this,t).get(t)}function $C(t){return wc(this,t).has(t)}function RC(t,e){var n=wc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function kn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kn.prototype.clear=gC;kn.prototype.delete=TC;kn.prototype.get=vC;kn.prototype.has=$C;kn.prototype.set=RC;var EC="Expected a function";function td(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(EC);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(td.Cache||kn),n}td.Cache=kn;var AC=500;function _C(t){var e=td(t,function(r){return n.size===AC&&n.clear(),r}),n=e.cache;return e}var SC=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,bC=/\\(\\)?/g,wC=_C(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(SC,function(n,r,i,s){e.push(i?s.replace(bC,"$1"):r||n)}),e});function CC(t){return t==null?"":Xg(t)}function Cc(t,e){return st(t)?t:ed(t,e)?[t]:wC(CC(t))}function Ea(t){if(typeof t=="string"||Rc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function nd(t,e){e=Cc(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[Ea(e[n++])];return n&&n==r?t:void 0}function NC(t,e,n){var r=t==null?void 0:nd(t,e);return r===void 0?n:r}function oy(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var PC=ay(Object.getPrototypeOf,Object);function IC(){this.__data__=new In,this.size=0}function kC(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function OC(t){return this.__data__.get(t)}function LC(t){return this.__data__.has(t)}var xC=200;function MC(t,e){var n=this.__data__;if(n instanceof In){var r=n.__data__;if(!Zs||r.length<xC-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new kn(r)}return n.set(t,e),this.size=n.size,this}function $n(t){var e=this.__data__=new In(t);this.size=e.size}$n.prototype.clear=IC;$n.prototype.delete=kC;$n.prototype.get=OC;$n.prototype.has=LC;$n.prototype.set=MC;function DC(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function cy(){return[]}var FC=Object.prototype,GC=FC.propertyIsEnumerable,Ph=Object.getOwnPropertySymbols,uy=Ph?function(t){return t==null?[]:(t=Object(t),DC(Ph(t),function(e){return GC.call(t,e)}))}:cy,jC=Object.getOwnPropertySymbols,UC=jC?function(t){for(var e=[];t;)oy(e,uy(t)),t=PC(t);return e}:cy;function ly(t,e,n){var r=e(t);return st(t)?r:oy(r,n(t))}function Ih(t){return ly(t,Ra,uy)}function zC(t){return ly(t,Yw,UC)}var Hu=Gr(Pn,"DataView"),Yu=Gr(Pn,"Promise"),Xu=Gr(Pn,"Set"),kh="[object Map]",qC="[object Object]",Oh="[object Promise]",Lh="[object Set]",xh="[object WeakMap]",Mh="[object DataView]",BC=Fr(Hu),WC=Fr(Zs),KC=Fr(Yu),VC=Fr(Xu),HC=Fr(Ku),jn=Xn;(Hu&&jn(new Hu(new ArrayBuffer(1)))!=Mh||Zs&&jn(new Zs)!=kh||Yu&&jn(Yu.resolve())!=Oh||Xu&&jn(new Xu)!=Lh||Ku&&jn(new Ku)!=xh)&&(jn=function(t){var e=Xn(t),n=e==qC?t.constructor:void 0,r=n?Fr(n):"";if(r)switch(r){case BC:return Mh;case WC:return kh;case KC:return Oh;case VC:return Lh;case HC:return xh}return e});var Dh=Pn.Uint8Array,YC="__lodash_hash_undefined__";function XC(t){return this.__data__.set(t,YC),this}function JC(t){return this.__data__.has(t)}function Fo(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new kn;++e<n;)this.add(t[e])}Fo.prototype.add=Fo.prototype.push=XC;Fo.prototype.has=JC;function fy(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function ZC(t,e){return t.has(e)}var QC=1,eN=2;function dy(t,e,n,r,i,s){var a=n&QC,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&eN?new Fo:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!fy(e,function(A,_){if(!ZC(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}function tN(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function nN(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var rN=1,iN=2,sN="[object Boolean]",aN="[object Date]",oN="[object Error]",cN="[object Map]",uN="[object Number]",lN="[object RegExp]",fN="[object Set]",dN="[object String]",hN="[object Symbol]",pN="[object ArrayBuffer]",mN="[object DataView]",Fh=Bn?Bn.prototype:void 0,au=Fh?Fh.valueOf:void 0;function gN(t,e,n,r,i,s,a){switch(n){case mN:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case pN:return!(t.byteLength!=e.byteLength||!s(new Dh(t),new Dh(e)));case sN:case aN:case uN:return Sc(+t,+e);case oN:return t.name==e.name&&t.message==e.message;case lN:case dN:return t==e+"";case cN:var o=tN;case fN:var c=r&rN;if(o||(o=nN),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=iN,a.set(t,e);var l=dy(o(t),o(e),r,i,s,a);return a.delete(t),l;case hN:if(au)return au.call(t)==au.call(e)}return!1}var yN=1,TN=Object.prototype,vN=TN.hasOwnProperty;function $N(t,e,n,r,i,s){var a=n&yN,o=Ih(t),c=o.length,u=Ih(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:vN.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var RN=1,Gh="[object Arguments]",jh="[object Array]",Za="[object Object]",EN=Object.prototype,Uh=EN.hasOwnProperty;function AN(t,e,n,r,i,s){var a=st(t),o=st(e),c=a?jh:jn(t),u=o?jh:jn(e);c=c==Gh?Za:c,u=u==Gh?Za:u;var l=c==Za,f=u==Za,d=c==u;if(d&&Vu(t)){if(!Vu(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new $n),a||iy(t)?dy(t,e,n,r,i,s):gN(t,e,c,n,r,i,s);if(!(n&RN)){var p=l&&Uh.call(t,"__wrapped__"),y=f&&Uh.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new $n),i(E,C,n,r,s)}}return d?(s||(s=new $n),$N(t,e,n,r,i,s)):!1}function rd(t,e,n,r,i){return t===e?!0:t==null||e==null||!Wn(t)&&!Wn(e)?t!==t&&e!==e:AN(t,e,n,r,rd,i)}var _N=1,SN=2;function bN(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new $n,f;if(!(f===void 0?rd(u,c,_N|SN,r,l):f))return!1}}return!0}function hy(t){return t===t&&!An(t)}function wN(t){for(var e=Ra(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,hy(i)]}return e}function py(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function CN(t){var e=wN(t);return e.length==1&&e[0][2]?py(e[0][0],e[0][1]):function(n){return n===t||bN(n,t,e)}}function NN(t,e){return t!=null&&e in Object(t)}function PN(t,e,n){e=Cc(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=Ea(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&Zf(i)&&_c(a,i)&&(st(t)||ey(t)))}function IN(t,e){return t!=null&&PN(t,e,NN)}var kN=1,ON=2;function LN(t,e){return ed(t)&&hy(e)?py(Ea(t),e):function(n){var r=NC(n,t);return r===void 0&&r===e?IN(n,t):rd(e,r,kN|ON)}}function xN(t){return function(e){return e==null?void 0:e[t]}}function MN(t){return function(e){return nd(e,t)}}function DN(t){return ed(t)?xN(Ea(t)):MN(t)}function Nc(t){return typeof t=="function"?t:t==null?Ac:typeof t=="object"?st(t)?LN(t[0],t[1]):CN(t):DN(t)}function FN(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var GN=FN();function jN(t,e){return t&&GN(t,e,Ra)}function UN(t,e){return function(n,r){if(n==null)return n;if(!jr(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Pc=UN(jN);function zN(t){return typeof t=="function"?t:Ac}function qN(t,e){var n=st(t)?zb:Pc;return n(t,zN(e))}function BN(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 WN(t,e){var n=!0;return Pc(t,function(r,i,s){return n=!!e(r,i,s),n}),n}function KN(t,e,n){var r=st(t)?BN:WN;return r(t,Nc(e))}function VN(t,e){var n=-1,r=jr(t)?Array(t.length):[];return Pc(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function my(t,e){var n=st(t)?Ec:VN;return n(t,Nc(e))}var HN="[object String]";function Go(t){return typeof t=="string"||!st(t)&&Wn(t)&&Xn(t)==HN}function YN(t,e){return Ec(e,function(n){return t[n]})}function XN(t){return t==null?[]:YN(t,Ra(t))}var JN=Math.max;function ZN(t,e,n,r){t=jr(t)?t:XN(t),n=n?yb(n):0;var i=t.length;return n<0&&(n=JN(i+n,0)),Go(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&Kb(t,e,n)>-1}var QN="[object RegExp]";function eP(t){return Wn(t)&&Xn(t)==QN}var zh=Do&&Do.isRegExp,tP=zh?ny(zh):eP;function nP(t,e,n,r){if(!An(t))return t;e=Cc(e,t);for(var i=-1,s=e.length,a=s-1,o=t;o!=null&&++i<s;){var c=Ea(e[i]),u=n;if(c==="__proto__"||c==="constructor"||c==="prototype")return t;if(i!=a){var l=o[c];u=void 0,u===void 0&&(u=An(l)?l:_c(e[i+1])?[]:{})}Jf(o,c,u),o=o[c]}return t}function rP(t,e,n){for(var r=-1,i=e.length,s={};++r<i;){var a=e[r],o=nd(t,a);n(o,a)&&nP(s,Cc(a,t),o)}return s}function Xt(t,e){if(t==null)return{};var n=Ec(zC(t),function(r){return[r]});return e=Nc(e),rP(t,n,function(r,i){return e(r,i[0])})}function iP(t,e){var n;return Pc(t,function(r,i,s){return n=e(r,i,s),!n}),!!n}function sP(t,e,n){var r=st(t)?fy:iP;return r(t,Nc(e))}function aP(t){return oP(t)?t.LABEL:t.name}function oP(t){return Go(t.LABEL)&&t.LABEL!==""}class Jt{get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(e){e.visit(this),qN(this.definition,n=>{n.accept(e)})}}class tt extends Jt{constructor(e){super([]),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}set definition(e){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(e){e.visit(this)}}class Bi extends Jt{constructor(e){super(e.definition),this.orgText="",Yt(this,Xt(e,n=>n!==void 0))}}class at extends Jt{constructor(e){super(e.definition),this.ignoreAmbiguities=!1,Yt(this,Xt(e,n=>n!==void 0))}}let Ve=class extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}};class gt extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class yt extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class we extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class ct extends Jt{constructor(e){super(e.definition),this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}}class ut extends Jt{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,Yt(this,Xt(e,n=>n!==void 0))}}class me{constructor(e){this.idx=1,Yt(this,Xt(e,n=>n!==void 0))}accept(e){e.visit(this)}}function cP(t){return my(t,$o)}function $o(t){function e(n){return my(n,$o)}if(t instanceof tt){const n={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx};return Go(t.label)&&(n.label=t.label),n}else{if(t instanceof at)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Ve)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof gt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof yt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:$o(new me({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof ct)return{type:"RepetitionWithSeparator",idx:t.idx,separator:$o(new me({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof we)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof ut)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof me){const n={type:"Terminal",name:t.terminalType.name,label:aP(t.terminalType),idx:t.idx};Go(t.label)&&(n.terminalLabel=t.label);const r=t.terminalType.PATTERN;return t.terminalType.PATTERN&&(n.pattern=tP(r)?r.source:r),n}else{if(t instanceof Bi)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}}}class Wi{visit(e){const n=e;switch(n.constructor){case tt:return this.visitNonTerminal(n);case at:return this.visitAlternative(n);case Ve:return this.visitOption(n);case gt:return this.visitRepetitionMandatory(n);case yt:return this.visitRepetitionMandatoryWithSeparator(n);case ct:return this.visitRepetitionWithSeparator(n);case we:return this.visitRepetition(n);case ut:return this.visitAlternation(n);case me:return this.visitTerminal(n);case Bi: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 uP(t){return t instanceof at||t instanceof Ve||t instanceof we||t instanceof gt||t instanceof yt||t instanceof ct||t instanceof me||t instanceof Bi}function jo(t,e=[]){return t instanceof Ve||t instanceof we||t instanceof ct?!0:t instanceof ut?sP(t.definition,r=>jo(r,e)):t instanceof tt&&ZN(e,t)?!1:t instanceof Jt?(t instanceof tt&&e.push(t),KN(t.definition,r=>jo(r,e))):!1}function lP(t){return t instanceof ut}function jt(t){if(t instanceof tt)return"SUBRULE";if(t instanceof Ve)return"OPTION";if(t instanceof ut)return"OR";if(t instanceof gt)return"AT_LEAST_ONE";if(t instanceof yt)return"AT_LEAST_ONE_SEP";if(t instanceof ct)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof me)return"CONSUME";throw Error("non exhaustive match")}class Ic{walk(e,n=[]){K(e.definition,(r,i)=>{const s=Be(e.definition,i+1);if(r instanceof tt)this.walkProdRef(r,s,n);else if(r instanceof me)this.walkTerminal(r,s,n);else if(r instanceof at)this.walkFlat(r,s,n);else if(r instanceof Ve)this.walkOption(r,s,n);else if(r instanceof gt)this.walkAtLeastOne(r,s,n);else if(r instanceof yt)this.walkAtLeastOneSep(r,s,n);else if(r instanceof ct)this.walkManySep(r,s,n);else if(r instanceof we)this.walkMany(r,s,n);else if(r instanceof ut)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 Ve({definition:e.definition})].concat(n,r);this.walk(e,i)}walkAtLeastOneSep(e,n,r){const i=qh(e,n,r);this.walk(e,i)}walkMany(e,n,r){const i=[new Ve({definition:e.definition})].concat(n,r);this.walk(e,i)}walkManySep(e,n,r){const i=qh(e,n,r);this.walk(e,i)}walkOr(e,n,r){const i=n.concat(r);K(e.definition,s=>{const a=new at({definition:[s]});this.walk(a,i)})}}function qh(t,e,n){return[new Ve({definition:[new me({terminalType:t.separator})].concat(t.definition)})].concat(e,n)}function Aa(t){if(t instanceof tt)return Aa(t.referencedRule);if(t instanceof me)return hP(t);if(uP(t))return fP(t);if(lP(t))return dP(t);throw Error("non exhaustive match")}function fP(t){let e=[];const n=t.definition;let r=0,i=n.length>r,s,a=!0;for(;i&&a;)s=n[r],a=jo(s),e=e.concat(Aa(s)),r=r+1,i=n.length>r;return Xf(e)}function dP(t){const e=j(t.definition,n=>Aa(n));return Xf(It(e))}function hP(t){return[t.terminalType]}const gy="_~IN~_";class pP extends Ic{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=gP(e.referencedRule,e.idx)+this.topProd.name,s=n.concat(r),a=new at({definition:s}),o=Aa(a);this.follows[i]=o}}function mP(t){const e={};return K(t,n=>{const r=new pP(n).startWalking();Uu(e,r)}),e}function gP(t,e){return t.name+e+gy}let Ro={};const yP=new ag;function kc(t){const e=t.toString();if(Ro.hasOwnProperty(e))return Ro[e];{const n=yP.pattern(e);return Ro[e]=n,n}}function TP(){Ro={}}const yy="Complement Sets are not supported for first char optimization",Uo=`Unable to use "first char" lexer optimizations:
13
13
  `;function vP(t,e=!1){try{const n=kc(t);return Ju(n.value,{},n.flags.ignoreCase)}catch(n){if(n.message===yy)e&&Wg(`${Uo} Unable to optimize: < ${t.toString()} >
14
14
  Complement Sets cannot be automatically optimized.
15
15
  This will disable the lexer's first char optimizations.
@@ -19,10 +19,10 @@ var fv=Object.defineProperty;var dv=(t,e,n)=>e in t?fv(t,e,{enumerable:!0,config
19
19
  Failed parsing: < ${t.toString()} >
20
20
  Using the @chevrotain/regexp-to-ast library
21
21
  Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+r)}}return[]}function Ju(t,e,n){switch(t.type){case"Disjunction":for(let i=0;i<t.value.length;i++)Ju(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":Qa(a.value,e,n);break;case"Set":if(a.complement===!0)throw Error(yy);K(a.value,c=>{if(typeof c=="number")Qa(c,e,n);else{const u=c;if(n===!0)for(let l=u.from;l<=u.to;l++)Qa(l,e,n);else{for(let l=u.from;l<=u.to&&l<Ds;l++)Qa(l,e,n);if(u.to>=Ds){const l=u.from>=Ds?u.from:Ds,f=u.to,d=Kn(l),p=Kn(f);for(let y=d;y<=p;y++)e[y]=y}}}});break;case"Group":Ju(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"&&Zu(a)===!1||a.type!=="Group"&&o===!1)break}break;default:throw Error("non exhaustive match!")}return De(e)}function Qa(t,e,n){const r=Kn(t);e[r]=r,n===!0&&$P(t,e)}function $P(t,e){const n=String.fromCharCode(t),r=n.toUpperCase();if(r!==n){const i=Kn(r.charCodeAt(0));e[i]=i}else{const i=n.toLowerCase();if(i!==n){const s=Kn(i.charCodeAt(0));e[s]=s}}}function Bh(t,e){return Mi(t.value,n=>{if(typeof n=="number")return ot(e,n);{const r=n;return Mi(e,i=>r.from<=i&&i<=r.to)!==void 0}})}function Zu(t){const e=t.quantifier;return e&&e.atLeast===0?!0:t.value?Q(t.value)?qt(t.value,Zu):Zu(t.value):!1}class RP extends oc{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){ot(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?Bh(e,this.targetCharCodes)===void 0&&(this.found=!0):Bh(e,this.targetCharCodes)!==void 0&&(this.found=!0)}}function id(t,e){if(e instanceof RegExp){const n=kc(e),r=new RP(t);return r.visit(n),r.found}else return Mi(e,n=>ot(t,n.charCodeAt(0)))!==void 0}const Ir="PATTERN",Ms="defaultMode",eo="modes";function EP(t,e){e=Yf(e,{debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
22
- `],tracer:(_,b)=>b()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{KP()});let r;n("Reject Lexer.NA",()=>{r=$c(t,_=>_[Ir]===it.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=j(r,_=>{const b=_[Ir];if(qn(b)){const I=b.source;return I.length===1&&I!=="^"&&I!=="$"&&I!=="."&&!b.ignoreCase?I:I.length===2&&I[0]==="\\"&&!ot(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],I[1])?I[1]:Wh(b)}else{if(wn(b))return i=!0,{exec:b};if(typeof b=="object")return i=!0,b;if(typeof b=="string"){if(b.length===1)return b;{const I=b.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),U=new RegExp(I);return Wh(U)}}else throw Error("non exhaustive match")}})});let a,o,c,u,l;n("misc mapping",()=>{a=j(r,_=>_.tokenTypeIdx),o=j(r,_=>{const b=_.GROUP;if(b!==it.SKIPPED){if(xt(b))return b;if(En(b))return!1;throw Error("non exhaustive match")}}),c=j(r,_=>{const b=_.LONGER_ALT;if(b)return Q(b)?j(b,U=>Th(r,U)):[Th(r,b)]}),u=j(r,_=>_.PUSH_MODE),l=j(r,_=>q(_,"POP_MODE"))});let f;n("Line Terminator Handling",()=>{const _=$y(e.lineTerminatorCharacters);f=j(r,b=>!1),e.positionTracking!=="onlyOffset"&&(f=j(r,b=>q(b,"LINE_BREAKS")?!!b.LINE_BREAKS:vy(b,_)===!1&&id(_,b.PATTERN)))});let d,p,y,E;n("Misc Mapping #2",()=>{d=j(r,Ty),p=j(s,qP),y=mt(r,(_,b)=>{const I=b.GROUP;return xt(I)&&I!==it.SKIPPED&&(_[I]=[]),_},{}),E=j(s,(_,b)=>({pattern:s[b],longerAlt:c[b],canLineTerminator:f[b],isCustom:d[b],short:p[b],group:o[b],push:u[b],pop:l[b],tokenTypeIdx:a[b],tokenType:r[b]}))});let C=!0,A=[];return e.safeMode||n("First Char Optimization",()=>{A=mt(r,(_,b,I)=>{if(typeof b.PATTERN=="string"){const U=b.PATTERN.charCodeAt(0),V=Kn(U);ou(_,V,E[I])}else if(Q(b.START_CHARS_HINT)){let U;K(b.START_CHARS_HINT,V=>{const J=typeof V=="string"?V.charCodeAt(0):V,oe=Kn(J);U!==oe&&(U=oe,ou(_,oe,E[I]))})}else if(qn(b.PATTERN))if(b.PATTERN.unicode)C=!1,e.ensureOptimizations&&Wu(`${Uo} Unable to analyze < ${b.PATTERN.toString()} > pattern.
22
+ `],tracer:(_,b)=>b()});const n=e.tracer;n("initCharCodeToOptimizedIndexMap",()=>{KP()});let r;n("Reject Lexer.NA",()=>{r=$c(t,_=>_[Ir]===it.NA)});let i=!1,s;n("Transform Patterns",()=>{i=!1,s=j(r,_=>{const b=_[Ir];if(qn(b)){const I=b.source;return I.length===1&&I!=="^"&&I!=="$"&&I!=="."&&!b.ignoreCase?I:I.length===2&&I[0]==="\\"&&!ot(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],I[1])?I[1]:Wh(b)}else{if(wn(b))return i=!0,{exec:b};if(typeof b=="object")return i=!0,b;if(typeof b=="string"){if(b.length===1)return b;{const I=b.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),U=new RegExp(I);return Wh(U)}}else throw Error("non exhaustive match")}})});let a,o,c,u,l;n("misc mapping",()=>{a=j(r,_=>_.tokenTypeIdx),o=j(r,_=>{const b=_.GROUP;if(b!==it.SKIPPED){if(xt(b))return b;if(En(b))return!1;throw Error("non exhaustive match")}}),c=j(r,_=>{const b=_.LONGER_ALT;if(b)return Q(b)?j(b,U=>Th(r,U)):[Th(r,b)]}),u=j(r,_=>_.PUSH_MODE),l=j(r,_=>q(_,"POP_MODE"))});let f;n("Line Terminator Handling",()=>{const _=$y(e.lineTerminatorCharacters);f=j(r,b=>!1),e.positionTracking!=="onlyOffset"&&(f=j(r,b=>q(b,"LINE_BREAKS")?!!b.LINE_BREAKS:vy(b,_)===!1&&id(_,b.PATTERN)))});let d,p,y,E;n("Misc Mapping #2",()=>{d=j(r,Ty),p=j(s,qP),y=mt(r,(_,b)=>{const I=b.GROUP;return xt(I)&&I!==it.SKIPPED&&(_[I]=[]),_},{}),E=j(s,(_,b)=>({pattern:s[b],longerAlt:c[b],canLineTerminator:f[b],isCustom:d[b],short:p[b],group:o[b],push:u[b],pop:l[b],tokenTypeIdx:a[b],tokenType:r[b]}))});let C=!0,A=[];return e.safeMode||n("First Char Optimization",()=>{A=mt(r,(_,b,I)=>{if(typeof b.PATTERN=="string"){const U=b.PATTERN.charCodeAt(0),H=Kn(U);ou(_,H,E[I])}else if(Q(b.START_CHARS_HINT)){let U;K(b.START_CHARS_HINT,H=>{const J=typeof H=="string"?H.charCodeAt(0):H,oe=Kn(J);U!==oe&&(U=oe,ou(_,oe,E[I]))})}else if(qn(b.PATTERN))if(b.PATTERN.unicode)C=!1,e.ensureOptimizations&&Wu(`${Uo} Unable to analyze < ${b.PATTERN.toString()} > pattern.
23
23
  The regexp unicode flag is not currently supported by the regexp-to-ast library.
24
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 U=vP(b.PATTERN,e.ensureOptimizations);le(U)&&(C=!1),K(U,V=>{ou(_,V,E[I])})}else e.ensureOptimizations&&Wu(`${Uo} TokenType: <${b.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
25
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{const U=vP(b.PATTERN,e.ensureOptimizations);le(U)&&(C=!1),K(U,H=>{ou(_,H,E[I])})}else e.ensureOptimizations&&Wu(`${Uo} TokenType: <${b.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
26
26
  This will disable the lexer's first char optimizations.
27
27
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),C=!1;return _},[])}),{emptyGroups:y,patternIdxToConfig:E,charCodeToPatternIdxToConfig:A,hasCustom:i,canBeOptimized:C}}function AP(t,e){let n=[];const r=SP(t);n=n.concat(r.errors);const i=bP(r.valid),s=i.valid;return n=n.concat(i.errors),n=n.concat(_P(s)),n=n.concat(LP(s)),n=n.concat(xP(s,e)),n=n.concat(MP(s)),n}function _P(t){let e=[];const n=_t(t,r=>qn(r[Ir]));return e=e.concat(CP(n)),e=e.concat(IP(n)),e=e.concat(kP(n)),e=e.concat(OP(n)),e=e.concat(NP(n)),e}function SP(t){const e=_t(t,i=>!q(i,Ir)),n=j(e,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Ce.MISSING_PATTERN,tokenTypes:[i]})),r=vc(t,e);return{errors:n,valid:r}}function bP(t){const e=_t(t,i=>{const s=i[Ir];return!qn(s)&&!wn(s)&&!q(s,"exec")&&!xt(s)}),n=j(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:Ce.INVALID_PATTERN,tokenTypes:[i]})),r=vc(t,e);return{errors:n,valid:r}}const wP=/[^\\][$]/;function CP(t){class e extends oc{constructor(){super(...arguments),this.found=!1}visitEndAnchor(s){this.found=!0}}const n=_t(t,i=>{const s=i.PATTERN;try{const a=kc(s),o=new e;return o.visit(a),o.found}catch{return wP.test(s.source)}});return j(n,i=>({message:`Unexpected RegExp Anchor Error:
28
28
  Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
@@ -44,17 +44,17 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;e.
44
44
  Root cause: ${e.errMsg}.
45
45
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Ce.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
46
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 $y(t){return j(t,n=>xt(n)?n.charCodeAt(0):n)}function ou(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const Ds=256;let Eo=[];function Kn(t){return t<Ds?t:Eo[t]}function KP(){if(le(Eo)){Eo=new Array(65536);for(let t=0;t<65536;t++)Eo[t]=t>255?255+~~(t/255):t}}function _a(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[n]===!0}function zo(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let Kh=1;const Ry={};function Sa(t){const e=HP(t);VP(e),XP(e),YP(e),K(e,n=>{n.isParent=n.categoryMatches.length>0})}function HP(t){let e=Ve(t),n=t,r=!0;for(;r;){n=$a(It(j(n,s=>s.CATEGORIES)));const i=vc(n,e);e=e.concat(i),le(i)?r=!1:n=i}return e}function VP(t){K(t,e=>{Ay(e)||(Ry[Kh]=e,e.tokenTypeIdx=Kh++),Hh(e)&&!Q(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Hh(e)||(e.CATEGORIES=[]),JP(e)||(e.categoryMatches=[]),ZP(e)||(e.categoryMatchesMap={})})}function YP(t){K(t,e=>{e.categoryMatches=[],K(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(Ry[r].tokenTypeIdx)})})}function XP(t){K(t,e=>{Ey([],e)})}function Ey(t,e){K(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),K(e.CATEGORIES,n=>{const r=t.concat(e);ot(r,n)||Ey(r,n)})}function Ay(t){return q(t,"tokenTypeIdx")}function Hh(t){return q(t,"CATEGORIES")}function JP(t){return q(t,"categoryMatches")}function ZP(t){return q(t,"categoryMatchesMap")}function QP(t){return q(t,"tokenTypeIdx")}const Qu={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 Ce;(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"})(Ce||(Ce={}));const Fs={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
47
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function $y(t){return j(t,n=>xt(n)?n.charCodeAt(0):n)}function ou(t,e,n){t[e]===void 0?t[e]=[n]:t[e].push(n)}const Ds=256;let Eo=[];function Kn(t){return t<Ds?t:Eo[t]}function KP(){if(le(Eo)){Eo=new Array(65536);for(let t=0;t<65536;t++)Eo[t]=t>255?255+~~(t/255):t}}function _a(t,e){const n=t.tokenTypeIdx;return n===e.tokenTypeIdx?!0:e.isParent===!0&&e.categoryMatchesMap[n]===!0}function zo(t,e){return t.tokenTypeIdx===e.tokenTypeIdx}let Kh=1;const Ry={};function Sa(t){const e=VP(t);HP(e),XP(e),YP(e),K(e,n=>{n.isParent=n.categoryMatches.length>0})}function VP(t){let e=He(t),n=t,r=!0;for(;r;){n=$a(It(j(n,s=>s.CATEGORIES)));const i=vc(n,e);e=e.concat(i),le(i)?r=!1:n=i}return e}function HP(t){K(t,e=>{Ay(e)||(Ry[Kh]=e,e.tokenTypeIdx=Kh++),Vh(e)&&!Q(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Vh(e)||(e.CATEGORIES=[]),JP(e)||(e.categoryMatches=[]),ZP(e)||(e.categoryMatchesMap={})})}function YP(t){K(t,e=>{e.categoryMatches=[],K(e.categoryMatchesMap,(n,r)=>{e.categoryMatches.push(Ry[r].tokenTypeIdx)})})}function XP(t){K(t,e=>{Ey([],e)})}function Ey(t,e){K(t,n=>{e.categoryMatchesMap[n.tokenTypeIdx]=!0}),K(e.CATEGORIES,n=>{const r=t.concat(e);ot(r,n)||Ey(r,n)})}function Ay(t){return q(t,"tokenTypeIdx")}function Vh(t){return q(t,"CATEGORIES")}function JP(t){return q(t,"categoryMatches")}function ZP(t){return q(t,"categoryMatchesMap")}function QP(t){return q(t,"tokenTypeIdx")}const Qu={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 Ce;(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"})(Ce||(Ce={}));const Fs={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
48
48
  `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Qu,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Fs);class it{constructor(e,n=Fs){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}=Kg(s),u=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${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
49
  a boolean 2nd argument is no longer supported`);this.config=Uu({},Fs,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===Fs.lineTerminatorsPattern)this.config.lineTerminatorsPattern=BP;else if(this.config.lineTerminatorCharacters===Fs.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),Q(e)?i={modes:{defaultMode:Ve(e)},defaultMode:Ms}:(s=!1,i=Ve(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jP(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(UP(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},K(i.modes,(o,c)=>{i.modes[c]=$c(o,u=>En(u))});const a=At(i.modes);if(K(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(AP(o,a))}),le(this.lexerDefinitionErrors)){Sa(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=EP(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:n.positionTracking,ensureOptimizations:n.ensureOptimizations,safeMode:n.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Uu({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!le(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const c=j(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
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),Q(e)?i={modes:{defaultMode:He(e)},defaultMode:Ms}:(s=!1,i=He(e))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(jP(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(UP(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},K(i.modes,(o,c)=>{i.modes[c]=$c(o,u=>En(u))});const a=At(i.modes);if(K(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(AP(o,a))}),le(this.lexerDefinitionErrors)){Sa(o);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=EP(o,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:n.positionTracking,ensureOptimizations:n.ensureOptimizations,safeMode:n.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Uu({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=u.canBeOptimized}})}),this.defaultMode=i.defaultMode,!le(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){const c=j(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
51
51
  `);throw new Error(`Errors detected in definition of Lexer:
52
52
  `+c)}K(this.lexerDefinitionWarning,o=>{Wg(o.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(s&&(this.handleModes=Fe),this.trackStartLines===!1&&(this.computeNewColumn=ma),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=Fe),/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=mt(this.canModeBeOptimized,(c,u,l)=>(u===!1&&c.push(l),c),[]);if(n.ensureOptimizations&&!le(o))throw Error(`Lexer Modes: < ${o.join(", ")} > cannot be optimized.
53
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",()=>{TP()}),this.TRACE_INIT("toFastProperties",()=>{Hg(this)})})}tokenize(e,n=this.defaultMode){if(!le(this.lexerDefinitionErrors)){const i=j(this.lexerDefinitionErrors,s=>s.message).join(`-----------------------
54
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{TP()}),this.TRACE_INIT("toFastProperties",()=>{Vg(this)})})}tokenize(e,n=this.defaultMode){if(!le(this.lexerDefinitionErrors)){const i=j(this.lexerDefinitionErrors,s=>s.message).join(`-----------------------
55
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,u,l,f,d,p,y,E,C,A;const _=e,b=_.length;let I=0,U=0;const V=this.hasCustom?0:Math.floor(e.length/10),J=new Array(V),oe=[];let ge=this.trackStartLines?1:void 0,ye=this.trackStartLines?1:void 0;const P=zP(this.emptyGroups),$=this.trackStartLines,g=this.config.lineTerminatorsPattern;let w=0,T=[],v=[];const S=[],L=[];Object.freeze(L);let M=!1;const x=B=>{if(S.length===1&&B.tokenType.PUSH_MODE===void 0){const re=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(B);oe.push({offset:B.startOffset,line:B.startLine,column:B.startColumn,length:B.image.length,message:re})}else{S.pop();const re=Nr(S);T=this.patternIdxToConfig[re],v=this.charCodeToPatternIdxToConfig[re],w=T.length;const je=this.canModeBeOptimized[re]&&this.config.safeMode===!1;v&&je?M=!0:M=!1}};function z(B){S.push(B),v=this.charCodeToPatternIdxToConfig[B],T=this.patternIdxToConfig[B],w=T.length,w=T.length;const re=this.canModeBeOptimized[B]&&this.config.safeMode===!1;v&&re?M=!0:M=!1}z.call(this,n);let F;const se=this.config.recoveryEnabled;for(;I<b;){c=null,f=-1;const B=_.charCodeAt(I);let re;if(M){const Se=Kn(B),Te=v[Se];re=Te!==void 0?Te:L}else re=T;const je=re.length;for(r=0;r<je;r++){F=re[r];const Se=F.pattern;u=null;const Te=F.short;if(Te!==!1?B===Te&&(f=1,c=Se):F.isCustom===!0?(A=Se.exec(_,I,J,P),A!==null?(c=A[0],f=c.length,A.payload!==void 0&&(u=A.payload)):c=null):(Se.lastIndex=I,f=this.matchLength(Se,e,I)),f!==-1){if(o=F.longerAlt,o!==void 0){c=e.substring(I,I+f);const xe=o.length;for(s=0;s<xe;s++){const Ue=T[o[s]],Oe=Ue.pattern;if(l=null,Ue.isCustom===!0?(A=Oe.exec(_,I,J,P),A!==null?(a=A[0],A.payload!==void 0&&(l=A.payload)):a=null):(Oe.lastIndex=I,a=this.match(Oe,e,I)),a&&a.length>c.length){c=a,f=a.length,u=l,F=Ue;break}}}break}}if(f!==-1){if(d=F.group,d!==void 0&&(c=c!==null?c:e.substring(I,I+f),p=F.tokenTypeIdx,y=this.createTokenInstance(c,I,p,F.tokenType,ge,ye,f),this.handlePayload(y,u),d===!1?U=this.addToken(J,U,y):P[d].push(y)),$===!0&&F.canLineTerminator===!0){let Se=0,Te,xe;g.lastIndex=0;do c=c!==null?c:e.substring(I,I+f),Te=g.test(c),Te===!0&&(xe=g.lastIndex-1,Se++);while(Te===!0);Se!==0?(ge=ge+Se,ye=f-xe,this.updateTokenEndLineColumnLocation(y,d,xe,Se,ge,ye,f)):ye=this.computeNewColumn(ye,f)}else ye=this.computeNewColumn(ye,f);I=I+f,this.handleModes(F,x,z,y)}else{const Se=I,Te=ge,xe=ye;let Ue=se===!1;for(;Ue===!1&&I<b;)for(I++,i=0;i<w;i++){const Oe=T[i],ee=Oe.pattern,lt=Oe.short;if(lt!==!1?_.charCodeAt(I)===lt&&(Ue=!0):Oe.isCustom===!0?Ue=ee.exec(_,I,J,P)!==null:(ee.lastIndex=I,Ue=ee.exec(e)!==null),Ue===!0)break}if(E=I-Se,ye=this.computeNewColumn(ye,E),C=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_,Se,E,Te,xe,Nr(S)),oe.push({offset:Se,line:Te,column:xe,length:E,message:C}),se===!1)break}}return this.hasCustom||(J.length=U),{tokens:J,groups:P,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,u;n!==void 0&&(c=r===o-1,u=c?-1:0,i===1&&c===!0||(e.endLine=s+u,e.endColumn=a-1+-u))}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}}it.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.";it.NA=/NOT_APPLICABLE/;function gi(t){return _y(t)?t.LABEL:t.name}function _y(t){return xt(t.LABEL)&&t.LABEL!==""}const eI="parent",Vh="categories",Yh="label",Xh="group",Jh="push_mode",Zh="pop_mode",Qh="longer_alt",ep="line_breaks",tp="start_chars_hint";function Sy(t){return tI(t)}function tI(t){const e=t.pattern,n={};if(n.name=t.name,En(e)||(n.PATTERN=e),q(t,eI))throw`The parent property is no longer supported.
57
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return q(t,Vh)&&(n.CATEGORIES=t[Vh]),Sa([n]),q(t,Yh)&&(n.LABEL=t[Yh]),q(t,Xh)&&(n.GROUP=t[Xh]),q(t,Zh)&&(n.POP_MODE=t[Zh]),q(t,Jh)&&(n.PUSH_MODE=t[Jh]),q(t,Qh)&&(n.LONGER_ALT=t[Qh]),q(t,ep)&&(n.LINE_BREAKS=t[ep]),q(t,tp)&&(n.START_CHARS_HINT=t[tp]),n}const Hn=Sy({name:"EOF",pattern:it.NA});Sa([Hn]);function sd(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 by(t,e){return _a(t,e)}const hi={buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:r}){return`Expecting ${_y(t)?`--> ${gi(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=`
56
+ `+i)}return this.tokenizeInternal(e,n)}tokenizeInternal(e,n){let r,i,s,a,o,c,u,l,f,d,p,y,E,C,A;const _=e,b=_.length;let I=0,U=0;const H=this.hasCustom?0:Math.floor(e.length/10),J=new Array(H),oe=[];let ge=this.trackStartLines?1:void 0,ye=this.trackStartLines?1:void 0;const P=zP(this.emptyGroups),$=this.trackStartLines,g=this.config.lineTerminatorsPattern;let w=0,T=[],v=[];const S=[],L=[];Object.freeze(L);let M=!1;const x=B=>{if(S.length===1&&B.tokenType.PUSH_MODE===void 0){const re=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(B);oe.push({offset:B.startOffset,line:B.startLine,column:B.startColumn,length:B.image.length,message:re})}else{S.pop();const re=Nr(S);T=this.patternIdxToConfig[re],v=this.charCodeToPatternIdxToConfig[re],w=T.length;const je=this.canModeBeOptimized[re]&&this.config.safeMode===!1;v&&je?M=!0:M=!1}};function z(B){S.push(B),v=this.charCodeToPatternIdxToConfig[B],T=this.patternIdxToConfig[B],w=T.length,w=T.length;const re=this.canModeBeOptimized[B]&&this.config.safeMode===!1;v&&re?M=!0:M=!1}z.call(this,n);let F;const se=this.config.recoveryEnabled;for(;I<b;){c=null,f=-1;const B=_.charCodeAt(I);let re;if(M){const Se=Kn(B),Te=v[Se];re=Te!==void 0?Te:L}else re=T;const je=re.length;for(r=0;r<je;r++){F=re[r];const Se=F.pattern;u=null;const Te=F.short;if(Te!==!1?B===Te&&(f=1,c=Se):F.isCustom===!0?(A=Se.exec(_,I,J,P),A!==null?(c=A[0],f=c.length,A.payload!==void 0&&(u=A.payload)):c=null):(Se.lastIndex=I,f=this.matchLength(Se,e,I)),f!==-1){if(o=F.longerAlt,o!==void 0){c=e.substring(I,I+f);const xe=o.length;for(s=0;s<xe;s++){const Ue=T[o[s]],Oe=Ue.pattern;if(l=null,Ue.isCustom===!0?(A=Oe.exec(_,I,J,P),A!==null?(a=A[0],A.payload!==void 0&&(l=A.payload)):a=null):(Oe.lastIndex=I,a=this.match(Oe,e,I)),a&&a.length>c.length){c=a,f=a.length,u=l,F=Ue;break}}}break}}if(f!==-1){if(d=F.group,d!==void 0&&(c=c!==null?c:e.substring(I,I+f),p=F.tokenTypeIdx,y=this.createTokenInstance(c,I,p,F.tokenType,ge,ye,f),this.handlePayload(y,u),d===!1?U=this.addToken(J,U,y):P[d].push(y)),$===!0&&F.canLineTerminator===!0){let Se=0,Te,xe;g.lastIndex=0;do c=c!==null?c:e.substring(I,I+f),Te=g.test(c),Te===!0&&(xe=g.lastIndex-1,Se++);while(Te===!0);Se!==0?(ge=ge+Se,ye=f-xe,this.updateTokenEndLineColumnLocation(y,d,xe,Se,ge,ye,f)):ye=this.computeNewColumn(ye,f)}else ye=this.computeNewColumn(ye,f);I=I+f,this.handleModes(F,x,z,y)}else{const Se=I,Te=ge,xe=ye;let Ue=se===!1;for(;Ue===!1&&I<b;)for(I++,i=0;i<w;i++){const Oe=T[i],ee=Oe.pattern,lt=Oe.short;if(lt!==!1?_.charCodeAt(I)===lt&&(Ue=!0):Oe.isCustom===!0?Ue=ee.exec(_,I,J,P)!==null:(ee.lastIndex=I,Ue=ee.exec(e)!==null),Ue===!0)break}if(E=I-Se,ye=this.computeNewColumn(ye,E),C=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_,Se,E,Te,xe,Nr(S)),oe.push({offset:Se,line:Te,column:xe,length:E,message:C}),se===!1)break}}return this.hasCustom||(J.length=U),{tokens:J,groups:P,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,u;n!==void 0&&(c=r===o-1,u=c?-1:0,i===1&&c===!0||(e.endLine=s+u,e.endColumn=a-1+-u))}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}}it.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.";it.NA=/NOT_APPLICABLE/;function gi(t){return _y(t)?t.LABEL:t.name}function _y(t){return xt(t.LABEL)&&t.LABEL!==""}const eI="parent",Hh="categories",Yh="label",Xh="group",Jh="push_mode",Zh="pop_mode",Qh="longer_alt",ep="line_breaks",tp="start_chars_hint";function Sy(t){return tI(t)}function tI(t){const e=t.pattern,n={};if(n.name=t.name,En(e)||(n.PATTERN=e),q(t,eI))throw`The parent property is no longer supported.
57
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return q(t,Hh)&&(n.CATEGORIES=t[Hh]),Sa([n]),q(t,Yh)&&(n.LABEL=t[Yh]),q(t,Xh)&&(n.GROUP=t[Xh]),q(t,Zh)&&(n.POP_MODE=t[Zh]),q(t,Jh)&&(n.PUSH_MODE=t[Jh]),q(t,Qh)&&(n.LONGER_ALT=t[Qh]),q(t,ep)&&(n.LINE_BREAKS=t[ep]),q(t,tp)&&(n.START_CHARS_HINT=t[tp]),n}const Vn=Sy({name:"EOF",pattern:it.NA});Sa([Vn]);function sd(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 by(t,e){return _a(t,e)}const hi={buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:r}){return`Expecting ${_y(t)?`--> ${gi(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
58
  but found: '`+Lt(e).image+"'";if(r)return s+r+o;{const c=mt(t,(d,p)=>d.concat(p),[]),u=j(c,d=>`[${j(d,p=>gi(p)).join(", ")}]`),f=`one of these possible Token sequences:
59
59
  ${j(u,(d,p)=>` ${p+1}. ${d}`).join(`
60
60
  `)}`;return s+f+o}},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:n,ruleName:r}){const i="Expecting: ",a=`
@@ -86,44 +86,44 @@ rule: <${e}> can be invoked from itself (directly or indirectly)
86
86
  without consuming any Tokens. The grammar path that causes this is:
87
87
  ${r}
88
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 Bi?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function rI(t,e){const n=new iI(t,e);return n.resolveRefs(),n.errors}class iI extends Wi{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){K(De(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:nt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class sI extends Ic{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=Ve(this.path.ruleStack).reverse(),this.occurrenceStack=Ve(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(){le(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class aI extends sI{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 at({definition:i});this.possibleTokTypes=Aa(s),this.found=!0}}}class Oc extends Ic{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 oI extends Oc{walkMany(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class np extends Oc{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class cI extends Oc{walkAtLeastOne(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class rp extends Oc{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function el(t,e,n=[]){n=Ve(n);let r=[],i=0;function s(o){return o.concat(Be(t,i+1))}function a(o){const c=el(s(o),e,n);return r.concat(c)}for(;n.length<e&&i<t.length;){const o=t[i];if(o instanceof at)return a(o.definition);if(o instanceof tt)return a(o.definition);if(o instanceof He)r=a(o.definition);else if(o instanceof gt){const c=o.definition.concat([new we({definition:o.definition})]);return a(c)}else if(o instanceof yt){const c=[new at({definition:o.definition}),new we({definition:[new me({terminalType:o.separator})].concat(o.definition)})];return a(c)}else if(o instanceof ct){const c=o.definition.concat([new we({definition:[new me({terminalType:o.separator})].concat(o.definition)})]);r=a(c)}else if(o instanceof we){const c=o.definition.concat([new we({definition:o.definition})]);r=a(c)}else{if(o instanceof ut)return K(o.definition,c=>{le(c.definition)===!1&&(r=a(c.definition))}),r;if(o instanceof me)n.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:Be(t,i)}),r}function wy(t,e,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=e.length,u=c-r-1,l=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!le(f);){const d=f.pop();if(d===a){o&&Nr(f).idx<=u&&f.pop();continue}const p=d.def,y=d.idx,E=d.ruleStack,C=d.occurrenceStack;if(le(p))continue;const A=p[0];if(A===i){const _={idx:y,def:Be(p),ruleStack:Xs(E),occurrenceStack:Xs(C)};f.push(_)}else if(A instanceof me)if(y<c-1){const _=y+1,b=e[_];if(n(b,A.terminalType)){const I={idx:_,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(I)}}else if(y===c-1)l.push({nextTokenType:A.terminalType,nextTokenOccurrence:A.idx,ruleStack:E,occurrenceStack:C}),o=!0;else throw Error("non exhaustive match");else if(A instanceof tt){const _=Ve(E);_.push(A.nonTerminalName);const b=Ve(C);b.push(A.idx);const I={idx:y,def:A.definition.concat(s,Be(p)),ruleStack:_,occurrenceStack:b};f.push(I)}else if(A instanceof He){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b={idx:y,def:A.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C};f.push(b)}else if(A instanceof gt){const _=new we({definition:A.definition,idx:A.idx}),b=A.definition.concat([_],Be(p)),I={idx:y,def:b,ruleStack:E,occurrenceStack:C};f.push(I)}else if(A instanceof yt){const _=new me({terminalType:A.separator}),b=new we({definition:[_].concat(A.definition),idx:A.idx}),I=A.definition.concat([b],Be(p)),U={idx:y,def:I,ruleStack:E,occurrenceStack:C};f.push(U)}else if(A instanceof ct){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b=new me({terminalType:A.separator}),I=new we({definition:[b].concat(A.definition),idx:A.idx}),U=A.definition.concat([I],Be(p)),V={idx:y,def:U,ruleStack:E,occurrenceStack:C};f.push(V)}else if(A instanceof we){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b=new we({definition:A.definition,idx:A.idx}),I=A.definition.concat([b],Be(p)),U={idx:y,def:I,ruleStack:E,occurrenceStack:C};f.push(U)}else if(A instanceof ut)for(let _=A.definition.length-1;_>=0;_--){const b=A.definition[_],I={idx:y,def:b.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C};f.push(I),f.push(a)}else if(A instanceof at)f.push({idx:y,def:A.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C});else if(A instanceof Bi)f.push(uI(A,y,E,C));else throw Error("non exhaustive match")}return l}function uI(t,e,n,r){const i=Ve(n);i.push(t.name);const s=Ve(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var Ee;(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"})(Ee||(Ee={}));function ad(t){if(t instanceof He||t==="Option")return Ee.OPTION;if(t instanceof we||t==="Repetition")return Ee.REPETITION;if(t instanceof gt||t==="RepetitionMandatory")return Ee.REPETITION_MANDATORY;if(t instanceof yt||t==="RepetitionMandatoryWithSeparator")return Ee.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ct||t==="RepetitionWithSeparator")return Ee.REPETITION_WITH_SEPARATOR;if(t instanceof ut||t==="Alternation")return Ee.ALTERNATION;throw Error("non exhaustive match")}function ip(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=ad(r);return s===Ee.ALTERNATION?Lc(e,n,i):xc(e,n,s,i)}function lI(t,e,n,r,i,s){const a=Lc(t,e,n),o=Py(a)?zo:_a;return s(a,r,o,i)}function fI(t,e,n,r,i,s){const a=xc(t,e,i,n),o=Py(a)?zo:_a;return s(a[0],o,r)}function dI(t,e,n,r){const i=t.length,s=qt(t,a=>qt(a,o=>o.length===1));if(e)return function(a){const o=j(a,c=>c.GATE);for(let c=0;c<i;c++){const u=t[c],l=u.length,f=o[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let d=0;d<l;d++){const p=u[d],y=p.length;for(let E=0;E<y;E++){const C=this.LA(E+1);if(n(C,p[E])===!1)continue e}return c}}};if(s&&!r){const a=j(t,c=>It(c)),o=mt(a,(c,u,l)=>(K(u,f=>{q(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=l),K(f.categoryMatches,d=>{q(c,d)||(c[d]=l)})}),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 u=0;u<c;u++){const l=o[u],f=l.length;for(let d=0;d<f;d++){const p=this.LA(d+1);if(n(p,l[d])===!1)continue e}return a}}}}function hI(t,e,n){const r=qt(t,s=>s.length===1),i=t.length;if(r&&!n){const s=It(t);if(s.length===1&&le(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=mt(s,(o,c,u)=>(o[c.tokenTypeIdx]=!0,K(c.categoryMatches,l=>{o[l]=!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 u=this.LA(c+1);if(e(u,a[c])===!1)continue e}return!0}return!1}}class pI extends Ic{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,Ee.OPTION,n,r)||super.walkOption(e,n,r)}walkAtLeastOne(e,n,r){this.checkIsTarget(e,Ee.REPETITION_MANDATORY,n,r)||super.walkOption(e,n,r)}walkAtLeastOneSep(e,n,r){this.checkIsTarget(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}walkMany(e,n,r){this.checkIsTarget(e,Ee.REPETITION,n,r)||super.walkOption(e,n,r)}walkManySep(e,n,r){this.checkIsTarget(e,Ee.REPETITION_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}}class Cy extends Wi{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,Ee.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ee.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ee.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ee.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ee.ALTERNATION)}}function sp(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function cu(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 mI(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 Ny(t,e){const n=j(t,a=>el([a],1)),r=sp(n.length),i=j(n,a=>{const o={};return K(a,c=>{const u=cu(c.partialPath);K(u,l=>{o[l]=!0})}),o});let s=n;for(let a=1;a<=e;a++){const o=s;s=sp(o.length);for(let c=0;c<o.length;c++){const u=o[c];for(let l=0;l<u.length;l++){const f=u[l].partialPath,d=u[l].suffixDef,p=cu(f);if(mI(i,p,c)||le(d)||f.length===e){const E=r[c];if(tl(E,f)===!1){E.push(f);for(let C=0;C<p.length;C++){const A=p[C];i[c][A]=!0}}}else{const E=el(d,a+1,f);s[c]=s[c].concat(E),K(E,C=>{const A=cu(C.partialPath);K(A,_=>{i[c][_]=!0})})}}}}return r}function Lc(t,e,n,r){const i=new Cy(t,Ee.ALTERNATION,r);return e.accept(i),Ny(i.result,n)}function xc(t,e,n,r){const i=new Cy(t,n);e.accept(i);const s=i.result,o=new pI(e,t,n).startWalking(),c=new at({definition:s}),u=new at({definition:o});return Ny([c,u],r)}function tl(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 gI(t,e){return t.length<e.length&&qt(t,(n,r)=>{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function Py(t){return qt(t,e=>qt(e,n=>qt(n,r=>le(r.categoryMatches))))}function yI(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return j(e,n=>Object.assign({type:nt.CUSTOM_LOOKAHEAD_VALIDATION},n))}function TI(t,e,n,r){const i=$t(t,c=>vI(c,n)),s=II(t,e,n),a=$t(t,c=>wI(c,n)),o=$t(t,c=>EI(c,t,r,n));return i.concat(s,a,o)}function vI(t,e){const n=new RI;t.accept(n);const r=n.allProductions,i=_S(r,$I),s=US(i,o=>o.length>1);return j(De(s),o=>{const c=Lt(o),u=e.buildDuplicateFoundError(t,o),l=jt(c),f={message:u,type:nt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:l,occurrence:c.idx},d=Iy(c);return d&&(f.parameter=d),f})}function $I(t){return`${jt(t)}_#_${t.idx}_#_${Iy(t)}`}function Iy(t){return t instanceof me?t.terminalType.name:t instanceof tt?t.nonTerminalName:""}class RI extends Wi{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 EI(t,e,n,r){const i=[];if(mt(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:nt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function AI(t,e,n){const r=[];let i;return ot(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:nt.INVALID_RULE_OVERRIDE,ruleName:t})),r}function ky(t,e,n,r=[]){const i=[],s=Ao(e.definition);if(le(s))return[];{const a=t.name;ot(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:nt.LEFT_RECURSION,ruleName:a});const c=vc(s,r.concat([t])),u=$t(c,l=>{const f=Ve(r);return f.push(l),ky(t,l,n,f)});return i.concat(u)}}function Ao(t){let e=[];if(le(t))return e;const n=Lt(t);if(n instanceof tt)e.push(n.referencedRule);else if(n instanceof at||n instanceof He||n instanceof gt||n instanceof yt||n instanceof ct||n instanceof we)e=e.concat(Ao(n.definition));else if(n instanceof ut)e=It(j(n.definition,s=>Ao(s.definition)));else if(!(n instanceof me))throw Error("non exhaustive match");const r=jo(n),i=t.length>1;if(r&&i){const s=Be(t);return e.concat(Ao(s))}else return e}class od extends Wi{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function _I(t,e){const n=new od;t.accept(n);const r=n.alternations;return $t(r,s=>{const a=Xs(s.definition);return $t(a,(o,c)=>{const u=wy([o],[],_a,1);return le(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:c}),type:nt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:c+1}]:[]})})}function SI(t,e,n){const r=new od;t.accept(r);let i=r.alternations;return i=$c(i,a=>a.ignoreAmbiguities===!0),$t(i,a=>{const o=a.idx,c=a.maxLookahead||e,u=Lc(o,t,c,a),l=NI(u,a,t,n),f=PI(u,a,t,n);return l.concat(f)})}class bI extends Wi{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 wI(t,e){const n=new od;t.accept(n);const r=n.alternations;return $t(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:s}),type:nt.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function CI(t,e,n){const r=[];return K(t,i=>{const s=new bI;i.accept(s);const a=s.allProductions;K(a,o=>{const c=ad(o),u=o.maxLookahead||e,l=o.idx,d=xc(l,i,c,u)[0];if(le(It(d))){const p=n.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:p,type:nt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function NI(t,e,n,r){const i=[],s=mt(t,(o,c,u)=>(e.definition[u].ignoreAmbiguities===!0||K(c,l=>{const f=[u];K(t,(d,p)=>{u!==p&&tl(d,l)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!tl(i,l)&&(i.push(l),o.push({alts:f,path:l}))}),o),[]);return j(s,o=>{const c=j(o.alts,l=>l+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:c,prefixPath:o.path}),type:nt.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:o.alts}})}function PI(t,e,n,r){const i=mt(t,(a,o,c)=>{const u=j(o,l=>({idx:c,path:l}));return a.concat(u)},[]);return $a($t(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const c=a.idx,u=a.path,l=_t(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<c&&gI(d.path,u));return j(l,d=>{const p=[d.idx+1,c+1],y=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:nt.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:y,alternatives:p}})}))}function II(t,e,n){const r=[],i=j(e,s=>s.name);return K(t,s=>{const a=s.name;if(ot(i,a)){const o=n.buildNamespaceConflictError(s);r.push({message:o,type:nt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function kI(t){const e=Yf(t,{errMsgProvider:nI}),n={};return K(t.rules,r=>{n[r.name]=r}),rI(n,e.errMsgProvider)}function OI(t){return t=Yf(t,{errMsgProvider:Ar}),TI(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const Oy="MismatchedTokenException",Ly="NoViableAltException",xy="EarlyExitException",My="NotAllInputParsedException",Dy=[Oy,Ly,xy,My];Object.freeze(Dy);function qo(t){return ot(Dy,t.name)}class Mc 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 Fy extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=Oy}}class LI extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=Ly}}class xI extends Mc{constructor(e,n){super(e,n),this.name=My}}class MI extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=xy}}const uu={},Gy="InRuleRecoveryException";class DI extends Error{constructor(e){super(e),this.name=Gy}}class FI{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=q(e,"recoveryEnabled")?e.recoveryEnabled:_n.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=GI)}getTokenToInsert(e){const n=sd(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 u=this.LA(1);let l=this.LA(1);const f=()=>{const d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),y=new Fy(p,u,this.LA(0));y.resyncedTokens=Xs(o),this.SAVE_ERROR(y)};for(;!c;)if(this.tokenMatcher(l,i)){f();return}else if(r.call(this)){f(),e.apply(this,n);return}else this.tokenMatcher(l,s)?c=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,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 DI("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||le(n))return!1;const r=this.LA(1);return Mi(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 ot(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=Mi(e,s=>by(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return uu;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 j(e,(r,i)=>i===0?uu:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=j(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return It(e)}getFollowSetFromFollowKey(e){if(e===uu)return[Hn];const n=e.ruleName+e.idxInCallingRule+gy+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 Xs(n)}attemptInRepetitionRecovery(e,n,r,i,s,a,o){}getCurrentGrammarPath(e,n){const r=this.getHumanReadableRuleStack(),i=Ve(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return j(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function GI(t,e,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===void 0){const d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];c=new s(p,i).startWalking(),this.firstAfterRepMap[o]=c}let u=c.token,l=c.occurrence;const f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Hn,l=1),!(u===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,l,a)&&this.tryInRepetitionRecovery(t,e,n,u)}const jI=4,Jn=8,jy=1<<Jn,Uy=2<<Jn,nl=3<<Jn,rl=4<<Jn,il=5<<Jn,_o=6<<Jn;function lu(t,e,n){return n|e|t}class cd{constructor(e){var n;this.maxLookahead=(n=e==null?void 0:e.maxLookahead)!==null&&n!==void 0?n:_n.maxLookahead}validate(e){const n=this.validateNoLeftRecursion(e.rules);if(le(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 $t(e,n=>ky(n,n,Ar))}validateEmptyOrAlternatives(e){return $t(e,n=>_I(n,Ar))}validateAmbiguousAlternationAlternatives(e,n){return $t(e,r=>SI(r,n,Ar))}validateSomeNonEmptyLookaheadPath(e,n){return CI(e,n,Ar)}buildLookaheadForAlternation(e){return lI(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,dI)}buildLookaheadForOptional(e){return fI(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ad(e.prodType),hI)}}class UI{initLooksAhead(e){this.dynamicTokensEnabled=q(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:_n.dynamicTokensEnabled,this.maxLookahead=q(e,"maxLookahead")?e.maxLookahead:_n.maxLookahead,this.lookaheadStrategy=q(e,"lookaheadStrategy")?e.lookaheadStrategy:new cd({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){K(e,n=>{this.TRACE_INIT(`${n.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:c}=qI(n);K(r,u=>{const l=u.idx===0?"":u.idx;this.TRACE_INIT(`${jt(u)}${l}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:n,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=lu(this.fullRuleNameToShort[n.name],jy,u.idx);this.setLaFuncCache(d,f)})}),K(i,u=>{this.computeLookaheadFunc(n,u.idx,nl,"Repetition",u.maxLookahead,jt(u))}),K(s,u=>{this.computeLookaheadFunc(n,u.idx,Uy,"Option",u.maxLookahead,jt(u))}),K(a,u=>{this.computeLookaheadFunc(n,u.idx,rl,"RepetitionMandatory",u.maxLookahead,jt(u))}),K(o,u=>{this.computeLookaheadFunc(n,u.idx,_o,"RepetitionMandatoryWithSeparator",u.maxLookahead,jt(u))}),K(c,u=>{this.computeLookaheadFunc(n,u.idx,il,"RepetitionWithSeparator",u.maxLookahead,jt(u))})})})}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=lu(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(c,o)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return lu(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class zI extends Wi{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 to=new zI;function qI(t){to.reset(),t.accept(to);const e=to.dslMethods;return to.reset(),e}function ap(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function op(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 BI(t,e,n){t.children[n]===void 0?t.children[n]=[e]:t.children[n].push(e)}function WI(t,e,n){t.children[e]===void 0?t.children[e]=[n]:t.children[e].push(n)}const KI="name";function zy(t,e){Object.defineProperty(t,KI,{enumerable:!1,configurable:!0,writable:!1,value:e})}function HI(t,e){const n=At(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 u=a[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,e)}}}function VI(t,e){const n=function(){};zy(n,t+"BaseSemantics");const r={visit:function(i,s){if(Q(i)&&(i=i[0]),!En(i))return this[i.name](i.children,s)},validateVisitor:function(){const i=XI(this,e);if(!le(i)){const s=j(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
89
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(t){return"deprecated"},buildDuplicateRuleNameError(t){let e;return t.topLevelRule instanceof Bi?e=t.topLevelRule.name:e=t.topLevelRule,`Duplicate definition, rule: ->${e}<- is already defined in the grammar: ->${t.grammarName}<-`}};function rI(t,e){const n=new iI(t,e);return n.resolveRefs(),n.errors}class iI extends Wi{constructor(e,n){super(),this.nameToTopRule=e,this.errMsgProvider=n,this.errors=[]}resolveRefs(){K(De(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:nt.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}}}class sI extends Ic{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=He(this.path.ruleStack).reverse(),this.occurrenceStack=He(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(){le(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}}class aI extends sI{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 at({definition:i});this.possibleTokTypes=Aa(s),this.found=!0}}}class Oc extends Ic{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 oI extends Oc{walkMany(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(e,n,r)}}class np extends Oc{walkManySep(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(e,n,r)}}class cI extends Oc{walkAtLeastOne(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(e,n,r)}}class rp extends Oc{walkAtLeastOneSep(e,n,r){if(e.idx===this.occurrence){const i=Lt(n.concat(r));this.result.isEndOfRule=i===void 0,i instanceof me&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(e,n,r)}}function el(t,e,n=[]){n=He(n);let r=[],i=0;function s(o){return o.concat(Be(t,i+1))}function a(o){const c=el(s(o),e,n);return r.concat(c)}for(;n.length<e&&i<t.length;){const o=t[i];if(o instanceof at)return a(o.definition);if(o instanceof tt)return a(o.definition);if(o instanceof Ve)r=a(o.definition);else if(o instanceof gt){const c=o.definition.concat([new we({definition:o.definition})]);return a(c)}else if(o instanceof yt){const c=[new at({definition:o.definition}),new we({definition:[new me({terminalType:o.separator})].concat(o.definition)})];return a(c)}else if(o instanceof ct){const c=o.definition.concat([new we({definition:[new me({terminalType:o.separator})].concat(o.definition)})]);r=a(c)}else if(o instanceof we){const c=o.definition.concat([new we({definition:o.definition})]);r=a(c)}else{if(o instanceof ut)return K(o.definition,c=>{le(c.definition)===!1&&(r=a(c.definition))}),r;if(o instanceof me)n.push(o.terminalType);else throw Error("non exhaustive match")}i++}return r.push({partialPath:n,suffixDef:Be(t,i)}),r}function wy(t,e,n,r){const i="EXIT_NONE_TERMINAL",s=[i],a="EXIT_ALTERNATIVE";let o=!1;const c=e.length,u=c-r-1,l=[],f=[];for(f.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!le(f);){const d=f.pop();if(d===a){o&&Nr(f).idx<=u&&f.pop();continue}const p=d.def,y=d.idx,E=d.ruleStack,C=d.occurrenceStack;if(le(p))continue;const A=p[0];if(A===i){const _={idx:y,def:Be(p),ruleStack:Xs(E),occurrenceStack:Xs(C)};f.push(_)}else if(A instanceof me)if(y<c-1){const _=y+1,b=e[_];if(n(b,A.terminalType)){const I={idx:_,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(I)}}else if(y===c-1)l.push({nextTokenType:A.terminalType,nextTokenOccurrence:A.idx,ruleStack:E,occurrenceStack:C}),o=!0;else throw Error("non exhaustive match");else if(A instanceof tt){const _=He(E);_.push(A.nonTerminalName);const b=He(C);b.push(A.idx);const I={idx:y,def:A.definition.concat(s,Be(p)),ruleStack:_,occurrenceStack:b};f.push(I)}else if(A instanceof Ve){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b={idx:y,def:A.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C};f.push(b)}else if(A instanceof gt){const _=new we({definition:A.definition,idx:A.idx}),b=A.definition.concat([_],Be(p)),I={idx:y,def:b,ruleStack:E,occurrenceStack:C};f.push(I)}else if(A instanceof yt){const _=new me({terminalType:A.separator}),b=new we({definition:[_].concat(A.definition),idx:A.idx}),I=A.definition.concat([b],Be(p)),U={idx:y,def:I,ruleStack:E,occurrenceStack:C};f.push(U)}else if(A instanceof ct){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b=new me({terminalType:A.separator}),I=new we({definition:[b].concat(A.definition),idx:A.idx}),U=A.definition.concat([I],Be(p)),H={idx:y,def:U,ruleStack:E,occurrenceStack:C};f.push(H)}else if(A instanceof we){const _={idx:y,def:Be(p),ruleStack:E,occurrenceStack:C};f.push(_),f.push(a);const b=new we({definition:A.definition,idx:A.idx}),I=A.definition.concat([b],Be(p)),U={idx:y,def:I,ruleStack:E,occurrenceStack:C};f.push(U)}else if(A instanceof ut)for(let _=A.definition.length-1;_>=0;_--){const b=A.definition[_],I={idx:y,def:b.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C};f.push(I),f.push(a)}else if(A instanceof at)f.push({idx:y,def:A.definition.concat(Be(p)),ruleStack:E,occurrenceStack:C});else if(A instanceof Bi)f.push(uI(A,y,E,C));else throw Error("non exhaustive match")}return l}function uI(t,e,n,r){const i=He(n);i.push(t.name);const s=He(r);return s.push(1),{idx:e,def:t.definition,ruleStack:i,occurrenceStack:s}}var Ee;(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"})(Ee||(Ee={}));function ad(t){if(t instanceof Ve||t==="Option")return Ee.OPTION;if(t instanceof we||t==="Repetition")return Ee.REPETITION;if(t instanceof gt||t==="RepetitionMandatory")return Ee.REPETITION_MANDATORY;if(t instanceof yt||t==="RepetitionMandatoryWithSeparator")return Ee.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof ct||t==="RepetitionWithSeparator")return Ee.REPETITION_WITH_SEPARATOR;if(t instanceof ut||t==="Alternation")return Ee.ALTERNATION;throw Error("non exhaustive match")}function ip(t){const{occurrence:e,rule:n,prodType:r,maxLookahead:i}=t,s=ad(r);return s===Ee.ALTERNATION?Lc(e,n,i):xc(e,n,s,i)}function lI(t,e,n,r,i,s){const a=Lc(t,e,n),o=Py(a)?zo:_a;return s(a,r,o,i)}function fI(t,e,n,r,i,s){const a=xc(t,e,i,n),o=Py(a)?zo:_a;return s(a[0],o,r)}function dI(t,e,n,r){const i=t.length,s=qt(t,a=>qt(a,o=>o.length===1));if(e)return function(a){const o=j(a,c=>c.GATE);for(let c=0;c<i;c++){const u=t[c],l=u.length,f=o[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let d=0;d<l;d++){const p=u[d],y=p.length;for(let E=0;E<y;E++){const C=this.LA(E+1);if(n(C,p[E])===!1)continue e}return c}}};if(s&&!r){const a=j(t,c=>It(c)),o=mt(a,(c,u,l)=>(K(u,f=>{q(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=l),K(f.categoryMatches,d=>{q(c,d)||(c[d]=l)})}),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 u=0;u<c;u++){const l=o[u],f=l.length;for(let d=0;d<f;d++){const p=this.LA(d+1);if(n(p,l[d])===!1)continue e}return a}}}}function hI(t,e,n){const r=qt(t,s=>s.length===1),i=t.length;if(r&&!n){const s=It(t);if(s.length===1&&le(s[0].categoryMatches)){const o=s[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===o}}else{const a=mt(s,(o,c,u)=>(o[c.tokenTypeIdx]=!0,K(c.categoryMatches,l=>{o[l]=!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 u=this.LA(c+1);if(e(u,a[c])===!1)continue e}return!0}return!1}}class pI extends Ic{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,Ee.OPTION,n,r)||super.walkOption(e,n,r)}walkAtLeastOne(e,n,r){this.checkIsTarget(e,Ee.REPETITION_MANDATORY,n,r)||super.walkOption(e,n,r)}walkAtLeastOneSep(e,n,r){this.checkIsTarget(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}walkMany(e,n,r){this.checkIsTarget(e,Ee.REPETITION,n,r)||super.walkOption(e,n,r)}walkManySep(e,n,r){this.checkIsTarget(e,Ee.REPETITION_WITH_SEPARATOR,n,r)||super.walkOption(e,n,r)}}class Cy extends Wi{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,Ee.OPTION)}visitRepetition(e){this.checkIsTarget(e,Ee.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Ee.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Ee.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Ee.ALTERNATION)}}function sp(t){const e=new Array(t);for(let n=0;n<t;n++)e[n]=[];return e}function cu(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 mI(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 Ny(t,e){const n=j(t,a=>el([a],1)),r=sp(n.length),i=j(n,a=>{const o={};return K(a,c=>{const u=cu(c.partialPath);K(u,l=>{o[l]=!0})}),o});let s=n;for(let a=1;a<=e;a++){const o=s;s=sp(o.length);for(let c=0;c<o.length;c++){const u=o[c];for(let l=0;l<u.length;l++){const f=u[l].partialPath,d=u[l].suffixDef,p=cu(f);if(mI(i,p,c)||le(d)||f.length===e){const E=r[c];if(tl(E,f)===!1){E.push(f);for(let C=0;C<p.length;C++){const A=p[C];i[c][A]=!0}}}else{const E=el(d,a+1,f);s[c]=s[c].concat(E),K(E,C=>{const A=cu(C.partialPath);K(A,_=>{i[c][_]=!0})})}}}}return r}function Lc(t,e,n,r){const i=new Cy(t,Ee.ALTERNATION,r);return e.accept(i),Ny(i.result,n)}function xc(t,e,n,r){const i=new Cy(t,n);e.accept(i);const s=i.result,o=new pI(e,t,n).startWalking(),c=new at({definition:s}),u=new at({definition:o});return Ny([c,u],r)}function tl(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 gI(t,e){return t.length<e.length&&qt(t,(n,r)=>{const i=e[r];return n===i||i.categoryMatchesMap[n.tokenTypeIdx]})}function Py(t){return qt(t,e=>qt(e,n=>qt(n,r=>le(r.categoryMatches))))}function yI(t){const e=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName});return j(e,n=>Object.assign({type:nt.CUSTOM_LOOKAHEAD_VALIDATION},n))}function TI(t,e,n,r){const i=$t(t,c=>vI(c,n)),s=II(t,e,n),a=$t(t,c=>wI(c,n)),o=$t(t,c=>EI(c,t,r,n));return i.concat(s,a,o)}function vI(t,e){const n=new RI;t.accept(n);const r=n.allProductions,i=_S(r,$I),s=US(i,o=>o.length>1);return j(De(s),o=>{const c=Lt(o),u=e.buildDuplicateFoundError(t,o),l=jt(c),f={message:u,type:nt.DUPLICATE_PRODUCTIONS,ruleName:t.name,dslName:l,occurrence:c.idx},d=Iy(c);return d&&(f.parameter=d),f})}function $I(t){return`${jt(t)}_#_${t.idx}_#_${Iy(t)}`}function Iy(t){return t instanceof me?t.terminalType.name:t instanceof tt?t.nonTerminalName:""}class RI extends Wi{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 EI(t,e,n,r){const i=[];if(mt(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:nt.DUPLICATE_RULE_NAME,ruleName:t.name})}return i}function AI(t,e,n){const r=[];let i;return ot(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:nt.INVALID_RULE_OVERRIDE,ruleName:t})),r}function ky(t,e,n,r=[]){const i=[],s=Ao(e.definition);if(le(s))return[];{const a=t.name;ot(s,t)&&i.push({message:n.buildLeftRecursionError({topLevelRule:t,leftRecursionPath:r}),type:nt.LEFT_RECURSION,ruleName:a});const c=vc(s,r.concat([t])),u=$t(c,l=>{const f=He(r);return f.push(l),ky(t,l,n,f)});return i.concat(u)}}function Ao(t){let e=[];if(le(t))return e;const n=Lt(t);if(n instanceof tt)e.push(n.referencedRule);else if(n instanceof at||n instanceof Ve||n instanceof gt||n instanceof yt||n instanceof ct||n instanceof we)e=e.concat(Ao(n.definition));else if(n instanceof ut)e=It(j(n.definition,s=>Ao(s.definition)));else if(!(n instanceof me))throw Error("non exhaustive match");const r=jo(n),i=t.length>1;if(r&&i){const s=Be(t);return e.concat(Ao(s))}else return e}class od extends Wi{constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}}function _I(t,e){const n=new od;t.accept(n);const r=n.alternations;return $t(r,s=>{const a=Xs(s.definition);return $t(a,(o,c)=>{const u=wy([o],[],_a,1);return le(u)?[{message:e.buildEmptyAlternationError({topLevelRule:t,alternation:s,emptyChoiceIdx:c}),type:nt.NONE_LAST_EMPTY_ALT,ruleName:t.name,occurrence:s.idx,alternative:c+1}]:[]})})}function SI(t,e,n){const r=new od;t.accept(r);let i=r.alternations;return i=$c(i,a=>a.ignoreAmbiguities===!0),$t(i,a=>{const o=a.idx,c=a.maxLookahead||e,u=Lc(o,t,c,a),l=NI(u,a,t,n),f=PI(u,a,t,n);return l.concat(f)})}class bI extends Wi{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 wI(t,e){const n=new od;t.accept(n);const r=n.alternations;return $t(r,s=>s.definition.length>255?[{message:e.buildTooManyAlternativesError({topLevelRule:t,alternation:s}),type:nt.TOO_MANY_ALTS,ruleName:t.name,occurrence:s.idx}]:[])}function CI(t,e,n){const r=[];return K(t,i=>{const s=new bI;i.accept(s);const a=s.allProductions;K(a,o=>{const c=ad(o),u=o.maxLookahead||e,l=o.idx,d=xc(l,i,c,u)[0];if(le(It(d))){const p=n.buildEmptyRepetitionError({topLevelRule:i,repetition:o});r.push({message:p,type:nt.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),r}function NI(t,e,n,r){const i=[],s=mt(t,(o,c,u)=>(e.definition[u].ignoreAmbiguities===!0||K(c,l=>{const f=[u];K(t,(d,p)=>{u!==p&&tl(d,l)&&e.definition[p].ignoreAmbiguities!==!0&&f.push(p)}),f.length>1&&!tl(i,l)&&(i.push(l),o.push({alts:f,path:l}))}),o),[]);return j(s,o=>{const c=j(o.alts,l=>l+1);return{message:r.buildAlternationAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:c,prefixPath:o.path}),type:nt.AMBIGUOUS_ALTS,ruleName:n.name,occurrence:e.idx,alternatives:o.alts}})}function PI(t,e,n,r){const i=mt(t,(a,o,c)=>{const u=j(o,l=>({idx:c,path:l}));return a.concat(u)},[]);return $a($t(i,a=>{if(e.definition[a.idx].ignoreAmbiguities===!0)return[];const c=a.idx,u=a.path,l=_t(i,d=>e.definition[d.idx].ignoreAmbiguities!==!0&&d.idx<c&&gI(d.path,u));return j(l,d=>{const p=[d.idx+1,c+1],y=e.idx===0?"":e.idx;return{message:r.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:e,ambiguityIndices:p,prefixPath:d.path}),type:nt.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:y,alternatives:p}})}))}function II(t,e,n){const r=[],i=j(e,s=>s.name);return K(t,s=>{const a=s.name;if(ot(i,a)){const o=n.buildNamespaceConflictError(s);r.push({message:o,type:nt.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),r}function kI(t){const e=Yf(t,{errMsgProvider:nI}),n={};return K(t.rules,r=>{n[r.name]=r}),rI(n,e.errMsgProvider)}function OI(t){return t=Yf(t,{errMsgProvider:Ar}),TI(t.rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}const Oy="MismatchedTokenException",Ly="NoViableAltException",xy="EarlyExitException",My="NotAllInputParsedException",Dy=[Oy,Ly,xy,My];Object.freeze(Dy);function qo(t){return ot(Dy,t.name)}class Mc 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 Fy extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=Oy}}class LI extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=Ly}}class xI extends Mc{constructor(e,n){super(e,n),this.name=My}}class MI extends Mc{constructor(e,n,r){super(e,n),this.previousToken=r,this.name=xy}}const uu={},Gy="InRuleRecoveryException";class DI extends Error{constructor(e){super(e),this.name=Gy}}class FI{initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=q(e,"recoveryEnabled")?e.recoveryEnabled:_n.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=GI)}getTokenToInsert(e){const n=sd(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 u=this.LA(1);let l=this.LA(1);const f=()=>{const d=this.LA(0),p=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:u,previous:d,ruleName:this.getCurrRuleFullName()}),y=new Fy(p,u,this.LA(0));y.resyncedTokens=Xs(o),this.SAVE_ERROR(y)};for(;!c;)if(this.tokenMatcher(l,i)){f();return}else if(r.call(this)){f(),e.apply(this,n);return}else this.tokenMatcher(l,s)?c=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,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 DI("sad sad panda")}canPerformInRuleRecovery(e,n){return this.canRecoverWithSingleTokenInsertion(e,n)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,n){if(!this.canTokenTypeBeInsertedInRecovery(e)||le(n))return!1;const r=this.LA(1);return Mi(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 ot(r,e)}findReSyncTokenType(){const e=this.flattenFollowSet();let n=this.LA(1),r=2;for(;;){const i=Mi(e,s=>by(n,s));if(i!==void 0)return i;n=this.LA(r),r++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return uu;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 j(e,(r,i)=>i===0?uu:{ruleName:this.shortRuleNameToFullName(r),idxInCallingRule:n[i],inRule:this.shortRuleNameToFullName(e[i-1])})}flattenFollowSet(){const e=j(this.buildFullFollowKeyStack(),n=>this.getFollowSetFromFollowKey(n));return It(e)}getFollowSetFromFollowKey(e){if(e===uu)return[Vn];const n=e.ruleName+e.idxInCallingRule+gy+e.inRule;return this.resyncFollows[n]}addToResyncTokens(e,n){return this.tokenMatcher(e,Vn)||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 Xs(n)}attemptInRepetitionRecovery(e,n,r,i,s,a,o){}getCurrentGrammarPath(e,n){const r=this.getHumanReadableRuleStack(),i=He(this.RULE_OCCURRENCE_STACK);return{ruleStack:r,occurrenceStack:i,lastTok:e,lastTokOccurrence:n}}getHumanReadableRuleStack(){return j(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}}function GI(t,e,n,r,i,s,a){const o=this.getKeyForAutomaticLookahead(r,i);let c=this.firstAfterRepMap[o];if(c===void 0){const d=this.getCurrRuleFullName(),p=this.getGAstProductions()[d];c=new s(p,i).startWalking(),this.firstAfterRepMap[o]=c}let u=c.token,l=c.occurrence;const f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Vn,l=1),!(u===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,l,a)&&this.tryInRepetitionRecovery(t,e,n,u)}const jI=4,Jn=8,jy=1<<Jn,Uy=2<<Jn,nl=3<<Jn,rl=4<<Jn,il=5<<Jn,_o=6<<Jn;function lu(t,e,n){return n|e|t}class cd{constructor(e){var n;this.maxLookahead=(n=e==null?void 0:e.maxLookahead)!==null&&n!==void 0?n:_n.maxLookahead}validate(e){const n=this.validateNoLeftRecursion(e.rules);if(le(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 $t(e,n=>ky(n,n,Ar))}validateEmptyOrAlternatives(e){return $t(e,n=>_I(n,Ar))}validateAmbiguousAlternationAlternatives(e,n){return $t(e,r=>SI(r,n,Ar))}validateSomeNonEmptyLookaheadPath(e,n){return CI(e,n,Ar)}buildLookaheadForAlternation(e){return lI(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,dI)}buildLookaheadForOptional(e){return fI(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,ad(e.prodType),hI)}}class UI{initLooksAhead(e){this.dynamicTokensEnabled=q(e,"dynamicTokensEnabled")?e.dynamicTokensEnabled:_n.dynamicTokensEnabled,this.maxLookahead=q(e,"maxLookahead")?e.maxLookahead:_n.maxLookahead,this.lookaheadStrategy=q(e,"lookaheadStrategy")?e.lookaheadStrategy:new cd({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){K(e,n=>{this.TRACE_INIT(`${n.name} Rule Lookahead`,()=>{const{alternation:r,repetition:i,option:s,repetitionMandatory:a,repetitionMandatoryWithSeparator:o,repetitionWithSeparator:c}=qI(n);K(r,u=>{const l=u.idx===0?"":u.idx;this.TRACE_INIT(`${jt(u)}${l}`,()=>{const f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:n,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),d=lu(this.fullRuleNameToShort[n.name],jy,u.idx);this.setLaFuncCache(d,f)})}),K(i,u=>{this.computeLookaheadFunc(n,u.idx,nl,"Repetition",u.maxLookahead,jt(u))}),K(s,u=>{this.computeLookaheadFunc(n,u.idx,Uy,"Option",u.maxLookahead,jt(u))}),K(a,u=>{this.computeLookaheadFunc(n,u.idx,rl,"RepetitionMandatory",u.maxLookahead,jt(u))}),K(o,u=>{this.computeLookaheadFunc(n,u.idx,_o,"RepetitionMandatoryWithSeparator",u.maxLookahead,jt(u))}),K(c,u=>{this.computeLookaheadFunc(n,u.idx,il,"RepetitionWithSeparator",u.maxLookahead,jt(u))})})})}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=lu(this.fullRuleNameToShort[e.name],r,n);this.setLaFuncCache(c,o)})}getKeyForAutomaticLookahead(e,n){const r=this.getLastExplicitRuleShortName();return lu(r,e,n)}getLaFuncFromCache(e){return this.lookAheadFuncsCache.get(e)}setLaFuncCache(e,n){this.lookAheadFuncsCache.set(e,n)}}class zI extends Wi{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 to=new zI;function qI(t){to.reset(),t.accept(to);const e=to.dslMethods;return to.reset(),e}function ap(t,e){isNaN(t.startOffset)===!0?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset<e.endOffset&&(t.endOffset=e.endOffset)}function op(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 BI(t,e,n){t.children[n]===void 0?t.children[n]=[e]:t.children[n].push(e)}function WI(t,e,n){t.children[e]===void 0?t.children[e]=[n]:t.children[e].push(n)}const KI="name";function zy(t,e){Object.defineProperty(t,KI,{enumerable:!1,configurable:!0,writable:!1,value:e})}function VI(t,e){const n=At(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 u=a[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,e)}}}function HI(t,e){const n=function(){};zy(n,t+"BaseSemantics");const r={visit:function(i,s){if(Q(i)&&(i=i[0]),!En(i))return this[i.name](i.children,s)},validateVisitor:function(){const i=XI(this,e);if(!le(i)){const s=j(i,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
90
90
  ${s.join(`
91
91
 
92
92
  `).replace(/\n/g,`
93
- `)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function YI(t,e,n){const r=function(){};zy(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return K(e,s=>{i[s]=HI}),r.prototype=i,r.prototype.constructor=r,r}var sl;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(sl||(sl={}));function XI(t,e){return JI(t,e)}function JI(t,e){const n=_t(e,i=>wn(t[i])===!1),r=j(n,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:sl.MISSING_METHOD,methodName:i}));return $a(r)}class ZI{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=q(e,"nodeLocationTracking")?e.nodeLocationTracking:_n.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Fe,this.cstFinallyStateUpdate=Fe,this.cstPostTerminal=Fe,this.cstPostNonTerminal=Fe,this.cstPostRule=Fe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=op,this.setNodeLocationFromNode=op,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ap,this.setNodeLocationFromNode=ap,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=Fe,this.setInitialNodeLocation=Fe;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];BI(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];WI(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(En(this.baseCstVisitorConstructor)){const e=VI(this.className,At(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(En(this.baseCstVisitorWithDefaultsConstructor)){const e=YI(this.className,At(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 QI{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)):Wo}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?Wo: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 ek{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=Ko){if(ot(this.definedRulesNames,e)){const a={message:Ar.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:nt.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=Ko){const i=AI(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(qo(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return cP(De(this.gastProductionsCache))}}class tk{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=zo,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q(n,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
93
+ `)}`)}}};return n.prototype=r,n.prototype.constructor=n,n._RULE_NAMES=e,n}function YI(t,e,n){const r=function(){};zy(r,t+"BaseSemanticsWithDefaults");const i=Object.create(n.prototype);return K(e,s=>{i[s]=VI}),r.prototype=i,r.prototype.constructor=r,r}var sl;(function(t){t[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD"})(sl||(sl={}));function XI(t,e){return JI(t,e)}function JI(t,e){const n=_t(e,i=>wn(t[i])===!1),r=j(n,i=>({msg:`Missing visitor method: <${i}> on ${t.constructor.name} CST Visitor.`,type:sl.MISSING_METHOD,methodName:i}));return $a(r)}class ZI{initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=q(e,"nodeLocationTracking")?e.nodeLocationTracking:_n.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=Fe,this.cstFinallyStateUpdate=Fe,this.cstPostTerminal=Fe,this.cstPostNonTerminal=Fe,this.cstPostRule=Fe;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=op,this.setNodeLocationFromNode=op,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=ap,this.setNodeLocationFromNode=ap,this.cstPostRule=Fe,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=Fe,this.setNodeLocationFromNode=Fe,this.cstPostRule=Fe,this.setInitialNodeLocation=Fe;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];BI(r,n,e),this.setNodeLocationFromToken(r.location,n)}cstPostNonTerminal(e,n){const r=this.CST_STACK[this.CST_STACK.length-1];WI(r,n,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){if(En(this.baseCstVisitorConstructor)){const e=HI(this.className,At(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(En(this.baseCstVisitorWithDefaultsConstructor)){const e=YI(this.className,At(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 QI{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)):Wo}LA(e){const n=this.currIdx+e;return n<0||this.tokVectorLength<=n?Wo: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 ek{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=Ko){if(ot(this.definedRulesNames,e)){const a={message:Ar.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:nt.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=Ko){const i=AI(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(qo(i))return!1;throw i}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return cP(De(this.gastProductionsCache))}}class tk{initRecognizerEngine(e,n){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=zo,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},q(n,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
94
94
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
95
95
  For Further details.`);if(Q(e)){if(le(e))throw Error(`A Token Vocabulary cannot be empty.
96
96
  Note that the first argument for the parser constructor
97
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
98
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
99
- For Further details.`)}if(Q(e))this.tokensMap=mt(e,(s,a)=>(s[a.name]=a,s),{});else if(q(e,"modes")&&qt(It(De(e.modes)),QP)){const s=It(De(e.modes)),a=Xf(s);this.tokensMap=mt(a,(o,c)=>(o[c.name]=c,o),{})}else if(Et(e))this.tokensMap=Ve(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=q(e,"modes")?It(De(e.modes)):De(e),i=qt(r,s=>le(s.categoryMatches));this.tokenMatcher=i?zo:_a,Sa(De(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=q(r,"resyncEnabled")?r.resyncEnabled:Ko.resyncEnabled,s=q(r,"recoveryValueFunc")?r.recoveryValueFunc:Ko.recoveryValueFunc,a=this.ruleShortNameIdx<<jI+Jn;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return this.outputCst===!0?o=function(...l){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,l);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(...l){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,l)}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(qo(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(Uy,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(rl,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,Ee.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,rl,e,cI)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(_o,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,rp],o,_o,e,rp)}else throw this.raiseEarlyExitException(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(nl,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,nl,e,oI,a)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(il,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,np],o,il,e,np)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,_o,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(jy,n),i=Q(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 xI(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 qo(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 Fy(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===Gy?r:s}}else throw r}saveRecogState(){const e=this.errors,n=Ve(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 nk{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:_n.errorMessageProvider}SAVE_ERROR(e){if(qo(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:Ve(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return Ve(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=xc(e,s,n,this.maxLookahead)[0],c=[];for(let l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:c,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new MI(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=Lc(e,i,this.maxLookahead),a=[];for(let u=1;u<=this.maxLookahead;u++)a.push(this.LA(u));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 LI(c,this.LA(1),o))}}class rk{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(En(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return wy([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=Lt(e.ruleStack),i=this.getGAstProductions()[n];return new aI(i,e).startWalking()}}const Dc={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Dc);const cp=!0,up=Math.pow(2,Jn)-1,qy=Sy({name:"RECORDING_PHASE_TOKEN",pattern:it.NA});Sa([qy]);const By=sd(qy,`This IToken indicates the Parser is in Recording Phase
99
+ For Further details.`)}if(Q(e))this.tokensMap=mt(e,(s,a)=>(s[a.name]=a,s),{});else if(q(e,"modes")&&qt(It(De(e.modes)),QP)){const s=It(De(e.modes)),a=Xf(s);this.tokensMap=mt(a,(o,c)=>(o[c.name]=c,o),{})}else if(Et(e))this.tokensMap=He(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=Vn;const r=q(e,"modes")?It(De(e.modes)):De(e),i=qt(r,s=>le(s.categoryMatches));this.tokenMatcher=i?zo:_a,Sa(De(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=q(r,"resyncEnabled")?r.resyncEnabled:Ko.resyncEnabled,s=q(r,"recoveryValueFunc")?r.recoveryValueFunc:Ko.recoveryValueFunc,a=this.ruleShortNameIdx<<jI+Jn;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=e,this.fullRuleNameToShort[e]=a;let o;return this.outputCst===!0?o=function(...l){try{this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,l);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(...l){try{return this.ruleInvocationStateUpdate(a,e,this.subruleIdx),n.apply(this,l)}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(qo(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(Uy,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(rl,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,Ee.REPETITION_MANDATORY,n.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,n],i,rl,e,cI)}atLeastOneSepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(_o,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,rp],o,_o,e,rp)}else throw this.raiseEarlyExitException(e,Ee.REPETITION_MANDATORY_WITH_SEPARATOR,n.ERR_MSG)}manyInternal(e,n){const r=this.getKeyForAutomaticLookahead(nl,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,nl,e,oI,a)}manySepFirstInternal(e,n){const r=this.getKeyForAutomaticLookahead(il,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,np],o,il,e,np)}}repetitionSepSecondInternal(e,n,r,i,s){for(;r();)this.CONSUME(n),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,n,r,i,s],r,_o,e,s)}doSingleRepetition(e){const n=this.getLexerPosition();return e.call(this),this.getLexerPosition()>n}orInternal(e,n){const r=this.getKeyForAutomaticLookahead(jy,n),i=Q(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 xI(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 qo(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 Fy(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===Gy?r:s}}else throw r}saveRecogState(){const e=this.errors,n=He(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),Vn)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}class nk{initErrorHandler(e){this._errors=[],this.errorMessageProvider=q(e,"errorMessageProvider")?e.errorMessageProvider:_n.errorMessageProvider}SAVE_ERROR(e){if(qo(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:He(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return He(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,n,r){const i=this.getCurrRuleFullName(),s=this.getGAstProductions()[i],o=xc(e,s,n,this.maxLookahead)[0],c=[];for(let l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));const u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:o,actual:c,previous:this.LA(0),customUserDescription:r,ruleName:i});throw this.SAVE_ERROR(new MI(u,this.LA(1),this.LA(0)))}raiseNoAltException(e,n){const r=this.getCurrRuleFullName(),i=this.getGAstProductions()[r],s=Lc(e,i,this.maxLookahead),a=[];for(let u=1;u<=this.maxLookahead;u++)a.push(this.LA(u));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 LI(c,this.LA(1),o))}}class rk{initContentAssist(){}computeContentAssist(e,n){const r=this.gastProductionsCache[e];if(En(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return wy([r],n,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){const n=Lt(e.ruleStack),i=this.getGAstProductions()[n];return new aI(i,e).startWalking()}}const Dc={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Dc);const cp=!0,up=Math.pow(2,Jn)-1,qy=Sy({name:"RECORDING_PHASE_TOKEN",pattern:it.NA});Sa([qy]);const By=sd(qy,`This IToken indicates the Parser is in Recording Phase
101
101
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(By);const ik={name:`This CSTNode indicates the Parser is in Recording Phase
102
102
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};class sk{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 Wo}topLevelRuleRecord(e,n){try{const r=new Bi({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
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 ms.call(this,He,e,n)}atLeastOneInternalRecord(e,n){ms.call(this,gt,n,e)}atLeastOneSepFirstInternalRecord(e,n){ms.call(this,yt,n,e,cp)}manyInternalRecord(e,n){ms.call(this,we,n,e)}manySepFirstInternalRecord(e,n){ms.call(this,ct,n,e,cp)}orInternalRecord(e,n){return ak.call(this,e,n)}subruleInternalRecord(e,n,r){if(Bo(n),!e||q(e,"ruleName")===!1){const o=new Error(`<SUBRULE${lp(n)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
104
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw r}throw r}}optionInternalRecord(e,n){return ms.call(this,Ve,e,n)}atLeastOneInternalRecord(e,n){ms.call(this,gt,n,e)}atLeastOneSepFirstInternalRecord(e,n){ms.call(this,yt,n,e,cp)}manyInternalRecord(e,n){ms.call(this,we,n,e)}manySepFirstInternalRecord(e,n){ms.call(this,ct,n,e,cp)}orInternalRecord(e,n){return ak.call(this,e,n)}subruleInternalRecord(e,n,r){if(Bo(n),!e||q(e,"ruleName")===!1){const o=new Error(`<SUBRULE${lp(n)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>
105
105
  inside top level rule: <${this.recordingProdStack[0].name}>`);throw o.KNOWN_RECORDER_ERROR=!0,o}const i=Nr(this.recordingProdStack),s=e.ruleName,a=new tt({idx:n,nonTerminalName:s,label:r==null?void 0:r.LABEL,referencedRule:void 0});return i.definition.push(a),this.outputCst?ik:Dc}consumeInternalRecord(e,n,r){if(Bo(n),!Ay(e)){const a=new Error(`<CONSUME${lp(n)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>
106
106
  inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}const i=Nr(this.recordingProdStack),s=new me({idx:n,terminalType:e,label:r==null?void 0:r.LABEL});return i.definition.push(s),By}}function ms(t,e,n,r=!1){Bo(n);const i=Nr(this.recordingProdStack),s=wn(e)?e:e.DEF,a=new t({definition:[],idx:n});return r&&(a.separator=e.SEP),q(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(a),s.call(this),i.definition.push(a),this.recordingProdStack.pop(),Dc}function ak(t,e){Bo(e);const n=Nr(this.recordingProdStack),r=Q(t)===!1,i=r===!1?t:t.DEF,s=new ut({definition:[],idx:e,ignoreAmbiguities:r&&t.IGNORE_AMBIGUITIES===!0});q(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD);const a=BS(i,o=>wn(o.GATE));return s.hasPredicates=a,n.definition.push(s),K(i,o=>{const c=new at({definition:[]});s.definition.push(c),q(o,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=o.IGNORE_AMBIGUITIES:q(o,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),o.ALT.call(this),this.recordingProdStack.pop()}),Dc}function lp(t){return t===0?"":`${t}`}function Bo(t){if(t<0||t>up){const e=new Error(`Invalid DSL Method idx value: <${t}>
107
- Idx value must be a none negative value smaller than ${up+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class ok{initPerformanceTracer(e){if(q(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=_n.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}=Kg(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 ck(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 Wo=sd(Hn,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Wo);const _n=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:hi,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ko=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var nt;(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"})(nt||(nt={}));function fp(t=void 0){return function(){return t}}class ba{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",()=>{Hg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),K(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=kI({rules:De(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(le(r)&&this.skipValidations===!1){const i=OI({rules:De(this.gastProductionsCache),tokenTypes:De(this.tokensMap),errMsgProvider:Ar,grammarName:n}),s=yI({lookaheadStrategy:this.lookaheadStrategy,rules:De(this.gastProductionsCache),tokenTypes:De(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),le(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=mP(De(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:De(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(De(this.gastProductionsCache))})),!ba.DEFER_DEFINITION_ERRORS_HANDLING&&!le(this.definitionErrors))throw e=j(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
107
+ Idx value must be a none negative value smaller than ${up+1}`);throw e.KNOWN_RECORDER_ERROR=!0,e}}class ok{initPerformanceTracer(e){if(q(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=_n.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}=Kg(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 ck(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 Wo=sd(Vn,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Wo);const _n=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:hi,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Ko=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0});var nt;(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"})(nt||(nt={}));function fp(t=void 0){return function(){return t}}class ba{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",()=>{Vg(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),K(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=kI({rules:De(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(r)}),this.TRACE_INIT("Grammar Validations",()=>{if(le(r)&&this.skipValidations===!1){const i=OI({rules:De(this.gastProductionsCache),tokenTypes:De(this.tokensMap),errMsgProvider:Ar,grammarName:n}),s=yI({lookaheadStrategy:this.lookaheadStrategy,rules:De(this.gastProductionsCache),tokenTypes:De(this.tokensMap),grammarName:n});this.definitionErrors=this.definitionErrors.concat(i,s)}}),le(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{const i=mP(De(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:De(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(De(this.gastProductionsCache))})),!ba.DEFER_DEFINITION_ERRORS_HANDLING&&!le(this.definitionErrors))throw e=j(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
108
108
  ${e.join(`
109
109
  -------------------------------
110
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),q(n,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
111
111
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
112
112
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
113
- For further details.`);this.skipValidations=q(n,"skipValidations")?n.skipValidations:_n.skipValidations}}ba.DEFER_DEFINITION_ERRORS_HANDLING=!1;ck(ba,[FI,UI,ZI,QI,tk,ek,nk,rk,sk,ok]);class uk extends ba{constructor(e,n=_n){const r=Ve(n);r.outputCst=!1,super(e,r)}}function Wy(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function lk(){this.__data__=[],this.size=0}function Ky(t,e){return t===e||t!==t&&e!==e}function Fc(t,e){for(var n=t.length;n--;)if(Ky(t[n][0],e))return n;return-1}var fk=Array.prototype,dk=fk.splice;function hk(t){var e=this.__data__,n=Fc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():dk.call(e,n,1),--this.size,!0}function pk(t){var e=this.__data__,n=Fc(e,t);return n<0?void 0:e[n][1]}function mk(t){return Fc(this.__data__,t)>-1}function gk(t,e){var n=this.__data__,r=Fc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function On(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}On.prototype.clear=lk;On.prototype.delete=hk;On.prototype.get=pk;On.prototype.has=mk;On.prototype.set=gk;function yk(){this.__data__=new On,this.size=0}function Tk(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function vk(t){return this.__data__.get(t)}function $k(t){return this.__data__.has(t)}var Hy=typeof global=="object"&&global&&global.Object===Object&&global,Rk=typeof self=="object"&&self&&self.Object===Object&&self,Ln=Hy||Rk||Function("return this")(),Wt=Ln.Symbol,Vy=Object.prototype,Ek=Vy.hasOwnProperty,Ak=Vy.toString,gs=Wt?Wt.toStringTag:void 0;function _k(t){var e=Ek.call(t,gs),n=t[gs];try{t[gs]=void 0;var r=!0}catch{}var i=Ak.call(t);return r&&(e?t[gs]=n:delete t[gs]),i}var Sk=Object.prototype,bk=Sk.toString;function wk(t){return bk.call(t)}var Ck="[object Null]",Nk="[object Undefined]",dp=Wt?Wt.toStringTag:void 0;function Ki(t){return t==null?t===void 0?Nk:Ck:dp&&dp in Object(t)?_k(t):wk(t)}function ud(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pk="[object AsyncFunction]",Ik="[object Function]",kk="[object GeneratorFunction]",Ok="[object Proxy]";function Yy(t){if(!ud(t))return!1;var e=Ki(t);return e==Ik||e==kk||e==Pk||e==Ok}var fu=Ln["__core-js_shared__"],hp=function(){var t=/[^.]+$/.exec(fu&&fu.keys&&fu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Lk(t){return!!hp&&hp in t}var xk=Function.prototype,Mk=xk.toString;function Ur(t){if(t!=null){try{return Mk.call(t)}catch{}try{return t+""}catch{}}return""}var Dk=/[\\^$.*+?()[\]{}|]/g,Fk=/^\[object .+?Constructor\]$/,Gk=Function.prototype,jk=Object.prototype,Uk=Gk.toString,zk=jk.hasOwnProperty,qk=RegExp("^"+Uk.call(zk).replace(Dk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bk(t){if(!ud(t)||Lk(t))return!1;var e=Yy(t)?qk:Fk;return e.test(Ur(t))}function Wk(t,e){return t==null?void 0:t[e]}function Hi(t,e){var n=Wk(t,e);return Bk(n)?n:void 0}var Qs=Hi(Ln,"Map"),ea=Hi(Object,"create");function Kk(){this.__data__=ea?ea(null):{},this.size=0}function Hk(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Vk="__lodash_hash_undefined__",Yk=Object.prototype,Xk=Yk.hasOwnProperty;function Jk(t){var e=this.__data__;if(ea){var n=e[t];return n===Vk?void 0:n}return Xk.call(e,t)?e[t]:void 0}var Zk=Object.prototype,Qk=Zk.hasOwnProperty;function eO(t){var e=this.__data__;return ea?e[t]!==void 0:Qk.call(e,t)}var tO="__lodash_hash_undefined__";function nO(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ea&&e===void 0?tO:e,this}function kr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kr.prototype.clear=Kk;kr.prototype.delete=Hk;kr.prototype.get=Jk;kr.prototype.has=eO;kr.prototype.set=nO;function rO(){this.size=0,this.__data__={hash:new kr,map:new(Qs||On),string:new kr}}function iO(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Gc(t,e){var n=t.__data__;return iO(e)?n[typeof e=="string"?"string":"hash"]:n.map}function sO(t){var e=Gc(this,t).delete(t);return this.size-=e?1:0,e}function aO(t){return Gc(this,t).get(t)}function oO(t){return Gc(this,t).has(t)}function cO(t,e){var n=Gc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function xn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}xn.prototype.clear=rO;xn.prototype.delete=sO;xn.prototype.get=aO;xn.prototype.has=oO;xn.prototype.set=cO;var uO=200;function lO(t,e){var n=this.__data__;if(n instanceof On){var r=n.__data__;if(!Qs||r.length<uO-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xn(r)}return n.set(t,e),this.size=n.size,this}function Rn(t){var e=this.__data__=new On(t);this.size=e.size}Rn.prototype.clear=yk;Rn.prototype.delete=Tk;Rn.prototype.get=vk;Rn.prototype.has=$k;Rn.prototype.set=lO;var fO="__lodash_hash_undefined__";function dO(t){return this.__data__.set(t,fO),this}function hO(t){return this.__data__.has(t)}function ta(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new xn;++e<n;)this.add(t[e])}ta.prototype.add=ta.prototype.push=dO;ta.prototype.has=hO;function pO(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Xy(t,e){return t.has(e)}var mO=1,gO=2;function Jy(t,e,n,r,i,s){var a=n&mO,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&gO?new ta:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!pO(e,function(A,_){if(!Xy(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}var pp=Ln.Uint8Array;function yO(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function ld(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var TO=1,vO=2,$O="[object Boolean]",RO="[object Date]",EO="[object Error]",AO="[object Map]",_O="[object Number]",SO="[object RegExp]",bO="[object Set]",wO="[object String]",CO="[object Symbol]",NO="[object ArrayBuffer]",PO="[object DataView]",mp=Wt?Wt.prototype:void 0,du=mp?mp.valueOf:void 0;function IO(t,e,n,r,i,s,a){switch(n){case PO:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case NO:return!(t.byteLength!=e.byteLength||!s(new pp(t),new pp(e)));case $O:case RO:case _O:return Ky(+t,+e);case EO:return t.name==e.name&&t.message==e.message;case SO:case wO:return t==e+"";case AO:var o=yO;case bO:var c=r&TO;if(o||(o=ld),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=vO,a.set(t,e);var l=Jy(o(t),o(e),r,i,s,a);return a.delete(t),l;case CO:if(du)return du.call(t)==du.call(e)}return!1}function Zy(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var rt=Array.isArray;function kO(t,e,n){var r=e(t);return rt(t)?r:Zy(r,n(t))}function Qy(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function OO(){return[]}var LO=Object.prototype,xO=LO.propertyIsEnumerable,gp=Object.getOwnPropertySymbols,MO=gp?function(t){return t==null?[]:(t=Object(t),Qy(gp(t),function(e){return xO.call(t,e)}))}:OO;function DO(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Di(t){return t!=null&&typeof t=="object"}var FO="[object Arguments]";function yp(t){return Di(t)&&Ki(t)==FO}var eT=Object.prototype,GO=eT.hasOwnProperty,jO=eT.propertyIsEnumerable,jc=yp(function(){return arguments}())?yp:function(t){return Di(t)&&GO.call(t,"callee")&&!jO.call(t,"callee")};function UO(){return!1}var tT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tp=tT&&typeof module=="object"&&module&&!module.nodeType&&module,zO=Tp&&Tp.exports===tT,vp=zO?Ln.Buffer:void 0,qO=vp?vp.isBuffer:void 0,Ho=qO||UO,BO=9007199254740991,WO=/^(?:0|[1-9]\d*)$/;function nT(t,e){var n=typeof t;return e=e??BO,!!e&&(n=="number"||n!="symbol"&&WO.test(t))&&t>-1&&t%1==0&&t<e}var KO=9007199254740991;function fd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=KO}var HO="[object Arguments]",VO="[object Array]",YO="[object Boolean]",XO="[object Date]",JO="[object Error]",ZO="[object Function]",QO="[object Map]",eL="[object Number]",tL="[object Object]",nL="[object RegExp]",rL="[object Set]",iL="[object String]",sL="[object WeakMap]",aL="[object ArrayBuffer]",oL="[object DataView]",cL="[object Float32Array]",uL="[object Float64Array]",lL="[object Int8Array]",fL="[object Int16Array]",dL="[object Int32Array]",hL="[object Uint8Array]",pL="[object Uint8ClampedArray]",mL="[object Uint16Array]",gL="[object Uint32Array]",pe={};pe[cL]=pe[uL]=pe[lL]=pe[fL]=pe[dL]=pe[hL]=pe[pL]=pe[mL]=pe[gL]=!0;pe[HO]=pe[VO]=pe[aL]=pe[YO]=pe[oL]=pe[XO]=pe[JO]=pe[ZO]=pe[QO]=pe[eL]=pe[tL]=pe[nL]=pe[rL]=pe[iL]=pe[sL]=!1;function yL(t){return Di(t)&&fd(t.length)&&!!pe[Ki(t)]}function TL(t){return function(e){return t(e)}}var rT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qs=rT&&typeof module=="object"&&module&&!module.nodeType&&module,vL=qs&&qs.exports===rT,hu=vL&&Hy.process,$p=function(){try{var t=qs&&qs.require&&qs.require("util").types;return t||hu&&hu.binding&&hu.binding("util")}catch{}}(),Rp=$p&&$p.isTypedArray,dd=Rp?TL(Rp):yL,$L=Object.prototype,RL=$L.hasOwnProperty;function EL(t,e){var n=rt(t),r=!n&&jc(t),i=!n&&!r&&Ho(t),s=!n&&!r&&!i&&dd(t),a=n||r||i||s,o=a?DO(t.length,String):[],c=o.length;for(var u in t)RL.call(t,u)&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nT(u,c)))&&o.push(u);return o}var AL=Object.prototype;function iT(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||AL;return t===n}function _L(t,e){return function(n){return t(e(n))}}var SL=_L(Object.keys,Object),bL=Object.prototype,wL=bL.hasOwnProperty;function sT(t){if(!iT(t))return SL(t);var e=[];for(var n in Object(t))wL.call(t,n)&&n!="constructor"&&e.push(n);return e}function Uc(t){return t!=null&&fd(t.length)&&!Yy(t)}function hd(t){return Uc(t)?EL(t):sT(t)}function Ep(t){return kO(t,hd,MO)}var CL=1,NL=Object.prototype,PL=NL.hasOwnProperty;function IL(t,e,n,r,i,s){var a=n&CL,o=Ep(t),c=o.length,u=Ep(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:PL.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var al=Hi(Ln,"DataView"),ol=Hi(Ln,"Promise"),yi=Hi(Ln,"Set"),cl=Hi(Ln,"WeakMap"),Ap="[object Map]",kL="[object Object]",_p="[object Promise]",Sp="[object Set]",bp="[object WeakMap]",wp="[object DataView]",OL=Ur(al),LL=Ur(Qs),xL=Ur(ol),ML=Ur(yi),DL=Ur(cl),pn=Ki;(al&&pn(new al(new ArrayBuffer(1)))!=wp||Qs&&pn(new Qs)!=Ap||ol&&pn(ol.resolve())!=_p||yi&&pn(new yi)!=Sp||cl&&pn(new cl)!=bp)&&(pn=function(t){var e=Ki(t),n=e==kL?t.constructor:void 0,r=n?Ur(n):"";if(r)switch(r){case OL:return wp;case LL:return Ap;case xL:return _p;case ML:return Sp;case DL:return bp}return e});var FL=1,Cp="[object Arguments]",Np="[object Array]",no="[object Object]",GL=Object.prototype,Pp=GL.hasOwnProperty;function jL(t,e,n,r,i,s){var a=rt(t),o=rt(e),c=a?Np:pn(t),u=o?Np:pn(e);c=c==Cp?no:c,u=u==Cp?no:u;var l=c==no,f=u==no,d=c==u;if(d&&Ho(t)){if(!Ho(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new Rn),a||dd(t)?Jy(t,e,n,r,i,s):IO(t,e,c,n,r,i,s);if(!(n&FL)){var p=l&&Pp.call(t,"__wrapped__"),y=f&&Pp.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new Rn),i(E,C,n,r,s)}}return d?(s||(s=new Rn),IL(t,e,n,r,i,s)):!1}function pd(t,e,n,r,i){return t===e?!0:t==null||e==null||!Di(t)&&!Di(e)?t!==t&&e!==e:jL(t,e,n,r,pd,i)}var UL=1,zL=2;function qL(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new Rn,f;if(!(f===void 0?pd(u,c,UL|zL,r,l):f))return!1}}return!0}function aT(t){return t===t&&!ud(t)}function BL(t){for(var e=hd(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,aT(i)]}return e}function oT(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function WL(t){var e=BL(t);return e.length==1&&e[0][2]?oT(e[0][0],e[0][1]):function(n){return n===t||qL(n,t,e)}}var KL="[object Symbol]";function zc(t){return typeof t=="symbol"||Di(t)&&Ki(t)==KL}var HL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,VL=/^\w*$/;function md(t,e){if(rt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||zc(t)?!0:VL.test(t)||!HL.test(t)||e!=null&&t in Object(e)}var YL="Expected a function";function gd(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(YL);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(gd.Cache||xn),n}gd.Cache=xn;var XL=500;function JL(t){var e=gd(t,function(r){return n.size===XL&&n.clear(),r}),n=e.cache;return e}var ZL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,QL=/\\(\\)?/g,ex=JL(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ZL,function(n,r,i,s){e.push(i?s.replace(QL,"$1"):r||n)}),e}),Ip=Wt?Wt.prototype:void 0,kp=Ip?Ip.toString:void 0;function cT(t){if(typeof t=="string")return t;if(rt(t))return Wy(t,cT)+"";if(zc(t))return kp?kp.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function tx(t){return t==null?"":cT(t)}function uT(t,e){return rt(t)?t:md(t,e)?[t]:ex(tx(t))}function qc(t){if(typeof t=="string"||zc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lT(t,e){e=uT(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[qc(e[n++])];return n&&n==r?t:void 0}function nx(t,e,n){var r=t==null?void 0:lT(t,e);return r===void 0?n:r}function rx(t,e){return t!=null&&e in Object(t)}function ix(t,e,n){e=uT(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=qc(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&fd(i)&&nT(a,i)&&(rt(t)||jc(t)))}function sx(t,e){return t!=null&&ix(t,e,rx)}var ax=1,ox=2;function cx(t,e){return md(t)&&aT(e)?oT(qc(t),e):function(n){var r=nx(n,t);return r===void 0&&r===e?sx(n,t):pd(e,r,ax|ox)}}function yd(t){return t}function ux(t){return function(e){return e==null?void 0:e[t]}}function lx(t){return function(e){return lT(e,t)}}function fx(t){return md(t)?ux(qc(t)):lx(t)}function Bc(t){return typeof t=="function"?t:t==null?yd:typeof t=="object"?rt(t)?cx(t[0],t[1]):WL(t):fx(t)}function dx(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var hx=dx();function px(t,e){return t&&hx(t,e,hd)}function mx(t,e){return function(n,r){if(n==null)return n;if(!Uc(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Wc=mx(px);function gx(t,e){var n=-1,r=Uc(t)?Array(t.length):[];return Wc(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function gn(t,e){var n=rt(t)?Wy:gx;return n(t,Bc(e))}function yx(t,e){var n=[];return Wc(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function Tx(t,e){var n=rt(t)?Qy:yx;return n(t,Bc(e))}function Fi(t,e,n){return`${t.name}_${e}_${n}`}const Vn=1,vx=2,fT=4,dT=5,wa=7,$x=8,Rx=9,Ex=10,Ax=11,hT=12;class Td{constructor(e){this.target=e}isEpsilon(){return!1}}class vd extends Td{constructor(e,n){super(e),this.tokenType=n}}class pT extends Td{constructor(e){super(e)}isEpsilon(){return!0}}class $d extends Td{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function _x(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Sx(e,t);const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=zr(e,i,i);s!==void 0&&Mx(e,i,s)}return e}function Sx(t,e){const n=e.length;for(let r=0;r<n;r++){const i=e[r],s=Ge(t,i,void 0,{type:vx}),a=Ge(t,i,void 0,{type:wa});s.stop=a,t.ruleToStartState.set(i,s),t.ruleToStopState.set(i,a)}}function mT(t,e,n){return n instanceof me?Rd(t,e,n.terminalType,n):n instanceof tt?xx(t,e,n):n instanceof ut?Px(t,e,n):n instanceof He?Ix(t,e,n):n instanceof we?bx(t,e,n):n instanceof ct?wx(t,e,n):n instanceof gt?Cx(t,e,n):n instanceof yt?Nx(t,e,n):zr(t,e,n)}function bx(t,e,n){const r=Ge(t,e,n,{type:dT});Zn(t,r);const i=Vi(t,e,r,n,zr(t,e,n));return yT(t,e,n,i)}function wx(t,e,n){const r=Ge(t,e,n,{type:dT});Zn(t,r);const i=Vi(t,e,r,n,zr(t,e,n)),s=Rd(t,e,n.separator,n);return yT(t,e,n,i,s)}function Cx(t,e,n){const r=Ge(t,e,n,{type:fT});Zn(t,r);const i=Vi(t,e,r,n,zr(t,e,n));return gT(t,e,n,i)}function Nx(t,e,n){const r=Ge(t,e,n,{type:fT});Zn(t,r);const i=Vi(t,e,r,n,zr(t,e,n)),s=Rd(t,e,n.separator,n);return gT(t,e,n,i,s)}function Px(t,e,n){const r=Ge(t,e,n,{type:Vn});Zn(t,r);const i=gn(n.definition,a=>mT(t,e,a));return Vi(t,e,r,n,...i)}function Ix(t,e,n){const r=Ge(t,e,n,{type:Vn});Zn(t,r);const i=Vi(t,e,r,n,zr(t,e,n));return kx(t,e,n,i)}function zr(t,e,n){const r=Tx(gn(n.definition,i=>mT(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:Lx(t,r)}function gT(t,e,n,r,i){const s=r.left,a=r.right,o=Ge(t,e,n,{type:Ax});Zn(t,o);const c=Ge(t,e,n,{type:hT});return s.loopback=o,c.loopback=o,t.decisionMap[Fi(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,Le(a,o),i===void 0?(Le(o,s),Le(o,c)):(Le(o,c),Le(o,i.left),Le(i.right,s)),{left:s,right:c}}function yT(t,e,n,r,i){const s=r.left,a=r.right,o=Ge(t,e,n,{type:Ex});Zn(t,o);const c=Ge(t,e,n,{type:hT}),u=Ge(t,e,n,{type:Rx});return o.loopback=u,c.loopback=u,Le(o,s),Le(o,c),Le(a,u),i!==void 0?(Le(u,c),Le(u,i.left),Le(i.right,s)):Le(u,o),t.decisionMap[Fi(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:c}}function kx(t,e,n,r){const i=r.left,s=r.right;return Le(i,s),t.decisionMap[Fi(e,"Option",n.idx)]=i,r}function Zn(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Vi(t,e,n,r,...i){const s=Ge(t,e,r,{type:$x,start:n});n.end=s;for(const o of i)o!==void 0?(Le(n,o.left),Le(o.right,s)):Le(n,s);const a={left:n,right:s};return t.decisionMap[Fi(e,Ox(r),r.idx)]=n,a}function Ox(t){if(t instanceof ut)return"Alternation";if(t instanceof He)return"Option";if(t instanceof we)return"Repetition";if(t instanceof ct)return"RepetitionWithSeparator";if(t instanceof gt)return"RepetitionMandatory";if(t instanceof yt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Lx(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 $d,u=o,l=e[s+1].left;a.left.type===Vn&&a.right.type===Vn&&o!==void 0&&(c&&u.followState===a.right||o.target===a.right)?(c?u.followState=l:o.target=l,Dx(t,a.right)):Le(a.right,l)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}function Rd(t,e,n,r){const i=Ge(t,e,r,{type:Vn}),s=Ge(t,e,r,{type:Vn});return Ed(i,new vd(s,n)),{left:i,right:s}}function xx(t,e,n){const r=n.referencedRule,i=t.ruleToStartState.get(r),s=Ge(t,e,n,{type:Vn}),a=Ge(t,e,n,{type:Vn}),o=new $d(i,r,a);return Ed(s,o),{left:s,right:a}}function Mx(t,e,n){const r=t.ruleToStartState.get(e);Le(r,n.left);const i=t.ruleToStopState.get(e);return Le(n.right,i),{left:r,right:i}}function Le(t,e){const n=new pT(e);Ed(t,n)}function Ge(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 Ed(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function Dx(t,e){t.states.splice(t.states.indexOf(e),1)}const Vo={};class ul{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const n=TT(e);n in this.map||(this.map[n]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return gn(this.configs,e=>e.alt)}get key(){let e="";for(const n in this.map)e+=n+":";return e}}function TT(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function Fx(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],a=e(s);if(a!=null&&(o===void 0?a===a&&!zc(a):n(a,o)))var o=a,c=s}return c}function Gx(t,e){return t<e}function jx(t){return t&&t.length?Fx(t,yd,Gx):void 0}var Op=Wt?Wt.isConcatSpreadable:void 0;function Ux(t){return rt(t)||jc(t)||!!(Op&&t&&t[Op])}function vT(t,e,n,r,i){var s=-1,a=t.length;for(n||(n=Ux),i||(i=[]);++s<a;){var o=t[s];n(o)?Zy(i,o):i[i.length]=o}return i}function zx(t,e){return vT(gn(t,e))}function qx(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Bx(t){return t!==t}function Wx(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kx(t,e,n){return e===e?Wx(t,e,n):qx(t,Bx,n)}function Hx(t,e){var n=t==null?0:t.length;return!!n&&Kx(t,e,0)>-1}function Vx(){}var Yx=1/0,Xx=yi&&1/ld(new yi([,-0]))[1]==Yx?function(t){return new yi(t)}:Vx,Jx=200;function Zx(t,e,n){var r=-1,i=Hx,s=t.length,a=!0,o=[],c=o;if(s>=Jx){var u=e?null:Xx(t);if(u)return ld(u);a=!1,i=Xy,c=new ta}else c=e?[]:o;e:for(;++r<s;){var l=t[r],f=e?e(l):l;if(l=l!==0?l:0,a&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;e&&c.push(f),o.push(l)}else i(c,f,n)||(c!==o&&c.push(f),o.push(l))}return o}function Qx(t,e){return t&&t.length?Zx(t,Bc(e)):[]}function e1(t){var e=t==null?0:t.length;return e?vT(t):[]}function t1(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function n1(t){return typeof t=="function"?t:yd}function pu(t,e){var n=rt(t)?t1:Wc;return n(t,n1(e))}var r1="[object Map]",i1="[object Set]",s1=Object.prototype,a1=s1.hasOwnProperty;function o1(t){if(t==null)return!0;if(Uc(t)&&(rt(t)||typeof t=="string"||typeof t.splice=="function"||Ho(t)||dd(t)||jc(t)))return!t.length;var e=pn(t);if(e==r1||e==i1)return!t.size;if(iT(t))return!sT(t).length;for(var n in t)if(a1.call(t,n))return!1;return!0}function c1(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function u1(t,e,n,r,i){return i(t,function(s,a,o){n=r?(r=!1,s):e(n,s,a,o)}),n}function Lp(t,e,n){var r=rt(t)?c1:u1,i=arguments.length<3;return r(t,Bc(e),n,i,Wc)}function l1(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 $T{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 xp=new $T;class f1 extends cd{constructor(e){var n;super(),this.logging=(n=e==null?void 0:e.logging)!==null&&n!==void 0?n:r=>console.log(r)}initialize(e){this.atn=_x(e.rules),this.dfas=d1(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=Fi(r,"Alternation",n),l=this.atn.decisionMap[c].decision,f=gn(ip({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),d=>gn(d,p=>p[0]));if(Mp(f,!1)&&!s){const d=Lp(f,(p,y,E)=>(pu(y,C=>{C&&(p[C.tokenTypeIdx]=E,pu(C.categoryMatches,A=>{p[A]=E}))}),p),{});return i?function(p){var y;const E=this.LA(1),C=d[E.tokenTypeIdx];if(p!==void 0&&C!==void 0){const A=(y=p[C])===null||y===void 0?void 0:y.GATE;if(A!==void 0&&A.call(this)===!1)return}return C}:function(){const p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){const p=new $T,y=d===void 0?0:d.length;for(let C=0;C<y;C++){const A=d==null?void 0:d[C].GATE;p.set(C,A===void 0||A.call(this))}const E=mu.call(this,a,l,p,o);return typeof E=="number"?E:void 0}:function(){const d=mu.call(this,a,l,xp,o);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:n,rule:r,prodType:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=Fi(r,i,n),l=this.atn.decisionMap[c].decision,f=gn(ip({maxLookahead:1,occurrence:n,prodType:i,rule:r}),d=>gn(d,p=>p[0]));if(Mp(f)&&f[0][0]&&!s){const d=f[0],p=e1(d);if(p.length===1&&o1(p[0].categoryMatches)){const E=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===E}}else{const y=Lp(p,(E,C)=>(C!==void 0&&(E[C.tokenTypeIdx]=!0,pu(C.categoryMatches,A=>{E[A]=!0})),E),{});return function(){const E=this.LA(1);return y[E.tokenTypeIdx]===!0}}}return function(){const d=mu.call(this,a,l,xp,o);return typeof d=="object"?!1:d===0}}}function Mp(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 d1(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=l1(t.decisionStates[r],r);return n}function mu(t,e,n,r){const i=t[e](n);let s=i.start;if(s===void 0){const o=A1(i.atnStartState);s=ET(i,RT(o)),i.start=s}return h1.apply(this,[i,s,n,r])}function h1(t,e,n,r){let i=e,s=1;const a=[];let o=this.LA(s++);for(;;){let c=v1(i,o);if(c===void 0&&(c=p1.apply(this,[t,i,o,s,n,r])),c===Vo)return T1(a,i,o);if(c.isAcceptState===!0)return c.prediction;i=c,a.push(o),o=this.LA(s++)}}function p1(t,e,n,r,i,s){const a=$1(e.configs,n,i);if(a.size===0)return Dp(t,e,n,Vo),Vo;let o=RT(a);const c=E1(a,i);if(c!==void 0)o.isAcceptState=!0,o.prediction=c,o.configs.uniqueAlt=c;else if(w1(a)){const u=jx(a.alts);o.isAcceptState=!0,o.prediction=u,o.configs.uniqueAlt=u,m1.apply(this,[t,r,a.alts,s])}return o=Dp(t,e,n,o),o}function m1(t,e,n,r){const i=[];for(let u=1;u<=e;u++)i.push(this.LA(u).tokenType);const s=t.atnStartState,a=s.rule,o=s.production,c=g1({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function g1(t){const e=gn(t.prefixPath,i=>gi(i)).join(", "),n=t.production.idx===0?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${y1(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,
113
+ For further details.`);this.skipValidations=q(n,"skipValidations")?n.skipValidations:_n.skipValidations}}ba.DEFER_DEFINITION_ERRORS_HANDLING=!1;ck(ba,[FI,UI,ZI,QI,tk,ek,nk,rk,sk,ok]);class uk extends ba{constructor(e,n=_n){const r=He(n);r.outputCst=!1,super(e,r)}}function Wy(t,e){for(var n=-1,r=t==null?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function lk(){this.__data__=[],this.size=0}function Ky(t,e){return t===e||t!==t&&e!==e}function Fc(t,e){for(var n=t.length;n--;)if(Ky(t[n][0],e))return n;return-1}var fk=Array.prototype,dk=fk.splice;function hk(t){var e=this.__data__,n=Fc(e,t);if(n<0)return!1;var r=e.length-1;return n==r?e.pop():dk.call(e,n,1),--this.size,!0}function pk(t){var e=this.__data__,n=Fc(e,t);return n<0?void 0:e[n][1]}function mk(t){return Fc(this.__data__,t)>-1}function gk(t,e){var n=this.__data__,r=Fc(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}function On(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}On.prototype.clear=lk;On.prototype.delete=hk;On.prototype.get=pk;On.prototype.has=mk;On.prototype.set=gk;function yk(){this.__data__=new On,this.size=0}function Tk(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}function vk(t){return this.__data__.get(t)}function $k(t){return this.__data__.has(t)}var Vy=typeof global=="object"&&global&&global.Object===Object&&global,Rk=typeof self=="object"&&self&&self.Object===Object&&self,Ln=Vy||Rk||Function("return this")(),Wt=Ln.Symbol,Hy=Object.prototype,Ek=Hy.hasOwnProperty,Ak=Hy.toString,gs=Wt?Wt.toStringTag:void 0;function _k(t){var e=Ek.call(t,gs),n=t[gs];try{t[gs]=void 0;var r=!0}catch{}var i=Ak.call(t);return r&&(e?t[gs]=n:delete t[gs]),i}var Sk=Object.prototype,bk=Sk.toString;function wk(t){return bk.call(t)}var Ck="[object Null]",Nk="[object Undefined]",dp=Wt?Wt.toStringTag:void 0;function Ki(t){return t==null?t===void 0?Nk:Ck:dp&&dp in Object(t)?_k(t):wk(t)}function ud(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Pk="[object AsyncFunction]",Ik="[object Function]",kk="[object GeneratorFunction]",Ok="[object Proxy]";function Yy(t){if(!ud(t))return!1;var e=Ki(t);return e==Ik||e==kk||e==Pk||e==Ok}var fu=Ln["__core-js_shared__"],hp=function(){var t=/[^.]+$/.exec(fu&&fu.keys&&fu.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function Lk(t){return!!hp&&hp in t}var xk=Function.prototype,Mk=xk.toString;function Ur(t){if(t!=null){try{return Mk.call(t)}catch{}try{return t+""}catch{}}return""}var Dk=/[\\^$.*+?()[\]{}|]/g,Fk=/^\[object .+?Constructor\]$/,Gk=Function.prototype,jk=Object.prototype,Uk=Gk.toString,zk=jk.hasOwnProperty,qk=RegExp("^"+Uk.call(zk).replace(Dk,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Bk(t){if(!ud(t)||Lk(t))return!1;var e=Yy(t)?qk:Fk;return e.test(Ur(t))}function Wk(t,e){return t==null?void 0:t[e]}function Vi(t,e){var n=Wk(t,e);return Bk(n)?n:void 0}var Qs=Vi(Ln,"Map"),ea=Vi(Object,"create");function Kk(){this.__data__=ea?ea(null):{},this.size=0}function Vk(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Hk="__lodash_hash_undefined__",Yk=Object.prototype,Xk=Yk.hasOwnProperty;function Jk(t){var e=this.__data__;if(ea){var n=e[t];return n===Hk?void 0:n}return Xk.call(e,t)?e[t]:void 0}var Zk=Object.prototype,Qk=Zk.hasOwnProperty;function eO(t){var e=this.__data__;return ea?e[t]!==void 0:Qk.call(e,t)}var tO="__lodash_hash_undefined__";function nO(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ea&&e===void 0?tO:e,this}function kr(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}kr.prototype.clear=Kk;kr.prototype.delete=Vk;kr.prototype.get=Jk;kr.prototype.has=eO;kr.prototype.set=nO;function rO(){this.size=0,this.__data__={hash:new kr,map:new(Qs||On),string:new kr}}function iO(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Gc(t,e){var n=t.__data__;return iO(e)?n[typeof e=="string"?"string":"hash"]:n.map}function sO(t){var e=Gc(this,t).delete(t);return this.size-=e?1:0,e}function aO(t){return Gc(this,t).get(t)}function oO(t){return Gc(this,t).has(t)}function cO(t,e){var n=Gc(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this}function xn(t){var e=-1,n=t==null?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}xn.prototype.clear=rO;xn.prototype.delete=sO;xn.prototype.get=aO;xn.prototype.has=oO;xn.prototype.set=cO;var uO=200;function lO(t,e){var n=this.__data__;if(n instanceof On){var r=n.__data__;if(!Qs||r.length<uO-1)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new xn(r)}return n.set(t,e),this.size=n.size,this}function Rn(t){var e=this.__data__=new On(t);this.size=e.size}Rn.prototype.clear=yk;Rn.prototype.delete=Tk;Rn.prototype.get=vk;Rn.prototype.has=$k;Rn.prototype.set=lO;var fO="__lodash_hash_undefined__";function dO(t){return this.__data__.set(t,fO),this}function hO(t){return this.__data__.has(t)}function ta(t){var e=-1,n=t==null?0:t.length;for(this.__data__=new xn;++e<n;)this.add(t[e])}ta.prototype.add=ta.prototype.push=dO;ta.prototype.has=hO;function pO(t,e){for(var n=-1,r=t==null?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Xy(t,e){return t.has(e)}var mO=1,gO=2;function Jy(t,e,n,r,i,s){var a=n&mO,o=t.length,c=e.length;if(o!=c&&!(a&&c>o))return!1;var u=s.get(t),l=s.get(e);if(u&&l)return u==e&&l==t;var f=-1,d=!0,p=n&gO?new ta:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var y=t[f],E=e[f];if(r)var C=a?r(E,y,f,e,t,s):r(y,E,f,t,e,s);if(C!==void 0){if(C)continue;d=!1;break}if(p){if(!pO(e,function(A,_){if(!Xy(p,_)&&(y===A||i(y,A,n,r,s)))return p.push(_)})){d=!1;break}}else if(!(y===E||i(y,E,n,r,s))){d=!1;break}}return s.delete(t),s.delete(e),d}var pp=Ln.Uint8Array;function yO(t){var e=-1,n=Array(t.size);return t.forEach(function(r,i){n[++e]=[i,r]}),n}function ld(t){var e=-1,n=Array(t.size);return t.forEach(function(r){n[++e]=r}),n}var TO=1,vO=2,$O="[object Boolean]",RO="[object Date]",EO="[object Error]",AO="[object Map]",_O="[object Number]",SO="[object RegExp]",bO="[object Set]",wO="[object String]",CO="[object Symbol]",NO="[object ArrayBuffer]",PO="[object DataView]",mp=Wt?Wt.prototype:void 0,du=mp?mp.valueOf:void 0;function IO(t,e,n,r,i,s,a){switch(n){case PO:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case NO:return!(t.byteLength!=e.byteLength||!s(new pp(t),new pp(e)));case $O:case RO:case _O:return Ky(+t,+e);case EO:return t.name==e.name&&t.message==e.message;case SO:case wO:return t==e+"";case AO:var o=yO;case bO:var c=r&TO;if(o||(o=ld),t.size!=e.size&&!c)return!1;var u=a.get(t);if(u)return u==e;r|=vO,a.set(t,e);var l=Jy(o(t),o(e),r,i,s,a);return a.delete(t),l;case CO:if(du)return du.call(t)==du.call(e)}return!1}function Zy(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var rt=Array.isArray;function kO(t,e,n){var r=e(t);return rt(t)?r:Zy(r,n(t))}function Qy(t,e){for(var n=-1,r=t==null?0:t.length,i=0,s=[];++n<r;){var a=t[n];e(a,n,t)&&(s[i++]=a)}return s}function OO(){return[]}var LO=Object.prototype,xO=LO.propertyIsEnumerable,gp=Object.getOwnPropertySymbols,MO=gp?function(t){return t==null?[]:(t=Object(t),Qy(gp(t),function(e){return xO.call(t,e)}))}:OO;function DO(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Di(t){return t!=null&&typeof t=="object"}var FO="[object Arguments]";function yp(t){return Di(t)&&Ki(t)==FO}var eT=Object.prototype,GO=eT.hasOwnProperty,jO=eT.propertyIsEnumerable,jc=yp(function(){return arguments}())?yp:function(t){return Di(t)&&GO.call(t,"callee")&&!jO.call(t,"callee")};function UO(){return!1}var tT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Tp=tT&&typeof module=="object"&&module&&!module.nodeType&&module,zO=Tp&&Tp.exports===tT,vp=zO?Ln.Buffer:void 0,qO=vp?vp.isBuffer:void 0,Vo=qO||UO,BO=9007199254740991,WO=/^(?:0|[1-9]\d*)$/;function nT(t,e){var n=typeof t;return e=e??BO,!!e&&(n=="number"||n!="symbol"&&WO.test(t))&&t>-1&&t%1==0&&t<e}var KO=9007199254740991;function fd(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=KO}var VO="[object Arguments]",HO="[object Array]",YO="[object Boolean]",XO="[object Date]",JO="[object Error]",ZO="[object Function]",QO="[object Map]",eL="[object Number]",tL="[object Object]",nL="[object RegExp]",rL="[object Set]",iL="[object String]",sL="[object WeakMap]",aL="[object ArrayBuffer]",oL="[object DataView]",cL="[object Float32Array]",uL="[object Float64Array]",lL="[object Int8Array]",fL="[object Int16Array]",dL="[object Int32Array]",hL="[object Uint8Array]",pL="[object Uint8ClampedArray]",mL="[object Uint16Array]",gL="[object Uint32Array]",pe={};pe[cL]=pe[uL]=pe[lL]=pe[fL]=pe[dL]=pe[hL]=pe[pL]=pe[mL]=pe[gL]=!0;pe[VO]=pe[HO]=pe[aL]=pe[YO]=pe[oL]=pe[XO]=pe[JO]=pe[ZO]=pe[QO]=pe[eL]=pe[tL]=pe[nL]=pe[rL]=pe[iL]=pe[sL]=!1;function yL(t){return Di(t)&&fd(t.length)&&!!pe[Ki(t)]}function TL(t){return function(e){return t(e)}}var rT=typeof exports=="object"&&exports&&!exports.nodeType&&exports,qs=rT&&typeof module=="object"&&module&&!module.nodeType&&module,vL=qs&&qs.exports===rT,hu=vL&&Vy.process,$p=function(){try{var t=qs&&qs.require&&qs.require("util").types;return t||hu&&hu.binding&&hu.binding("util")}catch{}}(),Rp=$p&&$p.isTypedArray,dd=Rp?TL(Rp):yL,$L=Object.prototype,RL=$L.hasOwnProperty;function EL(t,e){var n=rt(t),r=!n&&jc(t),i=!n&&!r&&Vo(t),s=!n&&!r&&!i&&dd(t),a=n||r||i||s,o=a?DO(t.length,String):[],c=o.length;for(var u in t)RL.call(t,u)&&!(a&&(u=="length"||i&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||nT(u,c)))&&o.push(u);return o}var AL=Object.prototype;function iT(t){var e=t&&t.constructor,n=typeof e=="function"&&e.prototype||AL;return t===n}function _L(t,e){return function(n){return t(e(n))}}var SL=_L(Object.keys,Object),bL=Object.prototype,wL=bL.hasOwnProperty;function sT(t){if(!iT(t))return SL(t);var e=[];for(var n in Object(t))wL.call(t,n)&&n!="constructor"&&e.push(n);return e}function Uc(t){return t!=null&&fd(t.length)&&!Yy(t)}function hd(t){return Uc(t)?EL(t):sT(t)}function Ep(t){return kO(t,hd,MO)}var CL=1,NL=Object.prototype,PL=NL.hasOwnProperty;function IL(t,e,n,r,i,s){var a=n&CL,o=Ep(t),c=o.length,u=Ep(e),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var d=o[f];if(!(a?d in e:PL.call(e,d)))return!1}var p=s.get(t),y=s.get(e);if(p&&y)return p==e&&y==t;var E=!0;s.set(t,e),s.set(e,t);for(var C=a;++f<c;){d=o[f];var A=t[d],_=e[d];if(r)var b=a?r(_,A,d,e,t,s):r(A,_,d,t,e,s);if(!(b===void 0?A===_||i(A,_,n,r,s):b)){E=!1;break}C||(C=d=="constructor")}if(E&&!C){var I=t.constructor,U=e.constructor;I!=U&&"constructor"in t&&"constructor"in e&&!(typeof I=="function"&&I instanceof I&&typeof U=="function"&&U instanceof U)&&(E=!1)}return s.delete(t),s.delete(e),E}var al=Vi(Ln,"DataView"),ol=Vi(Ln,"Promise"),yi=Vi(Ln,"Set"),cl=Vi(Ln,"WeakMap"),Ap="[object Map]",kL="[object Object]",_p="[object Promise]",Sp="[object Set]",bp="[object WeakMap]",wp="[object DataView]",OL=Ur(al),LL=Ur(Qs),xL=Ur(ol),ML=Ur(yi),DL=Ur(cl),pn=Ki;(al&&pn(new al(new ArrayBuffer(1)))!=wp||Qs&&pn(new Qs)!=Ap||ol&&pn(ol.resolve())!=_p||yi&&pn(new yi)!=Sp||cl&&pn(new cl)!=bp)&&(pn=function(t){var e=Ki(t),n=e==kL?t.constructor:void 0,r=n?Ur(n):"";if(r)switch(r){case OL:return wp;case LL:return Ap;case xL:return _p;case ML:return Sp;case DL:return bp}return e});var FL=1,Cp="[object Arguments]",Np="[object Array]",no="[object Object]",GL=Object.prototype,Pp=GL.hasOwnProperty;function jL(t,e,n,r,i,s){var a=rt(t),o=rt(e),c=a?Np:pn(t),u=o?Np:pn(e);c=c==Cp?no:c,u=u==Cp?no:u;var l=c==no,f=u==no,d=c==u;if(d&&Vo(t)){if(!Vo(e))return!1;a=!0,l=!1}if(d&&!l)return s||(s=new Rn),a||dd(t)?Jy(t,e,n,r,i,s):IO(t,e,c,n,r,i,s);if(!(n&FL)){var p=l&&Pp.call(t,"__wrapped__"),y=f&&Pp.call(e,"__wrapped__");if(p||y){var E=p?t.value():t,C=y?e.value():e;return s||(s=new Rn),i(E,C,n,r,s)}}return d?(s||(s=new Rn),IL(t,e,n,r,i,s)):!1}function pd(t,e,n,r,i){return t===e?!0:t==null||e==null||!Di(t)&&!Di(e)?t!==t&&e!==e:jL(t,e,n,r,pd,i)}var UL=1,zL=2;function qL(t,e,n,r){var i=n.length,s=i;if(t==null)return!s;for(t=Object(t);i--;){var a=n[i];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<s;){a=n[i];var o=a[0],c=t[o],u=a[1];if(a[2]){if(c===void 0&&!(o in t))return!1}else{var l=new Rn,f;if(!(f===void 0?pd(u,c,UL|zL,r,l):f))return!1}}return!0}function aT(t){return t===t&&!ud(t)}function BL(t){for(var e=hd(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,aT(i)]}return e}function oT(t,e){return function(n){return n==null?!1:n[t]===e&&(e!==void 0||t in Object(n))}}function WL(t){var e=BL(t);return e.length==1&&e[0][2]?oT(e[0][0],e[0][1]):function(n){return n===t||qL(n,t,e)}}var KL="[object Symbol]";function zc(t){return typeof t=="symbol"||Di(t)&&Ki(t)==KL}var VL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,HL=/^\w*$/;function md(t,e){if(rt(t))return!1;var n=typeof t;return n=="number"||n=="symbol"||n=="boolean"||t==null||zc(t)?!0:HL.test(t)||!VL.test(t)||e!=null&&t in Object(e)}var YL="Expected a function";function gd(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(YL);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],s=n.cache;if(s.has(i))return s.get(i);var a=t.apply(this,r);return n.cache=s.set(i,a)||s,a};return n.cache=new(gd.Cache||xn),n}gd.Cache=xn;var XL=500;function JL(t){var e=gd(t,function(r){return n.size===XL&&n.clear(),r}),n=e.cache;return e}var ZL=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,QL=/\\(\\)?/g,ex=JL(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(ZL,function(n,r,i,s){e.push(i?s.replace(QL,"$1"):r||n)}),e}),Ip=Wt?Wt.prototype:void 0,kp=Ip?Ip.toString:void 0;function cT(t){if(typeof t=="string")return t;if(rt(t))return Wy(t,cT)+"";if(zc(t))return kp?kp.call(t):"";var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function tx(t){return t==null?"":cT(t)}function uT(t,e){return rt(t)?t:md(t,e)?[t]:ex(tx(t))}function qc(t){if(typeof t=="string"||zc(t))return t;var e=t+"";return e=="0"&&1/t==-1/0?"-0":e}function lT(t,e){e=uT(e,t);for(var n=0,r=e.length;t!=null&&n<r;)t=t[qc(e[n++])];return n&&n==r?t:void 0}function nx(t,e,n){var r=t==null?void 0:lT(t,e);return r===void 0?n:r}function rx(t,e){return t!=null&&e in Object(t)}function ix(t,e,n){e=uT(e,t);for(var r=-1,i=e.length,s=!1;++r<i;){var a=qc(e[r]);if(!(s=t!=null&&n(t,a)))break;t=t[a]}return s||++r!=i?s:(i=t==null?0:t.length,!!i&&fd(i)&&nT(a,i)&&(rt(t)||jc(t)))}function sx(t,e){return t!=null&&ix(t,e,rx)}var ax=1,ox=2;function cx(t,e){return md(t)&&aT(e)?oT(qc(t),e):function(n){var r=nx(n,t);return r===void 0&&r===e?sx(n,t):pd(e,r,ax|ox)}}function yd(t){return t}function ux(t){return function(e){return e==null?void 0:e[t]}}function lx(t){return function(e){return lT(e,t)}}function fx(t){return md(t)?ux(qc(t)):lx(t)}function Bc(t){return typeof t=="function"?t:t==null?yd:typeof t=="object"?rt(t)?cx(t[0],t[1]):WL(t):fx(t)}function dx(t){return function(e,n,r){for(var i=-1,s=Object(e),a=r(e),o=a.length;o--;){var c=a[++i];if(n(s[c],c,s)===!1)break}return e}}var hx=dx();function px(t,e){return t&&hx(t,e,hd)}function mx(t,e){return function(n,r){if(n==null)return n;if(!Uc(n))return t(n,r);for(var i=n.length,s=-1,a=Object(n);++s<i&&r(a[s],s,a)!==!1;);return n}}var Wc=mx(px);function gx(t,e){var n=-1,r=Uc(t)?Array(t.length):[];return Wc(t,function(i,s,a){r[++n]=e(i,s,a)}),r}function gn(t,e){var n=rt(t)?Wy:gx;return n(t,Bc(e))}function yx(t,e){var n=[];return Wc(t,function(r,i,s){e(r,i,s)&&n.push(r)}),n}function Tx(t,e){var n=rt(t)?Qy:yx;return n(t,Bc(e))}function Fi(t,e,n){return`${t.name}_${e}_${n}`}const Hn=1,vx=2,fT=4,dT=5,wa=7,$x=8,Rx=9,Ex=10,Ax=11,hT=12;class Td{constructor(e){this.target=e}isEpsilon(){return!1}}class vd extends Td{constructor(e,n){super(e),this.tokenType=n}}class pT extends Td{constructor(e){super(e)}isEpsilon(){return!0}}class $d extends Td{constructor(e,n,r){super(e),this.rule=n,this.followState=r}isEpsilon(){return!0}}function _x(t){const e={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};Sx(e,t);const n=t.length;for(let r=0;r<n;r++){const i=t[r],s=zr(e,i,i);s!==void 0&&Mx(e,i,s)}return e}function Sx(t,e){const n=e.length;for(let r=0;r<n;r++){const i=e[r],s=Ge(t,i,void 0,{type:vx}),a=Ge(t,i,void 0,{type:wa});s.stop=a,t.ruleToStartState.set(i,s),t.ruleToStopState.set(i,a)}}function mT(t,e,n){return n instanceof me?Rd(t,e,n.terminalType,n):n instanceof tt?xx(t,e,n):n instanceof ut?Px(t,e,n):n instanceof Ve?Ix(t,e,n):n instanceof we?bx(t,e,n):n instanceof ct?wx(t,e,n):n instanceof gt?Cx(t,e,n):n instanceof yt?Nx(t,e,n):zr(t,e,n)}function bx(t,e,n){const r=Ge(t,e,n,{type:dT});Zn(t,r);const i=Hi(t,e,r,n,zr(t,e,n));return yT(t,e,n,i)}function wx(t,e,n){const r=Ge(t,e,n,{type:dT});Zn(t,r);const i=Hi(t,e,r,n,zr(t,e,n)),s=Rd(t,e,n.separator,n);return yT(t,e,n,i,s)}function Cx(t,e,n){const r=Ge(t,e,n,{type:fT});Zn(t,r);const i=Hi(t,e,r,n,zr(t,e,n));return gT(t,e,n,i)}function Nx(t,e,n){const r=Ge(t,e,n,{type:fT});Zn(t,r);const i=Hi(t,e,r,n,zr(t,e,n)),s=Rd(t,e,n.separator,n);return gT(t,e,n,i,s)}function Px(t,e,n){const r=Ge(t,e,n,{type:Hn});Zn(t,r);const i=gn(n.definition,a=>mT(t,e,a));return Hi(t,e,r,n,...i)}function Ix(t,e,n){const r=Ge(t,e,n,{type:Hn});Zn(t,r);const i=Hi(t,e,r,n,zr(t,e,n));return kx(t,e,n,i)}function zr(t,e,n){const r=Tx(gn(n.definition,i=>mT(t,e,i)),i=>i!==void 0);return r.length===1?r[0]:r.length===0?void 0:Lx(t,r)}function gT(t,e,n,r,i){const s=r.left,a=r.right,o=Ge(t,e,n,{type:Ax});Zn(t,o);const c=Ge(t,e,n,{type:hT});return s.loopback=o,c.loopback=o,t.decisionMap[Fi(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",n.idx)]=o,Le(a,o),i===void 0?(Le(o,s),Le(o,c)):(Le(o,c),Le(o,i.left),Le(i.right,s)),{left:s,right:c}}function yT(t,e,n,r,i){const s=r.left,a=r.right,o=Ge(t,e,n,{type:Ex});Zn(t,o);const c=Ge(t,e,n,{type:hT}),u=Ge(t,e,n,{type:Rx});return o.loopback=u,c.loopback=u,Le(o,s),Le(o,c),Le(a,u),i!==void 0?(Le(u,c),Le(u,i.left),Le(i.right,s)):Le(u,o),t.decisionMap[Fi(e,i?"RepetitionWithSeparator":"Repetition",n.idx)]=o,{left:o,right:c}}function kx(t,e,n,r){const i=r.left,s=r.right;return Le(i,s),t.decisionMap[Fi(e,"Option",n.idx)]=i,r}function Zn(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function Hi(t,e,n,r,...i){const s=Ge(t,e,r,{type:$x,start:n});n.end=s;for(const o of i)o!==void 0?(Le(n,o.left),Le(o.right,s)):Le(n,s);const a={left:n,right:s};return t.decisionMap[Fi(e,Ox(r),r.idx)]=n,a}function Ox(t){if(t instanceof ut)return"Alternation";if(t instanceof Ve)return"Option";if(t instanceof we)return"Repetition";if(t instanceof ct)return"RepetitionWithSeparator";if(t instanceof gt)return"RepetitionMandatory";if(t instanceof yt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Lx(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 $d,u=o,l=e[s+1].left;a.left.type===Hn&&a.right.type===Hn&&o!==void 0&&(c&&u.followState===a.right||o.target===a.right)?(c?u.followState=l:o.target=l,Dx(t,a.right)):Le(a.right,l)}const r=e[0],i=e[n-1];return{left:r.left,right:i.right}}function Rd(t,e,n,r){const i=Ge(t,e,r,{type:Hn}),s=Ge(t,e,r,{type:Hn});return Ed(i,new vd(s,n)),{left:i,right:s}}function xx(t,e,n){const r=n.referencedRule,i=t.ruleToStartState.get(r),s=Ge(t,e,n,{type:Hn}),a=Ge(t,e,n,{type:Hn}),o=new $d(i,r,a);return Ed(s,o),{left:s,right:a}}function Mx(t,e,n){const r=t.ruleToStartState.get(e);Le(r,n.left);const i=t.ruleToStopState.get(e);return Le(n.right,i),{left:r,right:i}}function Le(t,e){const n=new pT(e);Ed(t,n)}function Ge(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 Ed(t,e){t.transitions.length===0&&(t.epsilonOnlyTransitions=e.isEpsilon()),t.transitions.push(e)}function Dx(t,e){t.states.splice(t.states.indexOf(e),1)}const Ho={};class ul{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){const n=TT(e);n in this.map||(this.map[n]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return gn(this.configs,e=>e.alt)}get key(){let e="";for(const n in this.map)e+=n+":";return e}}function TT(t,e=!0){return`${e?`a${t.alt}`:""}s${t.state.stateNumber}:${t.stack.map(n=>n.stateNumber.toString()).join("_")}`}function Fx(t,e,n){for(var r=-1,i=t.length;++r<i;){var s=t[r],a=e(s);if(a!=null&&(o===void 0?a===a&&!zc(a):n(a,o)))var o=a,c=s}return c}function Gx(t,e){return t<e}function jx(t){return t&&t.length?Fx(t,yd,Gx):void 0}var Op=Wt?Wt.isConcatSpreadable:void 0;function Ux(t){return rt(t)||jc(t)||!!(Op&&t&&t[Op])}function vT(t,e,n,r,i){var s=-1,a=t.length;for(n||(n=Ux),i||(i=[]);++s<a;){var o=t[s];n(o)?Zy(i,o):i[i.length]=o}return i}function zx(t,e){return vT(gn(t,e))}function qx(t,e,n,r){for(var i=t.length,s=n+-1;++s<i;)if(e(t[s],s,t))return s;return-1}function Bx(t){return t!==t}function Wx(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}function Kx(t,e,n){return e===e?Wx(t,e,n):qx(t,Bx,n)}function Vx(t,e){var n=t==null?0:t.length;return!!n&&Kx(t,e,0)>-1}function Hx(){}var Yx=1/0,Xx=yi&&1/ld(new yi([,-0]))[1]==Yx?function(t){return new yi(t)}:Hx,Jx=200;function Zx(t,e,n){var r=-1,i=Vx,s=t.length,a=!0,o=[],c=o;if(s>=Jx){var u=e?null:Xx(t);if(u)return ld(u);a=!1,i=Xy,c=new ta}else c=e?[]:o;e:for(;++r<s;){var l=t[r],f=e?e(l):l;if(l=l!==0?l:0,a&&f===f){for(var d=c.length;d--;)if(c[d]===f)continue e;e&&c.push(f),o.push(l)}else i(c,f,n)||(c!==o&&c.push(f),o.push(l))}return o}function Qx(t,e){return t&&t.length?Zx(t,Bc(e)):[]}function e1(t){var e=t==null?0:t.length;return e?vT(t):[]}function t1(t,e){for(var n=-1,r=t==null?0:t.length;++n<r&&e(t[n],n,t)!==!1;);return t}function n1(t){return typeof t=="function"?t:yd}function pu(t,e){var n=rt(t)?t1:Wc;return n(t,n1(e))}var r1="[object Map]",i1="[object Set]",s1=Object.prototype,a1=s1.hasOwnProperty;function o1(t){if(t==null)return!0;if(Uc(t)&&(rt(t)||typeof t=="string"||typeof t.splice=="function"||Vo(t)||dd(t)||jc(t)))return!t.length;var e=pn(t);if(e==r1||e==i1)return!t.size;if(iT(t))return!sT(t).length;for(var n in t)if(a1.call(t,n))return!1;return!0}function c1(t,e,n,r){var i=-1,s=t==null?0:t.length;for(r&&s&&(n=t[++i]);++i<s;)n=e(n,t[i],i,t);return n}function u1(t,e,n,r,i){return i(t,function(s,a,o){n=r?(r=!1,s):e(n,s,a,o)}),n}function Lp(t,e,n){var r=rt(t)?c1:u1,i=arguments.length<3;return r(t,Bc(e),n,i,Wc)}function l1(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 $T{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 xp=new $T;class f1 extends cd{constructor(e){var n;super(),this.logging=(n=e==null?void 0:e.logging)!==null&&n!==void 0?n:r=>console.log(r)}initialize(e){this.atn=_x(e.rules),this.dfas=d1(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=Fi(r,"Alternation",n),l=this.atn.decisionMap[c].decision,f=gn(ip({maxLookahead:1,occurrence:n,prodType:"Alternation",rule:r}),d=>gn(d,p=>p[0]));if(Mp(f,!1)&&!s){const d=Lp(f,(p,y,E)=>(pu(y,C=>{C&&(p[C.tokenTypeIdx]=E,pu(C.categoryMatches,A=>{p[A]=E}))}),p),{});return i?function(p){var y;const E=this.LA(1),C=d[E.tokenTypeIdx];if(p!==void 0&&C!==void 0){const A=(y=p[C])===null||y===void 0?void 0:y.GATE;if(A!==void 0&&A.call(this)===!1)return}return C}:function(){const p=this.LA(1);return d[p.tokenTypeIdx]}}else return i?function(d){const p=new $T,y=d===void 0?0:d.length;for(let C=0;C<y;C++){const A=d==null?void 0:d[C].GATE;p.set(C,A===void 0||A.call(this))}const E=mu.call(this,a,l,p,o);return typeof E=="number"?E:void 0}:function(){const d=mu.call(this,a,l,xp,o);return typeof d=="number"?d:void 0}}buildLookaheadForOptional(e){const{prodOccurrence:n,rule:r,prodType:i,dynamicTokensEnabled:s}=e,a=this.dfas,o=this.logging,c=Fi(r,i,n),l=this.atn.decisionMap[c].decision,f=gn(ip({maxLookahead:1,occurrence:n,prodType:i,rule:r}),d=>gn(d,p=>p[0]));if(Mp(f)&&f[0][0]&&!s){const d=f[0],p=e1(d);if(p.length===1&&o1(p[0].categoryMatches)){const E=p[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===E}}else{const y=Lp(p,(E,C)=>(C!==void 0&&(E[C.tokenTypeIdx]=!0,pu(C.categoryMatches,A=>{E[A]=!0})),E),{});return function(){const E=this.LA(1);return y[E.tokenTypeIdx]===!0}}}return function(){const d=mu.call(this,a,l,xp,o);return typeof d=="object"?!1:d===0}}}function Mp(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 d1(t){const e=t.decisionStates.length,n=Array(e);for(let r=0;r<e;r++)n[r]=l1(t.decisionStates[r],r);return n}function mu(t,e,n,r){const i=t[e](n);let s=i.start;if(s===void 0){const o=A1(i.atnStartState);s=ET(i,RT(o)),i.start=s}return h1.apply(this,[i,s,n,r])}function h1(t,e,n,r){let i=e,s=1;const a=[];let o=this.LA(s++);for(;;){let c=v1(i,o);if(c===void 0&&(c=p1.apply(this,[t,i,o,s,n,r])),c===Ho)return T1(a,i,o);if(c.isAcceptState===!0)return c.prediction;i=c,a.push(o),o=this.LA(s++)}}function p1(t,e,n,r,i,s){const a=$1(e.configs,n,i);if(a.size===0)return Dp(t,e,n,Ho),Ho;let o=RT(a);const c=E1(a,i);if(c!==void 0)o.isAcceptState=!0,o.prediction=c,o.configs.uniqueAlt=c;else if(w1(a)){const u=jx(a.alts);o.isAcceptState=!0,o.prediction=u,o.configs.uniqueAlt=u,m1.apply(this,[t,r,a.alts,s])}return o=Dp(t,e,n,o),o}function m1(t,e,n,r){const i=[];for(let u=1;u<=e;u++)i.push(this.LA(u).tokenType);const s=t.atnStartState,a=s.rule,o=s.production,c=g1({topLevelRule:a,ambiguityIndices:n,production:o,prefixPath:i});r(c)}function g1(t){const e=gn(t.prefixPath,i=>gi(i)).join(", "),n=t.production.idx===0?"":t.production.idx;let r=`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${y1(t.production)}${n}> inside <${t.topLevelRule.name}> Rule,
114
114
  <${e}> may appears as a prefix path in all these alternatives.
115
115
  `;return r=r+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
116
- For Further details.`,r}function y1(t){if(t instanceof tt)return"SUBRULE";if(t instanceof He)return"OPTION";if(t instanceof ut)return"OR";if(t instanceof gt)return"AT_LEAST_ONE";if(t instanceof yt)return"AT_LEAST_ONE_SEP";if(t instanceof ct)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof me)return"CONSUME";throw Error("non exhaustive match")}function T1(t,e,n){const r=zx(e.configs.elements,s=>s.state.transitions),i=Qx(r.filter(s=>s instanceof vd).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function v1(t,e){return t.edges[e.tokenTypeIdx]}function $1(t,e,n){const r=new ul,i=[];for(const a of t.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===wa){i.push(a);continue}const o=a.state.transitions.length;for(let c=0;c<o;c++){const u=a.state.transitions[c],l=R1(u,e);l!==void 0&&r.add({state:l,alt:a.alt,stack:a.stack})}}let s;if(i.length===0&&r.size===1&&(s=r),s===void 0){s=new ul;for(const a of r.elements)Yo(a,s)}if(i.length>0&&!S1(s))for(const a of i)s.add(a);return s}function R1(t,e){if(t instanceof vd&&by(e,t.tokenType))return t.target}function E1(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 RT(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Dp(t,e,n,r){return r=ET(t,r),e.edges[n.tokenTypeIdx]=r,r}function ET(t,e){if(e===Vo)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 A1(t){const e=new ul,n=t.transitions.length;for(let r=0;r<n;r++){const s={state:t.transitions[r].target,alt:r,stack:[]};Yo(s,e)}return e}function Yo(t,e){const n=t.state;if(n.type===wa){if(t.stack.length>0){const i=[...t.stack],a={state:i.pop(),alt:t.alt,stack:i};Yo(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=_1(t,s);a!==void 0&&Yo(a,e)}}function _1(t,e){if(e instanceof pT)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof $d){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}function S1(t){for(const e of t.elements)if(e.state.type===wa)return!0;return!1}function b1(t){for(const e of t.elements)if(e.state.type!==wa)return!1;return!0}function w1(t){if(b1(t))return!0;const e=C1(t.elements);return N1(e)&&!P1(e)}function C1(t){const e=new Map;for(const n of t){const r=TT(n,!1);let i=e.get(r);i===void 0&&(i={},e.set(r,i)),i[n.alt]=!0}return e}function N1(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function P1(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var ll;(function(t){function e(n){return typeof n=="string"}t.is=e})(ll||(ll={}));var Xo;(function(t){function e(n){return typeof n=="string"}t.is=e})(Xo||(Xo={}));var fl;(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})(fl||(fl={}));var na;(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})(na||(na={}));var ne;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=na.MAX_VALUE),i===Number.MAX_VALUE&&(i=na.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.line)&&R.uinteger(i.character)}t.is=n})(ne||(ne={}));var X;(function(t){function e(r,i,s,a){if(R.uinteger(r)&&R.uinteger(i)&&R.uinteger(s)&&R.uinteger(a))return{start:ne.create(r,i),end:ne.create(s,a)};if(ne.is(r)&&ne.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 R.objectLiteral(i)&&ne.is(i.start)&&ne.is(i.end)}t.is=n})(X||(X={}));var ra;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&X.is(i.range)&&(R.string(i.uri)||R.undefined(i.uri))}t.is=n})(ra||(ra={}));var dl;(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 R.objectLiteral(i)&&X.is(i.targetRange)&&R.string(i.targetUri)&&X.is(i.targetSelectionRange)&&(X.is(i.originSelectionRange)||R.undefined(i.originSelectionRange))}t.is=n})(dl||(dl={}));var Jo;(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 R.objectLiteral(i)&&R.numberRange(i.red,0,1)&&R.numberRange(i.green,0,1)&&R.numberRange(i.blue,0,1)&&R.numberRange(i.alpha,0,1)}t.is=n})(Jo||(Jo={}));var hl;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&X.is(i.range)&&Jo.is(i.color)}t.is=n})(hl||(hl={}));var pl;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.undefined(i.textEdit)||Bt.is(i))&&(R.undefined(i.additionalTextEdits)||R.typedArray(i.additionalTextEdits,Bt.is))}t.is=n})(pl||(pl={}));var ml;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(ml||(ml={}));var gl;(function(t){function e(r,i,s,a,o,c){const u={startLine:r,endLine:i};return R.defined(s)&&(u.startCharacter=s),R.defined(a)&&(u.endCharacter=a),R.defined(o)&&(u.kind=o),R.defined(c)&&(u.collapsedText=c),u}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&R.uinteger(i.startLine)&&R.uinteger(i.startLine)&&(R.undefined(i.startCharacter)||R.uinteger(i.startCharacter))&&(R.undefined(i.endCharacter)||R.uinteger(i.endCharacter))&&(R.undefined(i.kind)||R.string(i.kind))}t.is=n})(gl||(gl={}));var Zo;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&ra.is(i.location)&&R.string(i.message)}t.is=n})(Zo||(Zo={}));var yl;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(yl||(yl={}));var Tl;(function(t){t.Unnecessary=1,t.Deprecated=2})(Tl||(Tl={}));var vl;(function(t){function e(n){const r=n;return R.objectLiteral(r)&&R.string(r.href)}t.is=e})(vl||(vl={}));var ia;(function(t){function e(r,i,s,a,o,c){let u={range:r,message:i};return R.defined(s)&&(u.severity=s),R.defined(a)&&(u.code=a),R.defined(o)&&(u.source=o),R.defined(c)&&(u.relatedInformation=c),u}t.create=e;function n(r){var i;let s=r;return R.defined(s)&&X.is(s.range)&&R.string(s.message)&&(R.number(s.severity)||R.undefined(s.severity))&&(R.integer(s.code)||R.string(s.code)||R.undefined(s.code))&&(R.undefined(s.codeDescription)||R.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(R.string(s.source)||R.undefined(s.source))&&(R.undefined(s.relatedInformation)||R.typedArray(s.relatedInformation,Zo.is))}t.is=n})(ia||(ia={}));var Or;(function(t){function e(r,i,...s){let a={title:r,command:i};return R.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.title)&&R.string(i.command)}t.is=n})(Or||(Or={}));var Bt;(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 R.objectLiteral(a)&&R.string(a.newText)&&X.is(a.range)}t.is=i})(Bt||(Bt={}));var _r;(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 R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}t.is=n})(_r||(_r={}));var Ke;(function(t){function e(n){const r=n;return R.string(r)}t.is=e})(Ke||(Ke={}));var mn;(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 Bt.is(a)&&(_r.is(a.annotationId)||Ke.is(a.annotationId))}t.is=i})(mn||(mn={}));var sa;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&aa.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(sa||(sa={}));var Gi;(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"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(Gi||(Gi={}));var ji;(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"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(ji||(ji={}));var Ui;(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"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(Ui||(Ui={}));var Qo;(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=>R.string(i.kind)?Gi.is(i)||ji.is(i)||Ui.is(i):sa.is(i)))}t.is=e})(Qo||(Qo={}));class ro{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,s;if(r===void 0?i=Bt.insert(e,n):Ke.is(r)?(s=r,i=mn.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=mn.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=Bt.replace(e,n):Ke.is(r)?(s=r,i=mn.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=mn.replace(e,n,s)),this.edits.push(i),s!==void 0)return s}delete(e,n){let r,i;if(n===void 0?r=Bt.del(e):Ke.is(n)?(i=n,r=mn.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=mn.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 Fp{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(Ke.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 I1{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Fp(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if(sa.is(n)){const r=new ro(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{const r=new ro(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(aa.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 ro(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 ro(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Fp,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;_r.is(n)||Ke.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Gi.create(e,r):(a=Ke.is(i)?i:this._changeAnnotations.manage(i),s=Gi.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;_r.is(r)||Ke.is(r)?s=r:i=r;let a,o;if(s===void 0?a=ji.create(e,n,i):(o=Ke.is(s)?s:this._changeAnnotations.manage(s),a=ji.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;_r.is(n)||Ke.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Ui.create(e,r):(a=Ke.is(i)?i:this._changeAnnotations.manage(i),s=Ui.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}}var $l;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)}t.is=n})($l||($l={}));var Rl;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}t.is=n})(Rl||(Rl={}));var aa;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}t.is=n})(aa||(aa={}));var El;(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 R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}t.is=n})(El||(El={}));var ec;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(ec||(ec={}));var zi;(function(t){function e(n){const r=n;return R.objectLiteral(n)&&ec.is(r.kind)&&R.string(r.value)}t.is=e})(zi||(zi={}));var Al;(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})(Al||(Al={}));var _l;(function(t){t.PlainText=1,t.Snippet=2})(_l||(_l={}));var Sl;(function(t){t.Deprecated=1})(Sl||(Sl={}));var bl;(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&&R.string(i.newText)&&X.is(i.insert)&&X.is(i.replace)}t.is=n})(bl||(bl={}));var wl;(function(t){t.asIs=1,t.adjustIndentation=2})(wl||(wl={}));var Cl;(function(t){function e(n){const r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}t.is=e})(Cl||(Cl={}));var Nl;(function(t){function e(n){return{label:n}}t.create=e})(Nl||(Nl={}));var Pl;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Pl||(Pl={}));var oa;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}t.is=n})(oa||(oa={}));var Il;(function(t){function e(n){let r=n;return!!r&&R.objectLiteral(r)&&(zi.is(r.contents)||oa.is(r.contents)||R.typedArray(r.contents,oa.is))&&(n.range===void 0||X.is(n.range))}t.is=e})(Il||(Il={}));var kl;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(kl||(kl={}));var Ol;(function(t){function e(n,r,...i){let s={label:n};return R.defined(r)&&(s.documentation=r),R.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Ol||(Ol={}));var Ll;(function(t){t.Text=1,t.Read=2,t.Write=3})(Ll||(Ll={}));var xl;(function(t){function e(n,r){let i={range:n};return R.number(r)&&(i.kind=r),i}t.create=e})(xl||(xl={}));var Ml;(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})(Ml||(Ml={}));var Dl;(function(t){t.Deprecated=1})(Dl||(Dl={}));var Fl;(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})(Fl||(Fl={}));var Gl;(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})(Gl||(Gl={}));var jl;(function(t){function e(r,i,s,a,o,c){let u={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(u.children=c),u}t.create=e;function n(r){let i=r;return i&&R.string(i.name)&&R.number(i.kind)&&X.is(i.range)&&X.is(i.selectionRange)&&(i.detail===void 0||R.string(i.detail))&&(i.deprecated===void 0||R.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(jl||(jl={}));var Ul;(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"})(Ul||(Ul={}));var ca;(function(t){t.Invoked=1,t.Automatic=2})(ca||(ca={}));var zl;(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 R.defined(i)&&R.typedArray(i.diagnostics,ia.is)&&(i.only===void 0||R.typedArray(i.only,R.string))&&(i.triggerKind===void 0||i.triggerKind===ca.Invoked||i.triggerKind===ca.Automatic)}t.is=n})(zl||(zl={}));var ql;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Or.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&&R.string(i.title)&&(i.diagnostics===void 0||R.typedArray(i.diagnostics,ia.is))&&(i.kind===void 0||R.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Or.is(i.command))&&(i.isPreferred===void 0||R.boolean(i.isPreferred))&&(i.edit===void 0||Qo.is(i.edit))}t.is=n})(ql||(ql={}));var Bl;(function(t){function e(r,i){let s={range:r};return R.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return R.defined(i)&&X.is(i.range)&&(R.undefined(i.command)||Or.is(i.command))}t.is=n})(Bl||(Bl={}));var Wl;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.uinteger(i.tabSize)&&R.boolean(i.insertSpaces)}t.is=n})(Wl||(Wl={}));var Kl;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return R.defined(i)&&X.is(i.range)&&(R.undefined(i.target)||R.string(i.target))}t.is=n})(Kl||(Kl={}));var Hl;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&X.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(Hl||(Hl={}));var Vl;(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"})(Vl||(Vl={}));var Yl;(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"})(Yl||(Yl={}));var Xl;(function(t){function e(n){const r=n;return R.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})(Xl||(Xl={}));var Jl;(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)&&R.string(i.text)}t.is=n})(Jl||(Jl={}));var Zl;(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)&&R.boolean(i.caseSensitiveLookup)&&(R.string(i.variableName)||i.variableName===void 0)}t.is=n})(Zl||(Zl={}));var Ql;(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)&&(R.string(i.expression)||i.expression===void 0)}t.is=n})(Ql||(Ql={}));var ef;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return R.defined(i)&&X.is(r.stoppedLocation)}t.is=n})(ef||(ef={}));var tc;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(tc||(tc={}));var nc;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&(i.tooltip===void 0||R.string(i.tooltip)||zi.is(i.tooltip))&&(i.location===void 0||ra.is(i.location))&&(i.command===void 0||Or.is(i.command))}t.is=n})(nc||(nc={}));var tf;(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 R.objectLiteral(i)&&ne.is(i.position)&&(R.string(i.label)||R.typedArray(i.label,nc.is))&&(i.kind===void 0||tc.is(i.kind))&&i.textEdits===void 0||R.typedArray(i.textEdits,Bt.is)&&(i.tooltip===void 0||R.string(i.tooltip)||zi.is(i.tooltip))&&(i.paddingLeft===void 0||R.boolean(i.paddingLeft))&&(i.paddingRight===void 0||R.boolean(i.paddingRight))}t.is=n})(tf||(tf={}));var nf;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(nf||(nf={}));var rf;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(rf||(rf={}));var sf;(function(t){function e(n){return{items:n}}t.create=e})(sf||(sf={}));var af;(function(t){t.Invoked=0,t.Automatic=1})(af||(af={}));var of;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(of||(of={}));var cf;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(cf||(cf={}));var uf;(function(t){function e(n){const r=n;return R.objectLiteral(r)&&Xo.is(r.uri)&&R.string(r.name)}t.is=e})(uf||(uf={}));const k1=[`
116
+ For Further details.`,r}function y1(t){if(t instanceof tt)return"SUBRULE";if(t instanceof Ve)return"OPTION";if(t instanceof ut)return"OR";if(t instanceof gt)return"AT_LEAST_ONE";if(t instanceof yt)return"AT_LEAST_ONE_SEP";if(t instanceof ct)return"MANY_SEP";if(t instanceof we)return"MANY";if(t instanceof me)return"CONSUME";throw Error("non exhaustive match")}function T1(t,e,n){const r=zx(e.configs.elements,s=>s.state.transitions),i=Qx(r.filter(s=>s instanceof vd).map(s=>s.tokenType),s=>s.tokenTypeIdx);return{actualToken:n,possibleTokenTypes:i,tokenPath:t}}function v1(t,e){return t.edges[e.tokenTypeIdx]}function $1(t,e,n){const r=new ul,i=[];for(const a of t.elements){if(n.is(a.alt)===!1)continue;if(a.state.type===wa){i.push(a);continue}const o=a.state.transitions.length;for(let c=0;c<o;c++){const u=a.state.transitions[c],l=R1(u,e);l!==void 0&&r.add({state:l,alt:a.alt,stack:a.stack})}}let s;if(i.length===0&&r.size===1&&(s=r),s===void 0){s=new ul;for(const a of r.elements)Yo(a,s)}if(i.length>0&&!S1(s))for(const a of i)s.add(a);return s}function R1(t,e){if(t instanceof vd&&by(e,t.tokenType))return t.target}function E1(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 RT(t){return{configs:t,edges:{},isAcceptState:!1,prediction:-1}}function Dp(t,e,n,r){return r=ET(t,r),e.edges[n.tokenTypeIdx]=r,r}function ET(t,e){if(e===Ho)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 A1(t){const e=new ul,n=t.transitions.length;for(let r=0;r<n;r++){const s={state:t.transitions[r].target,alt:r,stack:[]};Yo(s,e)}return e}function Yo(t,e){const n=t.state;if(n.type===wa){if(t.stack.length>0){const i=[...t.stack],a={state:i.pop(),alt:t.alt,stack:i};Yo(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=_1(t,s);a!==void 0&&Yo(a,e)}}function _1(t,e){if(e instanceof pT)return{state:e.target,alt:t.alt,stack:t.stack};if(e instanceof $d){const n=[...t.stack,e.followState];return{state:e.target,alt:t.alt,stack:n}}}function S1(t){for(const e of t.elements)if(e.state.type===wa)return!0;return!1}function b1(t){for(const e of t.elements)if(e.state.type!==wa)return!1;return!0}function w1(t){if(b1(t))return!0;const e=C1(t.elements);return N1(e)&&!P1(e)}function C1(t){const e=new Map;for(const n of t){const r=TT(n,!1);let i=e.get(r);i===void 0&&(i={},e.set(r,i)),i[n.alt]=!0}return e}function N1(t){for(const e of Array.from(t.values()))if(Object.keys(e).length>1)return!0;return!1}function P1(t){for(const e of Array.from(t.values()))if(Object.keys(e).length===1)return!0;return!1}var ll;(function(t){function e(n){return typeof n=="string"}t.is=e})(ll||(ll={}));var Xo;(function(t){function e(n){return typeof n=="string"}t.is=e})(Xo||(Xo={}));var fl;(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})(fl||(fl={}));var na;(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})(na||(na={}));var ne;(function(t){function e(r,i){return r===Number.MAX_VALUE&&(r=na.MAX_VALUE),i===Number.MAX_VALUE&&(i=na.MAX_VALUE),{line:r,character:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&R.uinteger(i.line)&&R.uinteger(i.character)}t.is=n})(ne||(ne={}));var X;(function(t){function e(r,i,s,a){if(R.uinteger(r)&&R.uinteger(i)&&R.uinteger(s)&&R.uinteger(a))return{start:ne.create(r,i),end:ne.create(s,a)};if(ne.is(r)&&ne.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 R.objectLiteral(i)&&ne.is(i.start)&&ne.is(i.end)}t.is=n})(X||(X={}));var ra;(function(t){function e(r,i){return{uri:r,range:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&X.is(i.range)&&(R.string(i.uri)||R.undefined(i.uri))}t.is=n})(ra||(ra={}));var dl;(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 R.objectLiteral(i)&&X.is(i.targetRange)&&R.string(i.targetUri)&&X.is(i.targetSelectionRange)&&(X.is(i.originSelectionRange)||R.undefined(i.originSelectionRange))}t.is=n})(dl||(dl={}));var Jo;(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 R.objectLiteral(i)&&R.numberRange(i.red,0,1)&&R.numberRange(i.green,0,1)&&R.numberRange(i.blue,0,1)&&R.numberRange(i.alpha,0,1)}t.is=n})(Jo||(Jo={}));var hl;(function(t){function e(r,i){return{range:r,color:i}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&X.is(i.range)&&Jo.is(i.color)}t.is=n})(hl||(hl={}));var pl;(function(t){function e(r,i,s){return{label:r,textEdit:i,additionalTextEdits:s}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&R.string(i.label)&&(R.undefined(i.textEdit)||Bt.is(i))&&(R.undefined(i.additionalTextEdits)||R.typedArray(i.additionalTextEdits,Bt.is))}t.is=n})(pl||(pl={}));var ml;(function(t){t.Comment="comment",t.Imports="imports",t.Region="region"})(ml||(ml={}));var gl;(function(t){function e(r,i,s,a,o,c){const u={startLine:r,endLine:i};return R.defined(s)&&(u.startCharacter=s),R.defined(a)&&(u.endCharacter=a),R.defined(o)&&(u.kind=o),R.defined(c)&&(u.collapsedText=c),u}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&R.uinteger(i.startLine)&&R.uinteger(i.startLine)&&(R.undefined(i.startCharacter)||R.uinteger(i.startCharacter))&&(R.undefined(i.endCharacter)||R.uinteger(i.endCharacter))&&(R.undefined(i.kind)||R.string(i.kind))}t.is=n})(gl||(gl={}));var Zo;(function(t){function e(r,i){return{location:r,message:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&ra.is(i.location)&&R.string(i.message)}t.is=n})(Zo||(Zo={}));var yl;(function(t){t.Error=1,t.Warning=2,t.Information=3,t.Hint=4})(yl||(yl={}));var Tl;(function(t){t.Unnecessary=1,t.Deprecated=2})(Tl||(Tl={}));var vl;(function(t){function e(n){const r=n;return R.objectLiteral(r)&&R.string(r.href)}t.is=e})(vl||(vl={}));var ia;(function(t){function e(r,i,s,a,o,c){let u={range:r,message:i};return R.defined(s)&&(u.severity=s),R.defined(a)&&(u.code=a),R.defined(o)&&(u.source=o),R.defined(c)&&(u.relatedInformation=c),u}t.create=e;function n(r){var i;let s=r;return R.defined(s)&&X.is(s.range)&&R.string(s.message)&&(R.number(s.severity)||R.undefined(s.severity))&&(R.integer(s.code)||R.string(s.code)||R.undefined(s.code))&&(R.undefined(s.codeDescription)||R.string((i=s.codeDescription)===null||i===void 0?void 0:i.href))&&(R.string(s.source)||R.undefined(s.source))&&(R.undefined(s.relatedInformation)||R.typedArray(s.relatedInformation,Zo.is))}t.is=n})(ia||(ia={}));var Or;(function(t){function e(r,i,...s){let a={title:r,command:i};return R.defined(s)&&s.length>0&&(a.arguments=s),a}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.title)&&R.string(i.command)}t.is=n})(Or||(Or={}));var Bt;(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 R.objectLiteral(a)&&R.string(a.newText)&&X.is(a.range)}t.is=i})(Bt||(Bt={}));var _r;(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 R.objectLiteral(i)&&R.string(i.label)&&(R.boolean(i.needsConfirmation)||i.needsConfirmation===void 0)&&(R.string(i.description)||i.description===void 0)}t.is=n})(_r||(_r={}));var Ke;(function(t){function e(n){const r=n;return R.string(r)}t.is=e})(Ke||(Ke={}));var mn;(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 Bt.is(a)&&(_r.is(a.annotationId)||Ke.is(a.annotationId))}t.is=i})(mn||(mn={}));var sa;(function(t){function e(r,i){return{textDocument:r,edits:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&aa.is(i.textDocument)&&Array.isArray(i.edits)}t.is=n})(sa||(sa={}));var Gi;(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"&&R.string(i.uri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(Gi||(Gi={}));var ji;(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"&&R.string(i.oldUri)&&R.string(i.newUri)&&(i.options===void 0||(i.options.overwrite===void 0||R.boolean(i.options.overwrite))&&(i.options.ignoreIfExists===void 0||R.boolean(i.options.ignoreIfExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(ji||(ji={}));var Ui;(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"&&R.string(i.uri)&&(i.options===void 0||(i.options.recursive===void 0||R.boolean(i.options.recursive))&&(i.options.ignoreIfNotExists===void 0||R.boolean(i.options.ignoreIfNotExists)))&&(i.annotationId===void 0||Ke.is(i.annotationId))}t.is=n})(Ui||(Ui={}));var Qo;(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=>R.string(i.kind)?Gi.is(i)||ji.is(i)||Ui.is(i):sa.is(i)))}t.is=e})(Qo||(Qo={}));class ro{constructor(e,n){this.edits=e,this.changeAnnotations=n}insert(e,n,r){let i,s;if(r===void 0?i=Bt.insert(e,n):Ke.is(r)?(s=r,i=mn.insert(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=mn.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=Bt.replace(e,n):Ke.is(r)?(s=r,i=mn.replace(e,n,r)):(this.assertChangeAnnotations(this.changeAnnotations),s=this.changeAnnotations.manage(r),i=mn.replace(e,n,s)),this.edits.push(i),s!==void 0)return s}delete(e,n){let r,i;if(n===void 0?r=Bt.del(e):Ke.is(n)?(i=n,r=mn.del(e,n)):(this.assertChangeAnnotations(this.changeAnnotations),i=this.changeAnnotations.manage(n),r=mn.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 Fp{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(Ke.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 I1{constructor(e){this._textEditChanges=Object.create(null),e!==void 0?(this._workspaceEdit=e,e.documentChanges?(this._changeAnnotations=new Fp(e.changeAnnotations),e.changeAnnotations=this._changeAnnotations.all(),e.documentChanges.forEach(n=>{if(sa.is(n)){const r=new ro(n.edits,this._changeAnnotations);this._textEditChanges[n.textDocument.uri]=r}})):e.changes&&Object.keys(e.changes).forEach(n=>{const r=new ro(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(aa.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 ro(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 ro(r),this._textEditChanges[e]=n}return n}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new Fp,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;_r.is(n)||Ke.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Gi.create(e,r):(a=Ke.is(i)?i:this._changeAnnotations.manage(i),s=Gi.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;_r.is(r)||Ke.is(r)?s=r:i=r;let a,o;if(s===void 0?a=ji.create(e,n,i):(o=Ke.is(s)?s:this._changeAnnotations.manage(s),a=ji.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;_r.is(n)||Ke.is(n)?i=n:r=n;let s,a;if(i===void 0?s=Ui.create(e,r):(a=Ke.is(i)?i:this._changeAnnotations.manage(i),s=Ui.create(e,r,a)),this._workspaceEdit.documentChanges.push(s),a!==void 0)return a}}var $l;(function(t){function e(r){return{uri:r}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)}t.is=n})($l||($l={}));var Rl;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&R.integer(i.version)}t.is=n})(Rl||(Rl={}));var aa;(function(t){function e(r,i){return{uri:r,version:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.string(i.uri)&&(i.version===null||R.integer(i.version))}t.is=n})(aa||(aa={}));var El;(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 R.defined(i)&&R.string(i.uri)&&R.string(i.languageId)&&R.integer(i.version)&&R.string(i.text)}t.is=n})(El||(El={}));var ec;(function(t){t.PlainText="plaintext",t.Markdown="markdown";function e(n){const r=n;return r===t.PlainText||r===t.Markdown}t.is=e})(ec||(ec={}));var zi;(function(t){function e(n){const r=n;return R.objectLiteral(n)&&ec.is(r.kind)&&R.string(r.value)}t.is=e})(zi||(zi={}));var Al;(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})(Al||(Al={}));var _l;(function(t){t.PlainText=1,t.Snippet=2})(_l||(_l={}));var Sl;(function(t){t.Deprecated=1})(Sl||(Sl={}));var bl;(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&&R.string(i.newText)&&X.is(i.insert)&&X.is(i.replace)}t.is=n})(bl||(bl={}));var wl;(function(t){t.asIs=1,t.adjustIndentation=2})(wl||(wl={}));var Cl;(function(t){function e(n){const r=n;return r&&(R.string(r.detail)||r.detail===void 0)&&(R.string(r.description)||r.description===void 0)}t.is=e})(Cl||(Cl={}));var Nl;(function(t){function e(n){return{label:n}}t.create=e})(Nl||(Nl={}));var Pl;(function(t){function e(n,r){return{items:n||[],isIncomplete:!!r}}t.create=e})(Pl||(Pl={}));var oa;(function(t){function e(r){return r.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}t.fromPlainText=e;function n(r){const i=r;return R.string(i)||R.objectLiteral(i)&&R.string(i.language)&&R.string(i.value)}t.is=n})(oa||(oa={}));var Il;(function(t){function e(n){let r=n;return!!r&&R.objectLiteral(r)&&(zi.is(r.contents)||oa.is(r.contents)||R.typedArray(r.contents,oa.is))&&(n.range===void 0||X.is(n.range))}t.is=e})(Il||(Il={}));var kl;(function(t){function e(n,r){return r?{label:n,documentation:r}:{label:n}}t.create=e})(kl||(kl={}));var Ol;(function(t){function e(n,r,...i){let s={label:n};return R.defined(r)&&(s.documentation=r),R.defined(i)?s.parameters=i:s.parameters=[],s}t.create=e})(Ol||(Ol={}));var Ll;(function(t){t.Text=1,t.Read=2,t.Write=3})(Ll||(Ll={}));var xl;(function(t){function e(n,r){let i={range:n};return R.number(r)&&(i.kind=r),i}t.create=e})(xl||(xl={}));var Ml;(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})(Ml||(Ml={}));var Dl;(function(t){t.Deprecated=1})(Dl||(Dl={}));var Fl;(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})(Fl||(Fl={}));var Gl;(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})(Gl||(Gl={}));var jl;(function(t){function e(r,i,s,a,o,c){let u={name:r,detail:i,kind:s,range:a,selectionRange:o};return c!==void 0&&(u.children=c),u}t.create=e;function n(r){let i=r;return i&&R.string(i.name)&&R.number(i.kind)&&X.is(i.range)&&X.is(i.selectionRange)&&(i.detail===void 0||R.string(i.detail))&&(i.deprecated===void 0||R.boolean(i.deprecated))&&(i.children===void 0||Array.isArray(i.children))&&(i.tags===void 0||Array.isArray(i.tags))}t.is=n})(jl||(jl={}));var Ul;(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"})(Ul||(Ul={}));var ca;(function(t){t.Invoked=1,t.Automatic=2})(ca||(ca={}));var zl;(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 R.defined(i)&&R.typedArray(i.diagnostics,ia.is)&&(i.only===void 0||R.typedArray(i.only,R.string))&&(i.triggerKind===void 0||i.triggerKind===ca.Invoked||i.triggerKind===ca.Automatic)}t.is=n})(zl||(zl={}));var ql;(function(t){function e(r,i,s){let a={title:r},o=!0;return typeof i=="string"?(o=!1,a.kind=i):Or.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&&R.string(i.title)&&(i.diagnostics===void 0||R.typedArray(i.diagnostics,ia.is))&&(i.kind===void 0||R.string(i.kind))&&(i.edit!==void 0||i.command!==void 0)&&(i.command===void 0||Or.is(i.command))&&(i.isPreferred===void 0||R.boolean(i.isPreferred))&&(i.edit===void 0||Qo.is(i.edit))}t.is=n})(ql||(ql={}));var Bl;(function(t){function e(r,i){let s={range:r};return R.defined(i)&&(s.data=i),s}t.create=e;function n(r){let i=r;return R.defined(i)&&X.is(i.range)&&(R.undefined(i.command)||Or.is(i.command))}t.is=n})(Bl||(Bl={}));var Wl;(function(t){function e(r,i){return{tabSize:r,insertSpaces:i}}t.create=e;function n(r){let i=r;return R.defined(i)&&R.uinteger(i.tabSize)&&R.boolean(i.insertSpaces)}t.is=n})(Wl||(Wl={}));var Kl;(function(t){function e(r,i,s){return{range:r,target:i,data:s}}t.create=e;function n(r){let i=r;return R.defined(i)&&X.is(i.range)&&(R.undefined(i.target)||R.string(i.target))}t.is=n})(Kl||(Kl={}));var Vl;(function(t){function e(r,i){return{range:r,parent:i}}t.create=e;function n(r){let i=r;return R.objectLiteral(i)&&X.is(i.range)&&(i.parent===void 0||t.is(i.parent))}t.is=n})(Vl||(Vl={}));var Hl;(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"})(Hl||(Hl={}));var Yl;(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"})(Yl||(Yl={}));var Xl;(function(t){function e(n){const r=n;return R.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})(Xl||(Xl={}));var Jl;(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)&&R.string(i.text)}t.is=n})(Jl||(Jl={}));var Zl;(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)&&R.boolean(i.caseSensitiveLookup)&&(R.string(i.variableName)||i.variableName===void 0)}t.is=n})(Zl||(Zl={}));var Ql;(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)&&(R.string(i.expression)||i.expression===void 0)}t.is=n})(Ql||(Ql={}));var ef;(function(t){function e(r,i){return{frameId:r,stoppedLocation:i}}t.create=e;function n(r){const i=r;return R.defined(i)&&X.is(r.stoppedLocation)}t.is=n})(ef||(ef={}));var tc;(function(t){t.Type=1,t.Parameter=2;function e(n){return n===1||n===2}t.is=e})(tc||(tc={}));var nc;(function(t){function e(r){return{value:r}}t.create=e;function n(r){const i=r;return R.objectLiteral(i)&&(i.tooltip===void 0||R.string(i.tooltip)||zi.is(i.tooltip))&&(i.location===void 0||ra.is(i.location))&&(i.command===void 0||Or.is(i.command))}t.is=n})(nc||(nc={}));var tf;(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 R.objectLiteral(i)&&ne.is(i.position)&&(R.string(i.label)||R.typedArray(i.label,nc.is))&&(i.kind===void 0||tc.is(i.kind))&&i.textEdits===void 0||R.typedArray(i.textEdits,Bt.is)&&(i.tooltip===void 0||R.string(i.tooltip)||zi.is(i.tooltip))&&(i.paddingLeft===void 0||R.boolean(i.paddingLeft))&&(i.paddingRight===void 0||R.boolean(i.paddingRight))}t.is=n})(tf||(tf={}));var nf;(function(t){function e(n){return{kind:"snippet",value:n}}t.createSnippet=e})(nf||(nf={}));var rf;(function(t){function e(n,r,i,s){return{insertText:n,filterText:r,range:i,command:s}}t.create=e})(rf||(rf={}));var sf;(function(t){function e(n){return{items:n}}t.create=e})(sf||(sf={}));var af;(function(t){t.Invoked=0,t.Automatic=1})(af||(af={}));var of;(function(t){function e(n,r){return{range:n,text:r}}t.create=e})(of||(of={}));var cf;(function(t){function e(n,r){return{triggerKind:n,selectedCompletionInfo:r}}t.create=e})(cf||(cf={}));var uf;(function(t){function e(n){const r=n;return R.objectLiteral(r)&&Xo.is(r.uri)&&R.string(r.name)}t.is=e})(uf||(uf={}));const k1=[`
117
117
  `,`\r
118
118
  `,"\r"];var lf;(function(t){function e(s,a,o,c){return new O1(s,a,o,c)}t.create=e;function n(s){let a=s;return!!(R.defined(a)&&R.string(a.uri)&&(R.undefined(a.languageId)||R.string(a.languageId))&&R.uinteger(a.lineCount)&&R.func(a.getText)&&R.func(a.positionAt)&&R.func(a.offsetAt))}t.is=n;function r(s,a){let o=s.getText(),c=i(a,(l,f)=>{let d=l.range.start.line-f.range.start.line;return d===0?l.range.start.character-f.range.start.character:d}),u=o.length;for(let l=c.length-1;l>=0;l--){let f=c[l],d=s.offsetAt(f.range.start),p=s.offsetAt(f.range.end);if(p<=u)o=o.substring(0,d)+f.newText+o.substring(p,o.length);else throw new Error("Overlapping edit");u=d}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),u=s.slice(o);i(c,a),i(u,a);let l=0,f=0,d=0;for(;l<c.length&&f<u.length;)a(c[l],u[f])<=0?s[d++]=c[l++]:s[d++]=u[f++];for(;l<c.length;)s[d++]=c[l++];for(;f<u.length;)s[d++]=u[f++];return s}})(lf||(lf={}));let O1=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
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 ne.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 ne.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 R;(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,y,E){return e.call(p)==="[object Number]"&&y<=p&&p<=E}t.numberRange=o;function c(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=c;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function l(p){return e.call(p)==="[object Function]"}t.func=l;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,y){return Array.isArray(p)&&p.every(y)}t.typedArray=d})(R||(R={}));const L1=Object.freeze(Object.defineProperty({__proto__:null,get AnnotatedTextEdit(){return mn},get ChangeAnnotation(){return _r},get ChangeAnnotationIdentifier(){return Ke},get CodeAction(){return ql},get CodeActionContext(){return zl},get CodeActionKind(){return Ul},get CodeActionTriggerKind(){return ca},get CodeDescription(){return vl},get CodeLens(){return Bl},get Color(){return Jo},get ColorInformation(){return hl},get ColorPresentation(){return pl},get Command(){return Or},get CompletionItem(){return Nl},get CompletionItemKind(){return Al},get CompletionItemLabelDetails(){return Cl},get CompletionItemTag(){return Sl},get CompletionList(){return Pl},get CreateFile(){return Gi},get DeleteFile(){return Ui},get Diagnostic(){return ia},get DiagnosticRelatedInformation(){return Zo},get DiagnosticSeverity(){return yl},get DiagnosticTag(){return Tl},get DocumentHighlight(){return xl},get DocumentHighlightKind(){return Ll},get DocumentLink(){return Kl},get DocumentSymbol(){return jl},get DocumentUri(){return ll},EOL:k1,get FoldingRange(){return gl},get FoldingRangeKind(){return ml},get FormattingOptions(){return Wl},get Hover(){return Il},get InlayHint(){return tf},get InlayHintKind(){return tc},get InlayHintLabelPart(){return nc},get InlineCompletionContext(){return cf},get InlineCompletionItem(){return rf},get InlineCompletionList(){return sf},get InlineCompletionTriggerKind(){return af},get InlineValueContext(){return ef},get InlineValueEvaluatableExpression(){return Ql},get InlineValueText(){return Jl},get InlineValueVariableLookup(){return Zl},get InsertReplaceEdit(){return bl},get InsertTextFormat(){return _l},get InsertTextMode(){return wl},get Location(){return ra},get LocationLink(){return dl},get MarkedString(){return oa},get MarkupContent(){return zi},get MarkupKind(){return ec},get OptionalVersionedTextDocumentIdentifier(){return aa},get ParameterInformation(){return kl},get Position(){return ne},get Range(){return X},get RenameFile(){return ji},get SelectedCompletionInfo(){return of},get SelectionRange(){return Hl},get SemanticTokenModifiers(){return Yl},get SemanticTokenTypes(){return Vl},get SemanticTokens(){return Xl},get SignatureInformation(){return Ol},get StringValue(){return nf},get SymbolInformation(){return Fl},get SymbolKind(){return Ml},get SymbolTag(){return Dl},get TextDocument(){return lf},get TextDocumentEdit(){return sa},get TextDocumentIdentifier(){return $l},get TextDocumentItem(){return El},get TextEdit(){return Bt},get URI(){return Xo},get VersionedTextDocumentIdentifier(){return Rl},WorkspaceChange:I1,get WorkspaceEdit(){return Qo},get WorkspaceFolder(){return uf},get WorkspaceSymbol(){return Gl},get integer(){return fl},get uinteger(){return na}},Symbol.toStringTag,{value:"Module"}));class x1{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new _T(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new Ad;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new ff(e.startOffset,e.image.length,Gu(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 ff(s.startOffset,s.image.length,Gu(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==null?void 0:r.content.length)===0&&this.removeNode(r)}}class AT{get hidden(){return!1}get astNode(){var n,r;const e=typeof((n=this._astNode)==null?void 0:n.$type)=="string"?this._astNode:(r=this.container)==null?void 0:r.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 ff extends AT{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 Ad extends AT{constructor(){super(...arguments),this.content=new _d(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.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:ne.create(0,0),end:ne.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 _d extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,_d.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 _T extends Ad{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const df=Symbol("Datatype");function gu(t){return t.$type===df}const Gp="​",ST=t=>t.endsWith(Gp)?t:t+Gp;class bT{constructor(e){var i;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";(i=e.shared.profilers.LangiumProfiler)!=null&&i.isActive("parsing")?this.wrapper=new j1(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new CT(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 M1 extends bT{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new x1,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;Po(e)&&(i=e.name,this.registerPrecedenceMap(e));const s=this.wrapper.DEFINE_RULE(ST(e.name),this.startImplementation(r,i,n).bind(this));return this.allRules.set(e.name,s),Sn(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 Po(e)?Ks(e):e.fragment?void 0:hg(e)?df:Ks(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,Iu(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===df?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),u=this.current;if(o){const l=br(r)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,l,a,c)}else if(gu(u)){let l=i.image;br(r)||(l=this.converter.convert(l,a).toString()),u.value+=l}}}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(gu(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)):gu(e)?this.converter.convert(e.value,e.$cstNode):(gv(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 E=0;E<i.length;E++){const C=i[E],A=n.get(C)??{precedence:1/0,rightAssoc:!1};A.precedence>a?(a=A.precedence,s=E):A.precedence===a&&(A.rightAssoc||(s=E))}const o=i.slice(0,s),c=i.slice(s+1),u=r.slice(0,s+1),l=r.slice(s+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:c},p=this.constructInfix(f,n),y=this.constructInfix(d,n);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:i[s],right:y}}getAssignment(e){if(!this.assignmentMap.has(e)){const n=ic(e,Sr);this.assignmentMap.set(e,{assignment:n,crossRef:n&&ac(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 D1{buildMismatchTokenMessage(e){return hi.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return hi.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return hi.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return hi.buildEarlyExitMessage(e)}}class wT extends D1{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 F1 extends bT{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(ST(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 G1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new wT};class CT extends uk{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,{...G1,lookaheadStrategy:r?new cd({maxLookahead:n.maxLookahead}):new f1({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 j1 extends CT{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 NT(t,e,n){return U1({parser:e,tokens:n,ruleNames:new Map},t),e}function U1(t,e){const n=cg(e,!1),r=Re(e.rules).filter(Sn).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,Lr(a,s.definition))}const i=Re(e.rules).filter(Po).filter(s=>n.has(s));for(const s of i)t.parser.rule(s,z1(t,s))}function z1(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(bn(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}},u={...s,$container:a};a.elements.push(c,u);const f=r.map(p=>t.tokens[p.value]).map((p,y)=>({ALT:()=>t.parser.consume(y,p,c)}));let d;return p=>{d??(d=Sd(t,n)),t.parser.subrule(0,d,!1,s,p),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,f),t.parser.subrule(1,d,!1,u,p)}})}}function Lr(t,e,n=!1){let r;if(br(e))r=Y1(t,e);else if(sc(e))r=q1(t,e);else if(Sr(e))r=Lr(t,e.terminal);else if(ac(e))r=PT(t,e);else if(wr(e))r=B1(t,e);else if(tg(e))r=K1(t,e);else if(rg(e))r=H1(t,e);else if(Nf(e))r=V1(t,e);else if(Ev(e)){const i=t.consume++;r=()=>t.parser.consume(i,Hn,e)}else throw new sg(e.$cstNode,`Unexpected element type: ${e.$type}`);return IT(t,n?void 0:rc(e),r,e.cardinality)}function q1(t,e){const n=Ks(e);return()=>t.parser.action(n,e)}function B1(t,e){const n=e.rule.ref;if(ha(n)){const r=t.subrule++,i=Sn(n)&&n.fragment,s=e.arguments.length>0?W1(n,e.arguments):()=>({});let a;return o=>{a??(a=Sd(t,n)),t.parser.subrule(r,a,i,e,s(o))}}else if(bn(n)){const r=t.consume++,i=hf(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)pa();else throw new sg(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function W1(t,e){if(e.some(r=>r.calledByName)){const r=e.map(i=>{var s,a;return{parameterName:(a=(s=i.parameter)==null?void 0:s.ref)==null?void 0:a.name,predicate:Ut(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=>Ut(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 Ut(t){if(Rv(t)){const e=Ut(t.left),n=Ut(t.right);return r=>e(r)||n(r)}else if($v(t)){const e=Ut(t.left),n=Ut(t.right);return r=>e(r)&&n(r)}else if(Sv(t)){const e=Ut(t.value);return n=>!e(n)}else if(bv(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(Tv(t)){const e=!!t.true;return()=>e}pa()}function K1(t,e){if(e.elements.length===1)return Lr(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Lr(t,i,!0)},a=rc(i);a&&(s.GATE=Ut(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 H1(t,e){if(e.elements.length===1)return Lr(t,e.elements[0]);const n=[];for(const o of e.elements){const c={ALT:Lr(t,o,!0)},u=rc(o);u&&(c.GATE=Ut(u)),n.push(c)}const r=t.or++,i=(o,c)=>{const u=c.getRuleStack().join("-");return`uGroup_${o}_${u}`},s=o=>t.parser.alternatives(r,n.map((c,u)=>{const l={ALT:()=>!0},f=t.parser;l.ALT=()=>{if(c.ALT(o),!f.isRecording()){const p=i(r,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);const y=f.unorderedGroups.get(p);typeof(y==null?void 0:y[u])>"u"&&(y[u]=!0)}};const d=c.GATE;return d?l.GATE=()=>d(o):l.GATE=()=>{const p=f.unorderedGroups.get(i(r,f));return!(p!=null&&p[u])},l})),a=IT(t,rc(e),s,"*");return o=>{a(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function V1(t,e){const n=e.elements.map(r=>Lr(t,r));return r=>n.forEach(i=>i(r))}function rc(t){if(Nf(t))return t.guardCondition}function PT(t,e,n=e.terminal){if(n)if(wr(n)&&Sn(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;let s;return a=>{s??(s=Sd(t,r)),t.parser.subrule(i,s,!1,e,a)}}else if(wr(n)&&bn(n.rule.ref)){const r=t.consume++,i=hf(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(br(n)){const r=t.consume++,i=hf(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 r=fg(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ks(e.type.ref));return PT(t,e,i)}}function Y1(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 IT(t,e,n,r){const i=e&&Ut(e);if(!r)if(i){const s=t.or++;return a=>t.parser.alternatives(s,[{ALT:()=>n(a),GATE:()=>i(a)},{ALT:fp(),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:fp(),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 pa()}function Sd(t,e){const n=X1(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function X1(t,e){if(ha(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!Sn(r);)(Nf(r)||tg(r)||rg(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 hf(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function J1(t){const e=t.Grammar,n=t.parser.Lexer,r=new F1(t);return NT(e,r,n.definition),r.finalize(),r}function Z1(t){const e=Q1(t);return e.finalize(),e}function Q1(t){const e=t.Grammar,n=t.parser.Lexer,r=new M1(t);return NT(e,r,n.definition)}class kT{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=Re(cg(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(bn).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=If(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=og(n)?it.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(ha).flatMap(i=>da(i).filter(br)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,n,!!(r!=null&&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(cc(e.value),"i"):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&Xv("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class OT{convert(e,n){let r=n.grammarSource;if(ac(r)&&(r=e$(r)),wr(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){var i;switch(e.name.toUpperCase()){case"INT":return fn.convertInt(n);case"STRING":return fn.convertString(n);case"ID":return fn.convertID(n)}switch((i=o$(e))==null?void 0:i.toLowerCase()){case"number":return fn.convertNumber(n);case"boolean":return fn.convertBoolean(n);case"bigint":return fn.convertBigint(n);case"date":return fn.convertDate(n);default:return n}}}var fn;(function(t){function e(u){let l="";for(let f=1;f<u.length-1;f++){const d=u.charAt(f);if(d==="\\"){const p=u.charAt(++f);l+=n(p)}else l+=d}return l}t.convertString=e;function n(u){switch(u){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 u}}function r(u){return u.charAt(0)==="^"?u.substring(1):u}t.convertID=r;function i(u){return parseInt(u)}t.convertInt=i;function s(u){return BigInt(u)}t.convertBigint=s;function a(u){return new Date(u)}t.convertDate=a;function o(u){return Number(u)}t.convertNumber=o;function c(u){return u.toLowerCase()==="true"}t.convertBoolean=c})(fn||(fn={}));var ar={},io={},jp;function qr(){if(jp)return io;jp=1,Object.defineProperty(io,"__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={})),io.default=e,io}var ze={},Up;function Ca(){if(Up)return ze;Up=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.stringArray=ze.array=ze.func=ze.error=ze.number=ze.string=ze.boolean=void 0;function t(o){return o===!0||o===!1}ze.boolean=t;function e(o){return typeof o=="string"||o instanceof String}ze.string=e;function n(o){return typeof o=="number"||o instanceof Number}ze.number=n;function r(o){return o instanceof Error}ze.error=r;function i(o){return typeof o=="function"}ze.func=i;function s(o){return Array.isArray(o)}ze.array=s;function a(o){return s(o)&&o.every(c=>e(c))}return ze.stringArray=a,ze}var or={},zp;function Yi(){if(zp)return or;zp=1,Object.defineProperty(or,"__esModule",{value:!0}),or.Emitter=or.Event=void 0;const t=qr();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(or.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,u=this._callbacks.length;c<u;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 u=0,l=o.length;u<l;u++)try{a.push(o[u].apply(c[u],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 or.Emitter=r,r._noop=function(){},or}var qp;function Kc(){if(qp)return ar;qp=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.CancellationTokenSource=ar.CancellationToken=void 0;const t=qr(),e=Ca(),n=Yi();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(u){const l=u;return l&&(l===o.None||l===o.Cancelled||e.boolean(l.isCancellationRequested)&&!!l.onCancellationRequested)}o.is=c})(r||(ar.CancellationToken=r={}));const i=Object.freeze(function(o,c){const u=(0,t.default)().timer.setTimeout(o.bind(c),0);return{dispose(){u.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 ar.CancellationTokenSource=a,ar}var Ae=Kc();function eM(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let So=0,tM=10;function nM(){return So=performance.now(),new Ae.CancellationTokenSource}const pi=Symbol("OperationCancelled");function Hc(t){return t===pi}async function et(t){if(t===Ae.CancellationToken.None)return;const e=performance.now();if(e-So>=tM&&(So=e,await eM(),So=performance.now()),t.isCancellationRequested)throw pi}class bd{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),this),this.reject=r=>(n(r),this)})}}class ua{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(ua.isIncremental(r)){const i=xT(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 u=this._lineOffsets;const l=Bp(r.text,!1,s);if(c-o===l.length)for(let d=0,p=l.length;d<p;d++)u[d+o+1]=l[d];else l.length<1e4?u.splice(o+1,c-o,...l):this._lineOffsets=u=u.slice(0,o+1).concat(l,u.slice(c+1));const f=r.text.length-(a-s);if(f!==0)for(let d=o+1+l.length,p=u.length;d<p;d++)u[d]=u[d]+f}else if(ua.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=Bp(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&&LT(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 pf;(function(t){function e(i,s,a,o){return new ua(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof ua)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=mf(s.map(rM),(l,f)=>{const d=l.range.start.line-f.range.start.line;return d===0?l.range.start.character-f.range.start.character:d});let c=0;const u=[];for(const l of o){const f=i.offsetAt(l.range.start);if(f<c)throw new Error("Overlapping edit");f>c&&u.push(a.substring(c,f)),l.newText.length&&u.push(l.newText),c=i.offsetAt(l.range.end)}return u.push(a.substr(c)),u.join("")}t.applyEdits=r})(pf||(pf={}));function mf(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);mf(r,e),mf(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 Bp(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);LT(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function LT(t){return t===13||t===10}function xT(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 rM(t){const e=xT(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var MT;(()=>{var t={975:P=>{function $(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}function g(T,v){for(var S,L="",M=0,x=-1,z=0,F=0;F<=T.length;++F){if(F<T.length)S=T.charCodeAt(F);else{if(S===47)break;S=47}if(S===47){if(!(x===F-1||z===1))if(x!==F-1&&z===2){if(L.length<2||M!==2||L.charCodeAt(L.length-1)!==46||L.charCodeAt(L.length-2)!==46){if(L.length>2){var se=L.lastIndexOf("/");if(se!==L.length-1){se===-1?(L="",M=0):M=(L=L.slice(0,se)).length-1-L.lastIndexOf("/"),x=F,z=0;continue}}else if(L.length===2||L.length===1){L="",M=0,x=F,z=0;continue}}v&&(L.length>0?L+="/..":L="..",M=2)}else L.length>0?L+="/"+T.slice(x+1,F):L=T.slice(x+1,F),M=F-x-1;x=F,z=0}else S===46&&z!==-1?++z:z=-1}return L}var w={resolve:function(){for(var T,v="",S=!1,L=arguments.length-1;L>=-1&&!S;L--){var M;L>=0?M=arguments[L]:(T===void 0&&(T=process.cwd()),M=T),$(M),M.length!==0&&(v=M+"/"+v,S=M.charCodeAt(0)===47)}return v=g(v,!S),S?v.length>0?"/"+v:"/":v.length>0?v:"."},normalize:function(T){if($(T),T.length===0)return".";var v=T.charCodeAt(0)===47,S=T.charCodeAt(T.length-1)===47;return(T=g(T,!v)).length!==0||v||(T="."),T.length>0&&S&&(T+="/"),v?"/"+T:T},isAbsolute:function(T){return $(T),T.length>0&&T.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var T,v=0;v<arguments.length;++v){var S=arguments[v];$(S),S.length>0&&(T===void 0?T=S:T+="/"+S)}return T===void 0?".":w.normalize(T)},relative:function(T,v){if($(T),$(v),T===v||(T=w.resolve(T))===(v=w.resolve(v)))return"";for(var S=1;S<T.length&&T.charCodeAt(S)===47;++S);for(var L=T.length,M=L-S,x=1;x<v.length&&v.charCodeAt(x)===47;++x);for(var z=v.length-x,F=M<z?M:z,se=-1,B=0;B<=F;++B){if(B===F){if(z>F){if(v.charCodeAt(x+B)===47)return v.slice(x+B+1);if(B===0)return v.slice(x+B)}else M>F&&(T.charCodeAt(S+B)===47?se=B:B===0&&(se=0));break}var re=T.charCodeAt(S+B);if(re!==v.charCodeAt(x+B))break;re===47&&(se=B)}var je="";for(B=S+se+1;B<=L;++B)B!==L&&T.charCodeAt(B)!==47||(je.length===0?je+="..":je+="/..");return je.length>0?je+v.slice(x+se):(x+=se,v.charCodeAt(x)===47&&++x,v.slice(x))},_makeLong:function(T){return T},dirname:function(T){if($(T),T.length===0)return".";for(var v=T.charCodeAt(0),S=v===47,L=-1,M=!0,x=T.length-1;x>=1;--x)if((v=T.charCodeAt(x))===47){if(!M){L=x;break}}else M=!1;return L===-1?S?"/":".":S&&L===1?"//":T.slice(0,L)},basename:function(T,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');$(T);var S,L=0,M=-1,x=!0;if(v!==void 0&&v.length>0&&v.length<=T.length){if(v.length===T.length&&v===T)return"";var z=v.length-1,F=-1;for(S=T.length-1;S>=0;--S){var se=T.charCodeAt(S);if(se===47){if(!x){L=S+1;break}}else F===-1&&(x=!1,F=S+1),z>=0&&(se===v.charCodeAt(z)?--z==-1&&(M=S):(z=-1,M=F))}return L===M?M=F:M===-1&&(M=T.length),T.slice(L,M)}for(S=T.length-1;S>=0;--S)if(T.charCodeAt(S)===47){if(!x){L=S+1;break}}else M===-1&&(x=!1,M=S+1);return M===-1?"":T.slice(L,M)},extname:function(T){$(T);for(var v=-1,S=0,L=-1,M=!0,x=0,z=T.length-1;z>=0;--z){var F=T.charCodeAt(z);if(F!==47)L===-1&&(M=!1,L=z+1),F===46?v===-1?v=z:x!==1&&(x=1):v!==-1&&(x=-1);else if(!M){S=z+1;break}}return v===-1||L===-1||x===0||x===1&&v===L-1&&v===S+1?"":T.slice(v,L)},format:function(T){if(T===null||typeof T!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof T);return function(v,S){var L=S.dir||S.root,M=S.base||(S.name||"")+(S.ext||"");return L?L===S.root?L+M:L+"/"+M:M}(0,T)},parse:function(T){$(T);var v={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return v;var S,L=T.charCodeAt(0),M=L===47;M?(v.root="/",S=1):S=0;for(var x=-1,z=0,F=-1,se=!0,B=T.length-1,re=0;B>=S;--B)if((L=T.charCodeAt(B))!==47)F===-1&&(se=!1,F=B+1),L===46?x===-1?x=B:re!==1&&(re=1):x!==-1&&(re=-1);else if(!se){z=B+1;break}return x===-1||F===-1||re===0||re===1&&x===F-1&&x===z+1?F!==-1&&(v.base=v.name=z===0&&M?T.slice(1,F):T.slice(z,F)):(z===0&&M?(v.name=T.slice(1,x),v.base=T.slice(1,F)):(v.name=T.slice(z,x),v.base=T.slice(z,F)),v.ext=T.slice(x,F)),z>0?v.dir=T.slice(0,z-1):M&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};w.posix=w,P.exports=w}},e={};function n(P){var $=e[P];if($!==void 0)return $.exports;var g=e[P]={exports:{}};return t[P](g,g.exports,n),g.exports}n.d=(P,$)=>{for(var g in $)n.o($,g)&&!n.o(P,g)&&Object.defineProperty(P,g,{enumerable:!0,get:$[g]})},n.o=(P,$)=>Object.prototype.hasOwnProperty.call(P,$),n.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>ye}),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(P,$){if(!P.scheme&&$)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!s.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!a.test(P.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(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",l="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor($,g,w,T,v,S=!1){Fn(this,"scheme");Fn(this,"authority");Fn(this,"path");Fn(this,"query");Fn(this,"fragment");typeof $=="object"?(this.scheme=$.scheme||u,this.authority=$.authority||u,this.path=$.path||u,this.query=$.query||u,this.fragment=$.fragment||u):(this.scheme=function(L,M){return L||M?L:"file"}($,S),this.authority=g||u,this.path=function(L,M){switch(L){case"https":case"http":case"file":M?M[0]!==l&&(M=l+M):M=l}return M}(this.scheme,w||u),this.query=T||u,this.fragment=v||u,c(this,S))}static isUri($){return $ instanceof d||!!$&&typeof $.authority=="string"&&typeof $.fragment=="string"&&typeof $.path=="string"&&typeof $.query=="string"&&typeof $.scheme=="string"&&typeof $.fsPath=="string"&&typeof $.with=="function"&&typeof $.toString=="function"}get fsPath(){return _(this)}with($){if(!$)return this;let{scheme:g,authority:w,path:T,query:v,fragment:S}=$;return g===void 0?g=this.scheme:g===null&&(g=u),w===void 0?w=this.authority:w===null&&(w=u),T===void 0?T=this.path:T===null&&(T=u),v===void 0?v=this.query:v===null&&(v=u),S===void 0?S=this.fragment:S===null&&(S=u),g===this.scheme&&w===this.authority&&T===this.path&&v===this.query&&S===this.fragment?this:new y(g,w,T,v,S)}static parse($,g=!1){const w=f.exec($);return w?new y(w[2]||u,V(w[4]||u),V(w[5]||u),V(w[7]||u),V(w[9]||u),g):new y(u,u,u,u,u)}static file($){let g=u;if(i&&($=$.replace(/\\/g,l)),$[0]===l&&$[1]===l){const w=$.indexOf(l,2);w===-1?(g=$.substring(2),$=l):(g=$.substring(2,w),$=$.substring(w)||l)}return new y("file",g,$,u,u)}static from($){const g=new y($.scheme,$.authority,$.path,$.query,$.fragment);return c(g,!0),g}toString($=!1){return b(this,$)}toJSON(){return this}static revive($){if($){if($ instanceof d)return $;{const g=new y($);return g._formatted=$.external,g._fsPath=$._sep===p?$.fsPath:null,g}}return $}}const p=i?1:void 0;class y extends d{constructor(){super(...arguments);Fn(this,"_formatted",null);Fn(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=_(this)),this._fsPath}toString(g=!1){return g?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const g={$mid:1};return this._fsPath&&(g.fsPath=this._fsPath,g._sep=p),this._formatted&&(g.external=this._formatted),this.path&&(g.path=this.path),this.scheme&&(g.scheme=this.scheme),this.authority&&(g.authority=this.authority),this.query&&(g.query=this.query),this.fragment&&(g.fragment=this.fragment),g}}const E={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 C(P,$,g){let w,T=-1;for(let v=0;v<P.length;v++){const S=P.charCodeAt(v);if(S>=97&&S<=122||S>=65&&S<=90||S>=48&&S<=57||S===45||S===46||S===95||S===126||$&&S===47||g&&S===91||g&&S===93||g&&S===58)T!==-1&&(w+=encodeURIComponent(P.substring(T,v)),T=-1),w!==void 0&&(w+=P.charAt(v));else{w===void 0&&(w=P.substr(0,v));const L=E[S];L!==void 0?(T!==-1&&(w+=encodeURIComponent(P.substring(T,v)),T=-1),w+=L):T===-1&&(T=v)}}return T!==-1&&(w+=encodeURIComponent(P.substring(T))),w!==void 0?w:P}function A(P){let $;for(let g=0;g<P.length;g++){const w=P.charCodeAt(g);w===35||w===63?($===void 0&&($=P.substr(0,g)),$+=E[w]):$!==void 0&&($+=P[g])}return $!==void 0?$:P}function _(P,$){let g;return g=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?P.path[1].toLowerCase()+P.path.substr(2):P.path,i&&(g=g.replace(/\//g,"\\")),g}function b(P,$){const g=$?A:C;let w="",{scheme:T,authority:v,path:S,query:L,fragment:M}=P;if(T&&(w+=T,w+=":"),(v||T==="file")&&(w+=l,w+=l),v){let x=v.indexOf("@");if(x!==-1){const z=v.substr(0,x);v=v.substr(x+1),x=z.lastIndexOf(":"),x===-1?w+=g(z,!1,!1):(w+=g(z.substr(0,x),!1,!1),w+=":",w+=g(z.substr(x+1),!1,!0)),w+="@"}v=v.toLowerCase(),x=v.lastIndexOf(":"),x===-1?w+=g(v,!1,!0):(w+=g(v.substr(0,x),!1,!0),w+=v.substr(x))}if(S){if(S.length>=3&&S.charCodeAt(0)===47&&S.charCodeAt(2)===58){const x=S.charCodeAt(1);x>=65&&x<=90&&(S=`/${String.fromCharCode(x+32)}:${S.substr(3)}`)}else if(S.length>=2&&S.charCodeAt(1)===58){const x=S.charCodeAt(0);x>=65&&x<=90&&(S=`${String.fromCharCode(x+32)}:${S.substr(2)}`)}w+=g(S,!0,!1)}return L&&(w+="?",w+=g(L,!1,!1)),M&&(w+="#",w+=$?M:C(M,!1,!1)),w}function I(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+I(P.substr(3)):P}}const U=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function V(P){return P.match(U)?P.replace(U,$=>I($)):P}var J=n(975);const oe=J.posix||J,ge="/";var ye;(function(P){P.joinPath=function($,...g){return $.with({path:oe.join($.path,...g)})},P.resolvePath=function($,...g){let w=$.path,T=!1;w[0]!==ge&&(w=ge+w,T=!0);let v=oe.resolve(w,...g);return T&&v[0]===ge&&!$.authority&&(v=v.substring(1)),$.with({path:v})},P.dirname=function($){if($.path.length===0||$.path===ge)return $;let g=oe.dirname($.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),$.with({path:g})},P.basename=function($){return oe.basename($.path)},P.extname=function($){return oe.extname($.path)}})(ye||(ye={})),MT=r})();const{URI:kt,Utils:ys}=MT;var pt;(function(t){t.basename=ys.basename,t.dirname=ys.dirname,t.extname=ys.extname,t.joinPath=ys.joinPath,t.resolvePath=ys.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function n(a,o){return(a==null?void 0:a.toString())===(o==null?void 0:o.toString())}t.equals=n;function r(a,o){const c=typeof a=="string"?kt.parse(a).path:a.path,u=typeof o=="string"?kt.parse(o).path:o.path,l=c.split("/").filter(E=>E.length>0),f=u.split("/").filter(E=>E.length>0);if(e){const E=/^[A-Z]:$/;if(l[0]&&E.test(l[0])&&(l[0]=l[0].toLowerCase()),f[0]&&E.test(f[0])&&(f[0]=f[0].toLowerCase()),l[0]!==f[0])return u.substring(1)}let d=0;for(;d<l.length&&l[d]===f[d];d++);const p="../".repeat(l.length-d),y=f.slice(d).join("/");return p+y}t.relative=r;function i(a){return kt.parse(a.toString()).toString()}t.normalize=i;function s(a,o){let c=typeof a=="string"?a:a.path,u=typeof o=="string"?o:o.path;return u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),u===c?!0:u.length<c.length||u.charAt(c.length)!=="/"?!1:u.startsWith(c)}t.contains=s})(pt||(pt={}));class iM{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return pt.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!=null&&n.parent&&n.parent.children.delete(n.name)}has(e){var n;return((n=this.getNode(this.normalizeUri(e),!1))==null?void 0:n.element)!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){var n;return(n=this.getNode(this.normalizeUri(e),!1))==null?void 0:n.element}findNode(e){const n=this.normalizeUri(e),r=this.getNode(n,!1);if(r)return{name:r.name,uri:pt.joinPath(kt.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:pt.joinPath(kt.parse(n),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const n=this.getNode(pt.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 sM{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,n=Ae.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,n)}fromTextDocument(e,n,r){return n=n??kt.parse(e.uri),Ae.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromString(e,n,r){return Ae.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){var a,o;const r=(a=e.parseResult.value.$cstNode)==null?void 0:a.root.fullText,i=(o=this.textDocuments)==null?void 0:o.get(e.uri.toString()),s=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{const c=this.createTextDocumentGetter(e.uri,s);Object.defineProperty(e,"textDocument",{get:c})}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=pf.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class aM{constructor(e){this.documentTrie=new iM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Re(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 Xr=Symbol("RefResolving");class oM{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=Ae.CancellationToken.None){var r;if((r=this.profiler)!=null&&r.isActive("linking")){const i=this.profiler.createTask("linking",this.languageId);i.start();try{for(const s of Tn(e.parseResult.value))await et(n),No(s).forEach(a=>{const o=`${s.$type}:${a.property}`;i.startSubTask(o);try{this.doLink(a,e)}finally{i.stopSubTask(o)}})}finally{i.stop()}}else for(const i of Tn(e.parseResult.value))await et(n),No(i).forEach(s=>this.doLink(s,e))}doLink(e,n){const r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Xr;try{const i=this.getCandidate(e);if(cs(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=Xr;try{const i=this.getCandidates(e),s=[];if(cs(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(Ye(this._ref))return this._ref;if(pv(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=Xr;const o=fo(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==null||o.references.push(this)}else this._ref===Xr&&s.throwCyclicReferenceError(e,n,i);return Ye(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return cs(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=Xr;const o=fo(e).$document,c=s.getCandidates({reference:a,container:e,property:n}),u=[];if(cs(c))this._linkingError=c;else for(const l of c){const f=s.loadAstNode(l);f&&u.push({ref:f,$nodeDescription:l})}this._items=u,o==null||o.references.push(this)}else this._items===Xr&&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(cs(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=fo(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 cM(t){return typeof t.name=="string"}class uM{getName(e){if(cM(e))return e.name}getNameNode(e){return lg(e.$cstNode,"name")}}class lM{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=Tn(e.Grammar).some(n=>ac(n)&&n.isMulti)}findDeclarations(e){if(e){const n=s$(e),r=e.astNode;if(n&&r){const i=r[n.feature];if(Pt(i)||Un(i))return Pd(i);if(Array.isArray(i)){for(const s of i)if((Pt(s)||Un(s))&&s.$refNode&&s.$refNode.offset<=e.offset&&s.$refNode.end>=e.end)return Pd(s)}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Mv(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 No(r))if(Un(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=>pt.equals(s.sourceUri,n.documentUri))),r.push(...i),Re(r)}getSelfReferences(e){const n=this.getSelfNodes(e),r=[];for(const i of n){const s=this.nameProvider.getNameNode(i);if(s){const a=yn(i),o=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:a.uri,sourcePath:o,targetUri:a.uri,targetPath:o,segment:Io(s),local:!0})}}return r}}class la{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return Pu.sum(Re(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?Re(n):Qm}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 Re(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return Re(this.map.keys())}values(){return Re(this.map.values()).flat()}entriesGroupedByKey(){return Re(this.map.entries())}}class Wp{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 fM{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,n=Ae.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,n)}async collectExportedSymbolsForNode(e,n,r=Cf,i=Ae.CancellationToken.None){const s=[];this.addExportedSymbol(e,s,n);for(const a of r(e))await et(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=Ae.CancellationToken.None){const r=e.parseResult.value,i=new la;for(const s of da(r))await et(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 Kp{constructor(e,n,r){this.elements=e,this.outerScope=n,this.caseInsensitive=(r==null?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(r==null?void 0: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 dM{constructor(e,n,r){this.elements=new la,this.caseInsensitive=(r==null?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(r==null?void 0: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?Re(r).concat(this.outerScope.getElements(e)):Re(r)}getAllElements(){let e=Re(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class DT{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 hM extends DT{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 pM extends DT{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 mM extends hM{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 gM{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 mM(e.shared)}getScope(e){const n=[],r=this.reflection.getReferenceType(e),i=yn(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 Kp(Re(e),n,r)}createScopeForNodes(e,n,r){const i=Re(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Kp(i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new dM(this.indexManager.allElements(e)))}}function yM(t){return typeof t.$comment=="string"}function Hp(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class TM{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==null?void 0:n.replacer,s=(o,c)=>this.replacer(o,c,r),a=i?(o,c)=>i(o,c,s):s;try{return this.currentDocument=yn(e),JSON.stringify(e,a,n==null?void 0: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}){var c,u,l;if(!this.ignoreProperties.has(e))if(Pt(n)){const f=n.ref,d=r?n.$refText:void 0;if(f){const p=yn(f);let y="";this.currentDocument&&this.currentDocument!==p&&(o?y=o(p.uri,f):y=p.uri.toString());const E=this.astNodeLocator.getAstNodePath(f);return{$ref:`${y}#${E}`,$refText:d}}else return{$error:((c=n.error)==null?void 0:c.message)??"Could not resolve reference",$refText:d}}else if(Un(n)){const f=r?n.$refText:void 0,d=[];for(const p of n.items){const y=p.ref,E=yn(p.ref);let C="";this.currentDocument&&this.currentDocument!==E&&(o?C=o(E.uri,y):C=E.uri.toString());const A=this.astNodeLocator.getAstNodePath(y);d.push(`${C}#${A}`)}return{$refs:d,$refText:f}}else if(Ye(n)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo({...n}),(!e||n.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)==null?void 0:u.uri.toString())),i&&!e&&(f??(f={...n}),f.$sourceText=(l=n.$cstNode)==null?void 0:l.text),a){f??(f={...n});const d=this.commentProvider.getComment(n);d&&(f.$comment=d.replace(/\r/g,""))}return f??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=n$(e.$cstNode,s).map(n);a.length!==0&&(i[s]=a)}),e}}linkNode(e,n,r,i,s,a){for(const[c,u]of Object.entries(e))if(Array.isArray(u))for(let l=0;l<u.length;l++){const f=u[l];Hp(f)?u[l]=this.reviveReference(e,c,n,f,r):Ye(f)&&this.linkNode(f,n,r,e,c,l)}else Hp(u)?e[c]=this.reviveReference(e,c,n,u,r):Ye(u)&&this.linkNode(u,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 u=this.getRefNode(r,i.$ref,s.uriConverter);if(Ye(u))return a||(a=this.nameProvider.getName(u)),{$refText:a??"",ref:u};o=u}else if(i.$refs){const u=[];for(const l of i.$refs){const f=this.getRefNode(r,l,s.uriConverter);Ye(f)&&u.push({ref:f})}if(u.length===0)c={$refText:a??"",items:u},o??(o="Could not resolve multi-reference");else return{$refText:a??"",items:u}}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):kt.parse(n),u=this.langiumDocuments.getDocument(c);return u?u.parseResult.value:"Could not find document for URI: "+n}const s=r?r(n.substring(0,i)):kt.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 vM{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e==null?void 0: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){var a,o;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const n=(o=(a=this.textDocuments)==null?void 0:a.get(e))==null?void 0:o.languageId;if(n!==void 0){const c=this.languageIdMap.get(n);if(c)return c}const r=pt.extname(e),i=pt.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 Gs(t){return{code:t}}var gf;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(gf||(gf={}));class $M{constructor(e){this.entries=new la,this.knownCategories=new Set(gf.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 pa()}}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(Hc(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=Re(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 RM=Object.freeze({validateNode:!0,validateChildren:!0});class EM{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=Ae.CancellationToken.None){const i=e.parseResult,s=[];if(await et(r),(!n.categories||n.categories.includes("built-in"))&&(this.processLexingErrors(i,s,n),n.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.LexingError})||(this.processParsingErrors(i,s,n),n.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.ParsingError}))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(a){if(Hc(a))throw a;console.error("An error occurred during validation:",a)}return await et(r),s}processLexingErrors(e,n,r){var s;const i=[...e.lexerErrors,...((s=e.lexerReport)==null?void 0:s.diagnostics)??[]];for(const a of i){const o=a.severity??"error",c={severity:yu(o),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:_M(o),source:this.getSource()};n.push(c)}}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=Gu(i.token);if(s){const a={severity:yu("error"),range:s,message:i.message,data:Gs(Nt.ParsingError),source:this.getSource()};n.push(a)}}}processLinkingErrors(e,n,r){var i;for(const s of e.references){const a=s.error;if(a){const o={node:a.info.container,range:(i=s.$refNode)==null?void 0:i.range,property:a.info.property,index:a.info.index,data:{code:Nt.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};n.push(this.toDiagnostic("error",a.message,o))}}}async validateAst(e,n,r=Ae.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=Ae.CancellationToken.None){const s=this.validationRegistry.checksBefore;for(const a of s)await et(i),await a(e,r,n.categories??[],i)}async validateAstNodes(e,n,r,i=Ae.CancellationToken.None){var s;if((s=this.profiler)!=null&&s.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const o=Tn(e).iterator();for(const c of o){a.startSubTask(c.$type);const u=this.validateSingleNodeOptions(c,n);if(u.validateNode)try{const l=this.validationRegistry.getChecks(c.$type,n.categories);for(const f of l)await f(c,r,i)}finally{a.stopSubTask(c.$type)}u.validateChildren||o.prune()}}finally{a.stop()}}else{const a=Tn(e).iterator();for(const o of a){await et(i);const c=this.validateSingleNodeOptions(o,n);if(c.validateNode){const u=this.validationRegistry.getChecks(o.$type,n.categories);for(const l of u)await l(o,r,i)}c.validateChildren||a.prune()}}}validateSingleNodeOptions(e,n){return RM}async validateAstAfter(e,n,r,i=Ae.CancellationToken.None){const s=this.validationRegistry.checksAfter;for(const a of s)await et(i),await a(e,r,n.categories??[],i)}toDiagnostic(e,n,r){return{message:n,range:AM(r),severity:yu(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 AM(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=lg(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=r$(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 yu(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 _M(t){switch(t){case"error":return Gs(Nt.LexingError);case"warning":return Gs(Nt.LexingWarning);case"info":return Gs(Nt.LexingInfo);case"hint":return Gs(Nt.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Nt;(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"})(Nt||(Nt={}));class SM{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??yn(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=Io(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:n,get nameSegment(){return o()},selectionSegment:Io(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class bM{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=Ae.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of Tn(i))await et(n),No(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=[];Pt(n)&&n.$nodeDescription?r=[n.$nodeDescription]:Un(n)&&(r=n.items.map(c=>c.$nodeDescription).filter(c=>c!==void 0));const i=yn(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),a=[],o=Io(n.$refNode);for(const c of r)a.push({sourceUri:i,sourcePath:s,targetUri:c.documentUri,targetPath:c.path,segment:o,local:pt.equals(c.documentUri,i)});return a}}class wM{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)),u=i[o];return u==null?void 0:u[c]}return i[s]},e)}}var CM=Yi();class NM{constructor(e){this._ready=new bd,this.onConfigurationSectionUpdateEmitter=new CM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var n;this.workspaceConfig=((n=e.capabilities.workspace)==null?void 0:n.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 cr={},ur={},so={},Tu={},G={},Vp;function FT(){if(Vp)return G;Vp=1,Object.defineProperty(G,"__esModule",{value:!0}),G.Message=G.NotificationType9=G.NotificationType8=G.NotificationType7=G.NotificationType6=G.NotificationType5=G.NotificationType4=G.NotificationType3=G.NotificationType2=G.NotificationType1=G.NotificationType0=G.NotificationType=G.RequestType9=G.RequestType8=G.RequestType7=G.RequestType6=G.RequestType5=G.RequestType4=G.RequestType3=G.RequestType2=G.RequestType1=G.RequestType=G.RequestType0=G.AbstractMessageSignature=G.ParameterStructures=G.ResponseError=G.ErrorCodes=void 0;const t=Ca();var e;(function($){$.ParseError=-32700,$.InvalidRequest=-32600,$.MethodNotFound=-32601,$.InvalidParams=-32602,$.InternalError=-32603,$.jsonrpcReservedErrorRangeStart=-32099,$.serverErrorStart=-32099,$.MessageWriteError=-32099,$.MessageReadError=-32098,$.PendingResponseRejected=-32097,$.ConnectionInactive=-32096,$.ServerNotInitialized=-32002,$.UnknownErrorCode=-32001,$.jsonrpcReservedErrorRangeEnd=-32e3,$.serverErrorEnd=-32e3})(e||(G.ErrorCodes=e={}));class n extends Error{constructor(g,w,T){super(w),this.code=t.number(g)?g:e.UnknownErrorCode,this.data=T,Object.setPrototypeOf(this,n.prototype)}toJson(){const g={code:this.code,message:this.message};return this.data!==void 0&&(g.data=this.data),g}}G.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}}G.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class i{constructor(g,w){this.method=g,this.numberOfParams=w}get parameterStructures(){return r.auto}}G.AbstractMessageSignature=i;class s extends i{constructor(g){super(g,0)}}G.RequestType0=s;class a extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.RequestType=a;class o extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.RequestType1=o;class c extends i{constructor(g){super(g,2)}}G.RequestType2=c;class u extends i{constructor(g){super(g,3)}}G.RequestType3=u;class l extends i{constructor(g){super(g,4)}}G.RequestType4=l;class f extends i{constructor(g){super(g,5)}}G.RequestType5=f;class d extends i{constructor(g){super(g,6)}}G.RequestType6=d;class p extends i{constructor(g){super(g,7)}}G.RequestType7=p;class y extends i{constructor(g){super(g,8)}}G.RequestType8=y;class E extends i{constructor(g){super(g,9)}}G.RequestType9=E;class C extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.NotificationType=C;class A extends i{constructor(g){super(g,0)}}G.NotificationType0=A;class _ extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.NotificationType1=_;class b extends i{constructor(g){super(g,2)}}G.NotificationType2=b;class I extends i{constructor(g){super(g,3)}}G.NotificationType3=I;class U extends i{constructor(g){super(g,4)}}G.NotificationType4=U;class V extends i{constructor(g){super(g,5)}}G.NotificationType5=V;class J extends i{constructor(g){super(g,6)}}G.NotificationType6=J;class oe extends i{constructor(g){super(g,7)}}G.NotificationType7=oe;class ge extends i{constructor(g){super(g,8)}}G.NotificationType8=ge;class ye extends i{constructor(g){super(g,9)}}G.NotificationType9=ye;var P;return function($){function g(v){const S=v;return S&&t.string(S.method)&&(t.string(S.id)||t.number(S.id))}$.isRequest=g;function w(v){const S=v;return S&&t.string(S.method)&&v.id===void 0}$.isNotification=w;function T(v){const S=v;return S&&(S.result!==void 0||!!S.error)&&(t.string(S.id)||t.number(S.id)||S.id===null)}$.isResponse=T}(P||(G.Message=P={})),G}var en={},Yp;function GT(){if(Yp)return en;Yp=1;var t;Object.defineProperty(en,"__esModule",{value:!0}),en.LRUCache=en.LinkedMap=en.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||(en.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(){var s;return(s=this._head)==null?void 0:s.value}get last(){var s;return(s=this._tail)==null?void 0:s.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)}}en.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 en.LRUCache=r,en}var Ts={},Xp;function PM(){if(Xp)return Ts;Xp=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.Disposable=void 0;var t;return function(e){function n(r){return{dispose:r}}e.create=n}(t||(Ts.Disposable=t={})),Ts}var lr={},Jp;function IM(){if(Jp)return lr;Jp=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.SharedArrayReceiverStrategy=lr.SharedArraySenderStrategy=void 0;const t=Kc();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),u=new Int32Array(c,0,1);u[0]=e.Continue,this.buffers.set(o.id,c),o.$cancellationData=c}async sendCancellation(o,c){const u=this.buffers.get(c);if(u===void 0)return;const l=new Int32Array(u,0,1);Atomics.store(l,0,e.Cancelled)}cleanup(o){this.buffers.delete(o)}dispose(){this.buffers.clear()}}lr.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 lr.SharedArrayReceiverStrategy=s,lr}var tn={},vs={},Zp;function jT(){if(Zp)return vs;Zp=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.Semaphore=void 0;const t=qr();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 vs.Semaphore=e,vs}var Qp;function kM(){if(Qp)return tn;Qp=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.ReadableStreamMessageReader=tn.AbstractMessageReader=tn.MessageReader=void 0;const t=qr(),e=Ca(),n=Yi(),r=jT();var i;(function(c){function u(l){let f=l;return f&&e.func(f.listen)&&e.func(f.dispose)&&e.func(f.onError)&&e.func(f.onClose)&&e.func(f.onPartialMessage)}c.is=u})(i||(tn.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(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${e.string(u.message)?u.message:"unknown"}`)}}tn.AbstractMessageReader=s;var a;(function(c){function u(l){let f,d;const p=new Map;let y;const E=new Map;if(l===void 0||typeof l=="string")f=l??"utf-8";else{if(f=l.charset??"utf-8",l.contentDecoder!==void 0&&(d=l.contentDecoder,p.set(d.name,d)),l.contentDecoders!==void 0)for(const C of l.contentDecoders)p.set(C.name,C);if(l.contentTypeDecoder!==void 0&&(y=l.contentTypeDecoder,E.set(y.name,y)),l.contentTypeDecoders!==void 0)for(const C of l.contentTypeDecoders)E.set(C.name,C)}return y===void 0&&(y=(0,t.default)().applicationJson.decoder,E.set(y.name,y)),{charset:f,contentDecoder:d,contentDecoders:p,contentTypeDecoder:y,contentTypeDecoders:E}}c.fromOptions=u})(a||(a={}));class o extends s{constructor(u,l){super(),this.readable=u,this.options=a.fromOptions(l),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(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;const l=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),l}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){const f=this.buffer.tryReadHeaders(!0);if(!f)return;const d=f.get("content-length");if(!d){this.fireError(new Error(`Header must provide a Content-Length property.
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 ne.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 ne.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 R;(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,y,E){return e.call(p)==="[object Number]"&&y<=p&&p<=E}t.numberRange=o;function c(p){return e.call(p)==="[object Number]"&&-2147483648<=p&&p<=2147483647}t.integer=c;function u(p){return e.call(p)==="[object Number]"&&0<=p&&p<=2147483647}t.uinteger=u;function l(p){return e.call(p)==="[object Function]"}t.func=l;function f(p){return p!==null&&typeof p=="object"}t.objectLiteral=f;function d(p,y){return Array.isArray(p)&&p.every(y)}t.typedArray=d})(R||(R={}));const L1=Object.freeze(Object.defineProperty({__proto__:null,get AnnotatedTextEdit(){return mn},get ChangeAnnotation(){return _r},get ChangeAnnotationIdentifier(){return Ke},get CodeAction(){return ql},get CodeActionContext(){return zl},get CodeActionKind(){return Ul},get CodeActionTriggerKind(){return ca},get CodeDescription(){return vl},get CodeLens(){return Bl},get Color(){return Jo},get ColorInformation(){return hl},get ColorPresentation(){return pl},get Command(){return Or},get CompletionItem(){return Nl},get CompletionItemKind(){return Al},get CompletionItemLabelDetails(){return Cl},get CompletionItemTag(){return Sl},get CompletionList(){return Pl},get CreateFile(){return Gi},get DeleteFile(){return Ui},get Diagnostic(){return ia},get DiagnosticRelatedInformation(){return Zo},get DiagnosticSeverity(){return yl},get DiagnosticTag(){return Tl},get DocumentHighlight(){return xl},get DocumentHighlightKind(){return Ll},get DocumentLink(){return Kl},get DocumentSymbol(){return jl},get DocumentUri(){return ll},EOL:k1,get FoldingRange(){return gl},get FoldingRangeKind(){return ml},get FormattingOptions(){return Wl},get Hover(){return Il},get InlayHint(){return tf},get InlayHintKind(){return tc},get InlayHintLabelPart(){return nc},get InlineCompletionContext(){return cf},get InlineCompletionItem(){return rf},get InlineCompletionList(){return sf},get InlineCompletionTriggerKind(){return af},get InlineValueContext(){return ef},get InlineValueEvaluatableExpression(){return Ql},get InlineValueText(){return Jl},get InlineValueVariableLookup(){return Zl},get InsertReplaceEdit(){return bl},get InsertTextFormat(){return _l},get InsertTextMode(){return wl},get Location(){return ra},get LocationLink(){return dl},get MarkedString(){return oa},get MarkupContent(){return zi},get MarkupKind(){return ec},get OptionalVersionedTextDocumentIdentifier(){return aa},get ParameterInformation(){return kl},get Position(){return ne},get Range(){return X},get RenameFile(){return ji},get SelectedCompletionInfo(){return of},get SelectionRange(){return Vl},get SemanticTokenModifiers(){return Yl},get SemanticTokenTypes(){return Hl},get SemanticTokens(){return Xl},get SignatureInformation(){return Ol},get StringValue(){return nf},get SymbolInformation(){return Fl},get SymbolKind(){return Ml},get SymbolTag(){return Dl},get TextDocument(){return lf},get TextDocumentEdit(){return sa},get TextDocumentIdentifier(){return $l},get TextDocumentItem(){return El},get TextEdit(){return Bt},get URI(){return Xo},get VersionedTextDocumentIdentifier(){return Rl},WorkspaceChange:I1,get WorkspaceEdit(){return Qo},get WorkspaceFolder(){return uf},get WorkspaceSymbol(){return Gl},get integer(){return fl},get uinteger(){return na}},Symbol.toStringTag,{value:"Module"}));class x1{constructor(){this.nodeStack=[]}get current(){return this.nodeStack[this.nodeStack.length-1]??this.rootNode}buildRootNode(e){return this.rootNode=new _T(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){const n=new Ad;return n.grammarSource=e,n.root=this.rootNode,this.current.content.push(n),this.nodeStack.push(n),n}buildLeafNode(e,n){const r=new ff(e.startOffset,e.image.length,Gu(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 ff(s.startOffset,s.image.length,Gu(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==null?void 0:r.content.length)===0&&this.removeNode(r)}}class AT{get hidden(){return!1}get astNode(){var n,r;const e=typeof((n=this._astNode)==null?void 0:n.$type)=="string"?this._astNode:(r=this.container)==null?void 0:r.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 ff extends AT{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 Ad extends AT{constructor(){super(...arguments),this.content=new _d(this)}get offset(){var e;return((e=this.firstNonHiddenNode)==null?void 0:e.offset)??0}get length(){return this.end-this.offset}get end(){var e;return((e=this.lastNonHiddenNode)==null?void 0:e.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:ne.create(0,0),end:ne.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 _d extends Array{constructor(e){super(),this.parent=e,Object.setPrototypeOf(this,_d.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 _T extends Ad{get text(){return this._text.substring(this.offset,this.end)}get fullText(){return this._text}constructor(e){super(),this._text="",this._text=e??""}}const df=Symbol("Datatype");function gu(t){return t.$type===df}const Gp="​",ST=t=>t.endsWith(Gp)?t:t+Gp;class bT{constructor(e){var i;this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=e.parser.Lexer;const n=this.lexer.definition,r=e.LanguageMetaData.mode==="production";(i=e.shared.profilers.LangiumProfiler)!=null&&i.isActive("parsing")?this.wrapper=new j1(n,{...e.parser.ParserConfig,skipValidations:r,errorMessageProvider:e.parser.ParserErrorMessageProvider},e.shared.profilers.LangiumProfiler.createTask("parsing",e.LanguageMetaData.languageId)):this.wrapper=new CT(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 M1 extends bT{get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new x1,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;Po(e)&&(i=e.name,this.registerPrecedenceMap(e));const s=this.wrapper.DEFINE_RULE(ST(e.name),this.startImplementation(r,i,n).bind(this));return this.allRules.set(e.name,s),Sn(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 Po(e)?Ks(e):e.fragment?void 0:hg(e)?df:Ks(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,Iu(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===df?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),u=this.current;if(o){const l=br(r)?i.image:this.converter.convert(i.image,a);this.assign(o.operator,o.feature,l,a,c)}else if(gu(u)){let l=i.image;br(r)||(l=this.converter.convert(l,a).toString()),u.value+=l}}}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(gu(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)):gu(e)?this.converter.convert(e.value,e.$cstNode):(gv(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 E=0;E<i.length;E++){const C=i[E],A=n.get(C)??{precedence:1/0,rightAssoc:!1};A.precedence>a?(a=A.precedence,s=E):A.precedence===a&&(A.rightAssoc||(s=E))}const o=i.slice(0,s),c=i.slice(s+1),u=r.slice(0,s+1),l=r.slice(s+1),f={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:u,operators:o},d={$infixName:e.$infixName,$type:e.$type,$cstNode:e.$cstNode,parts:l,operators:c},p=this.constructInfix(f,n),y=this.constructInfix(d,n);return{$type:e.$type,$cstNode:e.$cstNode,left:p,operator:i[s],right:y}}getAssignment(e){if(!this.assignmentMap.has(e)){const n=ic(e,Sr);this.assignmentMap.set(e,{assignment:n,crossRef:n&&ac(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 D1{buildMismatchTokenMessage(e){return hi.buildMismatchTokenMessage(e)}buildNotAllInputParsedMessage(e){return hi.buildNotAllInputParsedMessage(e)}buildNoViableAltMessage(e){return hi.buildNoViableAltMessage(e)}buildEarlyExitMessage(e){return hi.buildEarlyExitMessage(e)}}class wT extends D1{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 F1 extends bT{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(ST(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 G1={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new wT};class CT extends uk{constructor(e,n){const r=n&&"maxLookahead"in n;super(e,{...G1,lookaheadStrategy:r?new cd({maxLookahead:n.maxLookahead}):new f1({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 j1 extends CT{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 NT(t,e,n){return U1({parser:e,tokens:n,ruleNames:new Map},t),e}function U1(t,e){const n=cg(e,!1),r=Re(e.rules).filter(Sn).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,Lr(a,s.definition))}const i=Re(e.rules).filter(Po).filter(s=>n.has(s));for(const s of i)t.parser.rule(s,z1(t,s))}function z1(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(bn(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}},u={...s,$container:a};a.elements.push(c,u);const f=r.map(p=>t.tokens[p.value]).map((p,y)=>({ALT:()=>t.parser.consume(y,p,c)}));let d;return p=>{d??(d=Sd(t,n)),t.parser.subrule(0,d,!1,s,p),t.parser.many(0,{DEF:()=>{t.parser.alternatives(0,f),t.parser.subrule(1,d,!1,u,p)}})}}function Lr(t,e,n=!1){let r;if(br(e))r=Y1(t,e);else if(sc(e))r=q1(t,e);else if(Sr(e))r=Lr(t,e.terminal);else if(ac(e))r=PT(t,e);else if(wr(e))r=B1(t,e);else if(tg(e))r=K1(t,e);else if(rg(e))r=V1(t,e);else if(Nf(e))r=H1(t,e);else if(Ev(e)){const i=t.consume++;r=()=>t.parser.consume(i,Vn,e)}else throw new sg(e.$cstNode,`Unexpected element type: ${e.$type}`);return IT(t,n?void 0:rc(e),r,e.cardinality)}function q1(t,e){const n=Ks(e);return()=>t.parser.action(n,e)}function B1(t,e){const n=e.rule.ref;if(ha(n)){const r=t.subrule++,i=Sn(n)&&n.fragment,s=e.arguments.length>0?W1(n,e.arguments):()=>({});let a;return o=>{a??(a=Sd(t,n)),t.parser.subrule(r,a,i,e,s(o))}}else if(bn(n)){const r=t.consume++,i=hf(t,n.name);return()=>t.parser.consume(r,i,e)}else if(n)pa();else throw new sg(e.$cstNode,`Undefined rule: ${e.rule.$refText}`)}function W1(t,e){if(e.some(r=>r.calledByName)){const r=e.map(i=>{var s,a;return{parameterName:(a=(s=i.parameter)==null?void 0:s.ref)==null?void 0:a.name,predicate:Ut(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=>Ut(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 Ut(t){if(Rv(t)){const e=Ut(t.left),n=Ut(t.right);return r=>e(r)||n(r)}else if($v(t)){const e=Ut(t.left),n=Ut(t.right);return r=>e(r)&&n(r)}else if(Sv(t)){const e=Ut(t.value);return n=>!e(n)}else if(bv(t)){const e=t.parameter.ref.name;return n=>n!==void 0&&n[e]===!0}else if(Tv(t)){const e=!!t.true;return()=>e}pa()}function K1(t,e){if(e.elements.length===1)return Lr(t,e.elements[0]);{const n=[];for(const i of e.elements){const s={ALT:Lr(t,i,!0)},a=rc(i);a&&(s.GATE=Ut(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 V1(t,e){if(e.elements.length===1)return Lr(t,e.elements[0]);const n=[];for(const o of e.elements){const c={ALT:Lr(t,o,!0)},u=rc(o);u&&(c.GATE=Ut(u)),n.push(c)}const r=t.or++,i=(o,c)=>{const u=c.getRuleStack().join("-");return`uGroup_${o}_${u}`},s=o=>t.parser.alternatives(r,n.map((c,u)=>{const l={ALT:()=>!0},f=t.parser;l.ALT=()=>{if(c.ALT(o),!f.isRecording()){const p=i(r,f);f.unorderedGroups.get(p)||f.unorderedGroups.set(p,[]);const y=f.unorderedGroups.get(p);typeof(y==null?void 0:y[u])>"u"&&(y[u]=!0)}};const d=c.GATE;return d?l.GATE=()=>d(o):l.GATE=()=>{const p=f.unorderedGroups.get(i(r,f));return!(p!=null&&p[u])},l})),a=IT(t,rc(e),s,"*");return o=>{a(o),t.parser.isRecording()||t.parser.unorderedGroups.delete(i(r,t.parser))}}function H1(t,e){const n=e.elements.map(r=>Lr(t,r));return r=>n.forEach(i=>i(r))}function rc(t){if(Nf(t))return t.guardCondition}function PT(t,e,n=e.terminal){if(n)if(wr(n)&&Sn(n.rule.ref)){const r=n.rule.ref,i=t.subrule++;let s;return a=>{s??(s=Sd(t,r)),t.parser.subrule(i,s,!1,e,a)}}else if(wr(n)&&bn(n.rule.ref)){const r=t.consume++,i=hf(t,n.rule.ref.name);return()=>t.parser.consume(r,i,e)}else if(br(n)){const r=t.consume++,i=hf(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 r=fg(e.type.ref),i=r==null?void 0:r.terminal;if(!i)throw new Error("Could not find name assignment for type: "+Ks(e.type.ref));return PT(t,e,i)}}function Y1(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 IT(t,e,n,r){const i=e&&Ut(e);if(!r)if(i){const s=t.or++;return a=>t.parser.alternatives(s,[{ALT:()=>n(a),GATE:()=>i(a)},{ALT:fp(),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:fp(),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 pa()}function Sd(t,e){const n=X1(t,e),r=t.parser.getRule(n);if(!r)throw new Error(`Rule "${n}" not found."`);return r}function X1(t,e){if(ha(e))return e.name;if(t.ruleNames.has(e))return t.ruleNames.get(e);{let n=e,r=n.$container,i=e.$type;for(;!Sn(r);)(Nf(r)||tg(r)||rg(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 hf(t,e){const n=t.tokens[e];if(!n)throw new Error(`Token "${e}" not found."`);return n}function J1(t){const e=t.Grammar,n=t.parser.Lexer,r=new F1(t);return NT(e,r,n.definition),r.finalize(),r}function Z1(t){const e=Q1(t);return e.finalize(),e}function Q1(t){const e=t.Grammar,n=t.parser.Lexer,r=new M1(t);return NT(e,r,n.definition)}class kT{constructor(){this.diagnostics=[]}buildTokens(e,n){const r=Re(cg(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(bn).filter(n=>!n.fragment).map(n=>this.buildTerminalToken(n)).toArray()}buildTerminalToken(e){const n=If(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=og(n)?it.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(ha).flatMap(i=>da(i).filter(br)).distinct(i=>i.value).toArray().sort((i,s)=>s.value.length-i.value.length).map(i=>this.buildKeywordToken(i,n,!!(r!=null&&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(cc(e.value),"i"):e.value}findLongerAlt(e,n){return n.reduce((r,i)=>{const s=i==null?void 0:i.PATTERN;return s!=null&&s.source&&Xv("^"+s.source+"$",e.value)&&r.push(i),r},[])}}class OT{convert(e,n){let r=n.grammarSource;if(ac(r)&&(r=e$(r)),wr(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){var i;switch(e.name.toUpperCase()){case"INT":return fn.convertInt(n);case"STRING":return fn.convertString(n);case"ID":return fn.convertID(n)}switch((i=o$(e))==null?void 0:i.toLowerCase()){case"number":return fn.convertNumber(n);case"boolean":return fn.convertBoolean(n);case"bigint":return fn.convertBigint(n);case"date":return fn.convertDate(n);default:return n}}}var fn;(function(t){function e(u){let l="";for(let f=1;f<u.length-1;f++){const d=u.charAt(f);if(d==="\\"){const p=u.charAt(++f);l+=n(p)}else l+=d}return l}t.convertString=e;function n(u){switch(u){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 u}}function r(u){return u.charAt(0)==="^"?u.substring(1):u}t.convertID=r;function i(u){return parseInt(u)}t.convertInt=i;function s(u){return BigInt(u)}t.convertBigint=s;function a(u){return new Date(u)}t.convertDate=a;function o(u){return Number(u)}t.convertNumber=o;function c(u){return u.toLowerCase()==="true"}t.convertBoolean=c})(fn||(fn={}));var ar={},io={},jp;function qr(){if(jp)return io;jp=1,Object.defineProperty(io,"__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={})),io.default=e,io}var ze={},Up;function Ca(){if(Up)return ze;Up=1,Object.defineProperty(ze,"__esModule",{value:!0}),ze.stringArray=ze.array=ze.func=ze.error=ze.number=ze.string=ze.boolean=void 0;function t(o){return o===!0||o===!1}ze.boolean=t;function e(o){return typeof o=="string"||o instanceof String}ze.string=e;function n(o){return typeof o=="number"||o instanceof Number}ze.number=n;function r(o){return o instanceof Error}ze.error=r;function i(o){return typeof o=="function"}ze.func=i;function s(o){return Array.isArray(o)}ze.array=s;function a(o){return s(o)&&o.every(c=>e(c))}return ze.stringArray=a,ze}var or={},zp;function Yi(){if(zp)return or;zp=1,Object.defineProperty(or,"__esModule",{value:!0}),or.Emitter=or.Event=void 0;const t=qr();var e;(function(i){const s={dispose(){}};i.None=function(){return s}})(e||(or.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,u=this._callbacks.length;c<u;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 u=0,l=o.length;u<l;u++)try{a.push(o[u].apply(c[u],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 or.Emitter=r,r._noop=function(){},or}var qp;function Kc(){if(qp)return ar;qp=1,Object.defineProperty(ar,"__esModule",{value:!0}),ar.CancellationTokenSource=ar.CancellationToken=void 0;const t=qr(),e=Ca(),n=Yi();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(u){const l=u;return l&&(l===o.None||l===o.Cancelled||e.boolean(l.isCancellationRequested)&&!!l.onCancellationRequested)}o.is=c})(r||(ar.CancellationToken=r={}));const i=Object.freeze(function(o,c){const u=(0,t.default)().timer.setTimeout(o.bind(c),0);return{dispose(){u.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 ar.CancellationTokenSource=a,ar}var Ae=Kc();function eM(){return new Promise(t=>{typeof setImmediate>"u"?setTimeout(t,0):setImmediate(t)})}let So=0,tM=10;function nM(){return So=performance.now(),new Ae.CancellationTokenSource}const pi=Symbol("OperationCancelled");function Vc(t){return t===pi}async function et(t){if(t===Ae.CancellationToken.None)return;const e=performance.now();if(e-So>=tM&&(So=e,await eM(),So=performance.now()),t.isCancellationRequested)throw pi}class bd{constructor(){this.promise=new Promise((e,n)=>{this.resolve=r=>(e(r),this),this.reject=r=>(n(r),this)})}}class ua{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(ua.isIncremental(r)){const i=xT(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 u=this._lineOffsets;const l=Bp(r.text,!1,s);if(c-o===l.length)for(let d=0,p=l.length;d<p;d++)u[d+o+1]=l[d];else l.length<1e4?u.splice(o+1,c-o,...l):this._lineOffsets=u=u.slice(0,o+1).concat(l,u.slice(c+1));const f=r.text.length-(a-s);if(f!==0)for(let d=o+1+l.length,p=u.length;d<p;d++)u[d]=u[d]+f}else if(ua.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=Bp(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&&LT(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 pf;(function(t){function e(i,s,a,o){return new ua(i,s,a,o)}t.create=e;function n(i,s,a){if(i instanceof ua)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=mf(s.map(rM),(l,f)=>{const d=l.range.start.line-f.range.start.line;return d===0?l.range.start.character-f.range.start.character:d});let c=0;const u=[];for(const l of o){const f=i.offsetAt(l.range.start);if(f<c)throw new Error("Overlapping edit");f>c&&u.push(a.substring(c,f)),l.newText.length&&u.push(l.newText),c=i.offsetAt(l.range.end)}return u.push(a.substr(c)),u.join("")}t.applyEdits=r})(pf||(pf={}));function mf(t,e){if(t.length<=1)return t;const n=t.length/2|0,r=t.slice(0,n),i=t.slice(n);mf(r,e),mf(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 Bp(t,e,n=0){const r=e?[n]:[];for(let i=0;i<t.length;i++){const s=t.charCodeAt(i);LT(s)&&(s===13&&i+1<t.length&&t.charCodeAt(i+1)===10&&i++,r.push(n+i+1))}return r}function LT(t){return t===13||t===10}function xT(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 rM(t){const e=xT(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var MT;(()=>{var t={975:P=>{function $(T){if(typeof T!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(T))}function g(T,v){for(var S,L="",M=0,x=-1,z=0,F=0;F<=T.length;++F){if(F<T.length)S=T.charCodeAt(F);else{if(S===47)break;S=47}if(S===47){if(!(x===F-1||z===1))if(x!==F-1&&z===2){if(L.length<2||M!==2||L.charCodeAt(L.length-1)!==46||L.charCodeAt(L.length-2)!==46){if(L.length>2){var se=L.lastIndexOf("/");if(se!==L.length-1){se===-1?(L="",M=0):M=(L=L.slice(0,se)).length-1-L.lastIndexOf("/"),x=F,z=0;continue}}else if(L.length===2||L.length===1){L="",M=0,x=F,z=0;continue}}v&&(L.length>0?L+="/..":L="..",M=2)}else L.length>0?L+="/"+T.slice(x+1,F):L=T.slice(x+1,F),M=F-x-1;x=F,z=0}else S===46&&z!==-1?++z:z=-1}return L}var w={resolve:function(){for(var T,v="",S=!1,L=arguments.length-1;L>=-1&&!S;L--){var M;L>=0?M=arguments[L]:(T===void 0&&(T=process.cwd()),M=T),$(M),M.length!==0&&(v=M+"/"+v,S=M.charCodeAt(0)===47)}return v=g(v,!S),S?v.length>0?"/"+v:"/":v.length>0?v:"."},normalize:function(T){if($(T),T.length===0)return".";var v=T.charCodeAt(0)===47,S=T.charCodeAt(T.length-1)===47;return(T=g(T,!v)).length!==0||v||(T="."),T.length>0&&S&&(T+="/"),v?"/"+T:T},isAbsolute:function(T){return $(T),T.length>0&&T.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var T,v=0;v<arguments.length;++v){var S=arguments[v];$(S),S.length>0&&(T===void 0?T=S:T+="/"+S)}return T===void 0?".":w.normalize(T)},relative:function(T,v){if($(T),$(v),T===v||(T=w.resolve(T))===(v=w.resolve(v)))return"";for(var S=1;S<T.length&&T.charCodeAt(S)===47;++S);for(var L=T.length,M=L-S,x=1;x<v.length&&v.charCodeAt(x)===47;++x);for(var z=v.length-x,F=M<z?M:z,se=-1,B=0;B<=F;++B){if(B===F){if(z>F){if(v.charCodeAt(x+B)===47)return v.slice(x+B+1);if(B===0)return v.slice(x+B)}else M>F&&(T.charCodeAt(S+B)===47?se=B:B===0&&(se=0));break}var re=T.charCodeAt(S+B);if(re!==v.charCodeAt(x+B))break;re===47&&(se=B)}var je="";for(B=S+se+1;B<=L;++B)B!==L&&T.charCodeAt(B)!==47||(je.length===0?je+="..":je+="/..");return je.length>0?je+v.slice(x+se):(x+=se,v.charCodeAt(x)===47&&++x,v.slice(x))},_makeLong:function(T){return T},dirname:function(T){if($(T),T.length===0)return".";for(var v=T.charCodeAt(0),S=v===47,L=-1,M=!0,x=T.length-1;x>=1;--x)if((v=T.charCodeAt(x))===47){if(!M){L=x;break}}else M=!1;return L===-1?S?"/":".":S&&L===1?"//":T.slice(0,L)},basename:function(T,v){if(v!==void 0&&typeof v!="string")throw new TypeError('"ext" argument must be a string');$(T);var S,L=0,M=-1,x=!0;if(v!==void 0&&v.length>0&&v.length<=T.length){if(v.length===T.length&&v===T)return"";var z=v.length-1,F=-1;for(S=T.length-1;S>=0;--S){var se=T.charCodeAt(S);if(se===47){if(!x){L=S+1;break}}else F===-1&&(x=!1,F=S+1),z>=0&&(se===v.charCodeAt(z)?--z==-1&&(M=S):(z=-1,M=F))}return L===M?M=F:M===-1&&(M=T.length),T.slice(L,M)}for(S=T.length-1;S>=0;--S)if(T.charCodeAt(S)===47){if(!x){L=S+1;break}}else M===-1&&(x=!1,M=S+1);return M===-1?"":T.slice(L,M)},extname:function(T){$(T);for(var v=-1,S=0,L=-1,M=!0,x=0,z=T.length-1;z>=0;--z){var F=T.charCodeAt(z);if(F!==47)L===-1&&(M=!1,L=z+1),F===46?v===-1?v=z:x!==1&&(x=1):v!==-1&&(x=-1);else if(!M){S=z+1;break}}return v===-1||L===-1||x===0||x===1&&v===L-1&&v===S+1?"":T.slice(v,L)},format:function(T){if(T===null||typeof T!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof T);return function(v,S){var L=S.dir||S.root,M=S.base||(S.name||"")+(S.ext||"");return L?L===S.root?L+M:L+"/"+M:M}(0,T)},parse:function(T){$(T);var v={root:"",dir:"",base:"",ext:"",name:""};if(T.length===0)return v;var S,L=T.charCodeAt(0),M=L===47;M?(v.root="/",S=1):S=0;for(var x=-1,z=0,F=-1,se=!0,B=T.length-1,re=0;B>=S;--B)if((L=T.charCodeAt(B))!==47)F===-1&&(se=!1,F=B+1),L===46?x===-1?x=B:re!==1&&(re=1):x!==-1&&(re=-1);else if(!se){z=B+1;break}return x===-1||F===-1||re===0||re===1&&x===F-1&&x===z+1?F!==-1&&(v.base=v.name=z===0&&M?T.slice(1,F):T.slice(z,F)):(z===0&&M?(v.name=T.slice(1,x),v.base=T.slice(1,F)):(v.name=T.slice(z,x),v.base=T.slice(z,F)),v.ext=T.slice(x,F)),z>0?v.dir=T.slice(0,z-1):M&&(v.dir="/"),v},sep:"/",delimiter:":",win32:null,posix:null};w.posix=w,P.exports=w}},e={};function n(P){var $=e[P];if($!==void 0)return $.exports;var g=e[P]={exports:{}};return t[P](g,g.exports,n),g.exports}n.d=(P,$)=>{for(var g in $)n.o($,g)&&!n.o(P,g)&&Object.defineProperty(P,g,{enumerable:!0,get:$[g]})},n.o=(P,$)=>Object.prototype.hasOwnProperty.call(P,$),n.r=P=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(P,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(P,"__esModule",{value:!0})};var r={};let i;n.r(r),n.d(r,{URI:()=>d,Utils:()=>ye}),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(P,$){if(!P.scheme&&$)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${P.authority}", path: "${P.path}", query: "${P.query}", fragment: "${P.fragment}"}`);if(P.scheme&&!s.test(P.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(P.path){if(P.authority){if(!a.test(P.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(P.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}}const u="",l="/",f=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class d{constructor($,g,w,T,v,S=!1){Fn(this,"scheme");Fn(this,"authority");Fn(this,"path");Fn(this,"query");Fn(this,"fragment");typeof $=="object"?(this.scheme=$.scheme||u,this.authority=$.authority||u,this.path=$.path||u,this.query=$.query||u,this.fragment=$.fragment||u):(this.scheme=function(L,M){return L||M?L:"file"}($,S),this.authority=g||u,this.path=function(L,M){switch(L){case"https":case"http":case"file":M?M[0]!==l&&(M=l+M):M=l}return M}(this.scheme,w||u),this.query=T||u,this.fragment=v||u,c(this,S))}static isUri($){return $ instanceof d||!!$&&typeof $.authority=="string"&&typeof $.fragment=="string"&&typeof $.path=="string"&&typeof $.query=="string"&&typeof $.scheme=="string"&&typeof $.fsPath=="string"&&typeof $.with=="function"&&typeof $.toString=="function"}get fsPath(){return _(this)}with($){if(!$)return this;let{scheme:g,authority:w,path:T,query:v,fragment:S}=$;return g===void 0?g=this.scheme:g===null&&(g=u),w===void 0?w=this.authority:w===null&&(w=u),T===void 0?T=this.path:T===null&&(T=u),v===void 0?v=this.query:v===null&&(v=u),S===void 0?S=this.fragment:S===null&&(S=u),g===this.scheme&&w===this.authority&&T===this.path&&v===this.query&&S===this.fragment?this:new y(g,w,T,v,S)}static parse($,g=!1){const w=f.exec($);return w?new y(w[2]||u,H(w[4]||u),H(w[5]||u),H(w[7]||u),H(w[9]||u),g):new y(u,u,u,u,u)}static file($){let g=u;if(i&&($=$.replace(/\\/g,l)),$[0]===l&&$[1]===l){const w=$.indexOf(l,2);w===-1?(g=$.substring(2),$=l):(g=$.substring(2,w),$=$.substring(w)||l)}return new y("file",g,$,u,u)}static from($){const g=new y($.scheme,$.authority,$.path,$.query,$.fragment);return c(g,!0),g}toString($=!1){return b(this,$)}toJSON(){return this}static revive($){if($){if($ instanceof d)return $;{const g=new y($);return g._formatted=$.external,g._fsPath=$._sep===p?$.fsPath:null,g}}return $}}const p=i?1:void 0;class y extends d{constructor(){super(...arguments);Fn(this,"_formatted",null);Fn(this,"_fsPath",null)}get fsPath(){return this._fsPath||(this._fsPath=_(this)),this._fsPath}toString(g=!1){return g?b(this,!0):(this._formatted||(this._formatted=b(this,!1)),this._formatted)}toJSON(){const g={$mid:1};return this._fsPath&&(g.fsPath=this._fsPath,g._sep=p),this._formatted&&(g.external=this._formatted),this.path&&(g.path=this.path),this.scheme&&(g.scheme=this.scheme),this.authority&&(g.authority=this.authority),this.query&&(g.query=this.query),this.fragment&&(g.fragment=this.fragment),g}}const E={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 C(P,$,g){let w,T=-1;for(let v=0;v<P.length;v++){const S=P.charCodeAt(v);if(S>=97&&S<=122||S>=65&&S<=90||S>=48&&S<=57||S===45||S===46||S===95||S===126||$&&S===47||g&&S===91||g&&S===93||g&&S===58)T!==-1&&(w+=encodeURIComponent(P.substring(T,v)),T=-1),w!==void 0&&(w+=P.charAt(v));else{w===void 0&&(w=P.substr(0,v));const L=E[S];L!==void 0?(T!==-1&&(w+=encodeURIComponent(P.substring(T,v)),T=-1),w+=L):T===-1&&(T=v)}}return T!==-1&&(w+=encodeURIComponent(P.substring(T))),w!==void 0?w:P}function A(P){let $;for(let g=0;g<P.length;g++){const w=P.charCodeAt(g);w===35||w===63?($===void 0&&($=P.substr(0,g)),$+=E[w]):$!==void 0&&($+=P[g])}return $!==void 0?$:P}function _(P,$){let g;return g=P.authority&&P.path.length>1&&P.scheme==="file"?`//${P.authority}${P.path}`:P.path.charCodeAt(0)===47&&(P.path.charCodeAt(1)>=65&&P.path.charCodeAt(1)<=90||P.path.charCodeAt(1)>=97&&P.path.charCodeAt(1)<=122)&&P.path.charCodeAt(2)===58?P.path[1].toLowerCase()+P.path.substr(2):P.path,i&&(g=g.replace(/\//g,"\\")),g}function b(P,$){const g=$?A:C;let w="",{scheme:T,authority:v,path:S,query:L,fragment:M}=P;if(T&&(w+=T,w+=":"),(v||T==="file")&&(w+=l,w+=l),v){let x=v.indexOf("@");if(x!==-1){const z=v.substr(0,x);v=v.substr(x+1),x=z.lastIndexOf(":"),x===-1?w+=g(z,!1,!1):(w+=g(z.substr(0,x),!1,!1),w+=":",w+=g(z.substr(x+1),!1,!0)),w+="@"}v=v.toLowerCase(),x=v.lastIndexOf(":"),x===-1?w+=g(v,!1,!0):(w+=g(v.substr(0,x),!1,!0),w+=v.substr(x))}if(S){if(S.length>=3&&S.charCodeAt(0)===47&&S.charCodeAt(2)===58){const x=S.charCodeAt(1);x>=65&&x<=90&&(S=`/${String.fromCharCode(x+32)}:${S.substr(3)}`)}else if(S.length>=2&&S.charCodeAt(1)===58){const x=S.charCodeAt(0);x>=65&&x<=90&&(S=`${String.fromCharCode(x+32)}:${S.substr(2)}`)}w+=g(S,!0,!1)}return L&&(w+="?",w+=g(L,!1,!1)),M&&(w+="#",w+=$?M:C(M,!1,!1)),w}function I(P){try{return decodeURIComponent(P)}catch{return P.length>3?P.substr(0,3)+I(P.substr(3)):P}}const U=/(%[0-9A-Za-z][0-9A-Za-z])+/g;function H(P){return P.match(U)?P.replace(U,$=>I($)):P}var J=n(975);const oe=J.posix||J,ge="/";var ye;(function(P){P.joinPath=function($,...g){return $.with({path:oe.join($.path,...g)})},P.resolvePath=function($,...g){let w=$.path,T=!1;w[0]!==ge&&(w=ge+w,T=!0);let v=oe.resolve(w,...g);return T&&v[0]===ge&&!$.authority&&(v=v.substring(1)),$.with({path:v})},P.dirname=function($){if($.path.length===0||$.path===ge)return $;let g=oe.dirname($.path);return g.length===1&&g.charCodeAt(0)===46&&(g=""),$.with({path:g})},P.basename=function($){return oe.basename($.path)},P.extname=function($){return oe.extname($.path)}})(ye||(ye={})),MT=r})();const{URI:kt,Utils:ys}=MT;var pt;(function(t){t.basename=ys.basename,t.dirname=ys.dirname,t.extname=ys.extname,t.joinPath=ys.joinPath,t.resolvePath=ys.resolvePath;const e=typeof process=="object"&&(process==null?void 0:process.platform)==="win32";function n(a,o){return(a==null?void 0:a.toString())===(o==null?void 0:o.toString())}t.equals=n;function r(a,o){const c=typeof a=="string"?kt.parse(a).path:a.path,u=typeof o=="string"?kt.parse(o).path:o.path,l=c.split("/").filter(E=>E.length>0),f=u.split("/").filter(E=>E.length>0);if(e){const E=/^[A-Z]:$/;if(l[0]&&E.test(l[0])&&(l[0]=l[0].toLowerCase()),f[0]&&E.test(f[0])&&(f[0]=f[0].toLowerCase()),l[0]!==f[0])return u.substring(1)}let d=0;for(;d<l.length&&l[d]===f[d];d++);const p="../".repeat(l.length-d),y=f.slice(d).join("/");return p+y}t.relative=r;function i(a){return kt.parse(a.toString()).toString()}t.normalize=i;function s(a,o){let c=typeof a=="string"?a:a.path,u=typeof o=="string"?o:o.path;return u.charAt(u.length-1)==="/"&&(u=u.slice(0,-1)),c.charAt(c.length-1)==="/"&&(c=c.slice(0,-1)),u===c?!0:u.length<c.length||u.charAt(c.length)!=="/"?!1:u.startsWith(c)}t.contains=s})(pt||(pt={}));class iM{constructor(){this.root={name:"",children:new Map}}normalizeUri(e){return pt.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!=null&&n.parent&&n.parent.children.delete(n.name)}has(e){var n;return((n=this.getNode(this.normalizeUri(e),!1))==null?void 0:n.element)!==void 0}hasNode(e){return this.getNode(this.normalizeUri(e),!1)!==void 0}find(e){var n;return(n=this.getNode(this.normalizeUri(e),!1))==null?void 0:n.element}findNode(e){const n=this.normalizeUri(e),r=this.getNode(n,!1);if(r)return{name:r.name,uri:pt.joinPath(kt.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:pt.joinPath(kt.parse(n),i.name).toString(),element:i.element})):[]}all(){return this.collectValues(this.root)}findAll(e){const n=this.getNode(pt.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 sM{constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,n=Ae.CancellationToken.None){const r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,n)}fromTextDocument(e,n,r){return n=n??kt.parse(e.uri),Ae.CancellationToken.is(r)?this.createAsync(n,e,r):this.create(n,e,r)}fromString(e,n,r){return Ae.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){var a,o;const r=(a=e.parseResult.value.$cstNode)==null?void 0:a.root.fullText,i=(o=this.textDocuments)==null?void 0:o.get(e.uri.toString()),s=i?i.getText():await this.fileSystemProvider.readFile(e.uri);if(i)Object.defineProperty(e,"textDocument",{value:i});else{const c=this.createTextDocumentGetter(e.uri,s);Object.defineProperty(e,"textDocument",{get:c})}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=pf.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,n??""))}}class aM{constructor(e){this.documentTrie=new iM,this.services=e,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.documentBuilder=()=>e.workspace.DocumentBuilder}get all(){return Re(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 Xr=Symbol("RefResolving");class oM{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=Ae.CancellationToken.None){var r;if((r=this.profiler)!=null&&r.isActive("linking")){const i=this.profiler.createTask("linking",this.languageId);i.start();try{for(const s of Tn(e.parseResult.value))await et(n),No(s).forEach(a=>{const o=`${s.$type}:${a.property}`;i.startSubTask(o);try{this.doLink(a,e)}finally{i.stopSubTask(o)}})}finally{i.stop()}}else for(const i of Tn(e.parseResult.value))await et(n),No(i).forEach(s=>this.doLink(s,e))}doLink(e,n){const r=e.reference;if("_ref"in r&&r._ref===void 0){r._ref=Xr;try{const i=this.getCandidate(e);if(cs(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=Xr;try{const i=this.getCandidates(e),s=[];if(cs(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(Ye(this._ref))return this._ref;if(pv(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=Xr;const o=fo(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==null||o.references.push(this)}else this._ref===Xr&&s.throwCyclicReferenceError(e,n,i);return Ye(this._ref)?this._ref:void 0},get $nodeDescription(){return this._nodeDescription},get error(){return cs(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=Xr;const o=fo(e).$document,c=s.getCandidates({reference:a,container:e,property:n}),u=[];if(cs(c))this._linkingError=c;else for(const l of c){const f=s.loadAstNode(l);f&&u.push({ref:f,$nodeDescription:l})}this._items=u,o==null||o.references.push(this)}else this._items===Xr&&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(cs(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=fo(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 cM(t){return typeof t.name=="string"}class uM{getName(e){if(cM(e))return e.name}getNameNode(e){return lg(e.$cstNode,"name")}}class lM{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=Tn(e.Grammar).some(n=>ac(n)&&n.isMulti)}findDeclarations(e){if(e){const n=s$(e),r=e.astNode;if(n&&r){const i=r[n.feature];if(Pt(i)||Un(i))return Pd(i);if(Array.isArray(i)){for(const s of i)if((Pt(s)||Un(s))&&s.$refNode&&s.$refNode.offset<=e.offset&&s.$refNode.end>=e.end)return Pd(s)}}if(r){const i=this.nameProvider.getNameNode(r);if(i&&(i===e||Mv(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 No(r))if(Un(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=>pt.equals(s.sourceUri,n.documentUri))),r.push(...i),Re(r)}getSelfReferences(e){const n=this.getSelfNodes(e),r=[];for(const i of n){const s=this.nameProvider.getNameNode(i);if(s){const a=yn(i),o=this.nodeLocator.getAstNodePath(i);r.push({sourceUri:a.uri,sourcePath:o,targetUri:a.uri,targetPath:o,segment:Io(s),local:!0})}}return r}}class la{constructor(e){if(this.map=new Map,e)for(const[n,r]of e)this.add(n,r)}get size(){return Pu.sum(Re(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?Re(n):Qm}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 Re(this.map.entries()).flatMap(([e,n])=>n.map(r=>[e,r]))}keys(){return Re(this.map.keys())}values(){return Re(this.map.values()).flat()}entriesGroupedByKey(){return Re(this.map.entries())}}class Wp{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 fM{constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async collectExportedSymbols(e,n=Ae.CancellationToken.None){return this.collectExportedSymbolsForNode(e.parseResult.value,e,void 0,n)}async collectExportedSymbolsForNode(e,n,r=Cf,i=Ae.CancellationToken.None){const s=[];this.addExportedSymbol(e,s,n);for(const a of r(e))await et(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=Ae.CancellationToken.None){const r=e.parseResult.value,i=new la;for(const s of da(r))await et(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 Kp{constructor(e,n,r){this.elements=e,this.outerScope=n,this.caseInsensitive=(r==null?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(r==null?void 0: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 dM{constructor(e,n,r){this.elements=new la,this.caseInsensitive=(r==null?void 0:r.caseInsensitive)??!1,this.concatOuterScope=(r==null?void 0: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?Re(r).concat(this.outerScope.getElements(e)):Re(r)}getAllElements(){let e=Re(this.elements.values());return this.outerScope&&(e=e.concat(this.outerScope.getAllElements())),e}}class DT{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 hM extends DT{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 pM extends DT{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 mM extends hM{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 gM{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 mM(e.shared)}getScope(e){const n=[],r=this.reflection.getReferenceType(e),i=yn(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 Kp(Re(e),n,r)}createScopeForNodes(e,n,r){const i=Re(e).map(s=>{const a=this.nameProvider.getName(s);if(a)return this.descriptions.createDescription(s,a)}).nonNullable();return new Kp(i,n,r)}getGlobalScope(e,n){return this.globalScopeCache.get(e,()=>new dM(this.indexManager.allElements(e)))}}function yM(t){return typeof t.$comment=="string"}function Vp(t){return typeof t=="object"&&!!t&&("$ref"in t||"$error"in t)}class TM{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==null?void 0:n.replacer,s=(o,c)=>this.replacer(o,c,r),a=i?(o,c)=>i(o,c,s):s;try{return this.currentDocument=yn(e),JSON.stringify(e,a,n==null?void 0: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}){var c,u,l;if(!this.ignoreProperties.has(e))if(Pt(n)){const f=n.ref,d=r?n.$refText:void 0;if(f){const p=yn(f);let y="";this.currentDocument&&this.currentDocument!==p&&(o?y=o(p.uri,f):y=p.uri.toString());const E=this.astNodeLocator.getAstNodePath(f);return{$ref:`${y}#${E}`,$refText:d}}else return{$error:((c=n.error)==null?void 0:c.message)??"Could not resolve reference",$refText:d}}else if(Un(n)){const f=r?n.$refText:void 0,d=[];for(const p of n.items){const y=p.ref,E=yn(p.ref);let C="";this.currentDocument&&this.currentDocument!==E&&(o?C=o(E.uri,y):C=E.uri.toString());const A=this.astNodeLocator.getAstNodePath(y);d.push(`${C}#${A}`)}return{$refs:d,$refText:f}}else if(Ye(n)){let f;if(s&&(f=this.addAstNodeRegionWithAssignmentsTo({...n}),(!e||n.$document)&&(f!=null&&f.$textRegion)&&(f.$textRegion.documentURI=(u=this.currentDocument)==null?void 0:u.uri.toString())),i&&!e&&(f??(f={...n}),f.$sourceText=(l=n.$cstNode)==null?void 0:l.text),a){f??(f={...n});const d=this.commentProvider.getComment(n);d&&(f.$comment=d.replace(/\r/g,""))}return f??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=n$(e.$cstNode,s).map(n);a.length!==0&&(i[s]=a)}),e}}linkNode(e,n,r,i,s,a){for(const[c,u]of Object.entries(e))if(Array.isArray(u))for(let l=0;l<u.length;l++){const f=u[l];Vp(f)?u[l]=this.reviveReference(e,c,n,f,r):Ye(f)&&this.linkNode(f,n,r,e,c,l)}else Vp(u)?e[c]=this.reviveReference(e,c,n,u,r):Ye(u)&&this.linkNode(u,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 u=this.getRefNode(r,i.$ref,s.uriConverter);if(Ye(u))return a||(a=this.nameProvider.getName(u)),{$refText:a??"",ref:u};o=u}else if(i.$refs){const u=[];for(const l of i.$refs){const f=this.getRefNode(r,l,s.uriConverter);Ye(f)&&u.push({ref:f})}if(u.length===0)c={$refText:a??"",items:u},o??(o="Could not resolve multi-reference");else return{$refText:a??"",items:u}}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):kt.parse(n),u=this.langiumDocuments.getDocument(c);return u?u.parseResult.value:"Could not find document for URI: "+n}const s=r?r(n.substring(0,i)):kt.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 vM{get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.fileNameMap=new Map,this.textDocuments=e==null?void 0: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){var a,o;if(this.languageIdMap.size===0)throw new Error("The service registry is empty. Use `register` to register the services of a language.");const n=(o=(a=this.textDocuments)==null?void 0:a.get(e))==null?void 0:o.languageId;if(n!==void 0){const c=this.languageIdMap.get(n);if(c)return c}const r=pt.extname(e),i=pt.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 Gs(t){return{code:t}}var gf;(function(t){t.defaults=["fast","slow","built-in"],t.all=t.defaults})(gf||(gf={}));class $M{constructor(e){this.entries=new la,this.knownCategories=new Set(gf.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 pa()}}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(Vc(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=Re(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 RM=Object.freeze({validateNode:!0,validateChildren:!0});class EM{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=Ae.CancellationToken.None){const i=e.parseResult,s=[];if(await et(r),(!n.categories||n.categories.includes("built-in"))&&(this.processLexingErrors(i,s,n),n.stopAfterLexingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.LexingError})||(this.processParsingErrors(i,s,n),n.stopAfterParsingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.ParsingError}))||(this.processLinkingErrors(e,s,n),n.stopAfterLinkingErrors&&s.some(a=>{var o;return((o=a.data)==null?void 0:o.code)===Nt.LinkingError}))))return s;try{s.push(...await this.validateAst(i.value,n,r))}catch(a){if(Vc(a))throw a;console.error("An error occurred during validation:",a)}return await et(r),s}processLexingErrors(e,n,r){var s;const i=[...e.lexerErrors,...((s=e.lexerReport)==null?void 0:s.diagnostics)??[]];for(const a of i){const o=a.severity??"error",c={severity:yu(o),range:{start:{line:a.line-1,character:a.column-1},end:{line:a.line-1,character:a.column+a.length-1}},message:a.message,data:_M(o),source:this.getSource()};n.push(c)}}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=Gu(i.token);if(s){const a={severity:yu("error"),range:s,message:i.message,data:Gs(Nt.ParsingError),source:this.getSource()};n.push(a)}}}processLinkingErrors(e,n,r){var i;for(const s of e.references){const a=s.error;if(a){const o={node:a.info.container,range:(i=s.$refNode)==null?void 0:i.range,property:a.info.property,index:a.info.index,data:{code:Nt.LinkingError,containerType:a.info.container.$type,property:a.info.property,refText:a.info.reference.$refText}};n.push(this.toDiagnostic("error",a.message,o))}}}async validateAst(e,n,r=Ae.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=Ae.CancellationToken.None){const s=this.validationRegistry.checksBefore;for(const a of s)await et(i),await a(e,r,n.categories??[],i)}async validateAstNodes(e,n,r,i=Ae.CancellationToken.None){var s;if((s=this.profiler)!=null&&s.isActive("validating")){const a=this.profiler.createTask("validating",this.languageId);a.start();try{const o=Tn(e).iterator();for(const c of o){a.startSubTask(c.$type);const u=this.validateSingleNodeOptions(c,n);if(u.validateNode)try{const l=this.validationRegistry.getChecks(c.$type,n.categories);for(const f of l)await f(c,r,i)}finally{a.stopSubTask(c.$type)}u.validateChildren||o.prune()}}finally{a.stop()}}else{const a=Tn(e).iterator();for(const o of a){await et(i);const c=this.validateSingleNodeOptions(o,n);if(c.validateNode){const u=this.validationRegistry.getChecks(o.$type,n.categories);for(const l of u)await l(o,r,i)}c.validateChildren||a.prune()}}}validateSingleNodeOptions(e,n){return RM}async validateAstAfter(e,n,r,i=Ae.CancellationToken.None){const s=this.validationRegistry.checksAfter;for(const a of s)await et(i),await a(e,r,n.categories??[],i)}toDiagnostic(e,n,r){return{message:n,range:AM(r),severity:yu(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 AM(t){if(t.range)return t.range;let e;return typeof t.property=="string"?e=lg(t.node.$cstNode,t.property,t.index):typeof t.keyword=="string"&&(e=r$(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 yu(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 _M(t){switch(t){case"error":return Gs(Nt.LexingError);case"warning":return Gs(Nt.LexingWarning);case"info":return Gs(Nt.LexingInfo);case"hint":return Gs(Nt.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Nt;(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"})(Nt||(Nt={}));class SM{constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(e,n,r){const i=r??yn(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=Io(this.nameProvider.getNameNode(e)??e.$cstNode));return{node:e,name:n,get nameSegment(){return o()},selectionSegment:Io(e.$cstNode),type:e.$type,documentUri:i.uri,path:s}}}class bM{constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,n=Ae.CancellationToken.None){const r=[],i=e.parseResult.value;for(const s of Tn(i))await et(n),No(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=[];Pt(n)&&n.$nodeDescription?r=[n.$nodeDescription]:Un(n)&&(r=n.items.map(c=>c.$nodeDescription).filter(c=>c!==void 0));const i=yn(e.container).uri,s=this.nodeLocator.getAstNodePath(e.container),a=[],o=Io(n.$refNode);for(const c of r)a.push({sourceUri:i,sourcePath:s,targetUri:c.documentUri,targetPath:c.path,segment:o,local:pt.equals(c.documentUri,i)});return a}}class wM{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)),u=i[o];return u==null?void 0:u[c]}return i[s]},e)}}var CM=Yi();class NM{constructor(e){this._ready=new bd,this.onConfigurationSectionUpdateEmitter=new CM.Emitter,this.settings={},this.workspaceConfig=!1,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){var n;this.workspaceConfig=((n=e.capabilities.workspace)==null?void 0:n.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 cr={},ur={},so={},Tu={},G={},Hp;function FT(){if(Hp)return G;Hp=1,Object.defineProperty(G,"__esModule",{value:!0}),G.Message=G.NotificationType9=G.NotificationType8=G.NotificationType7=G.NotificationType6=G.NotificationType5=G.NotificationType4=G.NotificationType3=G.NotificationType2=G.NotificationType1=G.NotificationType0=G.NotificationType=G.RequestType9=G.RequestType8=G.RequestType7=G.RequestType6=G.RequestType5=G.RequestType4=G.RequestType3=G.RequestType2=G.RequestType1=G.RequestType=G.RequestType0=G.AbstractMessageSignature=G.ParameterStructures=G.ResponseError=G.ErrorCodes=void 0;const t=Ca();var e;(function($){$.ParseError=-32700,$.InvalidRequest=-32600,$.MethodNotFound=-32601,$.InvalidParams=-32602,$.InternalError=-32603,$.jsonrpcReservedErrorRangeStart=-32099,$.serverErrorStart=-32099,$.MessageWriteError=-32099,$.MessageReadError=-32098,$.PendingResponseRejected=-32097,$.ConnectionInactive=-32096,$.ServerNotInitialized=-32002,$.UnknownErrorCode=-32001,$.jsonrpcReservedErrorRangeEnd=-32e3,$.serverErrorEnd=-32e3})(e||(G.ErrorCodes=e={}));class n extends Error{constructor(g,w,T){super(w),this.code=t.number(g)?g:e.UnknownErrorCode,this.data=T,Object.setPrototypeOf(this,n.prototype)}toJson(){const g={code:this.code,message:this.message};return this.data!==void 0&&(g.data=this.data),g}}G.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}}G.ParameterStructures=r,r.auto=new r("auto"),r.byPosition=new r("byPosition"),r.byName=new r("byName");class i{constructor(g,w){this.method=g,this.numberOfParams=w}get parameterStructures(){return r.auto}}G.AbstractMessageSignature=i;class s extends i{constructor(g){super(g,0)}}G.RequestType0=s;class a extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.RequestType=a;class o extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.RequestType1=o;class c extends i{constructor(g){super(g,2)}}G.RequestType2=c;class u extends i{constructor(g){super(g,3)}}G.RequestType3=u;class l extends i{constructor(g){super(g,4)}}G.RequestType4=l;class f extends i{constructor(g){super(g,5)}}G.RequestType5=f;class d extends i{constructor(g){super(g,6)}}G.RequestType6=d;class p extends i{constructor(g){super(g,7)}}G.RequestType7=p;class y extends i{constructor(g){super(g,8)}}G.RequestType8=y;class E extends i{constructor(g){super(g,9)}}G.RequestType9=E;class C extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.NotificationType=C;class A extends i{constructor(g){super(g,0)}}G.NotificationType0=A;class _ extends i{constructor(g,w=r.auto){super(g,1),this._parameterStructures=w}get parameterStructures(){return this._parameterStructures}}G.NotificationType1=_;class b extends i{constructor(g){super(g,2)}}G.NotificationType2=b;class I extends i{constructor(g){super(g,3)}}G.NotificationType3=I;class U extends i{constructor(g){super(g,4)}}G.NotificationType4=U;class H extends i{constructor(g){super(g,5)}}G.NotificationType5=H;class J extends i{constructor(g){super(g,6)}}G.NotificationType6=J;class oe extends i{constructor(g){super(g,7)}}G.NotificationType7=oe;class ge extends i{constructor(g){super(g,8)}}G.NotificationType8=ge;class ye extends i{constructor(g){super(g,9)}}G.NotificationType9=ye;var P;return function($){function g(v){const S=v;return S&&t.string(S.method)&&(t.string(S.id)||t.number(S.id))}$.isRequest=g;function w(v){const S=v;return S&&t.string(S.method)&&v.id===void 0}$.isNotification=w;function T(v){const S=v;return S&&(S.result!==void 0||!!S.error)&&(t.string(S.id)||t.number(S.id)||S.id===null)}$.isResponse=T}(P||(G.Message=P={})),G}var en={},Yp;function GT(){if(Yp)return en;Yp=1;var t;Object.defineProperty(en,"__esModule",{value:!0}),en.LRUCache=en.LinkedMap=en.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||(en.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(){var s;return(s=this._head)==null?void 0:s.value}get last(){var s;return(s=this._tail)==null?void 0:s.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)}}en.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 en.LRUCache=r,en}var Ts={},Xp;function PM(){if(Xp)return Ts;Xp=1,Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.Disposable=void 0;var t;return function(e){function n(r){return{dispose:r}}e.create=n}(t||(Ts.Disposable=t={})),Ts}var lr={},Jp;function IM(){if(Jp)return lr;Jp=1,Object.defineProperty(lr,"__esModule",{value:!0}),lr.SharedArrayReceiverStrategy=lr.SharedArraySenderStrategy=void 0;const t=Kc();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),u=new Int32Array(c,0,1);u[0]=e.Continue,this.buffers.set(o.id,c),o.$cancellationData=c}async sendCancellation(o,c){const u=this.buffers.get(c);if(u===void 0)return;const l=new Int32Array(u,0,1);Atomics.store(l,0,e.Cancelled)}cleanup(o){this.buffers.delete(o)}dispose(){this.buffers.clear()}}lr.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 lr.SharedArrayReceiverStrategy=s,lr}var tn={},vs={},Zp;function jT(){if(Zp)return vs;Zp=1,Object.defineProperty(vs,"__esModule",{value:!0}),vs.Semaphore=void 0;const t=qr();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 vs.Semaphore=e,vs}var Qp;function kM(){if(Qp)return tn;Qp=1,Object.defineProperty(tn,"__esModule",{value:!0}),tn.ReadableStreamMessageReader=tn.AbstractMessageReader=tn.MessageReader=void 0;const t=qr(),e=Ca(),n=Yi(),r=jT();var i;(function(c){function u(l){let f=l;return f&&e.func(f.listen)&&e.func(f.dispose)&&e.func(f.onError)&&e.func(f.onClose)&&e.func(f.onPartialMessage)}c.is=u})(i||(tn.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(u){this.errorEmitter.fire(this.asError(u))}get onClose(){return this.closeEmitter.event}fireClose(){this.closeEmitter.fire(void 0)}get onPartialMessage(){return this.partialMessageEmitter.event}firePartialMessage(u){this.partialMessageEmitter.fire(u)}asError(u){return u instanceof Error?u:new Error(`Reader received error. Reason: ${e.string(u.message)?u.message:"unknown"}`)}}tn.AbstractMessageReader=s;var a;(function(c){function u(l){let f,d;const p=new Map;let y;const E=new Map;if(l===void 0||typeof l=="string")f=l??"utf-8";else{if(f=l.charset??"utf-8",l.contentDecoder!==void 0&&(d=l.contentDecoder,p.set(d.name,d)),l.contentDecoders!==void 0)for(const C of l.contentDecoders)p.set(C.name,C);if(l.contentTypeDecoder!==void 0&&(y=l.contentTypeDecoder,E.set(y.name,y)),l.contentTypeDecoders!==void 0)for(const C of l.contentTypeDecoders)E.set(C.name,C)}return y===void 0&&(y=(0,t.default)().applicationJson.decoder,E.set(y.name,y)),{charset:f,contentDecoder:d,contentDecoders:p,contentTypeDecoder:y,contentTypeDecoders:E}}c.fromOptions=u})(a||(a={}));class o extends s{constructor(u,l){super(),this.readable=u,this.options=a.fromOptions(l),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(u){this._partialMessageTimeout=u}get partialMessageTimeout(){return this._partialMessageTimeout}listen(u){this.nextMessageLength=-1,this.messageToken=0,this.partialMessageTimer=void 0,this.callback=u;const l=this.readable.onData(f=>{this.onData(f)});return this.readable.onError(f=>this.fireError(f)),this.readable.onClose(()=>this.fireClose()),l}onData(u){try{for(this.buffer.append(u);;){if(this.nextMessageLength===-1){const f=this.buffer.tryReadHeaders(!0);if(!f)return;const d=f.get("content-length");if(!d){this.fireError(new Error(`Header must provide a Content-Length property.
122
122
  ${JSON.stringify(Object.fromEntries(f))}`));return}const p=parseInt(d);if(isNaN(p)){this.fireError(new Error(`Content-Length value must be a number. Got ${d}`));return}this.nextMessageLength=p}const l=this.buffer.tryReadBody(this.nextMessageLength);if(l===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(l):l,d=await this.options.contentTypeDecoder.decode(f,this.options);this.callback(d)}).catch(f=>{this.fireError(f)})}}catch(l){this.fireError(l)}}clearPartialMessageTimer(){this.partialMessageTimer&&(this.partialMessageTimer.dispose(),this.partialMessageTimer=void 0)}setPartialMessageTimer(){this.clearPartialMessageTimer(),!(this._partialMessageTimeout<=0)&&(this.partialMessageTimer=(0,t.default)().timer.setTimeout((u,l)=>{this.partialMessageTimer=void 0,u===this.messageToken&&(this.firePartialMessage({messageToken:u,waitingTime:l}),this.setPartialMessageTimer())},this._partialMessageTimeout,this.messageToken,this._partialMessageTimeout))}}return tn.ReadableStreamMessageReader=o,tn}var nn={},em;function OM(){if(em)return nn;em=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.WriteableStreamMessageWriter=nn.AbstractMessageWriter=nn.MessageWriter=void 0;const t=qr(),e=Ca(),n=jT(),r=Yi(),i="Content-Length: ",s=`\r
123
123
  `;var a;(function(l){function f(d){let p=d;return p&&e.func(p.dispose)&&e.func(p.onClose)&&e.func(p.onError)&&e.func(p.write)}l.is=f})(a||(nn.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,d,p){this.errorEmitter.fire([this.asError(f),d,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"}`)}}nn.AbstractMessageWriter=o;var c;(function(l){function f(d){return d===void 0||typeof d=="string"?{charset:d??"utf-8",contentTypeEncoder:(0,t.default)().applicationJson.encoder}:{charset:d.charset??"utf-8",contentEncoder:d.contentEncoder,contentTypeEncoder:d.contentTypeEncoder??(0,t.default)().applicationJson.encoder}}l.fromOptions=f})(c||(c={}));class u extends o{constructor(f,d){super(),this.writable=f,this.options=c.fromOptions(d),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 y=[];return y.push(i,p.byteLength.toString(),s),y.push(s),this.doWrite(f,y,p)},p=>{throw this.fireError(p),p}))}async doWrite(f,d,p){try{return await this.writable.write(d.join(""),"ascii"),this.writable.write(p)}catch(y){return this.handleError(y,f),Promise.reject(y)}}handleError(f,d){this.errorCount++,this.fireError(f,d,this.errorCount)}end(){this.writable.end()}}return nn.WriteableStreamMessageWriter=u,nn}var $s={},tm;function LM(){if(tm)return $s;tm=1,Object.defineProperty($s,"__esModule",{value:!0}),$s.AbstractMessageBuffer=void 0;const t=13,e=10,n=`\r
124
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,u=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++}u+=p.byteLength,o++}if(a!==4)return;const l=this._read(u+c),f=new Map,d=this.toString(l,"ascii").split(n);if(d.length<2)return f;for(let p=0;p<d.length-2;p++){const y=d[p],E=y.indexOf(":");if(E===-1)throw new Error(`Message header must separate key and value using ':'
125
- ${y}`);const C=y.substr(0,E),A=y.substr(E+1).trim();f.set(s?C.toLowerCase():C,A)}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 u=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(u)}if(this._chunks[0].byteLength>s){const u=this._chunks[0],l=this.asNative(u,s);return this._chunks[0]=u.slice(s),this._totalLength-=s,l}const a=this.allocNative(s);let o=0,c=0;for(;s>0;){const u=this._chunks[c];if(u.byteLength>s){const l=u.slice(0,s);a.set(l,o),o+=s,this._chunks[c]=u.slice(s),this._totalLength-=s,s-=s}else a.set(u,o),o+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,s-=u.byteLength}return a}}return $s.AbstractMessageBuffer=r,$s}var vu={},nm;function xM(){return nm||(nm=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=qr(),n=Ca(),r=FT(),i=GT(),s=Yi(),a=Kc();var o;(function(g){g.type=new r.NotificationType("$/cancelRequest")})(o||(o={}));var c;(function(g){function w(T){return typeof T=="string"||typeof T=="number"}g.is=w})(c||(t.ProgressToken=c={}));var u;(function(g){g.type=new r.NotificationType("$/progress")})(u||(u={}));class l{constructor(){}}t.ProgressType=l;var f;(function(g){function w(T){return n.func(T)}g.is=w})(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(g){g[g.Off=0]="Off",g[g.Messages=1]="Messages",g[g.Compact=2]="Compact",g[g.Verbose=3]="Verbose"})(d||(t.Trace=d={}));var p;(function(g){g.Off="off",g.Messages="messages",g.Compact="compact",g.Verbose="verbose"})(p||(t.TraceValues=p={})),function(g){function w(v){if(!n.string(v))return g.Off;switch(v=v.toLowerCase(),v){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=w;function T(v){switch(v){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=T}(d||(t.Trace=d={}));var y;(function(g){g.Text="text",g.JSON="json"})(y||(t.TraceFormat=y={})),function(g){function w(T){return n.string(T)?(T=T.toLowerCase(),T==="json"?g.JSON:g.Text):g.Text}g.fromString=w}(y||(t.TraceFormat=y={}));var E;(function(g){g.type=new r.NotificationType("$/setTrace")})(E||(t.SetTraceNotification=E={}));var C;(function(g){g.type=new r.NotificationType("$/logTrace")})(C||(t.LogTraceNotification=C={}));var A;(function(g){g[g.Closed=1]="Closed",g[g.Disposed=2]="Disposed",g[g.AlreadyListening=3]="AlreadyListening"})(A||(t.ConnectionErrors=A={}));class _ extends Error{constructor(w,T){super(T),this.code=w,Object.setPrototypeOf(this,_.prototype)}}t.ConnectionError=_;var b;(function(g){function w(T){const v=T;return v&&n.func(v.cancelUndispatched)}g.is=w})(b||(t.ConnectionStrategy=b={}));var I;(function(g){function w(T){const v=T;return v&&(v.kind===void 0||v.kind==="id")&&n.func(v.createCancellationTokenSource)&&(v.dispose===void 0||n.func(v.dispose))}g.is=w})(I||(t.IdCancellationReceiverStrategy=I={}));var U;(function(g){function w(T){const v=T;return v&&v.kind==="request"&&n.func(v.createCancellationTokenSource)&&(v.dispose===void 0||n.func(v.dispose))}g.is=w})(U||(t.RequestCancellationReceiverStrategy=U={}));var V;(function(g){g.Message=Object.freeze({createCancellationTokenSource(T){return new a.CancellationTokenSource}});function w(T){return I.is(T)||U.is(T)}g.is=w})(V||(t.CancellationReceiverStrategy=V={}));var J;(function(g){g.Message=Object.freeze({sendCancellation(T,v){return T.sendNotification(o.type,{id:v})},cleanup(T){}});function w(T){const v=T;return v&&n.func(v.sendCancellation)&&n.func(v.cleanup)}g.is=w})(J||(t.CancellationSenderStrategy=J={}));var oe;(function(g){g.Message=Object.freeze({receiver:V.Message,sender:J.Message});function w(T){const v=T;return v&&V.is(v.receiver)&&J.is(v.sender)}g.is=w})(oe||(t.CancellationStrategy=oe={}));var ge;(function(g){function w(T){const v=T;return v&&n.func(v.handleMessage)}g.is=w})(ge||(t.MessageStrategy=ge={}));var ye;(function(g){function w(T){const v=T;return v&&(oe.is(v.cancellationStrategy)||b.is(v.connectionStrategy)||ge.is(v.messageStrategy))}g.is=w})(ye||(t.ConnectionOptions=ye={}));var P;(function(g){g[g.New=1]="New",g[g.Listening=2]="Listening",g[g.Closed=3]="Closed",g[g.Disposed=4]="Disposed"})(P||(P={}));function $(g,w,T,v){const S=T!==void 0?T:t.NullLogger;let L=0,M=0,x=0;const z="2.0";let F;const se=new Map;let B;const re=new Map,je=new Map;let Se,Te=new i.LinkedMap,xe=new Map,Ue=new Set,Oe=new Map,ee=d.Off,lt=y.Text,be,St=P.New;const Kr=new s.Emitter,Ji=new s.Emitter,Zi=new s.Emitter,Qi=new s.Emitter,es=new s.Emitter,bt=v&&v.cancellationStrategy?v.cancellationStrategy:oe.Message;function ts(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function Na(m){return m===null?"res-unknown-"+(++x).toString():"res-"+m.toString()}function Pa(){return"not-"+(++M).toString()}function Ia(m,N){r.Message.isRequest(N)?m.set(ts(N.id),N):r.Message.isResponse(N)?m.set(Na(N.id),N):m.set(Pa(),N)}function ka(m){}function ns(){return St===P.Listening}function rs(){return St===P.Closed}function Zt(){return St===P.Disposed}function is(){(St===P.New||St===P.Listening)&&(St=P.Closed,Ji.fire(void 0))}function Oa(m){Kr.fire([m,void 0,void 0])}function La(m){Kr.fire(m)}g.onClose(is),g.onError(Oa),w.onClose(is),w.onError(La);function ss(){Se||Te.size===0||(Se=(0,e.default)().timer.setImmediate(()=>{Se=void 0,xa()}))}function as(m){r.Message.isRequest(m)?Da(m):r.Message.isNotification(m)?Ga(m):r.Message.isResponse(m)?Fa(m):ja(m)}function xa(){if(Te.size===0)return;const m=Te.shift();try{const N=v==null?void 0:v.messageStrategy;ge.is(N)?N.handleMessage(m,as):as(m)}finally{ss()}}const Ma=m=>{try{if(r.Message.isNotification(m)&&m.method===o.type.method){const N=m.params.id,O=ts(N),D=Te.get(O);if(r.Message.isRequest(D)){const ae=v==null?void 0:v.connectionStrategy,ce=ae&&ae.cancelUndispatched?ae.cancelUndispatched(D,ka):void 0;if(ce&&(ce.error!==void 0||ce.result!==void 0)){Te.delete(O),Oe.delete(N),ce.id=D.id,rr(ce,m.method,Date.now()),w.write(ce).catch(()=>S.error("Sending response for canceled message failed."));return}}const fe=Oe.get(N);if(fe!==void 0){fe.cancel(),Hr(m);return}else Ue.add(N)}Ia(Te,m)}finally{ss()}};function Da(m){if(Zt())return;function N(Z,ve,ie){const Me={jsonrpc:z,id:m.id};Z instanceof r.ResponseError?Me.error=Z.toJson():Me.result=Z===void 0?null:Z,rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}function O(Z,ve,ie){const Me={jsonrpc:z,id:m.id,error:Z.toJson()};rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}function D(Z,ve,ie){Z===void 0&&(Z=null);const Me={jsonrpc:z,id:m.id,result:Z};rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}qa(m);const fe=se.get(m.method);let ae,ce;fe&&(ae=fe.type,ce=fe.handler);const Ie=Date.now();if(ce||F){const Z=m.id??String(Date.now()),ve=I.is(bt.receiver)?bt.receiver.createCancellationTokenSource(Z):bt.receiver.createCancellationTokenSource(m);m.id!==null&&Ue.has(m.id)&&ve.cancel(),m.id!==null&&Oe.set(Z,ve);try{let ie;if(ce)if(m.params===void 0){if(ae!==void 0&&ae.numberOfParams!==0){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ae.numberOfParams} params but received none.`),m.method,Ie);return}ie=ce(ve.token)}else if(Array.isArray(m.params)){if(ae!==void 0&&ae.parameterStructures===r.ParameterStructures.byName){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,Ie);return}ie=ce(...m.params,ve.token)}else{if(ae!==void 0&&ae.parameterStructures===r.ParameterStructures.byPosition){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,Ie);return}ie=ce(m.params,ve.token)}else F&&(ie=F(m.method,m.params,ve.token));const Me=ie;ie?Me.then?Me.then(Je=>{Oe.delete(Z),N(Je,m.method,Ie)},Je=>{Oe.delete(Z),Je instanceof r.ResponseError?O(Je,m.method,Ie):Je&&n.string(Je.message)?O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${Je.message}`),m.method,Ie):O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Ie)}):(Oe.delete(Z),N(ie,m.method,Ie)):(Oe.delete(Z),D(ie,m.method,Ie))}catch(ie){Oe.delete(Z),ie instanceof r.ResponseError?N(ie,m.method,Ie):ie&&n.string(ie.message)?O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${ie.message}`),m.method,Ie):O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Ie)}}else O(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,Ie)}function Fa(m){if(!Zt())if(m.id===null)m.error?S.error(`Received response message without id: Error is:
126
- ${JSON.stringify(m.error,void 0,4)}`):S.error("Received response message without id. No further error information provided.");else{const N=m.id,O=xe.get(N);if(Ba(m,O),O!==void 0){xe.delete(N);try{if(m.error){const D=m.error;O.reject(new r.ResponseError(D.code,D.message,D.data))}else if(m.result!==void 0)O.resolve(m.result);else throw new Error("Should never happen.")}catch(D){D.message?S.error(`Response handler '${O.method}' failed with message: ${D.message}`):S.error(`Response handler '${O.method}' failed unexpectedly.`)}}}}function Ga(m){if(Zt())return;let N,O;if(m.method===o.type.method){const D=m.params.id;Ue.delete(D),Hr(m);return}else{const D=re.get(m.method);D&&(O=D.handler,N=D.type)}if(O||B)try{if(Hr(m),O)if(m.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received none.`),O();else if(Array.isArray(m.params)){const D=m.params;m.method===u.type.method&&D.length===2&&c.is(D[0])?O({token:D[0],value:D[1]}):(N!==void 0&&(N.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${m.method} defines parameters by name but received parameters by position`),N.numberOfParams!==m.params.length&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received ${D.length} arguments`)),O(...D))}else N!==void 0&&N.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${m.method} defines parameters by position but received parameters by name`),O(m.params);else B&&B(m.method,m.params)}catch(D){D.message?S.error(`Notification handler '${m.method}' failed with message: ${D.message}`):S.error(`Notification handler '${m.method}' failed unexpectedly.`)}else Zi.fire(m)}function ja(m){if(!m){S.error("Received empty message.");return}S.error(`Received message which is neither a response nor a notification message:
125
+ ${y}`);const C=y.substr(0,E),A=y.substr(E+1).trim();f.set(s?C.toLowerCase():C,A)}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 u=this._chunks[0];return this._chunks.shift(),this._totalLength-=s,this.asNative(u)}if(this._chunks[0].byteLength>s){const u=this._chunks[0],l=this.asNative(u,s);return this._chunks[0]=u.slice(s),this._totalLength-=s,l}const a=this.allocNative(s);let o=0,c=0;for(;s>0;){const u=this._chunks[c];if(u.byteLength>s){const l=u.slice(0,s);a.set(l,o),o+=s,this._chunks[c]=u.slice(s),this._totalLength-=s,s-=s}else a.set(u,o),o+=u.byteLength,this._chunks.shift(),this._totalLength-=u.byteLength,s-=u.byteLength}return a}}return $s.AbstractMessageBuffer=r,$s}var vu={},nm;function xM(){return nm||(nm=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=qr(),n=Ca(),r=FT(),i=GT(),s=Yi(),a=Kc();var o;(function(g){g.type=new r.NotificationType("$/cancelRequest")})(o||(o={}));var c;(function(g){function w(T){return typeof T=="string"||typeof T=="number"}g.is=w})(c||(t.ProgressToken=c={}));var u;(function(g){g.type=new r.NotificationType("$/progress")})(u||(u={}));class l{constructor(){}}t.ProgressType=l;var f;(function(g){function w(T){return n.func(T)}g.is=w})(f||(f={})),t.NullLogger=Object.freeze({error:()=>{},warn:()=>{},info:()=>{},log:()=>{}});var d;(function(g){g[g.Off=0]="Off",g[g.Messages=1]="Messages",g[g.Compact=2]="Compact",g[g.Verbose=3]="Verbose"})(d||(t.Trace=d={}));var p;(function(g){g.Off="off",g.Messages="messages",g.Compact="compact",g.Verbose="verbose"})(p||(t.TraceValues=p={})),function(g){function w(v){if(!n.string(v))return g.Off;switch(v=v.toLowerCase(),v){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=w;function T(v){switch(v){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=T}(d||(t.Trace=d={}));var y;(function(g){g.Text="text",g.JSON="json"})(y||(t.TraceFormat=y={})),function(g){function w(T){return n.string(T)?(T=T.toLowerCase(),T==="json"?g.JSON:g.Text):g.Text}g.fromString=w}(y||(t.TraceFormat=y={}));var E;(function(g){g.type=new r.NotificationType("$/setTrace")})(E||(t.SetTraceNotification=E={}));var C;(function(g){g.type=new r.NotificationType("$/logTrace")})(C||(t.LogTraceNotification=C={}));var A;(function(g){g[g.Closed=1]="Closed",g[g.Disposed=2]="Disposed",g[g.AlreadyListening=3]="AlreadyListening"})(A||(t.ConnectionErrors=A={}));class _ extends Error{constructor(w,T){super(T),this.code=w,Object.setPrototypeOf(this,_.prototype)}}t.ConnectionError=_;var b;(function(g){function w(T){const v=T;return v&&n.func(v.cancelUndispatched)}g.is=w})(b||(t.ConnectionStrategy=b={}));var I;(function(g){function w(T){const v=T;return v&&(v.kind===void 0||v.kind==="id")&&n.func(v.createCancellationTokenSource)&&(v.dispose===void 0||n.func(v.dispose))}g.is=w})(I||(t.IdCancellationReceiverStrategy=I={}));var U;(function(g){function w(T){const v=T;return v&&v.kind==="request"&&n.func(v.createCancellationTokenSource)&&(v.dispose===void 0||n.func(v.dispose))}g.is=w})(U||(t.RequestCancellationReceiverStrategy=U={}));var H;(function(g){g.Message=Object.freeze({createCancellationTokenSource(T){return new a.CancellationTokenSource}});function w(T){return I.is(T)||U.is(T)}g.is=w})(H||(t.CancellationReceiverStrategy=H={}));var J;(function(g){g.Message=Object.freeze({sendCancellation(T,v){return T.sendNotification(o.type,{id:v})},cleanup(T){}});function w(T){const v=T;return v&&n.func(v.sendCancellation)&&n.func(v.cleanup)}g.is=w})(J||(t.CancellationSenderStrategy=J={}));var oe;(function(g){g.Message=Object.freeze({receiver:H.Message,sender:J.Message});function w(T){const v=T;return v&&H.is(v.receiver)&&J.is(v.sender)}g.is=w})(oe||(t.CancellationStrategy=oe={}));var ge;(function(g){function w(T){const v=T;return v&&n.func(v.handleMessage)}g.is=w})(ge||(t.MessageStrategy=ge={}));var ye;(function(g){function w(T){const v=T;return v&&(oe.is(v.cancellationStrategy)||b.is(v.connectionStrategy)||ge.is(v.messageStrategy))}g.is=w})(ye||(t.ConnectionOptions=ye={}));var P;(function(g){g[g.New=1]="New",g[g.Listening=2]="Listening",g[g.Closed=3]="Closed",g[g.Disposed=4]="Disposed"})(P||(P={}));function $(g,w,T,v){const S=T!==void 0?T:t.NullLogger;let L=0,M=0,x=0;const z="2.0";let F;const se=new Map;let B;const re=new Map,je=new Map;let Se,Te=new i.LinkedMap,xe=new Map,Ue=new Set,Oe=new Map,ee=d.Off,lt=y.Text,be,St=P.New;const Kr=new s.Emitter,Ji=new s.Emitter,Zi=new s.Emitter,Qi=new s.Emitter,es=new s.Emitter,bt=v&&v.cancellationStrategy?v.cancellationStrategy:oe.Message;function ts(m){if(m===null)throw new Error("Can't send requests with id null since the response can't be correlated.");return"req-"+m.toString()}function Na(m){return m===null?"res-unknown-"+(++x).toString():"res-"+m.toString()}function Pa(){return"not-"+(++M).toString()}function Ia(m,N){r.Message.isRequest(N)?m.set(ts(N.id),N):r.Message.isResponse(N)?m.set(Na(N.id),N):m.set(Pa(),N)}function ka(m){}function ns(){return St===P.Listening}function rs(){return St===P.Closed}function Zt(){return St===P.Disposed}function is(){(St===P.New||St===P.Listening)&&(St=P.Closed,Ji.fire(void 0))}function Oa(m){Kr.fire([m,void 0,void 0])}function La(m){Kr.fire(m)}g.onClose(is),g.onError(Oa),w.onClose(is),w.onError(La);function ss(){Se||Te.size===0||(Se=(0,e.default)().timer.setImmediate(()=>{Se=void 0,xa()}))}function as(m){r.Message.isRequest(m)?Da(m):r.Message.isNotification(m)?Ga(m):r.Message.isResponse(m)?Fa(m):ja(m)}function xa(){if(Te.size===0)return;const m=Te.shift();try{const N=v==null?void 0:v.messageStrategy;ge.is(N)?N.handleMessage(m,as):as(m)}finally{ss()}}const Ma=m=>{try{if(r.Message.isNotification(m)&&m.method===o.type.method){const N=m.params.id,O=ts(N),D=Te.get(O);if(r.Message.isRequest(D)){const ae=v==null?void 0:v.connectionStrategy,ce=ae&&ae.cancelUndispatched?ae.cancelUndispatched(D,ka):void 0;if(ce&&(ce.error!==void 0||ce.result!==void 0)){Te.delete(O),Oe.delete(N),ce.id=D.id,rr(ce,m.method,Date.now()),w.write(ce).catch(()=>S.error("Sending response for canceled message failed."));return}}const fe=Oe.get(N);if(fe!==void 0){fe.cancel(),Vr(m);return}else Ue.add(N)}Ia(Te,m)}finally{ss()}};function Da(m){if(Zt())return;function N(Z,ve,ie){const Me={jsonrpc:z,id:m.id};Z instanceof r.ResponseError?Me.error=Z.toJson():Me.result=Z===void 0?null:Z,rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}function O(Z,ve,ie){const Me={jsonrpc:z,id:m.id,error:Z.toJson()};rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}function D(Z,ve,ie){Z===void 0&&(Z=null);const Me={jsonrpc:z,id:m.id,result:Z};rr(Me,ve,ie),w.write(Me).catch(()=>S.error("Sending response failed."))}qa(m);const fe=se.get(m.method);let ae,ce;fe&&(ae=fe.type,ce=fe.handler);const Ie=Date.now();if(ce||F){const Z=m.id??String(Date.now()),ve=I.is(bt.receiver)?bt.receiver.createCancellationTokenSource(Z):bt.receiver.createCancellationTokenSource(m);m.id!==null&&Ue.has(m.id)&&ve.cancel(),m.id!==null&&Oe.set(Z,ve);try{let ie;if(ce)if(m.params===void 0){if(ae!==void 0&&ae.numberOfParams!==0){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines ${ae.numberOfParams} params but received none.`),m.method,Ie);return}ie=ce(ve.token)}else if(Array.isArray(m.params)){if(ae!==void 0&&ae.parameterStructures===r.ParameterStructures.byName){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by name but received parameters by position`),m.method,Ie);return}ie=ce(...m.params,ve.token)}else{if(ae!==void 0&&ae.parameterStructures===r.ParameterStructures.byPosition){O(new r.ResponseError(r.ErrorCodes.InvalidParams,`Request ${m.method} defines parameters by position but received parameters by name`),m.method,Ie);return}ie=ce(m.params,ve.token)}else F&&(ie=F(m.method,m.params,ve.token));const Me=ie;ie?Me.then?Me.then(Je=>{Oe.delete(Z),N(Je,m.method,Ie)},Je=>{Oe.delete(Z),Je instanceof r.ResponseError?O(Je,m.method,Ie):Je&&n.string(Je.message)?O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${Je.message}`),m.method,Ie):O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Ie)}):(Oe.delete(Z),N(ie,m.method,Ie)):(Oe.delete(Z),D(ie,m.method,Ie))}catch(ie){Oe.delete(Z),ie instanceof r.ResponseError?N(ie,m.method,Ie):ie&&n.string(ie.message)?O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed with message: ${ie.message}`),m.method,Ie):O(new r.ResponseError(r.ErrorCodes.InternalError,`Request ${m.method} failed unexpectedly without providing any details.`),m.method,Ie)}}else O(new r.ResponseError(r.ErrorCodes.MethodNotFound,`Unhandled method ${m.method}`),m.method,Ie)}function Fa(m){if(!Zt())if(m.id===null)m.error?S.error(`Received response message without id: Error is:
126
+ ${JSON.stringify(m.error,void 0,4)}`):S.error("Received response message without id. No further error information provided.");else{const N=m.id,O=xe.get(N);if(Ba(m,O),O!==void 0){xe.delete(N);try{if(m.error){const D=m.error;O.reject(new r.ResponseError(D.code,D.message,D.data))}else if(m.result!==void 0)O.resolve(m.result);else throw new Error("Should never happen.")}catch(D){D.message?S.error(`Response handler '${O.method}' failed with message: ${D.message}`):S.error(`Response handler '${O.method}' failed unexpectedly.`)}}}}function Ga(m){if(Zt())return;let N,O;if(m.method===o.type.method){const D=m.params.id;Ue.delete(D),Vr(m);return}else{const D=re.get(m.method);D&&(O=D.handler,N=D.type)}if(O||B)try{if(Vr(m),O)if(m.params===void 0)N!==void 0&&N.numberOfParams!==0&&N.parameterStructures!==r.ParameterStructures.byName&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received none.`),O();else if(Array.isArray(m.params)){const D=m.params;m.method===u.type.method&&D.length===2&&c.is(D[0])?O({token:D[0],value:D[1]}):(N!==void 0&&(N.parameterStructures===r.ParameterStructures.byName&&S.error(`Notification ${m.method} defines parameters by name but received parameters by position`),N.numberOfParams!==m.params.length&&S.error(`Notification ${m.method} defines ${N.numberOfParams} params but received ${D.length} arguments`)),O(...D))}else N!==void 0&&N.parameterStructures===r.ParameterStructures.byPosition&&S.error(`Notification ${m.method} defines parameters by position but received parameters by name`),O(m.params);else B&&B(m.method,m.params)}catch(D){D.message?S.error(`Notification handler '${m.method}' failed with message: ${D.message}`):S.error(`Notification handler '${m.method}' failed unexpectedly.`)}else Zi.fire(m)}function ja(m){if(!m){S.error("Received empty message.");return}S.error(`Received message which is neither a response nor a notification message:
127
127
  ${JSON.stringify(m,null,4)}`);const N=m;if(n.string(N.id)||n.number(N.id)){const O=N.id,D=xe.get(O);D&&D.reject(new Error("The received response has neither a result nor an error property."))}}function wt(m){if(m!=null)switch(ee){case d.Verbose:return JSON.stringify(m,null,4);case d.Compact:return JSON.stringify(m);default:return}}function Ua(m){if(!(ee===d.Off||!be))if(lt===y.Text){let N;(ee===d.Verbose||ee===d.Compact)&&m.params&&(N=`Params: ${wt(m.params)}
128
128
 
129
129
  `),be.log(`Sending request '${m.method} - (${m.id})'.`,N)}else Qt("send-request",m)}function za(m){if(!(ee===d.Off||!be))if(lt===y.Text){let N;(ee===d.Verbose||ee===d.Compact)&&(m.params?N=`Params: ${wt(m.params)}
@@ -138,7 +138,7 @@ ${JSON.stringify(m,null,4)}`);const N=m;if(n.string(N.id)||n.number(N.id)){const
138
138
 
139
139
  `)),be.log(`Sending response '${N} - (${m.id})'. Processing request took ${Date.now()-O}ms`,D)}else Qt("send-response",m)}function qa(m){if(!(ee===d.Off||!be))if(lt===y.Text){let N;(ee===d.Verbose||ee===d.Compact)&&m.params&&(N=`Params: ${wt(m.params)}
140
140
 
141
- `),be.log(`Received request '${m.method} - (${m.id})'.`,N)}else Qt("receive-request",m)}function Hr(m){if(!(ee===d.Off||!be||m.method===C.type.method))if(lt===y.Text){let N;(ee===d.Verbose||ee===d.Compact)&&(m.params?N=`Params: ${wt(m.params)}
141
+ `),be.log(`Received request '${m.method} - (${m.id})'.`,N)}else Qt("receive-request",m)}function Vr(m){if(!(ee===d.Off||!be||m.method===C.type.method))if(lt===y.Text){let N;(ee===d.Verbose||ee===d.Compact)&&(m.params?N=`Params: ${wt(m.params)}
142
142
 
143
143
  `:N=`No parameters provided.
144
144
 
@@ -148,7 +148,7 @@ ${JSON.stringify(m,null,4)}`);const N=m;if(n.string(N.id)||n.number(N.id)){const
148
148
 
149
149
  `:m.error===void 0&&(O=`No result returned.
150
150
 
151
- `)),N){const D=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";be.log(`Received response '${N.method} - (${m.id})' in ${Date.now()-N.timerStart}ms.${D}`,O)}else be.log(`Received response ${m.id} without active response promise.`,O)}else Qt("receive-response",m)}function Qt(m,N){if(!be||ee===d.Off)return;const O={isLSPMessage:!0,type:m,message:N,timestamp:Date.now()};be.log(O)}function Mn(){if(rs())throw new _(A.Closed,"Connection is closed.");if(Zt())throw new _(A.Disposed,"Connection is disposed.")}function Wa(){if(ns())throw new _(A.AlreadyListening,"Connection is already listening")}function Ka(){if(!ns())throw new Error("Call listen() first.")}function Dn(m){return m===void 0?null:m}function os(m){if(m!==null)return m}function h(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function Ne(m,N){switch(m){case r.ParameterStructures.auto:return h(N)?os(N):[Dn(N)];case r.ParameterStructures.byName:if(!h(N))throw new Error("Received parameters by name but param is not an object literal.");return os(N);case r.ParameterStructures.byPosition:return[Dn(N)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function Pe(m,N){let O;const D=m.numberOfParams;switch(D){case 0:O=void 0;break;case 1:O=Ne(m.parameterStructures,N[0]);break;default:O=[];for(let fe=0;fe<N.length&&fe<D;fe++)O.push(Dn(N[fe]));if(N.length<D)for(let fe=N.length;fe<D;fe++)O.push(null);break}return O}const H={sendNotification:(m,...N)=>{Mn();let O,D;if(n.string(m)){O=m;const ae=N[0];let ce=0,Ie=r.ParameterStructures.auto;r.ParameterStructures.is(ae)&&(ce=1,Ie=ae);let Z=N.length;const ve=Z-ce;switch(ve){case 0:D=void 0;break;case 1:D=Ne(Ie,N[ce]);break;default:if(Ie===r.ParameterStructures.byName)throw new Error(`Received ${ve} parameters for 'by Name' notification parameter structure.`);D=N.slice(ce,Z).map(ie=>Dn(ie));break}}else{const ae=N;O=m.method,D=Pe(m,ae)}const fe={jsonrpc:z,method:O,params:D};return za(fe),w.write(fe).catch(ae=>{throw S.error("Sending notification failed."),ae})},onNotification:(m,N)=>{Mn();let O;return n.func(m)?B=m:N&&(n.string(m)?(O=m,re.set(m,{type:void 0,handler:N})):(O=m.method,re.set(m.method,{type:m,handler:N}))),{dispose:()=>{O!==void 0?re.delete(O):B=void 0}}},onProgress:(m,N,O)=>{if(je.has(N))throw new Error(`Progress handler for token ${N} already registered`);return je.set(N,O),{dispose:()=>{je.delete(N)}}},sendProgress:(m,N,O)=>H.sendNotification(u.type,{token:N,value:O}),onUnhandledProgress:Qi.event,sendRequest:(m,...N)=>{Mn(),Ka();let O,D,fe;if(n.string(m)){O=m;const Z=N[0],ve=N[N.length-1];let ie=0,Me=r.ParameterStructures.auto;r.ParameterStructures.is(Z)&&(ie=1,Me=Z);let Je=N.length;a.CancellationToken.is(ve)&&(Je=Je-1,fe=ve);const Dt=Je-ie;switch(Dt){case 0:D=void 0;break;case 1:D=Ne(Me,N[ie]);break;default:if(Me===r.ParameterStructures.byName)throw new Error(`Received ${Dt} parameters for 'by Name' request parameter structure.`);D=N.slice(ie,Je).map(lv=>Dn(lv));break}}else{const Z=N;O=m.method,D=Pe(m,Z);const ve=m.numberOfParams;fe=a.CancellationToken.is(Z[ve])?Z[ve]:void 0}const ae=L++;let ce;fe&&(ce=fe.onCancellationRequested(()=>{const Z=bt.sender.sendCancellation(H,ae);return Z===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${ae}`),Promise.resolve()):Z.catch(()=>{S.log(`Sending cancellation messages for id ${ae} failed`)})}));const Ie={jsonrpc:z,id:ae,method:O,params:D};return Ua(Ie),typeof bt.sender.enableCancellation=="function"&&bt.sender.enableCancellation(Ie),new Promise(async(Z,ve)=>{const ie=Dt=>{Z(Dt),bt.sender.cleanup(ae),ce==null||ce.dispose()},Me=Dt=>{ve(Dt),bt.sender.cleanup(ae),ce==null||ce.dispose()},Je={method:O,timerStart:Date.now(),resolve:ie,reject:Me};try{await w.write(Ie),xe.set(ae,Je)}catch(Dt){throw S.error("Sending request failed."),Je.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,Dt.message?Dt.message:"Unknown reason")),Dt}})},onRequest:(m,N)=>{Mn();let O=null;return f.is(m)?(O=void 0,F=m):n.string(m)?(O=null,N!==void 0&&(O=m,se.set(m,{handler:N,type:void 0}))):N!==void 0&&(O=m.method,se.set(m.method,{type:m,handler:N})),{dispose:()=>{O!==null&&(O!==void 0?se.delete(O):F=void 0)}}},hasPendingResponse:()=>xe.size>0,trace:async(m,N,O)=>{let D=!1,fe=y.Text;O!==void 0&&(n.boolean(O)?D=O:(D=O.sendNotification||!1,fe=O.traceFormat||y.Text)),ee=m,lt=fe,ee===d.Off?be=void 0:be=N,D&&!rs()&&!Zt()&&await H.sendNotification(E.type,{value:d.toString(m)})},onError:Kr.event,onClose:Ji.event,onUnhandledNotification:Zi.event,onDispose:es.event,end:()=>{w.end()},dispose:()=>{if(Zt())return;St=P.Disposed,es.fire(void 0);const m=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of xe.values())N.reject(m);xe=new Map,Oe=new Map,Ue=new Set,Te=new i.LinkedMap,n.func(w.dispose)&&w.dispose(),n.func(g.dispose)&&g.dispose()},listen:()=>{Mn(),Wa(),St=P.Listening,g.listen(Ma)},inspect:()=>{(0,e.default)().console.log("inspect")}};return H.onNotification(C.type,m=>{if(ee===d.Off||!be)return;const N=ee===d.Verbose||ee===d.Compact;be.log(m.message,N?m.verbose:void 0)}),H.onNotification(u.type,m=>{const N=je.get(m.token);N?N(m.value):Qi.fire(m)}),H}t.createMessageConnection=$}(vu)),vu}var rm;function yf(){return rm||(rm=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=FT();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=GT();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=PM();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Yi();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const s=Kc();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=IM();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return a.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return a.SharedArrayReceiverStrategy}});const o=kM();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=OM();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 u=LM();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return u.AbstractMessageBuffer}});const l=xM();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return l.MessageStrategy}});const f=qr();t.RAL=f.default}(Tu)),Tu}var im;function MM(){if(im)return so;im=1,Object.defineProperty(so,"__esModule",{value:!0});const t=yf();class e extends t.AbstractMessageBuffer{constructor(c="utf-8"){super(c),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(c,u){return new TextEncoder().encode(c)}toString(c,u){return u==="ascii"?this.asciiDecoder.decode(c):new TextDecoder(u).decode(c)}asNative(c,u){return u===void 0?c:c.slice(0,u)}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=u=>{u.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,u){if(typeof c=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);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,...u){const l=setTimeout(o,c,...u);return{dispose:()=>clearTimeout(l)}},setImmediate(o,...c){const u=setTimeout(o,0,...c);return{dispose:()=>clearTimeout(u)}},setInterval(o,c,...u){const l=setInterval(o,c,...u);return{dispose:()=>clearInterval(l)}}})});function a(){return s}return function(o){function c(){t.RAL.install(s)}o.install=c}(a||(a={})),so.default=a,so}var sm;function Xi(){return sm||(sm=1,function(t){var e=ur&&ur.__createBinding||(Object.create?function(c,u,l,f){f===void 0&&(f=l);var d=Object.getOwnPropertyDescriptor(u,l);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(c,f,d)}:function(c,u,l,f){f===void 0&&(f=l),c[f]=u[l]}),n=ur&&ur.__exportStar||function(c,u){for(var l in c)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,c,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,MM().default.install();const i=yf();n(yf(),t);class s extends i.AbstractMessageReader{constructor(u){super(),this._onData=new i.Emitter,this._messageListener=l=>{this._onData.fire(l.data)},u.addEventListener("error",l=>this.fireError(l)),u.onmessage=this._messageListener}listen(u){return this._onData.event(u)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(u){super(),this.port=u,this.errorCount=0,u.addEventListener("error",l=>this.fireError(l))}write(u){try{return this.port.postMessage(u),Promise.resolve()}catch(l){return this.handleError(l,u),Promise.reject(l)}}handleError(u,l){this.errorCount++,this.fireError(u,l,this.errorCount)}end(){}}t.BrowserMessageWriter=a;function o(c,u,l,f){return l===void 0&&(l=i.NullLogger),i.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,i.createMessageConnection)(c,u,l,f)}t.createMessageConnection=o}(ur)),ur}var $u,am;function om(){return am||(am=1,$u=Xi()),$u}var fr={};const wd=hv(L1);var Ze={},cm;function _e(){if(cm)return Ze;cm=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.ProtocolNotificationType=Ze.ProtocolNotificationType0=Ze.ProtocolRequestType=Ze.ProtocolRequestType0=Ze.RegistrationType=Ze.MessageDirection=void 0;const t=Xi();var e;(function(o){o.clientToServer="clientToServer",o.serverToClient="serverToClient",o.both="both"})(e||(Ze.MessageDirection=e={}));class n{constructor(c){this.method=c}}Ze.RegistrationType=n;class r extends t.RequestType0{constructor(c){super(c)}}Ze.ProtocolRequestType0=r;class i extends t.RequestType{constructor(c){super(c,t.ParameterStructures.byName)}}Ze.ProtocolRequestType=i;class s extends t.NotificationType0{constructor(c){super(c)}}Ze.ProtocolNotificationType0=s;class a extends t.NotificationType{constructor(c){super(c,t.ParameterStructures.byName)}}return Ze.ProtocolNotificationType=a,Ze}var Ru={},ke={},um;function Cd(){if(um)return ke;um=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.objectLiteral=ke.typedArray=ke.stringArray=ke.array=ke.func=ke.error=ke.number=ke.string=ke.boolean=void 0;function t(u){return u===!0||u===!1}ke.boolean=t;function e(u){return typeof u=="string"||u instanceof String}ke.string=e;function n(u){return typeof u=="number"||u instanceof Number}ke.number=n;function r(u){return u instanceof Error}ke.error=r;function i(u){return typeof u=="function"}ke.func=i;function s(u){return Array.isArray(u)}ke.array=s;function a(u){return s(u)&&u.every(l=>e(l))}ke.stringArray=a;function o(u,l){return Array.isArray(u)&&u.every(l)}ke.typedArray=o;function c(u){return u!==null&&typeof u=="object"}return ke.objectLiteral=c,ke}var Rs={},lm;function DM(){if(lm)return Rs;lm=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.ImplementationRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Rs.ImplementationRequest=e={})),Rs}var Es={},fm;function FM(){if(fm)return Es;fm=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.TypeDefinitionRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Es.TypeDefinitionRequest=e={})),Es}var dr={},dm;function GM(){if(dm)return dr;dm=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.DidChangeWorkspaceFoldersNotification=dr.WorkspaceFoldersRequest=void 0;const t=_e();var e;(function(r){r.method="workspace/workspaceFolders",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(e||(dr.WorkspaceFoldersRequest=e={}));var n;return function(r){r.method="workspace/didChangeWorkspaceFolders",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolNotificationType(r.method)}(n||(dr.DidChangeWorkspaceFoldersNotification=n={})),dr}var As={},hm;function jM(){if(hm)return As;hm=1,Object.defineProperty(As,"__esModule",{value:!0}),As.ConfigurationRequest=void 0;const t=_e();var e;return function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(As.ConfigurationRequest=e={})),As}var hr={},pm;function UM(){if(pm)return hr;pm=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.ColorPresentationRequest=hr.DocumentColorRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/documentColor",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(hr.DocumentColorRequest=e={}));var n;return function(r){r.method="textDocument/colorPresentation",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)}(n||(hr.ColorPresentationRequest=n={})),hr}var pr={},mm;function zM(){if(mm)return pr;mm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.FoldingRangeRefreshRequest=pr.FoldingRangeRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/foldingRange",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(pr.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||(pr.FoldingRangeRefreshRequest=n={})),pr}var _s={},gm;function qM(){if(gm)return _s;gm=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.DeclarationRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(_s.DeclarationRequest=e={})),_s}var Ss={},ym;function BM(){if(ym)return Ss;ym=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.SelectionRangeRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Ss.SelectionRangeRequest=e={})),Ss}var rn={},Tm;function WM(){if(Tm)return rn;Tm=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.WorkDoneProgressCancelNotification=rn.WorkDoneProgressCreateRequest=rn.WorkDoneProgress=void 0;const t=Xi(),e=_e();var n;(function(s){s.type=new t.ProgressType;function a(o){return o===s.type}s.is=a})(n||(rn.WorkDoneProgress=n={}));var r;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=e.MessageDirection.serverToClient,s.type=new e.ProtocolRequestType(s.method)})(r||(rn.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||(rn.WorkDoneProgressCancelNotification=i={})),rn}var sn={},vm;function KM(){if(vm)return sn;vm=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.CallHierarchyOutgoingCallsRequest=sn.CallHierarchyIncomingCallsRequest=sn.CallHierarchyPrepareRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(sn.CallHierarchyPrepareRequest=e={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(sn.CallHierarchyIncomingCallsRequest=n={}));var r;return function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(sn.CallHierarchyOutgoingCallsRequest=r={})),sn}var Qe={},$m;function HM(){if($m)return Qe;$m=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.SemanticTokensRefreshRequest=Qe.SemanticTokensRangeRequest=Qe.SemanticTokensDeltaRequest=Qe.SemanticTokensRequest=Qe.SemanticTokensRegistrationType=Qe.TokenFormat=void 0;const t=_e();var e;(function(o){o.Relative="relative"})(e||(Qe.TokenFormat=e={}));var n;(function(o){o.method="textDocument/semanticTokens",o.type=new t.RegistrationType(o.method)})(n||(Qe.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||(Qe.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||(Qe.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||(Qe.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||(Qe.SemanticTokensRefreshRequest=a={})),Qe}var bs={},Rm;function VM(){if(Rm)return bs;Rm=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.ShowDocumentRequest=void 0;const t=_e();var e;return function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(bs.ShowDocumentRequest=e={})),bs}var ws={},Em;function YM(){if(Em)return ws;Em=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.LinkedEditingRangeRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(ws.LinkedEditingRangeRequest=e={})),ws}var qe={},Am;function XM(){if(Am)return qe;Am=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.WillDeleteFilesRequest=qe.DidDeleteFilesNotification=qe.DidRenameFilesNotification=qe.WillRenameFilesRequest=qe.DidCreateFilesNotification=qe.WillCreateFilesRequest=qe.FileOperationPatternKind=void 0;const t=_e();var e;(function(c){c.file="file",c.folder="folder"})(e||(qe.FileOperationPatternKind=e={}));var n;(function(c){c.method="workspace/willCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(n||(qe.WillCreateFilesRequest=n={}));var r;(function(c){c.method="workspace/didCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(r||(qe.DidCreateFilesNotification=r={}));var i;(function(c){c.method="workspace/willRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(i||(qe.WillRenameFilesRequest=i={}));var s;(function(c){c.method="workspace/didRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(s||(qe.DidRenameFilesNotification=s={}));var a;(function(c){c.method="workspace/didDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(a||(qe.DidDeleteFilesNotification=a={}));var o;return function(c){c.method="workspace/willDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)}(o||(qe.WillDeleteFilesRequest=o={})),qe}var an={},_m;function JM(){if(_m)return an;_m=1,Object.defineProperty(an,"__esModule",{value:!0}),an.MonikerRequest=an.MonikerKind=an.UniquenessLevel=void 0;const t=_e();var e;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(e||(an.UniquenessLevel=e={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(an.MonikerKind=n={}));var r;return function(i){i.method="textDocument/moniker",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(an.MonikerRequest=r={})),an}var on={},Sm;function ZM(){if(Sm)return on;Sm=1,Object.defineProperty(on,"__esModule",{value:!0}),on.TypeHierarchySubtypesRequest=on.TypeHierarchySupertypesRequest=on.TypeHierarchyPrepareRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(on.TypeHierarchyPrepareRequest=e={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(on.TypeHierarchySupertypesRequest=n={}));var r;return function(i){i.method="typeHierarchy/subtypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(on.TypeHierarchySubtypesRequest=r={})),on}var mr={},bm;function QM(){if(bm)return mr;bm=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.InlineValueRefreshRequest=mr.InlineValueRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/inlineValue",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(mr.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||(mr.InlineValueRefreshRequest=n={})),mr}var cn={},wm;function eD(){if(wm)return cn;wm=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.InlayHintRefreshRequest=cn.InlayHintResolveRequest=cn.InlayHintRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/inlayHint",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(cn.InlayHintRequest=e={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(cn.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||(cn.InlayHintRefreshRequest=r={})),cn}var ft={},Cm;function tD(){if(Cm)return ft;Cm=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.DiagnosticRefreshRequest=ft.WorkspaceDiagnosticRequest=ft.DocumentDiagnosticRequest=ft.DocumentDiagnosticReportKind=ft.DiagnosticServerCancellationData=void 0;const t=Xi(),e=Cd(),n=_e();var r;(function(c){function u(l){const f=l;return f&&e.boolean(f.retriggerRequest)}c.is=u})(r||(ft.DiagnosticServerCancellationData=r={}));var i;(function(c){c.Full="full",c.Unchanged="unchanged"})(i||(ft.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||(ft.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||(ft.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||(ft.DiagnosticRefreshRequest=o={})),ft}var $e={},Nm;function nD(){if(Nm)return $e;Nm=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.DidCloseNotebookDocumentNotification=$e.DidSaveNotebookDocumentNotification=$e.DidChangeNotebookDocumentNotification=$e.NotebookCellArrayChange=$e.DidOpenNotebookDocumentNotification=$e.NotebookDocumentSyncRegistrationType=$e.NotebookDocument=$e.NotebookCell=$e.ExecutionSummary=$e.NotebookCellKind=void 0;const t=wd,e=Cd(),n=_e();var r;(function(p){p.Markup=1,p.Code=2;function y(E){return E===1||E===2}p.is=y})(r||($e.NotebookCellKind=r={}));var i;(function(p){function y(A,_){const b={executionOrder:A};return(_===!0||_===!1)&&(b.success=_),b}p.create=y;function E(A){const _=A;return e.objectLiteral(_)&&t.uinteger.is(_.executionOrder)&&(_.success===void 0||e.boolean(_.success))}p.is=E;function C(A,_){return A===_?!0:A==null||_===null||_===void 0?!1:A.executionOrder===_.executionOrder&&A.success===_.success}p.equals=C})(i||($e.ExecutionSummary=i={}));var s;(function(p){function y(_,b){return{kind:_,document:b}}p.create=y;function E(_){const b=_;return e.objectLiteral(b)&&r.is(b.kind)&&t.DocumentUri.is(b.document)&&(b.metadata===void 0||e.objectLiteral(b.metadata))}p.is=E;function C(_,b){const I=new Set;return _.document!==b.document&&I.add("document"),_.kind!==b.kind&&I.add("kind"),_.executionSummary!==b.executionSummary&&I.add("executionSummary"),(_.metadata!==void 0||b.metadata!==void 0)&&!A(_.metadata,b.metadata)&&I.add("metadata"),(_.executionSummary!==void 0||b.executionSummary!==void 0)&&!i.equals(_.executionSummary,b.executionSummary)&&I.add("executionSummary"),I}p.diff=C;function A(_,b){if(_===b)return!0;if(_==null||b===null||b===void 0||typeof _!=typeof b||typeof _!="object")return!1;const I=Array.isArray(_),U=Array.isArray(b);if(I!==U)return!1;if(I&&U){if(_.length!==b.length)return!1;for(let V=0;V<_.length;V++)if(!A(_[V],b[V]))return!1}if(e.objectLiteral(_)&&e.objectLiteral(b)){const V=Object.keys(_),J=Object.keys(b);if(V.length!==J.length||(V.sort(),J.sort(),!A(V,J)))return!1;for(let oe=0;oe<V.length;oe++){const ge=V[oe];if(!A(_[ge],b[ge]))return!1}}return!0}})(s||($e.NotebookCell=s={}));var a;(function(p){function y(C,A,_,b){return{uri:C,notebookType:A,version:_,cells:b}}p.create=y;function E(C){const A=C;return e.objectLiteral(A)&&e.string(A.uri)&&t.integer.is(A.version)&&e.typedArray(A.cells,s.is)}p.is=E})(a||($e.NotebookDocument=a={}));var o;(function(p){p.method="notebookDocument/sync",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.RegistrationType(p.method)})(o||($e.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||($e.DidOpenNotebookDocumentNotification=c={}));var u;(function(p){function y(C){const A=C;return e.objectLiteral(A)&&t.uinteger.is(A.start)&&t.uinteger.is(A.deleteCount)&&(A.cells===void 0||e.typedArray(A.cells,s.is))}p.is=y;function E(C,A,_){const b={start:C,deleteCount:A};return _!==void 0&&(b.cells=_),b}p.create=E})(u||($e.NotebookCellArrayChange=u={}));var l;(function(p){p.method="notebookDocument/didChange",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(l||($e.DidChangeNotebookDocumentNotification=l={}));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||($e.DidSaveNotebookDocumentNotification=f={}));var d;return function(p){p.method="notebookDocument/didClose",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method}(d||($e.DidCloseNotebookDocumentNotification=d={})),$e}var Cs={},Pm;function rD(){if(Pm)return Cs;Pm=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.InlineCompletionRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Cs.InlineCompletionRequest=e={})),Cs}var Im;function iD(){return Im||(Im=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=_e(),n=wd,r=Cd(),i=DM();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});const s=FM();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=GM();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const o=jM();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return o.ConfigurationRequest}});const c=UM();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return c.ColorPresentationRequest}});const u=zM();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return u.FoldingRangeRefreshRequest}});const l=qM();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return l.DeclarationRequest}});const f=BM();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const d=WM();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return d.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return d.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return d.WorkDoneProgressCancelNotification}});const p=KM();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 y=HM();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return y.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return y.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return y.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return y.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return y.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return y.SemanticTokensRegistrationType}});const E=VM();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return E.ShowDocumentRequest}});const C=YM();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return C.LinkedEditingRangeRequest}});const A=XM();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return A.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return A.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return A.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return A.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return A.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return A.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return A.WillDeleteFilesRequest}});const _=JM();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return _.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return _.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return _.MonikerRequest}});const b=ZM();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});const I=QM();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return I.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return I.InlineValueRefreshRequest}});const U=eD();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return U.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return U.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return U.InlayHintRefreshRequest}});const V=tD();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return V.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return V.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return V.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return V.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return V.DiagnosticRefreshRequest}});const J=nD();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=rD();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return oe.InlineCompletionRequest}});var ge;(function(h){function Ne(Pe){const H=Pe;return r.string(H)||r.string(H.language)||r.string(H.scheme)||r.string(H.pattern)}h.is=Ne})(ge||(t.TextDocumentFilter=ge={}));var ye;(function(h){function Ne(Pe){const H=Pe;return r.objectLiteral(H)&&(r.string(H.notebookType)||r.string(H.scheme)||r.string(H.pattern))}h.is=Ne})(ye||(t.NotebookDocumentFilter=ye={}));var P;(function(h){function Ne(Pe){const H=Pe;return r.objectLiteral(H)&&(r.string(H.notebook)||ye.is(H.notebook))&&(H.language===void 0||r.string(H.language))}h.is=Ne})(P||(t.NotebookCellTextDocumentFilter=P={}));var $;(function(h){function Ne(Pe){if(!Array.isArray(Pe))return!1;for(let H of Pe)if(!r.string(H)&&!ge.is(H)&&!P.is(H))return!1;return!0}h.is=Ne})($||(t.DocumentSelector=$={}));var g;(function(h){h.method="client/registerCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(g||(t.RegistrationRequest=g={}));var w;(function(h){h.method="client/unregisterCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(w||(t.UnregistrationRequest=w={}));var T;(function(h){h.Create="create",h.Rename="rename",h.Delete="delete"})(T||(t.ResourceOperationKind=T={}));var v;(function(h){h.Abort="abort",h.Transactional="transactional",h.TextOnlyTransactional="textOnlyTransactional",h.Undo="undo"})(v||(t.FailureHandlingKind=v={}));var S;(function(h){h.UTF8="utf-8",h.UTF16="utf-16",h.UTF32="utf-32"})(S||(t.PositionEncodingKind=S={}));var L;(function(h){function Ne(Pe){const H=Pe;return H&&r.string(H.id)&&H.id.length>0}h.hasId=Ne})(L||(t.StaticRegistrationOptions=L={}));var M;(function(h){function Ne(Pe){const H=Pe;return H&&(H.documentSelector===null||$.is(H.documentSelector))}h.is=Ne})(M||(t.TextDocumentRegistrationOptions=M={}));var x;(function(h){function Ne(H){const m=H;return r.objectLiteral(m)&&(m.workDoneProgress===void 0||r.boolean(m.workDoneProgress))}h.is=Ne;function Pe(H){const m=H;return m&&r.boolean(m.workDoneProgress)}h.hasWorkDoneProgress=Pe})(x||(t.WorkDoneProgressOptions=x={}));var z;(function(h){h.method="initialize",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(z||(t.InitializeRequest=z={}));var F;(function(h){h.unknownProtocolVersion=1})(F||(t.InitializeErrorCodes=F={}));var se;(function(h){h.method="initialized",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(se||(t.InitializedNotification=se={}));var B;(function(h){h.method="shutdown",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType0(h.method)})(B||(t.ShutdownRequest=B={}));var re;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(re||(t.ExitNotification=re={}));var je;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(je||(t.DidChangeConfigurationNotification=je={}));var Se;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Se||(t.MessageType=Se={}));var Te;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Te||(t.ShowMessageNotification=Te={}));var xe;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(xe||(t.ShowMessageRequest=xe={}));var Ue;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Ue||(t.LogMessageNotification=Ue={}));var Oe;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Oe||(t.TelemetryEventNotification=Oe={}));var ee;(function(h){h.None=0,h.Full=1,h.Incremental=2})(ee||(t.TextDocumentSyncKind=ee={}));var lt;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(lt||(t.DidOpenTextDocumentNotification=lt={}));var be;(function(h){function Ne(H){let m=H;return m!=null&&typeof m.text=="string"&&m.range!==void 0&&(m.rangeLength===void 0||typeof m.rangeLength=="number")}h.isIncremental=Ne;function Pe(H){let m=H;return m!=null&&typeof m.text=="string"&&m.range===void 0&&m.rangeLength===void 0}h.isFull=Pe})(be||(t.TextDocumentContentChangeEvent=be={}));var St;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(St||(t.DidChangeTextDocumentNotification=St={}));var Kr;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Kr||(t.DidCloseTextDocumentNotification=Kr={}));var Ji;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ji||(t.DidSaveTextDocumentNotification=Ji={}));var Zi;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(Zi||(t.TextDocumentSaveReason=Zi={}));var Qi;(function(h){h.method="textDocument/willSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Qi||(t.WillSaveTextDocumentNotification=Qi={}));var es;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(es||(t.WillSaveTextDocumentWaitUntilRequest=es={}));var bt;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(bt||(t.DidChangeWatchedFilesNotification=bt={}));var ts;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(ts||(t.FileChangeType=ts={}));var Na;(function(h){function Ne(Pe){const H=Pe;return r.objectLiteral(H)&&(n.URI.is(H.baseUri)||n.WorkspaceFolder.is(H.baseUri))&&r.string(H.pattern)}h.is=Ne})(Na||(t.RelativePattern=Na={}));var Pa;(function(h){h.Create=1,h.Change=2,h.Delete=4})(Pa||(t.WatchKind=Pa={}));var Ia;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Ia||(t.PublishDiagnosticsNotification=Ia={}));var ka;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(ka||(t.CompletionTriggerKind=ka={}));var ns;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ns||(t.CompletionRequest=ns={}));var rs;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rs||(t.CompletionResolveRequest=rs={}));var Zt;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zt||(t.HoverRequest=Zt={}));var is;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(is||(t.SignatureHelpTriggerKind=is={}));var Oa;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Oa||(t.SignatureHelpRequest=Oa={}));var La;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(La||(t.DefinitionRequest=La={}));var ss;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ss||(t.ReferencesRequest=ss={}));var as;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(as||(t.DocumentHighlightRequest=as={}));var xa;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(xa||(t.DocumentSymbolRequest=xa={}));var Ma;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ma||(t.CodeActionRequest=Ma={}));var Da;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Da||(t.CodeActionResolveRequest=Da={}));var Fa;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Fa||(t.WorkspaceSymbolRequest=Fa={}));var Ga;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ga||(t.WorkspaceSymbolResolveRequest=Ga={}));var ja;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ja||(t.CodeLensRequest=ja={}));var wt;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(wt||(t.CodeLensResolveRequest=wt={}));var Ua;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(Ua||(t.CodeLensRefreshRequest=Ua={}));var za;(function(h){h.method="textDocument/documentLink",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(za||(t.DocumentLinkRequest=za={}));var rr;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rr||(t.DocumentLinkResolveRequest=rr={}));var qa;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(qa||(t.DocumentFormattingRequest=qa={}));var Hr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Hr||(t.DocumentRangeFormattingRequest=Hr={}));var Ba;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ba||(t.DocumentRangesFormattingRequest=Ba={}));var Qt;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Qt||(t.DocumentOnTypeFormattingRequest=Qt={}));var Mn;(function(h){h.Identifier=1})(Mn||(t.PrepareSupportDefaultBehavior=Mn={}));var Wa;(function(h){h.method="textDocument/rename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Wa||(t.RenameRequest=Wa={}));var Ka;(function(h){h.method="textDocument/prepareRename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ka||(t.PrepareRenameRequest=Ka={}));var Dn;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Dn||(t.ExecuteCommandRequest=Dn={}));var os;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(os||(t.ApplyWorkspaceEditRequest=os={}))}(Ru)),Ru}var Ns={},km;function sD(){if(km)return Ns;km=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.createProtocolConnection=void 0;const t=Xi();function e(n,r,i,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,r,i,s)}return Ns.createProtocolConnection=e,Ns}var Om;function aD(){return Om||(Om=1,function(t){var e=fr&&fr.__createBinding||(Object.create?function(s,a,o,c){c===void 0&&(c=o);var u=Object.getOwnPropertyDescriptor(a,o);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,u)}:function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]}),n=fr&&fr.__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(Xi(),t),n(wd,t),n(_e(),t),n(iD(),t);var r=sD();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={}))}(fr)),fr}var Lm;function oD(){return Lm||(Lm=1,function(t){var e=cr&&cr.__createBinding||(Object.create?function(s,a,o,c){c===void 0&&(c=o);var u=Object.getOwnPropertyDescriptor(a,o);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,u)}:function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]}),n=cr&&cr.__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=om();n(om(),t),n(aD(),t);function i(s,a,o,c){return(0,r.createMessageConnection)(s,a,o,c)}t.createProtocolConnection=i}(cr)),cr}var ao=oD(),Bs;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(Bs||(Bs={}));class cD{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new la,this.documentPhaseListeners=new la,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=Ae.CancellationToken.None){var i;for(const s of e){const a=s.uri.toString();if(s.state===Y.Validated){if(typeof n.validation=="boolean"&&n.validation)this.resetToState(s,Y.IndexedReferences);else if(typeof n.validation=="object"){const o=this.findMissingValidationCategories(s,n);o.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:o}},result:(i=this.buildState.get(a))==null?void 0:i.result}),s.state=Y.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Y.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=Ae.CancellationToken.None){this.currentState=Y.Changed;const i=[];for(const c of n){const u=this.langiumDocuments.deleteDocuments(c);for(const l of u)i.push(l.uri),this.cleanUpDeleted(l)}const s=(await Promise.all(e.map(c=>this.findChangedUris(c)))).flat();for(const c of s){let u=this.langiumDocuments.getDocument(c);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},c),u.state=Y.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,Y.Changed)}const a=Re(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 et(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(c=>{var u;return c.state<Y.Validated||!((u=this.buildState.get(c.uri.toString()))!=null&&u.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){var o,c;const r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),s=(o=r==null?void 0:r.result)!=null&&o.validationChecks?new Set((c=r==null?void 0:r.result)==null?void 0:c.validationChecks):r!=null&&r.completed?i:new Set,a=n===void 0||n.validation===!0?i:typeof n.validation=="object"?n.validation.categories??i:[];return Re(a).filter(u=>!s.has(u)).toArray()}async findChangedUris(e){var r;if(this.langiumDocuments.getDocument(e)??((r=this.textDocuments)==null?void 0:r.get(e)))return[e];try{const i=await this.fileSystemProvider.stat(e);if(i.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(i))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){var n;return!!((n=this.textDocuments)!=null&&n.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),Bs.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==null?void 0:s.result})}}async runCancelable(e,n,r,i){for(const a of e)a.state<n&&(await et(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),Bs.create(()=>{this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),Bs.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;return n&&"path"in n?i=n:r=n,r??(r=Ae.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(pi);if(this.currentState>=e&&e>i.state)return Promise.reject(new ao.ResponseError(ao.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 ao.ResponseError(ao.LSPErrorCodes.ServerCancelled,`No document found for URI: ${n.toString()}`));return new Promise((s,a)=>{const o=this.onDocumentPhase(e,u=>{pt.equals(u.uri,n)&&(o.dispose(),c.dispose(),s(u.uri))}),c=r.onCancellationRequested(()=>{o.dispose(),c.dispose(),a(pi)})})}awaitBuilderState(e,n){return this.currentState>=e?Promise.resolve():n.isCancellationRequested?Promise.reject(pi):new Promise((r,i)=>{const s=this.onBuildPhase(e,()=>{s.dispose(),a.dispose(),r()}),a=n.onCancellationRequested(()=>{s.dispose(),a.dispose(),i(pi)})})}async notifyDocumentPhase(e,n,r){const s=this.documentPhaseListeners.get(n).slice();for(const a of s)try{await et(r),await a(e,r)}catch(o){if(!Hc(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 et(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=Re(o.result.validationChecks).concat(s.categories).distinct().toArray():o.result.validationChecks=[...s.categories])}getBuildOptions(e){var n;return((n=this.buildState.get(e.uri.toString()))==null?void 0:n.options)??{}}}class uD{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new pM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=yn(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{pt.equals(a.targetUri,r)&&a.targetPath===n&&i.push(a)})}),Re(i)}allElements(e,n){let r=Re(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=Ae.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=Ae.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 lD{constructor(e){this.initialBuildOptions={},this._ready=new bd,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=Ae.CancellationToken.None){const r=await this.performStartup(e);await et(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=Re(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 kt.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=pt.basename(e.uri);return n.startsWith(".")?!1:e.isDirectory?n!=="node_modules"&&n!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}}class fD{buildUnexpectedCharactersMessage(e,n,r,i,s){return Qu.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return Qu.buildUnableToPopLexerModeMessage(e)}}const dD={mode:"full"};class hD{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=xm(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new it(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,n=dD){var i,s;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:(s=(i=this.tokenBuilder).flushLexingReport)==null?void 0:s.call(i,e)}}toTokenTypeDictionary(e){if(xm(e))return e;const n=UT(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function pD(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function UT(t){return t&&"modes"in t&&"defaultMode"in t}function xm(t){return!pD(t)&&!UT(t)}function mD(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=ne.create(0,0));const s=zT(t),a=Nd(r),o=TD({lines:s,position:i,options:a});return AD({index:0,tokens:o,position:i})}function gD(t,e){const n=Nd(e),r=zT(t);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=n.start,o=n.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function zT(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(Wv)}const Mm=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,yD=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function TD(t){var i,s,a;const e=[];let n=t.position.line,r=t.position.character;for(let o=0;o<t.lines.length;o++){const c=o===0,u=o===t.lines.length-1;let l=t.lines[o],f=0;if(c&&t.options.start){const p=(i=t.options.start)==null?void 0:i.exec(l);p&&(f=p.index+p[0].length)}else{const p=(s=t.options.line)==null?void 0:s.exec(l);p&&(f=p.index+p[0].length)}if(u){const p=(a=t.options.end)==null?void 0:a.exec(l);p&&(l=l.substring(0,p.index))}if(l=l.substring(0,ED(l)),Tf(l,f)>=l.length){if(e.length>0){const p=ne.create(n,r);e.push({type:"break",content:"",range:X.create(p,p)})}}else{Mm.lastIndex=f;const p=Mm.exec(l);if(p){const y=p[0],E=p[1],C=ne.create(n,r+f),A=ne.create(n,r+f+y.length);e.push({type:"tag",content:E,range:X.create(C,A)}),f+=y.length,f=Tf(l,f)}if(f<l.length){const y=l.substring(f),E=Array.from(y.matchAll(yD));e.push(...vD(E,y,n,r+f))}}n++,r=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}function vD(t,e,n,r){const i=[];if(t.length===0){const s=ne.create(n,r),a=ne.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,u=e.substring(s,c);u.length>0&&i.push({type:"text",content:e.substring(s,c),range:X.create(ne.create(n,s+r),ne.create(n,c+r))});let l=u.length+1;const f=o[1];if(i.push({type:"inline-tag",content:f,range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+f.length+r))}),l+=f.length,o.length===4){l+=o[2].length;const d=o[3];i.push({type:"text",content:d,range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+d.length+r))})}else i.push({type:"text",content:"",range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+r))});s=c+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:X.create(ne.create(n,s+r),ne.create(n,s+r+a.length))})}return i}const $D=/\S/,RD=/\s*$/;function Tf(t,e){const n=t.substring(e).match($D);return n?e+n.index:t.length}function ED(t){const e=t.match(RD);if(e&&typeof e.index=="number")return e.index}function AD(t){var s,a;const e=ne.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Dm([],X.create(e,e));const n=[];for(;t.index<t.tokens.length;){const o=_D(t,n[n.length-1]);o&&n.push(o)}const r=((s=n[0])==null?void 0:s.range.start)??e,i=((a=n[n.length-1])==null?void 0:a.range.end)??e;return new Dm(n,X.create(r,i))}function _D(t,e){const n=t.tokens[t.index];if(n.type==="tag")return BT(t,!1);if(n.type==="text"||n.type==="inline-tag")return qT(t);SD(n,e),t.index++}function SD(t,e){if(e){const n=new KT("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}function qT(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(bD(t)),r=e,e=t.tokens[t.index];return new vf(i,X.create(n.range.start,r.range.end))}function bD(t){return t.tokens[t.index].type==="inline-tag"?BT(t,!0):WT(t)}function BT(t,e){const n=t.tokens[t.index++],r=n.content.substring(1),i=t.tokens[t.index];if((i==null?void 0:i.type)==="text")if(e){const s=WT(t);return new Au(r,new vf([s],s.range),e,X.create(n.range.start,s.range.end))}else{const s=qT(t);return new Au(r,s,e,X.create(n.range.start,s.range.end))}else{const s=n.range;return new Au(r,new vf([],s),e,s)}}function WT(t){const e=t.tokens[t.index++];return new KT(e.content,e.range)}function Nd(t){if(!t)return Nd({start:"/**",end:"*/",line:"*"});const{start:e,end:n,line:r}=t;return{start:Eu(e,!0),end:Eu(n,!1),line:Eu(r,!0)}}function Eu(t,e){if(typeof t=="string"||typeof t=="object"){const n=typeof t=="string"?cc(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}else return t}class Dm{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+=Fm(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+=Fm(n)+i}return n.trim()}}class Au{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}
151
+ `)),N){const D=m.error?` Request failed: ${m.error.message} (${m.error.code}).`:"";be.log(`Received response '${N.method} - (${m.id})' in ${Date.now()-N.timerStart}ms.${D}`,O)}else be.log(`Received response ${m.id} without active response promise.`,O)}else Qt("receive-response",m)}function Qt(m,N){if(!be||ee===d.Off)return;const O={isLSPMessage:!0,type:m,message:N,timestamp:Date.now()};be.log(O)}function Mn(){if(rs())throw new _(A.Closed,"Connection is closed.");if(Zt())throw new _(A.Disposed,"Connection is disposed.")}function Wa(){if(ns())throw new _(A.AlreadyListening,"Connection is already listening")}function Ka(){if(!ns())throw new Error("Call listen() first.")}function Dn(m){return m===void 0?null:m}function os(m){if(m!==null)return m}function h(m){return m!=null&&!Array.isArray(m)&&typeof m=="object"}function Ne(m,N){switch(m){case r.ParameterStructures.auto:return h(N)?os(N):[Dn(N)];case r.ParameterStructures.byName:if(!h(N))throw new Error("Received parameters by name but param is not an object literal.");return os(N);case r.ParameterStructures.byPosition:return[Dn(N)];default:throw new Error(`Unknown parameter structure ${m.toString()}`)}}function Pe(m,N){let O;const D=m.numberOfParams;switch(D){case 0:O=void 0;break;case 1:O=Ne(m.parameterStructures,N[0]);break;default:O=[];for(let fe=0;fe<N.length&&fe<D;fe++)O.push(Dn(N[fe]));if(N.length<D)for(let fe=N.length;fe<D;fe++)O.push(null);break}return O}const V={sendNotification:(m,...N)=>{Mn();let O,D;if(n.string(m)){O=m;const ae=N[0];let ce=0,Ie=r.ParameterStructures.auto;r.ParameterStructures.is(ae)&&(ce=1,Ie=ae);let Z=N.length;const ve=Z-ce;switch(ve){case 0:D=void 0;break;case 1:D=Ne(Ie,N[ce]);break;default:if(Ie===r.ParameterStructures.byName)throw new Error(`Received ${ve} parameters for 'by Name' notification parameter structure.`);D=N.slice(ce,Z).map(ie=>Dn(ie));break}}else{const ae=N;O=m.method,D=Pe(m,ae)}const fe={jsonrpc:z,method:O,params:D};return za(fe),w.write(fe).catch(ae=>{throw S.error("Sending notification failed."),ae})},onNotification:(m,N)=>{Mn();let O;return n.func(m)?B=m:N&&(n.string(m)?(O=m,re.set(m,{type:void 0,handler:N})):(O=m.method,re.set(m.method,{type:m,handler:N}))),{dispose:()=>{O!==void 0?re.delete(O):B=void 0}}},onProgress:(m,N,O)=>{if(je.has(N))throw new Error(`Progress handler for token ${N} already registered`);return je.set(N,O),{dispose:()=>{je.delete(N)}}},sendProgress:(m,N,O)=>V.sendNotification(u.type,{token:N,value:O}),onUnhandledProgress:Qi.event,sendRequest:(m,...N)=>{Mn(),Ka();let O,D,fe;if(n.string(m)){O=m;const Z=N[0],ve=N[N.length-1];let ie=0,Me=r.ParameterStructures.auto;r.ParameterStructures.is(Z)&&(ie=1,Me=Z);let Je=N.length;a.CancellationToken.is(ve)&&(Je=Je-1,fe=ve);const Dt=Je-ie;switch(Dt){case 0:D=void 0;break;case 1:D=Ne(Me,N[ie]);break;default:if(Me===r.ParameterStructures.byName)throw new Error(`Received ${Dt} parameters for 'by Name' request parameter structure.`);D=N.slice(ie,Je).map(lv=>Dn(lv));break}}else{const Z=N;O=m.method,D=Pe(m,Z);const ve=m.numberOfParams;fe=a.CancellationToken.is(Z[ve])?Z[ve]:void 0}const ae=L++;let ce;fe&&(ce=fe.onCancellationRequested(()=>{const Z=bt.sender.sendCancellation(V,ae);return Z===void 0?(S.log(`Received no promise from cancellation strategy when cancelling id ${ae}`),Promise.resolve()):Z.catch(()=>{S.log(`Sending cancellation messages for id ${ae} failed`)})}));const Ie={jsonrpc:z,id:ae,method:O,params:D};return Ua(Ie),typeof bt.sender.enableCancellation=="function"&&bt.sender.enableCancellation(Ie),new Promise(async(Z,ve)=>{const ie=Dt=>{Z(Dt),bt.sender.cleanup(ae),ce==null||ce.dispose()},Me=Dt=>{ve(Dt),bt.sender.cleanup(ae),ce==null||ce.dispose()},Je={method:O,timerStart:Date.now(),resolve:ie,reject:Me};try{await w.write(Ie),xe.set(ae,Je)}catch(Dt){throw S.error("Sending request failed."),Je.reject(new r.ResponseError(r.ErrorCodes.MessageWriteError,Dt.message?Dt.message:"Unknown reason")),Dt}})},onRequest:(m,N)=>{Mn();let O=null;return f.is(m)?(O=void 0,F=m):n.string(m)?(O=null,N!==void 0&&(O=m,se.set(m,{handler:N,type:void 0}))):N!==void 0&&(O=m.method,se.set(m.method,{type:m,handler:N})),{dispose:()=>{O!==null&&(O!==void 0?se.delete(O):F=void 0)}}},hasPendingResponse:()=>xe.size>0,trace:async(m,N,O)=>{let D=!1,fe=y.Text;O!==void 0&&(n.boolean(O)?D=O:(D=O.sendNotification||!1,fe=O.traceFormat||y.Text)),ee=m,lt=fe,ee===d.Off?be=void 0:be=N,D&&!rs()&&!Zt()&&await V.sendNotification(E.type,{value:d.toString(m)})},onError:Kr.event,onClose:Ji.event,onUnhandledNotification:Zi.event,onDispose:es.event,end:()=>{w.end()},dispose:()=>{if(Zt())return;St=P.Disposed,es.fire(void 0);const m=new r.ResponseError(r.ErrorCodes.PendingResponseRejected,"Pending response rejected since connection got disposed");for(const N of xe.values())N.reject(m);xe=new Map,Oe=new Map,Ue=new Set,Te=new i.LinkedMap,n.func(w.dispose)&&w.dispose(),n.func(g.dispose)&&g.dispose()},listen:()=>{Mn(),Wa(),St=P.Listening,g.listen(Ma)},inspect:()=>{(0,e.default)().console.log("inspect")}};return V.onNotification(C.type,m=>{if(ee===d.Off||!be)return;const N=ee===d.Verbose||ee===d.Compact;be.log(m.message,N?m.verbose:void 0)}),V.onNotification(u.type,m=>{const N=je.get(m.token);N?N(m.value):Qi.fire(m)}),V}t.createMessageConnection=$}(vu)),vu}var rm;function yf(){return rm||(rm=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=FT();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=GT();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=PM();Object.defineProperty(t,"Disposable",{enumerable:!0,get:function(){return r.Disposable}});const i=Yi();Object.defineProperty(t,"Event",{enumerable:!0,get:function(){return i.Event}}),Object.defineProperty(t,"Emitter",{enumerable:!0,get:function(){return i.Emitter}});const s=Kc();Object.defineProperty(t,"CancellationTokenSource",{enumerable:!0,get:function(){return s.CancellationTokenSource}}),Object.defineProperty(t,"CancellationToken",{enumerable:!0,get:function(){return s.CancellationToken}});const a=IM();Object.defineProperty(t,"SharedArraySenderStrategy",{enumerable:!0,get:function(){return a.SharedArraySenderStrategy}}),Object.defineProperty(t,"SharedArrayReceiverStrategy",{enumerable:!0,get:function(){return a.SharedArrayReceiverStrategy}});const o=kM();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=OM();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 u=LM();Object.defineProperty(t,"AbstractMessageBuffer",{enumerable:!0,get:function(){return u.AbstractMessageBuffer}});const l=xM();Object.defineProperty(t,"ConnectionStrategy",{enumerable:!0,get:function(){return l.ConnectionStrategy}}),Object.defineProperty(t,"ConnectionOptions",{enumerable:!0,get:function(){return l.ConnectionOptions}}),Object.defineProperty(t,"NullLogger",{enumerable:!0,get:function(){return l.NullLogger}}),Object.defineProperty(t,"createMessageConnection",{enumerable:!0,get:function(){return l.createMessageConnection}}),Object.defineProperty(t,"ProgressToken",{enumerable:!0,get:function(){return l.ProgressToken}}),Object.defineProperty(t,"ProgressType",{enumerable:!0,get:function(){return l.ProgressType}}),Object.defineProperty(t,"Trace",{enumerable:!0,get:function(){return l.Trace}}),Object.defineProperty(t,"TraceValues",{enumerable:!0,get:function(){return l.TraceValues}}),Object.defineProperty(t,"TraceFormat",{enumerable:!0,get:function(){return l.TraceFormat}}),Object.defineProperty(t,"SetTraceNotification",{enumerable:!0,get:function(){return l.SetTraceNotification}}),Object.defineProperty(t,"LogTraceNotification",{enumerable:!0,get:function(){return l.LogTraceNotification}}),Object.defineProperty(t,"ConnectionErrors",{enumerable:!0,get:function(){return l.ConnectionErrors}}),Object.defineProperty(t,"ConnectionError",{enumerable:!0,get:function(){return l.ConnectionError}}),Object.defineProperty(t,"CancellationReceiverStrategy",{enumerable:!0,get:function(){return l.CancellationReceiverStrategy}}),Object.defineProperty(t,"CancellationSenderStrategy",{enumerable:!0,get:function(){return l.CancellationSenderStrategy}}),Object.defineProperty(t,"CancellationStrategy",{enumerable:!0,get:function(){return l.CancellationStrategy}}),Object.defineProperty(t,"MessageStrategy",{enumerable:!0,get:function(){return l.MessageStrategy}});const f=qr();t.RAL=f.default}(Tu)),Tu}var im;function MM(){if(im)return so;im=1,Object.defineProperty(so,"__esModule",{value:!0});const t=yf();class e extends t.AbstractMessageBuffer{constructor(c="utf-8"){super(c),this.asciiDecoder=new TextDecoder("ascii")}emptyBuffer(){return e.emptyBuffer}fromString(c,u){return new TextEncoder().encode(c)}toString(c,u){return u==="ascii"?this.asciiDecoder.decode(c):new TextDecoder(u).decode(c)}asNative(c,u){return u===void 0?c:c.slice(0,u)}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=u=>{u.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,u){if(typeof c=="string"){if(u!==void 0&&u!=="utf-8")throw new Error(`In a Browser environments only utf-8 text encoding is supported. But got encoding: ${u}`);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,...u){const l=setTimeout(o,c,...u);return{dispose:()=>clearTimeout(l)}},setImmediate(o,...c){const u=setTimeout(o,0,...c);return{dispose:()=>clearTimeout(u)}},setInterval(o,c,...u){const l=setInterval(o,c,...u);return{dispose:()=>clearInterval(l)}}})});function a(){return s}return function(o){function c(){t.RAL.install(s)}o.install=c}(a||(a={})),so.default=a,so}var sm;function Xi(){return sm||(sm=1,function(t){var e=ur&&ur.__createBinding||(Object.create?function(c,u,l,f){f===void 0&&(f=l);var d=Object.getOwnPropertyDescriptor(u,l);(!d||("get"in d?!u.__esModule:d.writable||d.configurable))&&(d={enumerable:!0,get:function(){return u[l]}}),Object.defineProperty(c,f,d)}:function(c,u,l,f){f===void 0&&(f=l),c[f]=u[l]}),n=ur&&ur.__exportStar||function(c,u){for(var l in c)l!=="default"&&!Object.prototype.hasOwnProperty.call(u,l)&&e(u,c,l)};Object.defineProperty(t,"__esModule",{value:!0}),t.createMessageConnection=t.BrowserMessageWriter=t.BrowserMessageReader=void 0,MM().default.install();const i=yf();n(yf(),t);class s extends i.AbstractMessageReader{constructor(u){super(),this._onData=new i.Emitter,this._messageListener=l=>{this._onData.fire(l.data)},u.addEventListener("error",l=>this.fireError(l)),u.onmessage=this._messageListener}listen(u){return this._onData.event(u)}}t.BrowserMessageReader=s;class a extends i.AbstractMessageWriter{constructor(u){super(),this.port=u,this.errorCount=0,u.addEventListener("error",l=>this.fireError(l))}write(u){try{return this.port.postMessage(u),Promise.resolve()}catch(l){return this.handleError(l,u),Promise.reject(l)}}handleError(u,l){this.errorCount++,this.fireError(u,l,this.errorCount)}end(){}}t.BrowserMessageWriter=a;function o(c,u,l,f){return l===void 0&&(l=i.NullLogger),i.ConnectionStrategy.is(f)&&(f={connectionStrategy:f}),(0,i.createMessageConnection)(c,u,l,f)}t.createMessageConnection=o}(ur)),ur}var $u,am;function om(){return am||(am=1,$u=Xi()),$u}var fr={};const wd=hv(L1);var Ze={},cm;function _e(){if(cm)return Ze;cm=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.ProtocolNotificationType=Ze.ProtocolNotificationType0=Ze.ProtocolRequestType=Ze.ProtocolRequestType0=Ze.RegistrationType=Ze.MessageDirection=void 0;const t=Xi();var e;(function(o){o.clientToServer="clientToServer",o.serverToClient="serverToClient",o.both="both"})(e||(Ze.MessageDirection=e={}));class n{constructor(c){this.method=c}}Ze.RegistrationType=n;class r extends t.RequestType0{constructor(c){super(c)}}Ze.ProtocolRequestType0=r;class i extends t.RequestType{constructor(c){super(c,t.ParameterStructures.byName)}}Ze.ProtocolRequestType=i;class s extends t.NotificationType0{constructor(c){super(c)}}Ze.ProtocolNotificationType0=s;class a extends t.NotificationType{constructor(c){super(c,t.ParameterStructures.byName)}}return Ze.ProtocolNotificationType=a,Ze}var Ru={},ke={},um;function Cd(){if(um)return ke;um=1,Object.defineProperty(ke,"__esModule",{value:!0}),ke.objectLiteral=ke.typedArray=ke.stringArray=ke.array=ke.func=ke.error=ke.number=ke.string=ke.boolean=void 0;function t(u){return u===!0||u===!1}ke.boolean=t;function e(u){return typeof u=="string"||u instanceof String}ke.string=e;function n(u){return typeof u=="number"||u instanceof Number}ke.number=n;function r(u){return u instanceof Error}ke.error=r;function i(u){return typeof u=="function"}ke.func=i;function s(u){return Array.isArray(u)}ke.array=s;function a(u){return s(u)&&u.every(l=>e(l))}ke.stringArray=a;function o(u,l){return Array.isArray(u)&&u.every(l)}ke.typedArray=o;function c(u){return u!==null&&typeof u=="object"}return ke.objectLiteral=c,ke}var Rs={},lm;function DM(){if(lm)return Rs;lm=1,Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.ImplementationRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/implementation",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Rs.ImplementationRequest=e={})),Rs}var Es={},fm;function FM(){if(fm)return Es;fm=1,Object.defineProperty(Es,"__esModule",{value:!0}),Es.TypeDefinitionRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/typeDefinition",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Es.TypeDefinitionRequest=e={})),Es}var dr={},dm;function GM(){if(dm)return dr;dm=1,Object.defineProperty(dr,"__esModule",{value:!0}),dr.DidChangeWorkspaceFoldersNotification=dr.WorkspaceFoldersRequest=void 0;const t=_e();var e;(function(r){r.method="workspace/workspaceFolders",r.messageDirection=t.MessageDirection.serverToClient,r.type=new t.ProtocolRequestType0(r.method)})(e||(dr.WorkspaceFoldersRequest=e={}));var n;return function(r){r.method="workspace/didChangeWorkspaceFolders",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolNotificationType(r.method)}(n||(dr.DidChangeWorkspaceFoldersNotification=n={})),dr}var As={},hm;function jM(){if(hm)return As;hm=1,Object.defineProperty(As,"__esModule",{value:!0}),As.ConfigurationRequest=void 0;const t=_e();var e;return function(n){n.method="workspace/configuration",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(As.ConfigurationRequest=e={})),As}var hr={},pm;function UM(){if(pm)return hr;pm=1,Object.defineProperty(hr,"__esModule",{value:!0}),hr.ColorPresentationRequest=hr.DocumentColorRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/documentColor",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(hr.DocumentColorRequest=e={}));var n;return function(r){r.method="textDocument/colorPresentation",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)}(n||(hr.ColorPresentationRequest=n={})),hr}var pr={},mm;function zM(){if(mm)return pr;mm=1,Object.defineProperty(pr,"__esModule",{value:!0}),pr.FoldingRangeRefreshRequest=pr.FoldingRangeRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/foldingRange",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(pr.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||(pr.FoldingRangeRefreshRequest=n={})),pr}var _s={},gm;function qM(){if(gm)return _s;gm=1,Object.defineProperty(_s,"__esModule",{value:!0}),_s.DeclarationRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/declaration",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(_s.DeclarationRequest=e={})),_s}var Ss={},ym;function BM(){if(ym)return Ss;ym=1,Object.defineProperty(Ss,"__esModule",{value:!0}),Ss.SelectionRangeRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/selectionRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Ss.SelectionRangeRequest=e={})),Ss}var rn={},Tm;function WM(){if(Tm)return rn;Tm=1,Object.defineProperty(rn,"__esModule",{value:!0}),rn.WorkDoneProgressCancelNotification=rn.WorkDoneProgressCreateRequest=rn.WorkDoneProgress=void 0;const t=Xi(),e=_e();var n;(function(s){s.type=new t.ProgressType;function a(o){return o===s.type}s.is=a})(n||(rn.WorkDoneProgress=n={}));var r;(function(s){s.method="window/workDoneProgress/create",s.messageDirection=e.MessageDirection.serverToClient,s.type=new e.ProtocolRequestType(s.method)})(r||(rn.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||(rn.WorkDoneProgressCancelNotification=i={})),rn}var sn={},vm;function KM(){if(vm)return sn;vm=1,Object.defineProperty(sn,"__esModule",{value:!0}),sn.CallHierarchyOutgoingCallsRequest=sn.CallHierarchyIncomingCallsRequest=sn.CallHierarchyPrepareRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/prepareCallHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(sn.CallHierarchyPrepareRequest=e={}));var n;(function(i){i.method="callHierarchy/incomingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(sn.CallHierarchyIncomingCallsRequest=n={}));var r;return function(i){i.method="callHierarchy/outgoingCalls",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(sn.CallHierarchyOutgoingCallsRequest=r={})),sn}var Qe={},$m;function VM(){if($m)return Qe;$m=1,Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.SemanticTokensRefreshRequest=Qe.SemanticTokensRangeRequest=Qe.SemanticTokensDeltaRequest=Qe.SemanticTokensRequest=Qe.SemanticTokensRegistrationType=Qe.TokenFormat=void 0;const t=_e();var e;(function(o){o.Relative="relative"})(e||(Qe.TokenFormat=e={}));var n;(function(o){o.method="textDocument/semanticTokens",o.type=new t.RegistrationType(o.method)})(n||(Qe.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||(Qe.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||(Qe.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||(Qe.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||(Qe.SemanticTokensRefreshRequest=a={})),Qe}var bs={},Rm;function HM(){if(Rm)return bs;Rm=1,Object.defineProperty(bs,"__esModule",{value:!0}),bs.ShowDocumentRequest=void 0;const t=_e();var e;return function(n){n.method="window/showDocument",n.messageDirection=t.MessageDirection.serverToClient,n.type=new t.ProtocolRequestType(n.method)}(e||(bs.ShowDocumentRequest=e={})),bs}var ws={},Em;function YM(){if(Em)return ws;Em=1,Object.defineProperty(ws,"__esModule",{value:!0}),ws.LinkedEditingRangeRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/linkedEditingRange",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(ws.LinkedEditingRangeRequest=e={})),ws}var qe={},Am;function XM(){if(Am)return qe;Am=1,Object.defineProperty(qe,"__esModule",{value:!0}),qe.WillDeleteFilesRequest=qe.DidDeleteFilesNotification=qe.DidRenameFilesNotification=qe.WillRenameFilesRequest=qe.DidCreateFilesNotification=qe.WillCreateFilesRequest=qe.FileOperationPatternKind=void 0;const t=_e();var e;(function(c){c.file="file",c.folder="folder"})(e||(qe.FileOperationPatternKind=e={}));var n;(function(c){c.method="workspace/willCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(n||(qe.WillCreateFilesRequest=n={}));var r;(function(c){c.method="workspace/didCreateFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(r||(qe.DidCreateFilesNotification=r={}));var i;(function(c){c.method="workspace/willRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)})(i||(qe.WillRenameFilesRequest=i={}));var s;(function(c){c.method="workspace/didRenameFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(s||(qe.DidRenameFilesNotification=s={}));var a;(function(c){c.method="workspace/didDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolNotificationType(c.method)})(a||(qe.DidDeleteFilesNotification=a={}));var o;return function(c){c.method="workspace/willDeleteFiles",c.messageDirection=t.MessageDirection.clientToServer,c.type=new t.ProtocolRequestType(c.method)}(o||(qe.WillDeleteFilesRequest=o={})),qe}var an={},_m;function JM(){if(_m)return an;_m=1,Object.defineProperty(an,"__esModule",{value:!0}),an.MonikerRequest=an.MonikerKind=an.UniquenessLevel=void 0;const t=_e();var e;(function(i){i.document="document",i.project="project",i.group="group",i.scheme="scheme",i.global="global"})(e||(an.UniquenessLevel=e={}));var n;(function(i){i.$import="import",i.$export="export",i.local="local"})(n||(an.MonikerKind=n={}));var r;return function(i){i.method="textDocument/moniker",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(an.MonikerRequest=r={})),an}var on={},Sm;function ZM(){if(Sm)return on;Sm=1,Object.defineProperty(on,"__esModule",{value:!0}),on.TypeHierarchySubtypesRequest=on.TypeHierarchySupertypesRequest=on.TypeHierarchyPrepareRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/prepareTypeHierarchy",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(on.TypeHierarchyPrepareRequest=e={}));var n;(function(i){i.method="typeHierarchy/supertypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(on.TypeHierarchySupertypesRequest=n={}));var r;return function(i){i.method="typeHierarchy/subtypes",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)}(r||(on.TypeHierarchySubtypesRequest=r={})),on}var mr={},bm;function QM(){if(bm)return mr;bm=1,Object.defineProperty(mr,"__esModule",{value:!0}),mr.InlineValueRefreshRequest=mr.InlineValueRequest=void 0;const t=_e();var e;(function(r){r.method="textDocument/inlineValue",r.messageDirection=t.MessageDirection.clientToServer,r.type=new t.ProtocolRequestType(r.method)})(e||(mr.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||(mr.InlineValueRefreshRequest=n={})),mr}var cn={},wm;function eD(){if(wm)return cn;wm=1,Object.defineProperty(cn,"__esModule",{value:!0}),cn.InlayHintRefreshRequest=cn.InlayHintResolveRequest=cn.InlayHintRequest=void 0;const t=_e();var e;(function(i){i.method="textDocument/inlayHint",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(e||(cn.InlayHintRequest=e={}));var n;(function(i){i.method="inlayHint/resolve",i.messageDirection=t.MessageDirection.clientToServer,i.type=new t.ProtocolRequestType(i.method)})(n||(cn.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||(cn.InlayHintRefreshRequest=r={})),cn}var ft={},Cm;function tD(){if(Cm)return ft;Cm=1,Object.defineProperty(ft,"__esModule",{value:!0}),ft.DiagnosticRefreshRequest=ft.WorkspaceDiagnosticRequest=ft.DocumentDiagnosticRequest=ft.DocumentDiagnosticReportKind=ft.DiagnosticServerCancellationData=void 0;const t=Xi(),e=Cd(),n=_e();var r;(function(c){function u(l){const f=l;return f&&e.boolean(f.retriggerRequest)}c.is=u})(r||(ft.DiagnosticServerCancellationData=r={}));var i;(function(c){c.Full="full",c.Unchanged="unchanged"})(i||(ft.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||(ft.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||(ft.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||(ft.DiagnosticRefreshRequest=o={})),ft}var $e={},Nm;function nD(){if(Nm)return $e;Nm=1,Object.defineProperty($e,"__esModule",{value:!0}),$e.DidCloseNotebookDocumentNotification=$e.DidSaveNotebookDocumentNotification=$e.DidChangeNotebookDocumentNotification=$e.NotebookCellArrayChange=$e.DidOpenNotebookDocumentNotification=$e.NotebookDocumentSyncRegistrationType=$e.NotebookDocument=$e.NotebookCell=$e.ExecutionSummary=$e.NotebookCellKind=void 0;const t=wd,e=Cd(),n=_e();var r;(function(p){p.Markup=1,p.Code=2;function y(E){return E===1||E===2}p.is=y})(r||($e.NotebookCellKind=r={}));var i;(function(p){function y(A,_){const b={executionOrder:A};return(_===!0||_===!1)&&(b.success=_),b}p.create=y;function E(A){const _=A;return e.objectLiteral(_)&&t.uinteger.is(_.executionOrder)&&(_.success===void 0||e.boolean(_.success))}p.is=E;function C(A,_){return A===_?!0:A==null||_===null||_===void 0?!1:A.executionOrder===_.executionOrder&&A.success===_.success}p.equals=C})(i||($e.ExecutionSummary=i={}));var s;(function(p){function y(_,b){return{kind:_,document:b}}p.create=y;function E(_){const b=_;return e.objectLiteral(b)&&r.is(b.kind)&&t.DocumentUri.is(b.document)&&(b.metadata===void 0||e.objectLiteral(b.metadata))}p.is=E;function C(_,b){const I=new Set;return _.document!==b.document&&I.add("document"),_.kind!==b.kind&&I.add("kind"),_.executionSummary!==b.executionSummary&&I.add("executionSummary"),(_.metadata!==void 0||b.metadata!==void 0)&&!A(_.metadata,b.metadata)&&I.add("metadata"),(_.executionSummary!==void 0||b.executionSummary!==void 0)&&!i.equals(_.executionSummary,b.executionSummary)&&I.add("executionSummary"),I}p.diff=C;function A(_,b){if(_===b)return!0;if(_==null||b===null||b===void 0||typeof _!=typeof b||typeof _!="object")return!1;const I=Array.isArray(_),U=Array.isArray(b);if(I!==U)return!1;if(I&&U){if(_.length!==b.length)return!1;for(let H=0;H<_.length;H++)if(!A(_[H],b[H]))return!1}if(e.objectLiteral(_)&&e.objectLiteral(b)){const H=Object.keys(_),J=Object.keys(b);if(H.length!==J.length||(H.sort(),J.sort(),!A(H,J)))return!1;for(let oe=0;oe<H.length;oe++){const ge=H[oe];if(!A(_[ge],b[ge]))return!1}}return!0}})(s||($e.NotebookCell=s={}));var a;(function(p){function y(C,A,_,b){return{uri:C,notebookType:A,version:_,cells:b}}p.create=y;function E(C){const A=C;return e.objectLiteral(A)&&e.string(A.uri)&&t.integer.is(A.version)&&e.typedArray(A.cells,s.is)}p.is=E})(a||($e.NotebookDocument=a={}));var o;(function(p){p.method="notebookDocument/sync",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.RegistrationType(p.method)})(o||($e.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||($e.DidOpenNotebookDocumentNotification=c={}));var u;(function(p){function y(C){const A=C;return e.objectLiteral(A)&&t.uinteger.is(A.start)&&t.uinteger.is(A.deleteCount)&&(A.cells===void 0||e.typedArray(A.cells,s.is))}p.is=y;function E(C,A,_){const b={start:C,deleteCount:A};return _!==void 0&&(b.cells=_),b}p.create=E})(u||($e.NotebookCellArrayChange=u={}));var l;(function(p){p.method="notebookDocument/didChange",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method})(l||($e.DidChangeNotebookDocumentNotification=l={}));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||($e.DidSaveNotebookDocumentNotification=f={}));var d;return function(p){p.method="notebookDocument/didClose",p.messageDirection=n.MessageDirection.clientToServer,p.type=new n.ProtocolNotificationType(p.method),p.registrationMethod=o.method}(d||($e.DidCloseNotebookDocumentNotification=d={})),$e}var Cs={},Pm;function rD(){if(Pm)return Cs;Pm=1,Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.InlineCompletionRequest=void 0;const t=_e();var e;return function(n){n.method="textDocument/inlineCompletion",n.messageDirection=t.MessageDirection.clientToServer,n.type=new t.ProtocolRequestType(n.method)}(e||(Cs.InlineCompletionRequest=e={})),Cs}var Im;function iD(){return Im||(Im=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=_e(),n=wd,r=Cd(),i=DM();Object.defineProperty(t,"ImplementationRequest",{enumerable:!0,get:function(){return i.ImplementationRequest}});const s=FM();Object.defineProperty(t,"TypeDefinitionRequest",{enumerable:!0,get:function(){return s.TypeDefinitionRequest}});const a=GM();Object.defineProperty(t,"WorkspaceFoldersRequest",{enumerable:!0,get:function(){return a.WorkspaceFoldersRequest}}),Object.defineProperty(t,"DidChangeWorkspaceFoldersNotification",{enumerable:!0,get:function(){return a.DidChangeWorkspaceFoldersNotification}});const o=jM();Object.defineProperty(t,"ConfigurationRequest",{enumerable:!0,get:function(){return o.ConfigurationRequest}});const c=UM();Object.defineProperty(t,"DocumentColorRequest",{enumerable:!0,get:function(){return c.DocumentColorRequest}}),Object.defineProperty(t,"ColorPresentationRequest",{enumerable:!0,get:function(){return c.ColorPresentationRequest}});const u=zM();Object.defineProperty(t,"FoldingRangeRequest",{enumerable:!0,get:function(){return u.FoldingRangeRequest}}),Object.defineProperty(t,"FoldingRangeRefreshRequest",{enumerable:!0,get:function(){return u.FoldingRangeRefreshRequest}});const l=qM();Object.defineProperty(t,"DeclarationRequest",{enumerable:!0,get:function(){return l.DeclarationRequest}});const f=BM();Object.defineProperty(t,"SelectionRangeRequest",{enumerable:!0,get:function(){return f.SelectionRangeRequest}});const d=WM();Object.defineProperty(t,"WorkDoneProgress",{enumerable:!0,get:function(){return d.WorkDoneProgress}}),Object.defineProperty(t,"WorkDoneProgressCreateRequest",{enumerable:!0,get:function(){return d.WorkDoneProgressCreateRequest}}),Object.defineProperty(t,"WorkDoneProgressCancelNotification",{enumerable:!0,get:function(){return d.WorkDoneProgressCancelNotification}});const p=KM();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 y=VM();Object.defineProperty(t,"TokenFormat",{enumerable:!0,get:function(){return y.TokenFormat}}),Object.defineProperty(t,"SemanticTokensRequest",{enumerable:!0,get:function(){return y.SemanticTokensRequest}}),Object.defineProperty(t,"SemanticTokensDeltaRequest",{enumerable:!0,get:function(){return y.SemanticTokensDeltaRequest}}),Object.defineProperty(t,"SemanticTokensRangeRequest",{enumerable:!0,get:function(){return y.SemanticTokensRangeRequest}}),Object.defineProperty(t,"SemanticTokensRefreshRequest",{enumerable:!0,get:function(){return y.SemanticTokensRefreshRequest}}),Object.defineProperty(t,"SemanticTokensRegistrationType",{enumerable:!0,get:function(){return y.SemanticTokensRegistrationType}});const E=HM();Object.defineProperty(t,"ShowDocumentRequest",{enumerable:!0,get:function(){return E.ShowDocumentRequest}});const C=YM();Object.defineProperty(t,"LinkedEditingRangeRequest",{enumerable:!0,get:function(){return C.LinkedEditingRangeRequest}});const A=XM();Object.defineProperty(t,"FileOperationPatternKind",{enumerable:!0,get:function(){return A.FileOperationPatternKind}}),Object.defineProperty(t,"DidCreateFilesNotification",{enumerable:!0,get:function(){return A.DidCreateFilesNotification}}),Object.defineProperty(t,"WillCreateFilesRequest",{enumerable:!0,get:function(){return A.WillCreateFilesRequest}}),Object.defineProperty(t,"DidRenameFilesNotification",{enumerable:!0,get:function(){return A.DidRenameFilesNotification}}),Object.defineProperty(t,"WillRenameFilesRequest",{enumerable:!0,get:function(){return A.WillRenameFilesRequest}}),Object.defineProperty(t,"DidDeleteFilesNotification",{enumerable:!0,get:function(){return A.DidDeleteFilesNotification}}),Object.defineProperty(t,"WillDeleteFilesRequest",{enumerable:!0,get:function(){return A.WillDeleteFilesRequest}});const _=JM();Object.defineProperty(t,"UniquenessLevel",{enumerable:!0,get:function(){return _.UniquenessLevel}}),Object.defineProperty(t,"MonikerKind",{enumerable:!0,get:function(){return _.MonikerKind}}),Object.defineProperty(t,"MonikerRequest",{enumerable:!0,get:function(){return _.MonikerRequest}});const b=ZM();Object.defineProperty(t,"TypeHierarchyPrepareRequest",{enumerable:!0,get:function(){return b.TypeHierarchyPrepareRequest}}),Object.defineProperty(t,"TypeHierarchySubtypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySubtypesRequest}}),Object.defineProperty(t,"TypeHierarchySupertypesRequest",{enumerable:!0,get:function(){return b.TypeHierarchySupertypesRequest}});const I=QM();Object.defineProperty(t,"InlineValueRequest",{enumerable:!0,get:function(){return I.InlineValueRequest}}),Object.defineProperty(t,"InlineValueRefreshRequest",{enumerable:!0,get:function(){return I.InlineValueRefreshRequest}});const U=eD();Object.defineProperty(t,"InlayHintRequest",{enumerable:!0,get:function(){return U.InlayHintRequest}}),Object.defineProperty(t,"InlayHintResolveRequest",{enumerable:!0,get:function(){return U.InlayHintResolveRequest}}),Object.defineProperty(t,"InlayHintRefreshRequest",{enumerable:!0,get:function(){return U.InlayHintRefreshRequest}});const H=tD();Object.defineProperty(t,"DiagnosticServerCancellationData",{enumerable:!0,get:function(){return H.DiagnosticServerCancellationData}}),Object.defineProperty(t,"DocumentDiagnosticReportKind",{enumerable:!0,get:function(){return H.DocumentDiagnosticReportKind}}),Object.defineProperty(t,"DocumentDiagnosticRequest",{enumerable:!0,get:function(){return H.DocumentDiagnosticRequest}}),Object.defineProperty(t,"WorkspaceDiagnosticRequest",{enumerable:!0,get:function(){return H.WorkspaceDiagnosticRequest}}),Object.defineProperty(t,"DiagnosticRefreshRequest",{enumerable:!0,get:function(){return H.DiagnosticRefreshRequest}});const J=nD();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=rD();Object.defineProperty(t,"InlineCompletionRequest",{enumerable:!0,get:function(){return oe.InlineCompletionRequest}});var ge;(function(h){function Ne(Pe){const V=Pe;return r.string(V)||r.string(V.language)||r.string(V.scheme)||r.string(V.pattern)}h.is=Ne})(ge||(t.TextDocumentFilter=ge={}));var ye;(function(h){function Ne(Pe){const V=Pe;return r.objectLiteral(V)&&(r.string(V.notebookType)||r.string(V.scheme)||r.string(V.pattern))}h.is=Ne})(ye||(t.NotebookDocumentFilter=ye={}));var P;(function(h){function Ne(Pe){const V=Pe;return r.objectLiteral(V)&&(r.string(V.notebook)||ye.is(V.notebook))&&(V.language===void 0||r.string(V.language))}h.is=Ne})(P||(t.NotebookCellTextDocumentFilter=P={}));var $;(function(h){function Ne(Pe){if(!Array.isArray(Pe))return!1;for(let V of Pe)if(!r.string(V)&&!ge.is(V)&&!P.is(V))return!1;return!0}h.is=Ne})($||(t.DocumentSelector=$={}));var g;(function(h){h.method="client/registerCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(g||(t.RegistrationRequest=g={}));var w;(function(h){h.method="client/unregisterCapability",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(w||(t.UnregistrationRequest=w={}));var T;(function(h){h.Create="create",h.Rename="rename",h.Delete="delete"})(T||(t.ResourceOperationKind=T={}));var v;(function(h){h.Abort="abort",h.Transactional="transactional",h.TextOnlyTransactional="textOnlyTransactional",h.Undo="undo"})(v||(t.FailureHandlingKind=v={}));var S;(function(h){h.UTF8="utf-8",h.UTF16="utf-16",h.UTF32="utf-32"})(S||(t.PositionEncodingKind=S={}));var L;(function(h){function Ne(Pe){const V=Pe;return V&&r.string(V.id)&&V.id.length>0}h.hasId=Ne})(L||(t.StaticRegistrationOptions=L={}));var M;(function(h){function Ne(Pe){const V=Pe;return V&&(V.documentSelector===null||$.is(V.documentSelector))}h.is=Ne})(M||(t.TextDocumentRegistrationOptions=M={}));var x;(function(h){function Ne(V){const m=V;return r.objectLiteral(m)&&(m.workDoneProgress===void 0||r.boolean(m.workDoneProgress))}h.is=Ne;function Pe(V){const m=V;return m&&r.boolean(m.workDoneProgress)}h.hasWorkDoneProgress=Pe})(x||(t.WorkDoneProgressOptions=x={}));var z;(function(h){h.method="initialize",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(z||(t.InitializeRequest=z={}));var F;(function(h){h.unknownProtocolVersion=1})(F||(t.InitializeErrorCodes=F={}));var se;(function(h){h.method="initialized",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(se||(t.InitializedNotification=se={}));var B;(function(h){h.method="shutdown",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType0(h.method)})(B||(t.ShutdownRequest=B={}));var re;(function(h){h.method="exit",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType0(h.method)})(re||(t.ExitNotification=re={}));var je;(function(h){h.method="workspace/didChangeConfiguration",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(je||(t.DidChangeConfigurationNotification=je={}));var Se;(function(h){h.Error=1,h.Warning=2,h.Info=3,h.Log=4,h.Debug=5})(Se||(t.MessageType=Se={}));var Te;(function(h){h.method="window/showMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Te||(t.ShowMessageNotification=Te={}));var xe;(function(h){h.method="window/showMessageRequest",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType(h.method)})(xe||(t.ShowMessageRequest=xe={}));var Ue;(function(h){h.method="window/logMessage",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Ue||(t.LogMessageNotification=Ue={}));var Oe;(function(h){h.method="telemetry/event",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Oe||(t.TelemetryEventNotification=Oe={}));var ee;(function(h){h.None=0,h.Full=1,h.Incremental=2})(ee||(t.TextDocumentSyncKind=ee={}));var lt;(function(h){h.method="textDocument/didOpen",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(lt||(t.DidOpenTextDocumentNotification=lt={}));var be;(function(h){function Ne(V){let m=V;return m!=null&&typeof m.text=="string"&&m.range!==void 0&&(m.rangeLength===void 0||typeof m.rangeLength=="number")}h.isIncremental=Ne;function Pe(V){let m=V;return m!=null&&typeof m.text=="string"&&m.range===void 0&&m.rangeLength===void 0}h.isFull=Pe})(be||(t.TextDocumentContentChangeEvent=be={}));var St;(function(h){h.method="textDocument/didChange",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(St||(t.DidChangeTextDocumentNotification=St={}));var Kr;(function(h){h.method="textDocument/didClose",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Kr||(t.DidCloseTextDocumentNotification=Kr={}));var Ji;(function(h){h.method="textDocument/didSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Ji||(t.DidSaveTextDocumentNotification=Ji={}));var Zi;(function(h){h.Manual=1,h.AfterDelay=2,h.FocusOut=3})(Zi||(t.TextDocumentSaveReason=Zi={}));var Qi;(function(h){h.method="textDocument/willSave",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(Qi||(t.WillSaveTextDocumentNotification=Qi={}));var es;(function(h){h.method="textDocument/willSaveWaitUntil",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(es||(t.WillSaveTextDocumentWaitUntilRequest=es={}));var bt;(function(h){h.method="workspace/didChangeWatchedFiles",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolNotificationType(h.method)})(bt||(t.DidChangeWatchedFilesNotification=bt={}));var ts;(function(h){h.Created=1,h.Changed=2,h.Deleted=3})(ts||(t.FileChangeType=ts={}));var Na;(function(h){function Ne(Pe){const V=Pe;return r.objectLiteral(V)&&(n.URI.is(V.baseUri)||n.WorkspaceFolder.is(V.baseUri))&&r.string(V.pattern)}h.is=Ne})(Na||(t.RelativePattern=Na={}));var Pa;(function(h){h.Create=1,h.Change=2,h.Delete=4})(Pa||(t.WatchKind=Pa={}));var Ia;(function(h){h.method="textDocument/publishDiagnostics",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolNotificationType(h.method)})(Ia||(t.PublishDiagnosticsNotification=Ia={}));var ka;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.TriggerForIncompleteCompletions=3})(ka||(t.CompletionTriggerKind=ka={}));var ns;(function(h){h.method="textDocument/completion",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ns||(t.CompletionRequest=ns={}));var rs;(function(h){h.method="completionItem/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rs||(t.CompletionResolveRequest=rs={}));var Zt;(function(h){h.method="textDocument/hover",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Zt||(t.HoverRequest=Zt={}));var is;(function(h){h.Invoked=1,h.TriggerCharacter=2,h.ContentChange=3})(is||(t.SignatureHelpTriggerKind=is={}));var Oa;(function(h){h.method="textDocument/signatureHelp",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Oa||(t.SignatureHelpRequest=Oa={}));var La;(function(h){h.method="textDocument/definition",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(La||(t.DefinitionRequest=La={}));var ss;(function(h){h.method="textDocument/references",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ss||(t.ReferencesRequest=ss={}));var as;(function(h){h.method="textDocument/documentHighlight",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(as||(t.DocumentHighlightRequest=as={}));var xa;(function(h){h.method="textDocument/documentSymbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(xa||(t.DocumentSymbolRequest=xa={}));var Ma;(function(h){h.method="textDocument/codeAction",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ma||(t.CodeActionRequest=Ma={}));var Da;(function(h){h.method="codeAction/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Da||(t.CodeActionResolveRequest=Da={}));var Fa;(function(h){h.method="workspace/symbol",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Fa||(t.WorkspaceSymbolRequest=Fa={}));var Ga;(function(h){h.method="workspaceSymbol/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ga||(t.WorkspaceSymbolResolveRequest=Ga={}));var ja;(function(h){h.method="textDocument/codeLens",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(ja||(t.CodeLensRequest=ja={}));var wt;(function(h){h.method="codeLens/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(wt||(t.CodeLensResolveRequest=wt={}));var Ua;(function(h){h.method="workspace/codeLens/refresh",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType0(h.method)})(Ua||(t.CodeLensRefreshRequest=Ua={}));var za;(function(h){h.method="textDocument/documentLink",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(za||(t.DocumentLinkRequest=za={}));var rr;(function(h){h.method="documentLink/resolve",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(rr||(t.DocumentLinkResolveRequest=rr={}));var qa;(function(h){h.method="textDocument/formatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(qa||(t.DocumentFormattingRequest=qa={}));var Vr;(function(h){h.method="textDocument/rangeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Vr||(t.DocumentRangeFormattingRequest=Vr={}));var Ba;(function(h){h.method="textDocument/rangesFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ba||(t.DocumentRangesFormattingRequest=Ba={}));var Qt;(function(h){h.method="textDocument/onTypeFormatting",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Qt||(t.DocumentOnTypeFormattingRequest=Qt={}));var Mn;(function(h){h.Identifier=1})(Mn||(t.PrepareSupportDefaultBehavior=Mn={}));var Wa;(function(h){h.method="textDocument/rename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Wa||(t.RenameRequest=Wa={}));var Ka;(function(h){h.method="textDocument/prepareRename",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Ka||(t.PrepareRenameRequest=Ka={}));var Dn;(function(h){h.method="workspace/executeCommand",h.messageDirection=e.MessageDirection.clientToServer,h.type=new e.ProtocolRequestType(h.method)})(Dn||(t.ExecuteCommandRequest=Dn={}));var os;(function(h){h.method="workspace/applyEdit",h.messageDirection=e.MessageDirection.serverToClient,h.type=new e.ProtocolRequestType("workspace/applyEdit")})(os||(t.ApplyWorkspaceEditRequest=os={}))}(Ru)),Ru}var Ns={},km;function sD(){if(km)return Ns;km=1,Object.defineProperty(Ns,"__esModule",{value:!0}),Ns.createProtocolConnection=void 0;const t=Xi();function e(n,r,i,s){return t.ConnectionStrategy.is(s)&&(s={connectionStrategy:s}),(0,t.createMessageConnection)(n,r,i,s)}return Ns.createProtocolConnection=e,Ns}var Om;function aD(){return Om||(Om=1,function(t){var e=fr&&fr.__createBinding||(Object.create?function(s,a,o,c){c===void 0&&(c=o);var u=Object.getOwnPropertyDescriptor(a,o);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,u)}:function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]}),n=fr&&fr.__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(Xi(),t),n(wd,t),n(_e(),t),n(iD(),t);var r=sD();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={}))}(fr)),fr}var Lm;function oD(){return Lm||(Lm=1,function(t){var e=cr&&cr.__createBinding||(Object.create?function(s,a,o,c){c===void 0&&(c=o);var u=Object.getOwnPropertyDescriptor(a,o);(!u||("get"in u?!a.__esModule:u.writable||u.configurable))&&(u={enumerable:!0,get:function(){return a[o]}}),Object.defineProperty(s,c,u)}:function(s,a,o,c){c===void 0&&(c=o),s[c]=a[o]}),n=cr&&cr.__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=om();n(om(),t),n(aD(),t);function i(s,a,o,c){return(0,r.createMessageConnection)(s,a,o,c)}t.createProtocolConnection=i}(cr)),cr}var ao=oD(),Bs;(function(t){function e(n){return{dispose:async()=>await n()}}t.create=e})(Bs||(Bs={}));class cD{constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new la,this.documentPhaseListeners=new la,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=Ae.CancellationToken.None){var i;for(const s of e){const a=s.uri.toString();if(s.state===Y.Validated){if(typeof n.validation=="boolean"&&n.validation)this.resetToState(s,Y.IndexedReferences);else if(typeof n.validation=="object"){const o=this.findMissingValidationCategories(s,n);o.length>0&&(this.buildState.set(a,{completed:!1,options:{validation:{categories:o}},result:(i=this.buildState.get(a))==null?void 0:i.result}),s.state=Y.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Y.Changed,await this.emitUpdate(e.map(s=>s.uri),[]),await this.buildDocuments(e,n,r)}async update(e,n,r=Ae.CancellationToken.None){this.currentState=Y.Changed;const i=[];for(const c of n){const u=this.langiumDocuments.deleteDocuments(c);for(const l of u)i.push(l.uri),this.cleanUpDeleted(l)}const s=(await Promise.all(e.map(c=>this.findChangedUris(c)))).flat();for(const c of s){let u=this.langiumDocuments.getDocument(c);u===void 0&&(u=this.langiumDocumentFactory.fromModel({$type:"INVALID"},c),u.state=Y.Changed,this.langiumDocuments.addDocument(u)),this.resetToState(u,Y.Changed)}const a=Re(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 et(r);const o=this.sortDocuments(this.langiumDocuments.all.filter(c=>{var u;return c.state<Y.Validated||!((u=this.buildState.get(c.uri.toString()))!=null&&u.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){var o,c;const r=this.buildState.get(e.uri.toString()),i=this.serviceRegistry.getServices(e.uri).validation.ValidationRegistry.getAllValidationCategories(e),s=(o=r==null?void 0:r.result)!=null&&o.validationChecks?new Set((c=r==null?void 0:r.result)==null?void 0:c.validationChecks):r!=null&&r.completed?i:new Set,a=n===void 0||n.validation===!0?i:typeof n.validation=="object"?n.validation.categories??i:[];return Re(a).filter(u=>!s.has(u)).toArray()}async findChangedUris(e){var r;if(this.langiumDocuments.getDocument(e)??((r=this.textDocuments)==null?void 0:r.get(e)))return[e];try{const i=await this.fileSystemProvider.stat(e);if(i.isDirectory)return await this.workspaceManager().searchFolder(e);if(this.workspaceManager().shouldIncludeEntry(i))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){var n;return!!((n=this.textDocuments)!=null&&n.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),Bs.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==null?void 0:s.result})}}async runCancelable(e,n,r,i){for(const a of e)a.state<n&&(await et(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),Bs.create(()=>{this.buildPhaseListeners.delete(e,n)})}onDocumentPhase(e,n){return this.documentPhaseListeners.add(e,n),Bs.create(()=>{this.documentPhaseListeners.delete(e,n)})}waitUntil(e,n,r){let i;return n&&"path"in n?i=n:r=n,r??(r=Ae.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(pi);if(this.currentState>=e&&e>i.state)return Promise.reject(new ao.ResponseError(ao.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 ao.ResponseError(ao.LSPErrorCodes.ServerCancelled,`No document found for URI: ${n.toString()}`));return new Promise((s,a)=>{const o=this.onDocumentPhase(e,u=>{pt.equals(u.uri,n)&&(o.dispose(),c.dispose(),s(u.uri))}),c=r.onCancellationRequested(()=>{o.dispose(),c.dispose(),a(pi)})})}awaitBuilderState(e,n){return this.currentState>=e?Promise.resolve():n.isCancellationRequested?Promise.reject(pi):new Promise((r,i)=>{const s=this.onBuildPhase(e,()=>{s.dispose(),a.dispose(),r()}),a=n.onCancellationRequested(()=>{s.dispose(),a.dispose(),i(pi)})})}async notifyDocumentPhase(e,n,r){const s=this.documentPhaseListeners.get(n).slice();for(const a of s)try{await et(r),await a(e,r)}catch(o){if(!Vc(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 et(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=Re(o.result.validationChecks).concat(s.categories).distinct().toArray():o.result.validationChecks=[...s.categories])}getBuildOptions(e){var n;return((n=this.buildState.get(e.uri.toString()))==null?void 0:n.options)??{}}}class uD{constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new pM,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,n){const r=yn(e).uri,i=[];return this.referenceIndex.forEach(s=>{s.forEach(a=>{pt.equals(a.targetUri,r)&&a.targetPath===n&&i.push(a)})}),Re(i)}allElements(e,n){let r=Re(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=Ae.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=Ae.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 lD{constructor(e){this.initialBuildOptions={},this._ready=new bd,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=Ae.CancellationToken.None){const r=await this.performStartup(e);await et(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=Re(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 kt.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=pt.basename(e.uri);return n.startsWith(".")?!1:e.isDirectory?n!=="node_modules"&&n!=="out":e.isFile?this.serviceRegistry.hasServices(e.uri):!1}}class fD{buildUnexpectedCharactersMessage(e,n,r,i,s){return Qu.buildUnexpectedCharactersMessage(e,n,r,i,s)}buildUnableToPopLexerModeMessage(e){return Qu.buildUnableToPopLexerModeMessage(e)}}const dD={mode:"full"};class hD{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=xm(n)?Object.values(n):n,i=e.LanguageMetaData.mode==="production";this.chevrotainLexer=new it(r,{positionTracking:"full",skipValidations:i,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,n=dD){var i,s;const r=this.chevrotainLexer.tokenize(e);return{tokens:r.tokens,errors:r.errors,hidden:r.groups.hidden??[],report:(s=(i=this.tokenBuilder).flushLexingReport)==null?void 0:s.call(i,e)}}toTokenTypeDictionary(e){if(xm(e))return e;const n=UT(e)?Object.values(e.modes).flat():e,r={};return n.forEach(i=>r[i.name]=i),r}}function pD(t){return Array.isArray(t)&&(t.length===0||"name"in t[0])}function UT(t){return t&&"modes"in t&&"defaultMode"in t}function xm(t){return!pD(t)&&!UT(t)}function mD(t,e,n){let r,i;typeof t=="string"?(i=e,r=n):(i=t.range.start,r=e),i||(i=ne.create(0,0));const s=zT(t),a=Nd(r),o=TD({lines:s,position:i,options:a});return AD({index:0,tokens:o,position:i})}function gD(t,e){const n=Nd(e),r=zT(t);if(r.length===0)return!1;const i=r[0],s=r[r.length-1],a=n.start,o=n.end;return!!(a!=null&&a.exec(i))&&!!(o!=null&&o.exec(s))}function zT(t){let e="";return typeof t=="string"?e=t:e=t.text,e.split(Wv)}const Mm=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,yD=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu;function TD(t){var i,s,a;const e=[];let n=t.position.line,r=t.position.character;for(let o=0;o<t.lines.length;o++){const c=o===0,u=o===t.lines.length-1;let l=t.lines[o],f=0;if(c&&t.options.start){const p=(i=t.options.start)==null?void 0:i.exec(l);p&&(f=p.index+p[0].length)}else{const p=(s=t.options.line)==null?void 0:s.exec(l);p&&(f=p.index+p[0].length)}if(u){const p=(a=t.options.end)==null?void 0:a.exec(l);p&&(l=l.substring(0,p.index))}if(l=l.substring(0,ED(l)),Tf(l,f)>=l.length){if(e.length>0){const p=ne.create(n,r);e.push({type:"break",content:"",range:X.create(p,p)})}}else{Mm.lastIndex=f;const p=Mm.exec(l);if(p){const y=p[0],E=p[1],C=ne.create(n,r+f),A=ne.create(n,r+f+y.length);e.push({type:"tag",content:E,range:X.create(C,A)}),f+=y.length,f=Tf(l,f)}if(f<l.length){const y=l.substring(f),E=Array.from(y.matchAll(yD));e.push(...vD(E,y,n,r+f))}}n++,r=0}return e.length>0&&e[e.length-1].type==="break"?e.slice(0,-1):e}function vD(t,e,n,r){const i=[];if(t.length===0){const s=ne.create(n,r),a=ne.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,u=e.substring(s,c);u.length>0&&i.push({type:"text",content:e.substring(s,c),range:X.create(ne.create(n,s+r),ne.create(n,c+r))});let l=u.length+1;const f=o[1];if(i.push({type:"inline-tag",content:f,range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+f.length+r))}),l+=f.length,o.length===4){l+=o[2].length;const d=o[3];i.push({type:"text",content:d,range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+d.length+r))})}else i.push({type:"text",content:"",range:X.create(ne.create(n,s+l+r),ne.create(n,s+l+r))});s=c+o[0].length}const a=e.substring(s);a.length>0&&i.push({type:"text",content:a,range:X.create(ne.create(n,s+r),ne.create(n,s+r+a.length))})}return i}const $D=/\S/,RD=/\s*$/;function Tf(t,e){const n=t.substring(e).match($D);return n?e+n.index:t.length}function ED(t){const e=t.match(RD);if(e&&typeof e.index=="number")return e.index}function AD(t){var s,a;const e=ne.create(t.position.line,t.position.character);if(t.tokens.length===0)return new Dm([],X.create(e,e));const n=[];for(;t.index<t.tokens.length;){const o=_D(t,n[n.length-1]);o&&n.push(o)}const r=((s=n[0])==null?void 0:s.range.start)??e,i=((a=n[n.length-1])==null?void 0:a.range.end)??e;return new Dm(n,X.create(r,i))}function _D(t,e){const n=t.tokens[t.index];if(n.type==="tag")return BT(t,!1);if(n.type==="text"||n.type==="inline-tag")return qT(t);SD(n,e),t.index++}function SD(t,e){if(e){const n=new KT("",t.range);"inlines"in e?e.inlines.push(n):e.content.inlines.push(n)}}function qT(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(bD(t)),r=e,e=t.tokens[t.index];return new vf(i,X.create(n.range.start,r.range.end))}function bD(t){return t.tokens[t.index].type==="inline-tag"?BT(t,!0):WT(t)}function BT(t,e){const n=t.tokens[t.index++],r=n.content.substring(1),i=t.tokens[t.index];if((i==null?void 0:i.type)==="text")if(e){const s=WT(t);return new Au(r,new vf([s],s.range),e,X.create(n.range.start,s.range.end))}else{const s=qT(t);return new Au(r,s,e,X.create(n.range.start,s.range.end))}else{const s=n.range;return new Au(r,new vf([],s),e,s)}}function WT(t){const e=t.tokens[t.index++];return new KT(e.content,e.range)}function Nd(t){if(!t)return Nd({start:"/**",end:"*/",line:"*"});const{start:e,end:n,line:r}=t;return{start:Eu(e,!0),end:Eu(n,!1),line:Eu(r,!0)}}function Eu(t,e){if(typeof t=="string"||typeof t=="object"){const n=typeof t=="string"?cc(t):t.source;return e?new RegExp(`^\\s*${n}`):new RegExp(`\\s*${n}\\s*$`)}else return t}class Dm{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+=Fm(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+=Fm(n)+i}return n.trim()}}class Au{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
152
  ${n}`),this.inline?`{${e}}`:e}toMarkdown(e){var n;return((n=e==null?void 0:e.renderTag)==null?void 0:n.call(e,this))??this.toMarkdownDefault(e)}toMarkdownDefault(e){const n=this.content.toMarkdown(e);if(this.inline){const s=wD(this.name,n,e??{});if(typeof s=="string")return s}let r="";(e==null?void 0:e.tag)==="italic"||(e==null?void 0:e.tag)===void 0?r="*":(e==null?void 0:e.tag)==="bold"?r="**":(e==null?void 0: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
153
  ${n}`),this.inline?`{${i}}`:i}}function wD(t,e,n){var r;if(t==="linkplain"||t==="linkcode"||t==="link"){const i=e.indexOf(" ");let s=e;if(i>0){const o=Tf(e,i);s=e.substring(o),e=e.substring(0,i)}return(t==="linkcode"||t==="link"&&n.link==="code")&&(s=`\`${s}\``),((r=n.renderLink)==null?void 0:r.call(n,e,s))??CD(e,s)}}function CD(t,e){try{return kt.parse(t,!0),`[${e}](${t})`}catch{return t}}class vf{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
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+=`
@@ -156,7 +156,7 @@ ${n}`),this.inline?`{${i}}`:i}}function wD(t,e,n){var r;if(t==="linkplain"||t===
156
156
  `)?`
157
157
  `:`
158
158
 
159
- `}class ND{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&gD(n))return mD(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=yn(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 PD{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var n;return yM(e)?e.$comment:(n=jv(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:n.text}}class ID{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class kD{constructor(){this.previousTokenSource=new Ae.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=nM();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,n,r=Ae.CancellationToken.None){const i=new bd,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){Hc(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class OD{constructor(e){this.grammarElementIdMap=new Wp,this.tokenTypeIdMap=new Wp,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 Tn(e))n.set(i,{});if(e.$cstNode)for(const i of Fu(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)Ye(o)?a.push(this.dehydrateAstNode(o,n)):Pt(o)?a.push(this.dehydrateReference(o,n)):a.push(o)}else Ye(s)?r[i]=this.dehydrateAstNode(s,n):Pt(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 Zm(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),Ws(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):Jm(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 Tn(e))n.set(s,{});let i;if(e.$cstNode)for(const s of Fu(e.$cstNode)){let a;"fullText"in s?(a=new _T(s.fullText),i=a):"content"in s?a=new Ad:"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)Ye(o)?a.push(this.setParent(this.hydrateAstNode(o,n),r)):Pt(o)?a.push(this.hydrateReference(o,r,i,n)):a.push(o)}else Ye(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):Pt(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),Ws(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,u=e.hidden;return new ff(r,i,{start:{line:s,character:a},end:{line:o,character:c}},n,u)}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 Tn(this.grammar))yv(n)&&this.grammarElementIdMap.set(n,e++)}}function Qn(t){return{documentation:{CommentProvider:e=>new PD(e),DocumentationProvider:e=>new ND(e)},parser:{AsyncParser:e=>new ID(e),GrammarConfig:e=>h$(e),LangiumParser:e=>Z1(e),CompletionParser:e=>J1(e),ValueConverter:()=>new OT,TokenBuilder:()=>new kT,Lexer:e=>new hD(e),ParserErrorMessageProvider:()=>new wT,LexerErrorMessageProvider:()=>new fD},workspace:{AstNodeLocator:()=>new wM,AstNodeDescriptionProvider:e=>new SM(e),ReferenceDescriptionProvider:e=>new bM(e)},references:{Linker:e=>new oM(e),NameProvider:()=>new uM,ScopeProvider:e=>new gM(e),ScopeComputation:e=>new fM(e),References:e=>new lM(e)},serializer:{Hydrator:e=>new OD(e),JsonSerializer:e=>new TM(e)},validation:{DocumentValidator:e=>new EM(e),ValidationRegistry:e=>new $M(e)},shared:()=>t.shared}}function er(t){return{ServiceRegistry:e=>new vM(e),workspace:{LangiumDocuments:e=>new aM(e),LangiumDocumentFactory:e=>new sM(e),DocumentBuilder:e=>new cD(e),IndexManager:e=>new uD(e),WorkspaceManager:e=>new lD(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new kD,ConfigurationProvider:e=>new NM(e)},profilers:{}}}var Gm;(function(t){t.merge=(e,n)=>fa(fa({},e),n)})(Gm||(Gm={}));function Xe(t,e,n,r,i,s,a,o,c){const u=[t,e,n,r,i,s,a,o,c].reduce(fa,{});return HT(u)}const LD=Symbol("isProxy");function HT(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===LD?!0:Um(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(Um(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const jm=Symbol();function Um(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]===jm)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]=jm;try{t[e]=typeof i=="function"?i(r):HT(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function fa(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]=fa(i,r):t[n]=fa({},r)}else t[n]=r}return t}class xD{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 tr={fileSystemProvider:()=>new xD},MD={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},DD={AstReflection:()=>new ig};function FD(){const t=Xe(er(tr),DD),e=Xe(Qn({shared:t}),MD);return t.ServiceRegistry.register(e),e}function Br(t){const e=FD(),n=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(n,kt.parse(`memory:/${n.name??"grammar"}.langium`)),n}var GD=Object.defineProperty,k=(t,e)=>GD(t,"name",{value:e,configurable:!0}),$f;(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 ]+)\]/}})($f||($f={}));var Rf;(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])?/}})(Rf||(Rf={}));var Ef;(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]*/}})(Ef||(Ef={}));var Af;(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]*/}})(Af||(Af={}));var _f;(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]*/}})(_f||(_f={}));var Sf;(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]*/}})(Sf||(Sf={}));var bf;(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:/"[^"]*"|'[^']*'/}})(bf||(bf={}));({...$f.Terminals,...Rf.Terminals,...Ef.Terminals,...Af.Terminals,..._f.Terminals,...Sf.Terminals,...bf.Terminals});var ln={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function jD(t){return Mt.isInstance(t,ln.$type)}k(jD,"isArchitecture");var oo={$type:"Axis",label:"label",name:"name"},bo={$type:"Branch",name:"name",order:"order"};function UD(t){return Mt.isInstance(t,bo.$type)}k(UD,"isBranch");var zm={$type:"Checkout",branch:"branch"},co={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},_u={$type:"ClassDefStatement",className:"className",styleText:"styleText"},ci={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function zD(t){return Mt.isInstance(t,ci.$type)}k(zD,"isCommit");var uo={$type:"Curve",entries:"entries",label:"label",name:"name"},Jr={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Ft={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Su={$type:"Entry",axis:"axis",value:"value"},Rr={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function qD(t){return Mt.isInstance(t,Rr.$type)}k(qD,"isGitGraph");var Ps={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},js={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function BD(t){return Mt.isInstance(t,js.$type)}k(BD,"isInfo");var Is={$type:"Item",classSelector:"classSelector",name:"name"},bu={$type:"Junction",id:"id",in:"in"},lo={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},ui={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function WD(t){return Mt.isInstance(t,ui.$type)}k(WD,"isMerge");var wu={$type:"Option",name:"name",value:"value"},li={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function KD(t){return Mt.isInstance(t,li.$type)}k(KD,"isPacket");var fi={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function HD(t){return Mt.isInstance(t,fi.$type)}k(HD,"isPacketBlock");var Er={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function VD(t){return Mt.isInstance(t,Er.$type)}k(VD,"isPie");var wo={$type:"PieSection",label:"label",value:"value"};function YD(t){return Mt.isInstance(t,wo.$type)}k(YD,"isPieSection");var gr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Cu={$type:"Section",classSelector:"classSelector",name:"name"},Zr={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Qr={$type:"Statement"},di={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function XD(t){return Mt.isInstance(t,di.$type)}k(XD,"isTreemap");var Nu={$type:"TreemapRow",indent:"indent",item:"item"},Ti,VT=(Ti=class extends Xm{constructor(){super(...arguments),this.types={Architecture:{name:ln.$type,properties:{accDescr:{name:ln.accDescr},accTitle:{name:ln.accTitle},edges:{name:ln.edges,defaultValue:[]},groups:{name:ln.groups,defaultValue:[]},junctions:{name:ln.junctions,defaultValue:[]},services:{name:ln.services,defaultValue:[]},title:{name:ln.title}},superTypes:[]},Axis:{name:oo.$type,properties:{label:{name:oo.label},name:{name:oo.name}},superTypes:[]},Branch:{name:bo.$type,properties:{name:{name:bo.name},order:{name:bo.order}},superTypes:[Qr.$type]},Checkout:{name:zm.$type,properties:{branch:{name:zm.branch}},superTypes:[Qr.$type]},CherryPicking:{name:co.$type,properties:{id:{name:co.id},parent:{name:co.parent},tags:{name:co.tags,defaultValue:[]}},superTypes:[Qr.$type]},ClassDefStatement:{name:_u.$type,properties:{className:{name:_u.className},styleText:{name:_u.styleText}},superTypes:[]},Commit:{name:ci.$type,properties:{id:{name:ci.id},message:{name:ci.message},tags:{name:ci.tags,defaultValue:[]},type:{name:ci.type}},superTypes:[Qr.$type]},Curve:{name:uo.$type,properties:{entries:{name:uo.entries,defaultValue:[]},label:{name:uo.label},name:{name:uo.name}},superTypes:[]},Direction:{name:Jr.$type,properties:{accDescr:{name:Jr.accDescr},accTitle:{name:Jr.accTitle},dir:{name:Jr.dir},statements:{name:Jr.statements,defaultValue:[]},title:{name:Jr.title}},superTypes:[Rr.$type]},Edge:{name:Ft.$type,properties:{lhsDir:{name:Ft.lhsDir},lhsGroup:{name:Ft.lhsGroup,defaultValue:!1},lhsId:{name:Ft.lhsId},lhsInto:{name:Ft.lhsInto,defaultValue:!1},rhsDir:{name:Ft.rhsDir},rhsGroup:{name:Ft.rhsGroup,defaultValue:!1},rhsId:{name:Ft.rhsId},rhsInto:{name:Ft.rhsInto,defaultValue:!1},title:{name:Ft.title}},superTypes:[]},Entry:{name:Su.$type,properties:{axis:{name:Su.axis,referenceType:oo.$type},value:{name:Su.value}},superTypes:[]},GitGraph:{name:Rr.$type,properties:{accDescr:{name:Rr.accDescr},accTitle:{name:Rr.accTitle},statements:{name:Rr.statements,defaultValue:[]},title:{name:Rr.title}},superTypes:[]},Group:{name:Ps.$type,properties:{icon:{name:Ps.icon},id:{name:Ps.id},in:{name:Ps.in},title:{name:Ps.title}},superTypes:[]},Info:{name:js.$type,properties:{accDescr:{name:js.accDescr},accTitle:{name:js.accTitle},title:{name:js.title}},superTypes:[]},Item:{name:Is.$type,properties:{classSelector:{name:Is.classSelector},name:{name:Is.name}},superTypes:[]},Junction:{name:bu.$type,properties:{id:{name:bu.id},in:{name:bu.in}},superTypes:[]},Leaf:{name:lo.$type,properties:{classSelector:{name:lo.classSelector},name:{name:lo.name},value:{name:lo.value}},superTypes:[Is.$type]},Merge:{name:ui.$type,properties:{branch:{name:ui.branch},id:{name:ui.id},tags:{name:ui.tags,defaultValue:[]},type:{name:ui.type}},superTypes:[Qr.$type]},Option:{name:wu.$type,properties:{name:{name:wu.name},value:{name:wu.value,defaultValue:!1}},superTypes:[]},Packet:{name:li.$type,properties:{accDescr:{name:li.accDescr},accTitle:{name:li.accTitle},blocks:{name:li.blocks,defaultValue:[]},title:{name:li.title}},superTypes:[]},PacketBlock:{name:fi.$type,properties:{bits:{name:fi.bits},end:{name:fi.end},label:{name:fi.label},start:{name:fi.start}},superTypes:[]},Pie:{name:Er.$type,properties:{accDescr:{name:Er.accDescr},accTitle:{name:Er.accTitle},sections:{name:Er.sections,defaultValue:[]},showData:{name:Er.showData,defaultValue:!1},title:{name:Er.title}},superTypes:[]},PieSection:{name:wo.$type,properties:{label:{name:wo.label},value:{name:wo.value}},superTypes:[]},Radar:{name:gr.$type,properties:{accDescr:{name:gr.accDescr},accTitle:{name:gr.accTitle},axes:{name:gr.axes,defaultValue:[]},curves:{name:gr.curves,defaultValue:[]},options:{name:gr.options,defaultValue:[]},title:{name:gr.title}},superTypes:[]},Section:{name:Cu.$type,properties:{classSelector:{name:Cu.classSelector},name:{name:Cu.name}},superTypes:[Is.$type]},Service:{name:Zr.$type,properties:{icon:{name:Zr.icon},iconText:{name:Zr.iconText},id:{name:Zr.id},in:{name:Zr.in},title:{name:Zr.title}},superTypes:[]},Statement:{name:Qr.$type,properties:{},superTypes:[]},Treemap:{name:di.$type,properties:{accDescr:{name:di.accDescr},accTitle:{name:di.accTitle},title:{name:di.title},TreemapRows:{name:di.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Nu.$type,properties:{indent:{name:Nu.indent},item:{name:Nu.item}},superTypes:[]}}}},k(Ti,"MermaidAstReflection"),Ti),Mt=new VT,qm,JD=k(()=>qm??(qm=Br(`{"$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"),Bm,ZD=k(()=>Bm??(Bm=Br(`{"$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"),Wm,QD=k(()=>Wm??(Wm=Br(`{"$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"),Km,e0=k(()=>Km??(Km=Br(`{"$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"),Hm,t0=k(()=>Hm??(Hm=Br(`{"$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"),Vm,n0=k(()=>Vm??(Vm=Br(`{"$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"),Ym,r0=k(()=>Ym??(Ym=Br(`{"$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"),i0={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},s0={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},a0={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},o0={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},c0={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},u0={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},l0={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wr={AstReflection:k(()=>new VT,"AstReflection")},f0={Grammar:k(()=>JD(),"Grammar"),LanguageMetaData:k(()=>i0,"LanguageMetaData"),parser:{}},d0={Grammar:k(()=>ZD(),"Grammar"),LanguageMetaData:k(()=>s0,"LanguageMetaData"),parser:{}},h0={Grammar:k(()=>QD(),"Grammar"),LanguageMetaData:k(()=>a0,"LanguageMetaData"),parser:{}},p0={Grammar:k(()=>e0(),"Grammar"),LanguageMetaData:k(()=>o0,"LanguageMetaData"),parser:{}},m0={Grammar:k(()=>t0(),"Grammar"),LanguageMetaData:k(()=>c0,"LanguageMetaData"),parser:{}},g0={Grammar:k(()=>n0(),"Grammar"),LanguageMetaData:k(()=>u0,"LanguageMetaData"),parser:{}},y0={Grammar:k(()=>r0(),"Grammar"),LanguageMetaData:k(()=>l0,"LanguageMetaData"),parser:{}},T0=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,v0=/accTitle[\t ]*:([^\n\r]*)/,$0=/title([\t ][^\n\r]*|)/,R0={ACC_DESCR:T0,ACC_TITLE:v0,TITLE:$0},vi,Vc=(vi=class extends OT{runConverter(e,n,r){let i=this.runCommonConverter(e,n,r);return i===void 0&&(i=this.runCustomConverter(e,n,r)),i===void 0?super.runConverter(e,n,r):i}runCommonConverter(e,n,r){const i=R0[e.name];if(i===void 0)return;const s=i.exec(n);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
160
- `)}}},k(vi,"AbstractMermaidValueConverter"),vi),$i,Yc=($i=class extends Vc{runCustomConverter(e,n,r){}},k($i,"CommonValueConverter"),$i),Ri,nr=(Ri=class extends kT{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,n,r){const i=super.buildKeywordTokens(e,n,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},k(Ri,"AbstractMermaidTokenBuilder"),Ri),Ei;Ei=class extends nr{},k(Ei,"CommonTokenBuilder");var Ai,E0=(Ai=class extends nr{constructor(){super(["gitGraph"])}},k(Ai,"GitGraphTokenBuilder"),Ai),YT={parser:{TokenBuilder:k(()=>new E0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function XT(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),d0,YT);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}k(XT,"createGitGraphServices");var _i,A0=(_i=class extends nr{constructor(){super(["info","showInfo"])}},k(_i,"InfoTokenBuilder"),_i),JT={parser:{TokenBuilder:k(()=>new A0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function ZT(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),h0,JT);return e.ServiceRegistry.register(n),{shared:e,Info:n}}k(ZT,"createInfoServices");var Si,_0=(Si=class extends nr{constructor(){super(["packet"])}},k(Si,"PacketTokenBuilder"),Si),QT={parser:{TokenBuilder:k(()=>new _0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function ev(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),p0,QT);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}k(ev,"createPacketServices");var bi,S0=(bi=class extends nr{constructor(){super(["pie","showData"])}},k(bi,"PieTokenBuilder"),bi),wi,b0=(wi=class extends Vc{runCustomConverter(e,n,r){if(e.name==="PIE_SECTION_LABEL")return n.replace(/"/g,"").trim()}},k(wi,"PieValueConverter"),wi),tv={parser:{TokenBuilder:k(()=>new S0,"TokenBuilder"),ValueConverter:k(()=>new b0,"ValueConverter")}};function nv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),m0,tv);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}k(nv,"createPieServices");var Ci,w0=(Ci=class extends nr{constructor(){super(["architecture"])}},k(Ci,"ArchitectureTokenBuilder"),Ci),Ni,C0=(Ni=class extends Vc{runCustomConverter(e,n,r){if(e.name==="ARCH_ICON")return n.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return n.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let i=n.replace(/^\[|]$/g,"").trim();return(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1),i=i.replace(/\\"/g,'"').replace(/\\'/g,"'")),i.trim()}}},k(Ni,"ArchitectureValueConverter"),Ni),rv={parser:{TokenBuilder:k(()=>new w0,"TokenBuilder"),ValueConverter:k(()=>new C0,"ValueConverter")}};function iv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),f0,rv);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}k(iv,"createArchitectureServices");var Pi,N0=(Pi=class extends nr{constructor(){super(["radar-beta"])}},k(Pi,"RadarTokenBuilder"),Pi),sv={parser:{TokenBuilder:k(()=>new N0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function av(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),g0,sv);return e.ServiceRegistry.register(n),{shared:e,Radar:n}}k(av,"createRadarServices");var Ii,P0=(Ii=class extends nr{constructor(){super(["treemap"])}},k(Ii,"TreemapTokenBuilder"),Ii),I0=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,ki,k0=(ki=class extends Vc{runCustomConverter(e,n,r){if(e.name==="NUMBER2")return parseFloat(n.replace(/,/g,""));if(e.name==="SEPARATOR")return n.substring(1,n.length-1);if(e.name==="STRING2")return n.substring(1,n.length-1);if(e.name==="INDENTATION")return n.length;if(e.name==="ClassDef"){if(typeof n!="string")return n;const i=I0.exec(n);if(i)return{$type:"ClassDefStatement",className:i[1],styleText:i[2]||void 0}}}},k(ki,"TreemapValueConverter"),ki);function ov(t){const e=t.validation.TreemapValidator,n=t.validation.ValidationRegistry;if(n){const r={Treemap:e.checkSingleRoot.bind(e)};n.register(r,e)}}k(ov,"registerValidationChecks");var Oi,O0=(Oi=class{checkSingleRoot(e,n){let r;for(const i of e.TreemapRows)i.item&&(r===void 0&&i.indent===void 0?r=0:i.indent===void 0?n("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}):r!==void 0&&r>=parseInt(i.indent,10)&&n("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},k(Oi,"TreemapValidator"),Oi),cv={parser:{TokenBuilder:k(()=>new P0,"TokenBuilder"),ValueConverter:k(()=>new k0,"ValueConverter")},validation:{TreemapValidator:k(()=>new O0,"TreemapValidator")}};function uv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),y0,cv);return e.ServiceRegistry.register(n),ov(n),{shared:e,Treemap:n}}k(uv,"createTreemapServices");var dn={},L0={info:k(async()=>{const{createInfoServices:t}=await ir(async()=>{const{createInfoServices:n}=await Promise.resolve().then(()=>D0);return{createInfoServices:n}},void 0,import.meta.url),e=t().Info.parser.LangiumParser;dn.info=e},"info"),packet:k(async()=>{const{createPacketServices:t}=await ir(async()=>{const{createPacketServices:n}=await Promise.resolve().then(()=>F0);return{createPacketServices:n}},void 0,import.meta.url),e=t().Packet.parser.LangiumParser;dn.packet=e},"packet"),pie:k(async()=>{const{createPieServices:t}=await ir(async()=>{const{createPieServices:n}=await Promise.resolve().then(()=>G0);return{createPieServices:n}},void 0,import.meta.url),e=t().Pie.parser.LangiumParser;dn.pie=e},"pie"),architecture:k(async()=>{const{createArchitectureServices:t}=await ir(async()=>{const{createArchitectureServices:n}=await Promise.resolve().then(()=>j0);return{createArchitectureServices:n}},void 0,import.meta.url),e=t().Architecture.parser.LangiumParser;dn.architecture=e},"architecture"),gitGraph:k(async()=>{const{createGitGraphServices:t}=await ir(async()=>{const{createGitGraphServices:n}=await Promise.resolve().then(()=>U0);return{createGitGraphServices:n}},void 0,import.meta.url),e=t().GitGraph.parser.LangiumParser;dn.gitGraph=e},"gitGraph"),radar:k(async()=>{const{createRadarServices:t}=await ir(async()=>{const{createRadarServices:n}=await Promise.resolve().then(()=>z0);return{createRadarServices:n}},void 0,import.meta.url),e=t().Radar.parser.LangiumParser;dn.radar=e},"radar"),treemap:k(async()=>{const{createTreemapServices:t}=await ir(async()=>{const{createTreemapServices:n}=await Promise.resolve().then(()=>q0);return{createTreemapServices:n}},void 0,import.meta.url),e=t().Treemap.parser.LangiumParser;dn.treemap=e},"treemap")};async function x0(t,e){const n=L0[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);dn[t]||await n();const i=dn[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new M0(i);return i.value}k(x0,"parse");var Li,M0=(Li=class extends Error{constructor(e){const n=e.lexerErrors.map(i=>{const s=i.line!==void 0&&!isNaN(i.line)?i.line:"?",a=i.column!==void 0&&!isNaN(i.column)?i.column:"?";return`Lexer error on line ${s}, column ${a}: ${i.message}`}).join(`
159
+ `}class ND{constructor(e){this.indexManager=e.shared.workspace.IndexManager,this.commentProvider=e.documentation.CommentProvider}getDocumentation(e){const n=this.commentProvider.getComment(e);if(n&&gD(n))return mD(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=yn(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 PD{constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){var n;return yM(e)?e.$comment:(n=jv(e.$cstNode,this.grammarConfig().multilineCommentRules))==null?void 0:n.text}}class ID{constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,n){return Promise.resolve(this.syncParser.parse(e))}}class kD{constructor(){this.previousTokenSource=new Ae.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();const n=nM();return this.previousTokenSource=n,this.enqueue(this.writeQueue,e,n.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,n,r=Ae.CancellationToken.None){const i=new bd,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){Vc(s)?r.resolve(void 0):r.reject(s)}})),this.done=!0,this.performNextOperation()}cancelWrite(){this.previousTokenSource.cancel()}}class OD{constructor(e){this.grammarElementIdMap=new Wp,this.tokenTypeIdMap=new Wp,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 Tn(e))n.set(i,{});if(e.$cstNode)for(const i of Fu(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)Ye(o)?a.push(this.dehydrateAstNode(o,n)):Pt(o)?a.push(this.dehydrateReference(o,n)):a.push(o)}else Ye(s)?r[i]=this.dehydrateAstNode(s,n):Pt(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 Zm(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=n.astNodes.get(e.astNode),Ws(e)?r.content=e.content.map(i=>this.dehydrateCstNode(i,n)):Jm(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 Tn(e))n.set(s,{});let i;if(e.$cstNode)for(const s of Fu(e.$cstNode)){let a;"fullText"in s?(a=new _T(s.fullText),i=a):"content"in s?a=new Ad:"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)Ye(o)?a.push(this.setParent(this.hydrateAstNode(o,n),r)):Pt(o)?a.push(this.hydrateReference(o,r,i,n)):a.push(o)}else Ye(s)?r[i]=this.setParent(this.hydrateAstNode(s,n),r):Pt(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),Ws(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,u=e.hidden;return new ff(r,i,{start:{line:s,character:a},end:{line:o,character:c}},n,u)}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 Tn(this.grammar))yv(n)&&this.grammarElementIdMap.set(n,e++)}}function Qn(t){return{documentation:{CommentProvider:e=>new PD(e),DocumentationProvider:e=>new ND(e)},parser:{AsyncParser:e=>new ID(e),GrammarConfig:e=>h$(e),LangiumParser:e=>Z1(e),CompletionParser:e=>J1(e),ValueConverter:()=>new OT,TokenBuilder:()=>new kT,Lexer:e=>new hD(e),ParserErrorMessageProvider:()=>new wT,LexerErrorMessageProvider:()=>new fD},workspace:{AstNodeLocator:()=>new wM,AstNodeDescriptionProvider:e=>new SM(e),ReferenceDescriptionProvider:e=>new bM(e)},references:{Linker:e=>new oM(e),NameProvider:()=>new uM,ScopeProvider:e=>new gM(e),ScopeComputation:e=>new fM(e),References:e=>new lM(e)},serializer:{Hydrator:e=>new OD(e),JsonSerializer:e=>new TM(e)},validation:{DocumentValidator:e=>new EM(e),ValidationRegistry:e=>new $M(e)},shared:()=>t.shared}}function er(t){return{ServiceRegistry:e=>new vM(e),workspace:{LangiumDocuments:e=>new aM(e),LangiumDocumentFactory:e=>new sM(e),DocumentBuilder:e=>new cD(e),IndexManager:e=>new uD(e),WorkspaceManager:e=>new lD(e),FileSystemProvider:e=>t.fileSystemProvider(e),WorkspaceLock:()=>new kD,ConfigurationProvider:e=>new NM(e)},profilers:{}}}var Gm;(function(t){t.merge=(e,n)=>fa(fa({},e),n)})(Gm||(Gm={}));function Xe(t,e,n,r,i,s,a,o,c){const u=[t,e,n,r,i,s,a,o,c].reduce(fa,{});return VT(u)}const LD=Symbol("isProxy");function VT(t,e){const n=new Proxy({},{deleteProperty:()=>!1,set:()=>{throw new Error("Cannot set property on injected service container")},get:(r,i)=>i===LD?!0:Um(r,i,t,e||n),getOwnPropertyDescriptor:(r,i)=>(Um(r,i,t,e||n),Object.getOwnPropertyDescriptor(r,i)),has:(r,i)=>i in t,ownKeys:()=>[...Object.getOwnPropertyNames(t)]});return n}const jm=Symbol();function Um(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]===jm)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]=jm;try{t[e]=typeof i=="function"?i(r):VT(i,r)}catch(s){throw t[e]=s instanceof Error?s:void 0,s}return t[e]}else return}function fa(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]=fa(i,r):t[n]=fa({},r)}else t[n]=r}return t}class xD{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 tr={fileSystemProvider:()=>new xD},MD={Grammar:()=>{},LanguageMetaData:()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"})},DD={AstReflection:()=>new ig};function FD(){const t=Xe(er(tr),DD),e=Xe(Qn({shared:t}),MD);return t.ServiceRegistry.register(e),e}function Br(t){const e=FD(),n=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(n,kt.parse(`memory:/${n.name??"grammar"}.langium`)),n}var GD=Object.defineProperty,k=(t,e)=>GD(t,"name",{value:e,configurable:!0}),$f;(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 ]+)\]/}})($f||($f={}));var Rf;(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])?/}})(Rf||(Rf={}));var Ef;(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]*/}})(Ef||(Ef={}));var Af;(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]*/}})(Af||(Af={}));var _f;(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]*/}})(_f||(_f={}));var Sf;(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]*/}})(Sf||(Sf={}));var bf;(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:/"[^"]*"|'[^']*'/}})(bf||(bf={}));({...$f.Terminals,...Rf.Terminals,...Ef.Terminals,...Af.Terminals,..._f.Terminals,...Sf.Terminals,...bf.Terminals});var ln={$type:"Architecture",accDescr:"accDescr",accTitle:"accTitle",edges:"edges",groups:"groups",junctions:"junctions",services:"services",title:"title"};function jD(t){return Mt.isInstance(t,ln.$type)}k(jD,"isArchitecture");var oo={$type:"Axis",label:"label",name:"name"},bo={$type:"Branch",name:"name",order:"order"};function UD(t){return Mt.isInstance(t,bo.$type)}k(UD,"isBranch");var zm={$type:"Checkout",branch:"branch"},co={$type:"CherryPicking",id:"id",parent:"parent",tags:"tags"},_u={$type:"ClassDefStatement",className:"className",styleText:"styleText"},ci={$type:"Commit",id:"id",message:"message",tags:"tags",type:"type"};function zD(t){return Mt.isInstance(t,ci.$type)}k(zD,"isCommit");var uo={$type:"Curve",entries:"entries",label:"label",name:"name"},Jr={$type:"Direction",accDescr:"accDescr",accTitle:"accTitle",dir:"dir",statements:"statements",title:"title"},Ft={$type:"Edge",lhsDir:"lhsDir",lhsGroup:"lhsGroup",lhsId:"lhsId",lhsInto:"lhsInto",rhsDir:"rhsDir",rhsGroup:"rhsGroup",rhsId:"rhsId",rhsInto:"rhsInto",title:"title"},Su={$type:"Entry",axis:"axis",value:"value"},Rr={$type:"GitGraph",accDescr:"accDescr",accTitle:"accTitle",statements:"statements",title:"title"};function qD(t){return Mt.isInstance(t,Rr.$type)}k(qD,"isGitGraph");var Ps={$type:"Group",icon:"icon",id:"id",in:"in",title:"title"},js={$type:"Info",accDescr:"accDescr",accTitle:"accTitle",title:"title"};function BD(t){return Mt.isInstance(t,js.$type)}k(BD,"isInfo");var Is={$type:"Item",classSelector:"classSelector",name:"name"},bu={$type:"Junction",id:"id",in:"in"},lo={$type:"Leaf",classSelector:"classSelector",name:"name",value:"value"},ui={$type:"Merge",branch:"branch",id:"id",tags:"tags",type:"type"};function WD(t){return Mt.isInstance(t,ui.$type)}k(WD,"isMerge");var wu={$type:"Option",name:"name",value:"value"},li={$type:"Packet",accDescr:"accDescr",accTitle:"accTitle",blocks:"blocks",title:"title"};function KD(t){return Mt.isInstance(t,li.$type)}k(KD,"isPacket");var fi={$type:"PacketBlock",bits:"bits",end:"end",label:"label",start:"start"};function VD(t){return Mt.isInstance(t,fi.$type)}k(VD,"isPacketBlock");var Er={$type:"Pie",accDescr:"accDescr",accTitle:"accTitle",sections:"sections",showData:"showData",title:"title"};function HD(t){return Mt.isInstance(t,Er.$type)}k(HD,"isPie");var wo={$type:"PieSection",label:"label",value:"value"};function YD(t){return Mt.isInstance(t,wo.$type)}k(YD,"isPieSection");var gr={$type:"Radar",accDescr:"accDescr",accTitle:"accTitle",axes:"axes",curves:"curves",options:"options",title:"title"},Cu={$type:"Section",classSelector:"classSelector",name:"name"},Zr={$type:"Service",icon:"icon",iconText:"iconText",id:"id",in:"in",title:"title"},Qr={$type:"Statement"},di={$type:"Treemap",accDescr:"accDescr",accTitle:"accTitle",title:"title",TreemapRows:"TreemapRows"};function XD(t){return Mt.isInstance(t,di.$type)}k(XD,"isTreemap");var Nu={$type:"TreemapRow",indent:"indent",item:"item"},Ti,HT=(Ti=class extends Xm{constructor(){super(...arguments),this.types={Architecture:{name:ln.$type,properties:{accDescr:{name:ln.accDescr},accTitle:{name:ln.accTitle},edges:{name:ln.edges,defaultValue:[]},groups:{name:ln.groups,defaultValue:[]},junctions:{name:ln.junctions,defaultValue:[]},services:{name:ln.services,defaultValue:[]},title:{name:ln.title}},superTypes:[]},Axis:{name:oo.$type,properties:{label:{name:oo.label},name:{name:oo.name}},superTypes:[]},Branch:{name:bo.$type,properties:{name:{name:bo.name},order:{name:bo.order}},superTypes:[Qr.$type]},Checkout:{name:zm.$type,properties:{branch:{name:zm.branch}},superTypes:[Qr.$type]},CherryPicking:{name:co.$type,properties:{id:{name:co.id},parent:{name:co.parent},tags:{name:co.tags,defaultValue:[]}},superTypes:[Qr.$type]},ClassDefStatement:{name:_u.$type,properties:{className:{name:_u.className},styleText:{name:_u.styleText}},superTypes:[]},Commit:{name:ci.$type,properties:{id:{name:ci.id},message:{name:ci.message},tags:{name:ci.tags,defaultValue:[]},type:{name:ci.type}},superTypes:[Qr.$type]},Curve:{name:uo.$type,properties:{entries:{name:uo.entries,defaultValue:[]},label:{name:uo.label},name:{name:uo.name}},superTypes:[]},Direction:{name:Jr.$type,properties:{accDescr:{name:Jr.accDescr},accTitle:{name:Jr.accTitle},dir:{name:Jr.dir},statements:{name:Jr.statements,defaultValue:[]},title:{name:Jr.title}},superTypes:[Rr.$type]},Edge:{name:Ft.$type,properties:{lhsDir:{name:Ft.lhsDir},lhsGroup:{name:Ft.lhsGroup,defaultValue:!1},lhsId:{name:Ft.lhsId},lhsInto:{name:Ft.lhsInto,defaultValue:!1},rhsDir:{name:Ft.rhsDir},rhsGroup:{name:Ft.rhsGroup,defaultValue:!1},rhsId:{name:Ft.rhsId},rhsInto:{name:Ft.rhsInto,defaultValue:!1},title:{name:Ft.title}},superTypes:[]},Entry:{name:Su.$type,properties:{axis:{name:Su.axis,referenceType:oo.$type},value:{name:Su.value}},superTypes:[]},GitGraph:{name:Rr.$type,properties:{accDescr:{name:Rr.accDescr},accTitle:{name:Rr.accTitle},statements:{name:Rr.statements,defaultValue:[]},title:{name:Rr.title}},superTypes:[]},Group:{name:Ps.$type,properties:{icon:{name:Ps.icon},id:{name:Ps.id},in:{name:Ps.in},title:{name:Ps.title}},superTypes:[]},Info:{name:js.$type,properties:{accDescr:{name:js.accDescr},accTitle:{name:js.accTitle},title:{name:js.title}},superTypes:[]},Item:{name:Is.$type,properties:{classSelector:{name:Is.classSelector},name:{name:Is.name}},superTypes:[]},Junction:{name:bu.$type,properties:{id:{name:bu.id},in:{name:bu.in}},superTypes:[]},Leaf:{name:lo.$type,properties:{classSelector:{name:lo.classSelector},name:{name:lo.name},value:{name:lo.value}},superTypes:[Is.$type]},Merge:{name:ui.$type,properties:{branch:{name:ui.branch},id:{name:ui.id},tags:{name:ui.tags,defaultValue:[]},type:{name:ui.type}},superTypes:[Qr.$type]},Option:{name:wu.$type,properties:{name:{name:wu.name},value:{name:wu.value,defaultValue:!1}},superTypes:[]},Packet:{name:li.$type,properties:{accDescr:{name:li.accDescr},accTitle:{name:li.accTitle},blocks:{name:li.blocks,defaultValue:[]},title:{name:li.title}},superTypes:[]},PacketBlock:{name:fi.$type,properties:{bits:{name:fi.bits},end:{name:fi.end},label:{name:fi.label},start:{name:fi.start}},superTypes:[]},Pie:{name:Er.$type,properties:{accDescr:{name:Er.accDescr},accTitle:{name:Er.accTitle},sections:{name:Er.sections,defaultValue:[]},showData:{name:Er.showData,defaultValue:!1},title:{name:Er.title}},superTypes:[]},PieSection:{name:wo.$type,properties:{label:{name:wo.label},value:{name:wo.value}},superTypes:[]},Radar:{name:gr.$type,properties:{accDescr:{name:gr.accDescr},accTitle:{name:gr.accTitle},axes:{name:gr.axes,defaultValue:[]},curves:{name:gr.curves,defaultValue:[]},options:{name:gr.options,defaultValue:[]},title:{name:gr.title}},superTypes:[]},Section:{name:Cu.$type,properties:{classSelector:{name:Cu.classSelector},name:{name:Cu.name}},superTypes:[Is.$type]},Service:{name:Zr.$type,properties:{icon:{name:Zr.icon},iconText:{name:Zr.iconText},id:{name:Zr.id},in:{name:Zr.in},title:{name:Zr.title}},superTypes:[]},Statement:{name:Qr.$type,properties:{},superTypes:[]},Treemap:{name:di.$type,properties:{accDescr:{name:di.accDescr},accTitle:{name:di.accTitle},title:{name:di.title},TreemapRows:{name:di.TreemapRows,defaultValue:[]}},superTypes:[]},TreemapRow:{name:Nu.$type,properties:{indent:{name:Nu.indent},item:{name:Nu.item}},superTypes:[]}}}},k(Ti,"MermaidAstReflection"),Ti),Mt=new HT,qm,JD=k(()=>qm??(qm=Br(`{"$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"),Bm,ZD=k(()=>Bm??(Bm=Br(`{"$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"),Wm,QD=k(()=>Wm??(Wm=Br(`{"$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"),Km,e0=k(()=>Km??(Km=Br(`{"$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"),Vm,t0=k(()=>Vm??(Vm=Br(`{"$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"),Hm,n0=k(()=>Hm??(Hm=Br(`{"$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"),Ym,r0=k(()=>Ym??(Ym=Br(`{"$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"),i0={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},s0={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},a0={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},o0={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},c0={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},u0={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},l0={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"},Wr={AstReflection:k(()=>new HT,"AstReflection")},f0={Grammar:k(()=>JD(),"Grammar"),LanguageMetaData:k(()=>i0,"LanguageMetaData"),parser:{}},d0={Grammar:k(()=>ZD(),"Grammar"),LanguageMetaData:k(()=>s0,"LanguageMetaData"),parser:{}},h0={Grammar:k(()=>QD(),"Grammar"),LanguageMetaData:k(()=>a0,"LanguageMetaData"),parser:{}},p0={Grammar:k(()=>e0(),"Grammar"),LanguageMetaData:k(()=>o0,"LanguageMetaData"),parser:{}},m0={Grammar:k(()=>t0(),"Grammar"),LanguageMetaData:k(()=>c0,"LanguageMetaData"),parser:{}},g0={Grammar:k(()=>n0(),"Grammar"),LanguageMetaData:k(()=>u0,"LanguageMetaData"),parser:{}},y0={Grammar:k(()=>r0(),"Grammar"),LanguageMetaData:k(()=>l0,"LanguageMetaData"),parser:{}},T0=/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,v0=/accTitle[\t ]*:([^\n\r]*)/,$0=/title([\t ][^\n\r]*|)/,R0={ACC_DESCR:T0,ACC_TITLE:v0,TITLE:$0},vi,Hc=(vi=class extends OT{runConverter(e,n,r){let i=this.runCommonConverter(e,n,r);return i===void 0&&(i=this.runCustomConverter(e,n,r)),i===void 0?super.runConverter(e,n,r):i}runCommonConverter(e,n,r){const i=R0[e.name];if(i===void 0)return;const s=i.exec(n);if(s!==null){if(s[1]!==void 0)return s[1].trim().replace(/[\t ]{2,}/gm," ");if(s[2]!==void 0)return s[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,`
160
+ `)}}},k(vi,"AbstractMermaidValueConverter"),vi),$i,Yc=($i=class extends Hc{runCustomConverter(e,n,r){}},k($i,"CommonValueConverter"),$i),Ri,nr=(Ri=class extends kT{constructor(e){super(),this.keywords=new Set(e)}buildKeywordTokens(e,n,r){const i=super.buildKeywordTokens(e,n,r);return i.forEach(s=>{this.keywords.has(s.name)&&s.PATTERN!==void 0&&(s.PATTERN=new RegExp(s.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),i}},k(Ri,"AbstractMermaidTokenBuilder"),Ri),Ei;Ei=class extends nr{},k(Ei,"CommonTokenBuilder");var Ai,E0=(Ai=class extends nr{constructor(){super(["gitGraph"])}},k(Ai,"GitGraphTokenBuilder"),Ai),YT={parser:{TokenBuilder:k(()=>new E0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function XT(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),d0,YT);return e.ServiceRegistry.register(n),{shared:e,GitGraph:n}}k(XT,"createGitGraphServices");var _i,A0=(_i=class extends nr{constructor(){super(["info","showInfo"])}},k(_i,"InfoTokenBuilder"),_i),JT={parser:{TokenBuilder:k(()=>new A0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function ZT(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),h0,JT);return e.ServiceRegistry.register(n),{shared:e,Info:n}}k(ZT,"createInfoServices");var Si,_0=(Si=class extends nr{constructor(){super(["packet"])}},k(Si,"PacketTokenBuilder"),Si),QT={parser:{TokenBuilder:k(()=>new _0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function ev(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),p0,QT);return e.ServiceRegistry.register(n),{shared:e,Packet:n}}k(ev,"createPacketServices");var bi,S0=(bi=class extends nr{constructor(){super(["pie","showData"])}},k(bi,"PieTokenBuilder"),bi),wi,b0=(wi=class extends Hc{runCustomConverter(e,n,r){if(e.name==="PIE_SECTION_LABEL")return n.replace(/"/g,"").trim()}},k(wi,"PieValueConverter"),wi),tv={parser:{TokenBuilder:k(()=>new S0,"TokenBuilder"),ValueConverter:k(()=>new b0,"ValueConverter")}};function nv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),m0,tv);return e.ServiceRegistry.register(n),{shared:e,Pie:n}}k(nv,"createPieServices");var Ci,w0=(Ci=class extends nr{constructor(){super(["architecture"])}},k(Ci,"ArchitectureTokenBuilder"),Ci),Ni,C0=(Ni=class extends Hc{runCustomConverter(e,n,r){if(e.name==="ARCH_ICON")return n.replace(/[()]/g,"").trim();if(e.name==="ARCH_TEXT_ICON")return n.replace(/["()]/g,"");if(e.name==="ARCH_TITLE"){let i=n.replace(/^\[|]$/g,"").trim();return(i.startsWith('"')&&i.endsWith('"')||i.startsWith("'")&&i.endsWith("'"))&&(i=i.slice(1,-1),i=i.replace(/\\"/g,'"').replace(/\\'/g,"'")),i.trim()}}},k(Ni,"ArchitectureValueConverter"),Ni),rv={parser:{TokenBuilder:k(()=>new w0,"TokenBuilder"),ValueConverter:k(()=>new C0,"ValueConverter")}};function iv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),f0,rv);return e.ServiceRegistry.register(n),{shared:e,Architecture:n}}k(iv,"createArchitectureServices");var Pi,N0=(Pi=class extends nr{constructor(){super(["radar-beta"])}},k(Pi,"RadarTokenBuilder"),Pi),sv={parser:{TokenBuilder:k(()=>new N0,"TokenBuilder"),ValueConverter:k(()=>new Yc,"ValueConverter")}};function av(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),g0,sv);return e.ServiceRegistry.register(n),{shared:e,Radar:n}}k(av,"createRadarServices");var Ii,P0=(Ii=class extends nr{constructor(){super(["treemap"])}},k(Ii,"TreemapTokenBuilder"),Ii),I0=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,ki,k0=(ki=class extends Hc{runCustomConverter(e,n,r){if(e.name==="NUMBER2")return parseFloat(n.replace(/,/g,""));if(e.name==="SEPARATOR")return n.substring(1,n.length-1);if(e.name==="STRING2")return n.substring(1,n.length-1);if(e.name==="INDENTATION")return n.length;if(e.name==="ClassDef"){if(typeof n!="string")return n;const i=I0.exec(n);if(i)return{$type:"ClassDefStatement",className:i[1],styleText:i[2]||void 0}}}},k(ki,"TreemapValueConverter"),ki);function ov(t){const e=t.validation.TreemapValidator,n=t.validation.ValidationRegistry;if(n){const r={Treemap:e.checkSingleRoot.bind(e)};n.register(r,e)}}k(ov,"registerValidationChecks");var Oi,O0=(Oi=class{checkSingleRoot(e,n){let r;for(const i of e.TreemapRows)i.item&&(r===void 0&&i.indent===void 0?r=0:i.indent===void 0?n("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}):r!==void 0&&r>=parseInt(i.indent,10)&&n("error","Multiple root nodes are not allowed in a treemap.",{node:i,property:"item"}))}},k(Oi,"TreemapValidator"),Oi),cv={parser:{TokenBuilder:k(()=>new P0,"TokenBuilder"),ValueConverter:k(()=>new k0,"ValueConverter")},validation:{TreemapValidator:k(()=>new O0,"TreemapValidator")}};function uv(t=tr){const e=Xe(er(t),Wr),n=Xe(Qn({shared:e}),y0,cv);return e.ServiceRegistry.register(n),ov(n),{shared:e,Treemap:n}}k(uv,"createTreemapServices");var dn={},L0={info:k(async()=>{const{createInfoServices:t}=await ir(async()=>{const{createInfoServices:n}=await Promise.resolve().then(()=>D0);return{createInfoServices:n}},void 0,import.meta.url),e=t().Info.parser.LangiumParser;dn.info=e},"info"),packet:k(async()=>{const{createPacketServices:t}=await ir(async()=>{const{createPacketServices:n}=await Promise.resolve().then(()=>F0);return{createPacketServices:n}},void 0,import.meta.url),e=t().Packet.parser.LangiumParser;dn.packet=e},"packet"),pie:k(async()=>{const{createPieServices:t}=await ir(async()=>{const{createPieServices:n}=await Promise.resolve().then(()=>G0);return{createPieServices:n}},void 0,import.meta.url),e=t().Pie.parser.LangiumParser;dn.pie=e},"pie"),architecture:k(async()=>{const{createArchitectureServices:t}=await ir(async()=>{const{createArchitectureServices:n}=await Promise.resolve().then(()=>j0);return{createArchitectureServices:n}},void 0,import.meta.url),e=t().Architecture.parser.LangiumParser;dn.architecture=e},"architecture"),gitGraph:k(async()=>{const{createGitGraphServices:t}=await ir(async()=>{const{createGitGraphServices:n}=await Promise.resolve().then(()=>U0);return{createGitGraphServices:n}},void 0,import.meta.url),e=t().GitGraph.parser.LangiumParser;dn.gitGraph=e},"gitGraph"),radar:k(async()=>{const{createRadarServices:t}=await ir(async()=>{const{createRadarServices:n}=await Promise.resolve().then(()=>z0);return{createRadarServices:n}},void 0,import.meta.url),e=t().Radar.parser.LangiumParser;dn.radar=e},"radar"),treemap:k(async()=>{const{createTreemapServices:t}=await ir(async()=>{const{createTreemapServices:n}=await Promise.resolve().then(()=>q0);return{createTreemapServices:n}},void 0,import.meta.url),e=t().Treemap.parser.LangiumParser;dn.treemap=e},"treemap")};async function x0(t,e){const n=L0[t];if(!n)throw new Error(`Unknown diagram type: ${t}`);dn[t]||await n();const i=dn[t].parse(e);if(i.lexerErrors.length>0||i.parserErrors.length>0)throw new M0(i);return i.value}k(x0,"parse");var Li,M0=(Li=class extends Error{constructor(e){const n=e.lexerErrors.map(i=>{const s=i.line!==void 0&&!isNaN(i.line)?i.line:"?",a=i.column!==void 0&&!isNaN(i.column)?i.column:"?";return`Lexer error on line ${s}, column ${a}: ${i.message}`}).join(`
161
161
  `),r=e.parserErrors.map(i=>{const s=i.token.startLine!==void 0&&!isNaN(i.token.startLine)?i.token.startLine:"?",a=i.token.startColumn!==void 0&&!isNaN(i.token.startColumn)?i.token.startColumn:"?";return`Parse error on line ${s}, column ${a}: ${i.message}`}).join(`
162
162
  `);super(`Parsing failed: ${n} ${r}`),this.result=e}},k(Li,"MermaidParseError"),Li);const D0=Object.freeze(Object.defineProperty({__proto__:null,InfoModule:JT,createInfoServices:ZT},Symbol.toStringTag,{value:"Module"})),F0=Object.freeze(Object.defineProperty({__proto__:null,PacketModule:QT,createPacketServices:ev},Symbol.toStringTag,{value:"Module"})),G0=Object.freeze(Object.defineProperty({__proto__:null,PieModule:tv,createPieServices:nv},Symbol.toStringTag,{value:"Module"})),j0=Object.freeze(Object.defineProperty({__proto__:null,ArchitectureModule:rv,createArchitectureServices:iv},Symbol.toStringTag,{value:"Module"})),U0=Object.freeze(Object.defineProperty({__proto__:null,GitGraphModule:YT,createGitGraphServices:XT},Symbol.toStringTag,{value:"Module"})),z0=Object.freeze(Object.defineProperty({__proto__:null,RadarModule:sv,createRadarServices:av},Symbol.toStringTag,{value:"Module"})),q0=Object.freeze(Object.defineProperty({__proto__:null,TreemapModule:cv,createTreemapServices:uv},Symbol.toStringTag,{value:"Module"}));export{x0 as p};