@flyfish-group/file-viewer-web 1.0.21 → 1.0.23

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 (354) hide show
  1. package/README.md +7 -4
  2. package/dist/index.d.ts +41 -2
  3. package/dist/index.js +5 -2
  4. package/package.json +1 -1
  5. package/viewer/_headers +7 -0
  6. package/viewer/assets/{3MFLoader-BvkYWcpH.js → 3MFLoader--yjh7udp.js} +1 -1
  7. package/viewer/assets/{AMFLoader-1v3YJhwU.js → AMFLoader-C0y7NIAO.js} +1 -1
  8. package/viewer/assets/ArchiveViewer-CZ4MDsrb.js +1 -0
  9. package/viewer/assets/AudioViewer-DjyDsudI.js +1 -0
  10. package/viewer/assets/CadViewer-BInkfPwZ.css +1 -0
  11. package/viewer/assets/CadViewer-BdTvIAMP.js +106 -0
  12. package/viewer/assets/CodeViewer-57pZ6W1s.js +2 -0
  13. package/viewer/assets/CodeViewer-CWJinXd-.css +1 -0
  14. package/viewer/assets/{ColladaLoader-BBfE2bw_.js → ColladaLoader-DTiuvWJL.js} +1 -1
  15. package/viewer/assets/DrawingViewer-NO4nzeA1.js +2 -0
  16. package/viewer/assets/EdaViewer-B296bd4C.js +8 -0
  17. package/viewer/assets/EmailViewer-CPSeSuYo.js +4 -0
  18. package/viewer/assets/EpubViewer-BCSRMeWe.js +2 -0
  19. package/viewer/assets/{FBXLoader-BI6tq8Dw.js → FBXLoader-Bj34Z_uf.js} +1 -1
  20. package/viewer/assets/{GLTFLoader-Dp4jm4wN.js → GLTFLoader-BNUIXeRP.js} +1 -1
  21. package/viewer/assets/ImageViewer-DnZM9hve.js +1 -0
  22. package/viewer/assets/{KMZLoader-BKHay62Q.js → KMZLoader-DTmXWzX_.js} +1 -1
  23. package/viewer/assets/{MarkdownViewer-BTZgVGwJ.js → MarkdownViewer-CmNTA_kD.js} +19 -19
  24. package/viewer/assets/{MarkdownViewer-eiSmDN4C.css → MarkdownViewer-DfpNPUlw.css} +1 -1
  25. package/viewer/assets/ModelViewer-D9x3ivqk.js +2 -0
  26. package/viewer/assets/{OBJLoader-Bjl2rCei.js → OBJLoader-DW4Mv-mq.js} +1 -1
  27. package/viewer/assets/OfdViewer-IhXBAdUl.js +2 -0
  28. package/viewer/assets/{PCDLoader-DXunJ4GV.js → PCDLoader-CHA1g8rk.js} +1 -1
  29. package/viewer/assets/{PLYLoader-B3OJWCbR.js → PLYLoader-DwTzA-Dg.js} +1 -1
  30. package/viewer/assets/PdfView-E1iujAnQ.js +558 -0
  31. package/viewer/assets/PdfView-fzvUeFZP.css +1 -0
  32. package/viewer/assets/PptxRender-Dad6hvcj.js +32 -0
  33. package/viewer/assets/{STLLoader-Op9AFGeI.js → STLLoader-Bt7FMgMu.js} +1 -1
  34. package/viewer/assets/{TDSLoader-C1_bDdal.js → TDSLoader-D__OhSS9.js} +1 -1
  35. package/viewer/assets/TypstViewer-DGGaqvFG.css +1 -0
  36. package/viewer/assets/TypstViewer-gzZvcE-4.js +60 -0
  37. package/viewer/assets/{USDLoader-BHMJbkNs.js → USDLoader-BovI5HgZ.js} +1 -1
  38. package/viewer/assets/UmdViewer-YzLD0vlj.js +3 -0
  39. package/viewer/assets/{VRMLLoader-x8hh4wKO.js → VRMLLoader-_VxVXPvX.js} +13 -13
  40. package/viewer/assets/{VTKLoader-C8oP0RB4.js → VTKLoader-BfnzBXsa.js} +1 -1
  41. package/viewer/assets/{XYZLoader-BYFk6Tzj.js → XYZLoader-DbQZs-aZ.js} +1 -1
  42. package/viewer/assets/XlsxTable-CZSQVOJ0.js +5 -0
  43. package/viewer/assets/__vite-browser-external-BZdVR8v7.js +1 -0
  44. package/viewer/assets/{ar-SA-G6X2FPQ2-xk-WWT3w.js → ar-SA-G6X2FPQ2-DIej4228.js} +1 -1
  45. package/viewer/assets/{arc-BPHhLzLE.js → arc-C_eH0vTw.js} +1 -1
  46. package/viewer/assets/architecture-7EHR7CIX-sRujR5WN.js +1 -0
  47. package/viewer/assets/architectureDiagram-3BPJPVTR-aQ-MRDKN.js +36 -0
  48. package/viewer/assets/archive-CRrvkqZk.js +2 -0
  49. package/viewer/assets/audio-DWT9z9tK.js +2 -0
  50. package/viewer/assets/{az-AZ-76LH7QW2-R9QiS28n.js → az-AZ-76LH7QW2-CS2qXUFa.js} +1 -1
  51. package/viewer/assets/{bg-BG-XCXSNQG7-DcJ2p4Qo.js → bg-BG-XCXSNQG7-9ujIdMwb.js} +1 -1
  52. package/viewer/assets/{blockDiagram-GPEHLZMM-B0b4Dtdi.js → blockDiagram-GPEHLZMM-DkVCZJHC.js} +1 -1
  53. package/viewer/assets/{bn-BD-2XOGV67Q-CETyJYwI.js → bn-BD-2XOGV67Q-Bz4MKzNd.js} +1 -1
  54. package/viewer/assets/{c4Diagram-AAUBKEIU-DwaRi9ek.js → c4Diagram-AAUBKEIU-BhUtgtBE.js} +1 -1
  55. package/viewer/assets/{ca-ES-6MX7JW3Y-BqhnZGeU.js → ca-ES-6MX7JW3Y-CQ0i-M2m.js} +1 -1
  56. package/viewer/assets/cad-B78pKw7N.js +2 -0
  57. package/viewer/assets/{cfb-D9osJ2bn.js → cfb-DgjGJYYS.js} +1 -1
  58. package/viewer/assets/channel-Dz5mnghj.js +1 -0
  59. package/viewer/assets/{chunk-2J33WTMH-DlBDlv1R.js → chunk-2J33WTMH-CruGLWY_.js} +1 -1
  60. package/viewer/assets/{chunk-3OPIFGDE-Ck4ELslx.js → chunk-3OPIFGDE-BBTvqaNI.js} +1 -1
  61. package/viewer/assets/{chunk-4BX2VUAB-BOSktpvM.js → chunk-4BX2VUAB-DnDF0gw2.js} +1 -1
  62. package/viewer/assets/chunk-55IACEB6-BXXbpqd4.js +1 -0
  63. package/viewer/assets/{chunk-5ZQYHXKU-DlEMgrTt.js → chunk-5ZQYHXKU-D-OgLpMs.js} +1 -1
  64. package/viewer/assets/{chunk-727SXJPM-C0iAJ7Cu.js → chunk-727SXJPM-DF6e3Zgf.js} +1 -1
  65. package/viewer/assets/chunk-AGHRB4JF-Fz9kp2Fp.js +1 -0
  66. package/viewer/assets/{chunk-AQP2D5EJ-BRJvm_dI.js → chunk-AQP2D5EJ-B3sX7UtP.js} +1 -1
  67. package/viewer/assets/{chunk-BSJP7CBP-2vUOgnIA.js → chunk-BSJP7CBP-BkJdmh17.js} +1 -1
  68. package/viewer/assets/{chunk-CSCIHK7Q-BYzrvQRZ.js → chunk-CSCIHK7Q-VDPd5eNJ.js} +2 -2
  69. package/viewer/assets/{chunk-EIO257PC-Bce8DpIq.js → chunk-EIO257PC-Dq8JiXSZ.js} +7 -7
  70. package/viewer/assets/{chunk-FMBD7UC4-BODFQR0j.js → chunk-FMBD7UC4-CKA5OKZ8.js} +1 -1
  71. package/viewer/assets/chunk-K2UTITRG-BEkZoneJ.js +35 -0
  72. package/viewer/assets/{chunk-KSCS5N6A-wYKDRFjc.js → chunk-KSCS5N6A-BuXf0YOu.js} +1 -1
  73. package/viewer/assets/{chunk-L5ZTLDWV-CQdI2mTB.js → chunk-L5ZTLDWV-CzNJ_8is.js} +1 -1
  74. package/viewer/assets/chunk-LZXEDZCA-n9zJSIw5.js +2 -0
  75. package/viewer/assets/{chunk-ND2GUHAM-LfMVcnRk.js → chunk-ND2GUHAM-zGgwlxna.js} +1 -1
  76. package/viewer/assets/chunk-NNHCCRGN-DlpIbxXb.js +159 -0
  77. package/viewer/assets/{chunk-NZK2D7GU-6U4u7z0c.js → chunk-NZK2D7GU-Cte2JwiA.js} +1 -1
  78. package/viewer/assets/{chunk-O5CBEL6O-BImcv37W.js → chunk-O5CBEL6O-Bu7jDUJy.js} +1 -1
  79. package/viewer/assets/chunk-QZHKN3VN-DmWvf513.js +1 -0
  80. package/viewer/assets/{chunk-SRAX5OIU-CBKhxrzT.js → chunk-SRAX5OIU-w1svEpmY.js} +1 -1
  81. package/viewer/assets/chunk-WU5MYG2G-h67ucwKy.js +1 -0
  82. package/viewer/assets/{chunk-XPW4576I-NsaRS98A.js → chunk-XPW4576I-SsWL9gHk.js} +1 -1
  83. package/viewer/assets/classDiagram-4FO5ZUOK-B-NZYxkE.js +1 -0
  84. package/viewer/assets/classDiagram-v2-Q7XG4LA2-B-NZYxkE.js +1 -0
  85. package/viewer/assets/compare-BA1y8ff-.css +1 -0
  86. package/viewer/assets/compare-CYFnIciQ.js +1 -0
  87. package/viewer/assets/{compiler-5cD-dlgE.js → compiler-Doo7uL6g.js} +1 -1
  88. package/viewer/assets/core-DHC7JJ3v.js +3 -0
  89. package/viewer/assets/cose-bilkent-S5V4N54A-BbY9gLB6.js +1 -0
  90. package/viewer/assets/cpp-V0F2hNk9.js +1 -0
  91. package/viewer/assets/{cs-CZ-2BRQDIVT-BGMNe1H_.js → cs-CZ-2BRQDIVT-CNJY03Br.js} +1 -1
  92. package/viewer/assets/{cytoscape.esm-BhgqxaGC.js → cytoscape.esm-C8YCVR3_.js} +2 -2
  93. package/viewer/assets/{da-DK-5WZEPLOC-Bh201dfY.js → da-DK-5WZEPLOC-kycNORr2.js} +1 -1
  94. package/viewer/assets/{dagre-BM42HDAG-B5YGgjz8.js → dagre-BM42HDAG-CtFkfSMu.js} +1 -1
  95. package/viewer/assets/{dagre-CBmA6wnT.js → dagre-Bx709z4p.js} +1 -1
  96. package/viewer/assets/{de-DE-XR44H4JA-C-u3piBT.js → de-DE-XR44H4JA-DgEFBHUE.js} +1 -1
  97. package/viewer/assets/{diagram-2AECGRRQ-BmQYluZm.js → diagram-2AECGRRQ-OITOieDL.js} +1 -1
  98. package/viewer/assets/{diagram-5GNKFQAL-CMfY5STH.js → diagram-5GNKFQAL-CkpmTcRT.js} +1 -1
  99. package/viewer/assets/{diagram-KO2AKTUF-DDu8xFk_.js → diagram-KO2AKTUF-Q-LQjcLw.js} +1 -1
  100. package/viewer/assets/{diagram-LMA3HP47-DV_OEza0.js → diagram-LMA3HP47-BlbmzDQ6.js} +1 -1
  101. package/viewer/assets/{diagram-OG6HWLK6-iqg-Bb_O.js → diagram-OG6HWLK6-CcX1M4RU.js} +1 -1
  102. package/viewer/assets/{directory-open-4ed118d0-D-tRUWVb.js → directory-open-4ed118d0-1i309Asm.js} +1 -1
  103. package/viewer/assets/{dist-BNvURj4h.js → dist-Bgk0P6Wx.js} +5 -5
  104. package/viewer/assets/dist-BzZSLV34.js +1 -0
  105. package/viewer/assets/{dist-CTxWUw4J.js → dist-idVqPIzq.js} +1 -1
  106. package/viewer/assets/docx-preview-CbKtHvXt.js +20 -0
  107. package/viewer/assets/drawing-Cg8yKw0a.js +2 -0
  108. package/viewer/assets/ebook-B0xdVki1.js +2 -0
  109. package/viewer/assets/eda-DB_j3--n.js +2 -0
  110. package/viewer/assets/{el-GR-BZB4AONW-BSN-5LwV.js → el-GR-BZB4AONW-DQbI2D0z.js} +1 -1
  111. package/viewer/assets/email-ZYgs8alH.js +2 -0
  112. package/viewer/assets/{en-B4ZKOASM-Bda1Tcbv.js → en-B4ZKOASM-gYELMyZ6.js} +1 -1
  113. package/viewer/assets/{erDiagram-TEJ5UH35-DM1Zmk67.js → erDiagram-TEJ5UH35-DEgxv-IW.js} +1 -1
  114. package/viewer/assets/{es-ES-U4NZUMDT-CkMK345k.js → es-ES-U4NZUMDT-e1S39Ti1.js} +1 -1
  115. package/viewer/assets/{eu-ES-A7QVB2H4-CmA46qjA.js → eu-ES-A7QVB2H4-BFR4rl79.js} +1 -1
  116. package/viewer/assets/eventmodeling-FCH6USID-BtBKHIsk.js +1 -0
  117. package/viewer/assets/{fa-IR-HGAKTJCU-BJKEnhdI.js → fa-IR-HGAKTJCU-D9rZqekR.js} +1 -1
  118. package/viewer/assets/{fi-FI-Z5N7JZ37-CfAW_T5T.js → fi-FI-Z5N7JZ37-LaYcmFdb.js} +1 -1
  119. package/viewer/assets/{flowDiagram-I6XJVG4X-BDU6nwXG.js → flowDiagram-I6XJVG4X-nqVkey0o.js} +2 -2
  120. package/viewer/assets/{fr-FR-RHASNOE6-CWHiIHlP.js → fr-FR-RHASNOE6-DaN_dVyx.js} +1 -1
  121. package/viewer/assets/{ganttDiagram-6RSMTGT7-CdlUoXLH.js → ganttDiagram-6RSMTGT7-B5XdNYHP.js} +1 -1
  122. package/viewer/assets/gitGraph-WXDBUCRP-CcEeprvc.js +1 -0
  123. package/viewer/assets/{gitGraphDiagram-PVQCEYII-BNuzMBaq.js → gitGraphDiagram-PVQCEYII-DoyI3hWK.js} +1 -1
  124. package/viewer/assets/{gl-ES-HMX3MZ6V-CKGulAoG.js → gl-ES-HMX3MZ6V-Dw-96yV4.js} +1 -1
  125. package/viewer/assets/{he-IL-6SHJWFNN-BHLKQ5ek.js → he-IL-6SHJWFNN-DSze4qOo.js} +1 -1
  126. package/viewer/assets/{hi-IN-IWLTKZ5I-Bo7HJAMD.js → hi-IN-IWLTKZ5I-BrDOKcx0.js} +1 -1
  127. package/viewer/assets/{hu-HU-A5ZG7DT2-BXfRd9JR.js → hu-HU-A5ZG7DT2-B5MZHRE0.js} +1 -1
  128. package/viewer/assets/{id-ID-SAP4L64H-CdFXQmZ-.js → id-ID-SAP4L64H-CLeuopyl.js} +1 -1
  129. package/viewer/assets/image-0vZMjp0Z.js +2 -0
  130. package/viewer/assets/image-GAAHSSAO-Di-5eHoS.js +1 -0
  131. package/viewer/assets/info-J43DQDTF-ECAOGDME.js +1 -0
  132. package/viewer/assets/{infoDiagram-5YYISTIA-BGN5iH-k.js → infoDiagram-5YYISTIA-C0vYc3h2.js} +1 -1
  133. package/viewer/assets/{ishikawaDiagram-YF4QCWOH-DsRLHhIQ.js → ishikawaDiagram-YF4QCWOH-CG_Ph_lH.js} +1 -1
  134. package/viewer/assets/{it-IT-JPQ66NNP-DOWVBjEX.js → it-IT-JPQ66NNP-CU1apqHk.js} +1 -1
  135. package/viewer/assets/{ja-JP-DBVTYXUO-D2YrGCS8.js → ja-JP-DBVTYXUO-B39Q-cJE.js} +1 -1
  136. package/viewer/assets/java-ChVphriW.js +1 -0
  137. package/viewer/assets/javascript-w9aIBC1S.js +1 -0
  138. package/viewer/assets/{journeyDiagram-JHISSGLW-Cvh5ehZ2.js → journeyDiagram-JHISSGLW-Bls8b6p5.js} +1 -1
  139. package/viewer/assets/{jszip.min-BTb9aZRk.js → jszip.min-CoyCHGS6.js} +1 -1
  140. package/viewer/assets/{kaa-6HZHGXH3-BNjseYto.js → kaa-6HZHGXH3-DNr0Hbws.js} +1 -1
  141. package/viewer/assets/{kab-KAB-ZGHBKWFO-CZ8Z2ARN.js → kab-KAB-ZGHBKWFO-DUqxtUd5.js} +1 -1
  142. package/viewer/assets/{kanban-definition-UN3LZRKU-B4aRb-70.js → kanban-definition-UN3LZRKU-D7NWNdGb.js} +1 -1
  143. package/viewer/assets/{kk-KZ-P5N5QNE5-BiGoXKgs.js → kk-KZ-P5N5QNE5-oAQRY--4.js} +1 -1
  144. package/viewer/assets/{km-KH-HSX4SM5Z-nQQmi6SK.js → km-KH-HSX4SM5Z-aIsalLJg.js} +1 -1
  145. package/viewer/assets/{ko-KR-MTYHY66A-VWIngjov.js → ko-KR-MTYHY66A-Dxxq4OHv.js} +1 -1
  146. package/viewer/assets/{ku-TR-6OUDTVRD-BMC8PKps.js → ku-TR-6OUDTVRD-cGosJj47.js} +1 -1
  147. package/viewer/assets/{lib-BG9mhXfy.js → lib-DVPOsS0g.js} +2 -2
  148. package/viewer/assets/{linear-CxDdtsor.js → linear-DAeDjlp3.js} +1 -1
  149. package/viewer/assets/{lt-LT-XHIRWOB4-DE1pHKyp.js → lt-LT-XHIRWOB4-BrbcDiBa.js} +1 -1
  150. package/viewer/assets/{lv-LV-5QDEKY6T-CwojNUbs.js → lv-LV-5QDEKY6T-BJB3sRF-.js} +1 -1
  151. package/viewer/assets/main-BmxokhSj.js +4 -0
  152. package/viewer/assets/main-G-3rADWH.css +1 -0
  153. package/viewer/assets/md-GXqo3xMM.js +2 -0
  154. package/viewer/assets/mermaid-parser.core-919mtcVP.js +4 -0
  155. package/viewer/assets/{mindmap-definition-RKZ34NQL-C-TGBNLX.js → mindmap-definition-RKZ34NQL-jpsqOaHj.js} +1 -1
  156. package/viewer/assets/model-DNiDRYMH.js +2 -0
  157. package/viewer/assets/{mr-IN-CRQNXWMA-CWtUkVOL.js → mr-IN-CRQNXWMA-DYl82JZe.js} +1 -1
  158. package/viewer/assets/{my-MM-5M5IBNSE-C_XxxIOL.js → my-MM-5M5IBNSE-CdnDB-54.js} +1 -1
  159. package/viewer/assets/{nb-NO-T6EIAALU-Btei_XbN.js → nb-NO-T6EIAALU-T-ly9gG2.js} +1 -1
  160. package/viewer/assets/nestedRender-BAYFA7cb.js +3 -0
  161. package/viewer/assets/{nl-NL-IS3SIHDZ-CLa9lIGi.js → nl-NL-IS3SIHDZ-CZqPZnHj.js} +1 -1
  162. package/viewer/assets/{nn-NO-6E72VCQL-STHIRJJz.js → nn-NO-6E72VCQL-CvMupQbc.js} +1 -1
  163. package/viewer/assets/{oc-FR-POXYY2M6-AlqHSf2A.js → oc-FR-POXYY2M6-BRlPd_BR.js} +1 -1
  164. package/viewer/assets/ofd-BJzyd_Eq.js +2 -0
  165. package/viewer/assets/{ofd-LNt40L0x.js → ofd-roCNaEHA.js} +1 -1
  166. package/viewer/assets/{ordinal-DCScp9-v.js → ordinal-hYBb2elL.js} +1 -1
  167. package/viewer/assets/{pa-IN-N4M65BXN-C5YYhOry.js → pa-IN-N4M65BXN-BfVUAlRi.js} +1 -1
  168. package/viewer/assets/package-Bop5TfAT.js +296 -0
  169. package/viewer/assets/package-OvxnQO7z.css +1 -0
  170. package/viewer/assets/packet-YPE3B663-BLIVl-jG.js +1 -0
  171. package/viewer/assets/pdf-CDtYB0WY.js +2 -0
  172. package/viewer/assets/percentages-BXMCSKIN-C5NgCvxl.js +1 -0
  173. package/viewer/assets/{pica-D7mbm30s.js → pica-Dfy4NaK_.js} +1 -1
  174. package/viewer/assets/{pie-CRd9Jc0K.js → pie-CZr-MxNa.js} +1 -1
  175. package/viewer/assets/pie-LRSECV5Y-DcYPzp1c.js +1 -0
  176. package/viewer/assets/{pieDiagram-4H26LBE5-CR0X6m7j.js → pieDiagram-4H26LBE5-CMzoHPw-.js} +1 -1
  177. package/viewer/assets/{pl-PL-T2D74RX3-DNpdFsH8.js → pl-PL-T2D74RX3-CXvOHlyd.js} +1 -1
  178. package/viewer/assets/pptx-CI2NrkhY.js +2 -0
  179. package/viewer/assets/{prod-sjH-QSi1.js → prod-B0HxyDM0.js} +8 -8
  180. package/viewer/assets/{pt-BR-5N22H2LF-CovgHQeR.js → pt-BR-5N22H2LF-CAHMJIN0.js} +1 -1
  181. package/viewer/assets/{pt-PT-UZXXM6DQ-dokXVmhl.js → pt-PT-UZXXM6DQ-9stw3O1j.js} +1 -1
  182. package/viewer/assets/{quadrantDiagram-W4KKPZXB-6kMEtAn4.js → quadrantDiagram-W4KKPZXB-BS8uQ6E6.js} +1 -1
  183. package/viewer/assets/radar-GUYGQ44K-Bqokr2eR.js +1 -0
  184. package/viewer/assets/renderer-BMLnfeSl.js +1 -0
  185. package/viewer/assets/{requirementDiagram-4Y6WPE33-BA75MpNz.js → requirementDiagram-4Y6WPE33-pyX-Egau.js} +1 -1
  186. package/viewer/assets/{ro-RO-JPDTUUEW-B03_KW0v.js → ro-RO-JPDTUUEW-_Ym6U2of.js} +1 -1
  187. package/viewer/assets/{rough.esm-CtRmaVvx.js → rough.esm-DjrMDdlL.js} +1 -1
  188. package/viewer/assets/{ru-RU-B4JR7IUQ-B_C8A3aI.js → ru-RU-B4JR7IUQ-DWUO9__j.js} +1 -1
  189. package/viewer/assets/runtime-core.esm-bundler-DO-WTVbd.js +1 -0
  190. package/viewer/assets/rust-Dk33Kfe-.js +1 -0
  191. package/viewer/assets/{sankeyDiagram-5OEKKPKP-Bvr9MFlL.js → sankeyDiagram-5OEKKPKP-BIl0S1dQ.js} +1 -1
  192. package/viewer/assets/{sequenceDiagram-3UESZ5HK-D2lyTrsV.js → sequenceDiagram-3UESZ5HK-EhMFCxNn.js} +2 -2
  193. package/viewer/assets/{si-LK-N5RQ5JYF-DegugaM_.js → si-LK-N5RQ5JYF-DOuaKjIP.js} +1 -1
  194. package/viewer/assets/{sk-SK-C5VTKIMK-B4PJqvUJ.js → sk-SK-C5VTKIMK-D04wnRn8.js} +1 -1
  195. package/viewer/assets/{sl-SI-NN7IZMDC-Df64jVGw.js → sl-SI-NN7IZMDC-DlSoyI38.js} +1 -1
  196. package/viewer/assets/{src-CBaGS_wh.js → src-CmLfrMFg.js} +5 -5
  197. package/viewer/assets/{stateDiagram-AJRCARHV-PKtpCfic.js → stateDiagram-AJRCARHV-CBylKBpj.js} +1 -1
  198. package/viewer/assets/stateDiagram-v2-BHNVJYJU-f7X6eKbo.js +1 -0
  199. package/viewer/assets/subset-shared.chunk-WzaeClRm.js +1 -0
  200. package/viewer/assets/{subset-worker.chunk-DtRH5DPE.js → subset-worker.chunk-CXi44O4x.js} +1 -1
  201. package/viewer/assets/{sv-SE-XGPEYMSR-B9XZHkYy.js → sv-SE-XGPEYMSR-y8nUmsTq.js} +1 -1
  202. package/viewer/assets/{ta-IN-2NMHFXQM-CSyfBCRt.js → ta-IN-2NMHFXQM-BTlY1MOo.js} +1 -1
  203. package/viewer/assets/text-BTWcQTKM.js +2 -0
  204. package/viewer/assets/{th-TH-HPSO5L25-Dqnv5J3c.js → th-TH-HPSO5L25-B0-Jm0dR.js} +1 -1
  205. package/viewer/assets/{three.module-B3kUtiXa.js → three.module-BFsVh7r1.js} +3 -3
  206. package/viewer/assets/{time-DJ3gVSNH.js → time-B8nkukJS.js} +1 -1
  207. package/viewer/assets/{timeline-definition-PNZ67QCA-BAzZv7xK.js → timeline-definition-PNZ67QCA-BrR0Lwj6.js} +1 -1
  208. package/viewer/assets/{tr-TR-DEFEU3FU-DC2uSW18.js → tr-TR-DEFEU3FU-CuiTnA8n.js} +1 -1
  209. package/viewer/assets/treeView-BLDUP644-B3NDovtS.js +1 -0
  210. package/viewer/assets/treemap-LRROVOQU-CNBN28UV.js +1 -0
  211. package/viewer/assets/typescript-BvteI6YB.js +1 -0
  212. package/viewer/assets/typst-BlzZcMe5.js +2 -0
  213. package/viewer/assets/{uk-UA-QMV73CPH-BDESx35z.js → uk-UA-QMV73CPH-za143PJQ.js} +1 -1
  214. package/viewer/assets/umd-CaNdxjcL.js +2 -0
  215. package/viewer/assets/{vennDiagram-CIIHVFJN-BmGEKaQ-.js → vennDiagram-CIIHVFJN-BkqtdITb.js} +2 -2
  216. package/viewer/assets/{vi-VN-M7AON7JQ-CMeKEsgs.js → vi-VN-M7AON7JQ-BkwUlhW4.js} +1 -1
  217. package/viewer/assets/wardley-L42UT6IY-B82Hng0D.js +1 -0
  218. package/viewer/assets/{wardleyDiagram-YWT4CUSO-C8oe-4j_.js → wardleyDiagram-YWT4CUSO-d1SlYFch.js} +1 -1
  219. package/viewer/assets/word-CbznmAOT.js +126 -0
  220. package/viewer/assets/xlsx-B70Tzp_0.js +2 -0
  221. package/viewer/assets/{xychartDiagram-2RQKCTM6-CkUeox50.js → xychartDiagram-2RQKCTM6-AETQ-2hJ.js} +1 -1
  222. package/viewer/assets/yaml-1XF8XcZB.js +1 -0
  223. package/viewer/assets/{zh-CN-LNUGB5OW-DYFA40K_.js → zh-CN-LNUGB5OW-CLMN5wFH.js} +1 -1
  224. package/viewer/assets/{zh-HK-E62DVLB3-BZBLV5qY.js → zh-HK-E62DVLB3-BQAhIarC.js} +1 -1
  225. package/viewer/assets/{zh-TW-RAJ6MFWO-DFF6eags.js → zh-TW-RAJ6MFWO-D3o6FRFS.js} +1 -1
  226. package/viewer/compare.html +5 -4
  227. package/viewer/flyfish-viewer-manifest.json +1 -1
  228. package/viewer/index.html +6 -5
  229. package/viewer/wasm/cad/DwgWorker-CuZJ5EUe.js +349 -0
  230. package/viewer/wasm/cad/dwfv-render.wasm +0 -0
  231. package/viewer/wasm/cad/dwg-worker.js +349 -0
  232. package/viewer/wasm/cad/index-C365l3i9.js +4161 -0
  233. package/viewer/wasm/cad/libredwg-web.js +15 -0
  234. package/viewer/wasm/cad/libredwg-web.wasm +0 -0
  235. package/viewer/assets/ArchiveViewer-CKe5u-zG.js +0 -1
  236. package/viewer/assets/AudioViewer-T0MB6cNf.js +0 -1
  237. package/viewer/assets/CadViewer-CmPS5vTY.js +0 -1
  238. package/viewer/assets/CadViewer-DZAS6XFY.css +0 -1
  239. package/viewer/assets/CodeViewer-Da2e-Pih.js +0 -2
  240. package/viewer/assets/CodeViewer-KlbtXDJA.css +0 -1
  241. package/viewer/assets/DrawingViewer-BLx5reKf.js +0 -2
  242. package/viewer/assets/EdaViewer-akuOQN_s.js +0 -8
  243. package/viewer/assets/EmailViewer-DCP5VSNh.js +0 -4
  244. package/viewer/assets/EpubViewer-CRYkXMns.js +0 -2
  245. package/viewer/assets/ImageViewer-DdBS2hkD.js +0 -1
  246. package/viewer/assets/ModelViewer-aTW19aj5.js +0 -2
  247. package/viewer/assets/OfdViewer-BFdudh_g.js +0 -2
  248. package/viewer/assets/PdfView-CBNN3RKQ.js +0 -558
  249. package/viewer/assets/PdfView-d7S_ChQk.css +0 -1
  250. package/viewer/assets/PptxRender-DGZ75Ujc.js +0 -32
  251. package/viewer/assets/TypstViewer-BzRqtvUb.js +0 -60
  252. package/viewer/assets/TypstViewer-CYzlZT3R.css +0 -1
  253. package/viewer/assets/UmdViewer-BV_C7-QC.js +0 -3
  254. package/viewer/assets/XlsxTable-B3gt0BRc.js +0 -5
  255. package/viewer/assets/__vite-browser-external-4zOfcZki.js +0 -1
  256. package/viewer/assets/architecture-7EHR7CIX-SZfMq0T-.js +0 -1
  257. package/viewer/assets/architectureDiagram-3BPJPVTR-NhnkJCQk.js +0 -36
  258. package/viewer/assets/archive-BCYExDTt.js +0 -2
  259. package/viewer/assets/audio-DyKOGNoB.js +0 -2
  260. package/viewer/assets/cad-X6fHTob3.js +0 -2
  261. package/viewer/assets/channel-t0jydsTy.js +0 -1
  262. package/viewer/assets/chunk-55IACEB6-Ddx8r-cT.js +0 -1
  263. package/viewer/assets/chunk-AGHRB4JF-Bp3D13tN.js +0 -1
  264. package/viewer/assets/chunk-K2UTITRG-DVRoJJYJ.js +0 -35
  265. package/viewer/assets/chunk-LZXEDZCA-fZu08oS2.js +0 -2
  266. package/viewer/assets/chunk-QZHKN3VN-Fg_X1rG4.js +0 -1
  267. package/viewer/assets/chunk-WU5MYG2G-BGIX6we7.js +0 -1
  268. package/viewer/assets/classDiagram-4FO5ZUOK-BYZ4FOo_.js +0 -1
  269. package/viewer/assets/classDiagram-v2-Q7XG4LA2-DuchuCsI.js +0 -1
  270. package/viewer/assets/compare-BDsbatdp.css +0 -1
  271. package/viewer/assets/compare-CaIbij3A.js +0 -1
  272. package/viewer/assets/core-jd_XA2DR.js +0 -3
  273. package/viewer/assets/cose-bilkent-S5V4N54A-DmYXhVYe.js +0 -1
  274. package/viewer/assets/cpp-5qXNyrbZ.js +0 -1
  275. package/viewer/assets/dist-CP5u4RQ7.js +0 -7
  276. package/viewer/assets/docx-preview-HLZcXk8x.js +0 -20
  277. package/viewer/assets/drawing-nZ3hKOuj.js +0 -2
  278. package/viewer/assets/ebook-Dg6QYLrm.js +0 -2
  279. package/viewer/assets/eda-6lhgdEsa.js +0 -2
  280. package/viewer/assets/email-B8Pjza3z.js +0 -2
  281. package/viewer/assets/eventmodeling-FCH6USID-DY_1pO49.js +0 -1
  282. package/viewer/assets/gitGraph-WXDBUCRP-DkbGK_l8.js +0 -1
  283. package/viewer/assets/image-BqV53LfN.js +0 -2
  284. package/viewer/assets/image-GAAHSSAO-CflKrgYb.js +0 -1
  285. package/viewer/assets/info-J43DQDTF-DSuj3Emf.js +0 -1
  286. package/viewer/assets/java-Bt-CuAbH.js +0 -1
  287. package/viewer/assets/javascript-ByQvC393.js +0 -1
  288. package/viewer/assets/main-DiKVn7u-.js +0 -4
  289. package/viewer/assets/main-Qy_H7MQU.css +0 -1
  290. package/viewer/assets/md-ZsTh5p5_.js +0 -2
  291. package/viewer/assets/mermaid-parser.core-BGXVtjga.js +0 -161
  292. package/viewer/assets/model-WJMzK3Bx.js +0 -2
  293. package/viewer/assets/nestedRender-BYf7LsWF.js +0 -3
  294. package/viewer/assets/ofd-hH7Lx5fE.js +0 -2
  295. package/viewer/assets/package-BzUY3Le1.js +0 -296
  296. package/viewer/assets/package-avoqJ--x.css +0 -1
  297. package/viewer/assets/packet-YPE3B663-DqBKru-C.js +0 -1
  298. package/viewer/assets/pdf-DUcu0vwy.js +0 -2
  299. package/viewer/assets/percentages-BXMCSKIN-C5naDcRH.js +0 -1
  300. package/viewer/assets/pie-LRSECV5Y-DgIgfV4D.js +0 -1
  301. package/viewer/assets/pptx-BhaDWkfM.js +0 -2
  302. package/viewer/assets/radar-GUYGQ44K-DDAIGbwM.js +0 -1
  303. package/viewer/assets/renderer-DgCTjHNM.js +0 -1
  304. package/viewer/assets/rust-ByqymhlZ.js +0 -1
  305. package/viewer/assets/stateDiagram-v2-BHNVJYJU-Dge3aXLV.js +0 -1
  306. package/viewer/assets/subset-shared.chunk-3OFU-pwz.js +0 -1
  307. package/viewer/assets/text-BIuCfuAP.js +0 -2
  308. package/viewer/assets/treeView-BLDUP644-ChlIgn-W.js +0 -1
  309. package/viewer/assets/treemap-LRROVOQU-BAyamQqb.js +0 -1
  310. package/viewer/assets/typescript-CavFMSnb.js +0 -1
  311. package/viewer/assets/typst-SgSPYOMT.js +0 -2
  312. package/viewer/assets/umd-B8xdAyvH.js +0 -2
  313. package/viewer/assets/wardley-L42UT6IY-2zg3KYzM.js +0 -1
  314. package/viewer/assets/word-DHSOzOoC.js +0 -126
  315. package/viewer/assets/xlsx-CW-rEu9c.js +0 -2
  316. package/viewer/assets/yaml-BmvXLson.js +0 -1
  317. /package/viewer/assets/{bash-S8eE0ZTO.js → bash-LmRjUKlR.js} +0 -0
  318. /package/viewer/assets/{chunk-6U3AYISY-D3Imc8oH.js → chunk-6U3AYISY-C6-Mtja1.js} +0 -0
  319. /package/viewer/assets/{chunk-Z3N5DIM6-DxbXKGME.js → chunk-Z3N5DIM6-D9TMVU7m.js} +0 -0
  320. /package/viewer/assets/{chunk-ZUYEQ4TG-D5ZmrcSz.js → chunk-ZUYEQ4TG-BzFOpW--.js} +0 -0
  321. /package/viewer/assets/{csharp-DyDx6xfk.js → csharp-GZmu99Fo.js} +0 -0
  322. /package/viewer/assets/{css-EhEuVXep.js → css-D5l_8KUR.js} +0 -0
  323. /package/viewer/assets/{defaultLocale-Be9Eo3DJ.js → defaultLocale-C8Fc0cco.js} +0 -0
  324. /package/viewer/assets/{diff-C7rShVzh.js → diff-CJb8JxGC.js} +0 -0
  325. /package/viewer/assets/{directory-open-01563666-DZbHD0S2.js → directory-open-01563666-D4xXyWb_.js} +0 -0
  326. /package/viewer/assets/{fflate.module-CET2rj3S.js → fflate.module-BIQmJeC9.js} +0 -0
  327. /package/viewer/assets/{file-open-002ab408-B9k9Qrj1.js → file-open-002ab408-BHUWm0Sh.js} +0 -0
  328. /package/viewer/assets/{file-open-7c801643-zM-3dRdG.js → file-open-7c801643-DZtJT5zp.js} +0 -0
  329. /package/viewer/assets/{file-save-3189631c-ByhXkl1_.js → file-save-3189631c-CO9S4HFW.js} +0 -0
  330. /package/viewer/assets/{file-save-745eba88-Dl2X9_bt.js → file-save-745eba88-Bwdfz6OZ.js} +0 -0
  331. /package/viewer/assets/{global-compiler-55_NTk_S.js → global-compiler-D1EEBbpA.js} +0 -0
  332. /package/viewer/assets/{global-renderer-BjQLhJVE.js → global-renderer-AKzBLvRw.js} +0 -0
  333. /package/viewer/assets/{go-DwST4yyI.js → go-B-PCS5zA.js} +0 -0
  334. /package/viewer/assets/{graphlib-BtaXJDGg.js → graphlib-B8gBHxth.js} +0 -0
  335. /package/viewer/assets/{image-blob-reduce.esm-z38uXItA.js → image-blob-reduce.esm-NzmDxm1v.js} +0 -0
  336. /package/viewer/assets/{ini-1rCXzZpj.js → ini-B1CroMsf.js} +0 -0
  337. /package/viewer/assets/{init-L_XUKIOb.js → init-D6jRqBbL.js} +0 -0
  338. /package/viewer/assets/{json-BAKNGepy.js → json-DS4EA3dC.js} +0 -0
  339. /package/viewer/assets/{katex-CX8BRU-l.js → katex-Vhh-h91d.js} +0 -0
  340. /package/viewer/assets/{libarchive-BAtGUHS7.js → libarchive-DknIq1tb.js} +0 -0
  341. /package/viewer/assets/{markdown-BcrQOQXE.js → markdown-C8bVcNXx.js} +0 -0
  342. /package/viewer/assets/{mp4-8ORj0kfb.js → mp4-Dho29Zd7.js} +0 -0
  343. /package/viewer/assets/{php-CPVBpRrh.js → php-5k5YNuRS.js} +0 -0
  344. /package/viewer/assets/{postal-mime-BmZ9KSZh.js → postal-mime-kkzCFkih.js} +0 -0
  345. /package/viewer/assets/{printLayout-ChXxuL39.js → printLayout-D2pf0W9y.js} +0 -0
  346. /package/viewer/assets/{python-Lq7lY5pJ.js → python-DwhXSSGr.js} +0 -0
  347. /package/viewer/assets/{roundRect-CO90fevV.js → roundRect-D01gJrlt.js} +0 -0
  348. /package/viewer/assets/{sql-k7828v9s.js → sql-DWRKyvJ-.js} +0 -0
  349. /package/viewer/assets/{src-DgPMd_PO.js → src-BrOGWJpF.js} +0 -0
  350. /package/viewer/assets/{wasm-D8RgCHep.js → wasm-C3ukMqzA.js} +0 -0
  351. /package/viewer/assets/{wasm-pack-shim-PvChQaoQ.js → wasm-pack-shim-BShYmbRf.js} +0 -0
  352. /package/viewer/assets/{wasm-pack-shim-C7VIdtxY.js → wasm-pack-shim-BnuNh1z7.js} +0 -0
  353. /package/viewer/assets/{worker-ref-AQYU8C4A.js → worker-ref-BbTnHTC-.js} +0 -0
  354. /package/viewer/assets/{xml-CN7UyfCr.js → xml-DasnpDVC.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{At as e,Bt as t,C as n,Ct as r,E as i,Et as a,Ft as o,K as s,Tt as c,V as l,Z as u,_t as d,c as f,dt as p,et as m,f as h,ft as g,gt as _,h as v,l as y,m as b,p as x,pt as S,q as C,rt as w,tt as T,u as E,v as D,w as O,wt as k,y as A,yt as j,z as M,zt as N}from"./three.module-B3kUtiXa.js";var P=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),F=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.VERSION=void 0,e.VERSION=`9.0.1`}),I=P((e,t)=>{var n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,`__esModule`,{value:!0}),e.toFastProperties=e.timer=e.peek=e.isES2015MapSupported=e.PRINT_WARNING=e.PRINT_ERROR=e.packArray=e.IDENTITY=e.NOOP=e.merge=e.groupBy=e.defaults=e.assignNoOverwrite=e.assign=e.zipObject=e.sortBy=e.indexOf=e.some=e.difference=e.every=e.isObject=e.isRegExp=e.isArray=e.partial=e.uniq=e.compact=e.reduce=e.findAll=e.find=e.cloneObj=e.cloneArr=e.contains=e.has=e.pick=e.reject=e.filter=e.dropRight=e.drop=e.isFunction=e.isUndefined=e.isString=e.forEach=e.last=e.first=e.flatten=e.map=e.mapValues=e.values=e.keys=e.isEmpty=void 0;function r(e){return e&&e.length===0}e.isEmpty=r;function i(e){return e==null?[]:Object.keys(e)}e.keys=i;function a(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}e.values=a;function o(e,t){for(var n=[],r=i(e),a=0;a<r.length;a++){var o=r[a];n.push(t.call(null,e[o],o))}return n}e.mapValues=o;function s(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}e.map=s;function c(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(c(r)):t.push(r)}return t}e.flatten=c;function l(e){return r(e)?void 0:e[0]}e.first=l;function u(e){var t=e&&e.length;return t?e[t-1]:void 0}e.last=u;function d(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else if(M(e))for(var r=i(e),n=0;n<r.length;n++){var a=r[n],o=e[a];t.call(null,o,a)}else throw Error(`non exhaustive match`)}e.forEach=d;function f(e){return typeof e==`string`}e.isString=f;function p(e){return e===void 0}e.isUndefined=p;function m(e){return e instanceof Function}e.isFunction=m;function h(e,t){return t===void 0&&(t=1),e.slice(t,e.length)}e.drop=h;function g(e,t){return t===void 0&&(t=1),e.slice(0,e.length-t)}e.dropRight=g;function _(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}e.filter=_;function v(e,t){return _(e,function(e){return!t(e)})}e.reject=v;function y(e,t){for(var n=Object.keys(e),r={},i=0;i<n.length;i++){var a=n[i],o=e[a];t(o)&&(r[a]=o)}return r}e.pick=y;function b(e,t){return M(e)?e.hasOwnProperty(t):!1}e.has=b;function x(e,t){return w(e,function(e){return e===t})!==void 0}e.contains=x;function S(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}e.cloneArr=S;function C(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}e.cloneObj=C;function w(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}e.find=w;function T(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}e.findAll=T;function E(e,t,n){for(var r=Array.isArray(e),o=r?e:a(e),s=r?[]:i(e),c=n,l=0;l<o.length;l++)c=t.call(null,c,o[l],r?l:s[l]);return c}e.reduce=E;function D(e){return v(e,function(e){return e==null})}e.compact=D;function O(e,t){t===void 0&&(t=function(e){return e});var n=[];return E(e,function(e,r){var i=t(r);return x(n,i)?e:(n.push(i),e.concat(r))},[])}e.uniq=O;function k(e){var t=[...arguments].slice(1),n=[null].concat(t);return Function.bind.apply(e,n)}e.partial=k;function A(e){return Array.isArray(e)}e.isArray=A;function j(e){return e instanceof RegExp}e.isRegExp=j;function M(e){return e instanceof Object}e.isObject=M;function N(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}e.every=N;function P(e,t){return v(e,function(e){return x(t,e)})}e.difference=P;function F(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}e.some=F;function I(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}e.indexOf=I;function ee(e,t){var n=S(e);return n.sort(function(e,n){return t(e)-t(n)}),n}e.sortBy=ee;function te(e,t){if(e.length!==t.length)throw Error(`can't zipObject with different number of keys and values!`);for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}e.zipObject=te;function ne(e){for(var t=[...arguments].slice(1),n=0;n<t.length;n++)for(var r=t[n],a=i(r),o=0;o<a.length;o++){var s=a[o];e[s]=r[s]}return e}e.assign=ne;function L(e){for(var t=[...arguments].slice(1),n=0;n<t.length;n++)for(var r=t[n],a=i(r),o=0;o<a.length;o++){var s=a[o];b(e,s)||(e[s]=r[s])}return e}e.assignNoOverwrite=L;function R(){var e=[...arguments];return L.apply(void 0,n([{}],e))}e.defaults=R;function z(e,t){var n={};return d(e,function(e){var r=t(e),i=n[r];i?i.push(e):n[r]=[e]}),n}e.groupBy=z;function re(e,t){for(var n=C(e),r=i(t),a=0;a<r.length;a++){var o=r[a];n[o]=t[o]}return n}e.merge=re;function B(){}e.NOOP=B;function V(e){return e}e.IDENTITY=V;function H(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r===void 0?void 0:r)}return t}e.packArray=H;function U(e){console&&console.error&&console.error(`Error: `+e)}e.PRINT_ERROR=U;function W(e){console&&console.warn&&console.warn(`Warning: `+e)}e.PRINT_WARNING=W;function G(){return typeof Map==`function`}e.isES2015MapSupported=G;function ie(e){return e[e.length-1]}e.peek=ie;function ae(e){var t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}e.timer=ae;function K(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}e.toFastProperties=K}),ee=P((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.regexpToAst=n()})(typeof self<`u`?self:e,function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);var t=this.disjunction();this.consumeChar(`/`);for(var n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case`g`:o(n,`global`);break;case`i`:o(n,`ignoreCase`);break;case`m`:o(n,`multiLine`);break;case`u`:o(n,`unicode`);break;case`y`:o(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}},e.prototype.disjunction=function(){var e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}},e.prototype.alternative=function(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){var 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(`?`);var t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break}s(t);var n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}c()},e.prototype.quantifier=function(e){var t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:var r=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:r,atMost:r};break;case`,`:var i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:r,atMost:i}):t={atLeast:r,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;s(t);break}if(!(e===!0&&t===void 0))return s(t),this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t},e.prototype.atom=function(){var e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),s(e),e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[i(`
1
+ import{At as e,Bt as t,C as n,Ct as r,E as i,Et as a,Ft as o,K as s,Tt as c,V as l,Z as u,_t as d,c as f,dt as p,et as m,f as h,ft as g,gt as _,h as v,l as y,m as b,p as x,pt as S,q as C,rt as w,tt as T,u as E,v as D,w as O,wt as k,y as A,yt as j,z as M,zt as N}from"./three.module-BFsVh7r1.js";var P=(e,t)=>()=>(t||(t={exports:{}},e(t.exports,t)),t.exports),F=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.VERSION=void 0,e.VERSION=`9.0.1`}),I=P((e,t)=>{var n=e&&e.__spreadArray||function(e,t){for(var n=0,r=t.length,i=e.length;n<r;n++,i++)e[i]=t[n];return e};Object.defineProperty(e,"__esModule",{value:!0}),e.toFastProperties=e.timer=e.peek=e.isES2015MapSupported=e.PRINT_WARNING=e.PRINT_ERROR=e.packArray=e.IDENTITY=e.NOOP=e.merge=e.groupBy=e.defaults=e.assignNoOverwrite=e.assign=e.zipObject=e.sortBy=e.indexOf=e.some=e.difference=e.every=e.isObject=e.isRegExp=e.isArray=e.partial=e.uniq=e.compact=e.reduce=e.findAll=e.find=e.cloneObj=e.cloneArr=e.contains=e.has=e.pick=e.reject=e.filter=e.dropRight=e.drop=e.isFunction=e.isUndefined=e.isString=e.forEach=e.last=e.first=e.flatten=e.map=e.mapValues=e.values=e.keys=e.isEmpty=void 0;function r(e){return e&&e.length===0}e.isEmpty=r;function i(e){return e==null?[]:Object.keys(e)}e.keys=i;function a(e){for(var t=[],n=Object.keys(e),r=0;r<n.length;r++)t.push(e[n[r]]);return t}e.values=a;function o(e,t){for(var n=[],r=i(e),a=0;a<r.length;a++){var o=r[a];n.push(t.call(null,e[o],o))}return n}e.mapValues=o;function s(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t.call(null,e[r],r));return n}e.map=s;function c(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];Array.isArray(r)?t=t.concat(c(r)):t.push(r)}return t}e.flatten=c;function l(e){return r(e)?void 0:e[0]}e.first=l;function u(e){var t=e&&e.length;return t?e[t-1]:void 0}e.last=u;function d(e,t){if(Array.isArray(e))for(var n=0;n<e.length;n++)t.call(null,e[n],n);else if(M(e))for(var r=i(e),n=0;n<r.length;n++){var a=r[n],o=e[a];t.call(null,o,a)}else throw Error(`non exhaustive match`)}e.forEach=d;function f(e){return typeof e==`string`}e.isString=f;function p(e){return e===void 0}e.isUndefined=p;function m(e){return e instanceof Function}e.isFunction=m;function h(e,t){return t===void 0&&(t=1),e.slice(t,e.length)}e.drop=h;function g(e,t){return t===void 0&&(t=1),e.slice(0,e.length-t)}e.dropRight=g;function _(e,t){var n=[];if(Array.isArray(e))for(var r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}e.filter=_;function v(e,t){return _(e,function(e){return!t(e)})}e.reject=v;function y(e,t){for(var n=Object.keys(e),r={},i=0;i<n.length;i++){var a=n[i],o=e[a];t(o)&&(r[a]=o)}return r}e.pick=y;function b(e,t){return M(e)?e.hasOwnProperty(t):!1}e.has=b;function x(e,t){return w(e,function(e){return e===t})!==void 0}e.contains=x;function S(e){for(var t=[],n=0;n<e.length;n++)t.push(e[n]);return t}e.cloneArr=S;function C(e){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}e.cloneObj=C;function w(e,t){for(var n=0;n<e.length;n++){var r=e[n];if(t.call(null,r))return r}}e.find=w;function T(e,t){for(var n=[],r=0;r<e.length;r++){var i=e[r];t.call(null,i)&&n.push(i)}return n}e.findAll=T;function E(e,t,n){for(var r=Array.isArray(e),o=r?e:a(e),s=r?[]:i(e),c=n,l=0;l<o.length;l++)c=t.call(null,c,o[l],r?l:s[l]);return c}e.reduce=E;function D(e){return v(e,function(e){return e==null})}e.compact=D;function O(e,t){t===void 0&&(t=function(e){return e});var n=[];return E(e,function(e,r){var i=t(r);return x(n,i)?e:(n.push(i),e.concat(r))},[])}e.uniq=O;function k(e){var t=[...arguments].slice(1),n=[null].concat(t);return Function.bind.apply(e,n)}e.partial=k;function A(e){return Array.isArray(e)}e.isArray=A;function j(e){return e instanceof RegExp}e.isRegExp=j;function M(e){return e instanceof Object}e.isObject=M;function N(e,t){for(var n=0;n<e.length;n++)if(!t(e[n],n))return!1;return!0}e.every=N;function P(e,t){return v(e,function(e){return x(t,e)})}e.difference=P;function F(e,t){for(var n=0;n<e.length;n++)if(t(e[n]))return!0;return!1}e.some=F;function I(e,t){for(var n=0;n<e.length;n++)if(e[n]===t)return n;return-1}e.indexOf=I;function ee(e,t){var n=S(e);return n.sort(function(e,n){return t(e)-t(n)}),n}e.sortBy=ee;function te(e,t){if(e.length!==t.length)throw Error(`can't zipObject with different number of keys and values!`);for(var n={},r=0;r<e.length;r++)n[e[r]]=t[r];return n}e.zipObject=te;function ne(e){for(var t=[...arguments].slice(1),n=0;n<t.length;n++)for(var r=t[n],a=i(r),o=0;o<a.length;o++){var s=a[o];e[s]=r[s]}return e}e.assign=ne;function L(e){for(var t=[...arguments].slice(1),n=0;n<t.length;n++)for(var r=t[n],a=i(r),o=0;o<a.length;o++){var s=a[o];b(e,s)||(e[s]=r[s])}return e}e.assignNoOverwrite=L;function R(){var e=[...arguments];return L.apply(void 0,n([{}],e))}e.defaults=R;function z(e,t){var n={};return d(e,function(e){var r=t(e),i=n[r];i?i.push(e):n[r]=[e]}),n}e.groupBy=z;function re(e,t){for(var n=C(e),r=i(t),a=0;a<r.length;a++){var o=r[a];n[o]=t[o]}return n}e.merge=re;function B(){}e.NOOP=B;function V(e){return e}e.IDENTITY=V;function H(e){for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r===void 0?void 0:r)}return t}e.packArray=H;function U(e){console&&console.error&&console.error(`Error: `+e)}e.PRINT_ERROR=U;function W(e){console&&console.warn&&console.warn(`Warning: `+e)}e.PRINT_WARNING=W;function G(){return typeof Map==`function`}e.isES2015MapSupported=G;function ie(e){return e[e.length-1]}e.peek=ie;function ae(e){var t=new Date().getTime(),n=e();return{time:new Date().getTime()-t,value:n}}e.timer=ae;function K(e){function t(){}t.prototype=e;var n=new t;function r(){return typeof n.bar}return r(),r(),e}e.toFastProperties=K}),ee=P((e,t)=>{(function(e,n){typeof define==`function`&&define.amd?define([],n):typeof t==`object`&&t.exports?t.exports=n():e.regexpToAst=n()})(typeof self<`u`?self:e,function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(e){this.idx=e.idx,this.input=e.input,this.groupIdx=e.groupIdx},e.prototype.pattern=function(e){this.idx=0,this.input=e,this.groupIdx=0,this.consumeChar(`/`);var t=this.disjunction();this.consumeChar(`/`);for(var n={type:`Flags`,loc:{begin:this.idx,end:e.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case`g`:o(n,`global`);break;case`i`:o(n,`ignoreCase`);break;case`m`:o(n,`multiLine`);break;case`u`:o(n,`unicode`);break;case`y`:o(n,`sticky`);break}if(this.idx!==this.input.length)throw Error(`Redundant input: `+this.input.substring(this.idx));return{type:`Pattern`,flags:n,value:t,loc:this.loc(0)}},e.prototype.disjunction=function(){var e=[],t=this.idx;for(e.push(this.alternative());this.peekChar()===`|`;)this.consumeChar(`|`),e.push(this.alternative());return{type:`Disjunction`,value:e,loc:this.loc(t)}},e.prototype.alternative=function(){for(var e=[],t=this.idx;this.isTerm();)e.push(this.term());return{type:`Alternative`,value:e,loc:this.loc(t)}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){var 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(`?`);var t;switch(this.popChar()){case`=`:t=`Lookahead`;break;case`!`:t=`NegativeLookahead`;break}s(t);var n=this.disjunction();return this.consumeChar(`)`),{type:t,value:n,loc:this.loc(e)}}c()},e.prototype.quantifier=function(e){var t,n=this.idx;switch(this.popChar()){case`*`:t={atLeast:0,atMost:1/0};break;case`+`:t={atLeast:1,atMost:1/0};break;case`?`:t={atLeast:0,atMost:1};break;case`{`:var r=this.integerIncludingZero();switch(this.popChar()){case`}`:t={atLeast:r,atMost:r};break;case`,`:var i;this.isDigit()?(i=this.integerIncludingZero(),t={atLeast:r,atMost:i}):t={atLeast:r,atMost:1/0},this.consumeChar(`}`);break}if(e===!0&&t===void 0)return;s(t);break}if(!(e===!0&&t===void 0))return s(t),this.peekChar(0)===`?`?(this.consumeChar(`?`),t.greedy=!1):t.greedy=!0,t.type=`Quantifier`,t.loc=this.loc(n),t},e.prototype.atom=function(){var e,t=this.idx;switch(this.peekChar()){case`.`:e=this.dotAll();break;case`\\`:e=this.atomEscape();break;case`[`:e=this.characterClass();break;case`(`:e=this.group();break}return e===void 0&&this.isPatternCharacter()&&(e=this.patternCharacter()),s(e),e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e},e.prototype.dotAll=function(){return this.consumeChar(`.`),{type:`Set`,complement:!0,value:[i(`
2
2
  `),i(`\r`),i(`\u2028`),i(`\u2029`)]}},e.prototype.atomEscape=function(){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()}},e.prototype.decimalEscapeAtom=function(){return{type:`GroupBackReference`,value:this.positiveInteger()}},e.prototype.characterClassEscape=function(){var e,t=!1;switch(this.popChar()){case`d`:e=u;break;case`D`:e=u,t=!0;break;case`s`:e=f;break;case`S`:e=f,t=!0;break;case`w`:e=d;break;case`W`:e=d,t=!0;break}return s(e),{type:`Set`,value:e,complement:t}},e.prototype.controlEscapeAtom=function(){var e;switch(this.popChar()){case`f`:e=i(`\f`);break;case`n`:e=i(`
3
3
  `);break;case`r`:e=i(`\r`);break;case`t`:e=i(` `);break;case`v`:e=i(`\v`);break}return s(e),{type:`Character`,value:e}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar(`c`);var e=this.popChar();if(/[a-zA-Z]/.test(e)===!1)throw Error(`Invalid `);return{type:`Character`,value:e.toUpperCase().charCodeAt(0)-64}},e.prototype.nulCharacterAtom=function(){return this.consumeChar(`0`),{type:`Character`,value:i(`\0`)}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar(`x`),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar(`u`),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){return{type:`Character`,value:i(this.popChar())}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case`
4
4
  `:case`\r`:case`\u2028`:case`\u2029`:case`\\`:case`]`:throw Error(`TBD`);default:return{type:`Character`,value:i(this.popChar())}}},e.prototype.characterClass=function(){var e=[],t=!1;for(this.consumeChar(`[`),this.peekChar(0)===`^`&&(this.consumeChar(`^`),t=!0);this.isClassAtom();){var n=this.classAtom();if(n.type===`Character`&&this.isRangeDash()){this.consumeChar(`-`);var r=this.classAtom();if(r.type===`Character`){if(r.value<n.value)throw Error(`Range out of order in character class`);e.push({from:n.value,to:r.value})}else a(n.value,e),e.push(i(`-`)),a(r.value,e)}else a(n.value,e)}return this.consumeChar(`]`),{type:`Set`,complement:t,value:e}},e.prototype.classAtom=function(){switch(this.peekChar()){case`]`:case`
@@ -6,7 +6,7 @@ import{At as e,Bt as t,C as n,Ct as r,E as i,Et as a,Ft as o,K as s,Tt as c,V as
6
6
  `: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:i(e)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case`g`:case`i`:case`m`:case`u`:case`y`:return!0;default:return!1}},e.prototype.isRangeDash=function(){return this.peekChar()===`-`&&this.isClassAtom(1)},e.prototype.isDigit=function(){return n.test(this.peekChar(0))},e.prototype.isClassAtom=function(e){switch(e===void 0&&(e=0),this.peekChar(e)){case`]`:case`
7
7
  `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case`.`:case`\\`:case`[`:case`(`:return!0;default:return!1}},e.prototype.isAssertion=function(){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)===`!`);default:return!1}},e.prototype.isQuantifier=function(){var e=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(e)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case`^`:case`$`:case`\\`:case`.`:case`*`:case`+`:case`?`:case`(`:case`)`:case`[`:case`|`:case`/`:case`
8
8
  `:case`\r`:case`\u2028`:case`\u2029`:return!1;default:return!0}},e.prototype.parseHexDigits=function(e){for(var n=``,r=0;r<e;r++){var i=this.popChar();if(t.test(i)===!1)throw Error(`Expecting a HexDecimal digits`);n+=i}return{type:`Character`,value:parseInt(n,16)}},e.prototype.peekChar=function(e){return e===void 0&&(e=0),this.input[this.idx+e]},e.prototype.popChar=function(){var e=this.peekChar(0);return this.consumeChar(),e},e.prototype.consumeChar=function(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++},e.prototype.loc=function(e){return{begin:e,end:this.idx}};var t=/[0-9a-fA-F]/,n=/[0-9]/,r=/[1-9]/;function i(e){return e.charCodeAt(0)}function a(e,t){e.length===void 0?t.push(e):e.forEach(function(e){t.push(e)})}function o(e,t){if(e[t]===!0)throw`duplicate flag `+t;e[t]=!0}function s(e){if(e===void 0)throw Error(`Internal Error - Should never get here!`)}function c(){throw Error(`Internal Error - Should never get here!`)}var l,u=[];for(l=i(`0`);l<=i(`9`);l++)u.push(l);var d=[i(`_`)].concat(u);for(l=i(`a`);l<=i(`z`);l++)d.push(l);for(l=i(`A`);l<=i(`Z`);l++)d.push(l);var f=[i(` `),i(`\f`),i(`
9
- `),i(`\r`),i(` `),i(`\v`),i(` `),i(`\xA0`),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(`\u2028`),i(`\u2029`),i(` `),i(` `),i(` `),i(``)];function p(){}return p.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(function(e){this.visit(e)},this):this.visit(n))}},p.prototype.visit=function(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`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)},p.prototype.visitPattern=function(e){},p.prototype.visitFlags=function(e){},p.prototype.visitDisjunction=function(e){},p.prototype.visitAlternative=function(e){},p.prototype.visitStartAnchor=function(e){},p.prototype.visitEndAnchor=function(e){},p.prototype.visitWordBoundary=function(e){},p.prototype.visitNonWordBoundary=function(e){},p.prototype.visitLookahead=function(e){},p.prototype.visitNegativeLookahead=function(e){},p.prototype.visitCharacter=function(e){},p.prototype.visitSet=function(e){},p.prototype.visitGroup=function(e){},p.prototype.visitGroupBackReference=function(e){},p.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:p,VERSION:`0.5.0`}})}),te=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.clearRegExpParserCache=e.getRegExpAst=void 0;var t=ee(),n={},r=new t.RegExpParser;function i(e){var t=e.toString();if(n.hasOwnProperty(t))return n[t];var i=r.pattern(t);return n[t]=i,i}e.getRegExpAst=i;function a(){n={}}e.clearRegExpParserCache=a}),ne=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.canMatchCharCode=e.firstCharOptimizedIndices=e.getOptimizedStartCodesIndices=e.failedOptimizationPrefixMsg=void 0;var n=ee(),r=I(),i=te(),a=L(),o=`Complement Sets are not supported for first char optimization`;e.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations:
9
+ `),i(`\r`),i(` `),i(`\v`),i(` `),i(`\xA0`),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(` `),i(`\u2028`),i(`\u2029`),i(` `),i(` `),i(` `),i(``)];function p(){}return p.prototype.visitChildren=function(e){for(var t in e){var n=e[t];e.hasOwnProperty(t)&&(n.type===void 0?Array.isArray(n)&&n.forEach(function(e){this.visit(e)},this):this.visit(n))}},p.prototype.visit=function(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`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)},p.prototype.visitPattern=function(e){},p.prototype.visitFlags=function(e){},p.prototype.visitDisjunction=function(e){},p.prototype.visitAlternative=function(e){},p.prototype.visitStartAnchor=function(e){},p.prototype.visitEndAnchor=function(e){},p.prototype.visitWordBoundary=function(e){},p.prototype.visitNonWordBoundary=function(e){},p.prototype.visitLookahead=function(e){},p.prototype.visitNegativeLookahead=function(e){},p.prototype.visitCharacter=function(e){},p.prototype.visitSet=function(e){},p.prototype.visitGroup=function(e){},p.prototype.visitGroupBackReference=function(e){},p.prototype.visitQuantifier=function(e){},{RegExpParser:e,BaseRegExpVisitor:p,VERSION:`0.5.0`}})}),te=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.clearRegExpParserCache=e.getRegExpAst=void 0;var t=ee(),n={},r=new t.RegExpParser;function i(e){var t=e.toString();if(n.hasOwnProperty(t))return n[t];var i=r.pattern(t);return n[t]=i,i}e.getRegExpAst=i;function a(){n={}}e.clearRegExpParserCache=a}),ne=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.canMatchCharCode=e.firstCharOptimizedIndices=e.getOptimizedStartCodesIndices=e.failedOptimizationPrefixMsg=void 0;var n=ee(),r=I(),i=te(),a=L(),o=`Complement Sets are not supported for first char optimization`;e.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations:
10
10
  `;function s(t,a){a===void 0&&(a=!1);try{var s=i.getRegExpAst(t);return c(s.value,{},s.flags.ignoreCase)}catch(i){if(i.message===o)a&&r.PRINT_WARNING(``+e.failedOptimizationPrefixMsg+(` Unable to optimize: < `+t.toString()+` >
11
11
  `)+` Complement Sets cannot be automatically optimized.
12
12
  This will disable the lexer's first char optimizations.
@@ -15,7 +15,7 @@ import{At as e,Bt as t,C as n,Ct as r,E as i,Et as a,Ft as o,K as s,Tt as c,V as
15
15
  See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),r.PRINT_ERROR(e.failedOptimizationPrefixMsg+`
16
16
  `+(` Failed parsing: < `+t.toString()+` >
17
17
  `)+(` Using the regexp-to-ast library version: `+n.VERSION+`
18
- `)+` Please open an issue at: https://github.com/bd82/regexp-to-ast/issues`+l)}}return[]}e.getOptimizedStartCodesIndices=s;function c(e,t,n){switch(e.type){case`Disjunction`:for(var i=0;i<e.value.length;i++)c(e.value[i],t,n);break;case`Alternative`:for(var s=e.value,i=0;i<s.length;i++){var u=s[i];switch(u.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}var d=u;switch(d.type){case`Character`:l(d.value,t,n);break;case`Set`:if(d.complement===!0)throw Error(o);r.forEach(d.value,function(e){if(typeof e==`number`)l(e,t,n);else{var r=e;if(n===!0)for(var i=r.from;i<=r.to;i++)l(i,t,n);else{for(var i=r.from;i<=r.to&&i<a.minOptimizationVal;i++)l(i,t,n);if(r.to>=a.minOptimizationVal)for(var o=r.from>=a.minOptimizationVal?r.from:a.minOptimizationVal,s=r.to,c=a.charCodeToOptimizedIndex(o),u=a.charCodeToOptimizedIndex(s),d=c;d<=u;d++)t[d]=d}}});break;case`Group`:c(d.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}var p=d.quantifier!==void 0&&d.quantifier.atLeast===0;if(d.type===`Group`&&f(d)===!1||d.type!==`Group`&&p===!1)break}break;default:throw Error(`non exhaustive match!`)}return r.values(t)}e.firstCharOptimizedIndices=c;function l(e,t,n){var r=a.charCodeToOptimizedIndex(e);t[r]=r,n===!0&&u(e,t)}function u(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=a.charCodeToOptimizedIndex(r.charCodeAt(0));t[i]=i}else{var o=n.toLowerCase();if(o!==n){var i=a.charCodeToOptimizedIndex(o.charCodeAt(0));t[i]=i}}}function d(e,t){return r.find(e.value,function(e){if(typeof e==`number`)return r.contains(t,e);var n=e;return r.find(t,function(e){return n.from<=e&&e<=n.to})!==void 0})}function f(e){return e.quantifier&&e.quantifier.atLeast===0?!0:e.value?r.isArray(e.value)?r.every(e.value,f):f(e.value):!1}var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return n.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case`Lookahead`:this.visitLookahead(t);return;case`NegativeLookahead`:this.visitNegativeLookahead(t);return}e.prototype.visitChildren.call(this,t)}},n.prototype.visitCharacter=function(e){r.contains(this.targetCharCodes,e.value)&&(this.found=!0)},n.prototype.visitSet=function(e){e.complement?d(e,this.targetCharCodes)===void 0&&(this.found=!0):d(e,this.targetCharCodes)!==void 0&&(this.found=!0)},n}(n.BaseRegExpVisitor);function m(e,t){if(t instanceof RegExp){var n=i.getRegExpAst(t),a=new p(e);return a.visit(n),a.found}else return r.find(t,function(t){return r.contains(e,t.charCodeAt(0))})!==void 0}e.canMatchCharCode=m}),L=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.charCodeToOptimizedIndex=e.minOptimizationVal=e.buildLineBreakIssueMessage=e.LineTerminatorOptimizedTester=e.isShortPattern=e.isCustomPattern=e.cloneEmptyGroups=e.performWarningRuntimeChecks=e.performRuntimeChecks=e.addStickyFlag=e.addStartOfInput=e.findUnreachablePatterns=e.findModesThatDoNotExist=e.findInvalidGroupType=e.findDuplicatePatterns=e.findUnsupportedFlags=e.findStartOfInputAnchor=e.findEmptyMatchRegExps=e.findEndOfInputAnchor=e.findInvalidPatterns=e.findMissingPatterns=e.validatePatterns=e.analyzeTokenTypes=e.enableSticky=e.disableSticky=e.SUPPORT_STICKY=e.MODES=e.DEFAULT_MODE=void 0;var n=ee(),r=re(),i=I(),a=ne(),o=te(),s=`PATTERN`;e.DEFAULT_MODE=`defaultMode`,e.MODES=`modes`,e.SUPPORT_STICKY=typeof RegExp(`(?:)`).sticky==`boolean`;function c(){e.SUPPORT_STICKY=!1}e.disableSticky=c;function l(){e.SUPPORT_STICKY=!0}e.enableSticky=l;function u(t,n){n=i.defaults(n,{useSticky:e.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
18
+ `)+` Please open an issue at: https://github.com/bd82/regexp-to-ast/issues`+l)}}return[]}e.getOptimizedStartCodesIndices=s;function c(e,t,n){switch(e.type){case`Disjunction`:for(var i=0;i<e.value.length;i++)c(e.value[i],t,n);break;case`Alternative`:for(var s=e.value,i=0;i<s.length;i++){var u=s[i];switch(u.type){case`EndAnchor`:case`GroupBackReference`:case`Lookahead`:case`NegativeLookahead`:case`StartAnchor`:case`WordBoundary`:case`NonWordBoundary`:continue}var d=u;switch(d.type){case`Character`:l(d.value,t,n);break;case`Set`:if(d.complement===!0)throw Error(o);r.forEach(d.value,function(e){if(typeof e==`number`)l(e,t,n);else{var r=e;if(n===!0)for(var i=r.from;i<=r.to;i++)l(i,t,n);else{for(var i=r.from;i<=r.to&&i<a.minOptimizationVal;i++)l(i,t,n);if(r.to>=a.minOptimizationVal)for(var o=r.from>=a.minOptimizationVal?r.from:a.minOptimizationVal,s=r.to,c=a.charCodeToOptimizedIndex(o),u=a.charCodeToOptimizedIndex(s),d=c;d<=u;d++)t[d]=d}}});break;case`Group`:c(d.value,t,n);break;default:throw Error(`Non Exhaustive Match`)}var p=d.quantifier!==void 0&&d.quantifier.atLeast===0;if(d.type===`Group`&&f(d)===!1||d.type!==`Group`&&p===!1)break}break;default:throw Error(`non exhaustive match!`)}return r.values(t)}e.firstCharOptimizedIndices=c;function l(e,t,n){var r=a.charCodeToOptimizedIndex(e);t[r]=r,n===!0&&u(e,t)}function u(e,t){var n=String.fromCharCode(e),r=n.toUpperCase();if(r!==n){var i=a.charCodeToOptimizedIndex(r.charCodeAt(0));t[i]=i}else{var o=n.toLowerCase();if(o!==n){var i=a.charCodeToOptimizedIndex(o.charCodeAt(0));t[i]=i}}}function d(e,t){return r.find(e.value,function(e){if(typeof e==`number`)return r.contains(t,e);var n=e;return r.find(t,function(e){return n.from<=e&&e<=n.to})!==void 0})}function f(e){return e.quantifier&&e.quantifier.atLeast===0?!0:e.value?r.isArray(e.value)?r.every(e.value,f):f(e.value):!1}var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.targetCharCodes=t,n.found=!1,n}return n.prototype.visitChildren=function(t){if(this.found!==!0){switch(t.type){case`Lookahead`:this.visitLookahead(t);return;case`NegativeLookahead`:this.visitNegativeLookahead(t);return}e.prototype.visitChildren.call(this,t)}},n.prototype.visitCharacter=function(e){r.contains(this.targetCharCodes,e.value)&&(this.found=!0)},n.prototype.visitSet=function(e){e.complement?d(e,this.targetCharCodes)===void 0&&(this.found=!0):d(e,this.targetCharCodes)!==void 0&&(this.found=!0)},n}(n.BaseRegExpVisitor);function m(e,t){if(t instanceof RegExp){var n=i.getRegExpAst(t),a=new p(e);return a.visit(n),a.found}else return r.find(t,function(t){return r.contains(e,t.charCodeAt(0))})!==void 0}e.canMatchCharCode=m}),L=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.charCodeToOptimizedIndex=e.minOptimizationVal=e.buildLineBreakIssueMessage=e.LineTerminatorOptimizedTester=e.isShortPattern=e.isCustomPattern=e.cloneEmptyGroups=e.performWarningRuntimeChecks=e.performRuntimeChecks=e.addStickyFlag=e.addStartOfInput=e.findUnreachablePatterns=e.findModesThatDoNotExist=e.findInvalidGroupType=e.findDuplicatePatterns=e.findUnsupportedFlags=e.findStartOfInputAnchor=e.findEmptyMatchRegExps=e.findEndOfInputAnchor=e.findInvalidPatterns=e.findMissingPatterns=e.validatePatterns=e.analyzeTokenTypes=e.enableSticky=e.disableSticky=e.SUPPORT_STICKY=e.MODES=e.DEFAULT_MODE=void 0;var n=ee(),r=re(),i=I(),a=ne(),o=te(),s=`PATTERN`;e.DEFAULT_MODE=`defaultMode`,e.MODES=`modes`,e.SUPPORT_STICKY=typeof RegExp(`(?:)`).sticky==`boolean`;function c(){e.SUPPORT_STICKY=!1}e.disableSticky=c;function l(){e.SUPPORT_STICKY=!0}e.enableSticky=l;function u(t,n){n=i.defaults(n,{useSticky:e.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:`full`,lineTerminatorCharacters:[`\r`,`
19
19
  `],tracer:function(e,t){return t()}});var o=n.tracer;o(`initCharCodeToOptimizedIndexMap`,function(){V()});var c;o(`Reject Lexer.NA`,function(){c=i.reject(t,function(e){return e[s]===r.Lexer.NA})});var l=!1,u;o(`Transform Patterns`,function(){l=!1,u=i.map(c,function(e){var t=e[s];if(i.isRegExp(t)){var r=t.source;return r.length===1&&r!==`^`&&r!==`$`&&r!==`.`&&!t.ignoreCase?r:r.length===2&&r[0]===`\\`&&!i.contains([`d`,`D`,`s`,`S`,`t`,`r`,`n`,`t`,`0`,`c`,`b`,`B`,`f`,`v`,`w`,`W`],r[1])?r[1]:n.useSticky?O(t):D(t)}else{if(i.isFunction(t))return l=!0,{exec:t};if(i.has(t,`exec`))return l=!0,t;if(typeof t==`string`){if(t.length===1)return t;var a=t.replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`),o=new RegExp(a);return n.useSticky?O(o):D(o)}else throw Error(`non exhaustive match`)}})});var d,f,p,m,h;o(`misc mapping`,function(){d=i.map(c,function(e){return e.tokenTypeIdx}),f=i.map(c,function(e){var t=e.GROUP;if(t!==r.Lexer.SKIPPED){if(i.isString(t))return t;if(i.isUndefined(t))return!1;throw Error(`non exhaustive match`)}}),p=i.map(c,function(e){var t=e.LONGER_ALT;if(t)return i.indexOf(c,t)}),m=i.map(c,function(e){return e.PUSH_MODE}),h=i.map(c,function(e){return i.has(e,`POP_MODE`)})});var g;o(`Line Terminator Handling`,function(){var e=L(n.lineTerminatorCharacters);g=i.map(c,function(e){return!1}),n.positionTracking!==`onlyOffset`&&(g=i.map(c,function(t){if(i.has(t,`LINE_BREAKS`))return t.LINE_BREAKS;if(P(t,e)===!1)return a.canMatchCharCode(e,t.PATTERN)}))});var _,v,y,b;o(`Misc Mapping #2`,function(){_=i.map(c,M),v=i.map(u,N),y=i.reduce(c,function(e,t){var n=t.GROUP;return i.isString(n)&&n!==r.Lexer.SKIPPED&&(e[n]=[]),e},{}),b=i.map(u,function(e,t){return{pattern:u[t],longerAlt:p[t],canLineTerminator:g[t],isCustom:_[t],short:v[t],group:f[t],push:m[t],pop:h[t],tokenTypeIdx:d[t],tokenType:c[t]}})});var x=!0,S=[];return n.safeMode||o(`First Char Optimization`,function(){S=i.reduce(c,function(e,t,r){if(typeof t.PATTERN==`string`)R(e,B(t.PATTERN.charCodeAt(0)),b[r]);else if(i.isArray(t.START_CHARS_HINT)){var o;i.forEach(t.START_CHARS_HINT,function(t){var n=B(typeof t==`string`?t.charCodeAt(0):t);o!==n&&(o=n,R(e,n,b[r]))})}else if(i.isRegExp(t.PATTERN))if(t.PATTERN.unicode)x=!1,n.ensureOptimizations&&i.PRINT_ERROR(``+a.failedOptimizationPrefixMsg+(` Unable to analyze < `+t.PATTERN.toString()+` > pattern.
20
20
  `)+` The regexp unicode flag is not currently supported by the regexp-to-ast library.
21
21
  This will disable the lexer's first char optimizations.
@@ -40,7 +40,7 @@ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.
40
40
  `)+(` Root cause: `+t.errMsg+`.
41
41
  `)+` For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===r.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
42
42
  `+(` The problem is in the <`+e.name+`> Token Type
43
- `)+` For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}e.buildLineBreakIssueMessage=F;function L(e){return i.map(e,function(e){return i.isString(e)&&e.length>0?e.charCodeAt(0):e})}function R(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}e.minOptimizationVal=256;var z=[];function B(t){return t<e.minOptimizationVal?t:z[t]}e.charCodeToOptimizedIndex=B;function V(){if(i.isEmpty(z)){z=Array(65536);for(var e=0;e<65536;e++)z[e]=e>255?255+~~(e/255):e}}}),R=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isTokenType=e.hasExtendingTokensTypesMapProperty=e.hasExtendingTokensTypesProperty=e.hasCategoriesProperty=e.hasShortKeyProperty=e.singleAssignCategoriesToksMap=e.assignCategoriesMapProp=e.assignCategoriesTokensProp=e.assignTokenDefaultProps=e.expandCategories=e.augmentTokenTypes=e.tokenIdxToClass=e.tokenShortNameIdx=e.tokenStructuredMatcherNoCategories=e.tokenStructuredMatcher=void 0;var t=I();function n(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}e.tokenStructuredMatcher=n;function r(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}e.tokenStructuredMatcherNoCategories=r,e.tokenShortNameIdx=1,e.tokenIdxToClass={};function i(e){var n=a(e);o(n),c(n),s(n),t.forEach(n,function(e){e.isParent=e.categoryMatches.length>0})}e.augmentTokenTypes=i;function a(e){for(var n=t.cloneArr(e),r=e,i=!0;i;){r=t.compact(t.flatten(t.map(r,function(e){return e.CATEGORIES})));var a=t.difference(r,n);n=n.concat(a),t.isEmpty(a)?i=!1:r=a}return n}e.expandCategories=a;function o(n){t.forEach(n,function(n){u(n)||(e.tokenIdxToClass[e.tokenShortNameIdx]=n,n.tokenTypeIdx=e.tokenShortNameIdx++),d(n)&&!t.isArray(n.CATEGORIES)&&(n.CATEGORIES=[n.CATEGORIES]),d(n)||(n.CATEGORIES=[]),f(n)||(n.categoryMatches=[]),p(n)||(n.categoryMatchesMap={})})}e.assignTokenDefaultProps=o;function s(n){t.forEach(n,function(n){n.categoryMatches=[],t.forEach(n.categoryMatchesMap,function(t,r){n.categoryMatches.push(e.tokenIdxToClass[r].tokenTypeIdx)})})}e.assignCategoriesTokensProp=s;function c(e){t.forEach(e,function(e){l([],e)})}e.assignCategoriesMapProp=c;function l(e,n){t.forEach(e,function(e){n.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.forEach(n.CATEGORIES,function(r){var i=e.concat(n);t.contains(i,r)||l(i,r)})}e.singleAssignCategoriesToksMap=l;function u(e){return t.has(e,`tokenTypeIdx`)}e.hasShortKeyProperty=u;function d(e){return t.has(e,`CATEGORIES`)}e.hasCategoriesProperty=d;function f(e){return t.has(e,`categoryMatches`)}e.hasExtendingTokensTypesProperty=f;function p(e){return t.has(e,`categoryMatchesMap`)}e.hasExtendingTokensTypesMapProperty=p;function m(e){return t.has(e,`tokenTypeIdx`)}e.isTokenType=m}),z=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultLexerErrorProvider=void 0,e.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(e){return`Unable to pop Lexer Mode after encountering Token ->`+e.image+`<- The Mode Stack is empty`},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return`unexpected character: ->`+e.charAt(t)+`<- at offset: `+t+`,`+(` skipped `+n+` characters.`)}}}),re=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Lexer=e.LexerDefinitionErrorType=void 0;var t=L(),n=I(),r=R(),i=z(),a=te();(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`})(e.LexerDefinitionErrorType||={});var o={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
43
+ `)+` For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error(`non exhaustive match`)}e.buildLineBreakIssueMessage=F;function L(e){return i.map(e,function(e){return i.isString(e)&&e.length>0?e.charCodeAt(0):e})}function R(e,t,n){e[t]===void 0?e[t]=[n]:e[t].push(n)}e.minOptimizationVal=256;var z=[];function B(t){return t<e.minOptimizationVal?t:z[t]}e.charCodeToOptimizedIndex=B;function V(){if(i.isEmpty(z)){z=Array(65536);for(var e=0;e<65536;e++)z[e]=e>255?255+~~(e/255):e}}}),R=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isTokenType=e.hasExtendingTokensTypesMapProperty=e.hasExtendingTokensTypesProperty=e.hasCategoriesProperty=e.hasShortKeyProperty=e.singleAssignCategoriesToksMap=e.assignCategoriesMapProp=e.assignCategoriesTokensProp=e.assignTokenDefaultProps=e.expandCategories=e.augmentTokenTypes=e.tokenIdxToClass=e.tokenShortNameIdx=e.tokenStructuredMatcherNoCategories=e.tokenStructuredMatcher=void 0;var t=I();function n(e,t){var n=e.tokenTypeIdx;return n===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[n]===!0}e.tokenStructuredMatcher=n;function r(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}e.tokenStructuredMatcherNoCategories=r,e.tokenShortNameIdx=1,e.tokenIdxToClass={};function i(e){var n=a(e);o(n),c(n),s(n),t.forEach(n,function(e){e.isParent=e.categoryMatches.length>0})}e.augmentTokenTypes=i;function a(e){for(var n=t.cloneArr(e),r=e,i=!0;i;){r=t.compact(t.flatten(t.map(r,function(e){return e.CATEGORIES})));var a=t.difference(r,n);n=n.concat(a),t.isEmpty(a)?i=!1:r=a}return n}e.expandCategories=a;function o(n){t.forEach(n,function(n){u(n)||(e.tokenIdxToClass[e.tokenShortNameIdx]=n,n.tokenTypeIdx=e.tokenShortNameIdx++),d(n)&&!t.isArray(n.CATEGORIES)&&(n.CATEGORIES=[n.CATEGORIES]),d(n)||(n.CATEGORIES=[]),f(n)||(n.categoryMatches=[]),p(n)||(n.categoryMatchesMap={})})}e.assignTokenDefaultProps=o;function s(n){t.forEach(n,function(n){n.categoryMatches=[],t.forEach(n.categoryMatchesMap,function(t,r){n.categoryMatches.push(e.tokenIdxToClass[r].tokenTypeIdx)})})}e.assignCategoriesTokensProp=s;function c(e){t.forEach(e,function(e){l([],e)})}e.assignCategoriesMapProp=c;function l(e,n){t.forEach(e,function(e){n.categoryMatchesMap[e.tokenTypeIdx]=!0}),t.forEach(n.CATEGORIES,function(r){var i=e.concat(n);t.contains(i,r)||l(i,r)})}e.singleAssignCategoriesToksMap=l;function u(e){return t.has(e,`tokenTypeIdx`)}e.hasShortKeyProperty=u;function d(e){return t.has(e,`CATEGORIES`)}e.hasCategoriesProperty=d;function f(e){return t.has(e,`categoryMatches`)}e.hasExtendingTokensTypesProperty=f;function p(e){return t.has(e,`categoryMatchesMap`)}e.hasExtendingTokensTypesMapProperty=p;function m(e){return t.has(e,`tokenTypeIdx`)}e.isTokenType=m}),z=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultLexerErrorProvider=void 0,e.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(e){return`Unable to pop Lexer Mode after encountering Token ->`+e.image+`<- The Mode Stack is empty`},buildUnexpectedCharactersMessage:function(e,t,n,r,i){return`unexpected character: ->`+e.charAt(t)+`<- at offset: `+t+`,`+(` skipped `+n+` characters.`)}}}),re=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Lexer=e.LexerDefinitionErrorType=void 0;var t=L(),n=I(),r=R(),i=z(),a=te();(function(e){e[e.MISSING_PATTERN=0]=`MISSING_PATTERN`,e[e.INVALID_PATTERN=1]=`INVALID_PATTERN`,e[e.EOI_ANCHOR_FOUND=2]=`EOI_ANCHOR_FOUND`,e[e.UNSUPPORTED_FLAGS_FOUND=3]=`UNSUPPORTED_FLAGS_FOUND`,e[e.DUPLICATE_PATTERNS_FOUND=4]=`DUPLICATE_PATTERNS_FOUND`,e[e.INVALID_GROUP_TYPE_FOUND=5]=`INVALID_GROUP_TYPE_FOUND`,e[e.PUSH_MODE_DOES_NOT_EXIST=6]=`PUSH_MODE_DOES_NOT_EXIST`,e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]=`MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE`,e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]=`MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY`,e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]=`MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST`,e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]=`LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED`,e[e.SOI_ANCHOR_FOUND=11]=`SOI_ANCHOR_FOUND`,e[e.EMPTY_MATCH_PATTERN=12]=`EMPTY_MATCH_PATTERN`,e[e.NO_LINE_BREAKS_FLAGS=13]=`NO_LINE_BREAKS_FLAGS`,e[e.UNREACHABLE_PATTERN=14]=`UNREACHABLE_PATTERN`,e[e.IDENTIFY_TERMINATOR=15]=`IDENTIFY_TERMINATOR`,e[e.CUSTOM_LINE_BREAK=16]=`CUSTOM_LINE_BREAK`})(e.LexerDefinitionErrorType||={});var o={deferDefinitionErrorsHandling:!1,positionTracking:`full`,lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
44
44
  `,`\r`],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:i.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1};Object.freeze(o),e.Lexer=function(){function e(e,i){var s=this;if(i===void 0&&(i=o),this.lexerDefinition=e,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.config=void 0,this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},typeof i==`boolean`)throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
45
45
  a boolean 2nd argument is no longer supported`);this.config=n.merge(o,i);var c=this.config.traceInitPerf;c===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof c==`number`&&(this.traceInitMaxIdent=c,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT(`Lexer Constructor`,function(){var c,l=!0;s.TRACE_INIT(`Lexer Config handling`,function(){if(s.config.lineTerminatorsPattern===o.lineTerminatorsPattern)s.config.lineTerminatorsPattern=t.LineTerminatorOptimizedTester;else if(s.config.lineTerminatorCharacters===o.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
46
46
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(i.safeMode&&i.ensureOptimizations)throw Error(`"safeMode" and "ensureOptimizations" flags are mutually exclusive.`);s.trackStartLines=/full|onlyStart/i.test(s.config.positionTracking),s.trackEndLines=/full/i.test(s.config.positionTracking),n.isArray(e)?(c={modes:{}},c.modes[t.DEFAULT_MODE]=n.cloneArr(e),c[t.DEFAULT_MODE]=t.DEFAULT_MODE):(l=!1,c=n.cloneObj(e))}),s.config.skipValidations===!1&&(s.TRACE_INIT(`performRuntimeChecks`,function(){s.lexerDefinitionErrors=s.lexerDefinitionErrors.concat(t.performRuntimeChecks(c,s.trackStartLines,s.config.lineTerminatorCharacters))}),s.TRACE_INIT(`performWarningRuntimeChecks`,function(){s.lexerDefinitionWarning=s.lexerDefinitionWarning.concat(t.performWarningRuntimeChecks(c,s.trackStartLines,s.config.lineTerminatorCharacters))})),c.modes=c.modes?c.modes:{},n.forEach(c.modes,function(e,t){c.modes[t]=n.reject(e,function(e){return n.isUndefined(e)})});var u=n.keys(c.modes);if(n.forEach(c.modes,function(e,a){s.TRACE_INIT(`Mode: <`+a+`> processing`,function(){if(s.modes.push(a),s.config.skipValidations===!1&&s.TRACE_INIT(`validatePatterns`,function(){s.lexerDefinitionErrors=s.lexerDefinitionErrors.concat(t.validatePatterns(e,u))}),n.isEmpty(s.lexerDefinitionErrors)){r.augmentTokenTypes(e);var o;s.TRACE_INIT(`analyzeTokenTypes`,function(){o=t.analyzeTokenTypes(e,{lineTerminatorCharacters:s.config.lineTerminatorCharacters,positionTracking:i.positionTracking,ensureOptimizations:i.ensureOptimizations,safeMode:i.safeMode,tracer:s.TRACE_INIT.bind(s)})}),s.patternIdxToConfig[a]=o.patternIdxToConfig,s.charCodeToPatternIdxToConfig[a]=o.charCodeToPatternIdxToConfig,s.emptyGroups=n.merge(s.emptyGroups,o.emptyGroups),s.hasCustom=o.hasCustom||s.hasCustom,s.canModeBeOptimized[a]=o.canBeOptimized}})}),s.defaultMode=c.defaultMode,!n.isEmpty(s.lexerDefinitionErrors)&&!s.config.deferDefinitionErrorsHandling){var d=n.map(s.lexerDefinitionErrors,function(e){return e.message}).join(`-----------------------
@@ -49,8 +49,8 @@ a boolean 2nd argument is no longer supported`);this.config=n.merge(o,i);var c=t
49
49
  Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
50
50
  Or inspect the console log for details on how to resolve these issues.`)}),s.TRACE_INIT(`clearRegExpParserCache`,function(){a.clearRegExpParserCache()}),s.TRACE_INIT(`toFastProperties`,function(){n.toFastProperties(s)})})}return e.prototype.tokenize=function(e,t){if(t===void 0&&(t=this.defaultMode),!n.isEmpty(this.lexerDefinitionErrors)){var r=n.map(this.lexerDefinitionErrors,function(e){return e.message}).join(`-----------------------
51
51
  `);throw Error(`Unable to Tokenize because Errors detected in definition of Lexer:
52
- `+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,r){var i=this,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y=e,b=y.length,x=0,S=0,C=this.hasCustom?0:Math.floor(e.length/10),w=Array(C),T=[],E=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,O=t.cloneEmptyGroups(this.emptyGroups),k=this.trackStartLines,A=this.config.lineTerminatorsPattern,j=0,M=[],N=[],P=[],F=[];Object.freeze(F);var I=void 0;function ee(){return M}function te(e){var n=t.charCodeToOptimizedIndex(e),r=N[n];return r===void 0?F:r}var ne=function(e){if(P.length===1&&e.tokenType.PUSH_MODE===void 0){var t=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);T.push({offset:e.startOffset,line:e.startLine===void 0?void 0:e.startLine,column:e.startColumn===void 0?void 0:e.startColumn,length:e.image.length,message:t})}else{P.pop();var r=n.last(P);M=i.patternIdxToConfig[r],N=i.charCodeToPatternIdxToConfig[r],j=M.length;var a=i.canModeBeOptimized[r]&&i.config.safeMode===!1;I=N&&a?te:ee}};function L(e){P.push(e),N=this.charCodeToPatternIdxToConfig[e],M=this.patternIdxToConfig[e],j=M.length,j=M.length;var t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;I=N&&t?te:ee}L.call(this,r);for(var R;x<b;){l=null;var z=y.charCodeAt(x),re=I(z),B=re.length;for(a=0;a<B;a++){R=re[a];var V=R.pattern;u=null;var H=R.short;if(H===!1?R.isCustom===!0?(v=V.exec(y,x,w,O),v===null?l=null:(l=v[0],v.payload!==void 0&&(u=v.payload))):(this.updateLastIndex(V,x),l=this.match(V,e,x)):z===H&&(l=V),l!==null){if(c=R.longerAlt,c!==void 0){var U=M[c],W=U.pattern;d=null,U.isCustom===!0?(v=W.exec(y,x,w,O),v===null?s=null:(s=v[0],v.payload!==void 0&&(d=v.payload))):(this.updateLastIndex(W,x),s=this.match(W,e,x)),s&&s.length>l.length&&(l=s,u=d,R=U)}break}}if(l!==null){if(f=l.length,p=R.group,p!==void 0&&(m=R.tokenTypeIdx,h=this.createTokenInstance(l,x,m,R.tokenType,E,D,f),this.handlePayload(h,u),p===!1?S=this.addToken(w,S,h):O[p].push(h)),e=this.chopInput(e,f),x+=f,D=this.computeNewColumn(D,f),k===!0&&R.canLineTerminator===!0){var G=0,ie=void 0,ae=void 0;A.lastIndex=0;do ie=A.test(l),ie===!0&&(ae=A.lastIndex-1,G++);while(ie===!0);G!==0&&(E+=G,D=f-ae,this.updateTokenEndLineColumnLocation(h,p,ae,G,E,D,f))}this.handleModes(R,ne,L,h)}else{for(var K=x,oe=E,se=D,q=!1;!q&&x<b;)for(y.charCodeAt(x),e=this.chopInput(e,1),x++,o=0;o<j;o++){var ce=M[o],V=ce.pattern,H=ce.short;if(H===!1?ce.isCustom===!0?q=V.exec(y,x,w,O)!==null:(this.updateLastIndex(V,x),q=V.exec(e)!==null):y.charCodeAt(x)===H&&(q=!0),q===!0)break}g=x-K,_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,K,g,oe,se),T.push({offset:K,line:oe,column:se,length:g,message:_})}}return this.hasCustom||(w.length=S),{tokens:w,groups:O,errors:T}},e.prototype.handleModes=function(e,t,n,r){if(e.pop===!0){var i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,i,a,o){var s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&s===!0||(e.endLine=i+c,e.endColumn=a-1+-c))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,t++,t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){t!==null&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return n===null?n:n[0]},e.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <`+e+`>`);var i=n.timer(t),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+`<-- <`+e+`> time: `+a+`ms`),this.traceInitIndent--,o}else return t()},e.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,e.NA=/NOT_APPLICABLE/,e}()}),B=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.tokenMatcher=e.createTokenInstance=e.EOF=e.createToken=e.hasTokenLabel=e.tokenName=e.tokenLabel=void 0;var t=I(),n=re(),r=R();function i(e){return o(e)?e.LABEL:e.name}e.tokenLabel=i;function a(e){return e.name}e.tokenName=a;function o(e){return t.isString(e.LABEL)&&e.LABEL!==``}e.hasTokenLabel=o;var s=`parent`,c=`categories`,l=`label`,u=`group`,d=`push_mode`,f=`pop_mode`,p=`longer_alt`,m=`line_breaks`,h=`start_chars_hint`;function g(e){return _(e)}e.createToken=g;function _(e){var n=e.pattern,i={};if(i.name=e.name,t.isUndefined(n)||(i.PATTERN=n),t.has(e,s))throw`The parent property is no longer supported.
53
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return t.has(e,c)&&(i.CATEGORIES=e[c]),r.augmentTokenTypes([i]),t.has(e,l)&&(i.LABEL=e[l]),t.has(e,u)&&(i.GROUP=e[u]),t.has(e,f)&&(i.POP_MODE=e[f]),t.has(e,d)&&(i.PUSH_MODE=e[d]),t.has(e,p)&&(i.LONGER_ALT=e[p]),t.has(e,m)&&(i.LINE_BREAKS=e[m]),t.has(e,h)&&(i.START_CHARS_HINT=e[h]),i}e.EOF=g({name:`EOF`,pattern:n.Lexer.NA}),r.augmentTokenTypes([e.EOF]);function v(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}e.createTokenInstance=v;function y(e,t){return r.tokenStructuredMatcher(e,t)}e.tokenMatcher=y}),V=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.serializeProduction=e.serializeGrammar=e.Terminal=e.Alternation=e.RepetitionWithSeparator=e.Repetition=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Option=e.Alternative=e.Rule=e.NonTerminal=e.AbstractProduction=void 0;var n=I(),r=B(),i=function(){function e(e){this._definition=e}return Object.defineProperty(e.prototype,`definition`,{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),e.prototype.accept=function(e){e.visit(this),n.forEach(this.definition,function(t){t.accept(e)})},e}();e.AbstractProduction=i;var a=function(e){t(r,e);function r(t){var r=e.call(this,[])||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,`definition`,{get:function(){return this.referencedRule===void 0?[]:this.referencedRule.definition},set:function(e){},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this)},r}(i);e.NonTerminal=a;var o=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.orgText=``,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Rule=o;var s=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Alternative=s;var c=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Option=c;var l=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatory=l;var u=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatoryWithSeparator=u;var d=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Repetition=d;var f=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionWithSeparator=f;var p=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,`definition`,{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r}(i);e.Alternation=p;var m=function(){function e(e){this.idx=1,n.assign(this,n.pick(e,function(e){return e!==void 0}))}return e.prototype.accept=function(e){e.visit(this)},e}();e.Terminal=m;function h(e){return n.map(e,g)}e.serializeGrammar=h;function g(e){function t(e){return n.map(e,g)}if(e instanceof a)return{type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};if(e instanceof s)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof c)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof l)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof f)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof d)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof p)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof m){var i={type:`Terminal`,name:e.terminalType.name,label:r.tokenLabel(e.terminalType),idx:e.idx},h=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(i.pattern=n.isRegExp(h)?h.source:h),i}else{if(e instanceof o)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}}e.serializeProduction=g}),H=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RestWalker=void 0;var t=I(),n=V();e.RestWalker=function(){function e(){}return e.prototype.walk=function(e,r){var i=this;r===void 0&&(r=[]),t.forEach(e.definition,function(a,o){var s=t.drop(e.definition,o+1);if(a instanceof n.NonTerminal)i.walkProdRef(a,s,r);else if(a instanceof n.Terminal)i.walkTerminal(a,s,r);else if(a instanceof n.Alternative)i.walkFlat(a,s,r);else if(a instanceof n.Option)i.walkOption(a,s,r);else if(a instanceof n.RepetitionMandatory)i.walkAtLeastOne(a,s,r);else if(a instanceof n.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(a,s,r);else if(a instanceof n.RepetitionWithSeparator)i.walkManySep(a,s,r);else if(a instanceof n.Repetition)i.walkMany(a,s,r);else if(a instanceof n.Alternation)i.walkOr(a,s,r);else throw Error(`non exhaustive match`)})},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkAtLeastOneSep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkMany=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkManySep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkOr=function(e,r,i){var a=this,o=r.concat(i);t.forEach(e.definition,function(e){var t=new n.Alternative({definition:[e]});a.walk(t,o)})},e}();function r(e,t,r){return[new n.Option({definition:[new n.Terminal({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}}),U=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GAstVisitor=void 0;var t=V();e.GAstVisitor=function(){function e(){}return e.prototype.visit=function(e){var n=e;switch(n.constructor){case t.NonTerminal:return this.visitNonTerminal(n);case t.Alternative:return this.visitAlternative(n);case t.Option:return this.visitOption(n);case t.RepetitionMandatory:return this.visitRepetitionMandatory(n);case t.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(n);case t.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(n);case t.Repetition:return this.visitRepetition(n);case t.Alternation:return this.visitAlternation(n);case t.Terminal:return this.visitTerminal(n);case t.Rule:return this.visitRule(n);default:throw Error(`non exhaustive match`)}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitAlternative=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}()}),W=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.collectMethods=e.DslMethodsCollectorVisitor=e.getProductionDslName=e.isBranchingProd=e.isOptionalProd=e.isSequenceProd=void 0;var n=I(),r=V(),i=U();function a(e){return e instanceof r.Alternative||e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionMandatory||e instanceof r.RepetitionMandatoryWithSeparator||e instanceof r.RepetitionWithSeparator||e instanceof r.Terminal||e instanceof r.Rule}e.isSequenceProd=a;function o(e,t){return t===void 0&&(t=[]),e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionWithSeparator?!0:e instanceof r.Alternation?n.some(e.definition,function(e){return o(e,t)}):e instanceof r.NonTerminal&&n.contains(t,e)?!1:e instanceof r.AbstractProduction?(e instanceof r.NonTerminal&&t.push(e),n.every(e.definition,function(e){return o(e,t)})):!1}e.isOptionalProd=o;function s(e){return e instanceof r.Alternation}e.isBranchingProd=s;function c(e){if(e instanceof r.NonTerminal)return`SUBRULE`;if(e instanceof r.Option)return`OPTION`;if(e instanceof r.Alternation)return`OR`;if(e instanceof r.RepetitionMandatory)return`AT_LEAST_ONE`;if(e instanceof r.RepetitionMandatoryWithSeparator)return`AT_LEAST_ONE_SEP`;if(e instanceof r.RepetitionWithSeparator)return`MANY_SEP`;if(e instanceof r.Repetition)return`MANY`;if(e instanceof r.Terminal)return`CONSUME`;throw Error(`non exhaustive match`)}e.getProductionDslName=c;var l=function(e){t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.separator=`-`,t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return r.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},r.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitOption=function(e){this.dslMethods.option.push(e)},r.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},r.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},r.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},r.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},r}(i.GAstVisitor);e.DslMethodsCollectorVisitor=l;var u=new l;function d(e){u.reset(),e.accept(u);var t=u.dslMethods;return u.reset(),t}e.collectMethods=d}),G=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.firstForTerminal=e.firstForBranching=e.firstForSequence=e.first=void 0;var t=I(),n=V(),r=W();function i(e){if(e instanceof n.NonTerminal)return i(e.referencedRule);if(e instanceof n.Terminal)return s(e);if(r.isSequenceProd(e))return a(e);if(r.isBranchingProd(e))return o(e);throw Error(`non exhaustive match`)}e.first=i;function a(e){for(var n=[],a=e.definition,o=0,s=a.length>o,c,l=!0;s&&l;)c=a[o],l=r.isOptionalProd(c),n=n.concat(i(c)),o+=1,s=a.length>o;return t.uniq(n)}e.firstForSequence=a;function o(e){var n=t.map(e.definition,function(e){return i(e)});return t.uniq(t.flatten(n))}e.firstForBranching=o;function s(e){return[e.terminalType]}e.firstForTerminal=s}),ie=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.IN=void 0,e.IN=`_~IN~_`}),ae=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.buildInProdFollowPrefix=e.buildBetweenProdsFollowPrefix=e.computeAllProdsFollows=e.ResyncFollowsWalker=void 0;var n=H(),r=G(),i=I(),a=ie(),o=V(),s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return n.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},n.prototype.walkTerminal=function(e,t,n){},n.prototype.walkProdRef=function(e,t,n){var i=l(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),s=new o.Alternative({definition:a}),c=r.first(s);this.follows[i]=c},n}(n.RestWalker);e.ResyncFollowsWalker=s;function c(e){var t={};return i.forEach(e,function(e){var n=new s(e).startWalking();i.assign(t,n)}),t}e.computeAllProdsFollows=c;function l(e,t){return e.name+t+a.IN}e.buildBetweenProdsFollowPrefix=l;function u(e){return e.terminalType.name+e.idx+a.IN}e.buildInProdFollowPrefix=u}),K=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defaultGrammarValidatorErrorProvider=e.defaultGrammarResolverErrorProvider=e.defaultParserErrorProvider=void 0;var t=B(),n=I(),r=I(),i=V(),a=W();e.defaultParserErrorProvider={buildMismatchTokenMessage:function(e){var n=e.expected,r=e.actual;return e.previous,e.ruleName,`Expecting `+(t.hasTokenLabel(n)?`--> `+t.tokenLabel(n)+` <--`:`token of type --> `+n.name+` <--`)+` but found --> '`+r.image+`' <--`},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;return e.ruleName,`Redundant input, expecting EOF but found: `+t.image},buildNoViableAltMessage:function(e){var n=e.expectedPathsPerAlt,i=e.actual;e.previous;var a=e.customUserDescription;e.ruleName;var o=`Expecting: `,s=`
52
+ `+r)}return this.tokenizeInternal(e,t)},e.prototype.tokenizeInternal=function(e,r){var i=this,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y=e,b=y.length,x=0,S=0,C=this.hasCustom?0:Math.floor(e.length/10),w=Array(C),T=[],E=this.trackStartLines?1:void 0,D=this.trackStartLines?1:void 0,O=t.cloneEmptyGroups(this.emptyGroups),k=this.trackStartLines,A=this.config.lineTerminatorsPattern,j=0,M=[],N=[],P=[],F=[];Object.freeze(F);var I=void 0;function ee(){return M}function te(e){var n=t.charCodeToOptimizedIndex(e),r=N[n];return r===void 0?F:r}var ne=function(e){if(P.length===1&&e.tokenType.PUSH_MODE===void 0){var t=i.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);T.push({offset:e.startOffset,line:e.startLine===void 0?void 0:e.startLine,column:e.startColumn===void 0?void 0:e.startColumn,length:e.image.length,message:t})}else{P.pop();var r=n.last(P);M=i.patternIdxToConfig[r],N=i.charCodeToPatternIdxToConfig[r],j=M.length;var a=i.canModeBeOptimized[r]&&i.config.safeMode===!1;I=N&&a?te:ee}};function L(e){P.push(e),N=this.charCodeToPatternIdxToConfig[e],M=this.patternIdxToConfig[e],j=M.length,j=M.length;var t=this.canModeBeOptimized[e]&&this.config.safeMode===!1;I=N&&t?te:ee}L.call(this,r);for(var R;x<b;){l=null;var z=y.charCodeAt(x),re=I(z),B=re.length;for(a=0;a<B;a++){R=re[a];var V=R.pattern;u=null;var H=R.short;if(H===!1?R.isCustom===!0?(v=V.exec(y,x,w,O),v===null?l=null:(l=v[0],v.payload!==void 0&&(u=v.payload))):(this.updateLastIndex(V,x),l=this.match(V,e,x)):z===H&&(l=V),l!==null){if(c=R.longerAlt,c!==void 0){var U=M[c],W=U.pattern;d=null,U.isCustom===!0?(v=W.exec(y,x,w,O),v===null?s=null:(s=v[0],v.payload!==void 0&&(d=v.payload))):(this.updateLastIndex(W,x),s=this.match(W,e,x)),s&&s.length>l.length&&(l=s,u=d,R=U)}break}}if(l!==null){if(f=l.length,p=R.group,p!==void 0&&(m=R.tokenTypeIdx,h=this.createTokenInstance(l,x,m,R.tokenType,E,D,f),this.handlePayload(h,u),p===!1?S=this.addToken(w,S,h):O[p].push(h)),e=this.chopInput(e,f),x+=f,D=this.computeNewColumn(D,f),k===!0&&R.canLineTerminator===!0){var G=0,ie=void 0,ae=void 0;A.lastIndex=0;do ie=A.test(l),ie===!0&&(ae=A.lastIndex-1,G++);while(ie===!0);G!==0&&(E+=G,D=f-ae,this.updateTokenEndLineColumnLocation(h,p,ae,G,E,D,f))}this.handleModes(R,ne,L,h)}else{for(var K=x,oe=E,se=D,q=!1;!q&&x<b;)for(y.charCodeAt(x),e=this.chopInput(e,1),x++,o=0;o<j;o++){var ce=M[o],V=ce.pattern,H=ce.short;if(H===!1?ce.isCustom===!0?q=V.exec(y,x,w,O)!==null:(this.updateLastIndex(V,x),q=V.exec(e)!==null):y.charCodeAt(x)===H&&(q=!0),q===!0)break}g=x-K,_=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(y,K,g,oe,se),T.push({offset:K,line:oe,column:se,length:g,message:_})}}return this.hasCustom||(w.length=S),{tokens:w,groups:O,errors:T}},e.prototype.handleModes=function(e,t,n,r){if(e.pop===!0){var i=e.push;t(r),i!==void 0&&n.call(this,i)}else e.push!==void 0&&n.call(this,e.push)},e.prototype.chopInput=function(e,t){return e.substring(t)},e.prototype.updateLastIndex=function(e,t){e.lastIndex=t},e.prototype.updateTokenEndLineColumnLocation=function(e,t,n,r,i,a,o){var s,c;t!==void 0&&(s=n===o-1,c=s?-1:0,r===1&&s===!0||(e.endLine=i+c,e.endColumn=a-1+-c))},e.prototype.computeNewColumn=function(e,t){return e+t},e.prototype.createTokenInstance=function(){return null},e.prototype.createOffsetOnlyToken=function(e,t,n,r){return{image:e,startOffset:t,tokenTypeIdx:n,tokenType:r}},e.prototype.createStartOnlyToken=function(e,t,n,r,i,a){return{image:e,startOffset:t,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:r}},e.prototype.createFullToken=function(e,t,n,r,i,a,o){return{image:e,startOffset:t,endOffset:t+o-1,startLine:i,endLine:i,startColumn:a,endColumn:a+o-1,tokenTypeIdx:n,tokenType:r}},e.prototype.addToken=function(e,t,n){return 666},e.prototype.addTokenUsingPush=function(e,t,n){return e.push(n),t},e.prototype.addTokenUsingMemberAccess=function(e,t,n){return e[t]=n,t++,t},e.prototype.handlePayload=function(e,t){},e.prototype.handlePayloadNoCustom=function(e,t){},e.prototype.handlePayloadWithCustom=function(e,t){t!==null&&(e.payload=t)},e.prototype.match=function(e,t,n){return null},e.prototype.matchWithTest=function(e,t,n){return e.test(t)===!0?t.substring(n,e.lastIndex):null},e.prototype.matchWithExec=function(e,t){var n=e.exec(t);return n===null?n:n[0]},e.prototype.TRACE_INIT=function(e,t){if(this.traceInitPerf===!0){this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <`+e+`>`);var i=n.timer(t),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+`<-- <`+e+`> time: `+a+`ms`),this.traceInitIndent--,o}else return t()},e.SKIPPED=`This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.`,e.NA=/NOT_APPLICABLE/,e}()}),B=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.tokenMatcher=e.createTokenInstance=e.EOF=e.createToken=e.hasTokenLabel=e.tokenName=e.tokenLabel=void 0;var t=I(),n=re(),r=R();function i(e){return o(e)?e.LABEL:e.name}e.tokenLabel=i;function a(e){return e.name}e.tokenName=a;function o(e){return t.isString(e.LABEL)&&e.LABEL!==``}e.hasTokenLabel=o;var s=`parent`,c=`categories`,l=`label`,u=`group`,d=`push_mode`,f=`pop_mode`,p=`longer_alt`,m=`line_breaks`,h=`start_chars_hint`;function g(e){return _(e)}e.createToken=g;function _(e){var n=e.pattern,i={};if(i.name=e.name,t.isUndefined(n)||(i.PATTERN=n),t.has(e,s))throw`The parent property is no longer supported.
53
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return t.has(e,c)&&(i.CATEGORIES=e[c]),r.augmentTokenTypes([i]),t.has(e,l)&&(i.LABEL=e[l]),t.has(e,u)&&(i.GROUP=e[u]),t.has(e,f)&&(i.POP_MODE=e[f]),t.has(e,d)&&(i.PUSH_MODE=e[d]),t.has(e,p)&&(i.LONGER_ALT=e[p]),t.has(e,m)&&(i.LINE_BREAKS=e[m]),t.has(e,h)&&(i.START_CHARS_HINT=e[h]),i}e.EOF=g({name:`EOF`,pattern:n.Lexer.NA}),r.augmentTokenTypes([e.EOF]);function v(e,t,n,r,i,a,o,s){return{image:t,startOffset:n,endOffset:r,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}e.createTokenInstance=v;function y(e,t){return r.tokenStructuredMatcher(e,t)}e.tokenMatcher=y}),V=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.serializeProduction=e.serializeGrammar=e.Terminal=e.Alternation=e.RepetitionWithSeparator=e.Repetition=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Option=e.Alternative=e.Rule=e.NonTerminal=e.AbstractProduction=void 0;var n=I(),r=B(),i=function(){function e(e){this._definition=e}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),e.prototype.accept=function(e){e.visit(this),n.forEach(this.definition,function(t){t.accept(e)})},e}();e.AbstractProduction=i;var a=function(e){t(r,e);function r(t){var r=e.call(this,[])||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,"definition",{get:function(){return this.referencedRule===void 0?[]:this.referencedRule.definition},set:function(e){},enumerable:!1,configurable:!0}),r.prototype.accept=function(e){e.visit(this)},r}(i);e.NonTerminal=a;var o=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.orgText=``,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Rule=o;var s=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.ignoreAmbiguities=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Alternative=s;var c=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Option=c;var l=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatory=l;var u=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionMandatoryWithSeparator=u;var d=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.Repetition=d;var f=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return r}(i);e.RepetitionWithSeparator=f;var p=function(e){t(r,e);function r(t){var r=e.call(this,t.definition)||this;return r.idx=1,r.ignoreAmbiguities=!1,r.hasPredicates=!1,n.assign(r,n.pick(t,function(e){return e!==void 0})),r}return Object.defineProperty(r.prototype,"definition",{get:function(){return this._definition},set:function(e){this._definition=e},enumerable:!1,configurable:!0}),r}(i);e.Alternation=p;var m=function(){function e(e){this.idx=1,n.assign(this,n.pick(e,function(e){return e!==void 0}))}return e.prototype.accept=function(e){e.visit(this)},e}();e.Terminal=m;function h(e){return n.map(e,g)}e.serializeGrammar=h;function g(e){function t(e){return n.map(e,g)}if(e instanceof a)return{type:`NonTerminal`,name:e.nonTerminalName,idx:e.idx};if(e instanceof s)return{type:`Alternative`,definition:t(e.definition)};if(e instanceof c)return{type:`Option`,idx:e.idx,definition:t(e.definition)};if(e instanceof l)return{type:`RepetitionMandatory`,idx:e.idx,definition:t(e.definition)};if(e instanceof u)return{type:`RepetitionMandatoryWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof f)return{type:`RepetitionWithSeparator`,idx:e.idx,separator:g(new m({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof d)return{type:`Repetition`,idx:e.idx,definition:t(e.definition)};if(e instanceof p)return{type:`Alternation`,idx:e.idx,definition:t(e.definition)};if(e instanceof m){var i={type:`Terminal`,name:e.terminalType.name,label:r.tokenLabel(e.terminalType),idx:e.idx},h=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(i.pattern=n.isRegExp(h)?h.source:h),i}else{if(e instanceof o)return{type:`Rule`,name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error(`non exhaustive match`)}}e.serializeProduction=g}),H=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RestWalker=void 0;var t=I(),n=V();e.RestWalker=function(){function e(){}return e.prototype.walk=function(e,r){var i=this;r===void 0&&(r=[]),t.forEach(e.definition,function(a,o){var s=t.drop(e.definition,o+1);if(a instanceof n.NonTerminal)i.walkProdRef(a,s,r);else if(a instanceof n.Terminal)i.walkTerminal(a,s,r);else if(a instanceof n.Alternative)i.walkFlat(a,s,r);else if(a instanceof n.Option)i.walkOption(a,s,r);else if(a instanceof n.RepetitionMandatory)i.walkAtLeastOne(a,s,r);else if(a instanceof n.RepetitionMandatoryWithSeparator)i.walkAtLeastOneSep(a,s,r);else if(a instanceof n.RepetitionWithSeparator)i.walkManySep(a,s,r);else if(a instanceof n.Repetition)i.walkMany(a,s,r);else if(a instanceof n.Alternation)i.walkOr(a,s,r);else throw Error(`non exhaustive match`)})},e.prototype.walkTerminal=function(e,t,n){},e.prototype.walkProdRef=function(e,t,n){},e.prototype.walkFlat=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkOption=function(e,t,n){var r=t.concat(n);this.walk(e,r)},e.prototype.walkAtLeastOne=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkAtLeastOneSep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkMany=function(e,t,r){var i=[new n.Option({definition:e.definition})].concat(t,r);this.walk(e,i)},e.prototype.walkManySep=function(e,t,n){var i=r(e,t,n);this.walk(e,i)},e.prototype.walkOr=function(e,r,i){var a=this,o=r.concat(i);t.forEach(e.definition,function(e){var t=new n.Alternative({definition:[e]});a.walk(t,o)})},e}();function r(e,t,r){return[new n.Option({definition:[new n.Terminal({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}}),U=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GAstVisitor=void 0;var t=V();e.GAstVisitor=function(){function e(){}return e.prototype.visit=function(e){var n=e;switch(n.constructor){case t.NonTerminal:return this.visitNonTerminal(n);case t.Alternative:return this.visitAlternative(n);case t.Option:return this.visitOption(n);case t.RepetitionMandatory:return this.visitRepetitionMandatory(n);case t.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(n);case t.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(n);case t.Repetition:return this.visitRepetition(n);case t.Alternation:return this.visitAlternation(n);case t.Terminal:return this.visitTerminal(n);case t.Rule:return this.visitRule(n);default:throw Error(`non exhaustive match`)}},e.prototype.visitNonTerminal=function(e){},e.prototype.visitAlternative=function(e){},e.prototype.visitOption=function(e){},e.prototype.visitRepetition=function(e){},e.prototype.visitRepetitionMandatory=function(e){},e.prototype.visitRepetitionMandatoryWithSeparator=function(e){},e.prototype.visitRepetitionWithSeparator=function(e){},e.prototype.visitAlternation=function(e){},e.prototype.visitTerminal=function(e){},e.prototype.visitRule=function(e){},e}()}),W=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.collectMethods=e.DslMethodsCollectorVisitor=e.getProductionDslName=e.isBranchingProd=e.isOptionalProd=e.isSequenceProd=void 0;var n=I(),r=V(),i=U();function a(e){return e instanceof r.Alternative||e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionMandatory||e instanceof r.RepetitionMandatoryWithSeparator||e instanceof r.RepetitionWithSeparator||e instanceof r.Terminal||e instanceof r.Rule}e.isSequenceProd=a;function o(e,t){return t===void 0&&(t=[]),e instanceof r.Option||e instanceof r.Repetition||e instanceof r.RepetitionWithSeparator?!0:e instanceof r.Alternation?n.some(e.definition,function(e){return o(e,t)}):e instanceof r.NonTerminal&&n.contains(t,e)?!1:e instanceof r.AbstractProduction?(e instanceof r.NonTerminal&&t.push(e),n.every(e.definition,function(e){return o(e,t)})):!1}e.isOptionalProd=o;function s(e){return e instanceof r.Alternation}e.isBranchingProd=s;function c(e){if(e instanceof r.NonTerminal)return`SUBRULE`;if(e instanceof r.Option)return`OPTION`;if(e instanceof r.Alternation)return`OR`;if(e instanceof r.RepetitionMandatory)return`AT_LEAST_ONE`;if(e instanceof r.RepetitionMandatoryWithSeparator)return`AT_LEAST_ONE_SEP`;if(e instanceof r.RepetitionWithSeparator)return`MANY_SEP`;if(e instanceof r.Repetition)return`MANY`;if(e instanceof r.Terminal)return`CONSUME`;throw Error(`non exhaustive match`)}e.getProductionDslName=c;var l=function(e){t(r,e);function r(){var t=e!==null&&e.apply(this,arguments)||this;return t.separator=`-`,t.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},t}return r.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},r.prototype.visitTerminal=function(e){var t=e.terminalType.name+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitNonTerminal=function(e){var t=e.nonTerminalName+this.separator+`Terminal`;n.has(this.dslMethods,t)||(this.dslMethods[t]=[]),this.dslMethods[t].push(e)},r.prototype.visitOption=function(e){this.dslMethods.option.push(e)},r.prototype.visitRepetitionWithSeparator=function(e){this.dslMethods.repetitionWithSeparator.push(e)},r.prototype.visitRepetitionMandatory=function(e){this.dslMethods.repetitionMandatory.push(e)},r.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.dslMethods.repetitionMandatoryWithSeparator.push(e)},r.prototype.visitRepetition=function(e){this.dslMethods.repetition.push(e)},r.prototype.visitAlternation=function(e){this.dslMethods.alternation.push(e)},r}(i.GAstVisitor);e.DslMethodsCollectorVisitor=l;var u=new l;function d(e){u.reset(),e.accept(u);var t=u.dslMethods;return u.reset(),t}e.collectMethods=d}),G=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.firstForTerminal=e.firstForBranching=e.firstForSequence=e.first=void 0;var t=I(),n=V(),r=W();function i(e){if(e instanceof n.NonTerminal)return i(e.referencedRule);if(e instanceof n.Terminal)return s(e);if(r.isSequenceProd(e))return a(e);if(r.isBranchingProd(e))return o(e);throw Error(`non exhaustive match`)}e.first=i;function a(e){for(var n=[],a=e.definition,o=0,s=a.length>o,c,l=!0;s&&l;)c=a[o],l=r.isOptionalProd(c),n=n.concat(i(c)),o+=1,s=a.length>o;return t.uniq(n)}e.firstForSequence=a;function o(e){var n=t.map(e.definition,function(e){return i(e)});return t.uniq(t.flatten(n))}e.firstForBranching=o;function s(e){return[e.terminalType]}e.firstForTerminal=s}),ie=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.IN=void 0,e.IN=`_~IN~_`}),ae=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.buildInProdFollowPrefix=e.buildBetweenProdsFollowPrefix=e.computeAllProdsFollows=e.ResyncFollowsWalker=void 0;var n=H(),r=G(),i=I(),a=ie(),o=V(),s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.topProd=t,n.follows={},n}return n.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},n.prototype.walkTerminal=function(e,t,n){},n.prototype.walkProdRef=function(e,t,n){var i=l(e.referencedRule,e.idx)+this.topProd.name,a=t.concat(n),s=new o.Alternative({definition:a}),c=r.first(s);this.follows[i]=c},n}(n.RestWalker);e.ResyncFollowsWalker=s;function c(e){var t={};return i.forEach(e,function(e){var n=new s(e).startWalking();i.assign(t,n)}),t}e.computeAllProdsFollows=c;function l(e,t){return e.name+t+a.IN}e.buildBetweenProdsFollowPrefix=l;function u(e){return e.terminalType.name+e.idx+a.IN}e.buildInProdFollowPrefix=u}),K=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defaultGrammarValidatorErrorProvider=e.defaultGrammarResolverErrorProvider=e.defaultParserErrorProvider=void 0;var t=B(),n=I(),r=I(),i=V(),a=W();e.defaultParserErrorProvider={buildMismatchTokenMessage:function(e){var n=e.expected,r=e.actual;return e.previous,e.ruleName,`Expecting `+(t.hasTokenLabel(n)?`--> `+t.tokenLabel(n)+` <--`:`token of type --> `+n.name+` <--`)+` but found --> '`+r.image+`' <--`},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant;return e.ruleName,`Redundant input, expecting EOF but found: `+t.image},buildNoViableAltMessage:function(e){var n=e.expectedPathsPerAlt,i=e.actual;e.previous;var a=e.customUserDescription;e.ruleName;var o=`Expecting: `,s=`
54
54
  but found: '`+r.first(i).image+`'`;if(a)return o+a+s;var c=r.reduce(n,function(e,t){return e.concat(t)},[]),l=r.map(c,function(e){return`[`+r.map(e,function(e){return t.tokenLabel(e)}).join(`, `)+`]`});return o+(`one of these possible Token sequences:
55
55
  `+r.map(l,function(e,t){return` `+(t+1)+`. `+e}).join(`
56
56
  `))+s},buildEarlyExitMessage:function(e){var n=e.expectedIterationPaths,i=e.actual,a=e.customUserDescription;e.ruleName;var o=`Expecting: `,s=`
@@ -80,33 +80,33 @@ This could lead to an infinite loop.`},buildTokenNameError:function(e){return`de
80
80
  `)+(`without consuming any Tokens. The grammar path that causes this is:
81
81
  `+i+`
82
82
  `)+` To fix this refactor your grammar to remove the left recursion.
83
- see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`},buildInvalidRuleNameError:function(e){return`deprecated`},buildDuplicateRuleNameError:function(e){return`Duplicate definition, rule: ->`+(e.topLevelRule instanceof i.Rule?e.topLevelRule.name:e.topLevelRule)+`<- is already defined in the grammar: ->`+e.grammarName+`<-`}}}),oe=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.GastRefResolverVisitor=e.resolveGrammar=void 0;var n=Z(),r=I(),i=U();function a(e,t){var n=new o(e,t);return n.resolveRefs(),n.errors}e.resolveGrammar=a;var o=function(e){t(i,e);function i(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return i.prototype.resolveRefs=function(){var e=this;r.forEach(r.values(this.nameToTopRule),function(t){e.currTopLevel=t,t.accept(e)})},i.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:n.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},i}(i.GAstVisitor);e.GastRefResolverVisitor=o}),se=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.nextPossibleTokensAfter=e.possiblePathsFrom=e.NextTerminalAfterAtLeastOneSepWalker=e.NextTerminalAfterAtLeastOneWalker=e.NextTerminalAfterManySepWalker=e.NextTerminalAfterManyWalker=e.AbstractNextTerminalAfterProductionWalker=e.NextAfterTokenWalker=e.AbstractNextPossibleTokensWalker=void 0;var n=H(),r=I(),i=G(),a=V(),o=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName=``,r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return n.prototype.startWalking=function(){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=r.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=r.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},n.prototype.walk=function(t,n){n===void 0&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},n.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},n.prototype.updateExpectedNext=function(){r.isEmpty(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},n}(n.RestWalker);e.AbstractNextPossibleTokensWalker=o,e.NextAfterTokenWalker=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName=``,r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return n.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),o=new a.Alternative({definition:r});this.possibleTokTypes=i.first(o),this.found=!0}},n}(o);var s=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return n.prototype.startWalking=function(){return this.walk(this.topRule),this.result},n}(n.RestWalker);e.AbstractNextTerminalAfterProductionWalker=s,e.NextTerminalAfterManyWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkMany=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,i)},n}(s),e.NextTerminalAfterManySepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkManySep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOne=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneSepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOneSep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,i)},n}(s);function c(e,t,n){n===void 0&&(n=[]),n=r.cloneArr(n);var i=[],o=0;function s(t){return t.concat(r.drop(e,o+1))}function l(e){var r=c(s(e),t,n);return i.concat(r)}for(;n.length<t&&o<e.length;){var u=e[o];if(u instanceof a.Alternative||u instanceof a.NonTerminal)return l(u.definition);if(u instanceof a.Option)i=l(u.definition);else if(u instanceof a.RepetitionMandatory){var d=u.definition.concat([new a.Repetition({definition:u.definition})]);return l(d)}else if(u instanceof a.RepetitionMandatoryWithSeparator){var d=[new a.Alternative({definition:u.definition}),new a.Repetition({definition:[new a.Terminal({terminalType:u.separator})].concat(u.definition)})];return l(d)}else if(u instanceof a.RepetitionWithSeparator){var d=u.definition.concat([new a.Repetition({definition:[new a.Terminal({terminalType:u.separator})].concat(u.definition)})]);i=l(d)}else if(u instanceof a.Repetition){var d=u.definition.concat([new a.Repetition({definition:u.definition})]);i=l(d)}else{if(u instanceof a.Alternation)return r.forEach(u.definition,function(e){r.isEmpty(e.definition)===!1&&(i=l(e.definition))}),i;if(u instanceof a.Terminal)n.push(u.terminalType);else throw Error(`non exhaustive match`)}o++}return i.push({partialPath:n,suffixDef:r.drop(e,o)}),i}e.possiblePathsFrom=c;function l(e,t,n,i){var o=`EXIT_NONE_TERMINAL`,s=[o],c=`EXIT_ALTERNATIVE`,l=!1,d=t.length,f=d-i-1,p=[],m=[];for(m.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!r.isEmpty(m);){var h=m.pop();if(h===c){l&&r.last(m).idx<=f&&m.pop();continue}var g=h.def,_=h.idx,v=h.ruleStack,y=h.occurrenceStack;if(!r.isEmpty(g)){var b=g[0];if(b===o){var x={idx:_,def:r.drop(g),ruleStack:r.dropRight(v),occurrenceStack:r.dropRight(y)};m.push(x)}else if(b instanceof a.Terminal)if(_<d-1){var S=_+1,C=t[S];if(n(C,b.terminalType)){var x={idx:S,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(x)}}else if(_===d-1)p.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:v,occurrenceStack:y}),l=!0;else throw Error(`non exhaustive match`);else if(b instanceof a.NonTerminal){var w=r.cloneArr(v);w.push(b.nonTerminalName);var T=r.cloneArr(y);T.push(b.idx);var x={idx:_,def:b.definition.concat(s,r.drop(g)),ruleStack:w,occurrenceStack:T};m.push(x)}else if(b instanceof a.Option){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var D={idx:_,def:b.definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.RepetitionMandatory){var O=new a.Repetition({definition:b.definition,idx:b.idx}),k=b.definition.concat([O],r.drop(g)),x={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(x)}else if(b instanceof a.RepetitionMandatoryWithSeparator){var A=new a.Terminal({terminalType:b.separator}),O=new a.Repetition({definition:[A].concat(b.definition),idx:b.idx}),k=b.definition.concat([O],r.drop(g)),x={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(x)}else if(b instanceof a.RepetitionWithSeparator){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var A=new a.Terminal({terminalType:b.separator}),j=new a.Repetition({definition:[A].concat(b.definition),idx:b.idx}),k=b.definition.concat([j],r.drop(g)),D={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.Repetition){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var j=new a.Repetition({definition:b.definition,idx:b.idx}),k=b.definition.concat([j],r.drop(g)),D={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.Alternation)for(var M=b.definition.length-1;M>=0;M--){var N={idx:_,def:b.definition[M].definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y};m.push(N),m.push(c)}else if(b instanceof a.Alternative)m.push({idx:_,def:b.definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y});else if(b instanceof a.Rule)m.push(u(b,_,v,y));else throw Error(`non exhaustive match`)}}return p}e.nextPossibleTokensAfter=l;function u(e,t,n,i){var a=r.cloneArr(n);a.push(e.name);var o=r.cloneArr(i);return o.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:o}}}),q=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.areTokenCategoriesNotUsed=e.isStrictPrefixOfPath=e.containsPath=e.getLookaheadPathsForOptionalProd=e.getLookaheadPathsForOr=e.lookAheadSequenceFromAlternatives=e.buildSingleAlternativeLookaheadFunction=e.buildAlternativesLookAheadFunc=e.buildLookaheadFuncForOptionalProd=e.buildLookaheadFuncForOr=e.getProdType=e.PROD_TYPE=void 0;var n=I(),r=se(),i=H(),a=R(),o=V(),s=U(),c;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(c=e.PROD_TYPE||={});function l(e){if(e instanceof o.Option)return c.OPTION;if(e instanceof o.Repetition)return c.REPETITION;if(e instanceof o.RepetitionMandatory)return c.REPETITION_MANDATORY;if(e instanceof o.RepetitionMandatoryWithSeparator)return c.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof o.RepetitionWithSeparator)return c.REPETITION_WITH_SEPARATOR;if(e instanceof o.Alternation)return c.ALTERNATION;throw Error(`non exhaustive match`)}e.getProdType=l;function u(e,t,n,r,i,o){var s=b(e,t,n);return o(s,r,w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher,i)}e.buildLookaheadFuncForOr=u;function d(e,t,n,r,i,o){var s=x(e,t,i,n),c=w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher;return o(s[0],c,r)}e.buildLookaheadFuncForOptionalProd=d;function f(e,t,r,i){var a=e.length,o=n.every(e,function(e){return n.every(e,function(e){return e.length===1})});if(t)return function(t){for(var i=n.map(t,function(e){return e.GATE}),o=0;o<a;o++){var s=e[o],c=s.length,l=i[o];if(!(l!==void 0&&l.call(this)===!1))e:for(var u=0;u<c;u++){for(var d=s[u],f=d.length,p=0;p<f;p++)if(r(this.LA(p+1),d[p])===!1)continue e;return o}}};if(o&&!i){var s=n.map(e,function(e){return n.flatten(e)}),c=n.reduce(s,function(e,t,r){return n.forEach(t,function(t){n.has(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),n.forEach(t.categoryMatches,function(t){n.has(e,t)||(e[t]=r)})}),e},[]);return function(){return c[this.LA(1).tokenTypeIdx]}}else return function(){for(var t=0;t<a;t++){var n=e[t],i=n.length;e:for(var o=0;o<i;o++){for(var s=n[o],c=s.length,l=0;l<c;l++)if(r(this.LA(l+1),s[l])===!1)continue e;return t}}}}e.buildAlternativesLookAheadFunc=f;function p(e,t,r){var i=n.every(e,function(e){return e.length===1}),a=e.length;if(i&&!r){var o=n.flatten(e);if(o.length===1&&n.isEmpty(o[0].categoryMatches)){var s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{var c=n.reduce(o,function(e,t,r){return e[t.tokenTypeIdx]=!0,n.forEach(t.categoryMatches,function(t){e[t]=!0}),e},[]);return function(){return c[this.LA(1).tokenTypeIdx]===!0}}}else return function(){e:for(var n=0;n<a;n++){for(var r=e[n],i=r.length,o=0;o<i;o++)if(t(this.LA(o+1),r[o])===!1)continue e;return!0}return!1}}e.buildSingleAlternativeLookaheadFunction=p;var m=function(e){t(n,e);function n(t,n,r){var i=e.call(this)||this;return i.topProd=t,i.targetOccurrence=n,i.targetProdType=r,i}return n.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},n.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1},n.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,c.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,c.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,c.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,c.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,c.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},n}(i.RestWalker),h=function(e){t(n,e);function n(t,n,r){var i=e.call(this)||this;return i.targetOccurrence=t,i.targetProdType=n,i.targetRef=r,i.result=[],i}return n.prototype.checkIsTarget=function(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)},n.prototype.visitOption=function(e){this.checkIsTarget(e,c.OPTION)},n.prototype.visitRepetition=function(e){this.checkIsTarget(e,c.REPETITION)},n.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,c.REPETITION_MANDATORY)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,c.REPETITION_MANDATORY_WITH_SEPARATOR)},n.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,c.REPETITION_WITH_SEPARATOR)},n.prototype.visitAlternation=function(e){this.checkIsTarget(e,c.ALTERNATION)},n}(s.GAstVisitor);function g(e){for(var t=Array(e),n=0;n<e;n++)t[n]=[];return t}function _(e){for(var t=[``],n=0;n<e.length;n++){for(var r=e[n],i=[],a=0;a<t.length;a++){var o=t[a];i.push(o+`_`+r.tokenTypeIdx);for(var s=0;s<r.categoryMatches.length;s++){var c=`_`+r.categoryMatches[s];i.push(o+c)}}t=i}return t}function v(e,t,n){for(var r=0;r<e.length;r++)if(r!==n){for(var i=e[r],a=0;a<t.length;a++)if(i[t[a]]===!0)return!1}return!0}function y(e,t){for(var i=n.map(e,function(e){return r.possiblePathsFrom([e],1)}),a=g(i.length),o=n.map(i,function(e){var t={};return n.forEach(e,function(e){var r=_(e.partialPath);n.forEach(r,function(e){t[e]=!0})}),t}),s=i,c=1;c<=t;c++){var l=s;s=g(l.length);for(var u=function(e){for(var i=l[e],u=0;u<i.length;u++){var d=i[u].partialPath,f=i[u].suffixDef,p=_(d);if(v(o,p,e)||n.isEmpty(f)||d.length===t){var m=a[e];if(S(m,d)===!1){m.push(d);for(var h=0;h<p.length;h++){var g=p[h];o[e][g]=!0}}}else{var y=r.possiblePathsFrom(f,c+1,d);s[e]=s[e].concat(y),n.forEach(y,function(t){var r=_(t.partialPath);n.forEach(r,function(t){o[e][t]=!0})})}}},d=0;d<l.length;d++)u(d)}return a}e.lookAheadSequenceFromAlternatives=y;function b(e,t,n,r){var i=new h(e,c.ALTERNATION,r);return t.accept(i),y(i.result,n)}e.getLookaheadPathsForOr=b;function x(e,t,n,r){var i=new h(e,n);t.accept(i);var a=i.result,s=new m(t,e,n).startWalking();return y([new o.Alternative({definition:a}),new o.Alternative({definition:s})],r)}e.getLookaheadPathsForOptionalProd=x;function S(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var i=0;i<r.length;i++){var a=t[i],o=r[i];if(!(a===o||o.categoryMatchesMap[a.tokenTypeIdx]!==void 0))continue e}return!0}}return!1}e.containsPath=S;function C(e,t){return e.length<t.length&&n.every(e,function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}e.isStrictPrefixOfPath=C;function w(e){return n.every(e,function(e){return n.every(e,function(e){return n.every(e,function(e){return n.isEmpty(e.categoryMatches)})})})}e.areTokenCategoriesNotUsed=w}),ce=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.checkPrefixAlternativesAmbiguities=e.validateSomeNonEmptyLookaheadPath=e.validateTooManyAlts=e.RepetionCollector=e.validateAmbiguousAlternationAlternatives=e.validateEmptyOrAlternative=e.getFirstNoneTerminal=e.validateNoLeftRecursion=e.validateRuleIsOverridden=e.validateRuleDoesNotAlreadyExist=e.OccurrenceValidationCollector=e.identifyProductionForDuplicates=e.validateGrammar=void 0;var n=I(),r=I(),i=Z(),a=W(),o=q(),s=se(),c=V(),l=U();function u(e,t,i,a,o){var s=n.map(e,function(e){return d(e,a)}),c=n.map(e,function(e){return _(e,e,a)}),l=[],u=[],f=[];r.every(c,r.isEmpty)&&(l=r.map(e,function(e){return b(e,a)}),u=r.map(e,function(e){return x(e,t,a)}),f=w(e,t,a));var p=D(e,i,a),m=r.map(e,function(e){return C(e,a)}),g=r.map(e,function(t){return h(t,e,o,a)});return n.flatten(s.concat(f,c,l,u,p,m,g))}e.validateGrammar=u;function d(e,t){var r=new m;e.accept(r);var o=r.allProductions,s=n.groupBy(o,f),c=n.pick(s,function(e){return e.length>1});return n.map(n.values(c),function(r){var o=n.first(r),s=t.buildDuplicateFoundError(e,r),c=a.getProductionDslName(o),l={message:s,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:o.idx},u=p(o);return u&&(l.parameter=u),l})}function f(e){return a.getProductionDslName(e)+`_#_`+e.idx+`_#_`+p(e)}e.identifyProductionForDuplicates=f;function p(e){return e instanceof c.Terminal?e.terminalType.name:e instanceof c.NonTerminal?e.nonTerminalName:``}var m=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},n.prototype.visitOption=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n.prototype.visitAlternation=function(e){this.allProductions.push(e)},n.prototype.visitTerminal=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.OccurrenceValidationCollector=m;function h(e,t,n,a){var o=[];if(r.reduce(t,function(t,n){return n.name===e.name?t+1:t},0)>1){var s=a.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});o.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}e.validateRuleDoesNotAlreadyExist=h;function g(e,t,r){var a=[],o;return n.contains(t,e)||(o=`Invalid rule override, rule: ->`+e+`<- cannot be overridden in the grammar: ->`+r+`<-as it is not defined in any of the super grammars `,a.push({message:o,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),a}e.validateRuleIsOverridden=g;function _(e,t,r,a){a===void 0&&(a=[]);var o=[],s=v(t.definition);if(n.isEmpty(s))return[];var c=e.name;n.contains(s,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:a}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:c});var l=n.difference(s,a.concat([e])),u=n.map(l,function(t){var i=n.cloneArr(a);return i.push(t),_(e,t,r,i)});return o.concat(n.flatten(u))}e.validateNoLeftRecursion=_;function v(e){var t=[];if(n.isEmpty(e))return t;var r=n.first(e);if(r instanceof c.NonTerminal)t.push(r.referencedRule);else if(r instanceof c.Alternative||r instanceof c.Option||r instanceof c.RepetitionMandatory||r instanceof c.RepetitionMandatoryWithSeparator||r instanceof c.RepetitionWithSeparator||r instanceof c.Repetition)t=t.concat(v(r.definition));else if(r instanceof c.Alternation)t=n.flatten(n.map(r.definition,function(e){return v(e.definition)}));else if(!(r instanceof c.Terminal))throw Error(`non exhaustive match`);var i=a.isOptionalProd(r),o=e.length>1;if(i&&o){var s=n.drop(e);return t.concat(v(s))}else return t}e.getFirstNoneTerminal=v;var y=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.alternations=[],t}return n.prototype.visitAlternation=function(e){this.alternations.push(e)},n}(l.GAstVisitor);function b(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(r,a){var o=n.dropRight(a.definition),c=n.map(o,function(r,o){var c=s.nextPossibleTokensAfter([r],[],null,1);return n.isEmpty(c)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:o}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:o+1}:null});return r.concat(n.compact(c))},[])}e.validateEmptyOrAlternative=b;function x(e,t,i){var a=new y;e.accept(a);var s=a.alternations;return s=r.reject(s,function(e){return e.ignoreAmbiguities===!0}),n.reduce(s,function(n,r){var a=r.idx,s=r.maxLookahead||t,c=o.getLookaheadPathsForOr(a,e,s,r),l=T(c,r,e,i),u=E(c,r,e,i);return n.concat(l,u)},[])}e.validateAmbiguousAlternationAlternatives=x;var S=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.RepetionCollector=S;function C(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n},[])}e.validateTooManyAlts=C;function w(e,t,n){var a=[];return r.forEach(e,function(e){var s=new S;e.accept(s);var c=s.allProductions;r.forEach(c,function(s){var c=o.getProdType(s),l=s.maxLookahead||t,u=s.idx,d=o.getLookaheadPathsForOptionalProd(u,e,c,l)[0];if(r.isEmpty(r.flatten(d))){var f=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});a.push({message:f,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),a}e.validateSomeNonEmptyLookaheadPath=w;function T(e,t,a,s){var c=[],l=r.reduce(e,function(n,i,a){return t.definition[a].ignoreAmbiguities===!0||r.forEach(i,function(i){var s=[a];r.forEach(e,function(e,n){a!==n&&o.containsPath(e,i)&&t.definition[n].ignoreAmbiguities!==!0&&s.push(n)}),s.length>1&&!o.containsPath(c,i)&&(c.push(i),n.push({alts:s,path:i}))}),n},[]);return n.map(l,function(e){var n=r.map(e.alts,function(e){return e+1});return{message:s.buildAlternationAmbiguityError({topLevelRule:a,alternation:t,ambiguityIndices:n,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:a.name,occurrence:t.idx,alternatives:[e.alts]}})}function E(e,t,n,a){var s=[],c=r.reduce(e,function(e,t,n){var i=r.map(t,function(e){return{idx:n,path:e}});return e.concat(i)},[]);return r.forEach(c,function(e){if(t.definition[e.idx].ignoreAmbiguities!==!0){var l=e.idx,u=e.path,d=r.findAll(c,function(e){return t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<l&&o.isStrictPrefixOfPath(e.path,u)}),f=r.map(d,function(e){var r=[e.idx+1,l+1],o=t.idx===0?``:t.idx;return{message:a.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:r}});s=s.concat(f)}}),s}e.checkPrefixAlternativesAmbiguities=E;function D(e,t,n){var a=[],o=r.map(t,function(e){return e.name});return r.forEach(e,function(e){var t=e.name;if(r.contains(o,t)){var s=n.buildNamespaceConflictError(e);a.push({message:s,type:i.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),a}}),le=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateGrammar=e.resolveGrammar=void 0;var t=I(),n=oe(),r=ce(),i=K();function a(e){e=t.defaults(e,{errMsgProvider:i.defaultGrammarResolverErrorProvider});var r={};return t.forEach(e.rules,function(e){r[e.name]=e}),n.resolveGrammar(r,e.errMsgProvider)}e.resolveGrammar=a;function o(e){return e=t.defaults(e,{errMsgProvider:i.defaultGrammarValidatorErrorProvider}),r.validateGrammar(e.rules,e.maxLookahead,e.tokenTypes,e.errMsgProvider,e.grammarName)}e.validateGrammar=o}),ue=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.EarlyExitException=e.NotAllInputParsedException=e.NoViableAltException=e.MismatchedTokenException=e.isRecognitionException=void 0;var n=I(),r=`MismatchedTokenException`,i=`NoViableAltException`,a=`EarlyExitException`,o=`NotAllInputParsedException`,s=[r,i,a,o];Object.freeze(s);function c(e){return n.contains(s,e.name)}e.isRecognitionException=c;var l=function(e){t(n,e);function n(t,n){var r=this.constructor,i=e.call(this,t)||this;return i.token=n,i.resyncedTokens=[],Object.setPrototypeOf(i,r.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,i.constructor),i}return n}(Error);e.MismatchedTokenException=function(e){t(n,e);function n(t,n,i){var a=e.call(this,t,n)||this;return a.previousToken=i,a.name=r,a}return n}(l),e.NoViableAltException=function(e){t(n,e);function n(t,n,r){var a=e.call(this,t,n)||this;return a.previousToken=r,a.name=i,a}return n}(l),e.NotAllInputParsedException=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.name=o,r}return n}(l),e.EarlyExitException=function(e){t(n,e);function n(t,n,r){var i=e.call(this,t,n)||this;return i.previousToken=r,i.name=a,i}return n}(l)}),de=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.attemptInRepetitionRecovery=e.Recoverable=e.InRuleRecoveryException=e.IN_RULE_RECOVERY_EXCEPTION=e.EOF_FOLLOW_KEY=void 0;var t=B(),n=I(),r=ue(),i=ie(),a=Z();e.EOF_FOLLOW_KEY={},e.IN_RULE_RECOVERY_EXCEPTION=`InRuleRecoveryException`;function o(t){this.name=e.IN_RULE_RECOVERY_EXCEPTION,this.message=t}e.InRuleRecoveryException=o,o.prototype=Error.prototype,e.Recoverable=function(){function c(){}return c.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=n.has(e,`recoveryEnabled`)?e.recoveryEnabled:a.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=s)},c.prototype.getTokenToInsert=function(e){var n=t.createTokenInstance(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n},c.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},c.prototype.tryInRepetitionRecovery=function(e,t,i,a){for(var o=this,s=this.findReSyncTokenType(),c=this.exportLexerState(),l=[],u=!1,d=this.LA(1),f=this.LA(1),p=function(){var e=o.LA(0),t=o.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:d,previous:e,ruleName:o.getCurrRuleFullName()}),i=new r.MismatchedTokenException(t,d,o.LA(0));i.resyncedTokens=n.dropRight(l),o.SAVE_ERROR(i)};!u;)if(this.tokenMatcher(f,a)){p();return}else if(i.call(this)){p(),e.apply(this,t);return}else this.tokenMatcher(f,s)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(c)},c.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!(n===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},c.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)},c.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new o(`sad sad panda`)},c.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},c.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||n.isEmpty(t))return!1;var i=this.LA(1);return n.find(t,function(e){return r.tokenMatcher(i,e)})!==void 0},c.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},c.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return n.contains(r,e)},c.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var i=t.tokenType;if(n.contains(e,i))return i;t=this.LA(r),r++}},c.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return e.EOF_FOLLOW_KEY;var t=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n,inRule:this.shortRuleNameToFullName(r)}},c.prototype.buildFullFollowKeyStack=function(){var t=this,r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return n.map(r,function(n,a){return a===0?e.EOF_FOLLOW_KEY:{ruleName:t.shortRuleNameToFullName(n),idxInCallingRule:i[a],inRule:t.shortRuleNameToFullName(r[a-1])}})},c.prototype.flattenFollowSet=function(){var e=this,t=n.map(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return n.flatten(t)},c.prototype.getFollowSetFromFollowKey=function(n){if(n===e.EOF_FOLLOW_KEY)return[t.EOF];var r=n.ruleName+n.idxInCallingRule+i.IN+n.inRule;return this.resyncFollows[r]},c.prototype.addToResyncTokens=function(e,n){return this.tokenMatcher(e,t.EOF)||n.push(e),n},c.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return n.dropRight(t)},c.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,a,o){},c.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},c.prototype.getHumanReadableRuleStack=function(){var e=this;return n.map(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},c}();function s(e,n,r,i,a,o,s){var c=this.getKeyForAutomaticLookahead(i,a),l=this.firstAfterRepMap[c];if(l===void 0){var u=this.getCurrRuleFullName(),d=this.getGAstProductions()[u];l=new o(d,a).startWalking(),this.firstAfterRepMap[c]=l}var f=l.token,p=l.occurrence,m=l.isEndOfRule;this.RULE_STACK.length===1&&m&&f===void 0&&(f=t.EOF,p=1),this.shouldInRepetitionRecoveryBeTried(f,p,s)&&this.tryInRepetitionRecovery(e,n,r,f)}e.attemptInRepetitionRecovery=s}),fe=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getKeyForAutomaticLookahead=e.AT_LEAST_ONE_SEP_IDX=e.MANY_SEP_IDX=e.AT_LEAST_ONE_IDX=e.MANY_IDX=e.OPTION_IDX=e.OR_IDX=e.BITS_FOR_ALT_IDX=e.BITS_FOR_RULE_IDX=e.BITS_FOR_OCCURRENCE_IDX=e.BITS_FOR_METHOD_TYPE=void 0,e.BITS_FOR_METHOD_TYPE=4,e.BITS_FOR_OCCURRENCE_IDX=8,e.BITS_FOR_RULE_IDX=12,e.BITS_FOR_ALT_IDX=8,e.OR_IDX=1<<e.BITS_FOR_OCCURRENCE_IDX,e.OPTION_IDX=2<<e.BITS_FOR_OCCURRENCE_IDX,e.MANY_IDX=3<<e.BITS_FOR_OCCURRENCE_IDX,e.AT_LEAST_ONE_IDX=4<<e.BITS_FOR_OCCURRENCE_IDX,e.MANY_SEP_IDX=5<<e.BITS_FOR_OCCURRENCE_IDX,e.AT_LEAST_ONE_SEP_IDX=6<<e.BITS_FOR_OCCURRENCE_IDX;function t(e,t,n){return n|t|e}e.getKeyForAutomaticLookahead=t,32-e.BITS_FOR_ALT_IDX}),pe=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LooksAhead=void 0;var t=q(),n=I(),r=Z(),i=fe(),a=W();e.LooksAhead=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=n.has(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:r.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=n.has(e,`maxLookahead`)?e.maxLookahead:r.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=n.isES2015MapSupported()?new Map:[],n.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var r=this;n.forEach(e,function(e){r.TRACE_INIT(e.name+` Rule Lookahead`,function(){var o=a.collectMethods(e),s=o.alternation,c=o.repetition,l=o.option,u=o.repetitionMandatory,d=o.repetitionMandatoryWithSeparator,f=o.repetitionWithSeparator;n.forEach(s,function(n){var o=n.idx===0?``:n.idx;r.TRACE_INIT(``+a.getProductionDslName(n)+o,function(){var a=t.buildLookaheadFuncForOr(n.idx,e,n.maxLookahead||r.maxLookahead,n.hasPredicates,r.dynamicTokensEnabled,r.lookAheadBuilderForAlternatives),o=i.getKeyForAutomaticLookahead(r.fullRuleNameToShort[e.name],i.OR_IDX,n.idx);r.setLaFuncCache(o,a)})}),n.forEach(c,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_IDX,t.PROD_TYPE.REPETITION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(l,function(n){r.computeLookaheadFunc(e,n.idx,i.OPTION_IDX,t.PROD_TYPE.OPTION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(u,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_IDX,t.PROD_TYPE.REPETITION_MANDATORY,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(d,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_SEP_IDX,t.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(f,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_SEP_IDX,t.PROD_TYPE.REPETITION_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))})})})},e.prototype.computeLookaheadFunc=function(e,n,r,a,o,s){var c=this;this.TRACE_INIT(``+s+(n===0?``:n),function(){var s=t.buildLookaheadFuncForOptionalProd(n,e,o||c.maxLookahead,c.dynamicTokensEnabled,a,c.lookAheadBuilderForOptional),l=i.getKeyForAutomaticLookahead(c.fullRuleNameToShort[e.name],r,n);c.setLaFuncCache(l,s)})},e.prototype.lookAheadBuilderForOptional=function(e,n,r){return t.buildSingleAlternativeLookaheadFunction(e,n,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,n,r,i){return t.buildAlternativesLookAheadFunc(e,n,r,i)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return i.getKeyForAutomaticLookahead(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}()}),me=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.addNoneTerminalToCst=e.addTerminalToCst=e.setNodeLocationFull=e.setNodeLocationOnlyOffset=void 0;function t(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}e.setNodeLocationOnlyOffset=t;function n(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}e.setNodeLocationFull=n;function r(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}e.addTerminalToCst=r;function i(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}e.addNoneTerminalToCst=i}),he=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.defineNameProp=e.functionName=e.classNameFromInstance=void 0;var t=I();function n(e){return i(e.constructor)}e.classNameFromInstance=n;var r=`name`;function i(e){return e.name||`anonymous`}e.functionName=i;function a(e,n){var i=Object.getOwnPropertyDescriptor(e,r);return t.isUndefined(i)||i.configurable?(Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!1,value:n}),!0):!1}e.defineNameProp=a}),ge=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.validateRedundantMethods=e.validateMissingCstMethods=e.validateVisitor=e.CstVisitorDefinitionError=e.createBaseVisitorConstructorWithDefaults=e.createBaseSemanticVisitorConstructor=e.defaultVisit=void 0;var t=I(),n=he();function r(e,n){for(var r=t.keys(e),i=r.length,a=0;a<i;a++)for(var o=r[a],s=e[o],c=s.length,l=0;l<c;l++){var u=s[l];u.tokenTypeIdx===void 0&&this[u.name](u.children,n)}}e.defaultVisit=r;function i(e,r){var i=function(){};return n.defineNameProp(i,e+`BaseSemantics`),i.prototype={visit:function(e,n){if(t.isArray(e)&&(e=e[0]),!t.isUndefined(e))return this[e.name](e.children,n)},validateVisitor:function(){var e=s(this,r);if(!t.isEmpty(e)){var i=t.map(e,function(e){return e.msg});throw Error(`Errors Detected in CST Visitor <`+n.functionName(this.constructor)+`>:
83
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_Factoring.`},buildInvalidRuleNameError:function(e){return`deprecated`},buildDuplicateRuleNameError:function(e){return`Duplicate definition, rule: ->`+(e.topLevelRule instanceof i.Rule?e.topLevelRule.name:e.topLevelRule)+`<- is already defined in the grammar: ->`+e.grammarName+`<-`}}}),oe=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.GastRefResolverVisitor=e.resolveGrammar=void 0;var n=Z(),r=I(),i=U();function a(e,t){var n=new o(e,t);return n.resolveRefs(),n.errors}e.resolveGrammar=a;var o=function(e){t(i,e);function i(t,n){var r=e.call(this)||this;return r.nameToTopRule=t,r.errMsgProvider=n,r.errors=[],r}return i.prototype.resolveRefs=function(){var e=this;r.forEach(r.values(this.nameToTopRule),function(t){e.currTopLevel=t,t.accept(e)})},i.prototype.visitNonTerminal=function(e){var t=this.nameToTopRule[e.nonTerminalName];if(t)e.referencedRule=t;else{var r=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,e);this.errors.push({message:r,type:n.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName})}},i}(i.GAstVisitor);e.GastRefResolverVisitor=o}),se=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.nextPossibleTokensAfter=e.possiblePathsFrom=e.NextTerminalAfterAtLeastOneSepWalker=e.NextTerminalAfterAtLeastOneWalker=e.NextTerminalAfterManySepWalker=e.NextTerminalAfterManyWalker=e.AbstractNextTerminalAfterProductionWalker=e.NextAfterTokenWalker=e.AbstractNextPossibleTokensWalker=void 0;var n=H(),r=I(),i=G(),a=V(),o=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topProd=t,r.path=n,r.possibleTokTypes=[],r.nextProductionName=``,r.nextProductionOccurrence=0,r.found=!1,r.isAtEndOfPath=!1,r}return n.prototype.startWalking=function(){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=r.cloneArr(this.path.ruleStack).reverse(),this.occurrenceStack=r.cloneArr(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},n.prototype.walk=function(t,n){n===void 0&&(n=[]),this.found||e.prototype.walk.call(this,t,n)},n.prototype.walkProdRef=function(e,t,n){if(e.referencedRule.name===this.nextProductionName&&e.idx===this.nextProductionOccurrence){var r=t.concat(n);this.updateExpectedNext(),this.walk(e.referencedRule,r)}},n.prototype.updateExpectedNext=function(){r.isEmpty(this.ruleStack)?(this.nextProductionName=``,this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},n}(n.RestWalker);e.AbstractNextPossibleTokensWalker=o,e.NextAfterTokenWalker=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.path=n,r.nextTerminalName=``,r.nextTerminalOccurrence=0,r.nextTerminalName=r.path.lastTok.name,r.nextTerminalOccurrence=r.path.lastTokOccurrence,r}return n.prototype.walkTerminal=function(e,t,n){if(this.isAtEndOfPath&&e.terminalType.name===this.nextTerminalName&&e.idx===this.nextTerminalOccurrence&&!this.found){var r=t.concat(n),o=new a.Alternative({definition:r});this.possibleTokTypes=i.first(o),this.found=!0}},n}(o);var s=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.topRule=t,r.occurrence=n,r.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},r}return n.prototype.startWalking=function(){return this.walk(this.topRule),this.result},n}(n.RestWalker);e.AbstractNextTerminalAfterProductionWalker=s,e.NextTerminalAfterManyWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkMany=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkMany.call(this,t,n,i)},n}(s),e.NextTerminalAfterManySepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkManySep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkManySep.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOne=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOne.call(this,t,n,i)},n}(s),e.NextTerminalAfterAtLeastOneSepWalker=function(e){t(n,e);function n(){return e!==null&&e.apply(this,arguments)||this}return n.prototype.walkAtLeastOneSep=function(t,n,i){if(t.idx===this.occurrence){var o=r.first(n.concat(i));this.result.isEndOfRule=o===void 0,o instanceof a.Terminal&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else e.prototype.walkAtLeastOneSep.call(this,t,n,i)},n}(s);function c(e,t,n){n===void 0&&(n=[]),n=r.cloneArr(n);var i=[],o=0;function s(t){return t.concat(r.drop(e,o+1))}function l(e){var r=c(s(e),t,n);return i.concat(r)}for(;n.length<t&&o<e.length;){var u=e[o];if(u instanceof a.Alternative||u instanceof a.NonTerminal)return l(u.definition);if(u instanceof a.Option)i=l(u.definition);else if(u instanceof a.RepetitionMandatory){var d=u.definition.concat([new a.Repetition({definition:u.definition})]);return l(d)}else if(u instanceof a.RepetitionMandatoryWithSeparator){var d=[new a.Alternative({definition:u.definition}),new a.Repetition({definition:[new a.Terminal({terminalType:u.separator})].concat(u.definition)})];return l(d)}else if(u instanceof a.RepetitionWithSeparator){var d=u.definition.concat([new a.Repetition({definition:[new a.Terminal({terminalType:u.separator})].concat(u.definition)})]);i=l(d)}else if(u instanceof a.Repetition){var d=u.definition.concat([new a.Repetition({definition:u.definition})]);i=l(d)}else{if(u instanceof a.Alternation)return r.forEach(u.definition,function(e){r.isEmpty(e.definition)===!1&&(i=l(e.definition))}),i;if(u instanceof a.Terminal)n.push(u.terminalType);else throw Error(`non exhaustive match`)}o++}return i.push({partialPath:n,suffixDef:r.drop(e,o)}),i}e.possiblePathsFrom=c;function l(e,t,n,i){var o=`EXIT_NONE_TERMINAL`,s=[o],c=`EXIT_ALTERNATIVE`,l=!1,d=t.length,f=d-i-1,p=[],m=[];for(m.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!r.isEmpty(m);){var h=m.pop();if(h===c){l&&r.last(m).idx<=f&&m.pop();continue}var g=h.def,_=h.idx,v=h.ruleStack,y=h.occurrenceStack;if(!r.isEmpty(g)){var b=g[0];if(b===o){var x={idx:_,def:r.drop(g),ruleStack:r.dropRight(v),occurrenceStack:r.dropRight(y)};m.push(x)}else if(b instanceof a.Terminal)if(_<d-1){var S=_+1,C=t[S];if(n(C,b.terminalType)){var x={idx:S,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(x)}}else if(_===d-1)p.push({nextTokenType:b.terminalType,nextTokenOccurrence:b.idx,ruleStack:v,occurrenceStack:y}),l=!0;else throw Error(`non exhaustive match`);else if(b instanceof a.NonTerminal){var w=r.cloneArr(v);w.push(b.nonTerminalName);var T=r.cloneArr(y);T.push(b.idx);var x={idx:_,def:b.definition.concat(s,r.drop(g)),ruleStack:w,occurrenceStack:T};m.push(x)}else if(b instanceof a.Option){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var D={idx:_,def:b.definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.RepetitionMandatory){var O=new a.Repetition({definition:b.definition,idx:b.idx}),k=b.definition.concat([O],r.drop(g)),x={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(x)}else if(b instanceof a.RepetitionMandatoryWithSeparator){var A=new a.Terminal({terminalType:b.separator}),O=new a.Repetition({definition:[A].concat(b.definition),idx:b.idx}),k=b.definition.concat([O],r.drop(g)),x={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(x)}else if(b instanceof a.RepetitionWithSeparator){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var A=new a.Terminal({terminalType:b.separator}),j=new a.Repetition({definition:[A].concat(b.definition),idx:b.idx}),k=b.definition.concat([j],r.drop(g)),D={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.Repetition){var E={idx:_,def:r.drop(g),ruleStack:v,occurrenceStack:y};m.push(E),m.push(c);var j=new a.Repetition({definition:b.definition,idx:b.idx}),k=b.definition.concat([j],r.drop(g)),D={idx:_,def:k,ruleStack:v,occurrenceStack:y};m.push(D)}else if(b instanceof a.Alternation)for(var M=b.definition.length-1;M>=0;M--){var N={idx:_,def:b.definition[M].definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y};m.push(N),m.push(c)}else if(b instanceof a.Alternative)m.push({idx:_,def:b.definition.concat(r.drop(g)),ruleStack:v,occurrenceStack:y});else if(b instanceof a.Rule)m.push(u(b,_,v,y));else throw Error(`non exhaustive match`)}}return p}e.nextPossibleTokensAfter=l;function u(e,t,n,i){var a=r.cloneArr(n);a.push(e.name);var o=r.cloneArr(i);return o.push(1),{idx:t,def:e.definition,ruleStack:a,occurrenceStack:o}}}),q=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.areTokenCategoriesNotUsed=e.isStrictPrefixOfPath=e.containsPath=e.getLookaheadPathsForOptionalProd=e.getLookaheadPathsForOr=e.lookAheadSequenceFromAlternatives=e.buildSingleAlternativeLookaheadFunction=e.buildAlternativesLookAheadFunc=e.buildLookaheadFuncForOptionalProd=e.buildLookaheadFuncForOr=e.getProdType=e.PROD_TYPE=void 0;var n=I(),r=se(),i=H(),a=R(),o=V(),s=U(),c;(function(e){e[e.OPTION=0]=`OPTION`,e[e.REPETITION=1]=`REPETITION`,e[e.REPETITION_MANDATORY=2]=`REPETITION_MANDATORY`,e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]=`REPETITION_MANDATORY_WITH_SEPARATOR`,e[e.REPETITION_WITH_SEPARATOR=4]=`REPETITION_WITH_SEPARATOR`,e[e.ALTERNATION=5]=`ALTERNATION`})(c=e.PROD_TYPE||={});function l(e){if(e instanceof o.Option)return c.OPTION;if(e instanceof o.Repetition)return c.REPETITION;if(e instanceof o.RepetitionMandatory)return c.REPETITION_MANDATORY;if(e instanceof o.RepetitionMandatoryWithSeparator)return c.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof o.RepetitionWithSeparator)return c.REPETITION_WITH_SEPARATOR;if(e instanceof o.Alternation)return c.ALTERNATION;throw Error(`non exhaustive match`)}e.getProdType=l;function u(e,t,n,r,i,o){var s=b(e,t,n);return o(s,r,w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher,i)}e.buildLookaheadFuncForOr=u;function d(e,t,n,r,i,o){var s=x(e,t,i,n),c=w(s)?a.tokenStructuredMatcherNoCategories:a.tokenStructuredMatcher;return o(s[0],c,r)}e.buildLookaheadFuncForOptionalProd=d;function f(e,t,r,i){var a=e.length,o=n.every(e,function(e){return n.every(e,function(e){return e.length===1})});if(t)return function(t){for(var i=n.map(t,function(e){return e.GATE}),o=0;o<a;o++){var s=e[o],c=s.length,l=i[o];if(!(l!==void 0&&l.call(this)===!1))e:for(var u=0;u<c;u++){for(var d=s[u],f=d.length,p=0;p<f;p++)if(r(this.LA(p+1),d[p])===!1)continue e;return o}}};if(o&&!i){var s=n.map(e,function(e){return n.flatten(e)}),c=n.reduce(s,function(e,t,r){return n.forEach(t,function(t){n.has(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),n.forEach(t.categoryMatches,function(t){n.has(e,t)||(e[t]=r)})}),e},[]);return function(){return c[this.LA(1).tokenTypeIdx]}}else return function(){for(var t=0;t<a;t++){var n=e[t],i=n.length;e:for(var o=0;o<i;o++){for(var s=n[o],c=s.length,l=0;l<c;l++)if(r(this.LA(l+1),s[l])===!1)continue e;return t}}}}e.buildAlternativesLookAheadFunc=f;function p(e,t,r){var i=n.every(e,function(e){return e.length===1}),a=e.length;if(i&&!r){var o=n.flatten(e);if(o.length===1&&n.isEmpty(o[0].categoryMatches)){var s=o[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{var c=n.reduce(o,function(e,t,r){return e[t.tokenTypeIdx]=!0,n.forEach(t.categoryMatches,function(t){e[t]=!0}),e},[]);return function(){return c[this.LA(1).tokenTypeIdx]===!0}}}else return function(){e:for(var n=0;n<a;n++){for(var r=e[n],i=r.length,o=0;o<i;o++)if(t(this.LA(o+1),r[o])===!1)continue e;return!0}return!1}}e.buildSingleAlternativeLookaheadFunction=p;var m=function(e){t(n,e);function n(t,n,r){var i=e.call(this)||this;return i.topProd=t,i.targetOccurrence=n,i.targetProdType=r,i}return n.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},n.prototype.checkIsTarget=function(e,t,n,r){return e.idx===this.targetOccurrence&&this.targetProdType===t?(this.restDef=n.concat(r),!0):!1},n.prototype.walkOption=function(t,n,r){this.checkIsTarget(t,c.OPTION,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkAtLeastOne=function(t,n,r){this.checkIsTarget(t,c.REPETITION_MANDATORY,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkAtLeastOneSep=function(t,n,r){this.checkIsTarget(t,c.REPETITION_MANDATORY_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkMany=function(t,n,r){this.checkIsTarget(t,c.REPETITION,n,r)||e.prototype.walkOption.call(this,t,n,r)},n.prototype.walkManySep=function(t,n,r){this.checkIsTarget(t,c.REPETITION_WITH_SEPARATOR,n,r)||e.prototype.walkOption.call(this,t,n,r)},n}(i.RestWalker),h=function(e){t(n,e);function n(t,n,r){var i=e.call(this)||this;return i.targetOccurrence=t,i.targetProdType=n,i.targetRef=r,i.result=[],i}return n.prototype.checkIsTarget=function(e,t){e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.targetRef===void 0||e===this.targetRef)&&(this.result=e.definition)},n.prototype.visitOption=function(e){this.checkIsTarget(e,c.OPTION)},n.prototype.visitRepetition=function(e){this.checkIsTarget(e,c.REPETITION)},n.prototype.visitRepetitionMandatory=function(e){this.checkIsTarget(e,c.REPETITION_MANDATORY)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.checkIsTarget(e,c.REPETITION_MANDATORY_WITH_SEPARATOR)},n.prototype.visitRepetitionWithSeparator=function(e){this.checkIsTarget(e,c.REPETITION_WITH_SEPARATOR)},n.prototype.visitAlternation=function(e){this.checkIsTarget(e,c.ALTERNATION)},n}(s.GAstVisitor);function g(e){for(var t=Array(e),n=0;n<e;n++)t[n]=[];return t}function _(e){for(var t=[``],n=0;n<e.length;n++){for(var r=e[n],i=[],a=0;a<t.length;a++){var o=t[a];i.push(o+`_`+r.tokenTypeIdx);for(var s=0;s<r.categoryMatches.length;s++){var c=`_`+r.categoryMatches[s];i.push(o+c)}}t=i}return t}function v(e,t,n){for(var r=0;r<e.length;r++)if(r!==n){for(var i=e[r],a=0;a<t.length;a++)if(i[t[a]]===!0)return!1}return!0}function y(e,t){for(var i=n.map(e,function(e){return r.possiblePathsFrom([e],1)}),a=g(i.length),o=n.map(i,function(e){var t={};return n.forEach(e,function(e){var r=_(e.partialPath);n.forEach(r,function(e){t[e]=!0})}),t}),s=i,c=1;c<=t;c++){var l=s;s=g(l.length);for(var u=function(e){for(var i=l[e],u=0;u<i.length;u++){var d=i[u].partialPath,f=i[u].suffixDef,p=_(d);if(v(o,p,e)||n.isEmpty(f)||d.length===t){var m=a[e];if(S(m,d)===!1){m.push(d);for(var h=0;h<p.length;h++){var g=p[h];o[e][g]=!0}}}else{var y=r.possiblePathsFrom(f,c+1,d);s[e]=s[e].concat(y),n.forEach(y,function(t){var r=_(t.partialPath);n.forEach(r,function(t){o[e][t]=!0})})}}},d=0;d<l.length;d++)u(d)}return a}e.lookAheadSequenceFromAlternatives=y;function b(e,t,n,r){var i=new h(e,c.ALTERNATION,r);return t.accept(i),y(i.result,n)}e.getLookaheadPathsForOr=b;function x(e,t,n,r){var i=new h(e,n);t.accept(i);var a=i.result,s=new m(t,e,n).startWalking();return y([new o.Alternative({definition:a}),new o.Alternative({definition:s})],r)}e.getLookaheadPathsForOptionalProd=x;function S(e,t){e:for(var n=0;n<e.length;n++){var r=e[n];if(r.length===t.length){for(var i=0;i<r.length;i++){var a=t[i],o=r[i];if(!(a===o||o.categoryMatchesMap[a.tokenTypeIdx]!==void 0))continue e}return!0}}return!1}e.containsPath=S;function C(e,t){return e.length<t.length&&n.every(e,function(e,n){var r=t[n];return e===r||r.categoryMatchesMap[e.tokenTypeIdx]})}e.isStrictPrefixOfPath=C;function w(e){return n.every(e,function(e){return n.every(e,function(e){return n.every(e,function(e){return n.isEmpty(e.categoryMatches)})})})}e.areTokenCategoriesNotUsed=w}),ce=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.checkPrefixAlternativesAmbiguities=e.validateSomeNonEmptyLookaheadPath=e.validateTooManyAlts=e.RepetionCollector=e.validateAmbiguousAlternationAlternatives=e.validateEmptyOrAlternative=e.getFirstNoneTerminal=e.validateNoLeftRecursion=e.validateRuleIsOverridden=e.validateRuleDoesNotAlreadyExist=e.OccurrenceValidationCollector=e.identifyProductionForDuplicates=e.validateGrammar=void 0;var n=I(),r=I(),i=Z(),a=W(),o=q(),s=se(),c=V(),l=U();function u(e,t,i,a,o){var s=n.map(e,function(e){return d(e,a)}),c=n.map(e,function(e){return _(e,e,a)}),l=[],u=[],f=[];r.every(c,r.isEmpty)&&(l=r.map(e,function(e){return b(e,a)}),u=r.map(e,function(e){return x(e,t,a)}),f=w(e,t,a));var p=D(e,i,a),m=r.map(e,function(e){return C(e,a)}),g=r.map(e,function(t){return h(t,e,o,a)});return n.flatten(s.concat(f,c,l,u,p,m,g))}e.validateGrammar=u;function d(e,t){var r=new m;e.accept(r);var o=r.allProductions,s=n.groupBy(o,f),c=n.pick(s,function(e){return e.length>1});return n.map(n.values(c),function(r){var o=n.first(r),s=t.buildDuplicateFoundError(e,r),c=a.getProductionDslName(o),l={message:s,type:i.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:c,occurrence:o.idx},u=p(o);return u&&(l.parameter=u),l})}function f(e){return a.getProductionDslName(e)+`_#_`+e.idx+`_#_`+p(e)}e.identifyProductionForDuplicates=f;function p(e){return e instanceof c.Terminal?e.terminalType.name:e instanceof c.NonTerminal?e.nonTerminalName:``}var m=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitNonTerminal=function(e){this.allProductions.push(e)},n.prototype.visitOption=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n.prototype.visitAlternation=function(e){this.allProductions.push(e)},n.prototype.visitTerminal=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.OccurrenceValidationCollector=m;function h(e,t,n,a){var o=[];if(r.reduce(t,function(t,n){return n.name===e.name?t+1:t},0)>1){var s=a.buildDuplicateRuleNameError({topLevelRule:e,grammarName:n});o.push({message:s,type:i.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}e.validateRuleDoesNotAlreadyExist=h;function g(e,t,r){var a=[],o;return n.contains(t,e)||(o=`Invalid rule override, rule: ->`+e+`<- cannot be overridden in the grammar: ->`+r+`<-as it is not defined in any of the super grammars `,a.push({message:o,type:i.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),a}e.validateRuleIsOverridden=g;function _(e,t,r,a){a===void 0&&(a=[]);var o=[],s=v(t.definition);if(n.isEmpty(s))return[];var c=e.name;n.contains(s,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:a}),type:i.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:c});var l=n.difference(s,a.concat([e])),u=n.map(l,function(t){var i=n.cloneArr(a);return i.push(t),_(e,t,r,i)});return o.concat(n.flatten(u))}e.validateNoLeftRecursion=_;function v(e){var t=[];if(n.isEmpty(e))return t;var r=n.first(e);if(r instanceof c.NonTerminal)t.push(r.referencedRule);else if(r instanceof c.Alternative||r instanceof c.Option||r instanceof c.RepetitionMandatory||r instanceof c.RepetitionMandatoryWithSeparator||r instanceof c.RepetitionWithSeparator||r instanceof c.Repetition)t=t.concat(v(r.definition));else if(r instanceof c.Alternation)t=n.flatten(n.map(r.definition,function(e){return v(e.definition)}));else if(!(r instanceof c.Terminal))throw Error(`non exhaustive match`);var i=a.isOptionalProd(r),o=e.length>1;if(i&&o){var s=n.drop(e);return t.concat(v(s))}else return t}e.getFirstNoneTerminal=v;var y=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.alternations=[],t}return n.prototype.visitAlternation=function(e){this.alternations.push(e)},n}(l.GAstVisitor);function b(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(r,a){var o=n.dropRight(a.definition),c=n.map(o,function(r,o){var c=s.nextPossibleTokensAfter([r],[],null,1);return n.isEmpty(c)?{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:o}),type:i.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:o+1}:null});return r.concat(n.compact(c))},[])}e.validateEmptyOrAlternative=b;function x(e,t,i){var a=new y;e.accept(a);var s=a.alternations;return s=r.reject(s,function(e){return e.ignoreAmbiguities===!0}),n.reduce(s,function(n,r){var a=r.idx,s=r.maxLookahead||t,c=o.getLookaheadPathsForOr(a,e,s,r),l=T(c,r,e,i),u=E(c,r,e,i);return n.concat(l,u)},[])}e.validateAmbiguousAlternationAlternatives=x;var S=function(e){t(n,e);function n(){var t=e!==null&&e.apply(this,arguments)||this;return t.allProductions=[],t}return n.prototype.visitRepetitionWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatory=function(e){this.allProductions.push(e)},n.prototype.visitRepetitionMandatoryWithSeparator=function(e){this.allProductions.push(e)},n.prototype.visitRepetition=function(e){this.allProductions.push(e)},n}(l.GAstVisitor);e.RepetionCollector=S;function C(e,t){var r=new y;e.accept(r);var a=r.alternations;return n.reduce(a,function(n,r){return r.definition.length>255&&n.push({message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:r}),type:i.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:r.idx}),n},[])}e.validateTooManyAlts=C;function w(e,t,n){var a=[];return r.forEach(e,function(e){var s=new S;e.accept(s);var c=s.allProductions;r.forEach(c,function(s){var c=o.getProdType(s),l=s.maxLookahead||t,u=s.idx,d=o.getLookaheadPathsForOptionalProd(u,e,c,l)[0];if(r.isEmpty(r.flatten(d))){var f=n.buildEmptyRepetitionError({topLevelRule:e,repetition:s});a.push({message:f,type:i.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:e.name})}})}),a}e.validateSomeNonEmptyLookaheadPath=w;function T(e,t,a,s){var c=[],l=r.reduce(e,function(n,i,a){return t.definition[a].ignoreAmbiguities===!0||r.forEach(i,function(i){var s=[a];r.forEach(e,function(e,n){a!==n&&o.containsPath(e,i)&&t.definition[n].ignoreAmbiguities!==!0&&s.push(n)}),s.length>1&&!o.containsPath(c,i)&&(c.push(i),n.push({alts:s,path:i}))}),n},[]);return n.map(l,function(e){var n=r.map(e.alts,function(e){return e+1});return{message:s.buildAlternationAmbiguityError({topLevelRule:a,alternation:t,ambiguityIndices:n,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:a.name,occurrence:t.idx,alternatives:[e.alts]}})}function E(e,t,n,a){var s=[],c=r.reduce(e,function(e,t,n){var i=r.map(t,function(e){return{idx:n,path:e}});return e.concat(i)},[]);return r.forEach(c,function(e){if(t.definition[e.idx].ignoreAmbiguities!==!0){var l=e.idx,u=e.path,d=r.findAll(c,function(e){return t.definition[e.idx].ignoreAmbiguities!==!0&&e.idx<l&&o.isStrictPrefixOfPath(e.path,u)}),f=r.map(d,function(e){var r=[e.idx+1,l+1],o=t.idx===0?``:t.idx;return{message:a.buildAlternationPrefixAmbiguityError({topLevelRule:n,alternation:t,ambiguityIndices:r,prefixPath:e.path}),type:i.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:n.name,occurrence:o,alternatives:r}});s=s.concat(f)}}),s}e.checkPrefixAlternativesAmbiguities=E;function D(e,t,n){var a=[],o=r.map(t,function(e){return e.name});return r.forEach(e,function(e){var t=e.name;if(r.contains(o,t)){var s=n.buildNamespaceConflictError(e);a.push({message:s,type:i.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t})}}),a}}),le=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateGrammar=e.resolveGrammar=void 0;var t=I(),n=oe(),r=ce(),i=K();function a(e){e=t.defaults(e,{errMsgProvider:i.defaultGrammarResolverErrorProvider});var r={};return t.forEach(e.rules,function(e){r[e.name]=e}),n.resolveGrammar(r,e.errMsgProvider)}e.resolveGrammar=a;function o(e){return e=t.defaults(e,{errMsgProvider:i.defaultGrammarValidatorErrorProvider}),r.validateGrammar(e.rules,e.maxLookahead,e.tokenTypes,e.errMsgProvider,e.grammarName)}e.validateGrammar=o}),ue=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EarlyExitException=e.NotAllInputParsedException=e.NoViableAltException=e.MismatchedTokenException=e.isRecognitionException=void 0;var n=I(),r=`MismatchedTokenException`,i=`NoViableAltException`,a=`EarlyExitException`,o=`NotAllInputParsedException`,s=[r,i,a,o];Object.freeze(s);function c(e){return n.contains(s,e.name)}e.isRecognitionException=c;var l=function(e){t(n,e);function n(t,n){var r=this.constructor,i=e.call(this,t)||this;return i.token=n,i.resyncedTokens=[],Object.setPrototypeOf(i,r.prototype),Error.captureStackTrace&&Error.captureStackTrace(i,i.constructor),i}return n}(Error);e.MismatchedTokenException=function(e){t(n,e);function n(t,n,i){var a=e.call(this,t,n)||this;return a.previousToken=i,a.name=r,a}return n}(l),e.NoViableAltException=function(e){t(n,e);function n(t,n,r){var a=e.call(this,t,n)||this;return a.previousToken=r,a.name=i,a}return n}(l),e.NotAllInputParsedException=function(e){t(n,e);function n(t,n){var r=e.call(this,t,n)||this;return r.name=o,r}return n}(l),e.EarlyExitException=function(e){t(n,e);function n(t,n,r){var i=e.call(this,t,n)||this;return i.previousToken=r,i.name=a,i}return n}(l)}),de=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.attemptInRepetitionRecovery=e.Recoverable=e.InRuleRecoveryException=e.IN_RULE_RECOVERY_EXCEPTION=e.EOF_FOLLOW_KEY=void 0;var t=B(),n=I(),r=ue(),i=ie(),a=Z();e.EOF_FOLLOW_KEY={},e.IN_RULE_RECOVERY_EXCEPTION=`InRuleRecoveryException`;function o(t){this.name=e.IN_RULE_RECOVERY_EXCEPTION,this.message=t}e.InRuleRecoveryException=o,o.prototype=Error.prototype,e.Recoverable=function(){function c(){}return c.prototype.initRecoverable=function(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=n.has(e,`recoveryEnabled`)?e.recoveryEnabled:a.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=s)},c.prototype.getTokenToInsert=function(e){var n=t.createTokenInstance(e,``,NaN,NaN,NaN,NaN,NaN,NaN);return n.isInsertedInRecovery=!0,n},c.prototype.canTokenTypeBeInsertedInRecovery=function(e){return!0},c.prototype.tryInRepetitionRecovery=function(e,t,i,a){for(var o=this,s=this.findReSyncTokenType(),c=this.exportLexerState(),l=[],u=!1,d=this.LA(1),f=this.LA(1),p=function(){var e=o.LA(0),t=o.errorMessageProvider.buildMismatchTokenMessage({expected:a,actual:d,previous:e,ruleName:o.getCurrRuleFullName()}),i=new r.MismatchedTokenException(t,d,o.LA(0));i.resyncedTokens=n.dropRight(l),o.SAVE_ERROR(i)};!u;)if(this.tokenMatcher(f,a)){p();return}else if(i.call(this)){p(),e.apply(this,t);return}else this.tokenMatcher(f,s)?u=!0:(f=this.SKIP_TOKEN(),this.addToResyncTokens(f,l));this.importLexerState(c)},c.prototype.shouldInRepetitionRecoveryBeTried=function(e,t,n){return!(n===!1||e===void 0||t===void 0||this.tokenMatcher(this.LA(1),e)||this.isBackTracking()||this.canPerformInRuleRecovery(e,this.getFollowsForInRuleRecovery(e,t)))},c.prototype.getFollowsForInRuleRecovery=function(e,t){var n=this.getCurrentGrammarPath(e,t);return this.getNextPossibleTokenTypes(n)},c.prototype.tryInRuleRecovery=function(e,t){if(this.canRecoverWithSingleTokenInsertion(e,t))return this.getTokenToInsert(e);if(this.canRecoverWithSingleTokenDeletion(e)){var n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new o(`sad sad panda`)},c.prototype.canPerformInRuleRecovery=function(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)},c.prototype.canRecoverWithSingleTokenInsertion=function(e,t){var r=this;if(!this.canTokenTypeBeInsertedInRecovery(e)||n.isEmpty(t))return!1;var i=this.LA(1);return n.find(t,function(e){return r.tokenMatcher(i,e)})!==void 0},c.prototype.canRecoverWithSingleTokenDeletion=function(e){return this.tokenMatcher(this.LA(2),e)},c.prototype.isInCurrentRuleReSyncSet=function(e){var t=this.getCurrFollowKey(),r=this.getFollowSetFromFollowKey(t);return n.contains(r,e)},c.prototype.findReSyncTokenType=function(){for(var e=this.flattenFollowSet(),t=this.LA(1),r=2;;){var i=t.tokenType;if(n.contains(e,i))return i;t=this.LA(r),r++}},c.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return e.EOF_FOLLOW_KEY;var t=this.getLastExplicitRuleShortName(),n=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n,inRule:this.shortRuleNameToFullName(r)}},c.prototype.buildFullFollowKeyStack=function(){var t=this,r=this.RULE_STACK,i=this.RULE_OCCURRENCE_STACK;return n.map(r,function(n,a){return a===0?e.EOF_FOLLOW_KEY:{ruleName:t.shortRuleNameToFullName(n),idxInCallingRule:i[a],inRule:t.shortRuleNameToFullName(r[a-1])}})},c.prototype.flattenFollowSet=function(){var e=this,t=n.map(this.buildFullFollowKeyStack(),function(t){return e.getFollowSetFromFollowKey(t)});return n.flatten(t)},c.prototype.getFollowSetFromFollowKey=function(n){if(n===e.EOF_FOLLOW_KEY)return[t.EOF];var r=n.ruleName+n.idxInCallingRule+i.IN+n.inRule;return this.resyncFollows[r]},c.prototype.addToResyncTokens=function(e,n){return this.tokenMatcher(e,t.EOF)||n.push(e),n},c.prototype.reSyncTo=function(e){for(var t=[],r=this.LA(1);this.tokenMatcher(r,e)===!1;)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,t);return n.dropRight(t)},c.prototype.attemptInRepetitionRecovery=function(e,t,n,r,i,a,o){},c.prototype.getCurrentGrammarPath=function(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}},c.prototype.getHumanReadableRuleStack=function(){var e=this;return n.map(this.RULE_STACK,function(t){return e.shortRuleNameToFullName(t)})},c}();function s(e,n,r,i,a,o,s){var c=this.getKeyForAutomaticLookahead(i,a),l=this.firstAfterRepMap[c];if(l===void 0){var u=this.getCurrRuleFullName(),d=this.getGAstProductions()[u];l=new o(d,a).startWalking(),this.firstAfterRepMap[c]=l}var f=l.token,p=l.occurrence,m=l.isEndOfRule;this.RULE_STACK.length===1&&m&&f===void 0&&(f=t.EOF,p=1),this.shouldInRepetitionRecoveryBeTried(f,p,s)&&this.tryInRepetitionRecovery(e,n,r,f)}e.attemptInRepetitionRecovery=s}),fe=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getKeyForAutomaticLookahead=e.AT_LEAST_ONE_SEP_IDX=e.MANY_SEP_IDX=e.AT_LEAST_ONE_IDX=e.MANY_IDX=e.OPTION_IDX=e.OR_IDX=e.BITS_FOR_ALT_IDX=e.BITS_FOR_RULE_IDX=e.BITS_FOR_OCCURRENCE_IDX=e.BITS_FOR_METHOD_TYPE=void 0,e.BITS_FOR_METHOD_TYPE=4,e.BITS_FOR_OCCURRENCE_IDX=8,e.BITS_FOR_RULE_IDX=12,e.BITS_FOR_ALT_IDX=8,e.OR_IDX=1<<e.BITS_FOR_OCCURRENCE_IDX,e.OPTION_IDX=2<<e.BITS_FOR_OCCURRENCE_IDX,e.MANY_IDX=3<<e.BITS_FOR_OCCURRENCE_IDX,e.AT_LEAST_ONE_IDX=4<<e.BITS_FOR_OCCURRENCE_IDX,e.MANY_SEP_IDX=5<<e.BITS_FOR_OCCURRENCE_IDX,e.AT_LEAST_ONE_SEP_IDX=6<<e.BITS_FOR_OCCURRENCE_IDX;function t(e,t,n){return n|t|e}e.getKeyForAutomaticLookahead=t,32-e.BITS_FOR_ALT_IDX}),pe=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LooksAhead=void 0;var t=q(),n=I(),r=Z(),i=fe(),a=W();e.LooksAhead=function(){function e(){}return e.prototype.initLooksAhead=function(e){this.dynamicTokensEnabled=n.has(e,`dynamicTokensEnabled`)?e.dynamicTokensEnabled:r.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=n.has(e,`maxLookahead`)?e.maxLookahead:r.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookAheadFuncsCache=n.isES2015MapSupported()?new Map:[],n.isES2015MapSupported()?(this.getLaFuncFromCache=this.getLaFuncFromMap,this.setLaFuncCache=this.setLaFuncCacheUsingMap):(this.getLaFuncFromCache=this.getLaFuncFromObj,this.setLaFuncCache=this.setLaFuncUsingObj)},e.prototype.preComputeLookaheadFunctions=function(e){var r=this;n.forEach(e,function(e){r.TRACE_INIT(e.name+` Rule Lookahead`,function(){var o=a.collectMethods(e),s=o.alternation,c=o.repetition,l=o.option,u=o.repetitionMandatory,d=o.repetitionMandatoryWithSeparator,f=o.repetitionWithSeparator;n.forEach(s,function(n){var o=n.idx===0?``:n.idx;r.TRACE_INIT(``+a.getProductionDslName(n)+o,function(){var a=t.buildLookaheadFuncForOr(n.idx,e,n.maxLookahead||r.maxLookahead,n.hasPredicates,r.dynamicTokensEnabled,r.lookAheadBuilderForAlternatives),o=i.getKeyForAutomaticLookahead(r.fullRuleNameToShort[e.name],i.OR_IDX,n.idx);r.setLaFuncCache(o,a)})}),n.forEach(c,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_IDX,t.PROD_TYPE.REPETITION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(l,function(n){r.computeLookaheadFunc(e,n.idx,i.OPTION_IDX,t.PROD_TYPE.OPTION,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(u,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_IDX,t.PROD_TYPE.REPETITION_MANDATORY,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(d,function(n){r.computeLookaheadFunc(e,n.idx,i.AT_LEAST_ONE_SEP_IDX,t.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))}),n.forEach(f,function(n){r.computeLookaheadFunc(e,n.idx,i.MANY_SEP_IDX,t.PROD_TYPE.REPETITION_WITH_SEPARATOR,n.maxLookahead,a.getProductionDslName(n))})})})},e.prototype.computeLookaheadFunc=function(e,n,r,a,o,s){var c=this;this.TRACE_INIT(``+s+(n===0?``:n),function(){var s=t.buildLookaheadFuncForOptionalProd(n,e,o||c.maxLookahead,c.dynamicTokensEnabled,a,c.lookAheadBuilderForOptional),l=i.getKeyForAutomaticLookahead(c.fullRuleNameToShort[e.name],r,n);c.setLaFuncCache(l,s)})},e.prototype.lookAheadBuilderForOptional=function(e,n,r){return t.buildSingleAlternativeLookaheadFunction(e,n,r)},e.prototype.lookAheadBuilderForAlternatives=function(e,n,r,i){return t.buildAlternativesLookAheadFunc(e,n,r,i)},e.prototype.getKeyForAutomaticLookahead=function(e,t){var n=this.getLastExplicitRuleShortName();return i.getKeyForAutomaticLookahead(n,e,t)},e.prototype.getLaFuncFromCache=function(e){},e.prototype.getLaFuncFromMap=function(e){return this.lookAheadFuncsCache.get(e)},e.prototype.getLaFuncFromObj=function(e){return this.lookAheadFuncsCache[e]},e.prototype.setLaFuncCache=function(e,t){},e.prototype.setLaFuncCacheUsingMap=function(e,t){this.lookAheadFuncsCache.set(e,t)},e.prototype.setLaFuncUsingObj=function(e,t){this.lookAheadFuncsCache[e]=t},e}()}),me=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.addNoneTerminalToCst=e.addTerminalToCst=e.setNodeLocationFull=e.setNodeLocationOnlyOffset=void 0;function t(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}e.setNodeLocationOnlyOffset=t;function n(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}e.setNodeLocationFull=n;function r(e,t,n){e.children[n]===void 0?e.children[n]=[t]:e.children[n].push(t)}e.addTerminalToCst=r;function i(e,t,n){e.children[t]===void 0?e.children[t]=[n]:e.children[t].push(n)}e.addNoneTerminalToCst=i}),he=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.defineNameProp=e.functionName=e.classNameFromInstance=void 0;var t=I();function n(e){return i(e.constructor)}e.classNameFromInstance=n;var r=`name`;function i(e){return e.name||`anonymous`}e.functionName=i;function a(e,n){var i=Object.getOwnPropertyDescriptor(e,r);return t.isUndefined(i)||i.configurable?(Object.defineProperty(e,r,{enumerable:!1,configurable:!0,writable:!1,value:n}),!0):!1}e.defineNameProp=a}),ge=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateRedundantMethods=e.validateMissingCstMethods=e.validateVisitor=e.CstVisitorDefinitionError=e.createBaseVisitorConstructorWithDefaults=e.createBaseSemanticVisitorConstructor=e.defaultVisit=void 0;var t=I(),n=he();function r(e,n){for(var r=t.keys(e),i=r.length,a=0;a<i;a++)for(var o=r[a],s=e[o],c=s.length,l=0;l<c;l++){var u=s[l];u.tokenTypeIdx===void 0&&this[u.name](u.children,n)}}e.defaultVisit=r;function i(e,r){var i=function(){};return n.defineNameProp(i,e+`BaseSemantics`),i.prototype={visit:function(e,n){if(t.isArray(e)&&(e=e[0]),!t.isUndefined(e))return this[e.name](e.children,n)},validateVisitor:function(){var e=s(this,r);if(!t.isEmpty(e)){var i=t.map(e,function(e){return e.msg});throw Error(`Errors Detected in CST Visitor <`+n.functionName(this.constructor)+`>:
84
84
  `+(``+i.join(`
85
85
 
86
86
  `).replace(/\n/g,`
87
87
  `)))}}},i.prototype.constructor=i,i._RULE_NAMES=r,i}e.createBaseSemanticVisitorConstructor=i;function a(e,i,a){var o=function(){};n.defineNameProp(o,e+`BaseSemanticsWithDefaults`);var s=Object.create(a.prototype);return t.forEach(i,function(e){s[e]=r}),o.prototype=s,o.prototype.constructor=o,o}e.createBaseVisitorConstructorWithDefaults=a;var o;(function(e){e[e.REDUNDANT_METHOD=0]=`REDUNDANT_METHOD`,e[e.MISSING_METHOD=1]=`MISSING_METHOD`})(o=e.CstVisitorDefinitionError||={});function s(e,t){var n=c(e,t),r=u(e,t);return n.concat(r)}e.validateVisitor=s;function c(e,r){var i=t.map(r,function(r){if(!t.isFunction(e[r]))return{msg:`Missing visitor method: <`+r+`> on `+n.functionName(e.constructor)+` CST Visitor.`,type:o.MISSING_METHOD,methodName:r}});return t.compact(i)}e.validateMissingCstMethods=c;var l=[`constructor`,`visit`,`validateVisitor`];function u(e,r){var i=[];for(var a in e)t.isFunction(e[a])&&!t.contains(l,a)&&!t.contains(r,a)&&i.push({msg:`Redundant visitor method: <`+a+`> on `+n.functionName(e.constructor)+` CST Visitor
88
88
  There is no Grammar Rule corresponding to this method's name.
89
- `,type:o.REDUNDANT_METHOD,methodName:a});return i}e.validateRedundantMethods=u}),_e=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.TreeBuilder=void 0;var t=me(),n=I(),r=ge(),i=Z();e.TreeBuilder=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=n.has(e,`nodeLocationTracking`)?e.nodeLocationTracking:i.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=n.NOOP,this.cstFinallyStateUpdate=n.NOOP,this.cstPostTerminal=n.NOOP,this.cstPostNonTerminal=n.NOOP,this.cstPostRule=n.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationFull,this.setNodeLocationFromNode=t.setNodeLocationFull,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=t.setNodeLocationOnlyOffset,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=n.NOOP;else throw Error(`Invalid <nodeLocationTracking> config option: "`+e.nodeLocationTracking+`"`)},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstInvocationStateUpdate=function(e,t){var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addTerminalToCst(r,n,e),this.setNodeLocationFromToken(r.location,n)},e.prototype.cstPostNonTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addNoneTerminalToCst(r,n,e),this.setNodeLocationFromNode(r.location,e.location)},e.prototype.getBaseCstVisitorConstructor=function(){if(n.isUndefined(this.baseCstVisitorConstructor)){var e=r.createBaseSemanticVisitorConstructor(this.className,n.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(n.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var e=r.createBaseVisitorConstructorWithDefaults(this.className,n.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e}()}),ve=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.LexerAdapter=void 0;var t=Z();e.LexerAdapter=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,`input`,{get:function(){return this.tokVector},set:function(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},enumerable:!1,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):t.END_OF_FILE},e.prototype.LA=function(e){var n=this.currIdx+e;return n<0||this.tokVectorLength<=n?t.END_OF_FILE:this.tokVector[n]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}()}),ye=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RecognizerApi=void 0;var t=I(),n=ue(),r=Z(),i=K(),a=ce(),o=V();e.RecognizerApi=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,n,a){if(a===void 0&&(a=r.DEFAULT_RULE_CONFIG),t.contains(this.definedRulesNames,e)){var o={message:i.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:r.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);var s=this.defineRule(e,n,a);return this[e]=s,s},e.prototype.OVERRIDE_RULE=function(e,t,n){n===void 0&&(n=r.DEFAULT_RULE_CONFIG);var i=[];i=i.concat(a.validateRuleIsOverridden(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(i);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(n.isRecognitionException(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return o.serializeGrammar(t.values(this.gastProductionsCache))},e}()}),be=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.RecognizerEngine=void 0;var t=I(),n=fe(),r=ue(),i=q(),a=se(),o=Z(),s=de(),c=B(),l=R(),u=he();e.RecognizerEngine=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,n){if(this.className=u.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=l.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},t.has(n,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
89
+ `,type:o.REDUNDANT_METHOD,methodName:a});return i}e.validateRedundantMethods=u}),_e=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.TreeBuilder=void 0;var t=me(),n=I(),r=ge(),i=Z();e.TreeBuilder=function(){function e(){}return e.prototype.initTreeBuilder=function(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=n.has(e,`nodeLocationTracking`)?e.nodeLocationTracking:i.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=n.NOOP,this.cstFinallyStateUpdate=n.NOOP,this.cstPostTerminal=n.NOOP,this.cstPostNonTerminal=n.NOOP,this.cstPostRule=n.NOOP;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationFull,this.setNodeLocationFromNode=t.setNodeLocationFull,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=t.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=t.setNodeLocationOnlyOffset,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=n.NOOP,this.setNodeLocationFromNode=n.NOOP,this.cstPostRule=n.NOOP,this.setInitialNodeLocation=n.NOOP;else throw Error(`Invalid <nodeLocationTracking> config option: "`+e.nodeLocationTracking+`"`)},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(e){e.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(e){e.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(e){e.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(e){var t=this.LA(1);e.location={startOffset:t.startOffset,startLine:t.startLine,startColumn:t.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstInvocationStateUpdate=function(e,t){var n={name:e,children:{}};this.setInitialNodeLocation(n),this.CST_STACK.push(n)},e.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},e.prototype.cstPostRuleFull=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?(n.endOffset=t.endOffset,n.endLine=t.endLine,n.endColumn=t.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(e){var t=this.LA(0),n=e.location;n.startOffset<=t.startOffset?n.endOffset=t.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addTerminalToCst(r,n,e),this.setNodeLocationFromToken(r.location,n)},e.prototype.cstPostNonTerminal=function(e,n){var r=this.CST_STACK[this.CST_STACK.length-1];t.addNoneTerminalToCst(r,n,e),this.setNodeLocationFromNode(r.location,e.location)},e.prototype.getBaseCstVisitorConstructor=function(){if(n.isUndefined(this.baseCstVisitorConstructor)){var e=r.createBaseSemanticVisitorConstructor(this.className,n.keys(this.gastProductionsCache));return this.baseCstVisitorConstructor=e,e}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if(n.isUndefined(this.baseCstVisitorWithDefaultsConstructor)){var e=r.createBaseVisitorConstructorWithDefaults(this.className,n.keys(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=e,e}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.getLastExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var e=this.RULE_STACK;return e[e.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var e=this.RULE_OCCURRENCE_STACK;return e[e.length-1]},e}()}),ve=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.LexerAdapter=void 0;var t=Z();e.LexerAdapter=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(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},enumerable:!1,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):t.END_OF_FILE},e.prototype.LA=function(e){var n=this.currIdx+e;return n<0||this.tokVectorLength<=n?t.END_OF_FILE:this.tokVector[n]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(e){this.currIdx=e},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}()}),ye=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RecognizerApi=void 0;var t=I(),n=ue(),r=Z(),i=K(),a=ce(),o=V();e.RecognizerApi=function(){function e(){}return e.prototype.ACTION=function(e){return e.call(this)},e.prototype.consume=function(e,t,n){return this.consumeInternal(t,e,n)},e.prototype.subrule=function(e,t,n){return this.subruleInternal(t,e,n)},e.prototype.option=function(e,t){return this.optionInternal(t,e)},e.prototype.or=function(e,t){return this.orInternal(t,e)},e.prototype.many=function(e,t){return this.manyInternal(e,t)},e.prototype.atLeastOne=function(e,t){return this.atLeastOneInternal(e,t)},e.prototype.CONSUME=function(e,t){return this.consumeInternal(e,0,t)},e.prototype.CONSUME1=function(e,t){return this.consumeInternal(e,1,t)},e.prototype.CONSUME2=function(e,t){return this.consumeInternal(e,2,t)},e.prototype.CONSUME3=function(e,t){return this.consumeInternal(e,3,t)},e.prototype.CONSUME4=function(e,t){return this.consumeInternal(e,4,t)},e.prototype.CONSUME5=function(e,t){return this.consumeInternal(e,5,t)},e.prototype.CONSUME6=function(e,t){return this.consumeInternal(e,6,t)},e.prototype.CONSUME7=function(e,t){return this.consumeInternal(e,7,t)},e.prototype.CONSUME8=function(e,t){return this.consumeInternal(e,8,t)},e.prototype.CONSUME9=function(e,t){return this.consumeInternal(e,9,t)},e.prototype.SUBRULE=function(e,t){return this.subruleInternal(e,0,t)},e.prototype.SUBRULE1=function(e,t){return this.subruleInternal(e,1,t)},e.prototype.SUBRULE2=function(e,t){return this.subruleInternal(e,2,t)},e.prototype.SUBRULE3=function(e,t){return this.subruleInternal(e,3,t)},e.prototype.SUBRULE4=function(e,t){return this.subruleInternal(e,4,t)},e.prototype.SUBRULE5=function(e,t){return this.subruleInternal(e,5,t)},e.prototype.SUBRULE6=function(e,t){return this.subruleInternal(e,6,t)},e.prototype.SUBRULE7=function(e,t){return this.subruleInternal(e,7,t)},e.prototype.SUBRULE8=function(e,t){return this.subruleInternal(e,8,t)},e.prototype.SUBRULE9=function(e,t){return this.subruleInternal(e,9,t)},e.prototype.OPTION=function(e){return this.optionInternal(e,0)},e.prototype.OPTION1=function(e){return this.optionInternal(e,1)},e.prototype.OPTION2=function(e){return this.optionInternal(e,2)},e.prototype.OPTION3=function(e){return this.optionInternal(e,3)},e.prototype.OPTION4=function(e){return this.optionInternal(e,4)},e.prototype.OPTION5=function(e){return this.optionInternal(e,5)},e.prototype.OPTION6=function(e){return this.optionInternal(e,6)},e.prototype.OPTION7=function(e){return this.optionInternal(e,7)},e.prototype.OPTION8=function(e){return this.optionInternal(e,8)},e.prototype.OPTION9=function(e){return this.optionInternal(e,9)},e.prototype.OR=function(e){return this.orInternal(e,0)},e.prototype.OR1=function(e){return this.orInternal(e,1)},e.prototype.OR2=function(e){return this.orInternal(e,2)},e.prototype.OR3=function(e){return this.orInternal(e,3)},e.prototype.OR4=function(e){return this.orInternal(e,4)},e.prototype.OR5=function(e){return this.orInternal(e,5)},e.prototype.OR6=function(e){return this.orInternal(e,6)},e.prototype.OR7=function(e){return this.orInternal(e,7)},e.prototype.OR8=function(e){return this.orInternal(e,8)},e.prototype.OR9=function(e){return this.orInternal(e,9)},e.prototype.MANY=function(e){this.manyInternal(0,e)},e.prototype.MANY1=function(e){this.manyInternal(1,e)},e.prototype.MANY2=function(e){this.manyInternal(2,e)},e.prototype.MANY3=function(e){this.manyInternal(3,e)},e.prototype.MANY4=function(e){this.manyInternal(4,e)},e.prototype.MANY5=function(e){this.manyInternal(5,e)},e.prototype.MANY6=function(e){this.manyInternal(6,e)},e.prototype.MANY7=function(e){this.manyInternal(7,e)},e.prototype.MANY8=function(e){this.manyInternal(8,e)},e.prototype.MANY9=function(e){this.manyInternal(9,e)},e.prototype.MANY_SEP=function(e){this.manySepFirstInternal(0,e)},e.prototype.MANY_SEP1=function(e){this.manySepFirstInternal(1,e)},e.prototype.MANY_SEP2=function(e){this.manySepFirstInternal(2,e)},e.prototype.MANY_SEP3=function(e){this.manySepFirstInternal(3,e)},e.prototype.MANY_SEP4=function(e){this.manySepFirstInternal(4,e)},e.prototype.MANY_SEP5=function(e){this.manySepFirstInternal(5,e)},e.prototype.MANY_SEP6=function(e){this.manySepFirstInternal(6,e)},e.prototype.MANY_SEP7=function(e){this.manySepFirstInternal(7,e)},e.prototype.MANY_SEP8=function(e){this.manySepFirstInternal(8,e)},e.prototype.MANY_SEP9=function(e){this.manySepFirstInternal(9,e)},e.prototype.AT_LEAST_ONE=function(e){this.atLeastOneInternal(0,e)},e.prototype.AT_LEAST_ONE1=function(e){return this.atLeastOneInternal(1,e)},e.prototype.AT_LEAST_ONE2=function(e){this.atLeastOneInternal(2,e)},e.prototype.AT_LEAST_ONE3=function(e){this.atLeastOneInternal(3,e)},e.prototype.AT_LEAST_ONE4=function(e){this.atLeastOneInternal(4,e)},e.prototype.AT_LEAST_ONE5=function(e){this.atLeastOneInternal(5,e)},e.prototype.AT_LEAST_ONE6=function(e){this.atLeastOneInternal(6,e)},e.prototype.AT_LEAST_ONE7=function(e){this.atLeastOneInternal(7,e)},e.prototype.AT_LEAST_ONE8=function(e){this.atLeastOneInternal(8,e)},e.prototype.AT_LEAST_ONE9=function(e){this.atLeastOneInternal(9,e)},e.prototype.AT_LEAST_ONE_SEP=function(e){this.atLeastOneSepFirstInternal(0,e)},e.prototype.AT_LEAST_ONE_SEP1=function(e){this.atLeastOneSepFirstInternal(1,e)},e.prototype.AT_LEAST_ONE_SEP2=function(e){this.atLeastOneSepFirstInternal(2,e)},e.prototype.AT_LEAST_ONE_SEP3=function(e){this.atLeastOneSepFirstInternal(3,e)},e.prototype.AT_LEAST_ONE_SEP4=function(e){this.atLeastOneSepFirstInternal(4,e)},e.prototype.AT_LEAST_ONE_SEP5=function(e){this.atLeastOneSepFirstInternal(5,e)},e.prototype.AT_LEAST_ONE_SEP6=function(e){this.atLeastOneSepFirstInternal(6,e)},e.prototype.AT_LEAST_ONE_SEP7=function(e){this.atLeastOneSepFirstInternal(7,e)},e.prototype.AT_LEAST_ONE_SEP8=function(e){this.atLeastOneSepFirstInternal(8,e)},e.prototype.AT_LEAST_ONE_SEP9=function(e){this.atLeastOneSepFirstInternal(9,e)},e.prototype.RULE=function(e,n,a){if(a===void 0&&(a=r.DEFAULT_RULE_CONFIG),t.contains(this.definedRulesNames,e)){var o={message:i.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:r.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e};this.definitionErrors.push(o)}this.definedRulesNames.push(e);var s=this.defineRule(e,n,a);return this[e]=s,s},e.prototype.OVERRIDE_RULE=function(e,t,n){n===void 0&&(n=r.DEFAULT_RULE_CONFIG);var i=[];i=i.concat(a.validateRuleIsOverridden(e,this.definedRulesNames,this.className)),this.definitionErrors=this.definitionErrors.concat(i);var o=this.defineRule(e,t,n);return this[e]=o,o},e.prototype.BACKTRACK=function(e,t){return function(){this.isBackTrackingStack.push(1);var r=this.saveRecogState();try{return e.apply(this,t),!0}catch(e){if(n.isRecognitionException(e))return!1;throw e}finally{this.reloadRecogState(r),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return o.serializeGrammar(t.values(this.gastProductionsCache))},e}()}),be=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.RecognizerEngine=void 0;var t=I(),n=fe(),r=ue(),i=q(),a=se(),o=Z(),s=de(),c=B(),l=R(),u=he();e.RecognizerEngine=function(){function e(){}return e.prototype.initRecognizerEngine=function(e,n){if(this.className=u.classNameFromInstance(this),this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=l.tokenStructuredMatcherNoCategories,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},t.has(n,`serializedGrammar`))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
90
90
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
91
91
  For Further details.`);if(t.isArray(e)){if(t.isEmpty(e))throw Error(`A Token Vocabulary cannot be empty.
92
92
  Note that the first argument for the parser constructor
93
93
  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.
94
94
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
95
95
  For Further details.`)}if(t.isArray(e))this.tokensMap=t.reduce(e,function(e,t){return e[t.name]=t,e},{});else if(t.has(e,`modes`)&&t.every(t.flatten(t.values(e.modes)),l.isTokenType)){var r=t.flatten(t.values(e.modes)),i=t.uniq(r);this.tokensMap=t.reduce(i,function(e,t){return e[t.name]=t,e},{})}else if(t.isObject(e))this.tokensMap=t.cloneObj(e);else throw Error(`<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition`);this.tokensMap.EOF=c.EOF;var a=t.every(t.values(e),function(e){return t.isEmpty(e.categoryMatches)});this.tokenMatcher=a?l.tokenStructuredMatcherNoCategories:l.tokenStructuredMatcher,l.augmentTokenTypes(t.values(this.tokensMap))},e.prototype.defineRule=function(e,r,i){if(this.selfAnalysisDone)throw Error(`Grammar rule <`+e+`> may not be defined after the 'performSelfAnalysis' method has been called'
96
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var a=t.has(i,`resyncEnabled`)?i.resyncEnabled:o.DEFAULT_RULE_CONFIG.resyncEnabled,s=t.has(i,`recoveryValueFunc`)?i.recoveryValueFunc:o.DEFAULT_RULE_CONFIG.recoveryValueFunc,c=this.ruleShortNameIdx<<n.BITS_FOR_METHOD_TYPE+n.BITS_FOR_OCCURRENCE_IDX;this.ruleShortNameIdx++,this.shortRuleNameToFull[c]=e,this.fullRuleNameToShort[e]=c;function l(e){try{if(this.outputCst===!0){r.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}else return r.apply(this,e)}catch(e){return this.invokeRuleCatch(e,a,s)}finally{this.ruleFinallyStateUpdate()}}var u=function(t,n){return t===void 0&&(t=0),this.ruleInvocationStateUpdate(c,e,t),l.call(this,n)},d=`ruleName`;return u[d]=e,u.originalGrammarAction=r,u},e.prototype.invokeRuleCatch=function(e,t,n){var i=this.RULE_STACK.length===1,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(r.isRecognitionException(e)){var o=e;if(a){var s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(o.resyncedTokens=this.reSyncTo(s),this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n();else{if(this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,o.partialCstResult=c}throw o}}else{if(i)return this.moveToTerminatedState(),n();throw o}}else throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.OPTION_IDX,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,n){var r=this,i=this.getLaFuncFromCache(n),a,o;if(e.DEF!==void 0){if(a=e.DEF,o=e.GATE,o!==void 0){var s=i;i=function(){return o.call(r)&&s.call(r)}}}else a=e;if(i.call(this)===!0)return a.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.AT_LEAST_ONE_IDX,e);return this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var o=this,s=this.getLaFuncFromCache(r),c,l;if(t.DEF!==void 0){if(c=t.DEF,l=t.GATE,l!==void 0){var u=s;s=function(){return l.call(o)&&u.call(o)}}}else c=t;if(s.call(this)===!0)for(var d=this.doSingleRepetition(c);s.call(this)===!0&&d===!0;)d=this.doSingleRepetition(c);else throw this.raiseEarlyExitException(e,i.PROD_TYPE.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,n.AT_LEAST_ONE_IDX,e,a.NextTerminalAfterAtLeastOneWalker)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.AT_LEAST_ONE_SEP_IDX,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var o=this,s=t.DEF,c=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){s.call(this);for(var l=function(){return o.tokenMatcher(o.LA(1),c)};this.tokenMatcher(this.LA(1),c)===!0;)this.CONSUME(c),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,c,l,s,a.NextTerminalAfterAtLeastOneSepWalker],l,n.AT_LEAST_ONE_SEP_IDX,e,a.NextTerminalAfterAtLeastOneSepWalker)}else throw this.raiseEarlyExitException(e,i.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.MANY_IDX,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var i=this,o=this.getLaFuncFromCache(r),s,c;if(t.DEF!==void 0){if(s=t.DEF,c=t.GATE,c!==void 0){var l=o;o=function(){return c.call(i)&&l.call(i)}}}else s=t;for(var u=!0;o.call(this)===!0&&u===!0;)u=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,n.MANY_IDX,e,a.NextTerminalAfterManyWalker,u)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.MANY_SEP_IDX,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var i=this,o=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){o.call(this);for(var c=function(){return i.tokenMatcher(i.LA(1),s)};this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,c,o,a.NextTerminalAfterManySepWalker],c,n.MANY_SEP_IDX,e,a.NextTerminalAfterManySepWalker)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,i,a){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,a],r,n.AT_LEAST_ONE_SEP_IDX,e,a)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternal=function(e,r){var i=this.getKeyForAutomaticLookahead(n.OR_IDX,r),a=t.isArray(e)?e:e.DEF,o=this.getLaFuncFromCache(i).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new r.NotAllInputParsedException(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=n===void 0?void 0:n.ARGS;return r=e.call(this,t,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){this.subruleInternalError(t,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw r.isRecognitionException(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var i,a=this.LA(0);throw i=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new r.MismatchedTokenException(i,t,a))},e.prototype.consumeInternalRecovery=function(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===s.IN_RULE_RECOVERY_EXCEPTION?n:e}}else throw n},e.prototype.saveRecogState=function(){var e=this.errors,n=t.cloneArr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),c.EOF)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}()}),xe=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ErrorHandler=void 0;var t=ue(),n=I(),r=q(),i=Z();e.ErrorHandler=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=n.has(e,`errorMessageProvider`)?e.errorMessageProvider:i.DEFAULT_PARSER_CONFIG.errorMessageProvider},e.prototype.SAVE_ERROR=function(e){if(t.isRecognitionException(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)},Object.defineProperty(e.prototype,`errors`,{get:function(){return n.cloneArr(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,n,i){for(var a=this.getCurrRuleFullName(),o=this.getGAstProductions()[a],s=r.getLookaheadPathsForOptionalProd(e,o,n,this.maxLookahead)[0],c=[],l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:i,ruleName:a});throw this.SAVE_ERROR(new t.EarlyExitException(u,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,n){for(var i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=r.getLookaheadPathsForOr(e,a,this.maxLookahead),s=[],c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));var l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:l,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new t.NoViableAltException(u,this.LA(1),l))},e}()}),Se=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ContentAssist=void 0;var t=se(),n=I();e.ContentAssist=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,r){var i=this.gastProductionsCache[e];if(n.isUndefined(i))throw Error(`Rule ->`+e+`<- does not exist in this grammar.`);return t.nextPossibleTokensAfter([i],r,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var r=n.first(e.ruleStack),i=this.getGAstProductions()[r];return new t.NextAfterTokenWalker(i,e).startWalking()},e}()}),J=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GastRecorder=void 0;var t=I(),n=V(),r=re(),i=R(),a=B(),o=Z(),s=fe(),c={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(c);var l=!0,u=2**s.BITS_FOR_OCCURRENCE_IDX-1,d=a.createToken({name:`RECORDING_PHASE_TOKEN`,pattern:r.Lexer.NA});i.augmentTokenTypes([d]);var f=a.createTokenInstance(d,`This IToken indicates the Parser is in Recording Phase
96
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);var a=t.has(i,`resyncEnabled`)?i.resyncEnabled:o.DEFAULT_RULE_CONFIG.resyncEnabled,s=t.has(i,`recoveryValueFunc`)?i.recoveryValueFunc:o.DEFAULT_RULE_CONFIG.recoveryValueFunc,c=this.ruleShortNameIdx<<n.BITS_FOR_METHOD_TYPE+n.BITS_FOR_OCCURRENCE_IDX;this.ruleShortNameIdx++,this.shortRuleNameToFull[c]=e,this.fullRuleNameToShort[e]=c;function l(e){try{if(this.outputCst===!0){r.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}else return r.apply(this,e)}catch(e){return this.invokeRuleCatch(e,a,s)}finally{this.ruleFinallyStateUpdate()}}var u=function(t,n){return t===void 0&&(t=0),this.ruleInvocationStateUpdate(c,e,t),l.call(this,n)},d=`ruleName`;return u[d]=e,u.originalGrammarAction=r,u},e.prototype.invokeRuleCatch=function(e,t,n){var i=this.RULE_STACK.length===1,a=t&&!this.isBackTracking()&&this.recoveryEnabled;if(r.isRecognitionException(e)){var o=e;if(a){var s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(o.resyncedTokens=this.reSyncTo(s),this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n();else{if(this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,o.partialCstResult=c}throw o}}else{if(i)return this.moveToTerminatedState(),n();throw o}}else throw e},e.prototype.optionInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.OPTION_IDX,t);return this.optionInternalLogic(e,t,r)},e.prototype.optionInternalLogic=function(e,t,n){var r=this,i=this.getLaFuncFromCache(n),a,o;if(e.DEF!==void 0){if(a=e.DEF,o=e.GATE,o!==void 0){var s=i;i=function(){return o.call(r)&&s.call(r)}}}else a=e;if(i.call(this)===!0)return a.call(this)},e.prototype.atLeastOneInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.AT_LEAST_ONE_IDX,e);return this.atLeastOneInternalLogic(e,t,r)},e.prototype.atLeastOneInternalLogic=function(e,t,r){var o=this,s=this.getLaFuncFromCache(r),c,l;if(t.DEF!==void 0){if(c=t.DEF,l=t.GATE,l!==void 0){var u=s;s=function(){return l.call(o)&&u.call(o)}}}else c=t;if(s.call(this)===!0)for(var d=this.doSingleRepetition(c);s.call(this)===!0&&d===!0;)d=this.doSingleRepetition(c);else throw this.raiseEarlyExitException(e,i.PROD_TYPE.REPETITION_MANDATORY,t.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,t],s,n.AT_LEAST_ONE_IDX,e,a.NextTerminalAfterAtLeastOneWalker)},e.prototype.atLeastOneSepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.AT_LEAST_ONE_SEP_IDX,e);this.atLeastOneSepFirstInternalLogic(e,t,r)},e.prototype.atLeastOneSepFirstInternalLogic=function(e,t,r){var o=this,s=t.DEF,c=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){s.call(this);for(var l=function(){return o.tokenMatcher(o.LA(1),c)};this.tokenMatcher(this.LA(1),c)===!0;)this.CONSUME(c),s.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,c,l,s,a.NextTerminalAfterAtLeastOneSepWalker],l,n.AT_LEAST_ONE_SEP_IDX,e,a.NextTerminalAfterAtLeastOneSepWalker)}else throw this.raiseEarlyExitException(e,i.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG)},e.prototype.manyInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.MANY_IDX,e);return this.manyInternalLogic(e,t,r)},e.prototype.manyInternalLogic=function(e,t,r){var i=this,o=this.getLaFuncFromCache(r),s,c;if(t.DEF!==void 0){if(s=t.DEF,c=t.GATE,c!==void 0){var l=o;o=function(){return c.call(i)&&l.call(i)}}}else s=t;for(var u=!0;o.call(this)===!0&&u===!0;)u=this.doSingleRepetition(s);this.attemptInRepetitionRecovery(this.manyInternal,[e,t],o,n.MANY_IDX,e,a.NextTerminalAfterManyWalker,u)},e.prototype.manySepFirstInternal=function(e,t){var r=this.getKeyForAutomaticLookahead(n.MANY_SEP_IDX,e);this.manySepFirstInternalLogic(e,t,r)},e.prototype.manySepFirstInternalLogic=function(e,t,r){var i=this,o=t.DEF,s=t.SEP;if(this.getLaFuncFromCache(r).call(this)===!0){o.call(this);for(var c=function(){return i.tokenMatcher(i.LA(1),s)};this.tokenMatcher(this.LA(1),s)===!0;)this.CONSUME(s),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,s,c,o,a.NextTerminalAfterManySepWalker],c,n.MANY_SEP_IDX,e,a.NextTerminalAfterManySepWalker)}},e.prototype.repetitionSepSecondInternal=function(e,t,r,i,a){for(;r();)this.CONSUME(t),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,i,a],r,n.AT_LEAST_ONE_SEP_IDX,e,a)},e.prototype.doSingleRepetition=function(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t},e.prototype.orInternal=function(e,r){var i=this.getKeyForAutomaticLookahead(n.OR_IDX,r),a=t.isArray(e)?e:e.DEF,o=this.getLaFuncFromCache(i).call(this,a);if(o!==void 0)return a[o].ALT.call(this);this.raiseNoAltException(r,e.ERR_MSG)},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var e=this.LA(1),t=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:e,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new r.NotAllInputParsedException(t,e))}},e.prototype.subruleInternal=function(e,t,n){var r;try{var i=n===void 0?void 0:n.ARGS;return r=e.call(this,t,i),this.cstPostNonTerminal(r,n!==void 0&&n.LABEL!==void 0?n.LABEL:e.ruleName),r}catch(t){this.subruleInternalError(t,n,e.ruleName)}},e.prototype.subruleInternalError=function(e,t,n){throw r.isRecognitionException(e)&&e.partialCstResult!==void 0&&(this.cstPostNonTerminal(e.partialCstResult,t!==void 0&&t.LABEL!==void 0?t.LABEL:n),delete e.partialCstResult),e},e.prototype.consumeInternal=function(e,t,n){var r;try{var i=this.LA(1);this.tokenMatcher(i,e)===!0?(this.consumeToken(),r=i):this.consumeInternalError(e,i,n)}catch(n){r=this.consumeInternalRecovery(e,t,n)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:e.name,r),r},e.prototype.consumeInternalError=function(e,t,n){var i,a=this.LA(0);throw i=n!==void 0&&n.ERR_MSG?n.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new r.MismatchedTokenException(i,t,a))},e.prototype.consumeInternalRecovery=function(e,t,n){if(this.recoveryEnabled&&n.name===`MismatchedTokenException`&&!this.isBackTracking()){var r=this.getFollowsForInRuleRecovery(e,t);try{return this.tryInRuleRecovery(e,r)}catch(e){throw e.name===s.IN_RULE_RECOVERY_EXCEPTION?n:e}}else throw n},e.prototype.saveRecogState=function(){var e=this.errors,n=t.cloneArr(this.RULE_STACK);return{errors:e,lexerState:this.exportLexerState(),RULE_STACK:n,CST_STACK:this.CST_STACK}},e.prototype.reloadRecogState=function(e){this.errors=e.errors,this.importLexerState(e.lexerState),this.RULE_STACK=e.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(e,t,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(e),this.cstInvocationStateUpdate(t,e)},e.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},e.prototype.getCurrRuleFullName=function(){var e=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[e]},e.prototype.shortRuleNameToFullName=function(e){return this.shortRuleNameToFull[e]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),c.EOF)},e.prototype.reset=function(){this.resetLexerState(),this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}()}),xe=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ErrorHandler=void 0;var t=ue(),n=I(),r=q(),i=Z();e.ErrorHandler=function(){function e(){}return e.prototype.initErrorHandler=function(e){this._errors=[],this.errorMessageProvider=n.has(e,`errorMessageProvider`)?e.errorMessageProvider:i.DEFAULT_PARSER_CONFIG.errorMessageProvider},e.prototype.SAVE_ERROR=function(e){if(t.isRecognitionException(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:n.cloneArr(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error(`Trying to save an Error which is not a RecognitionException`)},Object.defineProperty(e.prototype,"errors",{get:function(){return n.cloneArr(this._errors)},set:function(e){this._errors=e},enumerable:!1,configurable:!0}),e.prototype.raiseEarlyExitException=function(e,n,i){for(var a=this.getCurrRuleFullName(),o=this.getGAstProductions()[a],s=r.getLookaheadPathsForOptionalProd(e,o,n,this.maxLookahead)[0],c=[],l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));var u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:i,ruleName:a});throw this.SAVE_ERROR(new t.EarlyExitException(u,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(e,n){for(var i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=r.getLookaheadPathsForOr(e,a,this.maxLookahead),s=[],c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));var l=this.LA(0),u=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:o,actual:s,previous:l,customUserDescription:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new t.NoViableAltException(u,this.LA(1),l))},e}()}),Se=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ContentAssist=void 0;var t=se(),n=I();e.ContentAssist=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(e,r){var i=this.gastProductionsCache[e];if(n.isUndefined(i))throw Error(`Rule ->`+e+`<- does not exist in this grammar.`);return t.nextPossibleTokensAfter([i],r,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(e){var r=n.first(e.ruleStack),i=this.getGAstProductions()[r];return new t.NextAfterTokenWalker(i,e).startWalking()},e}()}),J=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.GastRecorder=void 0;var t=I(),n=V(),r=re(),i=R(),a=B(),o=Z(),s=fe(),c={description:`This Object indicates the Parser is during Recording Phase`};Object.freeze(c);var l=!0,u=2**s.BITS_FOR_OCCURRENCE_IDX-1,d=a.createToken({name:`RECORDING_PHASE_TOKEN`,pattern:r.Lexer.NA});i.augmentTokenTypes([d]);var f=a.createTokenInstance(d,`This IToken indicates the Parser is in Recording Phase
97
97
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(f);var p={name:`This CSTNode indicates the Parser is in Recording Phase
98
98
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}};e.GastRecorder=function(){function e(){}return e.prototype.initGastRecorder=function(e){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var e=this;this.RECORDING_PHASE=!0,this.TRACE_INIT(`Enable Recording`,function(){for(var t=function(t){var n=t>0?t:``;e[`CONSUME`+n]=function(e,n){return this.consumeInternalRecord(e,t,n)},e[`SUBRULE`+n]=function(e,n){return this.subruleInternalRecord(e,t,n)},e[`OPTION`+n]=function(e){return this.optionInternalRecord(e,t)},e[`OR`+n]=function(e){return this.orInternalRecord(e,t)},e[`MANY`+n]=function(e){this.manyInternalRecord(t,e)},e[`MANY_SEP`+n]=function(e){this.manySepFirstInternalRecord(t,e)},e[`AT_LEAST_ONE`+n]=function(e){this.atLeastOneInternalRecord(t,e)},e[`AT_LEAST_ONE_SEP`+n]=function(e){this.atLeastOneSepFirstInternalRecord(t,e)}},n=0;n<10;n++)t(n);e.consume=function(e,t,n){return this.consumeInternalRecord(t,e,n)},e.subrule=function(e,t,n){return this.subruleInternalRecord(t,e,n)},e.option=function(e,t){return this.optionInternalRecord(t,e)},e.or=function(e,t){return this.orInternalRecord(t,e)},e.many=function(e,t){this.manyInternalRecord(e,t)},e.atLeastOne=function(e,t){this.atLeastOneInternalRecord(e,t)},e.ACTION=e.ACTION_RECORD,e.BACKTRACK=e.BACKTRACK_RECORD,e.LA=e.LA_RECORD})},e.prototype.disableRecording=function(){var e=this;this.RECORDING_PHASE=!1,this.TRACE_INIT(`Deleting Recording methods`,function(){for(var t=0;t<10;t++){var n=t>0?t:``;delete e[`CONSUME`+n],delete e[`SUBRULE`+n],delete e[`OPTION`+n],delete e[`OR`+n],delete e[`MANY`+n],delete e[`MANY_SEP`+n],delete e[`AT_LEAST_ONE`+n],delete e[`AT_LEAST_ONE_SEP`+n]}delete e.consume,delete e.subrule,delete e.option,delete e.or,delete e.many,delete e.atLeastOne,delete e.ACTION,delete e.BACKTRACK,delete e.LA})},e.prototype.ACTION_RECORD=function(e){},e.prototype.BACKTRACK_RECORD=function(e,t){return function(){return!0}},e.prototype.LA_RECORD=function(e){return o.END_OF_FILE},e.prototype.topLevelRuleRecord=function(e,t){try{var r=new n.Rule({definition:[],name:e});return r.name=e,this.recordingProdStack.push(r),t.call(this),this.recordingProdStack.pop(),r}catch(e){if(e.KNOWN_RECORDER_ERROR!==!0)try{e.message+=`
99
99
  This error was thrown during the "grammar recording phase" For more info see:
100
100
  https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw e}throw e}},e.prototype.optionInternalRecord=function(e,t){return m.call(this,n.Option,e,t)},e.prototype.atLeastOneInternalRecord=function(e,t){m.call(this,n.RepetitionMandatory,t,e)},e.prototype.atLeastOneSepFirstInternalRecord=function(e,t){m.call(this,n.RepetitionMandatoryWithSeparator,t,e,l)},e.prototype.manyInternalRecord=function(e,t){m.call(this,n.Repetition,t,e)},e.prototype.manySepFirstInternalRecord=function(e,t){m.call(this,n.RepetitionWithSeparator,t,e,l)},e.prototype.orInternalRecord=function(e,t){return h.call(this,e,t)},e.prototype.subruleInternalRecord=function(e,r,i){if(_(r),!e||t.has(e,`ruleName`)===!1){var a=Error(`<SUBRULE`+g(r)+`> argument is invalid`+(` expecting a Parser method reference but got: <`+JSON.stringify(e)+`>`)+(`
101
101
  inside top level rule: <`+this.recordingProdStack[0].name+`>`));throw a.KNOWN_RECORDER_ERROR=!0,a}var o=t.peek(this.recordingProdStack),s=e.ruleName,l=new n.NonTerminal({idx:r,nonTerminalName:s,referencedRule:void 0});return o.definition.push(l),this.outputCst?p:c},e.prototype.consumeInternalRecord=function(e,r,a){if(_(r),!i.hasShortKeyProperty(e)){var o=Error(`<CONSUME`+g(r)+`> argument is invalid`+(` expecting a TokenType reference but got: <`+JSON.stringify(e)+`>`)+(`
102
102
  inside top level rule: <`+this.recordingProdStack[0].name+`>`));throw o.KNOWN_RECORDER_ERROR=!0,o}var s=t.peek(this.recordingProdStack),c=new n.Terminal({idx:r,terminalType:e});return s.definition.push(c),f},e}();function m(e,n,r,i){i===void 0&&(i=!1),_(r);var a=t.peek(this.recordingProdStack),o=t.isFunction(n)?n:n.DEF,s=new e({definition:[],idx:r});return i&&(s.separator=n.SEP),t.has(n,`MAX_LOOKAHEAD`)&&(s.maxLookahead=n.MAX_LOOKAHEAD),this.recordingProdStack.push(s),o.call(this),a.definition.push(s),this.recordingProdStack.pop(),c}function h(e,r){var i=this;_(r);var a=t.peek(this.recordingProdStack),o=t.isArray(e)===!1,s=o===!1?e:e.DEF,l=new n.Alternation({definition:[],idx:r,ignoreAmbiguities:o&&e.IGNORE_AMBIGUITIES===!0});return t.has(e,`MAX_LOOKAHEAD`)&&(l.maxLookahead=e.MAX_LOOKAHEAD),l.hasPredicates=t.some(s,function(e){return t.isFunction(e.GATE)}),a.definition.push(l),t.forEach(s,function(e){var r=new n.Alternative({definition:[]});l.definition.push(r),t.has(e,`IGNORE_AMBIGUITIES`)?r.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:t.has(e,`GATE`)&&(r.ignoreAmbiguities=!0),i.recordingProdStack.push(r),e.ALT.call(i),i.recordingProdStack.pop()}),c}function g(e){return e===0?``:``+e}function _(e){if(e<0||e>u){var t=Error(`Invalid DSL Method idx value: <`+e+`>
103
- `+(`Idx value must be a none negative value smaller than `+(u+1)));throw t.KNOWN_RECORDER_ERROR=!0,t}}}),Y=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PerformanceTracer=void 0;var t=I(),n=Z();e.PerformanceTracer=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(t.has(e,`traceInitPerf`)){var r=e.traceInitPerf,i=typeof r==`number`;this.traceInitMaxIdent=i?r:1/0,this.traceInitPerf=i?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=n.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <`+e+`>`);var i=t.timer(n),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+`<-- <`+e+`> time: `+a+`ms`),this.traceInitIndent--,o}else return n()},e}()}),X=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.applyMixins=void 0;function t(e,t){t.forEach(function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach(function(r){if(r!==`constructor`){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}})})}e.applyMixins=t}),Z=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,`__esModule`,{value:!0}),e.EmbeddedActionsParser=e.CstParser=e.Parser=e.EMPTY_ALT=e.ParserDefinitionErrorType=e.DEFAULT_RULE_CONFIG=e.DEFAULT_PARSER_CONFIG=e.END_OF_FILE=void 0;var n=I(),r=ae(),i=B(),a=K(),o=le(),s=de(),c=pe(),l=_e(),u=ve(),d=ye(),f=be(),p=xe(),m=Se(),h=J(),g=Y(),_=X();e.END_OF_FILE=i.createTokenInstance(i.EOF,``,NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(e.END_OF_FILE),e.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a.defaultParserErrorProvider,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),e.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0}),(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`})(e.ParserDefinitionErrorType||={});function v(e){return e===void 0&&(e=void 0),function(){return e}}e.EMPTY_ALT=v;var y=function(){function t(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),n.has(r,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
103
+ `+(`Idx value must be a none negative value smaller than `+(u+1)));throw t.KNOWN_RECORDER_ERROR=!0,t}}}),Y=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.PerformanceTracer=void 0;var t=I(),n=Z();e.PerformanceTracer=function(){function e(){}return e.prototype.initPerformanceTracer=function(e){if(t.has(e,`traceInitPerf`)){var r=e.traceInitPerf,i=typeof r==`number`;this.traceInitMaxIdent=i?r:1/0,this.traceInitPerf=i?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=n.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(e,n){if(this.traceInitPerf===!0){this.traceInitIndent++;var r=Array(this.traceInitIndent+1).join(` `);this.traceInitIndent<this.traceInitMaxIdent&&console.log(r+`--> <`+e+`>`);var i=t.timer(n),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(r+`<-- <`+e+`> time: `+a+`ms`),this.traceInitIndent--,o}else return n()},e}()}),X=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.applyMixins=void 0;function t(e,t){t.forEach(function(t){var n=t.prototype;Object.getOwnPropertyNames(n).forEach(function(r){if(r!==`constructor`){var i=Object.getOwnPropertyDescriptor(n,r);i&&(i.get||i.set)?Object.defineProperty(e.prototype,r,i):e.prototype[r]=t.prototype[r]}})})}e.applyMixins=t}),Z=P(e=>{var t=e&&e.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(e,"__esModule",{value:!0}),e.EmbeddedActionsParser=e.CstParser=e.Parser=e.EMPTY_ALT=e.ParserDefinitionErrorType=e.DEFAULT_RULE_CONFIG=e.DEFAULT_PARSER_CONFIG=e.END_OF_FILE=void 0;var n=I(),r=ae(),i=B(),a=K(),o=le(),s=de(),c=pe(),l=_e(),u=ve(),d=ye(),f=be(),p=xe(),m=Se(),h=J(),g=Y(),_=X();e.END_OF_FILE=i.createTokenInstance(i.EOF,``,NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(e.END_OF_FILE),e.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:a.defaultParserErrorProvider,nodeLocationTracking:`none`,traceInitPerf:!1,skipValidations:!1}),e.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0}),(function(e){e[e.INVALID_RULE_NAME=0]=`INVALID_RULE_NAME`,e[e.DUPLICATE_RULE_NAME=1]=`DUPLICATE_RULE_NAME`,e[e.INVALID_RULE_OVERRIDE=2]=`INVALID_RULE_OVERRIDE`,e[e.DUPLICATE_PRODUCTIONS=3]=`DUPLICATE_PRODUCTIONS`,e[e.UNRESOLVED_SUBRULE_REF=4]=`UNRESOLVED_SUBRULE_REF`,e[e.LEFT_RECURSION=5]=`LEFT_RECURSION`,e[e.NONE_LAST_EMPTY_ALT=6]=`NONE_LAST_EMPTY_ALT`,e[e.AMBIGUOUS_ALTS=7]=`AMBIGUOUS_ALTS`,e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]=`CONFLICT_TOKENS_RULES_NAMESPACE`,e[e.INVALID_TOKEN_NAME=9]=`INVALID_TOKEN_NAME`,e[e.NO_NON_EMPTY_LOOKAHEAD=10]=`NO_NON_EMPTY_LOOKAHEAD`,e[e.AMBIGUOUS_PREFIX_ALTS=11]=`AMBIGUOUS_PREFIX_ALTS`,e[e.TOO_MANY_ALTS=12]=`TOO_MANY_ALTS`})(e.ParserDefinitionErrorType||={});function v(e){return e===void 0&&(e=void 0),function(){return e}}e.EMPTY_ALT=v;var y=function(){function t(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var i=this;if(i.initErrorHandler(r),i.initLexerAdapter(),i.initLooksAhead(r),i.initRecognizerEngine(t,r),i.initRecoverable(r),i.initTreeBuilder(r),i.initContentAssist(),i.initGastRecorder(r),i.initPerformanceTracer(r),n.has(r,`ignoredIssues`))throw Error(`The <ignoredIssues> IParserConfig property has been deprecated.
104
104
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
105
105
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
106
106
  For further details.`);this.skipValidations=n.has(r,`skipValidations`)?r.skipValidations:e.DEFAULT_PARSER_CONFIG.skipValidations}return t.performSelfAnalysis=function(e){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},t.prototype.performSelfAnalysis=function(){var e=this;this.TRACE_INIT(`performSelfAnalysis`,function(){var i;e.selfAnalysisDone=!0;var s=e.className;e.TRACE_INIT(`toFastProps`,function(){n.toFastProperties(e)}),e.TRACE_INIT(`Grammar Recording`,function(){try{e.enableRecording(),n.forEach(e.definedRulesNames,function(t){var n=e[t].originalGrammarAction,r=void 0;e.TRACE_INIT(t+` Rule`,function(){r=e.topLevelRuleRecord(t,n)}),e.gastProductionsCache[t]=r})}finally{e.disableRecording()}});var c=[];if(e.TRACE_INIT(`Grammar Resolving`,function(){c=o.resolveGrammar({rules:n.values(e.gastProductionsCache)}),e.definitionErrors=e.definitionErrors.concat(c)}),e.TRACE_INIT(`Grammar Validations`,function(){if(n.isEmpty(c)&&e.skipValidations===!1){var t=o.validateGrammar({rules:n.values(e.gastProductionsCache),maxLookahead:e.maxLookahead,tokenTypes:n.values(e.tokensMap),errMsgProvider:a.defaultGrammarValidatorErrorProvider,grammarName:s});e.definitionErrors=e.definitionErrors.concat(t)}}),n.isEmpty(e.definitionErrors)&&(e.recoveryEnabled&&e.TRACE_INIT(`computeAllProdsFollows`,function(){e.resyncFollows=r.computeAllProdsFollows(n.values(e.gastProductionsCache))}),e.TRACE_INIT(`ComputeLookaheadFunctions`,function(){e.preComputeLookaheadFunctions(n.values(e.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!n.isEmpty(e.definitionErrors))throw i=n.map(e.definitionErrors,function(e){return e.message}),Error(`Parser Definition Errors detected:
107
107
  `+i.join(`
108
108
  -------------------------------
109
- `))})},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();e.Parser=y,_.applyMixins(y,[s.Recoverable,c.LooksAhead,l.TreeBuilder,u.LexerAdapter,f.RecognizerEngine,d.RecognizerApi,p.ErrorHandler,m.ContentAssist,h.GastRecorder,g.PerformanceTracer]),e.CstParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!0,a=r.call(this,t,o)||this,a}return i}(y),e.EmbeddedActionsParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!1,a=r.call(this,t,o)||this,a}return i}(y)}),Ce=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.createSyntaxDiagramsCode=void 0;var t=F();function n(e,n){var r=n===void 0?{}:n,i=r.resourceBase,a=i===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/`:i,o=r.css,s=o===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/diagrams.css`:o,c=`
109
+ `))})},t.DEFER_DEFINITION_ERRORS_HANDLING=!1,t}();e.Parser=y,_.applyMixins(y,[s.Recoverable,c.LooksAhead,l.TreeBuilder,u.LexerAdapter,f.RecognizerEngine,d.RecognizerApi,p.ErrorHandler,m.ContentAssist,h.GastRecorder,g.PerformanceTracer]),e.CstParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!0,a=r.call(this,t,o)||this,a}return i}(y),e.EmbeddedActionsParser=function(r){t(i,r);function i(t,i){i===void 0&&(i=e.DEFAULT_PARSER_CONFIG);var a=this,o=n.cloneObj(i);return o.outputCst=!1,a=r.call(this,t,o)||this,a}return i}(y)}),Ce=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.createSyntaxDiagramsCode=void 0;var t=F();function n(e,n){var r=n===void 0?{}:n,i=r.resourceBase,a=i===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/`:i,o=r.css,s=o===void 0?`https://unpkg.com/chevrotain@`+t.VERSION+`/diagrams/diagrams.css`:o,c=`
110
110
  <!-- This is a generated file -->
111
111
  <!DOCTYPE html>
112
112
  <meta charset="utf-8">
@@ -134,7 +134,7 @@ Make sure that all grammar rule definitions are done before 'performSelfAnalysis
134
134
  var diagramsDiv = document.getElementById("diagrams");
135
135
  main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
136
136
  <\/script>
137
- `}e.createSyntaxDiagramsCode=n}),we=P(e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Parser=e.createSyntaxDiagramsCode=e.clearCache=e.GAstVisitor=e.serializeProduction=e.serializeGrammar=e.Terminal=e.Rule=e.RepetitionWithSeparator=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Repetition=e.Option=e.NonTerminal=e.Alternative=e.Alternation=e.defaultLexerErrorProvider=e.NoViableAltException=e.NotAllInputParsedException=e.MismatchedTokenException=e.isRecognitionException=e.EarlyExitException=e.defaultParserErrorProvider=e.tokenName=e.tokenMatcher=e.tokenLabel=e.EOF=e.createTokenInstance=e.createToken=e.LexerDefinitionErrorType=e.Lexer=e.EMPTY_ALT=e.ParserDefinitionErrorType=e.EmbeddedActionsParser=e.CstParser=e.VERSION=void 0;var t=F();Object.defineProperty(e,`VERSION`,{enumerable:!0,get:function(){return t.VERSION}});var n=Z();Object.defineProperty(e,`CstParser`,{enumerable:!0,get:function(){return n.CstParser}}),Object.defineProperty(e,`EmbeddedActionsParser`,{enumerable:!0,get:function(){return n.EmbeddedActionsParser}}),Object.defineProperty(e,`ParserDefinitionErrorType`,{enumerable:!0,get:function(){return n.ParserDefinitionErrorType}}),Object.defineProperty(e,`EMPTY_ALT`,{enumerable:!0,get:function(){return n.EMPTY_ALT}});var r=re();Object.defineProperty(e,`Lexer`,{enumerable:!0,get:function(){return r.Lexer}}),Object.defineProperty(e,`LexerDefinitionErrorType`,{enumerable:!0,get:function(){return r.LexerDefinitionErrorType}});var i=B();Object.defineProperty(e,`createToken`,{enumerable:!0,get:function(){return i.createToken}}),Object.defineProperty(e,`createTokenInstance`,{enumerable:!0,get:function(){return i.createTokenInstance}}),Object.defineProperty(e,`EOF`,{enumerable:!0,get:function(){return i.EOF}}),Object.defineProperty(e,`tokenLabel`,{enumerable:!0,get:function(){return i.tokenLabel}}),Object.defineProperty(e,`tokenMatcher`,{enumerable:!0,get:function(){return i.tokenMatcher}}),Object.defineProperty(e,`tokenName`,{enumerable:!0,get:function(){return i.tokenName}});var a=K();Object.defineProperty(e,`defaultParserErrorProvider`,{enumerable:!0,get:function(){return a.defaultParserErrorProvider}});var o=ue();Object.defineProperty(e,`EarlyExitException`,{enumerable:!0,get:function(){return o.EarlyExitException}}),Object.defineProperty(e,`isRecognitionException`,{enumerable:!0,get:function(){return o.isRecognitionException}}),Object.defineProperty(e,`MismatchedTokenException`,{enumerable:!0,get:function(){return o.MismatchedTokenException}}),Object.defineProperty(e,`NotAllInputParsedException`,{enumerable:!0,get:function(){return o.NotAllInputParsedException}}),Object.defineProperty(e,`NoViableAltException`,{enumerable:!0,get:function(){return o.NoViableAltException}});var s=z();Object.defineProperty(e,`defaultLexerErrorProvider`,{enumerable:!0,get:function(){return s.defaultLexerErrorProvider}});var c=V();Object.defineProperty(e,`Alternation`,{enumerable:!0,get:function(){return c.Alternation}}),Object.defineProperty(e,`Alternative`,{enumerable:!0,get:function(){return c.Alternative}}),Object.defineProperty(e,`NonTerminal`,{enumerable:!0,get:function(){return c.NonTerminal}}),Object.defineProperty(e,`Option`,{enumerable:!0,get:function(){return c.Option}}),Object.defineProperty(e,`Repetition`,{enumerable:!0,get:function(){return c.Repetition}}),Object.defineProperty(e,`RepetitionMandatory`,{enumerable:!0,get:function(){return c.RepetitionMandatory}}),Object.defineProperty(e,`RepetitionMandatoryWithSeparator`,{enumerable:!0,get:function(){return c.RepetitionMandatoryWithSeparator}}),Object.defineProperty(e,`RepetitionWithSeparator`,{enumerable:!0,get:function(){return c.RepetitionWithSeparator}}),Object.defineProperty(e,`Rule`,{enumerable:!0,get:function(){return c.Rule}}),Object.defineProperty(e,`Terminal`,{enumerable:!0,get:function(){return c.Terminal}});var l=V();Object.defineProperty(e,`serializeGrammar`,{enumerable:!0,get:function(){return l.serializeGrammar}}),Object.defineProperty(e,`serializeProduction`,{enumerable:!0,get:function(){return l.serializeProduction}});var u=U();Object.defineProperty(e,`GAstVisitor`,{enumerable:!0,get:function(){return u.GAstVisitor}});function d(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API.
137
+ `}e.createSyntaxDiagramsCode=n}),we=P(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Parser=e.createSyntaxDiagramsCode=e.clearCache=e.GAstVisitor=e.serializeProduction=e.serializeGrammar=e.Terminal=e.Rule=e.RepetitionWithSeparator=e.RepetitionMandatoryWithSeparator=e.RepetitionMandatory=e.Repetition=e.Option=e.NonTerminal=e.Alternative=e.Alternation=e.defaultLexerErrorProvider=e.NoViableAltException=e.NotAllInputParsedException=e.MismatchedTokenException=e.isRecognitionException=e.EarlyExitException=e.defaultParserErrorProvider=e.tokenName=e.tokenMatcher=e.tokenLabel=e.EOF=e.createTokenInstance=e.createToken=e.LexerDefinitionErrorType=e.Lexer=e.EMPTY_ALT=e.ParserDefinitionErrorType=e.EmbeddedActionsParser=e.CstParser=e.VERSION=void 0;var t=F();Object.defineProperty(e,"VERSION",{enumerable:!0,get:function(){return t.VERSION}});var n=Z();Object.defineProperty(e,"CstParser",{enumerable:!0,get:function(){return n.CstParser}}),Object.defineProperty(e,"EmbeddedActionsParser",{enumerable:!0,get:function(){return n.EmbeddedActionsParser}}),Object.defineProperty(e,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return n.ParserDefinitionErrorType}}),Object.defineProperty(e,"EMPTY_ALT",{enumerable:!0,get:function(){return n.EMPTY_ALT}});var r=re();Object.defineProperty(e,"Lexer",{enumerable:!0,get:function(){return r.Lexer}}),Object.defineProperty(e,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return r.LexerDefinitionErrorType}});var i=B();Object.defineProperty(e,"createToken",{enumerable:!0,get:function(){return i.createToken}}),Object.defineProperty(e,"createTokenInstance",{enumerable:!0,get:function(){return i.createTokenInstance}}),Object.defineProperty(e,"EOF",{enumerable:!0,get:function(){return i.EOF}}),Object.defineProperty(e,"tokenLabel",{enumerable:!0,get:function(){return i.tokenLabel}}),Object.defineProperty(e,"tokenMatcher",{enumerable:!0,get:function(){return i.tokenMatcher}}),Object.defineProperty(e,"tokenName",{enumerable:!0,get:function(){return i.tokenName}});var a=K();Object.defineProperty(e,"defaultParserErrorProvider",{enumerable:!0,get:function(){return a.defaultParserErrorProvider}});var o=ue();Object.defineProperty(e,"EarlyExitException",{enumerable:!0,get:function(){return o.EarlyExitException}}),Object.defineProperty(e,"isRecognitionException",{enumerable:!0,get:function(){return o.isRecognitionException}}),Object.defineProperty(e,"MismatchedTokenException",{enumerable:!0,get:function(){return o.MismatchedTokenException}}),Object.defineProperty(e,"NotAllInputParsedException",{enumerable:!0,get:function(){return o.NotAllInputParsedException}}),Object.defineProperty(e,"NoViableAltException",{enumerable:!0,get:function(){return o.NoViableAltException}});var s=z();Object.defineProperty(e,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return s.defaultLexerErrorProvider}});var c=V();Object.defineProperty(e,"Alternation",{enumerable:!0,get:function(){return c.Alternation}}),Object.defineProperty(e,"Alternative",{enumerable:!0,get:function(){return c.Alternative}}),Object.defineProperty(e,"NonTerminal",{enumerable:!0,get:function(){return c.NonTerminal}}),Object.defineProperty(e,"Option",{enumerable:!0,get:function(){return c.Option}}),Object.defineProperty(e,"Repetition",{enumerable:!0,get:function(){return c.Repetition}}),Object.defineProperty(e,"RepetitionMandatory",{enumerable:!0,get:function(){return c.RepetitionMandatory}}),Object.defineProperty(e,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return c.RepetitionMandatoryWithSeparator}}),Object.defineProperty(e,"RepetitionWithSeparator",{enumerable:!0,get:function(){return c.RepetitionWithSeparator}}),Object.defineProperty(e,"Rule",{enumerable:!0,get:function(){return c.Rule}}),Object.defineProperty(e,"Terminal",{enumerable:!0,get:function(){return c.Terminal}});var l=V();Object.defineProperty(e,"serializeGrammar",{enumerable:!0,get:function(){return l.serializeGrammar}}),Object.defineProperty(e,"serializeProduction",{enumerable:!0,get:function(){return l.serializeProduction}});var u=U();Object.defineProperty(e,"GAstVisitor",{enumerable:!0,get:function(){return u.GAstVisitor}});function d(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API.
138
138
  It performs no action other than printing this message.
139
- Please avoid using it as it will be completely removed in the future`)}e.clearCache=d;var f=Ce();Object.defineProperty(e,`createSyntaxDiagramsCode`,{enumerable:!0,get:function(){return f.createSyntaxDiagramsCode}}),e.Parser=function(){function e(){throw Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.
139
+ Please avoid using it as it will be completely removed in the future`)}e.clearCache=d;var f=Ce();Object.defineProperty(e,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return f.createSyntaxDiagramsCode}}),e.Parser=function(){function e(){throw Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.
140
140
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return e}()})(),Te=class extends s{constructor(e){super(e)}load(e,t,r,i){let a=this,o=a.path===``?C.extractUrlBase(e):a.path,s=new n(a.manager);s.setPath(a.path),s.setRequestHeader(a.requestHeader),s.setWithCredentials(a.withCredentials),s.load(e,function(n){try{t(a.parse(n,o))}catch(t){i?i(t):console.error(t),a.manager.itemError(e)}},r,i)}parse(n,C){let P={};function F(e){let t=I(),n=new Ee(t.tokens),r=new Oe(t.tokenVocabulary),i=ee(r.getBaseCstVisitorConstructor());r.input=n.lex(e).tokens;let a=r.vrml();if(r.errors.length>0)throw console.error(r.errors),Error(`THREE.VRMLLoader: Parsing errors detected.`);return i.visit(a)}function I(){let e=we.createToken,t=e({name:`RouteIdentifier`,pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*[\.][^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d][^\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]*/}),n=e({name:`Identifier`,pattern:/[^\x30-\x39\0-\x20\x22\x27\x23\x2b\x2c\x2d\x2e\x5b\x5d\x5c\x7b\x7d]([^\0-\x20\x22\x27\x23\x2b\x2c\x2e\x5b\x5d\x5c\x7b\x7d])*/,longer_alt:t}),r=`Anchor.Billboard.Collision.Group.Transform.Inline.LOD.Switch.PerspectiveCamera.OrthographicCamera.AudioClip.DirectionalLight.PointLight.Script.Shape.Sound.SpotLight.WorldInfo.CylinderSensor.PlaneSensor.ProximitySensor.SphereSensor.TimeSensor.TouchSensor.VisibilitySensor.Box.Cone.Cylinder.ElevationGrid.Extrusion.IndexedFaceSet.IndexedLineSet.PointSet.Sphere.Color.Coordinate.Normal.TextureCoordinate.Appearance.FontStyle.ImageTexture.Material.MovieTexture.PixelTexture.TextureTransform.ColorInterpolator.CoordinateInterpolator.NormalInterpolator.OrientationInterpolator.PositionInterpolator.ScalarInterpolator.Background.Fog.NavigationInfo.Viewpoint.Text`.split(`.`),i=e({name:`Version`,pattern:/#VRML.*/,longer_alt:n}),a=e({name:`NodeName`,pattern:new RegExp(r.join(`|`)),longer_alt:n}),o=e({name:`DEF`,pattern:/DEF/,longer_alt:n}),s=e({name:`USE`,pattern:/USE/,longer_alt:n}),c=e({name:`ROUTE`,pattern:/ROUTE/,longer_alt:n}),l=e({name:`TO`,pattern:/TO/,longer_alt:n}),u=e({name:`StringLiteral`,pattern:/"(?:[^\\"\n\r]|\\[bfnrtv"\\/]|\\u[0-9a-fA-F][0-9a-fA-F][0-9a-fA-F][0-9a-fA-F])*"/}),d=e({name:`HexLiteral`,pattern:/0[xX][0-9a-fA-F]+/}),f=e({name:`NumberLiteral`,pattern:/[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/}),p=e({name:`TrueLiteral`,pattern:/TRUE/}),m=e({name:`FalseLiteral`,pattern:/FALSE/}),h=e({name:`NullLiteral`,pattern:/NULL/}),g=e({name:`LSquare`,pattern:/\[/}),_=e({name:`RSquare`,pattern:/]/}),v=e({name:`LCurly`,pattern:/{/}),y=e({name:`RCurly`,pattern:/}/}),b=e({name:`Comment`,pattern:/#.*/,group:we.Lexer.SKIPPED}),x=[e({name:`WhiteSpace`,pattern:/[ ,\s]/,group:we.Lexer.SKIPPED}),a,o,s,c,l,p,m,h,i,n,t,u,d,f,g,_,v,y,b],S={};for(let e=0,t=x.length;e<t;e++){let t=x[e];S[t.name]=t}return{tokens:x,tokenVocabulary:S}}function ee(e){class t extends e{constructor(){super(),this.validateVisitor()}vrml(e){let t={version:this.visit(e.version),nodes:[],routes:[]};for(let n=0,r=e.node.length;n<r;n++){let r=e.node[n];t.nodes.push(this.visit(r))}if(e.route)for(let n=0,r=e.route.length;n<r;n++){let r=e.route[n];t.routes.push(this.visit(r))}return t}version(e){return e.Version[0].image}node(e){let t={name:e.NodeName[0].image,fields:[]};if(e.field)for(let n=0,r=e.field.length;n<r;n++){let r=e.field[n];t.fields.push(this.visit(r))}return e.def&&(t.DEF=this.visit(e.def[0])),t}field(e){let t={name:e.Identifier[0].image,type:null,values:null},n;return e.singleFieldValue&&(n=this.visit(e.singleFieldValue[0])),e.multiFieldValue&&(n=this.visit(e.multiFieldValue[0])),t.type=n.type,t.values=n.values,t}def(e){return(e.Identifier||e.NodeName)[0].image}use(e){return{USE:(e.Identifier||e.NodeName)[0].image}}singleFieldValue(e){return n(this,e)}multiFieldValue(e){return n(this,e)}route(e){return{FROM:e.RouteIdentifier[0].image,TO:e.RouteIdentifier[1].image}}}function n(e,t){let n={type:null,values:[]};if(t.node){n.type=`node`;for(let r=0,i=t.node.length;r<i;r++){let i=t.node[r];n.values.push(e.visit(i))}}if(t.use){n.type=`use`;for(let r=0,i=t.use.length;r<i;r++){let i=t.use[r];n.values.push(e.visit(i))}}if(t.StringLiteral){n.type=`string`;for(let e=0,r=t.StringLiteral.length;e<r;e++){let r=t.StringLiteral[e];n.values.push(r.image.replace(/'|"/g,``))}}if(t.NumberLiteral){n.type=`number`;for(let e=0,r=t.NumberLiteral.length;e<r;e++){let r=t.NumberLiteral[e];n.values.push(parseFloat(r.image))}}if(t.HexLiteral){n.type=`hex`;for(let e=0,r=t.HexLiteral.length;e<r;e++){let r=t.HexLiteral[e];n.values.push(r.image)}}if(t.TrueLiteral){n.type=`boolean`;for(let e=0,r=t.TrueLiteral.length;e<r;e++)t.TrueLiteral[e].image===`TRUE`&&n.values.push(!0)}if(t.FalseLiteral){n.type=`boolean`;for(let e=0,r=t.FalseLiteral.length;e<r;e++)t.FalseLiteral[e].image===`FALSE`&&n.values.push(!1)}return t.NullLiteral&&(n.type=`null`,t.NullLiteral.forEach(function(){n.values.push(null)})),n}return new t}function te(e){let t=e.nodes,n=new c;for(let e=0,n=t.length;e<n;e++){let n=t[e];ne(n)}for(let e=0,r=t.length;e<r;e++){let r=t[e],i=L(r);i instanceof p&&n.add(i),r.name===`WorldInfo`&&(n.userData.worldInfo=i)}return n}function ne(e){e.DEF&&(P[e.DEF]=e);let t=e.fields;for(let e=0,n=t.length;e<n;e++){let n=t[e];if(n.type===`node`){let e=n.values;for(let t=0,n=e.length;t<n;t++)ne(e[t])}}}function L(e){return e.USE?ge(e.USE):(e.build===void 0&&(e.build=R(e)),e.build)}function R(e){let t=e.name,n;switch(t){case`Anchor`:case`Group`:case`Transform`:case`Collision`:n=z(e);break;case`Background`:n=re(e);break;case`Shape`:n=B(e);break;case`Appearance`:n=V(e);break;case`Material`:n=H(e);break;case`ImageTexture`:n=ie(e);break;case`PixelTexture`:n=G(e);break;case`TextureTransform`:n=ae(e);break;case`IndexedFaceSet`:n=q(e);break;case`IndexedLineSet`:n=ce(e);break;case`PointSet`:n=le(e);break;case`Box`:n=ue(e);break;case`Cone`:n=de(e);break;case`Cylinder`:n=fe(e);break;case`Sphere`:n=pe(e);break;case`ElevationGrid`:n=me(e);break;case`Extrusion`:n=he(e);break;case`Color`:case`Coordinate`:case`Normal`:case`TextureCoordinate`:n=K(e);break;case`WorldInfo`:n=oe(e);break;case`OrthographicCamera`:case`PerspectiveCamera`:n=se(e,t);break;case`Billboard`:case`Inline`:case`LOD`:case`Switch`:case`AudioClip`:case`DirectionalLight`:case`PointLight`:case`Script`:case`Sound`:case`SpotLight`:case`CylinderSensor`:case`PlaneSensor`:case`ProximitySensor`:case`SphereSensor`:case`TimeSensor`:case`TouchSensor`:case`VisibilitySensor`:case`Text`:case`FontStyle`:case`MovieTexture`:case`ColorInterpolator`:case`CoordinateInterpolator`:case`NormalInterpolator`:case`OrientationInterpolator`:case`PositionInterpolator`:case`ScalarInterpolator`:case`Fog`:case`NavigationInfo`:case`Viewpoint`:break;default:console.warn(`THREE.VRMLLoader: Unknown node:`,t);break}return n!==void 0&&e.DEF!==void 0&&n.hasOwnProperty(`name`)===!0&&(n.name=e.DEF),n}function z(e){let n=new i,r=e.fields;for(let e=0,i=r.length;e<i;e++){let i=r[e],a=i.name,o=i.values;switch(a){case`bboxCenter`:break;case`bboxSize`:break;case`center`:break;case`children`:_e(o,n);break;case`description`:break;case`collide`:break;case`parameter`:break;case`rotation`:let e=new t(o[0],o[1],o[2]).normalize(),r=o[3];n.quaternion.setFromAxisAngle(e,r);break;case`scale`:n.scale.set(o[0],o[1],o[2]);break;case`scaleOrientation`:break;case`translation`:n.position.set(o[0],o[1],o[2]);break;case`proxy`:break;case`url`:break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}return n}function re(t){let n=new i,r,a,o,s,c=t.fields;for(let e=0,t=c.length;e<t;e++){let t=c[e],n=t.name,i=t.values;switch(n){case`groundAngle`:r=i;break;case`groundColor`:a=i;break;case`backUrl`:break;case`bottomUrl`:break;case`frontUrl`:break;case`leftUrl`:break;case`rightUrl`:break;case`topUrl`:break;case`skyAngle`:o=i;break;case`skyColor`:s=i;break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,n);break}}let l=1e4;if(s){let t=new e(l,32,16),r=new T({fog:!1,side:1,depthWrite:!1,depthTest:!1});s.length>3?(Re(t,l,o,Ie(s),!0),r.vertexColors=!0):r.color.setRGB(s[0],s[1],s[2],k);let i=new m(t,r);n.add(i)}if(a&&a.length>0){let t=new e(l,32,16,0,2*Math.PI,.5*Math.PI,1.5*Math.PI),i=new T({fog:!1,side:1,vertexColors:!0,depthWrite:!1,depthTest:!1});Re(t,l,r,Ie(a),!1);let o=new m(t,i);n.add(o)}return n.renderOrder=-1/0,n}function B(e){let t=e.fields,n=new T({name:s.DEFAULT_MATERIAL_NAME,color:0}),r;for(let e=0,i=t.length;e<i;e++){let i=t[e],a=i.name,o=i.values;switch(a){case`appearance`:o[0]!==null&&(n=L(o[0]));break;case`geometry`:o[0]!==null&&(r=L(o[0]));break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}let i;if(r&&r.attributes.position){let e=r._type;if(e===`points`){let e=new d({name:s.DEFAULT_MATERIAL_NAME,color:16777215,opacity:n.opacity,transparent:n.transparent});r.attributes.color===void 0?n.isMeshPhongMaterial&&e.color.copy(n.emissive):e.vertexColors=!0,i=new _(r,e)}else if(e===`line`){let e=new M({name:s.DEFAULT_MATERIAL_NAME,color:16777215,opacity:n.opacity,transparent:n.transparent});r.attributes.color===void 0?n.isMeshPhongMaterial&&e.color.copy(n.emissive):e.vertexColors=!0,i=new l(r,e)}else r._solid!==void 0&&(n.side=r._solid?0:2),r.attributes.color!==void 0&&(n.vertexColors=!0),i=new m(r,n)}else i=new p,i.visible=!1;return i}function V(e){let t=new w,n,r=e.fields;for(let e=0,i=r.length;e<i;e++){let i=r[e],a=i.name,o=i.values;switch(a){case`material`:if(o[0]!==null){let e=L(o[0]);e.diffuseColor&&t.color.copy(e.diffuseColor),e.emissiveColor&&t.emissive.copy(e.emissiveColor),e.shininess&&(t.shininess=e.shininess),e.specularColor&&t.specular.copy(e.specularColor),e.transparency&&(t.opacity=1-e.transparency),e.transparency>0&&(t.transparent=!0)}else t=new T({name:s.DEFAULT_MATERIAL_NAME,color:0});break;case`texture`:let e=o[0];e!==null&&(e.name===`ImageTexture`||e.name===`PixelTexture`)&&(t.map=L(e));break;case`textureTransform`:o[0]!==null&&(n=L(o[0]));break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}if(t.map){if(t.map.__type){switch(t.map.__type){case Q.INTENSITY_ALPHA:t.opacity=1;break;case Q.RGB:t.color.set(16777215);break;case Q.RGBA:t.color.set(16777215),t.opacity=1;break;default:}delete t.map.__type}n&&(t.map.center.copy(n.center),t.map.rotation=n.rotation,t.map.repeat.copy(n.scale),t.map.offset.copy(n.translation))}return t}function H(e){let t={},n=e.fields;for(let e=0,r=n.length;e<r;e++){let r=n[e],i=r.name,a=r.values;switch(i){case`ambientIntensity`:break;case`diffuseColor`:t.diffuseColor=new x().setRGB(a[0],a[1],a[2],k);break;case`emissiveColor`:t.emissiveColor=new x().setRGB(a[0],a[1],a[2],k);break;case`shininess`:t.shininess=a[0];break;case`specularColor`:t.specularColor=new x().setRGB(a[0],a[1],a[2],k);break;case`transparency`:t.transparency=a[0];break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,i);break}}return t}function U(e,t,n){let r;switch(t){case Q.INTENSITY:r=parseInt(e),n.r=r,n.g=r,n.b=r,n.a=1;break;case Q.INTENSITY_ALPHA:r=parseInt(`0x`+e.substring(2,4)),n.r=r,n.g=r,n.b=r,n.a=parseInt(`0x`+e.substring(4,6));break;case Q.RGB:n.r=parseInt(`0x`+e.substring(2,4)),n.g=parseInt(`0x`+e.substring(4,6)),n.b=parseInt(`0x`+e.substring(6,8)),n.a=1;break;case Q.RGBA:n.r=parseInt(`0x`+e.substring(2,4)),n.g=parseInt(`0x`+e.substring(4,6)),n.b=parseInt(`0x`+e.substring(6,8)),n.a=parseInt(`0x`+e.substring(8,10));break;default:}}function W(e){let t;switch(e){case 1:t=Q.INTENSITY;break;case 2:t=Q.INTENSITY_ALPHA;break;case 3:t=Q.RGB;break;case 4:t=Q.RGBA;break;default:}return t}function G(e){let t,n=r,i=r,a=e.fields;for(let e=0,r=a.length;e<r;e++){let r=a[e],o=r.name,s=r.values;switch(o){case`image`:let e=s[0],r=s[1],a=s[2],c=W(a),l=new Uint8Array(4*e*r),u={r:0,g:0,b:0,a:0};for(let e=3,t=0,n=s.length;e<n;e++,t++){U(s[e],c,u);let n=t*4;l[n+0]=u.r,l[n+1]=u.g,l[n+2]=u.b,l[n+3]=u.a}t=new A(l,e,r),t.colorSpace=k,t.needsUpdate=!0,t.__type=c;break;case`repeatS`:s[0]===!1&&(n=h);break;case`repeatT`:s[0]===!1&&(i=h);break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,o);break}}return t&&(t.wrapS=n,t.wrapT=i),t}function ie(e){let t,n=r,i=r,a=e.fields;for(let e=0,r=a.length;e<r;e++){let r=a[e],o=r.name,s=r.values;switch(o){case`url`:let e=s[0];e&&(t=ze.load(e));break;case`repeatS`:s[0]===!1&&(n=h);break;case`repeatT`:s[0]===!1&&(i=h);break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,o);break}}return t&&(t.wrapS=n,t.wrapT=i,t.colorSpace=k),t}function ae(e){let t={center:new N,rotation:new N,scale:new N,translation:new N},n=e.fields;for(let e=0,r=n.length;e<r;e++){let r=n[e],i=r.name,a=r.values;switch(i){case`center`:t.center.set(a[0],a[1]);break;case`rotation`:t.rotation=a[0];break;case`scale`:t.scale.set(a[0],a[1]);break;case`translation`:t.translation.set(a[0],a[1]);break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,i);break}}return t}function K(e){return e.fields[0].values}function oe(e){let t={},n=e.fields;for(let e=0,r=n.length;e<r;e++){let r=n[e],i=r.name,a=r.values;switch(i){case`title`:t.title=a[0];break;case`info`:t.info=a;break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,i);break}}return t}function se(e,n){let r=n===`PerspectiveCamera`?new S:new g,i=(typeof window<`u`?window.innerWidth:1)/(typeof window<`u`?window.innerHeight:1),a=e.fields;for(let e=0,n=a.length;e<n;e++){let n=a[e],o=n.name,s=n.values;switch(o){case`position`:r.position.set(s[0],s[1],s[0]);break;case`orientation`:let e=new t(s[0],s[1],s[2]).normalize(),n=s[3];r.quaternion.setFromAxisAngle(e,n);break;case`focalDistance`:r.userData.focalDistance=s[0];break;case`heightAngle`:r.fov=u.radToDeg(s[0]),r.aspect=i,r.updateProjectionMatrix();break;case`height`:let a=s[0]/2,c=a*i;r.left=-c,r.right=c,r.top=a,r.bottom=-a,r.updateProjectionMatrix();break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,o);break}}return r}function q(e){let t,n,r,i,a=!0,o=!0,s=0,c,l,u,d,f=!0,p=!0,m=e.fields;for(let e=0,h=m.length;e<h;e++){let h=m[e],g=h.name,_=h.values;switch(g){case`color`:let e=_[0];e!==null&&(t=L(e));break;case`coord`:let m=_[0];m!==null&&(n=L(m));break;case`normal`:let h=_[0];h!==null&&(r=L(h));break;case`texCoord`:let v=_[0];v!==null&&(i=L(v));break;case`ccw`:a=_[0];break;case`colorIndex`:c=_;break;case`colorPerVertex`:f=_[0];break;case`convex`:break;case`coordIndex`:l=_;break;case`creaseAngle`:s=_[0];break;case`normalIndex`:u=_;break;case`normalPerVertex`:p=_[0];break;case`solid`:o=_[0];break;case`texCoordIndex`:d=_;break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,g);break}}if(l===void 0)return console.warn(`THREE.VRMLLoader: Missing coordIndex.`),new E;let h=ve(l,a),g,_,v;t&&(g=f===!0?c&&c.length>0?De(h,ve(c,a),t,3):$(h,new O(t,3)):c&&c.length>0?Ae(h,ye(be(t,c),l)):Ae(h,ye(t,l)),Le(g)),_=r?p===!0?u&&u.length>0?De(h,ve(u,a),r,3):$(h,new O(r,3)):u&&u.length>0?Ae(h,ye(be(r,u),l)):Ae(h,ye(r,l)):Pe(h,n,s),i&&(v=d&&d.length>0?De(h,ve(d,a),i,2):$(h,new O(i,2)));let y=new E,b=$(h,new O(n,3));return y.setAttribute(`position`,b),y.setAttribute(`normal`,_),g&&y.setAttribute(`color`,g),v&&y.setAttribute(`uv`,v),y._solid=o,y._type=`mesh`,y}function ce(e){let t,n,r,i,a=!0,o=e.fields;for(let e=0,s=o.length;e<s;e++){let s=o[e],c=s.name,l=s.values;switch(c){case`color`:let e=l[0];e!==null&&(t=L(e));break;case`coord`:let o=l[0];o!==null&&(n=L(o));break;case`colorIndex`:r=l;break;case`colorPerVertex`:a=l[0];break;case`coordIndex`:i=l;break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,c);break}}let s,c=xe(i);t&&(s=a===!0?r.length>0?De(c,xe(r),t,3):$(c,new O(t,3)):r.length>0?je(c,Se(be(t,r),i)):je(c,Se(t,i)),Le(s));let l=new E,u=$(c,new O(n,3));return l.setAttribute(`position`,u),s&&l.setAttribute(`color`,s),l._type=`line`,l}function le(e){let t,n,r=e.fields;for(let e=0,i=r.length;e<i;e++){let i=r[e],a=i.name,o=i.values;switch(a){case`color`:let e=o[0];e!==null&&(t=L(e));break;case`coord`:let r=o[0];r!==null&&(n=L(r));break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}let i=new E;if(i.setAttribute(`position`,new O(n,3)),t){let e=new O(t,3);Le(e),i.setAttribute(`color`,e)}return i._type=`points`,i}function ue(e){let n=new t(2,2,2),r=e.fields;for(let e=0,t=r.length;e<t;e++){let t=r[e],i=t.name,a=t.values;switch(i){case`size`:n.x=a[0],n.y=a[1],n.z=a[2];break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,i);break}}return new f(n.x,n.y,n.z)}function de(e){let t=1,n=2,r=!1,i=e.fields;for(let e=0,a=i.length;e<a;e++){let a=i[e],o=a.name,s=a.values;switch(o){case`bottom`:r=!s[0];break;case`bottomRadius`:t=s[0];break;case`height`:n=s[0];break;case`side`:break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,o);break}}return new v(t,n,16,1,r)}function fe(e){let t=1,n=2,r=e.fields;for(let e=0,i=r.length;e<i;e++){let i=r[e],a=i.name,o=i.values;switch(a){case`bottom`:break;case`radius`:t=o[0];break;case`height`:n=o[0];break;case`side`:break;case`top`:break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}return new D(t,t,n,16,1)}function pe(t){let n=1,r=t.fields;for(let e=0,t=r.length;e<t;e++){let t=r[e],i=t.name,a=t.values;switch(i){case`radius`:n=a[0];break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,i);break}}return new e(n,16,16)}function me(e){let t,n,r,i,a=!0,o=!0,s=!0,c=!0,l=0,u=2,d=2,f=1,p=1,m=e.fields;for(let e=0,h=m.length;e<h;e++){let h=m[e],g=h.name,_=h.values;switch(g){case`color`:let e=_[0];e!==null&&(t=L(e));break;case`normal`:let m=_[0];m!==null&&(n=L(m));break;case`texCoord`:let h=_[0];h!==null&&(r=L(h));break;case`height`:i=_;break;case`ccw`:c=_[0];break;case`colorPerVertex`:a=_[0];break;case`creaseAngle`:l=_[0];break;case`normalPerVertex`:o=_[0];break;case`solid`:s=_[0];break;case`xDimension`:u=_[0];break;case`xSpacing`:f=_[0];break;case`zDimension`:d=_[0];break;case`zSpacing`:p=_[0];break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,g);break}}let h=[],g=[],_=[],v=[];for(let e=0;e<d;e++)for(let s=0;s<u;s++){let c=e*u+s,l=f*e,m=i[c],y=p*s;if(h.push(l,m,y),t&&a===!0){let e=t[c*3+0],n=t[c*3+1],r=t[c*3+2];_.push(e,n,r)}if(n&&o===!0){let e=n[c*3+0],t=n[c*3+1],r=n[c*3+2];g.push(e,t,r)}if(r){let e=r[c*2+0],t=r[c*2+1];v.push(e,t)}else v.push(e/(u-1),s/(d-1))}let y=[];for(let e=0;e<u-1;e++)for(let t=0;t<d-1;t++){let n=e+t*u,r=e+(t+1)*u,i=e+1+(t+1)*u,a=e+1+t*u;c===!0?(y.push(n,i,r),y.push(i,n,a)):(y.push(n,r,i),y.push(i,a,n))}let b=$(y,new O(h,3)),x=$(y,new O(v,2)),S,C;if(t){if(a===!1){for(let e=0;e<u-1;e++)for(let n=0;n<d-1;n++){let r=e+n*(u-1),i=t[r*3+0],a=t[r*3+1],o=t[r*3+2];_.push(i,a,o),_.push(i,a,o),_.push(i,a,o),_.push(i,a,o),_.push(i,a,o),_.push(i,a,o)}S=new O(_,3)}else S=$(y,new O(_,3));Le(S)}if(n)if(o===!1){for(let e=0;e<u-1;e++)for(let t=0;t<d-1;t++){let r=e+t*(u-1),i=n[r*3+0],a=n[r*3+1],o=n[r*3+2];g.push(i,a,o),g.push(i,a,o),g.push(i,a,o),g.push(i,a,o),g.push(i,a,o),g.push(i,a,o)}C=new O(g,3)}else C=$(y,new O(g,3));else C=Pe(y,h,l);let w=new E;return w.setAttribute(`position`,b),w.setAttribute(`normal`,C),w.setAttribute(`uv`,x),S&&w.setAttribute(`color`,S),w._solid=s,w._type=`mesh`,w}function he(e){let n=[1,1,1,-1,-1,-1,-1,1,1,1],r=[0,0,0,0,1,0],i,o,s=!0,c=!0,l=0,u=!0,d=!0,f=e.fields;for(let e=0,t=f.length;e<t;e++){let t=f[e],a=t.name,p=t.values;switch(a){case`beginCap`:s=p[0];break;case`ccw`:c=p[0];break;case`convex`:break;case`creaseAngle`:l=p[0];break;case`crossSection`:n=p;break;case`endCap`:u=p[0];break;case`orientation`:o=p;break;case`scale`:i=p;break;case`solid`:d=p[0];break;case`spine`:r=p;break;default:console.warn(`THREE.VRMLLoader: Unknown field:`,a);break}}let p=n[0]===n[n.length-2]&&n[1]===n[n.length-1],m=[],h=new t,g=new t,_=new t,v=new t,y=new j;for(let e=0,t=0,a=0,s=r.length;e<s;e+=3,t+=2,a+=4){h.fromArray(r,e),g.x=i?i[t+0]:1,g.y=1,g.z=i?i[t+1]:1,_.x=o?o[a+0]:0,_.y=o?o[a+1]:0,_.z=o?o[a+2]:1;let s=o?o[a+3]:0;for(let e=0,t=n.length;e<t;e+=2)v.x=n[e+0],v.y=0,v.z=n[e+1],v.multiply(g),y.setFromAxisAngle(_,s),v.applyQuaternion(y),v.add(h),m.push(v.x,v.y,v.z)}let b=[],x=r.length/3,S=n.length/2;for(let e=0;e<x-1;e++)for(let t=0;t<S-1;t++){let n=t+e*S,r=t+1+e*S,i=t+(e+1)*S,a=t+1+(e+1)*S;t===S-2&&p===!0&&(r=e*S,a=(e+1)*S),c===!0?(b.push(n,r,i),b.push(i,r,a)):(b.push(n,i,r),b.push(i,a,r))}if(s===!0||u===!0){let e=[];for(let t=0,r=n.length;t<r;t+=2)e.push(new N(n[t],n[t+1]));let t=a.triangulateShape(e,[]),r=[];for(let e=0,n=t.length;e<n;e++){let n=t[e];r.push(n[0],n[1],n[2])}if(s===!0)for(let e=0,t=r.length;e<t;e+=3)c===!0?b.push(r[e+0],r[e+1],r[e+2]):b.push(r[e+0],r[e+2],r[e+1]);if(u===!0){let e=S*(x-1);for(let t=0,n=r.length;t<n;t+=3)c===!0?b.push(e+r[t+0],e+r[t+2],e+r[t+1]):b.push(e+r[t+0],e+r[t+1],e+r[t+2])}}let C=$(b,new O(m,3)),w=Pe(b,m,l),T=new E;return T.setAttribute(`position`,C),T.setAttribute(`normal`,w),T._solid=d,T._type=`mesh`,T}function ge(e){let t=P[e],n=L(t);return n.isObject3D||n.isMaterial?n.clone():n}function _e(e,t){for(let n=0,r=e.length;n<r;n++){let r=L(e[n]);r instanceof p&&t.add(r)}}function ve(e,t){let n=[],r=0;for(let i=0,a=e.length;i<a;i++){let o=e[r],s=e[i+(t?1:2)],c=e[i+(t?2:1)];n.push(o,s,c),(e[i+3]===-1||i+3>=a)&&(i+=3,r=i+1)}return n}function ye(e,t){let n=[],r=0;for(let i=0,a=t.length;i<a;i++){let o=r*3,s=e[o],c=e[o+1],l=e[o+2];n.push(s,c,l),(t[i+3]===-1||i+3>=a)&&(i+=3,r++)}return n}function be(e,t){let n=[];for(let r=0,i=t.length;r<i;r++){let i=t[r]*3,a=e[i],o=e[i+1],s=e[i+2];n.push(a,o,s)}return n}function xe(e){let t=[];for(let n=0,r=e.length;n<r;n++){let i=e[n],a=e[n+1];t.push(i,a),(e[n+2]===-1||n+2>=r)&&(n+=2)}return t}function Se(e,t){let n=[],r=0;for(let i=0,a=t.length;i<a;i++){let o=r*3,s=e[o],c=e[o+1],l=e[o+2];n.push(s,c,l),(t[i+2]===-1||i+2>=a)&&(i+=2,r++)}return n}let J=new t,Y=new t,X=new t,Z=new N,Ce=new N,Te=new N;function De(e,t,n,r){let i=[];for(let a=0,o=e.length;a<o;a+=3){let e=t[a],o=t[a+1],s=t[a+2];r===2?(Z.fromArray(n,e*r),Ce.fromArray(n,o*r),Te.fromArray(n,s*r),i.push(Z.x,Z.y),i.push(Ce.x,Ce.y),i.push(Te.x,Te.y)):(J.fromArray(n,e*r),Y.fromArray(n,o*r),X.fromArray(n,s*r),i.push(J.x,J.y,J.z),i.push(Y.x,Y.y,Y.z),i.push(X.x,X.y,X.z))}return new O(i,r)}function Ae(e,t){let n=[];for(let r=0,i=0,a=e.length;r<a;r+=3,i++)J.fromArray(t,i*3),n.push(J.x,J.y,J.z),n.push(J.x,J.y,J.z),n.push(J.x,J.y,J.z);return new O(n,3)}function je(e,t){let n=[];for(let r=0,i=0,a=e.length;r<a;r+=2,i++)J.fromArray(t,i*3),n.push(J.x,J.y,J.z),n.push(J.x,J.y,J.z);return new O(n,3)}function $(e,t){let n=t.array,r=t.itemSize,i=new n.constructor(e.length*r),a=0,o=0;for(let t=0,s=e.length;t<s;t++){a=e[t]*r;for(let e=0;e<r;e++)i[o++]=n[a++]}return new O(i,r)}let Me=new t,Ne=new t;function Pe(e,t,n){let r=[],i={};for(let n=0,a=e.length;n<a;n+=3){let a=e[n],o=e[n+1],s=e[n+2],c=new ke(a,o,s);J.fromArray(t,a*3),Y.fromArray(t,o*3),X.fromArray(t,s*3),Ne.subVectors(X,Y),Me.subVectors(J,Y),Ne.cross(Me),Ne.normalize(),c.normal.copy(Ne),i[a]===void 0&&(i[a]=[]),i[o]===void 0&&(i[o]=[]),i[s]===void 0&&(i[s]=[]),i[a].push(c.normal),i[o].push(c.normal),i[s].push(c.normal),r.push(c)}let a=[];for(let e=0,o=r.length;e<o;e++){let o=r[e],s=Fe(i[o.a],o.normal,n),c=Fe(i[o.b],o.normal,n),l=Fe(i[o.c],o.normal,n);J.fromArray(t,o.a*3),Y.fromArray(t,o.b*3),X.fromArray(t,o.c*3),a.push(s.x,s.y,s.z),a.push(c.x,c.y,c.z),a.push(l.x,l.y,l.z)}return new O(a,3)}function Fe(e,n,r){let i=new t;if(r===0)i.copy(n);else for(let t=0,a=e.length;t<a;t++)e[t].angleTo(n)<r&&i.add(e[t]);return i.normalize()}function Ie(e){let t=[];for(let n=0,r=e.length;n<r;n+=3)t.push(new x(e[n],e[n+1],e[n+2]));return t}function Le(e){let t=new x;for(let n=0;n<e.count;n++)t.fromBufferAttribute(e,n),b.colorSpaceToWorking(t,k),e.setXYZ(n,t.r,t.g,t.b)}function Re(e,n,r,i,a){let o=[],s=a===!0?0:Math.PI;for(let e=0,c=i.length;e<c;e++){let i=e===0?0:r[e-1];i=a===!0?i:s-i;let c=new t;c.setFromSphericalCoords(n,i,0),o.push(c)}let c=e.index,l=e.attributes.position,u=new y(new Float32Array(e.attributes.position.count*3),3),d=new t,f=new x;for(let e=0;e<c.count;e++){let t=c.getX(e);d.fromBufferAttribute(l,t);let n,r,s=1;for(let e=1;e<o.length;e++){n=e-1,r=e;let t=o[n],i=o[r];if(a===!0){if(d.y<=t.y&&d.y>i.y){s=Math.abs(t.y-d.y)/Math.abs(t.y-i.y);break}}else if(d.y>=t.y&&d.y<i.y){s=Math.abs(t.y-d.y)/Math.abs(t.y-i.y);break}}let p=i[n],m=i[r];f.copy(p).lerp(m,s),b.colorSpaceToWorking(f,k),u.setXYZ(t,f.r,f.g,f.b)}e.setAttribute(`color`,u)}let ze=new o(this.manager);if(ze.setPath(this.resourcePath||C).setCrossOrigin(this.crossOrigin),n.indexOf(`#VRML V2.0`)===-1)throw Error(`THREE.VRMLLexer: Version of VRML asset not supported.`);return te(F(n))}},Ee=class{constructor(e){this.lexer=new we.Lexer(e)}lex(e){let t=this.lexer.tokenize(e);if(t.errors.length>0)throw console.error(t.errors),Error(`THREE.VRMLLexer: Lexing errors detected.`);return t}},De=we.CstParser,Oe=class extends De{constructor(e){super(e);let t=this,n=e.Version,r=e.LCurly,i=e.RCurly,a=e.LSquare,o=e.RSquare,s=e.Identifier,c=e.RouteIdentifier,l=e.StringLiteral,u=e.HexLiteral,d=e.NumberLiteral,f=e.TrueLiteral,p=e.FalseLiteral,m=e.NullLiteral,h=e.DEF,g=e.USE,_=e.ROUTE,v=e.TO,y=e.NodeName;t.RULE(`vrml`,function(){t.SUBRULE(t.version),t.AT_LEAST_ONE(function(){t.SUBRULE(t.node)}),t.MANY(function(){t.SUBRULE(t.route)})}),t.RULE(`version`,function(){t.CONSUME(n)}),t.RULE(`node`,function(){t.OPTION(function(){t.SUBRULE(t.def)}),t.CONSUME(y),t.CONSUME(r),t.MANY(function(){t.SUBRULE(t.field)}),t.CONSUME(i)}),t.RULE(`field`,function(){t.CONSUME(s),t.OR2([{ALT:function(){t.SUBRULE(t.singleFieldValue)}},{ALT:function(){t.SUBRULE(t.multiFieldValue)}}])}),t.RULE(`def`,function(){t.CONSUME(h),t.OR([{ALT:function(){t.CONSUME(s)}},{ALT:function(){t.CONSUME(y)}}])}),t.RULE(`use`,function(){t.CONSUME(g),t.OR([{ALT:function(){t.CONSUME(s)}},{ALT:function(){t.CONSUME(y)}}])}),t.RULE(`singleFieldValue`,function(){t.AT_LEAST_ONE(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(l)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(f)}},{ALT:function(){t.CONSUME(p)}},{ALT:function(){t.CONSUME(m)}}])})}),t.RULE(`multiFieldValue`,function(){t.CONSUME(a),t.MANY(function(){t.OR([{ALT:function(){t.SUBRULE(t.node)}},{ALT:function(){t.SUBRULE(t.use)}},{ALT:function(){t.CONSUME(l)}},{ALT:function(){t.CONSUME(u)}},{ALT:function(){t.CONSUME(d)}},{ALT:function(){t.CONSUME(m)}}])}),t.CONSUME(o)}),t.RULE(`route`,function(){t.CONSUME(_),t.CONSUME(c),t.CONSUME(v),t.CONSUME2(c)}),this.performSelfAnalysis()}},ke=class{constructor(e,n,r){this.a=e,this.b=n,this.c=r,this.normal=new t}},Q={INTENSITY:1,INTENSITY_ALPHA:2,RGB:3,RGBA:4};export{Te as VRMLLoader};