@sheetxl/sdk 0.8.0-beta.12 → 0.8.0-beta.13

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 (290) hide show
  1. package/THIRD-PARTY-NOTICES.md +172 -0
  2. package/browser/esm/{DwwR3O2sEZApPSTF.mjs → -GEhXGMfNcWmHPby.mjs} +3 -3
  3. package/browser/esm/{DPhGQLNGmDZwODwJ.mjs → 9WXf_BTKjW1cQisZ.mjs} +94 -94
  4. package/browser/esm/{CRkYR-siY2C994KV.mjs → B2SgIPPBX0wjzuq8.mjs} +1 -1
  5. package/browser/esm/{CBYMTDzMf1Vh7pkw.mjs → BC2RwlNwCdRywkoD.mjs} +1 -1
  6. package/browser/esm/{-Jx-jNHmtIQQfLvK.mjs → BEqhm9xAUPiHUCFv.mjs} +1 -1
  7. package/browser/esm/BHgqi7KNrl7Vjr0W.mjs +348 -0
  8. package/browser/esm/{D64dM68B1pKYFzdP.mjs → BJKH0tDRx2FeSWvt.mjs} +2 -2
  9. package/browser/esm/{DobHLF6VjHr7Xi40.mjs → BTgWtqdQoh2cB6DL.mjs} +1 -1
  10. package/browser/esm/{CNdjyofiRu6CYOrr.mjs → BVshV1iY3bcUH9_E.mjs} +50 -48
  11. package/browser/esm/{qO-ujUrgq6H3TQix.mjs → BYQ63XU7JzB4_itX.mjs} +1 -1
  12. package/browser/esm/{C9u8FUewte5ugUjH.mjs → Bax5aOzQkbHKXW_X.mjs} +725 -716
  13. package/browser/esm/{Tah7cnFb_HNZdLtj.mjs → BiDGKhtzV6yIy66o.mjs} +3 -3
  14. package/browser/esm/BmYrWK5OmHRtgyqM.mjs +367 -0
  15. package/browser/esm/{DgrAuRD2qr2DvFeJ.mjs → BoAlHgjPQ6mxb_oO.mjs} +44 -44
  16. package/browser/esm/{CUzYuYTTGsChC_kZ.mjs → C0mjTq8lhrX3HiPa.mjs} +2052 -1583
  17. package/browser/esm/{w6Jea0TiclPrYZ2M.mjs → C5j0IdwtYkWlOftv.mjs} +509 -509
  18. package/browser/esm/{hCQJcmIzPDxDEv2q.mjs → CL84-iL2QeKlLzo5.mjs} +2 -2
  19. package/browser/esm/{2mIwPy2D2JUX-9wx.mjs → CLkBe-6n-pStQhnz.mjs} +2 -2
  20. package/browser/esm/{DZiivy0NmO1Vnyzk.mjs → CPzfhTPX2Y4dHX2p.mjs} +2 -2
  21. package/browser/esm/{fXWUMDhZ5yMSO629.mjs → CSJuIjYUOE387FIP.mjs} +1 -1
  22. package/browser/esm/{BIHrHjRGWVlJglcp.mjs → Cdw0mGuoV3IU2LhR.mjs} +2 -2
  23. package/browser/esm/{yuhcOYw6SHQ-RCm3.mjs → Ced5uyofOWHuL_Jy.mjs} +30 -30
  24. package/browser/esm/{B3wf5vZCsWfWsDbj.mjs → Ci_LJ4S_GvYX0STI.mjs} +1 -1
  25. package/browser/esm/{DK899HhWX1HINMC1.mjs → CwygVKP_RXmne5Ot.mjs} +25 -25
  26. package/browser/esm/{BdCJNawfifyPupCP.mjs → D-mfK0noQrM2jZLT.mjs} +1 -1
  27. package/browser/esm/{CwOPLXU3-9ZHGyOT.mjs → D9SH_8v3FYCnxOFK.mjs} +1 -1
  28. package/browser/esm/{D9xNz46kAfXMZzp4.mjs → DPD8fop6az9HZNiK.mjs} +2 -2
  29. package/browser/esm/{D2RZh0O9neOsyLAE.mjs → DW-MmlgMH87l-_cw.mjs} +69 -48
  30. package/browser/esm/{DwZCT7DZiiXoTweg.mjs → DctIlUsO78-OU2ht.mjs} +2 -2
  31. package/browser/esm/DdcKkVb4jM6Y_epY.mjs +184 -0
  32. package/browser/esm/{Cxjxk0ncRKx80I-w.mjs → DfKzE0IY0TjaEIxG.mjs} +1 -1
  33. package/browser/esm/{BnC4-27Igwb8oDf2.mjs → DkloMquaR1pbZCER.mjs} +44 -43
  34. package/browser/esm/{BudSIfXBAsTxvu-K.mjs → Dz86-De57bv2VYIi.mjs} +10111 -9269
  35. package/browser/esm/{BTFBedJMRWGvZyCE.mjs → HApSgmV2FXRRwQac.mjs} +1 -1
  36. package/browser/esm/{Bt8_m94tBdks209L.mjs → IbVAQU4YqtFqLwYk.mjs} +1 -1
  37. package/browser/esm/index.mjs +482 -440
  38. package/browser/esm/mHQ95RAfxHzcUN2r.mjs +18 -0
  39. package/browser/esm/{CdEO8CEee6lEhabA.mjs → pm00uZZu_H3gxHFx.mjs} +2 -2
  40. package/browser/esm/{Bg5Di9GLNAkbqQ1P.mjs → quEvwgrEuOb0h3q-.mjs} +1926 -1298
  41. package/browser/esm/{CndRBvVfQUJIYRRj.mjs → zZngLMg6mg6nnNGX.mjs} +50 -50
  42. package/licenses/dependencies.txt +71 -1
  43. package/node/esm/{C14-R6tifRh7pc0p.mjs → -K4Cek-bTUItkB_8.mjs} +1 -1
  44. package/node/esm/{D3ptRKzASqBut1DE.mjs → -b8yNV4v9qiq8EMY.mjs} +2 -2
  45. package/node/esm/{CBuEu5Jk-LfaDy-H.mjs → 1V-m67YHbxmg3xk2.mjs} +44 -44
  46. package/node/esm/{DhTya_mhmN53vskv.mjs → 4ROAfJC1mokmqubv.mjs} +1 -1
  47. package/node/esm/B89et7t3uRmtxk4v.mjs +115 -0
  48. package/node/esm/BKBkCBNGhMU0nQdY.mjs +372 -0
  49. package/node/esm/{Vocy-I9dKzZMr0Ct.mjs → BQ2XqExomMceAjfe.mjs} +10977 -10744
  50. package/node/esm/{Btw4148Ot8ifhNc1.mjs → Bfg7qjCXCwXbzW3K.mjs} +1 -1
  51. package/node/esm/{BNXLOEddJ6O9gYws.mjs → BtMeAB_dqJnOfzJM.mjs} +2 -2
  52. package/node/esm/{Q_S1g46ZOTrdhTae.mjs → Byc_bxU_MdjYtt0x.mjs} +1 -1
  53. package/node/esm/{Ci_zLYmCD7e-C79O.mjs → Bzrl292TNCK3Cpid.mjs} +1 -1
  54. package/node/esm/{DdoiuKg9BKubtF1V.mjs → C0P9zspoypRAj7yv.mjs} +1 -1
  55. package/node/esm/{C_aL7CGS1lrNn1Ng.mjs → C9gpMN3galHGZyoK.mjs} +1 -1
  56. package/node/esm/CKCG2peOkTq0gIIW.mjs +310 -0
  57. package/node/esm/{C99zzq8DImQXi4BQ.mjs → CWBS90g3Hz-kQDkY.mjs} +10 -10
  58. package/node/esm/{BskP3b8vUoIOGLY6.mjs → CoGSVnn-hNMtTEus.mjs} +2 -2
  59. package/node/esm/{DhS6yWjrrSNIJMsn.mjs → CzrLqStvrcPE2-hb.mjs} +234 -225
  60. package/node/esm/{CRt3vXe6YmXzqk3H.mjs → D16EdlZG1hX5WUUK.mjs} +102 -102
  61. package/node/esm/{DUTmDHbFbhLDT4F3.mjs → D1mDga2K5sjs8y07.mjs} +1 -1
  62. package/node/esm/{D4ROK9UwDpS6jO3Z.mjs → D2jtztjE6c23RKvZ.mjs} +1 -1
  63. package/node/esm/{icn2nX5Z8e_3mNAv.mjs → D9nRcWsYk3M82iD8.mjs} +1 -1
  64. package/node/esm/{CG-qBU5BAaVz7e-P.mjs → DALYzTxZ9Ur9C69Q.mjs} +1 -1
  65. package/node/esm/{DrCf6ITcBhVOFpRj.mjs → DF0nL7s01dp7n0Bx.mjs} +7 -7
  66. package/node/esm/{BL2iiEoqxDEV2Xrg.mjs → DO5ldLqhTvIfPXLW.mjs} +3348 -2610
  67. package/node/esm/DQz8J8ci7EJdqbuB.mjs +351 -0
  68. package/node/esm/{CiIymQN6aJCul62g.mjs → DR2OQTKqqyIkZnse.mjs} +9 -9
  69. package/node/esm/{eimUGjiIP-b8HiM6.mjs → DSTLPBgpsGW6qP9e.mjs} +52 -52
  70. package/node/esm/{DV5CU37aEbFbWFL0.mjs → DiXp7KSOZUSWXaZ5.mjs} +1 -1
  71. package/node/esm/{C_xf5Bz30VqiJjXn.mjs → DwvXHsycOQR219c7.mjs} +1 -1
  72. package/node/esm/{B-HUPAcqvK0eeeCz.mjs → Hc6B04OyVzHx2F5I.mjs} +38 -37
  73. package/node/esm/{lGJ42sHqg5if2bba.mjs → NkPNHsq2T3DXg76x.mjs} +458 -458
  74. package/node/esm/{-TA0MneBDKdGhsib.mjs → Nl_IIkO1jbk0s9i-.mjs} +3329 -2852
  75. package/node/esm/{DxazKtROyaI51dWl.mjs → OQT5lGqq8a4r5xNa.mjs} +1 -1
  76. package/node/esm/OTaaFGhF-k_iwobp.mjs +18 -0
  77. package/node/esm/{pYtP7wPyS96NQyXS.mjs → Z1elC_roIu7LhceZ.mjs} +25 -25
  78. package/node/esm/{CkRYLed8Mmn3giNg.mjs → e3F3OVXCxLJrSukW.mjs} +2 -2
  79. package/node/esm/index.mjs +584 -540
  80. package/node/esm/{D8hO07ToAibIuniw.mjs → suOBVUz-pca6ilJH.mjs} +138 -136
  81. package/package.json +8 -6
  82. package/resources/contents.json +108 -0
  83. package/resources/fonts/aptos-bold-italic.hinted.json +125 -0
  84. package/resources/fonts/aptos-bold-italic.metrics.json +221 -0
  85. package/resources/fonts/aptos-bold-italic.rows.json +8 -0
  86. package/resources/fonts/aptos-bold.hinted.json +125 -0
  87. package/resources/fonts/aptos-bold.metrics.json +221 -0
  88. package/resources/fonts/aptos-bold.rows.json +8 -0
  89. package/resources/fonts/aptos-display-bold-italic.hinted.json +125 -0
  90. package/resources/fonts/aptos-display-bold-italic.metrics.json +221 -0
  91. package/resources/fonts/aptos-display-bold-italic.rows.json +8 -0
  92. package/resources/fonts/aptos-display-bold.hinted.json +125 -0
  93. package/resources/fonts/aptos-display-bold.metrics.json +221 -0
  94. package/resources/fonts/aptos-display-bold.rows.json +8 -0
  95. package/resources/fonts/aptos-display-italic.hinted.json +124 -0
  96. package/resources/fonts/aptos-display-italic.metrics.json +221 -0
  97. package/resources/fonts/aptos-display-italic.rows.json +8 -0
  98. package/resources/fonts/aptos-display-regular.hinted.json +125 -0
  99. package/resources/fonts/aptos-display-regular.metrics.json +221 -0
  100. package/resources/fonts/aptos-display-regular.rows.json +8 -0
  101. package/resources/fonts/aptos-italic.hinted.json +125 -0
  102. package/resources/fonts/aptos-italic.metrics.json +221 -0
  103. package/resources/fonts/aptos-italic.rows.json +8 -0
  104. package/resources/fonts/aptos-narrow-bold-italic.hinted.json +125 -0
  105. package/resources/fonts/aptos-narrow-bold-italic.metrics.json +221 -0
  106. package/resources/fonts/aptos-narrow-bold-italic.rows.json +8 -0
  107. package/resources/fonts/aptos-narrow-bold.hinted.json +125 -0
  108. package/resources/fonts/aptos-narrow-bold.metrics.json +221 -0
  109. package/resources/fonts/aptos-narrow-bold.rows.json +8 -0
  110. package/resources/fonts/aptos-narrow-italic.hinted.json +125 -0
  111. package/resources/fonts/aptos-narrow-italic.metrics.json +221 -0
  112. package/resources/fonts/aptos-narrow-italic.rows.json +8 -0
  113. package/resources/fonts/aptos-narrow-regular.hinted.json +125 -0
  114. package/resources/fonts/aptos-narrow-regular.metrics.json +221 -0
  115. package/resources/fonts/aptos-narrow-regular.rows.json +8 -0
  116. package/resources/fonts/aptos-regular.hinted.json +125 -0
  117. package/resources/fonts/aptos-regular.metrics.json +221 -0
  118. package/resources/fonts/aptos-regular.rows.json +8 -0
  119. package/resources/fonts/arial-bold-italic.rows.json +0 -1
  120. package/resources/fonts/arial-bold.rows.json +0 -1
  121. package/resources/fonts/arial-italic.rows.json +0 -1
  122. package/resources/fonts/arial-regular.rows.json +0 -1
  123. package/resources/fonts/calibri-bold-italic.rows.json +0 -1
  124. package/resources/fonts/calibri-bold.rows.json +0 -1
  125. package/resources/fonts/calibri-italic.rows.json +0 -1
  126. package/resources/fonts/calibri-regular.rows.json +0 -1
  127. package/resources/fonts/cambria-bold-italic.rows.json +0 -1
  128. package/resources/fonts/cambria-bold.rows.json +0 -1
  129. package/resources/fonts/cambria-italic.rows.json +0 -1
  130. package/resources/fonts/cambria-regular.rows.json +0 -1
  131. package/resources/fonts/contents.json +240 -0
  132. package/resources/fonts/courier-new-bold-italic.rows.json +0 -1
  133. package/resources/fonts/courier-new-bold.rows.json +0 -1
  134. package/resources/fonts/courier-new-italic.rows.json +0 -1
  135. package/resources/fonts/courier-new-regular.rows.json +0 -1
  136. package/resources/fonts/times-new-roman-bold-italic.rows.json +0 -1
  137. package/resources/fonts/times-new-roman-bold.rows.json +0 -1
  138. package/resources/fonts/times-new-roman-italic.rows.json +0 -1
  139. package/resources/fonts/times-new-roman-regular.rows.json +0 -1
  140. package/resources/locales/de/model.msg.json +4 -0
  141. package/resources/locales/en/model.msg.json +4 -0
  142. package/types/scripting-api.json +9339 -9320
  143. package/types/scripting.d.ts +322 -200
  144. package/types/src/.generated/wasm/sdk.d.ts +5 -27
  145. package/types/src/address/AddressUtils.d.ts +8 -0
  146. package/types/src/address/_SheetNameQuoteChars.d.ts +3 -0
  147. package/types/src/anomalies/_FocusTable.d.ts +0 -6
  148. package/types/src/calculation/Calculation.d.ts +20 -95
  149. package/types/src/calculation/ExternalBookBindings.d.ts +0 -26
  150. package/types/src/calculation/NamedFormulaCollection.d.ts +6 -2
  151. package/types/src/calculation/TokenType.d.ts +0 -10
  152. package/types/src/calculation/_CloneBoundary.d.ts +0 -24
  153. package/types/src/calculation/_FormulaToolkit.d.ts +0 -5
  154. package/types/src/calculation/compiler/ASTTypes.d.ts +0 -13
  155. package/types/src/calculation/compiler/CompilerUtils.d.ts +0 -227
  156. package/types/src/calculation/compiler/FormulaLexer.d.ts +0 -8
  157. package/types/src/calculation/compiler/FormulaParser.d.ts +0 -61
  158. package/types/src/calculation/compiler/ParserUtils.d.ts +0 -24
  159. package/types/src/calculation/compiler/Types.d.ts +0 -52
  160. package/types/src/calculation/engine/CalcBackend.d.ts +15 -157
  161. package/types/src/calculation/engine/index.d.ts +0 -8
  162. package/types/src/calculation/executor/CalcExecutor.d.ts +13 -130
  163. package/types/src/calculation/executor/CalcExecutorUtils.d.ts +30 -11
  164. package/types/src/calculation/executor/CircularReference.d.ts +0 -17
  165. package/types/src/calculation/executor/_BlockOrder.d.ts +29 -0
  166. package/types/src/calculation/executor/_WhatIf.d.ts +0 -19
  167. package/types/src/calculation/formula/FormulaBlock.d.ts +0 -28
  168. package/types/src/calculation/formula/FormulaRecordView.d.ts +0 -15
  169. package/types/src/calculation/formula/IFormulaBlock.d.ts +0 -12
  170. package/types/src/calculation/formula/LambdaValue.d.ts +0 -15
  171. package/types/src/calculation/formula/TokenUtils.d.ts +1 -8
  172. package/types/src/calculation/grid/CalcGrid.d.ts +5 -59
  173. package/types/src/calculation/grid/CalcGridBackend.d.ts +8 -9
  174. package/types/src/calculation/grid/CalcGridProxy.d.ts +0 -13
  175. package/types/src/calculation/grid/CalcGridUtils.d.ts +18 -22
  176. package/types/src/calculation/grid/ICalcGrid.d.ts +13 -98
  177. package/types/src/calculation/grid/_CalcRequest.d.ts +1 -29
  178. package/types/src/calculation/spatial/CircularEntry.d.ts +0 -10
  179. package/types/src/calculation/spatial/FormulaSpatialValue.d.ts +52 -82
  180. package/types/src/calculation/spatial/SpillEntry.d.ts +10 -7
  181. package/types/src/calculation/state/CalcScope.d.ts +0 -9
  182. package/types/src/calculation/state/CalcState.d.ts +0 -12
  183. package/types/src/calculation/state/CalculationContext.d.ts +4 -37
  184. package/types/src/calculation/state/DeferredCalls.d.ts +11 -64
  185. package/types/src/calculation/state/IContextContainer.d.ts +4 -60
  186. package/types/src/calculation/state/_KeepBlanks.d.ts +5 -0
  187. package/types/src/calculation/state/_PendingOverlayGrid.d.ts +46 -33
  188. package/types/src/calculation/state/_WhatIfLayer.d.ts +0 -14
  189. package/types/src/calculation/symbol/ExternalSheetSymbols.d.ts +0 -42
  190. package/types/src/calculation/symbol/ISymbolRegistry.d.ts +0 -6
  191. package/types/src/calculation/symbol/SheetSymbolProvider.d.ts +0 -12
  192. package/types/src/calculation/symbol/SymbolRegistry.d.ts +0 -9
  193. package/types/src/calculation/toolkit/index.d.ts +0 -8
  194. package/types/src/cell/ICell.d.ts +14 -28
  195. package/types/src/cellRange/ICellRange.d.ts +22 -11
  196. package/types/src/chart/Chart.d.ts +0 -16
  197. package/types/src/chart/_ChartParts.d.ts +0 -39
  198. package/types/src/chart/_ChartSource.d.ts +0 -14
  199. package/types/src/chart/createChart.d.ts +1 -1
  200. package/types/src/chart/kinds/ChartKind.d.ts +4 -4
  201. package/types/src/chart/kinds/_Placeholder.d.ts +0 -1
  202. package/types/src/chart/layout/TextMeasurer.d.ts +0 -20
  203. package/types/src/chart/layout/_LayoutUtils.d.ts +0 -16
  204. package/types/src/chart/math/BoxStats.d.ts +0 -8
  205. package/types/src/chart/math/DateUnitCalcs.d.ts +0 -10
  206. package/types/src/chart/math/Histogram.d.ts +0 -17
  207. package/types/src/chart/math/OrdUnitCalcs.d.ts +0 -53
  208. package/types/src/chart/math/Treemap.d.ts +0 -15
  209. package/types/src/chart/math/Trendlines.d.ts +0 -8
  210. package/types/src/chart/math/UnitCalcs.d.ts +0 -22
  211. package/types/src/chart/model/_Edits.d.ts +0 -33
  212. package/types/src/chart/model/_Grouping.d.ts +0 -25
  213. package/types/src/chart/model/_Inference.d.ts +0 -18
  214. package/types/src/chart/model/_NewChart.d.ts +0 -41
  215. package/types/src/chart/model/_OfPie.d.ts +0 -7
  216. package/types/src/chart/resolve/_LegacyStyles.d.ts +0 -20
  217. package/types/src/chart/resolve/_Resolve.d.ts +0 -19
  218. package/types/src/chart/resolve/_ResolvedChart.d.ts +0 -6
  219. package/types/src/collections/_GridUtils.d.ts +0 -10
  220. package/types/src/comment/_NoteBox.d.ts +0 -15
  221. package/types/src/condition/AnchoredConditional.d.ts +1 -23
  222. package/types/src/condition/BuiltInOperators/AbstractOperator.d.ts +0 -49
  223. package/types/src/condition/BuiltinSelectors/DisplaySelector.d.ts +0 -10
  224. package/types/src/condition/ICondition.d.ts +2 -2
  225. package/types/src/condition/_ConditionUtils.d.ts +0 -38
  226. package/types/src/externalBook/ExternalBookCollection.d.ts +0 -15
  227. package/types/src/externalBook/ExternalBookName.d.ts +2 -3
  228. package/types/src/externalBook/IExternalBook.d.ts +13 -14
  229. package/types/src/fetch/IFetcher.d.ts +2 -1
  230. package/types/src/fetch/_WorkbookFetch.d.ts +1 -1
  231. package/types/src/font/AdvanceTable.d.ts +16 -42
  232. package/types/src/font/IFont.d.ts +32 -9
  233. package/types/src/font/TableFileAdvanceBuilder.d.ts +6 -3
  234. package/types/src/font/_FontUtils.d.ts +0 -8
  235. package/types/src/font/_StandIns.d.ts +33 -0
  236. package/types/src/io/IWorkbookIO.d.ts +3 -3
  237. package/types/src/io/WorkbookOrigin.d.ts +2 -2
  238. package/types/src/license/LicenseManager.d.ts +2 -1
  239. package/types/src/license/_Utils.d.ts +4 -3
  240. package/types/src/license/details.d.ts +3 -1
  241. package/types/src/license/keys.d.ts +6 -0
  242. package/types/src/license/license-key.d.ts +15 -33
  243. package/types/src/license/token.d.ts +55 -0
  244. package/types/src/picture/IPicture.d.ts +45 -0
  245. package/types/src/picture/Picture.d.ts +12 -0
  246. package/types/src/pivot/PivotTable.d.ts +0 -7
  247. package/types/src/primitives/AsyncValue.d.ts +0 -12
  248. package/types/src/primitives/PrimitiveUtils.d.ts +1 -110
  249. package/types/src/primitives/Range.d.ts +0 -60
  250. package/types/src/primitives/ScalarCollation.d.ts +0 -106
  251. package/types/src/primitives/stats/AggregateStats.d.ts +0 -19
  252. package/types/src/print/PageLayout.d.ts +0 -6
  253. package/types/src/reference/ReferenceUtils.d.ts +4 -2
  254. package/types/src/richData/RichDataRegistry.d.ts +6 -0
  255. package/types/src/scripting/TypedFunction.d.ts +0 -109
  256. package/types/src/sheet/IWorksheet.d.ts +2 -5
  257. package/types/src/sheet/NamedCellRange.d.ts +0 -21
  258. package/types/src/sheet/SheetCell.d.ts +8 -2
  259. package/types/src/sheet/Worksheet.d.ts +7 -48
  260. package/types/src/sheet/_DelimitedText.d.ts +13 -0
  261. package/types/src/sheet/_IgnoredErrors.d.ts +0 -12
  262. package/types/src/sheet/_ScalarListFactory.d.ts +0 -19
  263. package/types/src/sheet/_SheetCoords.d.ts +0 -7
  264. package/types/src/sheet/_SheetFilterUtils.d.ts +0 -8
  265. package/types/src/sheet/_SheetStateReader.d.ts +0 -10
  266. package/types/src/sheet/_SheetStateTypes.d.ts +0 -3
  267. package/types/src/sheet/_SheetUtils.d.ts +1 -1
  268. package/types/src/sheet/style/_RowLine.d.ts +32 -0
  269. package/types/src/sheet/style/_StyleUtils.d.ts +6 -14
  270. package/types/src/sheetView/_SheetViewUtils.d.ts +0 -1
  271. package/types/src/slicer/_BuiltInSlicerStyles.d.ts +0 -5
  272. package/types/src/style/ICellStyle.d.ts +4 -0
  273. package/types/src/table/AnchoredTable.d.ts +0 -147
  274. package/types/src/text/TextFrame.d.ts +4 -1
  275. package/types/src/text/TextStacked.d.ts +0 -24
  276. package/types/src/text/TextWrapper.d.ts +3 -5
  277. package/types/src/text/_LineBox.d.ts +24 -0
  278. package/types/src/text/_TextUtils.d.ts +5 -2
  279. package/types/src/text/_TextWrapperFallback.d.ts +2 -1
  280. package/types/src/wasm/sdkWasm.d.ts +1 -1
  281. package/types/src/workbook/Workbook.d.ts +0 -10
  282. package/browser/esm/2WuhYrIpYmOR5H73.mjs +0 -698
  283. package/browser/esm/CTe2qfmIUEad6FJv.mjs +0 -199
  284. package/browser/esm/CfRqiPDg6RBTg1EN.mjs +0 -367
  285. package/browser/esm/DVroRnhi-5IDXNgM.mjs +0 -210
  286. package/node/esm/BSvOluusoDM4z_dx.mjs +0 -811
  287. package/node/esm/CPI58duc0j0a-HpJ.mjs +0 -115
  288. package/node/esm/DggQ23jKMpwhENfa.mjs +0 -372
  289. package/node/esm/Dn1M7YWi25DeeYUb.mjs +0 -210
  290. package/node/esm/ZXPFcsT2zrALCZux.mjs +0 -289
@@ -1,25 +1,25 @@
1
1
  /**
2
- * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.12
2
+ * @license @sheetxl/sdk - SDK - A high-performance, embeddable spreadsheet engine. - v0.8.0-beta.13
3
3
  *
4
4
  * (C) 2026-present SheetXL Inc. & Michael T. Ford
5
5
  * License: The license can be found at https://www.sheetxl.com/license.
6
6
  */
7
- import { $n as e, Bn as t, Gn as n, Hn as r, In as i, Jn as a, Kn as o, Pn as s, Qn as c, Rn as l, Un as u, Wn as d, Xn as f, Yn as p, Zn as m, ar as h, br as g, dr as _, er as v, fr as y, gr as b, hr as ee, ir as x, nr as S, or as C, pr as w, qn as T, rr as te, tr as E, zn as ne } from "./BudSIfXBAsTxvu-K.mjs";
8
- import { FormulaError as D } from "@sheetxl/primitives";
9
- function O(e) {
7
+ import { $n as e, Bn as t, Fn as n, Gn as r, Jn as i, Kn as a, Ln as o, Qn as s, Un as c, Vn as l, Wn as u, Xn as d, Yn as f, Zn as p, _r as m, ar as h, er as g, fr as _, gr as v, ir as y, mr as ee, nr as b, or as x, pr as te, qn as S, rr as C, sr as w, tr as ne, xr as T, zn as re } from "./Dz86-De57bv2VYIi.mjs";
8
+ import { FormulaError as E } from "@sheetxl/primitives";
9
+ function D(e) {
10
10
  console && console.error && console.error(`Error: ${e}`);
11
11
  }
12
- function k(e) {
12
+ function O(e) {
13
13
  console && console.warn && console.warn(`Warning: ${e}`);
14
14
  }
15
- function re(e) {
15
+ function ie(e) {
16
16
  let t = (/* @__PURE__ */ new Date()).getTime(), n = e();
17
17
  return {
18
18
  time: (/* @__PURE__ */ new Date()).getTime() - t,
19
19
  value: n
20
20
  };
21
21
  }
22
- function ie(e) {
22
+ function ae(e) {
23
23
  function t() {}
24
24
  t.prototype = e;
25
25
  let n = new t();
@@ -28,7 +28,7 @@ function ie(e) {
28
28
  }
29
29
  return r(), r(), e;
30
30
  }
31
- var A = class {
31
+ var k = class {
32
32
  get definition() {
33
33
  return this._definition;
34
34
  }
@@ -43,9 +43,9 @@ var A = class {
43
43
  t.accept(e);
44
44
  });
45
45
  }
46
- }, j = class extends A {
46
+ }, A = class extends k {
47
47
  constructor(e) {
48
- super([]), this.idx = 1, Object.assign(this, V(e));
48
+ super([]), this.idx = 1, Object.assign(this, B(e));
49
49
  }
50
50
  set definition(e) {}
51
51
  get definition() {
@@ -54,35 +54,35 @@ var A = class {
54
54
  accept(e) {
55
55
  e.visit(this);
56
56
  }
57
- }, M = class extends A {
57
+ }, j = class extends k {
58
58
  constructor(e) {
59
- super(e.definition), this.orgText = "", Object.assign(this, V(e));
59
+ super(e.definition), this.orgText = "", Object.assign(this, B(e));
60
60
  }
61
- }, N = class extends A {
61
+ }, M = class extends k {
62
62
  constructor(e) {
63
- super(e.definition), this.ignoreAmbiguities = !1, Object.assign(this, V(e));
63
+ super(e.definition), this.ignoreAmbiguities = !1, Object.assign(this, B(e));
64
64
  }
65
- }, P = class extends A {
65
+ }, N = class extends k {
66
66
  constructor(e) {
67
- super(e.definition), this.idx = 1, Object.assign(this, V(e));
67
+ super(e.definition), this.idx = 1, Object.assign(this, B(e));
68
68
  }
69
- }, F = class extends A {
69
+ }, P = class extends k {
70
70
  constructor(e) {
71
- super(e.definition), this.idx = 1, Object.assign(this, V(e));
71
+ super(e.definition), this.idx = 1, Object.assign(this, B(e));
72
72
  }
73
- }, I = class extends A {
73
+ }, F = class extends k {
74
74
  constructor(e) {
75
- super(e.definition), this.idx = 1, Object.assign(this, V(e));
75
+ super(e.definition), this.idx = 1, Object.assign(this, B(e));
76
76
  }
77
- }, L = class extends A {
77
+ }, I = class extends k {
78
78
  constructor(e) {
79
- super(e.definition), this.idx = 1, Object.assign(this, V(e));
79
+ super(e.definition), this.idx = 1, Object.assign(this, B(e));
80
80
  }
81
- }, R = class extends A {
81
+ }, L = class extends k {
82
82
  constructor(e) {
83
- super(e.definition), this.idx = 1, Object.assign(this, V(e));
83
+ super(e.definition), this.idx = 1, Object.assign(this, B(e));
84
84
  }
85
- }, z = class extends A {
85
+ }, R = class extends k {
86
86
  get definition() {
87
87
  return this._definition;
88
88
  }
@@ -90,21 +90,21 @@ var A = class {
90
90
  this._definition = e;
91
91
  }
92
92
  constructor(e) {
93
- super(e.definition), this.idx = 1, this.ignoreAmbiguities = !1, this.hasPredicates = !1, Object.assign(this, V(e));
93
+ super(e.definition), this.idx = 1, this.ignoreAmbiguities = !1, this.hasPredicates = !1, Object.assign(this, B(e));
94
94
  }
95
- }, B = class {
95
+ }, z = class {
96
96
  constructor(e) {
97
- this.idx = 1, Object.assign(this, V(e));
97
+ this.idx = 1, Object.assign(this, B(e));
98
98
  }
99
99
  accept(e) {
100
100
  e.visit(this);
101
101
  }
102
102
  };
103
- function ae(e) {
103
+ function oe(e) {
104
104
  function t(e) {
105
- return e.map(ae);
105
+ return e.map(oe);
106
106
  }
107
- if (e instanceof j) {
107
+ if (e instanceof A) {
108
108
  let t = {
109
109
  type: "NonTerminal",
110
110
  name: e.nonTerminalName,
@@ -112,43 +112,43 @@ function ae(e) {
112
112
  };
113
113
  return typeof e.label == "string" && (t.label = e.label), t;
114
114
  }
115
- if (e instanceof N) return {
115
+ if (e instanceof M) return {
116
116
  type: "Alternative",
117
117
  definition: t(e.definition)
118
118
  };
119
- if (e instanceof P) return {
119
+ if (e instanceof N) return {
120
120
  type: "Option",
121
121
  idx: e.idx,
122
122
  definition: t(e.definition)
123
123
  };
124
- if (e instanceof F) return {
124
+ if (e instanceof P) return {
125
125
  type: "RepetitionMandatory",
126
126
  idx: e.idx,
127
127
  definition: t(e.definition)
128
128
  };
129
- if (e instanceof I) return {
129
+ if (e instanceof F) return {
130
130
  type: "RepetitionMandatoryWithSeparator",
131
131
  idx: e.idx,
132
- separator: ae(new B({ terminalType: e.separator })),
132
+ separator: oe(new z({ terminalType: e.separator })),
133
133
  definition: t(e.definition)
134
134
  };
135
- if (e instanceof R) return {
135
+ if (e instanceof L) return {
136
136
  type: "RepetitionWithSeparator",
137
137
  idx: e.idx,
138
- separator: ae(new B({ terminalType: e.separator })),
138
+ separator: oe(new z({ terminalType: e.separator })),
139
139
  definition: t(e.definition)
140
140
  };
141
- if (e instanceof L) return {
141
+ if (e instanceof I) return {
142
142
  type: "Repetition",
143
143
  idx: e.idx,
144
144
  definition: t(e.definition)
145
145
  };
146
- if (e instanceof z) return {
146
+ if (e instanceof R) return {
147
147
  type: "Alternation",
148
148
  idx: e.idx,
149
149
  definition: t(e.definition)
150
150
  };
151
- if (e instanceof B) {
151
+ if (e instanceof z) {
152
152
  let t = {
153
153
  type: "Terminal",
154
154
  name: e.terminalType.name,
@@ -159,7 +159,7 @@ function ae(e) {
159
159
  let i = e.terminalType.PATTERN;
160
160
  return e.terminalType.PATTERN && (t.pattern = i instanceof RegExp ? i.source : i), t;
161
161
  }
162
- if (e instanceof M) return {
162
+ if (e instanceof j) return {
163
163
  type: "Rule",
164
164
  name: e.name,
165
165
  orgText: e.orgText,
@@ -168,23 +168,23 @@ function ae(e) {
168
168
  throw Error("non exhaustive match");
169
169
  var n, r;
170
170
  }
171
- function V(e) {
171
+ function B(e) {
172
172
  return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
173
173
  }
174
- var oe = class {
174
+ var se = class {
175
175
  visit(e) {
176
176
  let t = e;
177
177
  switch (t.constructor) {
178
- case j: return this.visitNonTerminal(t);
179
- case N: return this.visitAlternative(t);
180
- case P: return this.visitOption(t);
181
- case F: return this.visitRepetitionMandatory(t);
182
- case I: return this.visitRepetitionMandatoryWithSeparator(t);
183
- case R: return this.visitRepetitionWithSeparator(t);
184
- case L: return this.visitRepetition(t);
185
- case z: return this.visitAlternation(t);
186
- case B: return this.visitTerminal(t);
187
- case M: return this.visitRule(t);
178
+ case A: return this.visitNonTerminal(t);
179
+ case M: return this.visitAlternative(t);
180
+ case N: return this.visitOption(t);
181
+ case P: return this.visitRepetitionMandatory(t);
182
+ case F: return this.visitRepetitionMandatoryWithSeparator(t);
183
+ case L: return this.visitRepetitionWithSeparator(t);
184
+ case I: return this.visitRepetition(t);
185
+ case R: return this.visitAlternation(t);
186
+ case z: return this.visitTerminal(t);
187
+ case j: return this.visitRule(t);
188
188
  default: throw Error("non exhaustive match");
189
189
  }
190
190
  }
@@ -199,34 +199,34 @@ var oe = class {
199
199
  visitTerminal(e) {}
200
200
  visitRule(e) {}
201
201
  };
202
- function se(e, t = []) {
203
- return e instanceof P || e instanceof L || e instanceof R || (e instanceof z ? e.definition.some((e) => se(e, t)) : !(e instanceof j && t.includes(e)) && e instanceof A && (e instanceof j && t.push(e), e.definition.every((e) => se(e, t))));
202
+ function ce(e, t = []) {
203
+ return e instanceof N || e instanceof I || e instanceof L || (e instanceof R ? e.definition.some((e) => ce(e, t)) : !(e instanceof A && t.includes(e)) && e instanceof k && (e instanceof A && t.push(e), e.definition.every((e) => ce(e, t))));
204
204
  }
205
- function H(e) {
206
- if (e instanceof j) return "SUBRULE";
207
- if (e instanceof P) return "OPTION";
208
- if (e instanceof z) return "OR";
209
- if (e instanceof F) return "AT_LEAST_ONE";
210
- if (e instanceof I) return "AT_LEAST_ONE_SEP";
211
- if (e instanceof R) return "MANY_SEP";
212
- if (e instanceof L) return "MANY";
213
- if (e instanceof B) return "CONSUME";
205
+ function V(e) {
206
+ if (e instanceof A) return "SUBRULE";
207
+ if (e instanceof N) return "OPTION";
208
+ if (e instanceof R) return "OR";
209
+ if (e instanceof P) return "AT_LEAST_ONE";
210
+ if (e instanceof F) return "AT_LEAST_ONE_SEP";
211
+ if (e instanceof L) return "MANY_SEP";
212
+ if (e instanceof I) return "MANY";
213
+ if (e instanceof z) return "CONSUME";
214
214
  throw Error("non exhaustive match");
215
215
  }
216
- var ce = class {
216
+ var le = class {
217
217
  walk(e, t = []) {
218
218
  e.definition.forEach((n, r) => {
219
219
  let i = e.definition.slice(r + 1);
220
- if (n instanceof j) this.walkProdRef(n, i, t);
221
- else if (n instanceof B) this.walkTerminal(n, i, t);
222
- else if (n instanceof N) this.walkFlat(n, i, t);
223
- else if (n instanceof P) this.walkOption(n, i, t);
224
- else if (n instanceof F) this.walkAtLeastOne(n, i, t);
225
- else if (n instanceof I) this.walkAtLeastOneSep(n, i, t);
226
- else if (n instanceof R) this.walkManySep(n, i, t);
227
- else if (n instanceof L) this.walkMany(n, i, t);
220
+ if (n instanceof A) this.walkProdRef(n, i, t);
221
+ else if (n instanceof z) this.walkTerminal(n, i, t);
222
+ else if (n instanceof M) this.walkFlat(n, i, t);
223
+ else if (n instanceof N) this.walkOption(n, i, t);
224
+ else if (n instanceof P) this.walkAtLeastOne(n, i, t);
225
+ else if (n instanceof F) this.walkAtLeastOneSep(n, i, t);
226
+ else if (n instanceof L) this.walkManySep(n, i, t);
227
+ else if (n instanceof I) this.walkMany(n, i, t);
228
228
  else {
229
- if (!(n instanceof z)) throw Error("non exhaustive match");
229
+ if (!(n instanceof R)) throw Error("non exhaustive match");
230
230
  this.walkOr(n, i, t);
231
231
  }
232
232
  });
@@ -242,51 +242,51 @@ var ce = class {
242
242
  this.walk(e, r);
243
243
  }
244
244
  walkAtLeastOne(e, t, n) {
245
- let r = [new P({ definition: e.definition })].concat(t, n);
245
+ let r = [new N({ definition: e.definition })].concat(t, n);
246
246
  this.walk(e, r);
247
247
  }
248
248
  walkAtLeastOneSep(e, t, n) {
249
- let r = le(e, t, n);
249
+ let r = ue(e, t, n);
250
250
  this.walk(e, r);
251
251
  }
252
252
  walkMany(e, t, n) {
253
- let r = [new P({ definition: e.definition })].concat(t, n);
253
+ let r = [new N({ definition: e.definition })].concat(t, n);
254
254
  this.walk(e, r);
255
255
  }
256
256
  walkManySep(e, t, n) {
257
- let r = le(e, t, n);
257
+ let r = ue(e, t, n);
258
258
  this.walk(e, r);
259
259
  }
260
260
  walkOr(e, t, n) {
261
261
  let r = t.concat(n);
262
262
  e.definition.forEach((e) => {
263
- let t = new N({ definition: [e] });
263
+ let t = new M({ definition: [e] });
264
264
  this.walk(t, r);
265
265
  });
266
266
  }
267
267
  };
268
- function le(e, t, n) {
269
- return [new P({ definition: [new B({ terminalType: e.separator })].concat(e.definition) })].concat(t, n);
268
+ function ue(e, t, n) {
269
+ return [new N({ definition: [new z({ terminalType: e.separator })].concat(e.definition) })].concat(t, n);
270
270
  }
271
- function ue(e) {
272
- if (e instanceof j) return ue(e.referencedRule);
273
- if (e instanceof B) return [e.terminalType];
271
+ function de(e) {
272
+ if (e instanceof A) return de(e.referencedRule);
273
+ if (e instanceof z) return [e.terminalType];
274
274
  if (function(e) {
275
- return e instanceof N || e instanceof P || e instanceof L || e instanceof F || e instanceof I || e instanceof R || e instanceof B || e instanceof M;
275
+ return e instanceof M || e instanceof N || e instanceof I || e instanceof P || e instanceof F || e instanceof L || e instanceof z || e instanceof j;
276
276
  }(e)) return function(e) {
277
277
  let t = [], n = e.definition, r, i = 0, a = n.length > i, o = !0;
278
- for (; a && o;) r = n[i], o = se(r), t = t.concat(ue(r)), i += 1, a = n.length > i;
278
+ for (; a && o;) r = n[i], o = ce(r), t = t.concat(de(r)), i += 1, a = n.length > i;
279
279
  return [...new Set(t)];
280
280
  }(e);
281
281
  if (function(e) {
282
- return e instanceof z;
282
+ return e instanceof R;
283
283
  }(e)) return function(e) {
284
- let t = e.definition.map((e) => ue(e));
284
+ let t = e.definition.map((e) => de(e));
285
285
  return [...new Set(t.flat())];
286
286
  }(e);
287
287
  throw Error("non exhaustive match");
288
288
  }
289
- var de = "_~IN~_", fe = class extends ce {
289
+ var fe = "_~IN~_", pe = class extends le {
290
290
  constructor(e) {
291
291
  super(), this.topProd = e, this.follows = {};
292
292
  }
@@ -295,21 +295,21 @@ var de = "_~IN~_", fe = class extends ce {
295
295
  }
296
296
  walkTerminal(e, t, n) {}
297
297
  walkProdRef(e, t, n) {
298
- let r = (i = e.referencedRule, a = e.idx, i.name + a + de + this.topProd.name);
298
+ let r = (i = e.referencedRule, a = e.idx, i.name + a + fe + this.topProd.name);
299
299
  var i, a;
300
- let o = ue(new N({ definition: t.concat(n) }));
300
+ let o = de(new M({ definition: t.concat(n) }));
301
301
  this.follows[r] = o;
302
302
  }
303
303
  };
304
- function U(e) {
304
+ function H(e) {
305
305
  return e.charCodeAt(0);
306
306
  }
307
- function pe(e, t) {
307
+ function me(e, t) {
308
308
  Array.isArray(e) ? e.forEach(function(e) {
309
309
  t.push(e);
310
310
  }) : t.push(e);
311
311
  }
312
- function me(e, t) {
312
+ function U(e, t) {
313
313
  if (!0 === e[t]) throw "duplicate flag " + t;
314
314
  e[t], e[t] = !0;
315
315
  }
@@ -324,37 +324,37 @@ function ge(e) {
324
324
  return e.type === "Character";
325
325
  }
326
326
  var _e = [];
327
- for (let e = U("0"); e <= U("9"); e++) _e.push(e);
328
- var ve = [U("_")].concat(_e);
329
- for (let e = U("a"); e <= U("z"); e++) ve.push(e);
330
- for (let e = U("A"); e <= U("Z"); e++) ve.push(e);
327
+ for (let e = H("0"); e <= H("9"); e++) _e.push(e);
328
+ var ve = [H("_")].concat(_e);
329
+ for (let e = H("a"); e <= H("z"); e++) ve.push(e);
330
+ for (let e = H("A"); e <= H("Z"); e++) ve.push(e);
331
331
  var ye = [
332
- U(" "),
333
- U("\f"),
334
- U("\n"),
335
- U("\r"),
336
- U(" "),
337
- U("\v"),
338
- U(" "),
339
- U("\xA0"),
340
- U(" "),
341
- U(" "),
342
- U(" "),
343
- U(" "),
344
- U(" "),
345
- U(" "),
346
- U(" "),
347
- U(" "),
348
- U(" "),
349
- U(" "),
350
- U(" "),
351
- U(" "),
352
- U("\u2028"),
353
- U("\u2029"),
354
- U(" "),
355
- U(" "),
356
- U(" "),
357
- U("")
332
+ H(" "),
333
+ H("\f"),
334
+ H("\n"),
335
+ H("\r"),
336
+ H(" "),
337
+ H("\v"),
338
+ H(" "),
339
+ H("\xA0"),
340
+ H(" "),
341
+ H(" "),
342
+ H(" "),
343
+ H(" "),
344
+ H(" "),
345
+ H(" "),
346
+ H(" "),
347
+ H(" "),
348
+ H(" "),
349
+ H(" "),
350
+ H(" "),
351
+ H(" "),
352
+ H("\u2028"),
353
+ H("\u2029"),
354
+ H(" "),
355
+ H(" "),
356
+ H(" "),
357
+ H("")
358
358
  ], be = /[0-9a-fA-F]/, xe = /[0-9]/, Se = /[1-9]/, Ce = class {
359
359
  visitChildren(e) {
360
360
  for (let t in e) {
@@ -467,18 +467,18 @@ var ye = [
467
467
  };
468
468
  for (; this.isRegExpFlag();) switch (this.popChar()) {
469
469
  case "g":
470
- me(n, "global");
470
+ U(n, "global");
471
471
  break;
472
472
  case "i":
473
- me(n, "ignoreCase");
473
+ U(n, "ignoreCase");
474
474
  break;
475
475
  case "m":
476
- me(n, "multiLine");
476
+ U(n, "multiLine");
477
477
  break;
478
478
  case "u":
479
- me(n, "unicode");
479
+ U(n, "unicode");
480
480
  break;
481
- case "y": me(n, "sticky");
481
+ case "y": U(n, "sticky");
482
482
  }
483
483
  if (this.idx !== this.input.length) throw Error("Redundant input: " + this.input.substring(this.idx));
484
484
  return {
@@ -624,10 +624,10 @@ var ye = [
624
624
  type: "Set",
625
625
  complement: !0,
626
626
  value: [
627
- U("\n"),
628
- U("\r"),
629
- U("\u2028"),
630
- U("\u2029")
627
+ H("\n"),
628
+ H("\r"),
629
+ H("\u2028"),
630
+ H("\u2029")
631
631
  ]
632
632
  };
633
633
  }
@@ -696,18 +696,18 @@ var ye = [
696
696
  let e;
697
697
  switch (this.popChar()) {
698
698
  case "f":
699
- e = U("\f");
699
+ e = H("\f");
700
700
  break;
701
701
  case "n":
702
- e = U("\n");
702
+ e = H("\n");
703
703
  break;
704
704
  case "r":
705
- e = U("\r");
705
+ e = H("\r");
706
706
  break;
707
707
  case "t":
708
- e = U(" ");
708
+ e = H(" ");
709
709
  break;
710
- case "v": e = U("\v");
710
+ case "v": e = H("\v");
711
711
  }
712
712
  return W(e) ? {
713
713
  type: "Character",
@@ -726,7 +726,7 @@ var ye = [
726
726
  nulCharacterAtom() {
727
727
  return this.consumeChar("0"), {
728
728
  type: "Character",
729
- value: U("\0")
729
+ value: H("\0")
730
730
  };
731
731
  }
732
732
  hexEscapeSequenceAtom() {
@@ -738,7 +738,7 @@ var ye = [
738
738
  identityEscapeAtom() {
739
739
  return {
740
740
  type: "Character",
741
- value: U(this.popChar())
741
+ value: H(this.popChar())
742
742
  };
743
743
  }
744
744
  classPatternCharacterAtom() {
@@ -751,7 +751,7 @@ var ye = [
751
751
  case "]": throw Error("TBD");
752
752
  default: return {
753
753
  type: "Character",
754
- value: U(this.popChar())
754
+ value: H(this.popChar())
755
755
  };
756
756
  }
757
757
  }
@@ -768,8 +768,8 @@ var ye = [
768
768
  from: t.value,
769
769
  to: n.value
770
770
  });
771
- } else pe(t.value, e), e.push(U("-")), pe(n.value, e);
772
- } else pe(t.value, e);
771
+ } else me(t.value, e), e.push(H("-")), me(n.value, e);
772
+ } else me(t.value, e);
773
773
  }
774
774
  return this.consumeChar("]"), {
775
775
  type: "Set",
@@ -792,7 +792,7 @@ var ye = [
792
792
  switch (this.consumeChar("\\"), this.peekChar()) {
793
793
  case "b": return this.consumeChar("b"), {
794
794
  type: "Character",
795
- value: U("\b")
795
+ value: H("\b")
796
796
  };
797
797
  case "d":
798
798
  case "D":
@@ -856,7 +856,7 @@ var ye = [
856
856
  case "|": throw Error("TBD");
857
857
  default: return {
858
858
  type: "Character",
859
- value: U(e)
859
+ value: H(e)
860
860
  };
861
861
  }
862
862
  }
@@ -988,10 +988,10 @@ function ke(e, t = !1) {
988
988
  let t = Ee(e);
989
989
  return Ae(t.value, {}, t.flags.ignoreCase);
990
990
  } catch (n) {
991
- if (n.message === De) t && k(`${Oe}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
991
+ if (n.message === De) t && O(`${Oe}\tUnable to optimize: < ${e.toString()} >\n\tComplement Sets cannot be automatically optimized.\n\tThis will disable the lexer's first char optimizations.\n\tSee: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);
992
992
  else {
993
993
  let n = "";
994
- t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), O(`${Oe}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
994
+ t && (n = "\n This will disable the lexer's first char optimizations.\n See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details."), D(`${Oe}\n\tFailed parsing: < ${e.toString()} >\n\tUsing the @chevrotain/regexp-to-ast library\n\tPlease open an issue at: https://github.com/chevrotain/chevrotain/issues` + n);
995
995
  }
996
996
  }
997
997
  return [];
@@ -1031,7 +1031,7 @@ function Ae(e, t, n) {
1031
1031
  else {
1032
1032
  for (let e = r.from; e <= r.to && e < 256; e++) je(e, t, n);
1033
1033
  if (r.to >= 256) {
1034
- let e = r.from >= 256 ? r.from : 256, n = r.to, i = G(e), a = G(n);
1034
+ let e = r.from >= 256 ? r.from : 256, n = r.to, i = K(e), a = K(n);
1035
1035
  for (let e = i; e <= a; e++) t[e] = e;
1036
1036
  }
1037
1037
  }
@@ -1052,16 +1052,16 @@ function Ae(e, t, n) {
1052
1052
  return Object.values(t);
1053
1053
  }
1054
1054
  function je(e, t, n) {
1055
- let r = G(e);
1055
+ let r = K(e);
1056
1056
  t[r] = r, !0 === n && function(e, t) {
1057
1057
  let n = String.fromCharCode(e), r = n.toUpperCase();
1058
1058
  if (r !== n) {
1059
- let e = G(r.charCodeAt(0));
1059
+ let e = K(r.charCodeAt(0));
1060
1060
  t[e] = e;
1061
1061
  } else {
1062
1062
  let e = n.toLowerCase();
1063
1063
  if (e !== n) {
1064
- let n = G(e.charCodeAt(0));
1064
+ let n = K(e.charCodeAt(0));
1065
1065
  t[n] = n;
1066
1066
  }
1067
1067
  }
@@ -1121,8 +1121,8 @@ function Fe(e, t) {
1121
1121
  }
1122
1122
  return !1;
1123
1123
  }
1124
- var Ie = "PATTERN", Le = "defaultMode";
1125
- function Re(e, t) {
1124
+ var G = "PATTERN", Ie = "defaultMode";
1125
+ function Le(e, t) {
1126
1126
  let n = (t = Object.assign({
1127
1127
  safeMode: !1,
1128
1128
  positionTracking: "full",
@@ -1131,18 +1131,18 @@ function Re(e, t) {
1131
1131
  }, t)).tracer, r;
1132
1132
  n("initCharCodeToOptimizedIndexMap", () => {
1133
1133
  (function() {
1134
- if (Xe.length === 0) {
1135
- Xe = Array(65536);
1136
- for (let e = 0; e < 65536; e++) Xe[e] = e > 255 ? 255 + ~~(e / 255) : e;
1134
+ if (Ye.length === 0) {
1135
+ Ye = Array(65536);
1136
+ for (let e = 0; e < 65536; e++) Ye[e] = e > 255 ? 255 + ~~(e / 255) : e;
1137
1137
  }
1138
1138
  })();
1139
1139
  }), n("Reject Lexer.NA", () => {
1140
- r = e.filter((e) => e[Ie] !== q.NA);
1140
+ r = e.filter((e) => e[G] !== J.NA);
1141
1141
  });
1142
1142
  let i, a, o, s, c, l, u, d, f, p, m, h = !1;
1143
1143
  n("Transform Patterns", () => {
1144
1144
  h = !1, i = r.map((e) => {
1145
- let t = e[Ie];
1145
+ let t = e[G];
1146
1146
  if (t instanceof RegExp) {
1147
1147
  let e = t.source;
1148
1148
  return e.length !== 1 || e === "^" || e === "$" || e === "." || t.ignoreCase ? e.length !== 2 || e[0] !== "\\" || [
@@ -1162,7 +1162,7 @@ function Re(e, t) {
1162
1162
  "v",
1163
1163
  "w",
1164
1164
  "W"
1165
- ].includes(e[1]) ? He(t) : e[1] : e;
1165
+ ].includes(e[1]) ? Ve(t) : e[1] : e;
1166
1166
  }
1167
1167
  if (typeof t == "function") return h = !0, { exec: t };
1168
1168
  if (typeof t == "object") return h = !0, t;
@@ -1170,7 +1170,7 @@ function Re(e, t) {
1170
1170
  if (t.length === 1) return t;
1171
1171
  {
1172
1172
  let e = t.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
1173
- return He(new RegExp(e));
1173
+ return Ve(new RegExp(e));
1174
1174
  }
1175
1175
  }
1176
1176
  throw Error("non exhaustive match");
@@ -1178,7 +1178,7 @@ function Re(e, t) {
1178
1178
  }), n("misc mapping", () => {
1179
1179
  a = r.map((e) => e.tokenTypeIdx), o = r.map((e) => {
1180
1180
  let t = e.GROUP;
1181
- if (t !== q.SKIPPED) {
1181
+ if (t !== J.SKIPPED) {
1182
1182
  if (typeof t == "string") return t;
1183
1183
  if (t === void 0) return !1;
1184
1184
  throw Error("non exhaustive match");
@@ -1188,12 +1188,12 @@ function Re(e, t) {
1188
1188
  if (t) return Array.isArray(t) ? t.map((e) => r.indexOf(e)) : [r.indexOf(t)];
1189
1189
  }), c = r.map((e) => e.PUSH_MODE), l = r.map((e) => Object.hasOwn(e, "POP_MODE"));
1190
1190
  }), n("Line Terminator Handling", () => {
1191
- let e = Je(t.lineTerminatorCharacters);
1192
- u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ke(t, e) && Fe(e, t.PATTERN)));
1191
+ let e = qe(t.lineTerminatorCharacters);
1192
+ u = r.map((e) => !1), t.positionTracking !== "onlyOffset" && (u = r.map((t) => Object.hasOwn(t, "LINE_BREAKS") ? !!t.LINE_BREAKS : !1 === Ge(t, e) && Fe(e, t.PATTERN)));
1193
1193
  }), n("Misc Mapping #2", () => {
1194
- d = r.map(Ue), f = i.map(We), p = r.reduce((e, t) => {
1194
+ d = r.map(He), f = i.map(Ue), p = r.reduce((e, t) => {
1195
1195
  let n = t.GROUP;
1196
- return typeof n == "string" && n !== q.SKIPPED && (e[n] = []), e;
1196
+ return typeof n == "string" && n !== J.SKIPPED && (e[n] = []), e;
1197
1197
  }, {}), m = i.map((e, t) => {
1198
1198
  let n = o[t] === void 0 && s[t] === void 0 ? function(e) {
1199
1199
  if (!(e instanceof RegExp) || e.flags !== "") return;
@@ -1236,22 +1236,22 @@ function Re(e, t) {
1236
1236
  let g = !0, _ = [];
1237
1237
  return t.safeMode || n("First Char Optimization", () => {
1238
1238
  _ = r.reduce((e, n, r) => {
1239
- if (typeof n.PATTERN == "string") Ye(e, G(n.PATTERN.charCodeAt(0)), m[r]);
1239
+ if (typeof n.PATTERN == "string") Je(e, K(n.PATTERN.charCodeAt(0)), m[r]);
1240
1240
  else if (Array.isArray(n.START_CHARS_HINT)) {
1241
1241
  let t;
1242
1242
  n.START_CHARS_HINT.forEach((n) => {
1243
- let i = G(typeof n == "string" ? n.charCodeAt(0) : n);
1244
- t !== i && (t = i, Ye(e, i, m[r]));
1243
+ let i = K(typeof n == "string" ? n.charCodeAt(0) : n);
1244
+ t !== i && (t = i, Je(e, i, m[r]));
1245
1245
  });
1246
1246
  } else if (n.PATTERN instanceof RegExp) {
1247
- if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && O(`${Oe}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1247
+ if (n.PATTERN.unicode) g = !1, t.ensureOptimizations && D(`${Oe}\tUnable to analyze < ${n.PATTERN.toString()} > pattern.\n\tThe regexp unicode flag is not currently supported by the regexp-to-ast library.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);
1248
1248
  else {
1249
1249
  let i = ke(n.PATTERN, t.ensureOptimizations);
1250
1250
  i.length === 0 && (g = !1), i.forEach((t) => {
1251
- Ye(e, t, m[r]);
1251
+ Je(e, t, m[r]);
1252
1252
  });
1253
1253
  }
1254
- } else t.ensureOptimizations && O(`${Oe}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1254
+ } else t.ensureOptimizations && D(`${Oe}\tTokenType: <${n.name}> is using a custom token pattern without providing <start_chars_hint> parameter.\n\tThis will disable the lexer's first char optimizations.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`), g = !1;
1255
1255
  return e;
1256
1256
  }, []);
1257
1257
  }), {
@@ -1262,13 +1262,13 @@ function Re(e, t) {
1262
1262
  canBeOptimized: g
1263
1263
  };
1264
1264
  }
1265
- function ze(e, t) {
1265
+ function Re(e, t) {
1266
1266
  let n = [], r = function(e) {
1267
- let t = e.filter((e) => !Object.hasOwn(e, Ie));
1267
+ let t = e.filter((e) => !Object.hasOwn(e, G));
1268
1268
  return {
1269
1269
  errors: t.map((e) => ({
1270
1270
  message: "Token Type: ->" + e.name + "<- missing static 'PATTERN' property",
1271
- type: K.MISSING_PATTERN,
1271
+ type: q.MISSING_PATTERN,
1272
1272
  tokenTypes: [e]
1273
1273
  })),
1274
1274
  valid: e.filter((e) => !t.includes(e))
@@ -1277,20 +1277,20 @@ function ze(e, t) {
1277
1277
  n = n.concat(r.errors);
1278
1278
  let i = function(e) {
1279
1279
  let t = e.filter((e) => {
1280
- let t = e[Ie];
1280
+ let t = e[G];
1281
1281
  return !(t instanceof RegExp || typeof t == "function" || Object.hasOwn(t, "exec") || typeof t == "string");
1282
1282
  });
1283
1283
  return {
1284
1284
  errors: t.map((e) => ({
1285
1285
  message: "Token Type: ->" + e.name + "<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",
1286
- type: K.INVALID_PATTERN,
1286
+ type: q.INVALID_PATTERN,
1287
1287
  tokenTypes: [e]
1288
1288
  })),
1289
1289
  valid: e.filter((e) => !t.includes(e))
1290
1290
  };
1291
1291
  }(r.valid), a = i.valid;
1292
1292
  return n = n.concat(i.errors), n = n.concat(function(e) {
1293
- let t = [], n = e.filter((e) => e[Ie] instanceof RegExp);
1293
+ let t = [], n = e.filter((e) => e[G] instanceof RegExp);
1294
1294
  return t = t.concat(function(e) {
1295
1295
  class t extends Ce {
1296
1296
  constructor() {
@@ -1306,11 +1306,11 @@ function ze(e, t) {
1306
1306
  let e = Ee(n), r = new t();
1307
1307
  return r.visit(e), r.found;
1308
1308
  } catch {
1309
- return Be.test(n.source);
1309
+ return ze.test(n.source);
1310
1310
  }
1311
1311
  }).map((e) => ({
1312
1312
  message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain end of input anchor '$'\n See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
1313
- type: K.EOI_ANCHOR_FOUND,
1313
+ type: q.EOI_ANCHOR_FOUND,
1314
1314
  tokenTypes: [e]
1315
1315
  }));
1316
1316
  }(n)), t = t.concat(function(e) {
@@ -1328,36 +1328,36 @@ function ze(e, t) {
1328
1328
  let e = Ee(n), r = new t();
1329
1329
  return r.visit(e), r.found;
1330
1330
  } catch {
1331
- return Ve.test(n.source);
1331
+ return Be.test(n.source);
1332
1332
  }
1333
1333
  }).map((e) => ({
1334
1334
  message: "Unexpected RegExp Anchor Error:\n Token Type: ->" + e.name + "<- static 'PATTERN' cannot contain start of input anchor '^'\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.",
1335
- type: K.SOI_ANCHOR_FOUND,
1335
+ type: q.SOI_ANCHOR_FOUND,
1336
1336
  tokenTypes: [e]
1337
1337
  }));
1338
1338
  }(n)), t = t.concat(function(e) {
1339
1339
  return e.filter((e) => {
1340
- let t = e[Ie];
1340
+ let t = e[G];
1341
1341
  return t instanceof RegExp && (t.multiline || t.global);
1342
1342
  }).map((e) => ({
1343
1343
  message: "Token Type: ->" + e.name + "<- static 'PATTERN' may NOT contain global('g') or multiline('m')",
1344
- type: K.UNSUPPORTED_FLAGS_FOUND,
1344
+ type: q.UNSUPPORTED_FLAGS_FOUND,
1345
1345
  tokenTypes: [e]
1346
1346
  }));
1347
1347
  }(n)), t = t.concat(function(e) {
1348
- let t = [], n = e.map((n) => e.reduce((e, r) => (n.PATTERN.source !== r.PATTERN.source || t.includes(r) || r.PATTERN === q.NA || (t.push(r), e.push(r)), e), []));
1348
+ let t = [], n = e.map((n) => e.reduce((e, r) => (n.PATTERN.source !== r.PATTERN.source || t.includes(r) || r.PATTERN === J.NA || (t.push(r), e.push(r)), e), []));
1349
1349
  return n = n.filter(Boolean), n.filter((e) => e.length > 1).map((e) => {
1350
1350
  let t = e.map((e) => e.name);
1351
1351
  return {
1352
1352
  message: `The same RegExp pattern ->${e[0].PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,
1353
- type: K.DUPLICATE_PATTERNS_FOUND,
1353
+ type: q.DUPLICATE_PATTERNS_FOUND,
1354
1354
  tokenTypes: e
1355
1355
  };
1356
1356
  });
1357
1357
  }(n)), t = t.concat(function(e) {
1358
1358
  return e.filter((e) => e.PATTERN.test("")).map((e) => ({
1359
1359
  message: "Token Type: ->" + e.name + "<- static 'PATTERN' must not match an empty string",
1360
- type: K.EMPTY_MATCH_PATTERN,
1360
+ type: q.EMPTY_MATCH_PATTERN,
1361
1361
  tokenTypes: [e]
1362
1362
  }));
1363
1363
  }(n)), t;
@@ -1365,22 +1365,22 @@ function ze(e, t) {
1365
1365
  return e.filter((e) => {
1366
1366
  if (!Object.hasOwn(e, "GROUP")) return !1;
1367
1367
  let t = e.GROUP;
1368
- return t !== q.SKIPPED && t !== q.NA && typeof t != "string";
1368
+ return t !== J.SKIPPED && t !== J.NA && typeof t != "string";
1369
1369
  }).map((e) => ({
1370
1370
  message: "Token Type: ->" + e.name + "<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",
1371
- type: K.INVALID_GROUP_TYPE_FOUND,
1371
+ type: q.INVALID_GROUP_TYPE_FOUND,
1372
1372
  tokenTypes: [e]
1373
1373
  }));
1374
1374
  }(a)), n = n.concat(function(e, t) {
1375
1375
  return e.filter((e) => e.PUSH_MODE !== void 0 && !t.includes(e.PUSH_MODE)).map((e) => ({
1376
1376
  message: `Token Type: ->${e.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${e.PUSH_MODE}<-which does not exist`,
1377
- type: K.PUSH_MODE_DOES_NOT_EXIST,
1377
+ type: q.PUSH_MODE_DOES_NOT_EXIST,
1378
1378
  tokenTypes: [e]
1379
1379
  }));
1380
1380
  }(a, t)), n = n.concat(function(e) {
1381
1381
  let t = [], n = e.reduce((e, t, n) => {
1382
1382
  let r = t.PATTERN;
1383
- return r === q.NA || (typeof r == "string" ? e.push({
1383
+ return r === J.NA || (typeof r == "string" ? e.push({
1384
1384
  str: r,
1385
1385
  idx: n,
1386
1386
  tokenType: t
@@ -1421,7 +1421,7 @@ function ze(e, t) {
1421
1421
  let n = `Token: ->${a.name}<- can never be matched.\nBecause it appears AFTER the Token Type ->${e.name}<-in the lexer's definition.\nSee https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;
1422
1422
  t.push({
1423
1423
  message: n,
1424
- type: K.UNREACHABLE_PATTERN,
1424
+ type: q.UNREACHABLE_PATTERN,
1425
1425
  tokenTypes: [e, a]
1426
1426
  });
1427
1427
  }
@@ -1429,22 +1429,22 @@ function ze(e, t) {
1429
1429
  }), t;
1430
1430
  }(a)), n;
1431
1431
  }
1432
- var Be = /[^\\][$]/, Ve = /[^\\[][\^]|^\^/;
1433
- function He(e) {
1432
+ var ze = /[^\\][$]/, Be = /[^\\[][\^]|^\^/;
1433
+ function Ve(e) {
1434
1434
  let t = e.ignoreCase ? "iy" : "y";
1435
1435
  return RegExp(`${e.source}`, t);
1436
1436
  }
1437
- function Ue(e) {
1437
+ function He(e) {
1438
1438
  let t = e.PATTERN;
1439
1439
  if (t instanceof RegExp) return !1;
1440
1440
  if (typeof t == "function" || Object.hasOwn(t, "exec")) return !0;
1441
1441
  if (typeof t == "string") return !1;
1442
1442
  throw Error("non exhaustive match");
1443
1443
  }
1444
- function We(e) {
1444
+ function Ue(e) {
1445
1445
  return typeof e == "string" && e.length === 1 && e.charCodeAt(0);
1446
1446
  }
1447
- var Ge = {
1447
+ var We = {
1448
1448
  test: function(e) {
1449
1449
  let t = e.length;
1450
1450
  for (let n = this.lastIndex; n < t; n++) {
@@ -1456,47 +1456,47 @@ var Ge = {
1456
1456
  },
1457
1457
  lastIndex: 0
1458
1458
  };
1459
- function Ke(e, t) {
1459
+ function Ge(e, t) {
1460
1460
  if (Object.hasOwn(e, "LINE_BREAKS")) return !1;
1461
1461
  if (e.PATTERN instanceof RegExp) {
1462
1462
  try {
1463
1463
  Fe(t, e.PATTERN);
1464
1464
  } catch (e) {
1465
1465
  return {
1466
- issue: K.IDENTIFY_TERMINATOR,
1466
+ issue: q.IDENTIFY_TERMINATOR,
1467
1467
  errMsg: e.message
1468
1468
  };
1469
1469
  }
1470
1470
  return !1;
1471
1471
  }
1472
1472
  if (typeof e.PATTERN == "string") return !1;
1473
- if (Ue(e)) return { issue: K.CUSTOM_LINE_BREAK };
1473
+ if (He(e)) return { issue: q.CUSTOM_LINE_BREAK };
1474
1474
  throw Error("non exhaustive match");
1475
1475
  }
1476
- function qe(e, t) {
1477
- if (t.issue === K.IDENTIFY_TERMINATOR) return `Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;
1478
- if (t.issue === K.CUSTOM_LINE_BREAK) return `Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;
1476
+ function Ke(e, t) {
1477
+ if (t.issue === q.IDENTIFY_TERMINATOR) return `Warning: unable to identify line terminator usage in pattern.\n\tThe problem is in the <${e.name}> Token Type\n\t Root cause: ${t.errMsg}.\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;
1478
+ if (t.issue === q.CUSTOM_LINE_BREAK) return `Warning: A Custom Token Pattern should specify the <line_breaks> option.\n\tThe problem is in the <${e.name}> Token Type\n\tFor details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;
1479
1479
  throw Error("non exhaustive match");
1480
1480
  }
1481
- function Je(e) {
1481
+ function qe(e) {
1482
1482
  return e.map((e) => typeof e == "string" ? e.charCodeAt(0) : e);
1483
1483
  }
1484
- function Ye(e, t, n) {
1484
+ function Je(e, t, n) {
1485
1485
  e[t] === void 0 ? e[t] = [n] : e[t].push(n);
1486
1486
  }
1487
- var Xe = [];
1488
- function G(e) {
1489
- return e < 256 ? e : Xe[e];
1487
+ var Ye = [];
1488
+ function K(e) {
1489
+ return e < 256 ? e : Ye[e];
1490
1490
  }
1491
- function Ze(e, t) {
1491
+ function Xe(e, t) {
1492
1492
  let n = e.tokenTypeIdx;
1493
1493
  return n === t.tokenTypeIdx || !0 === t.isParent && !0 === t.categoryMatchesMap[n];
1494
1494
  }
1495
- function Qe(e, t) {
1495
+ function Ze(e, t) {
1496
1496
  return e.tokenTypeIdx === t.tokenTypeIdx;
1497
1497
  }
1498
- var $e = 1, et = {};
1499
- function tt(e) {
1498
+ var Qe = 1, $e = {};
1499
+ function et(e) {
1500
1500
  let t = function(e) {
1501
1501
  let t = [...e], n = e, r = !0;
1502
1502
  for (; r;) {
@@ -1509,107 +1509,107 @@ function tt(e) {
1509
1509
  (function(e) {
1510
1510
  e.forEach((e) => {
1511
1511
  var t;
1512
- rt(e) || (et[$e] = e, e.tokenTypeIdx = $e++), it(e) && !Array.isArray(e.CATEGORIES) && (e.CATEGORIES = [e.CATEGORIES]), it(e) || (e.CATEGORIES = []), t = e, Object.hasOwn(t ?? {}, "categoryMatches") || (e.categoryMatches = []), function(e) {
1512
+ nt(e) || ($e[Qe] = e, e.tokenTypeIdx = Qe++), rt(e) && !Array.isArray(e.CATEGORIES) && (e.CATEGORIES = [e.CATEGORIES]), rt(e) || (e.CATEGORIES = []), t = e, Object.hasOwn(t ?? {}, "categoryMatches") || (e.categoryMatches = []), function(e) {
1513
1513
  return Object.hasOwn(e ?? {}, "categoryMatchesMap");
1514
1514
  }(e) || (e.categoryMatchesMap = {});
1515
1515
  });
1516
1516
  })(t), function(e) {
1517
1517
  e.forEach((e) => {
1518
- nt([], e);
1518
+ tt([], e);
1519
1519
  });
1520
1520
  }(t), function(e) {
1521
1521
  e.forEach((e) => {
1522
1522
  e.categoryMatches = [], Object.keys(e.categoryMatchesMap).forEach((t) => {
1523
- e.categoryMatches.push(et[t].tokenTypeIdx);
1523
+ e.categoryMatches.push($e[t].tokenTypeIdx);
1524
1524
  });
1525
1525
  });
1526
1526
  }(t), t.forEach((e) => {
1527
1527
  e.isParent = e.categoryMatches.length > 0;
1528
1528
  });
1529
1529
  }
1530
- function nt(e, t) {
1530
+ function tt(e, t) {
1531
1531
  e.forEach((e) => {
1532
1532
  t.categoryMatchesMap[e.tokenTypeIdx] = !0;
1533
1533
  }), t.CATEGORIES.forEach((n) => {
1534
1534
  let r = e.concat(t);
1535
- r.includes(n) || nt(r, n);
1535
+ r.includes(n) || tt(r, n);
1536
1536
  });
1537
1537
  }
1538
- function rt(e) {
1538
+ function nt(e) {
1539
1539
  return Object.hasOwn(e ?? {}, "tokenTypeIdx");
1540
1540
  }
1541
- function it(e) {
1541
+ function rt(e) {
1542
1542
  return Object.hasOwn(e ?? {}, "CATEGORIES");
1543
1543
  }
1544
- function at(e) {
1544
+ function it(e) {
1545
1545
  return Object.hasOwn(e ?? {}, "tokenTypeIdx");
1546
1546
  }
1547
- var K, ot = {
1547
+ var q, at = {
1548
1548
  buildUnableToPopLexerModeMessage: (e) => `Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`,
1549
1549
  buildUnexpectedCharactersMessage: (e, t, n, r, i, a) => `unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${n} characters.`
1550
1550
  };
1551
1551
  (function(e) {
1552
1552
  e[e.MISSING_PATTERN = 0] = "MISSING_PATTERN", e[e.INVALID_PATTERN = 1] = "INVALID_PATTERN", e[e.EOI_ANCHOR_FOUND = 2] = "EOI_ANCHOR_FOUND", e[e.UNSUPPORTED_FLAGS_FOUND = 3] = "UNSUPPORTED_FLAGS_FOUND", e[e.DUPLICATE_PATTERNS_FOUND = 4] = "DUPLICATE_PATTERNS_FOUND", e[e.INVALID_GROUP_TYPE_FOUND = 5] = "INVALID_GROUP_TYPE_FOUND", e[e.PUSH_MODE_DOES_NOT_EXIST = 6] = "PUSH_MODE_DOES_NOT_EXIST", e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE = 7] = "MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE", e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY = 8] = "MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY", e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST = 9] = "MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST", e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED = 10] = "LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED", e[e.SOI_ANCHOR_FOUND = 11] = "SOI_ANCHOR_FOUND", e[e.EMPTY_MATCH_PATTERN = 12] = "EMPTY_MATCH_PATTERN", e[e.NO_LINE_BREAKS_FLAGS = 13] = "NO_LINE_BREAKS_FLAGS", e[e.UNREACHABLE_PATTERN = 14] = "UNREACHABLE_PATTERN", e[e.IDENTIFY_TERMINATOR = 15] = "IDENTIFY_TERMINATOR", e[e.CUSTOM_LINE_BREAK = 16] = "CUSTOM_LINE_BREAK", e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE = 17] = "MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE";
1553
- })(K ||= {});
1554
- var st = {
1553
+ })(q ||= {});
1554
+ var ot = {
1555
1555
  deferDefinitionErrorsHandling: !1,
1556
1556
  positionTracking: "full",
1557
1557
  lineTerminatorsPattern: /\n|\r\n?/g,
1558
1558
  lineTerminatorCharacters: ["\n", "\r"],
1559
1559
  ensureOptimizations: !1,
1560
1560
  safeMode: !1,
1561
- errorMessageProvider: ot,
1561
+ errorMessageProvider: at,
1562
1562
  traceInitPerf: !1,
1563
1563
  skipValidations: !1,
1564
1564
  recoveryEnabled: !0
1565
1565
  };
1566
- Object.freeze(st);
1567
- var q = class {
1568
- constructor(e, t = st) {
1566
+ Object.freeze(ot);
1567
+ var J = class {
1568
+ constructor(e, t = ot) {
1569
1569
  if (this.lexerDefinition = e, this.lexerDefinitionErrors = [], this.lexerDefinitionWarning = [], this.patternIdxToConfig = {}, this.charCodeToPatternIdxToConfig = {}, this.modes = [], this.emptyGroups = {}, this.cachedGroupKeys = [], this.trackStartLines = !0, this.trackEndLines = !0, this.hasCustom = !1, this.canModeBeOptimized = {}, this.TRACE_INIT = (e, t) => {
1570
1570
  if (!0 === this.traceInitPerf) {
1571
1571
  this.traceInitIndent++;
1572
1572
  let n = Array(this.traceInitIndent + 1).join(" ");
1573
1573
  this.traceInitIndent < this.traceInitMaxIdent && console.log(`${n}--\x3e <${e}>`);
1574
- let { time: r, value: i } = re(t), a = r > 10 ? console.warn : console.log;
1574
+ let { time: r, value: i } = ie(t), a = r > 10 ? console.warn : console.log;
1575
1575
  return this.traceInitIndent < this.traceInitMaxIdent && a(`${n}<-- <${e}> time: ${r}ms`), this.traceInitIndent--, i;
1576
1576
  }
1577
1577
  return t();
1578
1578
  }, typeof t == "boolean") throw Error("The second argument to the Lexer constructor is now an ILexerConfig Object.\na boolean 2nd argument is no longer supported");
1579
- this.config = Object.assign({}, st, t);
1579
+ this.config = Object.assign({}, ot, t);
1580
1580
  let n = this.config.traceInitPerf;
1581
1581
  !0 === n ? (this.traceInitMaxIdent = 1 / 0, this.traceInitPerf = !0) : typeof n == "number" && (this.traceInitMaxIdent = n, this.traceInitPerf = !0), this.traceInitIndent = -1, this.TRACE_INIT("Lexer Constructor", () => {
1582
1582
  let n, r = !0;
1583
1583
  this.TRACE_INIT("Lexer Config handling", () => {
1584
- if (this.config.lineTerminatorsPattern === st.lineTerminatorsPattern) this.config.lineTerminatorsPattern = Ge;
1585
- else if (this.config.lineTerminatorCharacters === st.lineTerminatorCharacters) throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");
1584
+ if (this.config.lineTerminatorsPattern === ot.lineTerminatorsPattern) this.config.lineTerminatorsPattern = We;
1585
+ else if (this.config.lineTerminatorCharacters === ot.lineTerminatorCharacters) throw Error("Error: Missing <lineTerminatorCharacters> property on the Lexer config.\n For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS");
1586
1586
  if (t.safeMode && t.ensureOptimizations) throw Error("\"safeMode\" and \"ensureOptimizations\" flags are mutually exclusive.");
1587
1587
  this.trackStartLines = /full|onlyStart/i.test(this.config.positionTracking), this.trackEndLines = /full/i.test(this.config.positionTracking), Array.isArray(e) ? n = {
1588
1588
  modes: { defaultMode: [...e] },
1589
- defaultMode: Le
1589
+ defaultMode: Ie
1590
1590
  } : (r = !1, n = Object.assign({}, e));
1591
1591
  }), !1 === this.config.skipValidations && (this.TRACE_INIT("performRuntimeChecks", () => {
1592
1592
  this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(function(e) {
1593
1593
  let t = [];
1594
1594
  return Object.hasOwn(e, "defaultMode") || t.push({
1595
1595
  message: "A MultiMode Lexer cannot be initialized without a <defaultMode> property in its definition\n",
1596
- type: K.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE
1596
+ type: q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE
1597
1597
  }), Object.hasOwn(e, "modes") || t.push({
1598
1598
  message: "A MultiMode Lexer cannot be initialized without a <modes> property in its definition\n",
1599
- type: K.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY
1599
+ type: q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY
1600
1600
  }), Object.hasOwn(e, "modes") && Object.hasOwn(e, "defaultMode") && !Object.hasOwn(e.modes, e.defaultMode) && t.push({
1601
- message: `A MultiMode Lexer cannot be initialized with a ${Le}: <${e.defaultMode}>which does not exist\n`,
1602
- type: K.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST
1601
+ message: `A MultiMode Lexer cannot be initialized with a ${Ie}: <${e.defaultMode}>which does not exist\n`,
1602
+ type: q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST
1603
1603
  }), Object.hasOwn(e, "modes") && Object.keys(e.modes).forEach((n) => {
1604
1604
  let r = e.modes[n];
1605
1605
  r.forEach((e, i) => {
1606
1606
  e === void 0 ? t.push({
1607
1607
  message: `A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${i}>\n`,
1608
- type: K.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
1608
+ type: q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED
1609
1609
  }) : Object.hasOwn(e, "LONGER_ALT") && (Array.isArray(e.LONGER_ALT) ? e.LONGER_ALT : [e.LONGER_ALT]).forEach((i) => {
1610
1610
  i === void 0 || r.includes(i) || t.push({
1611
1611
  message: `A MultiMode Lexer cannot be initialized with a longer_alt <${i.name}> on token <${e.name}> outside of mode <${n}>\n`,
1612
- type: K.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE
1612
+ type: q.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE
1613
1613
  });
1614
1614
  });
1615
1615
  });
@@ -1617,12 +1617,12 @@ var q = class {
1617
1617
  }(n, this.trackStartLines, this.config.lineTerminatorCharacters));
1618
1618
  }), this.TRACE_INIT("performWarningRuntimeChecks", () => {
1619
1619
  this.lexerDefinitionWarning = this.lexerDefinitionWarning.concat(function(e, t, n) {
1620
- let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[Ie] !== q.NA), o = Je(n);
1620
+ let r = [], i = !1, a = Object.values(e.modes || {}).flat().filter(Boolean).filter((e) => e[G] !== J.NA), o = qe(n);
1621
1621
  return t && a.forEach((e) => {
1622
- let t = Ke(e, o);
1622
+ let t = Ge(e, o);
1623
1623
  if (!1 !== t) {
1624
1624
  let n = {
1625
- message: qe(e, t),
1625
+ message: Ke(e, t),
1626
1626
  type: t.issue,
1627
1627
  tokenType: e
1628
1628
  };
@@ -1630,7 +1630,7 @@ var q = class {
1630
1630
  } else Object.hasOwn(e, "LINE_BREAKS") ? !0 === e.LINE_BREAKS && (i = !0) : Fe(o, e.PATTERN) && (i = !0);
1631
1631
  }), t && !i && r.push({
1632
1632
  message: "Warning: No LINE_BREAKS Found.\n This Lexer has been defined to track line and column information,\n But none of the Token Types can be identified as matching a line terminator.\n See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS \n for details.",
1633
- type: K.NO_LINE_BREAKS_FLAGS
1633
+ type: q.NO_LINE_BREAKS_FLAGS
1634
1634
  }), r;
1635
1635
  }(n, this.trackStartLines, this.config.lineTerminatorCharacters));
1636
1636
  })), n.modes = n.modes ? n.modes : {}, Object.entries(n.modes).forEach(([e, t]) => {
@@ -1640,11 +1640,11 @@ var q = class {
1640
1640
  if (Object.entries(n.modes).forEach(([e, n]) => {
1641
1641
  this.TRACE_INIT(`Mode: <${e}> processing`, () => {
1642
1642
  if (this.modes.push(e), !1 === this.config.skipValidations && this.TRACE_INIT("validatePatterns", () => {
1643
- this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(ze(n, i));
1643
+ this.lexerDefinitionErrors = this.lexerDefinitionErrors.concat(Re(n, i));
1644
1644
  }), this.lexerDefinitionErrors.length === 0) {
1645
1645
  let r;
1646
- tt(n), this.TRACE_INIT("analyzeTokenTypes", () => {
1647
- r = Re(n, {
1646
+ et(n), this.TRACE_INIT("analyzeTokenTypes", () => {
1647
+ r = Le(n, {
1648
1648
  lineTerminatorCharacters: this.config.lineTerminatorCharacters,
1649
1649
  positionTracking: t.positionTracking,
1650
1650
  ensureOptimizations: t.ensureOptimizations,
@@ -1659,7 +1659,7 @@ var q = class {
1659
1659
  throw Error("Errors detected in definition of Lexer:\n" + e);
1660
1660
  }
1661
1661
  this.lexerDefinitionWarning.forEach((e) => {
1662
- k(e.message);
1662
+ O(e.message);
1663
1663
  }), this.TRACE_INIT("Choosing sub-methods implementations", () => {
1664
1664
  if (r && (this.handleModes = () => {}), !1 === this.trackStartLines && (this.computeNewColumn = (e) => e), !1 === this.trackEndLines && (this.updateTokenEndLineColumnLocation = () => {}), /full/i.test(this.config.positionTracking)) this.createTokenInstance = this.createFullToken;
1665
1665
  else if (/onlyStart/i.test(this.config.positionTracking)) this.createTokenInstance = this.createStartOnlyToken;
@@ -1674,7 +1674,7 @@ var q = class {
1674
1674
  }), this.TRACE_INIT("clearRegExpParserCache", () => {
1675
1675
  we = {};
1676
1676
  }), this.TRACE_INIT("toFastProperties", () => {
1677
- ie(this);
1677
+ ae(this);
1678
1678
  });
1679
1679
  });
1680
1680
  }
@@ -1686,14 +1686,14 @@ var q = class {
1686
1686
  return this.tokenizeInternal(e, t);
1687
1687
  }
1688
1688
  tokenizeInternal(e, t) {
1689
- let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, v = _.length, y = 0, b = 0, ee = this.hasCustom ? 0 : Math.floor(e.length / 10), x = Array(ee), S = [], C = this.trackStartLines ? 1 : void 0, w = this.trackStartLines ? 1 : void 0, T = {};
1690
- for (let e = 0; e < this.cachedGroupKeys.length; e++) T[this.cachedGroupKeys[e]] = [];
1691
- let te = this.trackStartLines, E = this.config.lineTerminatorsPattern, ne = 0, D = [], O = [], k = [], re = [];
1692
- Object.freeze(re);
1693
- let ie = !1, A = (e) => {
1694
- if (k.length === 1 && e.tokenType.PUSH_MODE === void 0) {
1689
+ let n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _ = e, v = _.length, y = 0, ee = 0, b = this.hasCustom ? 0 : Math.floor(e.length / 10), x = Array(b), te = [], S = this.trackStartLines ? 1 : void 0, C = this.trackStartLines ? 1 : void 0, w = {};
1690
+ for (let e = 0; e < this.cachedGroupKeys.length; e++) w[this.cachedGroupKeys[e]] = [];
1691
+ let ne = this.trackStartLines, T = this.config.lineTerminatorsPattern, re = 0, E = [], D = [], O = [], ie = [];
1692
+ Object.freeze(ie);
1693
+ let ae = !1, k = (e) => {
1694
+ if (O.length === 1 && e.tokenType.PUSH_MODE === void 0) {
1695
1695
  let t = this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(e);
1696
- S.push({
1696
+ te.push({
1697
1697
  offset: e.startOffset,
1698
1698
  line: e.startLine,
1699
1699
  column: e.startColumn,
@@ -1701,41 +1701,41 @@ var q = class {
1701
1701
  message: t
1702
1702
  });
1703
1703
  } else {
1704
- k.pop();
1705
- let e = k.at(-1);
1706
- D = this.patternIdxToConfig[e], O = this.charCodeToPatternIdxToConfig[e], ne = D.length;
1704
+ O.pop();
1705
+ let e = O.at(-1);
1706
+ E = this.patternIdxToConfig[e], D = this.charCodeToPatternIdxToConfig[e], re = E.length;
1707
1707
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1708
- ie = !(!O || !t);
1708
+ ae = !(!D || !t);
1709
1709
  }
1710
1710
  };
1711
- function j(e) {
1712
- k.push(e), O = this.charCodeToPatternIdxToConfig[e], D = this.patternIdxToConfig[e], ne = D.length;
1711
+ function A(e) {
1712
+ O.push(e), D = this.charCodeToPatternIdxToConfig[e], E = this.patternIdxToConfig[e], re = E.length;
1713
1713
  let t = this.canModeBeOptimized[e] && !1 === this.config.safeMode;
1714
- ie = !(!O || !t);
1714
+ ae = !(!D || !t);
1715
1715
  }
1716
- let M;
1717
- j.call(this, t);
1718
- let N = this.config.recoveryEnabled;
1716
+ let j;
1717
+ A.call(this, t);
1718
+ let M = this.config.recoveryEnabled;
1719
1719
  for (; y < v;) {
1720
1720
  s = null, u = -1;
1721
- let t = _.charCodeAt(y), ee;
1722
- if (ie) {
1723
- let e = G(t), n = O[e];
1724
- ee = n === void 0 ? re : n;
1725
- } else ee = D;
1726
- let P = ee.length;
1727
- for (n = 0; n < P; n++) {
1728
- M = ee[n];
1729
- let r = M.pattern;
1730
- switch (c = null, M.matchType) {
1721
+ let t = _.charCodeAt(y), b;
1722
+ if (ae) {
1723
+ let e = K(t), n = D[e];
1724
+ b = n === void 0 ? ie : n;
1725
+ } else b = E;
1726
+ let N = b.length;
1727
+ for (n = 0; n < N; n++) {
1728
+ j = b[n];
1729
+ let r = j.pattern;
1730
+ switch (c = null, j.matchType) {
1731
1731
  case 0:
1732
- t === M.short && (u = 1, s = r);
1732
+ t === j.short && (u = 1, s = r);
1733
1733
  break;
1734
1734
  case 1:
1735
- g = r.exec(_, y, x, T), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1735
+ g = r.exec(_, y, x, w), g === null ? s = null : (s = g[0], u = s.length, g.payload !== void 0 && (c = g.payload));
1736
1736
  break;
1737
1737
  case 3: {
1738
- let e = M.asciiClass;
1738
+ let e = j.asciiClass;
1739
1739
  if (e[t] !== 1) {
1740
1740
  r.lastIndex = 0;
1741
1741
  break;
@@ -1748,13 +1748,13 @@ var q = class {
1748
1748
  case 2: r.lastIndex = y, u = this.matchLength(r, e, y);
1749
1749
  }
1750
1750
  if (u !== -1) {
1751
- if (o = M.longerAlt, o !== void 0) {
1751
+ if (o = j.longerAlt, o !== void 0) {
1752
1752
  s = e.substring(y, y + u);
1753
1753
  let t = o.length;
1754
1754
  for (i = 0; i < t; i++) {
1755
- let t = D[o[i]], n = t.pattern;
1756
- if (l = null, t.matchType === 1 ? (g = n.exec(_, y, x, T), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = y, a = this.match(n, e, y)), a && a.length > s.length) {
1757
- s = a, u = a.length, c = l, M = t;
1755
+ let t = E[o[i]], n = t.pattern;
1756
+ if (l = null, t.matchType === 1 ? (g = n.exec(_, y, x, w), g === null ? a = null : (a = g[0], g.payload !== void 0 && (l = g.payload))) : (n.lastIndex = y, a = this.match(n, e, y)), a && a.length > s.length) {
1757
+ s = a, u = a.length, c = l, j = t;
1758
1758
  break;
1759
1759
  }
1760
1760
  }
@@ -1763,44 +1763,44 @@ var q = class {
1763
1763
  }
1764
1764
  }
1765
1765
  if (u !== -1) {
1766
- if (d = M.group, d !== void 0 && (s = s === null ? e.substring(y, y + u) : s, f = M.tokenTypeIdx, p = this.createTokenInstance(s, y, f, M.tokenType, C, w, u), this.handlePayload(p, c), !1 === d ? b = this.addToken(x, b, p) : T[d].push(p)), !0 === te && !0 === M.canLineTerminator) {
1766
+ if (d = j.group, d !== void 0 && (s = s === null ? e.substring(y, y + u) : s, f = j.tokenTypeIdx, p = this.createTokenInstance(s, y, f, j.tokenType, S, C, u), this.handlePayload(p, c), !1 === d ? ee = this.addToken(x, ee, p) : w[d].push(p)), !0 === ne && !0 === j.canLineTerminator) {
1767
1767
  let t, n, r = 0;
1768
- E.lastIndex = 0;
1768
+ T.lastIndex = 0;
1769
1769
  do
1770
- s = s === null ? e.substring(y, y + u) : s, t = E.test(s), !0 === t && (n = E.lastIndex - 1, r++);
1770
+ s = s === null ? e.substring(y, y + u) : s, t = T.test(s), !0 === t && (n = T.lastIndex - 1, r++);
1771
1771
  while (!0 === t);
1772
- r === 0 ? w = this.computeNewColumn(w, u) : (C += r, w = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, C, w, u));
1773
- } else w = this.computeNewColumn(w, u);
1774
- y += u, this.handleModes(M, A, j, p);
1772
+ r === 0 ? C = this.computeNewColumn(C, u) : (S += r, C = u - n, this.updateTokenEndLineColumnLocation(p, d, n, r, S, C, u));
1773
+ } else C = this.computeNewColumn(C, u);
1774
+ y += u, this.handleModes(j, k, A, p);
1775
1775
  } else {
1776
- let t = y, n = C, i = w, a = !1 === N;
1777
- for (; !1 === a && y < v;) for (y++, r = 0; r < ne; r++) {
1778
- let t = D[r], n = t.pattern;
1776
+ let t = y, n = S, i = C, a = !1 === M;
1777
+ for (; !1 === a && y < v;) for (y++, r = 0; r < re; r++) {
1778
+ let t = E[r], n = t.pattern;
1779
1779
  switch (t.matchType) {
1780
1780
  case 0:
1781
1781
  _.charCodeAt(y) === t.short && (a = !0);
1782
1782
  break;
1783
1783
  case 1:
1784
- a = n.exec(_, y, x, T) !== null;
1784
+ a = n.exec(_, y, x, w) !== null;
1785
1785
  break;
1786
1786
  case 3:
1787
1787
  case 2: n.lastIndex = y, a = n.exec(e) !== null;
1788
1788
  }
1789
1789
  if (!0 === a) break;
1790
1790
  }
1791
- if (m = y - t, w = this.computeNewColumn(w, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, k.at(-1)), S.push({
1791
+ if (m = y - t, C = this.computeNewColumn(C, m), h = this.config.errorMessageProvider.buildUnexpectedCharactersMessage(_, t, m, n, i, O.at(-1)), te.push({
1792
1792
  offset: t,
1793
1793
  line: n,
1794
1794
  column: i,
1795
1795
  length: m,
1796
1796
  message: h
1797
- }), !1 === N) break;
1797
+ }), !1 === M) break;
1798
1798
  }
1799
1799
  }
1800
- return this.hasCustom || (x.length = b), {
1800
+ return this.hasCustom || (x.length = ee), {
1801
1801
  tokens: x,
1802
- groups: T,
1803
- errors: S
1802
+ groups: w,
1803
+ errors: te
1804
1804
  };
1805
1805
  }
1806
1806
  handleModes(e, t, n, r) {
@@ -1864,26 +1864,26 @@ var q = class {
1864
1864
  return !0 === e.test(t) ? e.lastIndex - n : -1;
1865
1865
  }
1866
1866
  };
1867
- function ct(e) {
1868
- return lt(e) ? e.LABEL : e.name;
1867
+ function st(e) {
1868
+ return ct(e) ? e.LABEL : e.name;
1869
1869
  }
1870
- function lt(e) {
1870
+ function ct(e) {
1871
1871
  return typeof e.LABEL == "string" && e.LABEL !== "";
1872
1872
  }
1873
- q.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.", q.NA = /NOT_APPLICABLE/;
1874
- var ut = "parent", dt = "categories", ft = "label", pt = "group", mt = "push_mode", ht = "pop_mode", gt = "longer_alt", _t = "line_breaks", vt = "start_chars_hint";
1875
- function J(e) {
1873
+ J.SKIPPED = "This marks a skipped Token pattern, this means each token identified by it will be consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.", J.NA = /NOT_APPLICABLE/;
1874
+ var lt = "parent", ut = "categories", dt = "label", ft = "group", pt = "push_mode", mt = "pop_mode", ht = "longer_alt", gt = "line_breaks", _t = "start_chars_hint";
1875
+ function Y(e) {
1876
1876
  return function(e) {
1877
1877
  let t = e.pattern, n = {};
1878
- if (n.name = e.name, t !== void 0 && (n.PATTERN = t), Object.hasOwn(e, ut)) throw "The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";
1879
- return Object.hasOwn(e, dt) && (n.CATEGORIES = e[dt]), tt([n]), Object.hasOwn(e, ft) && (n.LABEL = e[ft]), Object.hasOwn(e, pt) && (n.GROUP = e[pt]), Object.hasOwn(e, ht) && (n.POP_MODE = e[ht]), Object.hasOwn(e, mt) && (n.PUSH_MODE = e[mt]), Object.hasOwn(e, gt) && (n.LONGER_ALT = e[gt]), Object.hasOwn(e, _t) && (n.LINE_BREAKS = e[_t]), Object.hasOwn(e, vt) && (n.START_CHARS_HINT = e[vt]), n;
1878
+ if (n.name = e.name, t !== void 0 && (n.PATTERN = t), Object.hasOwn(e, lt)) throw "The parent property is no longer supported.\nSee: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.";
1879
+ return Object.hasOwn(e, ut) && (n.CATEGORIES = e[ut]), et([n]), Object.hasOwn(e, dt) && (n.LABEL = e[dt]), Object.hasOwn(e, ft) && (n.GROUP = e[ft]), Object.hasOwn(e, mt) && (n.POP_MODE = e[mt]), Object.hasOwn(e, pt) && (n.PUSH_MODE = e[pt]), Object.hasOwn(e, ht) && (n.LONGER_ALT = e[ht]), Object.hasOwn(e, gt) && (n.LINE_BREAKS = e[gt]), Object.hasOwn(e, _t) && (n.START_CHARS_HINT = e[_t]), n;
1880
1880
  }(e);
1881
1881
  }
1882
- var Y = J({
1882
+ var X = Y({
1883
1883
  name: "EOF",
1884
- pattern: q.NA
1884
+ pattern: J.NA
1885
1885
  });
1886
- function yt(e, t, n, r, i, a, o, s) {
1886
+ function vt(e, t, n, r, i, a, o, s) {
1887
1887
  return {
1888
1888
  image: t,
1889
1889
  startOffset: n,
@@ -1896,38 +1896,38 @@ function yt(e, t, n, r, i, a, o, s) {
1896
1896
  tokenType: e
1897
1897
  };
1898
1898
  }
1899
- tt([Y]);
1900
- var bt = {
1901
- buildMismatchTokenMessage: ({ expected: e, actual: t, previous: n, ruleName: r }) => `Expecting ${lt(e) ? `--\x3e ${ct(e)} <--` : `token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,
1899
+ et([X]);
1900
+ var yt = {
1901
+ buildMismatchTokenMessage: ({ expected: e, actual: t, previous: n, ruleName: r }) => `Expecting ${ct(e) ? `--\x3e ${st(e)} <--` : `token of type --\x3e ${e.name} <--`} but found --\x3e '${t.image}' <--`,
1902
1902
  buildNotAllInputParsedMessage: ({ firstRedundant: e, ruleName: t }) => "Redundant input, expecting EOF but found: " + e.image,
1903
1903
  buildNoViableAltMessage({ expectedPathsPerAlt: e, actual: t, previous: n, customUserDescription: r, ruleName: i }) {
1904
1904
  let a = "\nbut found: '" + t[0].image + "'";
1905
- return r ? "Expecting: " + r + a : `Expecting: one of these possible Token sequences:\n${e.reduce((e, t) => e.concat(t), []).map((e) => `[${e.map((e) => ct(e)).join(", ")}]`).map((e, t) => ` ${t + 1}. ${e}`).join("\n")}` + a;
1905
+ return r ? "Expecting: " + r + a : `Expecting: one of these possible Token sequences:\n${e.reduce((e, t) => e.concat(t), []).map((e) => `[${e.map((e) => st(e)).join(", ")}]`).map((e, t) => ` ${t + 1}. ${e}`).join("\n")}` + a;
1906
1906
  },
1907
1907
  buildEarlyExitMessage({ expectedIterationPaths: e, actual: t, customUserDescription: n, ruleName: r }) {
1908
1908
  let i = "\nbut found: '" + t[0].image + "'";
1909
- return n ? "Expecting: " + n + i : `Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map((e) => `[${e.map((e) => ct(e)).join(",")}]`).join(" ,")}>` + i;
1909
+ return n ? "Expecting: " + n + i : `Expecting: expecting at least one iteration which starts with one of these possible Token sequences::\n <${e.map((e) => `[${e.map((e) => st(e)).join(",")}]`).join(" ,")}>` + i;
1910
1910
  }
1911
1911
  };
1912
- Object.freeze(bt);
1913
- var xt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a rule which is not defined: ->" + t.nonTerminalName + "<-\ninside top level rule: ->" + e.name + "<-" }, X = {
1912
+ Object.freeze(yt);
1913
+ var bt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a rule which is not defined: ->" + t.nonTerminalName + "<-\ninside top level rule: ->" + e.name + "<-" }, xt = {
1914
1914
  buildDuplicateFoundError(e, t) {
1915
- let n = e.name, r = t[0], i = r.idx, a = H(r), o = (s = r) instanceof B ? s.terminalType.name : s instanceof j ? s.nonTerminalName : "";
1915
+ let n = e.name, r = t[0], i = r.idx, a = V(r), o = (s = r) instanceof z ? s.terminalType.name : s instanceof A ? s.nonTerminalName : "";
1916
1916
  var s;
1917
1917
  let c = `->${a}${i > 0 ? i : ""}<- ${o ? `with argument: ->${o}<-` : ""}\n appears more than once (${t.length} times) in the top level rule: ->${n}<-. \n For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES \n `;
1918
1918
  return c = c.replace(/[ \t]+/g, " "), c = c.replace(/\s\s+/g, "\n"), c;
1919
1919
  },
1920
1920
  buildNamespaceConflictError: (e) => `Namespace conflict found in grammar.\nThe grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.\nTo resolve this make sure each Terminal and Non-Terminal names are unique\nThis is easy to accomplish by using the convention that Terminal names start with an uppercase letter\nand Non-Terminal names start with a lower case letter.`,
1921
1921
  buildAlternationPrefixAmbiguityError(e) {
1922
- let t = e.prefixPath.map((e) => ct(e)).join(", "), n = e.alternation.idx === 0 ? "" : e.alternation.idx;
1922
+ let t = e.prefixPath.map((e) => st(e)).join(", "), n = e.alternation.idx === 0 ? "" : e.alternation.idx;
1923
1923
  return `Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix\nin <OR${n}> inside <${e.topLevelRule.name}> Rule,\n<${t}> may appears as a prefix path in all these alternatives.\nSee: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX\nFor Further details.`;
1924
1924
  },
1925
1925
  buildAlternationAmbiguityError(e) {
1926
1926
  let t = e.alternation.idx === 0 ? "" : e.alternation.idx, n = e.prefixPath.length === 0, r = `Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${t}> inside <${e.topLevelRule.name}> Rule,\n`;
1927
- return r += n ? "These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n" : `<${e.prefixPath.map((e) => ct(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`, r += "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.", r;
1927
+ return r += n ? "These alternatives are all empty (match no tokens), making them indistinguishable.\nOnly the last alternative may be empty.\n" : `<${e.prefixPath.map((e) => st(e)).join(", ")}> may appears as a prefix path in all these alternatives.\n`, r += "See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES\nFor Further details.", r;
1928
1928
  },
1929
1929
  buildEmptyRepetitionError(e) {
1930
- let t = H(e.repetition);
1930
+ let t = V(e.repetition);
1931
1931
  return e.repetition.idx !== 0 && (t += e.repetition.idx), `The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.\nThis could lead to an infinite loop.`;
1932
1932
  },
1933
1933
  buildTokenNameError: (e) => "deprecated",
@@ -1940,9 +1940,9 @@ var xt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1940
1940
  buildInvalidRuleNameError: (e) => "deprecated",
1941
1941
  buildDuplicateRuleNameError(e) {
1942
1942
  let t;
1943
- return t = e.topLevelRule instanceof M ? e.topLevelRule.name : e.topLevelRule, `Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;
1943
+ return t = e.topLevelRule instanceof j ? e.topLevelRule.name : e.topLevelRule, `Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`;
1944
1944
  }
1945
- }, Z, St = class extends oe {
1945
+ }, Z, St = class extends se {
1946
1946
  constructor(e, t) {
1947
1947
  super(), this.nameToTopRule = e, this.errMsgProvider = t, this.errors = [];
1948
1948
  }
@@ -1964,7 +1964,7 @@ var xt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1964
1964
  });
1965
1965
  }
1966
1966
  }
1967
- }, Ct = class extends ce {
1967
+ }, Ct = class extends le {
1968
1968
  constructor(e, t) {
1969
1969
  super(), this.topProd = e, this.path = t, this.possibleTokTypes = [], this.nextProductionName = "", this.nextProductionOccurrence = 0, this.found = !1, this.isAtEndOfPath = !1;
1970
1970
  }
@@ -1990,11 +1990,11 @@ var xt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
1990
1990
  }
1991
1991
  walkTerminal(e, t, n) {
1992
1992
  if (this.isAtEndOfPath && e.terminalType.name === this.nextTerminalName && e.idx === this.nextTerminalOccurrence && !this.found) {
1993
- let e = new N({ definition: t.concat(n) });
1994
- this.possibleTokTypes = ue(e), this.found = !0;
1993
+ let e = new M({ definition: t.concat(n) });
1994
+ this.possibleTokTypes = de(e), this.found = !0;
1995
1995
  }
1996
1996
  }
1997
- }, Tt = class extends ce {
1997
+ }, Tt = class extends le {
1998
1998
  constructor(e, t) {
1999
1999
  super(), this.topRule = e, this.occurrence = t, this.result = {
2000
2000
  token: void 0,
@@ -2009,28 +2009,28 @@ var xt = { buildRuleNotFoundError: (e, t) => "Invalid grammar, reference to a ru
2009
2009
  walkMany(e, t, n) {
2010
2010
  if (e.idx === this.occurrence) {
2011
2011
  let e = t.concat(n)[0];
2012
- this.result.isEndOfRule = e === void 0, e instanceof B && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2012
+ this.result.isEndOfRule = e === void 0, e instanceof z && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2013
2013
  } else super.walkMany(e, t, n);
2014
2014
  }
2015
2015
  }, Dt = class extends Tt {
2016
2016
  walkManySep(e, t, n) {
2017
2017
  if (e.idx === this.occurrence) {
2018
2018
  let e = t.concat(n)[0];
2019
- this.result.isEndOfRule = e === void 0, e instanceof B && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2019
+ this.result.isEndOfRule = e === void 0, e instanceof z && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2020
2020
  } else super.walkManySep(e, t, n);
2021
2021
  }
2022
2022
  }, Ot = class extends Tt {
2023
2023
  walkAtLeastOne(e, t, n) {
2024
2024
  if (e.idx === this.occurrence) {
2025
2025
  let e = t.concat(n)[0];
2026
- this.result.isEndOfRule = e === void 0, e instanceof B && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2026
+ this.result.isEndOfRule = e === void 0, e instanceof z && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2027
2027
  } else super.walkAtLeastOne(e, t, n);
2028
2028
  }
2029
2029
  }, kt = class extends Tt {
2030
2030
  walkAtLeastOneSep(e, t, n) {
2031
2031
  if (e.idx === this.occurrence) {
2032
2032
  let e = t.concat(n)[0];
2033
- this.result.isEndOfRule = e === void 0, e instanceof B && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2033
+ this.result.isEndOfRule = e === void 0, e instanceof z && (this.result.token = e.terminalType, this.result.occurrence = e.idx);
2034
2034
  } else super.walkAtLeastOneSep(e, t, n);
2035
2035
  }
2036
2036
  };
@@ -2043,18 +2043,18 @@ function At(e, t, n = []) {
2043
2043
  }
2044
2044
  for (; n.length < t && i < e.length;) {
2045
2045
  let t = e[i];
2046
- if (t instanceof N || t instanceof j) return a(t.definition);
2047
- if (t instanceof P) r = a(t.definition);
2046
+ if (t instanceof M || t instanceof A) return a(t.definition);
2047
+ if (t instanceof N) r = a(t.definition);
2048
2048
  else {
2049
- if (t instanceof F) return a(t.definition.concat([new L({ definition: t.definition })]));
2050
- if (t instanceof I) return a([new N({ definition: t.definition }), new L({ definition: [new B({ terminalType: t.separator })].concat(t.definition) })]);
2051
- if (t instanceof R) r = a(t.definition.concat([new L({ definition: [new B({ terminalType: t.separator })].concat(t.definition) })]));
2052
- else if (t instanceof L) r = a(t.definition.concat([new L({ definition: t.definition })]));
2049
+ if (t instanceof P) return a(t.definition.concat([new I({ definition: t.definition })]));
2050
+ if (t instanceof F) return a([new M({ definition: t.definition }), new I({ definition: [new z({ terminalType: t.separator })].concat(t.definition) })]);
2051
+ if (t instanceof L) r = a(t.definition.concat([new I({ definition: [new z({ terminalType: t.separator })].concat(t.definition) })]));
2052
+ else if (t instanceof I) r = a(t.definition.concat([new I({ definition: t.definition })]));
2053
2053
  else {
2054
- if (t instanceof z) return t.definition.forEach((e) => {
2054
+ if (t instanceof R) return t.definition.forEach((e) => {
2055
2055
  e.definition.length !== 0 && (r = a(e.definition));
2056
2056
  }), r;
2057
- if (!(t instanceof B)) throw Error("non exhaustive match");
2057
+ if (!(t instanceof z)) throw Error("non exhaustive match");
2058
2058
  n.push(t.terminalType);
2059
2059
  }
2060
2060
  }
@@ -2077,12 +2077,12 @@ function jt(e, t, n, r) {
2077
2077
  };
2078
2078
  }
2079
2079
  function Mt(e) {
2080
- if (e instanceof P || e === "Option") return Z.OPTION;
2081
- if (e instanceof L || e === "Repetition") return Z.REPETITION;
2082
- if (e instanceof F || e === "RepetitionMandatory") return Z.REPETITION_MANDATORY;
2083
- if (e instanceof I || e === "RepetitionMandatoryWithSeparator") return Z.REPETITION_MANDATORY_WITH_SEPARATOR;
2084
- if (e instanceof R || e === "RepetitionWithSeparator") return Z.REPETITION_WITH_SEPARATOR;
2085
- if (e instanceof z || e === "Alternation") return Z.ALTERNATION;
2080
+ if (e instanceof N || e === "Option") return Z.OPTION;
2081
+ if (e instanceof I || e === "Repetition") return Z.REPETITION;
2082
+ if (e instanceof P || e === "RepetitionMandatory") return Z.REPETITION_MANDATORY;
2083
+ if (e instanceof F || e === "RepetitionMandatoryWithSeparator") return Z.REPETITION_MANDATORY_WITH_SEPARATOR;
2084
+ if (e instanceof L || e === "RepetitionWithSeparator") return Z.REPETITION_WITH_SEPARATOR;
2085
+ if (e instanceof R || e === "Alternation") return Z.ALTERNATION;
2086
2086
  throw Error("non exhaustive match");
2087
2087
  }
2088
2088
  function Nt(e, t, n, r) {
@@ -2152,7 +2152,7 @@ function Pt(e, t, n) {
2152
2152
  (function(e) {
2153
2153
  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";
2154
2154
  })(Z ||= {});
2155
- var Ft = class extends ce {
2155
+ var Ft = class extends le {
2156
2156
  constructor(e, t, n) {
2157
2157
  super(), this.topProd = e, this.targetOccurrence = t, this.targetProdType = n;
2158
2158
  }
@@ -2177,7 +2177,7 @@ var Ft = class extends ce {
2177
2177
  walkManySep(e, t, n) {
2178
2178
  this.checkIsTarget(e, Z.REPETITION_WITH_SEPARATOR, t, n) || super.walkOption(e, t, n);
2179
2179
  }
2180
- }, It = class extends oe {
2180
+ }, It = class extends se {
2181
2181
  constructor(e, t, n) {
2182
2182
  super(), this.targetOccurrence = e, this.targetProdType = t, this.targetRef = n, this.result = [];
2183
2183
  }
@@ -2278,7 +2278,7 @@ function Ht(e, t, n, r) {
2278
2278
  let i = new It(e, n);
2279
2279
  t.accept(i);
2280
2280
  let a = i.result, o = new Ft(t, e, n).startWalking();
2281
- return Bt([new N({ definition: a }), new N({ definition: o })], r);
2281
+ return Bt([new M({ definition: a }), new M({ definition: o })], r);
2282
2282
  }
2283
2283
  function Ut(e, t) {
2284
2284
  e: for (let n = 0; n < e.length; n++) {
@@ -2302,7 +2302,7 @@ function Gt(e, t, n, r) {
2302
2302
  e.accept(n);
2303
2303
  let r = n.allProductions, i = Object.groupBy(r, Kt), a = Object.fromEntries(Object.entries(i).filter(([e, t]) => t.length > 1));
2304
2304
  return Object.values(a).map((n) => {
2305
- let r = n[0], i = t.buildDuplicateFoundError(e, n), a = H(r), o = {
2305
+ let r = n[0], i = t.buildDuplicateFoundError(e, n), a = V(r), o = {
2306
2306
  message: i,
2307
2307
  type: Q.DUPLICATE_PRODUCTIONS,
2308
2308
  ruleName: e.name,
@@ -2353,12 +2353,12 @@ function Gt(e, t, n, r) {
2353
2353
  return i.concat(a, o, s);
2354
2354
  }
2355
2355
  function Kt(e) {
2356
- return `${H(e)}_#_${e.idx}_#_${qt(e)}`;
2356
+ return `${V(e)}_#_${e.idx}_#_${qt(e)}`;
2357
2357
  }
2358
2358
  function qt(e) {
2359
- return e instanceof B ? e.terminalType.name : e instanceof j ? e.nonTerminalName : "";
2359
+ return e instanceof z ? e.terminalType.name : e instanceof A ? e.nonTerminalName : "";
2360
2360
  }
2361
- var Jt = class extends oe {
2361
+ var Jt = class extends se {
2362
2362
  constructor() {
2363
2363
  super(...arguments), this.allProductions = [];
2364
2364
  }
@@ -2411,18 +2411,18 @@ function Xt(e) {
2411
2411
  let t = [];
2412
2412
  if (e.length === 0) return t;
2413
2413
  let n = e[0];
2414
- if (n instanceof j) t.push(n.referencedRule);
2415
- else if (n instanceof N || n instanceof P || n instanceof F || n instanceof I || n instanceof R || n instanceof L) t = t.concat(Xt(n.definition));
2416
- else if (n instanceof z) t = n.definition.map((e) => Xt(e.definition)).flat();
2417
- else if (!(n instanceof B)) throw Error("non exhaustive match");
2418
- let r = se(n), i = e.length > 1;
2414
+ if (n instanceof A) t.push(n.referencedRule);
2415
+ else if (n instanceof M || n instanceof N || n instanceof P || n instanceof F || n instanceof L || n instanceof I) t = t.concat(Xt(n.definition));
2416
+ else if (n instanceof R) t = n.definition.map((e) => Xt(e.definition)).flat();
2417
+ else if (!(n instanceof z)) throw Error("non exhaustive match");
2418
+ let r = ce(n), i = e.length > 1;
2419
2419
  if (r && i) {
2420
2420
  let n = e.slice(1);
2421
2421
  return t.concat(Xt(n));
2422
2422
  }
2423
2423
  return t;
2424
2424
  }
2425
- var Zt = class extends oe {
2425
+ var Zt = class extends se {
2426
2426
  constructor() {
2427
2427
  super(...arguments), this.alternations = [];
2428
2428
  }
@@ -2456,7 +2456,7 @@ function Qt(e, t) {
2456
2456
  occurrenceStack: m.slice(0, -1)
2457
2457
  };
2458
2458
  d.push(e);
2459
- } else if (h instanceof B) {
2459
+ } else if (h instanceof z) {
2460
2460
  if (f < c - 1) {
2461
2461
  let e = f + 1;
2462
2462
  if (n(t[e], h.terminalType)) {
@@ -2477,7 +2477,7 @@ function Qt(e, t) {
2477
2477
  occurrenceStack: m
2478
2478
  }), s = !0;
2479
2479
  }
2480
- } else if (h instanceof j) {
2480
+ } else if (h instanceof A) {
2481
2481
  let e = [...p];
2482
2482
  e.push(h.nonTerminalName);
2483
2483
  let t = [...m];
@@ -2489,7 +2489,7 @@ function Qt(e, t) {
2489
2489
  occurrenceStack: t
2490
2490
  };
2491
2491
  d.push(n);
2492
- } else if (h instanceof P) {
2492
+ } else if (h instanceof N) {
2493
2493
  let e = {
2494
2494
  idx: f,
2495
2495
  def: r.slice(1),
@@ -2504,8 +2504,8 @@ function Qt(e, t) {
2504
2504
  occurrenceStack: m
2505
2505
  };
2506
2506
  d.push(t);
2507
- } else if (h instanceof F) {
2508
- let e = new L({
2507
+ } else if (h instanceof P) {
2508
+ let e = new I({
2509
2509
  definition: h.definition,
2510
2510
  idx: h.idx
2511
2511
  }), t = {
@@ -2515,9 +2515,9 @@ function Qt(e, t) {
2515
2515
  occurrenceStack: m
2516
2516
  };
2517
2517
  d.push(t);
2518
- } else if (h instanceof I) {
2519
- let e = new L({
2520
- definition: [new B({ terminalType: h.separator })].concat(h.definition),
2518
+ } else if (h instanceof F) {
2519
+ let e = new I({
2520
+ definition: [new z({ terminalType: h.separator })].concat(h.definition),
2521
2521
  idx: h.idx
2522
2522
  }), t = {
2523
2523
  idx: f,
@@ -2526,7 +2526,7 @@ function Qt(e, t) {
2526
2526
  occurrenceStack: m
2527
2527
  };
2528
2528
  d.push(t);
2529
- } else if (h instanceof R) {
2529
+ } else if (h instanceof L) {
2530
2530
  let e = {
2531
2531
  idx: f,
2532
2532
  def: r.slice(1),
@@ -2534,8 +2534,8 @@ function Qt(e, t) {
2534
2534
  occurrenceStack: m
2535
2535
  };
2536
2536
  d.push(e), d.push(o);
2537
- let t = new L({
2538
- definition: [new B({ terminalType: h.separator })].concat(h.definition),
2537
+ let t = new I({
2538
+ definition: [new z({ terminalType: h.separator })].concat(h.definition),
2539
2539
  idx: h.idx
2540
2540
  }), n = {
2541
2541
  idx: f,
@@ -2544,7 +2544,7 @@ function Qt(e, t) {
2544
2544
  occurrenceStack: m
2545
2545
  };
2546
2546
  d.push(n);
2547
- } else if (h instanceof L) {
2547
+ } else if (h instanceof I) {
2548
2548
  let e = {
2549
2549
  idx: f,
2550
2550
  def: r.slice(1),
@@ -2552,7 +2552,7 @@ function Qt(e, t) {
2552
2552
  occurrenceStack: m
2553
2553
  };
2554
2554
  d.push(e), d.push(o);
2555
- let t = new L({
2555
+ let t = new I({
2556
2556
  definition: h.definition,
2557
2557
  idx: h.idx
2558
2558
  }), n = {
@@ -2562,7 +2562,7 @@ function Qt(e, t) {
2562
2562
  occurrenceStack: m
2563
2563
  };
2564
2564
  d.push(n);
2565
- } else if (h instanceof z) for (let e = h.definition.length - 1; e >= 0; e--) {
2565
+ } else if (h instanceof R) for (let e = h.definition.length - 1; e >= 0; e--) {
2566
2566
  let t = {
2567
2567
  idx: f,
2568
2568
  def: h.definition[e].definition.concat(r.slice(1)),
@@ -2571,19 +2571,19 @@ function Qt(e, t) {
2571
2571
  };
2572
2572
  d.push(t), d.push(o);
2573
2573
  }
2574
- else if (h instanceof N) d.push({
2574
+ else if (h instanceof M) d.push({
2575
2575
  idx: f,
2576
2576
  def: h.definition.concat(r.slice(1)),
2577
2577
  ruleStack: p,
2578
2578
  occurrenceStack: m
2579
2579
  });
2580
2580
  else {
2581
- if (!(h instanceof M)) throw Error("non exhaustive match");
2581
+ if (!(h instanceof j)) throw Error("non exhaustive match");
2582
2582
  d.push(jt(h, f, p, m));
2583
2583
  }
2584
2584
  }
2585
2585
  return u;
2586
- }([r], [], Ze, 1).length === 0 ? [{
2586
+ }([r], [], Xe, 1).length === 0 ? [{
2587
2587
  message: t.buildEmptyAlternationError({
2588
2588
  topLevelRule: e,
2589
2589
  alternation: n,
@@ -2662,7 +2662,7 @@ function $t(e, t, n) {
2662
2662
  return o.concat(s);
2663
2663
  });
2664
2664
  }
2665
- var en = class extends oe {
2665
+ var en = class extends se {
2666
2666
  constructor() {
2667
2667
  super(...arguments), this.allProductions = [];
2668
2668
  }
@@ -2680,7 +2680,7 @@ var en = class extends oe {
2680
2680
  }
2681
2681
  };
2682
2682
  function tn(e) {
2683
- let t = Object.assign({ errMsgProvider: xt }, e), n = {};
2683
+ let t = Object.assign({ errMsgProvider: bt }, e), n = {};
2684
2684
  return e.rules.forEach((e) => {
2685
2685
  n[e.name] = e;
2686
2686
  }), function(e, t) {
@@ -2731,7 +2731,7 @@ function gn(e, t, n, r, i, a, o) {
2731
2731
  d = new a(this.getGAstProductions()[e], i).startWalking(), u[l] = d;
2732
2732
  }
2733
2733
  let f = d.token, p = d.occurrence, m = d.isEndOfRule;
2734
- this.RULE_STACK_IDX === 0 && m && f === void 0 && (f = Y, p = 1), f !== void 0 && p !== void 0 && this.shouldInRepetitionRecoveryBeTried(f, p, o) && this.tryInRepetitionRecovery(e, t, n, f);
2734
+ this.RULE_STACK_IDX === 0 && m && f === void 0 && (f = X, p = 1), f !== void 0 && p !== void 0 && this.shouldInRepetitionRecoveryBeTried(f, p, o) && this.tryInRepetitionRecovery(e, t, n, f);
2735
2735
  }
2736
2736
  var _n = 1024, vn = 1280, yn = 1536, bn = class {
2737
2737
  constructor(e) {
@@ -2751,13 +2751,13 @@ var _n = 1024, vn = 1280, yn = 1536, bn = class {
2751
2751
  return t;
2752
2752
  }
2753
2753
  validateNoLeftRecursion(e) {
2754
- return e.flatMap((e) => Yt(e, e, X));
2754
+ return e.flatMap((e) => Yt(e, e, xt));
2755
2755
  }
2756
2756
  validateEmptyOrAlternatives(e) {
2757
- return e.flatMap((e) => Qt(e, X));
2757
+ return e.flatMap((e) => Qt(e, xt));
2758
2758
  }
2759
2759
  validateAmbiguousAlternationAlternatives(e, t) {
2760
- return e.flatMap((e) => $t(e, t, X));
2760
+ return e.flatMap((e) => $t(e, t, xt));
2761
2761
  }
2762
2762
  validateSomeNonEmptyLookaheadPath(e, t) {
2763
2763
  return function(e, t, n) {
@@ -2779,21 +2779,21 @@ var _n = 1024, vn = 1280, yn = 1536, bn = class {
2779
2779
  }
2780
2780
  });
2781
2781
  }), r;
2782
- }(e, t, X);
2782
+ }(e, t, xt);
2783
2783
  }
2784
2784
  buildLookaheadForAlternation(e) {
2785
2785
  return function(e, t, n, r, i, a) {
2786
2786
  let o = Vt(e, t, n);
2787
- return a(o, r, Wt(o) ? Qe : Ze, i);
2787
+ return a(o, r, Wt(o) ? Ze : Xe, i);
2788
2788
  }(e.prodOccurrence, e.rule, e.maxLookahead, e.hasPredicates, e.dynamicTokensEnabled, Nt);
2789
2789
  }
2790
2790
  buildLookaheadForOptional(e) {
2791
2791
  return function(e, t, n, r, i, a) {
2792
- let o = Ht(e, t, i, n), s = Wt(o) ? Qe : Ze;
2792
+ let o = Ht(e, t, i, n), s = Wt(o) ? Ze : Xe;
2793
2793
  return a(o[0], s, r);
2794
2794
  }(e.prodOccurrence, e.rule, e.maxLookahead, e.dynamicTokensEnabled, Mt(e.prodType), Pt);
2795
2795
  }
2796
- }, xn = new class extends oe {
2796
+ }, xn = new class extends se {
2797
2797
  constructor() {
2798
2798
  super(...arguments), this.dslMethods = {
2799
2799
  option: [],
@@ -2886,12 +2886,12 @@ function Dn(e, t) {
2886
2886
  })(wn ||= {});
2887
2887
  var On = { description: "This Object indicates the Parser is during Recording Phase" };
2888
2888
  Object.freeze(On);
2889
- var kn = !0, An = J({
2889
+ var kn = !0, An = Y({
2890
2890
  name: "RECORDING_PHASE_TOKEN",
2891
- pattern: q.NA
2891
+ pattern: J.NA
2892
2892
  });
2893
- tt([An]);
2894
- var jn = yt(An, "This IToken indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details", -1, -1, -1, -1, -1, -1);
2893
+ et([An]);
2894
+ var jn = vt(An, "This IToken indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details", -1, -1, -1, -1, -1, -1);
2895
2895
  Object.freeze(jn);
2896
2896
  var Mn = {
2897
2897
  name: "This CSTNode indicates the Parser is in Recording Phase\n See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details",
@@ -2907,13 +2907,13 @@ function Nn(e, t, n, r = !1) {
2907
2907
  }
2908
2908
  function Pn(e, t) {
2909
2909
  In(t);
2910
- let n = this.recordingProdStack.at(-1), r = !1 === Array.isArray(e), i = !1 === r ? e : e.DEF, a = new z({
2910
+ let n = this.recordingProdStack.at(-1), r = !1 === Array.isArray(e), i = !1 === r ? e : e.DEF, a = new R({
2911
2911
  definition: [],
2912
2912
  idx: t,
2913
2913
  ignoreAmbiguities: r && !0 === e.IGNORE_AMBIGUITIES
2914
2914
  });
2915
2915
  return Object.hasOwn(e, "MAX_LOOKAHEAD") && (a.maxLookahead = e.MAX_LOOKAHEAD), a.hasPredicates = i.some((e) => typeof e.GATE == "function"), n.definition.push(a), i.forEach((e) => {
2916
- let t = new N({ definition: [] });
2916
+ let t = new M({ definition: [] });
2917
2917
  a.definition.push(t), Object.hasOwn(e, "IGNORE_AMBIGUITIES") ? t.ignoreAmbiguities = e.IGNORE_AMBIGUITIES : Object.hasOwn(e, "GATE") && (t.ignoreAmbiguities = !0), this.recordingProdStack.push(t), e.ALT.call(this), this.recordingProdStack.pop();
2918
2918
  }), On;
2919
2919
  }
@@ -2926,14 +2926,14 @@ function In(e) {
2926
2926
  throw t.KNOWN_RECORDER_ERROR = !0, t;
2927
2927
  }
2928
2928
  }
2929
- var Ln = yt(Y, "", -1, -1, -1, -1, -1, -1);
2929
+ var Ln = vt(X, "", -1, -1, -1, -1, -1, -1);
2930
2930
  Object.freeze(Ln);
2931
2931
  var Q, $ = Object.freeze({
2932
2932
  recoveryEnabled: !1,
2933
2933
  maxLookahead: 3,
2934
2934
  dynamicTokensEnabled: !1,
2935
2935
  outputCst: !0,
2936
- errorMessageProvider: bt,
2936
+ errorMessageProvider: yt,
2937
2937
  nodeLocationTracking: "none",
2938
2938
  traceInitPerf: !1,
2939
2939
  skipValidations: !1
@@ -2954,7 +2954,7 @@ var zn, Bn = class e {
2954
2954
  this.selfAnalysisDone = !0;
2955
2955
  let n = this.className;
2956
2956
  this.TRACE_INIT("toFastProps", () => {
2957
- ie(this);
2957
+ ae(this);
2958
2958
  }), this.TRACE_INIT("Grammar Recording", () => {
2959
2959
  try {
2960
2960
  this.enableRecording(), this.definedRulesNames.forEach((e) => {
@@ -2973,12 +2973,12 @@ var zn, Bn = class e {
2973
2973
  }), this.TRACE_INIT("Grammar Validations", () => {
2974
2974
  if (r.length === 0 && !1 === this.skipValidations) {
2975
2975
  let t = function(e) {
2976
- let t = e.errMsgProvider ?? X;
2976
+ let t = e.errMsgProvider ?? xt;
2977
2977
  return Gt(e.rules, e.tokenTypes, t, e.grammarName);
2978
2978
  }({
2979
2979
  rules: Object.values(this.gastProductionsCache),
2980
2980
  tokenTypes: Object.values(this.tokensMap),
2981
- errMsgProvider: X,
2981
+ errMsgProvider: xt,
2982
2982
  grammarName: n
2983
2983
  }), r = (e = {
2984
2984
  lookaheadStrategy: this.lookaheadStrategy,
@@ -2997,7 +2997,7 @@ var zn, Bn = class e {
2997
2997
  let e = function(e) {
2998
2998
  let t = {};
2999
2999
  return e.forEach((e) => {
3000
- let n = new fe(e).startWalking();
3000
+ let n = new pe(e).startWalking();
3001
3001
  Object.assign(t, n);
3002
3002
  }), t;
3003
3003
  }(Object.values(this.gastProductionsCache));
@@ -3021,7 +3021,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3021
3021
  this.firstAfterRepMap = [], this.resyncFollows = {}, this.recoveryEnabled = Object.hasOwn(e, "recoveryEnabled") ? e.recoveryEnabled : $.recoveryEnabled, this.recoveryEnabled && (this.attemptInRepetitionRecovery = gn);
3022
3022
  }
3023
3023
  getTokenToInsert(e) {
3024
- let t = yt(e, "", -1, -1, -1, -1, -1, -1);
3024
+ let t = vt(e, "", -1, -1, -1, -1, -1, -1);
3025
3025
  return t.isInsertedInRecovery = !0, t;
3026
3026
  }
3027
3027
  canTokenTypeBeInsertedInRecovery(e) {
@@ -3084,7 +3084,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3084
3084
  findReSyncTokenType() {
3085
3085
  let e = this.flattenFollowSet(), t = this.LA_FAST(1), n = 2;
3086
3086
  for (;;) {
3087
- let r = e.find((e) => Ze(t, e));
3087
+ let r = e.find((e) => Xe(t, e));
3088
3088
  if (r !== void 0) return r;
3089
3089
  t = this.LA(n), n++;
3090
3090
  }
@@ -3111,12 +3111,12 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3111
3111
  return this.buildFullFollowKeyStack().map((e) => this.getFollowSetFromFollowKey(e)).flat();
3112
3112
  }
3113
3113
  getFollowSetFromFollowKey(e) {
3114
- if (e === mn) return [Y];
3115
- let t = e.ruleName + e.idxInCallingRule + de + e.inRule;
3114
+ if (e === mn) return [X];
3115
+ let t = e.ruleName + e.idxInCallingRule + fe + e.inRule;
3116
3116
  return this.resyncFollows[t];
3117
3117
  }
3118
3118
  addToResyncTokens(e, t) {
3119
- return this.tokenMatcher(e, Y) || t.push(e), t;
3119
+ return this.tokenMatcher(e, X) || t.push(e), t;
3120
3120
  }
3121
3121
  reSyncTo(e) {
3122
3122
  let t = [], n = this.LA_FAST(1);
@@ -3152,7 +3152,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3152
3152
  }(e);
3153
3153
  t.forEach((t) => {
3154
3154
  let n = t.idx === 0 ? "" : t.idx;
3155
- this.TRACE_INIT(`${H(t)}${n}`, () => {
3155
+ this.TRACE_INIT(`${V(t)}${n}`, () => {
3156
3156
  let n = this.lookaheadStrategy.buildLookaheadForAlternation({
3157
3157
  prodOccurrence: t.idx,
3158
3158
  rule: e,
@@ -3163,15 +3163,15 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3163
3163
  this.setLaFuncCache(this.fullRuleNameToShort[e.name], 256 | t.idx, n);
3164
3164
  });
3165
3165
  }), n.forEach((t) => {
3166
- this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, H(t));
3166
+ this.computeLookaheadFunc(e, t.idx, 768, "Repetition", t.maxLookahead, V(t));
3167
3167
  }), r.forEach((t) => {
3168
- this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, H(t));
3168
+ this.computeLookaheadFunc(e, t.idx, 512, "Option", t.maxLookahead, V(t));
3169
3169
  }), i.forEach((t) => {
3170
- this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, H(t));
3170
+ this.computeLookaheadFunc(e, t.idx, _n, "RepetitionMandatory", t.maxLookahead, V(t));
3171
3171
  }), a.forEach((t) => {
3172
- this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, H(t));
3172
+ this.computeLookaheadFunc(e, t.idx, yn, "RepetitionMandatoryWithSeparator", t.maxLookahead, V(t));
3173
3173
  }), o.forEach((t) => {
3174
- this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, H(t));
3174
+ this.computeLookaheadFunc(e, t.idx, vn, "RepetitionWithSeparator", t.maxLookahead, V(t));
3175
3175
  });
3176
3176
  });
3177
3177
  });
@@ -3340,22 +3340,22 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3340
3340
  },
3341
3341
  class {
3342
3342
  initRecognizerEngine(e, t) {
3343
- if (this.className = this.constructor.name, this.shortRuleNameToFull = [], this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 0, this.tokenMatcher = Qe, this.subruleIdx = 0, this.currRuleShortName = -1, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_STACK_IDX = -1, this.RULE_OCCURRENCE_STACK = [], this.RULE_OCCURRENCE_STACK_IDX = -1, this.gastProductionsCache = {}, Object.hasOwn(t, "serializedGrammar")) throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");
3343
+ if (this.className = this.constructor.name, this.shortRuleNameToFull = [], this.fullRuleNameToShort = {}, this.ruleShortNameIdx = 0, this.tokenMatcher = Ze, this.subruleIdx = 0, this.currRuleShortName = -1, this.definedRulesNames = [], this.tokensMap = {}, this.isBackTrackingStack = [], this.RULE_STACK = [], this.RULE_STACK_IDX = -1, this.RULE_OCCURRENCE_STACK = [], this.RULE_OCCURRENCE_STACK_IDX = -1, this.gastProductionsCache = {}, Object.hasOwn(t, "serializedGrammar")) throw Error("The Parser's configuration can no longer contain a <serializedGrammar> property.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0\n For Further details.");
3344
3344
  if (Array.isArray(e)) {
3345
3345
  if (e.length === 0) throw Error("A Token Vocabulary cannot be empty.\n Note that the first argument for the parser constructor\n is no longer a Token vector (since v4.0).");
3346
3346
  if (typeof e[0].startOffset == "number") throw Error("The Parser constructor no longer accepts a token vector as the first argument.\n See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0\n For Further details.");
3347
3347
  }
3348
3348
  if (Array.isArray(e)) this.tokensMap = e.reduce((e, t) => (e[t.name] = t, e), {});
3349
- else if (Object.hasOwn(e, "modes") && Object.values(e.modes).flat().every(at)) {
3349
+ else if (Object.hasOwn(e, "modes") && Object.values(e.modes).flat().every(it)) {
3350
3350
  let t = Object.values(e.modes).flat(), n = [...new Set(t)];
3351
3351
  this.tokensMap = n.reduce((e, t) => (e[t.name] = t, e), {});
3352
3352
  } else {
3353
3353
  if (typeof e != "object" || !e) throw Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");
3354
3354
  this.tokensMap = Object.assign({}, e);
3355
3355
  }
3356
- this.tokensMap.EOF = Y;
3356
+ this.tokensMap.EOF = X;
3357
3357
  let n = (Object.hasOwn(e, "modes") ? Object.values(e.modes).flat() : Object.values(e)).every((e) => e.categoryMatches?.length == 0);
3358
- this.tokenMatcher = n ? Qe : Ze, tt(Object.values(this.tokensMap));
3358
+ this.tokenMatcher = n ? Ze : Xe, et(Object.values(this.tokensMap));
3359
3359
  }
3360
3360
  defineRule(e, t, n) {
3361
3361
  if (this.selfAnalysisDone) throw Error(`Grammar rule <${e}> may not be defined after the 'performSelfAnalysis' method has been called'\nMake sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);
@@ -3602,7 +3602,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3602
3602
  return this.shortRuleNameToFull[e];
3603
3603
  }
3604
3604
  isAtEndOfInput() {
3605
- return this.tokenMatcher(this.LA(1), Y);
3605
+ return this.tokenMatcher(this.LA(1), X);
3606
3606
  }
3607
3607
  reset() {
3608
3608
  this.resetLexerState(), this.subruleIdx = 0, this.currRuleShortName = -1, this.currRuleLookaheadFuncs = [], this.isBackTrackingStack = [], this.errors = [], this.RULE_STACK_IDX = -1, this.RULE_OCCURRENCE_STACK_IDX = -1, this.CST_STACK = [];
@@ -3886,7 +3886,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3886
3886
  RULE(e, t, n = Rn) {
3887
3887
  if (this.definedRulesNames.includes(e)) {
3888
3888
  let t = {
3889
- message: X.buildDuplicateRuleNameError({
3889
+ message: xt.buildDuplicateRuleNameError({
3890
3890
  topLevelRule: e,
3891
3891
  grammarName: this.className
3892
3892
  }),
@@ -3931,7 +3931,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
3931
3931
  return this.gastProductionsCache;
3932
3932
  }
3933
3933
  getSerializedGastProductions() {
3934
- return Object.values(this.gastProductionsCache).map(ae);
3934
+ return Object.values(this.gastProductionsCache).map(oe);
3935
3935
  }
3936
3936
  },
3937
3937
  class {
@@ -4036,7 +4036,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
4036
4036
  }
4037
4037
  topLevelRuleRecord(e, t) {
4038
4038
  try {
4039
- let n = new M({
4039
+ let n = new j({
4040
4040
  definition: [],
4041
4041
  name: e
4042
4042
  });
@@ -4051,19 +4051,19 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
4051
4051
  }
4052
4052
  }
4053
4053
  optionInternalRecord(e, t) {
4054
- return Nn.call(this, P, e, t);
4054
+ return Nn.call(this, N, e, t);
4055
4055
  }
4056
4056
  atLeastOneInternalRecord(e, t) {
4057
- Nn.call(this, F, t, e);
4057
+ Nn.call(this, P, t, e);
4058
4058
  }
4059
4059
  atLeastOneSepFirstInternalRecord(e, t) {
4060
- Nn.call(this, I, t, e, kn);
4060
+ Nn.call(this, F, t, e, kn);
4061
4061
  }
4062
4062
  manyInternalRecord(e, t) {
4063
- Nn.call(this, L, t, e);
4063
+ Nn.call(this, I, t, e);
4064
4064
  }
4065
4065
  manySepFirstInternalRecord(e, t) {
4066
- Nn.call(this, R, t, e, kn);
4066
+ Nn.call(this, L, t, e, kn);
4067
4067
  }
4068
4068
  orInternalRecord(e, t) {
4069
4069
  return Pn.call(this, e, t);
@@ -4073,7 +4073,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
4073
4073
  let n = /* @__PURE__ */ Error(`<SUBRULE${Fn(t)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);
4074
4074
  throw n.KNOWN_RECORDER_ERROR = !0, n;
4075
4075
  }
4076
- let r = this.recordingProdStack.at(-1), i = e.ruleName, a = new j({
4076
+ let r = this.recordingProdStack.at(-1), i = e.ruleName, a = new A({
4077
4077
  idx: t,
4078
4078
  nonTerminalName: i,
4079
4079
  label: n?.LABEL,
@@ -4082,11 +4082,11 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
4082
4082
  return r.definition.push(a), this.outputCst ? Mn : On;
4083
4083
  }
4084
4084
  consumeInternalRecord(e, t, n) {
4085
- if (In(t), !rt(e)) {
4085
+ if (In(t), !nt(e)) {
4086
4086
  let n = /* @__PURE__ */ Error(`<CONSUME${Fn(t)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(e)}>\n inside top level rule: <${this.recordingProdStack[0].name}>`);
4087
4087
  throw n.KNOWN_RECORDER_ERROR = !0, n;
4088
4088
  }
4089
- let r = this.recordingProdStack.at(-1), i = new B({
4089
+ let r = this.recordingProdStack.at(-1), i = new z({
4090
4090
  idx: t,
4091
4091
  terminalType: e,
4092
4092
  label: n?.LABEL
@@ -4107,7 +4107,7 @@ Bn.DEFER_DEFINITION_ERRORS_HANDLING = !1, zn = Bn, [
4107
4107
  this.traceInitIndent++;
4108
4108
  let n = Array(this.traceInitIndent + 1).join(" ");
4109
4109
  this.traceInitIndent < this.traceInitMaxIdent && console.log(`${n}--\x3e <${e}>`);
4110
- let { time: r, value: i } = re(t), a = r > 10 ? console.warn : console.log;
4110
+ let { time: r, value: i } = ie(t), a = r > 10 ? console.warn : console.log;
4111
4111
  return this.traceInitIndent < this.traceInitMaxIdent && a(`${n}<-- <${e}> time: ${r}ms`), this.traceInitIndent--, i;
4112
4112
  }
4113
4113
  return t();
@@ -4128,7 +4128,7 @@ var Vn = class extends Bn {
4128
4128
  }
4129
4129
  }, Hn = class e {
4130
4130
  static shared(t) {
4131
- let n = t?.locale ?? b, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4131
+ let n = t?.locale ?? m, r = t?.maxColumn ?? Kn, i = t?.maxRow ?? qn, a = Gn.get(n);
4132
4132
  a || (a = /* @__PURE__ */ new Map(), Gn.set(n, a));
4133
4133
  let o = `${r}:${i}`, s = a.get(o);
4134
4134
  return s || (s = new e({
@@ -4138,32 +4138,32 @@ var Vn = class extends Bn {
4138
4138
  }), a.set(o, s)), s;
4139
4139
  }
4140
4140
  constructor(e) {
4141
- let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? b;
4141
+ let t = e?.maxColumn ?? Kn, n = e?.maxRow ?? qn, r = e?.locale ?? m;
4142
4142
  this._locale = r, this._maxColumn = t, this._maxRow = n;
4143
4143
  let { separatorFunction: i, separatorColumn: a, separatorRow: o, separatorDecimal: s } = r.separators;
4144
4144
  if (a === o) throw Error(`FormulaLexer: separatorColumn and separatorRow must differ (both '${a}')`);
4145
- let c = J({
4145
+ let c = Y({
4146
4146
  name: "WhiteSpace",
4147
4147
  pattern: /[ \n\v\f\r\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,
4148
- group: q.SKIPPED
4149
- }), l = J({
4148
+ group: J.SKIPPED
4149
+ }), l = Y({
4150
4150
  name: "StringToken",
4151
4151
  pattern: /"(""|[^"])*"/
4152
- }), u = J({
4152
+ }), u = Y({
4153
4153
  name: "FunctionToken",
4154
4154
  pattern: /[a-zA-Z_\u007F-\uFFFF]+[a-zA-Z0-9_.\u007F-\uFFFF]*(?=\()/
4155
- }), d = J({
4155
+ }), d = Y({
4156
4156
  name: "TableReference",
4157
- pattern: { exec: y },
4157
+ pattern: { exec: te },
4158
4158
  line_breaks: !1,
4159
4159
  start_chars_hint: Wn
4160
- }), f = J({
4160
+ }), f = Y({
4161
4161
  name: "BracketedString",
4162
4162
  pattern: { exec: _ },
4163
4163
  line_breaks: !1,
4164
4164
  start_chars_hint: [91],
4165
4165
  longer_alt: [d, l]
4166
- }), p = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), m = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), h = J({
4166
+ }), p = (e) => (e ?? []).map((e) => e?.trim()).filter(Boolean).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).map((e) => e + "|").join(""), h = (e) => e.replace(/[A-Za-z]/g, (e) => `[${e.toUpperCase()}${e.toLowerCase()}]`), g = Y({
4167
4167
  name: "LiteralError",
4168
4168
  pattern: new RegExp(p(r.errorLiterals) + [
4169
4169
  "#PARSE!",
@@ -4182,202 +4182,202 @@ var Vn = class extends Bn {
4182
4182
  "#BUSY!",
4183
4183
  "#PYTHON!",
4184
4184
  "#TIMEOUT!"
4185
- ].map(m).join("|"))
4186
- }), g = J({
4185
+ ].map(h).join("|"))
4186
+ }), v = Y({
4187
4187
  name: "RefError",
4188
- pattern: new RegExp(p(r.errorRefs) + ["#REF!", "#NAME\\?"].map(m).join("|"))
4189
- }), v = J({
4188
+ pattern: new RegExp(p(r.errorRefs) + ["#REF!", "#NAME\\?"].map(h).join("|"))
4189
+ }), y = Y({
4190
4190
  name: "SingleQuotedString",
4191
4191
  pattern: /'(''|[^'])*'/
4192
- }), ee = J({
4192
+ }), ee = Y({
4193
4193
  name: "SheetQuoted",
4194
4194
  pattern: /'(?:''|[^'])*?'!/
4195
- }), x = J({
4195
+ }), b = Y({
4196
4196
  name: "Sheet",
4197
4197
  pattern: /[A-Za-z_.\d\u007F-\uFFFF]*!/
4198
- }), S = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, C = J({
4198
+ }), x = /[a-zA-Z_\\\u007F-\uFFFF][a-zA-Z0-9_.?\\\u007F-\uFFFF]*:?/y, S = Y({
4199
4199
  name: "NamedToken",
4200
4200
  pattern: { exec: (e, t) => {
4201
- S.lastIndex = t;
4202
- let n = S.exec(e);
4201
+ x.lastIndex = t;
4202
+ let n = x.exec(e);
4203
4203
  if (!n) return null;
4204
4204
  let r = n[0], i = r.indexOf(".:");
4205
4205
  return i === -1 ? r.endsWith(":") && (r = r.slice(0, -1)) : r = r.substring(0, i), [r];
4206
4206
  } },
4207
4207
  line_breaks: !1,
4208
4208
  start_chars_hint: Wn
4209
- }), w = J({
4209
+ }), C = Y({
4210
4210
  name: "Cell",
4211
4211
  pattern: { exec: Xn(t, n) },
4212
4212
  line_breaks: !1,
4213
4213
  start_chars_hint: [36, ...Un],
4214
- longer_alt: C
4215
- }), T = J({
4214
+ longer_alt: S
4215
+ }), w = Y({
4216
4216
  name: "Column",
4217
4217
  pattern: { exec: Yn(t) },
4218
4218
  line_breaks: !1,
4219
4219
  start_chars_hint: [36, ...Un],
4220
- longer_alt: C
4221
- }), te = J({
4220
+ longer_alt: S
4221
+ }), ne = Y({
4222
4222
  name: "AbsRow",
4223
4223
  pattern: /[$][0-9]+/
4224
- }), E = s === "." ? "\\." : s, ne = J({
4224
+ }), T = s === "." ? "\\." : s, re = Y({
4225
4225
  name: "NumberToken",
4226
- pattern: RegExp(`[0-9]+${E}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${E}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4227
- }), D = J({
4226
+ pattern: RegExp(`[0-9]+${T}(?!:)[0-9]*([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|${T}[0-9]+([eE][+-]?[0-9]+|\\*\\*[+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+`)
4227
+ }), E = Y({
4228
4228
  name: "ScientificDigit",
4229
4229
  pattern: /[0-9]+\*\*[+-]?[0-9]+/
4230
- }), O = J({
4230
+ }), D = Y({
4231
4231
  name: "DigitToken",
4232
4232
  pattern: /[0-9]+/
4233
- }), k = ["TRUE", "FALSE"];
4233
+ }), O = ["TRUE", "FALSE"];
4234
4234
  for (let e of [r.booleanTrue, r.booleanFalse]) {
4235
4235
  let t = e?.trim();
4236
- t && !k.some((e) => e.toLowerCase() === t.toLowerCase()) && k.push(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
4236
+ t && !O.some((e) => e.toLowerCase() === t.toLowerCase()) && O.push(t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
4237
4237
  }
4238
- let re = J({
4238
+ let ie = Y({
4239
4239
  name: "BooleanToken",
4240
- pattern: new RegExp(k.join("|"), "i")
4241
- }), ie = J({
4240
+ pattern: new RegExp(O.join("|"), "i")
4241
+ }), ae = Y({
4242
4242
  name: "ArgSeparator",
4243
4243
  pattern: Zn(i)
4244
- }), A = J({
4244
+ }), k = Y({
4245
4245
  name: "ColSeparator",
4246
4246
  pattern: Zn(a)
4247
- }), j = J({
4247
+ }), A = Y({
4248
4248
  name: "RowSeparator",
4249
4249
  pattern: Zn(o)
4250
- }), M = J({
4250
+ }), j = Y({
4251
4251
  name: "RangeOp",
4252
4252
  pattern: /:/
4253
- }), N = J({
4253
+ }), M = Y({
4254
4254
  name: "RangeTrimFullOp",
4255
4255
  pattern: /\.:\./
4256
- }), P = J({
4256
+ }), N = Y({
4257
4257
  name: "RangeTrimLeadingOp",
4258
4258
  pattern: /\.:/
4259
- }), F = J({
4259
+ }), P = Y({
4260
4260
  name: "RangeTrimTrailingOp",
4261
4261
  pattern: /:\./
4262
- }), I = J({
4262
+ }), F = Y({
4263
4263
  name: "OpenParen",
4264
4264
  pattern: /\(/
4265
- }), L = J({
4265
+ }), I = Y({
4266
4266
  name: "CloseParen",
4267
4267
  pattern: /\)/
4268
- }), R = J({
4268
+ }), L = Y({
4269
4269
  name: "OpenCurlyParen",
4270
4270
  pattern: /{/
4271
- }), z = J({
4271
+ }), R = Y({
4272
4272
  name: "CloseCurlyParen",
4273
4273
  pattern: /}/
4274
- }), B = J({
4274
+ }), z = Y({
4275
4275
  name: "QuoteS",
4276
4276
  pattern: /'/
4277
- }), ae = J({
4277
+ }), oe = Y({
4278
4278
  name: "MulOp",
4279
4279
  pattern: /\*(?!\*)/
4280
- }), V = J({
4280
+ }), B = Y({
4281
4281
  name: "PlusOp",
4282
4282
  pattern: /\+/
4283
- }), oe = J({
4283
+ }), se = Y({
4284
4284
  name: "DivOp",
4285
4285
  pattern: /\//
4286
- }), se = J({
4286
+ }), ce = Y({
4287
4287
  name: "MinOp",
4288
4288
  pattern: /-/
4289
- }), H = J({
4289
+ }), V = Y({
4290
4290
  name: "ImplicitIntersectOp",
4291
4291
  pattern: /@/
4292
- }), ce = J({
4292
+ }), le = Y({
4293
4293
  name: "ConcatOp",
4294
4294
  pattern: /&/
4295
- }), le = J({
4295
+ }), ue = Y({
4296
4296
  name: "ExOp",
4297
4297
  pattern: /\^/
4298
- }), ue = J({
4298
+ }), de = Y({
4299
4299
  name: "PercentOp",
4300
4300
  pattern: /%/
4301
- }), de = J({
4301
+ }), fe = Y({
4302
4302
  name: "ArrayAnchorOp",
4303
4303
  pattern: /#/,
4304
- longer_alt: [h, g]
4305
- }), fe = J({
4304
+ longer_alt: [g, v]
4305
+ }), pe = Y({
4306
4306
  name: "GtOp",
4307
4307
  pattern: />/
4308
- }), U = J({
4308
+ }), H = Y({
4309
4309
  name: "EqOp",
4310
4310
  pattern: /=/
4311
- }), pe = J({
4311
+ }), me = Y({
4312
4312
  name: "LtOp",
4313
4313
  pattern: /</
4314
- }), me = [
4314
+ }), U = [
4315
4315
  c,
4316
4316
  l,
4317
4317
  ee,
4318
- v,
4319
- x,
4318
+ y,
4319
+ b,
4320
4320
  u,
4321
4321
  d,
4322
4322
  f,
4323
- h,
4324
4323
  g,
4325
- ie,
4326
- ...a === i ? [] : [A],
4327
- j,
4324
+ v,
4325
+ ae,
4326
+ ...a === i ? [] : [k],
4327
+ A,
4328
+ M,
4328
4329
  N,
4329
4330
  P,
4330
- F,
4331
- M,
4331
+ j,
4332
+ C,
4333
+ ie,
4332
4334
  w,
4333
- re,
4334
- T,
4335
- te,
4336
4335
  ne,
4336
+ re,
4337
+ E,
4337
4338
  D,
4338
- O,
4339
- de,
4340
- H,
4341
- C,
4339
+ fe,
4340
+ V,
4341
+ S,
4342
+ F,
4342
4343
  I,
4343
4344
  L,
4344
4345
  R,
4345
4346
  z,
4346
- B,
4347
- ae,
4348
- V,
4349
4347
  oe,
4348
+ B,
4350
4349
  se,
4351
4350
  ce,
4352
4351
  le,
4353
4352
  ue,
4354
- J({
4353
+ de,
4354
+ Y({
4355
4355
  name: "NeqOp",
4356
4356
  pattern: /<>/
4357
4357
  }),
4358
- J({
4358
+ Y({
4359
4359
  name: "GteOp",
4360
4360
  pattern: />=/
4361
4361
  }),
4362
- J({
4362
+ Y({
4363
4363
  name: "LteOp",
4364
4364
  pattern: /<=/
4365
4365
  }),
4366
- fe,
4367
- U,
4368
- pe
4366
+ pe,
4367
+ H,
4368
+ me
4369
4369
  ];
4370
- this._lexer = new q(me, { ensureOptimizations: !0 });
4370
+ this._lexer = new J(U, { ensureOptimizations: !0 });
4371
4371
  let W = {};
4372
- me.forEach((e) => {
4372
+ U.forEach((e) => {
4373
4373
  W[e.name] = e;
4374
- }), a === i && (W.ColSeparator = ie), this._vocabulary = W;
4374
+ }), a === i && (W.ColSeparator = ae), this._vocabulary = W;
4375
4375
  }
4376
4376
  tokenize(e, t = !0) {
4377
4377
  let n = this._lexer.tokenize(e);
4378
4378
  if (t && n.errors.length > 0) {
4379
4379
  let t = n.errors[0], r = t.line, i = t.column, a = e.substr(t.offset, t.length || 1), o = a ? `Unexpected character '${a}'` : t.message;
4380
- throw new D.Parse(o, {
4380
+ throw new E.Parse(o, {
4381
4381
  line: r,
4382
4382
  column: i,
4383
4383
  offset: t.offset,
@@ -4469,47 +4469,47 @@ function Zn(e) {
4469
4469
  return new RegExp(e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"));
4470
4470
  }
4471
4471
  var Qn = class {
4472
- constructor(e = b) {
4472
+ constructor(e = m) {
4473
4473
  let t = function(e) {
4474
- let t = [...s];
4474
+ let t = [...n];
4475
4475
  if (e) for (let n of Object.values(e)) {
4476
4476
  let e = n?.trim();
4477
4477
  e && !t.some((t) => t.toLowerCase() === e.toLowerCase()) && t.push(e);
4478
4478
  }
4479
4479
  return t.sort((e, t) => t.length - e.length), t.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|");
4480
- }(e.specifiers), n = J({
4480
+ }(e.specifiers), r = Y({
4481
4481
  name: "WhiteSpace",
4482
4482
  pattern: /\s+/,
4483
- group: q.SKIPPED
4484
- }), r = J({
4483
+ group: J.SKIPPED
4484
+ }), i = Y({
4485
4485
  name: "TableSpecifier",
4486
4486
  pattern: RegExp(`\\[#(?:${t})\\]`, "i")
4487
- }), i = [
4488
- n,
4487
+ }), a = [
4489
4488
  r,
4490
- J({
4489
+ i,
4490
+ Y({
4491
4491
  name: "BracketedColumn",
4492
4492
  pattern: /\[(?:'['#[\]]|'(?!['#[\]])|[^'[\]])*\]/,
4493
- longer_alt: [r]
4493
+ longer_alt: [i]
4494
4494
  }),
4495
- J({
4495
+ Y({
4496
4496
  name: "BareSpecifier",
4497
4497
  pattern: RegExp(`#(?:${t})`, "i")
4498
4498
  }),
4499
- J({
4499
+ Y({
4500
4500
  name: "ColumnSep",
4501
4501
  pattern: /:/
4502
4502
  }),
4503
- J({
4503
+ Y({
4504
4504
  name: "ListSep",
4505
4505
  pattern: new RegExp(e.separators.separatorFunction.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"))
4506
4506
  })
4507
4507
  ];
4508
- this._lexer = new q(i, { ensureOptimizations: !0 });
4509
- let a = {};
4510
- i.forEach((e) => {
4511
- a[e.name] = e;
4512
- }), this._vocabulary = a;
4508
+ this._lexer = new J(a, { ensureOptimizations: !0 });
4509
+ let o = {};
4510
+ a.forEach((e) => {
4511
+ o[e.name] = e;
4512
+ }), this._vocabulary = o;
4513
4513
  }
4514
4514
  getVocabulary() {
4515
4515
  return this._vocabulary;
@@ -4518,7 +4518,7 @@ var Qn = class {
4518
4518
  return this._lexer.tokenize(e);
4519
4519
  }
4520
4520
  }, $n = class extends Vn {
4521
- constructor(e = b) {
4521
+ constructor(e = m) {
4522
4522
  let t = new Qn(e), n = t.getVocabulary();
4523
4523
  super(n, {
4524
4524
  nodeLocationTracking: "none",
@@ -4526,82 +4526,82 @@ var Qn = class {
4526
4526
  skipValidations: !0,
4527
4527
  recoveryEnabled: !1
4528
4528
  }), this._lexer = t;
4529
- let { TableSpecifier: r, BracketedColumn: i, BareSpecifier: a, ColumnSep: s, ListSep: c } = n, l = this;
4530
- l.RULE("ruleContent", () => {
4531
- let e = [], t = l.SUBRULE(l.ruleItem);
4532
- return l.ACTION(() => {
4529
+ let { TableSpecifier: r, BracketedColumn: i, BareSpecifier: a, ColumnSep: o, ListSep: s } = n, c = this;
4530
+ c.RULE("ruleContent", () => {
4531
+ let e = [], t = c.SUBRULE(c.ruleItem);
4532
+ return c.ACTION(() => {
4533
4533
  t && e.push(t);
4534
- }), l.MANY(() => {
4535
- l.CONSUME(c), l.OPTION(() => {
4536
- let t = l.SUBRULE2(l.ruleItem);
4537
- l.ACTION(() => {
4534
+ }), c.MANY(() => {
4535
+ c.CONSUME(s), c.OPTION(() => {
4536
+ let t = c.SUBRULE2(c.ruleItem);
4537
+ c.ACTION(() => {
4538
4538
  t && e.push(t);
4539
4539
  });
4540
4540
  });
4541
4541
  }), e;
4542
- }), l.RULE("ruleItem", () => l.OR([{ ALT: () => l.SUBRULE(l.ruleSpecifier) }, { ALT: () => l.SUBRULE(l.ruleColumnOrRange) }])), l.RULE("ruleSpecifier", () => l.OR([{ ALT: () => {
4543
- let t = l.CONSUME(r);
4544
- return l.ACTION(() => {
4545
- let n = C(t.image, e);
4542
+ }), c.RULE("ruleItem", () => c.OR([{ ALT: () => c.SUBRULE(c.ruleSpecifier) }, { ALT: () => c.SUBRULE(c.ruleColumnOrRange) }])), c.RULE("ruleSpecifier", () => c.OR([{ ALT: () => {
4543
+ let t = c.CONSUME(r);
4544
+ return c.ACTION(() => {
4545
+ let n = w(t.image, e);
4546
4546
  return n.image = t.image, n;
4547
4547
  });
4548
4548
  } }, { ALT: () => {
4549
- let t = l.CONSUME(a);
4550
- return l.ACTION(() => {
4551
- let n = C(t.image, e);
4549
+ let t = c.CONSUME(a);
4550
+ return c.ACTION(() => {
4551
+ let n = w(t.image, e);
4552
4552
  return n.image = t.image, n;
4553
4553
  });
4554
- } }])), l.RULE("ruleColumnOrRange", () => {
4555
- let e = l.CONSUME(i), t, n;
4556
- return l.OPTION(() => {
4557
- t = l.CONSUME(s), n = l.CONSUME2(i);
4558
- }), l.ACTION(() => {
4559
- let r = x(e.image);
4554
+ } }])), c.RULE("ruleColumnOrRange", () => {
4555
+ let e = c.CONSUME(i), t, n;
4556
+ return c.OPTION(() => {
4557
+ t = c.CONSUME(o), n = c.CONSUME2(i);
4558
+ }), c.ACTION(() => {
4559
+ let r = h(e.image);
4560
4560
  if (r.image = e.image, !n) return r;
4561
- let i = x(n.image);
4561
+ let i = h(n.image);
4562
4562
  i.image = n.image;
4563
- let a = o(":", r, i, !0);
4563
+ let a = S(":", r, i, !0);
4564
4564
  return a.image = t?.image ?? ":", a;
4565
4565
  });
4566
- }), l.performSelfAnalysis();
4566
+ }), c.performSelfAnalysis();
4567
4567
  }
4568
4568
  _parseInner(e) {
4569
4569
  let t = this._lexer.tokenize(e);
4570
4570
  return t.errors.length > 0 || t.tokens.length === 0 ? [] : (this.input = t.tokens, this.reset(), this.ruleContent() ?? []);
4571
4571
  }
4572
- _parseContent(t) {
4572
+ _parseContent(e) {
4573
+ if (!e) return [];
4574
+ let t = e.trim();
4573
4575
  if (!t) return [];
4574
- let n = t.trim();
4575
- if (!n) return [];
4576
- let r = n[0];
4577
- if (r === "@") {
4578
- let t = n.slice(1).trim();
4579
- if (!t) {
4580
- let t = e("@", null, !0);
4581
- return t.image = "@", [t];
4576
+ let n = t[0];
4577
+ if (n === "@") {
4578
+ let e = t.slice(1).trim();
4579
+ if (!e) {
4580
+ let e = g("@", null, !0);
4581
+ return e.image = "@", [e];
4582
4582
  }
4583
- if (t.charAt(0) === "[") {
4584
- let n = this._parseInner(t);
4585
- if (n.length === 1 && n[0].type === "infix") {
4586
- let t = e("@", n[0], !0);
4587
- return t.image = "@", [t];
4583
+ if (e.charAt(0) === "[") {
4584
+ let t = this._parseInner(e);
4585
+ if (t.length === 1 && t[0].type === "infix") {
4586
+ let e = g("@", t[0], !0);
4587
+ return e.image = "@", [e];
4588
4588
  }
4589
4589
  }
4590
- let r = x(t);
4591
- r.image = t;
4592
- let i = e("@", r, !0);
4593
- return i.image = "@", [i];
4590
+ let n = h(e);
4591
+ n.image = e;
4592
+ let r = g("@", n, !0);
4593
+ return r.image = "@", [r];
4594
4594
  }
4595
- if (r !== "[" && r !== "#") {
4596
- let e = x(t);
4597
- return e.image = t, [e];
4595
+ if (n !== "[" && n !== "#") {
4596
+ let t = h(e);
4597
+ return t.image = e, [t];
4598
4598
  }
4599
- return this._parseInner(n);
4599
+ return this._parseInner(t);
4600
4600
  }
4601
4601
  parse(e, t, n) {
4602
4602
  this.reset();
4603
4603
  let r = () => ({
4604
- root: h("", []),
4604
+ root: x("", []),
4605
4605
  errors: []
4606
4606
  });
4607
4607
  if (!n) return r();
@@ -4614,7 +4614,7 @@ var Qn = class {
4614
4614
  if (a === -1) return r();
4615
4615
  let o = n.slice(0, a), s = n.slice(a + 1, -1), c = this._parseContent(s);
4616
4616
  return {
4617
- root: h(o, c),
4617
+ root: x(o, c),
4618
4618
  errors: this.errors.length > 0 ? [...this.errors] : []
4619
4619
  };
4620
4620
  }
@@ -4629,7 +4629,7 @@ var Qn = class {
4629
4629
  ":."
4630
4630
  ]), nr = (e) => {
4631
4631
  if (!e) return null;
4632
- if (e.type === g.Cell) {
4632
+ if (e.type === T.Cell) {
4633
4633
  let t = e.value;
4634
4634
  return t.rowIndex === -(2 ** 53 - 1) ? "col" : t.colIndex === -(2 ** 53 - 1) ? "row" : null;
4635
4635
  }
@@ -4647,135 +4647,141 @@ function or(e, t) {
4647
4647
  return `Unexpected '${n}'`;
4648
4648
  }
4649
4649
  var sr = {
4650
- ...bt,
4650
+ ...yt,
4651
4651
  buildNoViableAltMessage: (e) => or(e.actual, e.previous),
4652
4652
  buildEarlyExitMessage: (e) => or(e.actual, e.previous),
4653
4653
  buildNotAllInputParsedMessage: (e) => {
4654
4654
  let t = e.firstRedundant?.image;
4655
- return t ? `Unexpected '${t}'` : bt.buildNotAllInputParsedMessage(e);
4655
+ return t ? `Unexpected '${t}'` : yt.buildNotAllInputParsedMessage(e);
4656
4656
  },
4657
4657
  buildMismatchTokenMessage: (e) => {
4658
4658
  let t = e.actual?.image;
4659
- return e.expected === Y && t ? `Unexpected '${t}'` : bt.buildMismatchTokenMessage(e);
4659
+ return e.expected === X && t ? `Unexpected '${t}'` : yt.buildMismatchTokenMessage(e);
4660
4660
  }
4661
4661
  }, cr = class extends Vn {
4662
- constructor(s) {
4663
- let l = s?.lexer ?? Hn.shared(s?.lexerOptions), h = l.getVocabulary();
4662
+ constructor(n) {
4663
+ let m = n?.lexer ?? Hn.shared(n?.lexerOptions), h = m.getVocabulary();
4664
4664
  super(h, {
4665
4665
  skipValidations: !0,
4666
4666
  recoveryEnabled: !0,
4667
- ...s,
4667
+ ...n,
4668
4668
  nodeLocationTracking: "full",
4669
4669
  errorMessageProvider: sr,
4670
4670
  maxLookahead: 1
4671
4671
  }), this._ruleInfixOp = this.RULE("ruleInfixOp", () => {
4672
- let { PlusOp: e, MinOp: t, MulOp: n, DivOp: r, ExOp: a, ConcatOp: s, GtOp: c, EqOp: l, LtOp: u, NeqOp: d, GteOp: f, LteOp: p } = this._vocab, m = [];
4673
- return m.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
- let i = this.OR(this._c1 ||= [
4672
+ let { PlusOp: e, MinOp: t, MulOp: n, DivOp: r, ExOp: i, ConcatOp: a, GtOp: s, EqOp: c, LtOp: l, NeqOp: u, GteOp: d, LteOp: f } = this._vocab, p = [];
4673
+ return p.push({ node: this.SUBRULE(this._rulePostfixOp) }), this.MANY(() => {
4674
+ let o = this.OR(this._c1 ||= [
4675
4675
  { ALT: () => this.CONSUME(e).image },
4676
4676
  { ALT: () => this.CONSUME(t).image },
4677
4677
  { ALT: () => this.CONSUME(n).image },
4678
4678
  { ALT: () => this.CONSUME(r).image },
4679
+ { ALT: () => this.CONSUME(i).image },
4679
4680
  { ALT: () => this.CONSUME(a).image },
4680
4681
  { ALT: () => this.CONSUME(s).image },
4681
4682
  { ALT: () => this.CONSUME(c).image },
4682
4683
  { ALT: () => this.CONSUME(l).image },
4683
4684
  { ALT: () => this.CONSUME(u).image },
4684
4685
  { ALT: () => this.CONSUME(d).image },
4685
- { ALT: () => this.CONSUME(f).image },
4686
- { ALT: () => this.CONSUME(p).image }
4687
- ]), o = {
4688
- value: i,
4686
+ { ALT: () => this.CONSUME(f).image }
4687
+ ]), m = {
4688
+ value: o,
4689
4689
  index: this.getLexerPosition(),
4690
- isRange: w.includes(i)
4690
+ isRange: ee.includes(o)
4691
4691
  }, h = this.SUBRULE2(this._rulePostfixOp);
4692
- m.push({
4693
- op: o,
4692
+ p.push({
4693
+ op: m,
4694
4694
  node: h
4695
4695
  });
4696
4696
  }), this.ACTION(() => {
4697
- let e = m.length - 1, t = i.length;
4697
+ let e = p.length - 1, t = o.length;
4698
4698
  for (let n = 0; e > 0 && n < t; n++) {
4699
- let t = i[n], r = 1;
4700
- for (; r < m.length;) {
4701
- let n = m[r].op;
4699
+ let t = o[n], r = 1;
4700
+ for (; r < p.length;) {
4701
+ let n = p[r].op;
4702
4702
  if (t.includes(n.value)) {
4703
- let t = m[r - 1].node, i = m[r].node, a = o(n.value, t, i, n.isRange);
4704
- a = this._tag(a, n.index), m[r - 1].node = a, m.splice(r, 1), e--;
4703
+ let t = p[r - 1].node, i = p[r].node, a = S(n.value, t, i, n.isRange);
4704
+ a = this._tag(a, n.index), p[r - 1].node = a, p.splice(r, 1), e--;
4705
4705
  } else r++;
4706
4706
  }
4707
4707
  }
4708
- }), m[0].node;
4708
+ }), p[0].node;
4709
4709
  }), this._rulePlusMinusOp = this.RULE("rulePlusMinusOp", () => {
4710
4710
  let { PlusOp: e, MinOp: t } = this._vocab;
4711
4711
  return this.OR([{ ALT: () => this.CONSUME(e) }, { ALT: () => this.CONSUME(t) }]);
4712
4712
  }), this._rulePostfixOp = this.RULE("rulePostfixOp", () => {
4713
- let { PercentOp: e } = this._vocab, t = this.SUBRULE(this._rulePrefixOp), n = [];
4713
+ let { PercentOp: t } = this._vocab, n = this.SUBRULE(this._rulePrefixOp), r = [];
4714
4714
  return this.MANY(() => {
4715
- let t = this.CONSUME(e).image;
4715
+ let e = this.CONSUME(t).image;
4716
4716
  this.ACTION(() => {
4717
- n.push([t, this.getLexerPosition()]);
4717
+ r.push([e, this.getLexerPosition()]);
4718
4718
  });
4719
4719
  }), this.ACTION(() => {
4720
- let e = n.length;
4721
- if (e !== 0) for (let r = 0; r < e; r++) {
4722
- let e = n[r], i = e[0], a = e[1], o = w.includes(i);
4723
- t = c(i, t, o), t = this._tag(t, a);
4720
+ let t = r.length;
4721
+ if (t !== 0) for (let i = 0; i < t; i++) {
4722
+ let t = r[i], a = t[0], o = t[1], s = ee.includes(a);
4723
+ n = e(a, n, s), n = this._tag(n, o);
4724
4724
  }
4725
- }), t;
4725
+ }), n;
4726
4726
  }), this._rulePrefixOp = this.RULE("rulePrefixOp", () => {
4727
- let { PlusOp: t, MinOp: n, ImplicitIntersectOp: r } = this._vocab, i = [];
4727
+ let { PlusOp: e, MinOp: t, ImplicitIntersectOp: n } = this._vocab, r = [];
4728
4728
  this.MANY(() => {
4729
- let e = this.OR([
4729
+ let i = this.OR([
4730
+ { ALT: () => this.CONSUME(e).image },
4730
4731
  { ALT: () => this.CONSUME(t).image },
4731
- { ALT: () => this.CONSUME(n).image },
4732
- { ALT: () => this.CONSUME(r).image }
4732
+ { ALT: () => this.CONSUME(n).image }
4733
4733
  ]);
4734
4734
  this.ACTION(() => {
4735
- i.push([e, this.getLexerPosition()]);
4735
+ r.push([i, this.getLexerPosition()]);
4736
4736
  });
4737
4737
  });
4738
- let a = this.SUBRULE(this._ruleRangeOp);
4738
+ let i = this.SUBRULE(this._ruleRangeOp);
4739
4739
  return this.ACTION(() => {
4740
- let t = i.length;
4741
- if (t !== 0) for (let n = t - 1; n >= 0; n--) {
4742
- let t = i[n], r = t[0], o = t[1], s = w.includes(r);
4743
- a = e(r, a, s), a = this._tag(a, o);
4740
+ let e = r.length;
4741
+ if (e !== 0) for (let t = e - 1; t >= 0; t--) {
4742
+ let e = r[t], n = e[0], a = e[1], o = ee.includes(n);
4743
+ i = g(n, i, o), i = this._tag(i, a);
4744
4744
  }
4745
- }), a;
4745
+ }), i;
4746
4746
  }), this._ruleRangeOp = this.RULE("ruleRangeOp", () => {
4747
- let { RangeOp: e, RangeTrimFullOp: t, RangeTrimLeadingOp: n, RangeTrimTrailingOp: r, ArrayAnchorOp: i } = this._vocab, a = [];
4748
- return a.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
4749
- this.CONSUME(i), a.push({ anchor: this.getLexerPosition() });
4747
+ let { RangeOp: t, RangeTrimFullOp: n, RangeTrimLeadingOp: r, RangeTrimTrailingOp: i, ArrayAnchorOp: a } = this._vocab, o = [];
4748
+ return o.push({ node: this.SUBRULE(this._ruleCallOp) }), this.MANY2(() => {
4749
+ this.CONSUME(a), o.push({ anchor: this.getLexerPosition() });
4750
4750
  }), this.MANY(() => {
4751
- let o = {
4751
+ let e = {
4752
4752
  value: this.OR(this._c2 ||= [
4753
- { ALT: () => this.CONSUME(e).image },
4754
4753
  { ALT: () => this.CONSUME(t).image },
4755
4754
  { ALT: () => this.CONSUME(n).image },
4756
- { ALT: () => this.CONSUME(r).image }
4755
+ { ALT: () => this.CONSUME(r).image },
4756
+ { ALT: () => this.CONSUME(i).image }
4757
4757
  ]),
4758
4758
  index: this.getLexerPosition()
4759
4759
  }, s = this.SUBRULE2(this._ruleCallOp);
4760
- a.push({
4761
- op: o,
4760
+ o.push({
4761
+ op: e,
4762
4762
  node: s
4763
4763
  }), this.MANY3(() => {
4764
- this.CONSUME2(i), a.push({ anchor: this.getLexerPosition() });
4764
+ this.CONSUME2(a), o.push({ anchor: this.getLexerPosition() });
4765
4765
  });
4766
4766
  }), this.ACTION(() => {
4767
- for (let e = 1; e < a.length; e++) {
4768
- let t = a[e];
4769
- if (t.anchor !== void 0) {
4770
- a[0].node = this._tag(c("#", a[0].node, !0), t.anchor);
4767
+ for (let e = 1; e + 1 < o.length; e++) {
4768
+ let t = o[e], n = o[e + 1];
4769
+ if (t.op?.value !== ":" || n.op?.value !== ":") continue;
4770
+ let r = nr(t.node);
4771
+ r && nr(n.node) === r && nr(o[e - 1].node) !== r && (t.node = this._tag(S(":", t.node, n.node, !0), n.op.index), o.splice(e + 1, 1));
4772
+ }
4773
+ for (let t = 1; t < o.length; t++) {
4774
+ let n = o[t];
4775
+ if (n.anchor !== void 0) {
4776
+ o[0].node = this._tag(e("#", o[0].node, !0), n.anchor);
4771
4777
  continue;
4772
4778
  }
4773
- let n = t.op, r = o(n.value, a[0].node, t.node, !0);
4774
- r = this._tag(r, n.index), a[0].node = r;
4779
+ let r = n.op, i = S(r.value, o[0].node, n.node, !0);
4780
+ i = this._tag(i, r.index), o[0].node = i;
4775
4781
  }
4776
- }), a[0].node;
4782
+ }), o[0].node;
4777
4783
  }), this._ruleCallOp = this.RULE("ruleCallOp", () => {
4778
- let { OpenParen: e, CloseParen: n } = this._vocab, r = this.SUBRULE(this._ruleFormula);
4784
+ let { OpenParen: e, CloseParen: t } = this._vocab, n = this.SUBRULE(this._ruleFormula);
4779
4785
  return this.MANY({
4780
4786
  GATE: () => {
4781
4787
  let t = this.LA(0), n = this.LA(1);
@@ -4783,12 +4789,12 @@ var sr = {
4783
4789
  },
4784
4790
  DEF: () => {
4785
4791
  this.CONSUME(e);
4786
- let i = this.getLexerPosition(), a = this.SUBRULE(this._ruleFunctionArguments), o = r, s = this.ACTION(() => this._tag(t(o, a), i)), c = this.OPTION(() => this.CONSUME(n));
4792
+ let r = this.getLexerPosition(), i = this.SUBRULE(this._ruleFunctionArguments), a = n, o = this.ACTION(() => this._tag(l(a, i), r)), s = this.OPTION(() => this.CONSUME(t));
4787
4793
  this.ACTION(() => {
4788
- c || this._reportError(s, "Missing closing parenthesis ')'", i), this._tagClose(s, this.getLexerPosition()), r = s;
4794
+ s || this._reportError(o, "Missing closing parenthesis ')'", r), this._tagClose(o, this.getLexerPosition()), n = o;
4789
4795
  });
4790
4796
  }
4791
- }), r;
4797
+ }), n;
4792
4798
  }), this._ruleIntersectOp = this.RULE("ruleIntersectOp", () => {
4793
4799
  let e = [this.SUBRULE(this._ruleInfixOp)];
4794
4800
  return this.MANY(() => {
@@ -4805,14 +4811,14 @@ var sr = {
4805
4811
  for (; e.length > 1;) {
4806
4812
  let t = e.length - 1;
4807
4813
  for (let n = 0; n < t; n++) {
4808
- let r = e[n], i = e[n + 1], a = o(" ", r, i, !0), s = this._tokenMap.get(r);
4809
- s && delete s.tokenIndexClose;
4810
- let c = this._tokenMap.get(i), l = c?.tokenIndex;
4811
- if (l !== void 0) {
4812
- let e = this.input[l], t = this.input[l - 1]?.endOffset ?? -1, n = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
4814
+ let r = e[n], i = e[n + 1], a = S(" ", r, i, !0), o = this._tokenMap.get(r);
4815
+ o && delete o.tokenIndexClose;
4816
+ let s = this._tokenMap.get(i), c = s?.tokenIndex;
4817
+ if (c !== void 0) {
4818
+ let e = this.input[c], t = this.input[c - 1]?.endOffset ?? -1, n = this._inputText.slice(t + 1, e.startOffset).slice(0, -1);
4813
4819
  n.length > 0 && (a.wsBefore = n);
4814
4820
  }
4815
- c && delete c.tokenIndex, n + 1 < t && c && delete c.tokenIndexClose, e.splice(n, 2, a), n--, t--;
4821
+ s && delete s.tokenIndex, n + 1 < t && s && delete s.tokenIndexClose, e.splice(n, 2, a), n--, t--;
4816
4822
  }
4817
4823
  }
4818
4824
  }), e[0];
@@ -4835,13 +4841,13 @@ var sr = {
4835
4841
  }), t;
4836
4842
  }), this._ruleParen = this.RULE("ruleParen", () => {
4837
4843
  let { OpenParen: e, CloseParen: t } = this._vocab;
4838
- return this._processParen(g.Paren, e, t);
4844
+ return this._processParen(T.Paren, e, t);
4839
4845
  }), this._ruleLiteralArray = this.RULE("ruleLiteralArray", () => {
4840
- let { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: n, RowSeparator: r } = this._vocab, i = p();
4846
+ let { OpenCurlyParen: e, CloseCurlyParen: t, ColSeparator: n, RowSeparator: r } = this._vocab, a = d();
4841
4847
  this.CONSUME(e);
4842
- let a = this.getLexerPosition(), o = this.ACTION(() => this._tag(T(i), a)), s = this.SUBRULE(this._ruleLiteralForArray);
4848
+ let o = this.getLexerPosition(), s = this.ACTION(() => this._tag(i(a), o)), c = this.SUBRULE(this._ruleLiteralForArray);
4843
4849
  this.ACTION(() => {
4844
- i.value.push(s);
4850
+ a.value.push(c);
4845
4851
  }), this.MANY(() => {
4846
4852
  let e = !1;
4847
4853
  this.OR([{ ALT: () => {
@@ -4849,64 +4855,64 @@ var sr = {
4849
4855
  } }, { ALT: () => this.CONSUME(r) }]);
4850
4856
  let t = this.SUBRULE2(this._ruleLiteralForArray);
4851
4857
  this.ACTION(() => {
4852
- e || (i = p(), o.value.push(i)), i.value.push(t);
4858
+ e || (a = d(), s.value.push(a)), a.value.push(t);
4853
4859
  });
4854
4860
  });
4855
- let c = this.OPTION(() => this.CONSUME(t));
4856
- return o = this.ACTION(() => (c || this._reportError(o, "Missing closing parenthesis '}'", a), this._tagClose(o, this.getLexerPosition()))), o;
4861
+ let l = this.OPTION(() => this.CONSUME(t));
4862
+ return s = this.ACTION(() => (l || this._reportError(s, "Missing closing parenthesis '}'", o), this._tagClose(s, this.getLexerPosition()))), s;
4857
4863
  }), this._ruleLiteralForArray = this.RULE("ruleLiteralForArray", () => {
4858
- let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4864
+ let { StringToken: e, BooleanToken: n, LiteralError: r, RefError: i } = this._vocab;
4859
4865
  return this.OR([
4860
4866
  { ALT: () => {
4861
- let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(m(t.image, this._locale), this.getLexerPosition()));
4862
- return this.ACTION(() => e ? v(e.image, n) : n);
4867
+ let e = this.OPTION(() => this.SUBRULE(this._rulePlusMinusOp)), t = this.SUBRULE(this._ruleNumber), n = this.ACTION(() => this._tag(s(t.image, this._locale), this.getLexerPosition()));
4868
+ return this.ACTION(() => e ? ne(e.image, n) : n);
4863
4869
  } },
4864
4870
  { ALT: () => {
4865
4871
  let t = this.CONSUME(e);
4866
- return this.ACTION(() => this._tag(te(t.image), this.getLexerPosition()));
4867
- } },
4868
- { ALT: () => {
4869
- let e = this.CONSUME(t);
4870
- return this.ACTION(() => this._tag(ne(e.image, this._locale), this.getLexerPosition()));
4872
+ return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4871
4873
  } },
4872
4874
  { ALT: () => {
4873
4875
  let e = this.CONSUME(n);
4874
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
4876
+ return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
4875
4877
  } },
4876
4878
  { ALT: () => {
4877
4879
  let e = this.CONSUME(r);
4878
- return this.ACTION(() => this._tag(E(e.image, this._locale), this.getLexerPosition()));
4880
+ return this.ACTION(() => this._tag(f(e.image, this._locale), this.getLexerPosition()));
4881
+ } },
4882
+ { ALT: () => {
4883
+ let e = this.CONSUME(i);
4884
+ return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4879
4885
  } }
4880
4886
  ]);
4881
4887
  }), this._ruleLiteral = this.RULE("ruleLiteral", () => {
4882
- let { StringToken: e, BooleanToken: t, LiteralError: n, RefError: r } = this._vocab;
4888
+ let { StringToken: e, BooleanToken: n, LiteralError: r, RefError: i } = this._vocab;
4883
4889
  return this.OR([
4884
4890
  { ALT: () => {
4885
4891
  let e = this.SUBRULE(this._ruleNumber);
4886
- return this.ACTION(() => this._tag(m(e.image, this._locale), this.getLexerPosition()));
4892
+ return this.ACTION(() => this._tag(s(e.image, this._locale), this.getLexerPosition()));
4887
4893
  } },
4888
4894
  { ALT: () => {
4889
4895
  let t = this.CONSUME(e);
4890
- return this.ACTION(() => this._tag(te(t.image), this.getLexerPosition()));
4891
- } },
4892
- { ALT: () => {
4893
- let e = this.CONSUME(t);
4894
- return this.ACTION(() => this._tag(ne(e.image, this._locale), this.getLexerPosition()));
4896
+ return this.ACTION(() => this._tag(y(t.image), this.getLexerPosition()));
4895
4897
  } },
4896
4898
  { ALT: () => {
4897
4899
  let e = this.CONSUME(n);
4898
- return this.ACTION(() => this._tag(a(e.image, this._locale), this.getLexerPosition()));
4900
+ return this.ACTION(() => this._tag(t(e.image, this._locale), this.getLexerPosition()));
4899
4901
  } },
4900
4902
  { ALT: () => {
4901
4903
  let e = this.CONSUME(r);
4902
- return this.ACTION(() => this._tag(E(e.image, this._locale), this.getLexerPosition()));
4904
+ return this.ACTION(() => this._tag(f(e.image, this._locale), this.getLexerPosition()));
4905
+ } },
4906
+ { ALT: () => {
4907
+ let e = this.CONSUME(i);
4908
+ return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4903
4909
  } }
4904
4910
  ]);
4905
4911
  }), this._ruleFunction = this.RULE("ruleFunction", () => {
4906
- let { FunctionToken: e, OpenParen: t, CloseParen: r } = this._vocab, i = this.CONSUME(e).image, a = this.getLexerPosition();
4912
+ let { FunctionToken: e, OpenParen: t, CloseParen: n } = this._vocab, r = this.CONSUME(e).image, i = this.getLexerPosition();
4907
4913
  this.CONSUME(t);
4908
- let o = this.SUBRULE(this._ruleFunctionArguments), s = this.ACTION(() => this._tag(n(i, o), a)), c = this.OPTION(() => this.CONSUME(r));
4909
- return s = this.ACTION(() => (c || this._reportError(s, "Missing closing parenthesis ')'", a), this._tagClose(s, this.getLexerPosition()))), s;
4914
+ let o = this.SUBRULE(this._ruleFunctionArguments), s = this.ACTION(() => this._tag(a(r, o), i)), c = this.OPTION(() => this.CONSUME(n));
4915
+ return s = this.ACTION(() => (c || this._reportError(s, "Missing closing parenthesis ')'", i), this._tagClose(s, this.getLexerPosition()))), s;
4910
4916
  }), this._ruleFunctionArguments = this.RULE("ruleFunctionArguments", () => {
4911
4917
  let { ArgSeparator: e, CloseParen: t } = this._vocab, n = [];
4912
4918
  return this.OPTION({
@@ -4915,11 +4921,11 @@ var sr = {
4915
4921
  let t;
4916
4922
  this.OPTION2(() => {
4917
4923
  t = this.SUBRULE(this._ruleIntersectOp);
4918
- }), t = this.ACTION(() => t ?? this._tagClose(d(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4924
+ }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), n.push(t), this.MANY(() => {
4919
4925
  let t;
4920
4926
  this.CONSUME(e), this.OPTION3(() => {
4921
4927
  t = this.SUBRULE2(this._ruleIntersectOp);
4922
- }), t = this.ACTION(() => t ?? this._tagClose(d(), this.getLexerPosition())), n.push(t);
4928
+ }), t = this.ACTION(() => t ?? this._tagClose(r(), this.getLexerPosition())), n.push(t);
4923
4929
  });
4924
4930
  }
4925
4931
  }), n;
@@ -4938,61 +4944,61 @@ var sr = {
4938
4944
  return this._tag(e.root, n);
4939
4945
  });
4940
4946
  }), this._ruleReference = this.RULE("ruleReference", () => {
4941
- let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: i, PlusOp: a, MinOp: o, ArgSeparator: s, Cell: c, NamedToken: l, SingleQuotedString: d, Column: p, AbsRow: m, DigitToken: h, RefError: _ } = this._vocab, v, y;
4947
+ let { Sheet: e, SheetQuoted: t, DivOp: n, MulOp: r, PlusOp: i, MinOp: a, ArgSeparator: o, Cell: s, NamedToken: l, SingleQuotedString: d, Column: f, AbsRow: m, DigitToken: h, RefError: g } = this._vocab, _, v;
4942
4948
  this.OPTION2({
4943
4949
  GATE: () => {
4944
- for (let r = 1; r < 6; r++) {
4945
- let c = this.LA(r);
4950
+ for (let s = 1; s < 6; s++) {
4951
+ let c = this.LA(s);
4946
4952
  if (c.tokenType === e || c.tokenType === t) return !0;
4947
- if (c.image === "" || c.image === ")" || c.tokenType === n || c.tokenType === i || c.tokenType === a || c.tokenType === o || c.tokenType === s) break;
4953
+ if (c.image === "" || c.image === ")" || c.tokenType === n || c.tokenType === r || c.tokenType === i || c.tokenType === a || c.tokenType === o) break;
4948
4954
  }
4949
4955
  return !1;
4950
4956
  },
4951
4957
  DEF: () => {
4952
- y = this.getLexerPosition() + 1, v = this.SUBRULE(this._rulePrefixSheetName);
4958
+ v = this.getLexerPosition() + 1, _ = this.SUBRULE(this._rulePrefixSheetName);
4953
4959
  }
4954
4960
  });
4955
- let b = this.OR([
4961
+ let y = this.OR([
4956
4962
  { ALT: () => {
4957
- let e = this.CONSUME(c), t = this.getLexerPosition();
4958
- return this.ACTION(() => this._tag(r(e.image, this.rowIndex, this.colIndex), t));
4963
+ let e = this.CONSUME(s), t = this.getLexerPosition();
4964
+ return this.ACTION(() => this._tag(c(e.image, this.rowIndex, this.colIndex), t));
4959
4965
  } },
4960
4966
  { ALT: () => {
4961
4967
  let e = this.OR2([{ ALT: () => this.CONSUME(l) }, { ALT: () => this.CONSUME(d) }]);
4962
- return this.ACTION(() => this._tag(f(e.image), this.getLexerPosition()));
4968
+ return this.ACTION(() => this._tag(p(e.image), this.getLexerPosition()));
4963
4969
  } },
4964
4970
  { ALT: () => this.SUBRULE(this._ruleBracketedString) },
4965
4971
  { ALT: () => this.SUBRULE(this._ruleFunction) },
4966
4972
  { ALT: () => {
4967
- let e = this.CONSUME(p);
4973
+ let e = this.CONSUME(f);
4968
4974
  return this.ACTION(() => this._tag(u(e.image, this.colIndex), this.getLexerPosition()));
4969
4975
  } },
4970
4976
  { ALT: () => {
4971
4977
  let e = this.CONSUME(m);
4972
- return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
4978
+ return this.ACTION(() => this._tag(C(e.image, this.rowIndex), this.getLexerPosition()));
4973
4979
  } },
4974
4980
  { ALT: () => {
4975
4981
  let e = this.CONSUME(h);
4976
- return this.ACTION(() => this._tag(S(e.image, this.rowIndex), this.getLexerPosition()));
4982
+ return this.ACTION(() => this._tag(C(e.image, this.rowIndex), this.getLexerPosition()));
4977
4983
  } },
4978
4984
  { ALT: () => {
4979
- let e = this.CONSUME(_);
4980
- return this.ACTION(() => this._tag(E(e.image, this._locale), this.getLexerPosition()));
4985
+ let e = this.CONSUME(g);
4986
+ return this.ACTION(() => this._tag(b(e.image, this._locale), this.getLexerPosition()));
4981
4987
  } }
4982
4988
  ]);
4983
4989
  return this.ACTION(() => {
4984
- if (v && b) {
4985
- if (v.name === "") return void this._reportError(b, `'${v.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4986
- let e = b;
4987
- if (b.type === g.Postfix && b.inputs?.[0] && (e = b.inputs[0]), e.type === g.Cell || e.type === g.Named || e.type === g.Row || e.type === g.TableColumn || e.type === g.Error) {
4988
- e.value.scope = v.name, e.value.scopeImage = v.image;
4990
+ if (_ && y) {
4991
+ if (_.name === "") return void this._reportError(y, `'${_.image}' is not a valid sheet reference — a '!' needs a sheet name before it`);
4992
+ let e = y;
4993
+ if (y.type === T.Postfix && y.inputs?.[0] && (e = y.inputs[0]), e.type === T.Cell || e.type === T.Named || e.type === T.Row || e.type === T.TableColumn || e.type === T.Error) {
4994
+ e.value.scope = _.name, e.value.scopeImage = _.image;
4989
4995
  let t = this._tokenMap.get(e);
4990
- t && y !== void 0 && (t.tokenIndex = y);
4996
+ t && v !== void 0 && (t.tokenIndex = v);
4991
4997
  }
4992
4998
  }
4993
- }), b;
4999
+ }), y;
4994
5000
  }), this._rulePrefixSheetName = this.RULE("rulePrefixSheetName", () => {
4995
- let { SheetQuoted: e, BracketedString: t, NamedToken: n, RangeOp: r, Sheet: i } = this._vocab;
5001
+ let { SheetQuoted: e, BracketedString: t, NamedToken: n, Column: r, RangeOp: i, Sheet: a } = this._vocab;
4996
5002
  return this.OR([{ ALT: () => {
4997
5003
  let t = this.CONSUME(e).image;
4998
5004
  return {
@@ -5004,15 +5010,18 @@ var sr = {
5004
5010
  this.OPTION(() => {
5005
5011
  e += this.CONSUME(t).image;
5006
5012
  }), this.OPTION2({
5007
- GATE: () => this.LA(2).tokenType === r,
5013
+ GATE: () => this.LA(2).tokenType === i,
5008
5014
  DEF: () => {
5009
- e += this.CONSUME(n).image, this.CONSUME(r), e += ":";
5015
+ e += this.OR2([{ ALT: () => this.CONSUME(n).image }, {
5016
+ GATE: () => this.LA(1).image.charCodeAt(0) !== 36,
5017
+ ALT: () => this.CONSUME(r).image
5018
+ }]), this.CONSUME(i), e += ":";
5010
5019
  }
5011
5020
  });
5012
- let a = this.CONSUME(i).image;
5021
+ let o = this.CONSUME(a).image;
5013
5022
  return {
5014
- name: e + a.slice(0, -1),
5015
- image: e + a
5023
+ name: e + o.slice(0, -1),
5024
+ image: e + o
5016
5025
  };
5017
5026
  } }]);
5018
5027
  }), this._ruleNumber = this.RULE("ruleNumber", () => {
@@ -5027,12 +5036,12 @@ var sr = {
5027
5036
  return this.MANY(() => {
5028
5037
  this.CONSUME(e), n.push(this.SUBRULE2(this._ruleIntersectOp));
5029
5038
  }), this.ACTION(() => n.length === 0 ? t : {
5030
- type: g.List,
5039
+ type: T.List,
5031
5040
  value: ",",
5032
5041
  inputs: [t, ...n],
5033
5042
  isReference: !0
5034
5043
  });
5035
- }), this._lexer = l, this._locale = l.getLocale(), this._vocab = h, this._srParser = s?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5044
+ }), this._lexer = m, this._locale = m.getLocale(), this._vocab = h, this._srParser = n?.srParser ?? new $n(this._locale), this.performSelfAnalysis();
5036
5045
  }
5037
5046
  getLexer() {
5038
5047
  return this._lexer;
@@ -5041,26 +5050,26 @@ var sr = {
5041
5050
  let r = this._lexer.tokenize(n), i;
5042
5051
  if (!r) return {
5043
5052
  root: {
5044
- type: g.Unparsed,
5053
+ type: T.Unparsed,
5045
5054
  value: n
5046
5055
  },
5047
5056
  errors: []
5048
5057
  };
5049
5058
  let a = r.tokens;
5050
- if (a.length === 0) throw new D.Parse(ir);
5051
- return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = ee(i, (t, n) => {
5052
- let r = t.type, i = n?.isReference ? n.value : void 0, a = typeof i == "string" && er.has(i), o = typeof i == "string" && tr.has(i), s = a ? n.inputs : void 0, c = s ? s[0] === t ? s[1] : s[0] : void 0, u = this._lexer.getMaxRow();
5053
- if (a && r !== g.Cell && Number.isInteger(t.value)) {
5054
- let n = S(t.image, e);
5055
- return l(n, t), nr(c) === "row" ? rr(t.image, u) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${u}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5059
+ if (a.length === 0) throw new E.Parse(ir);
5060
+ return this.input = a, this._inputText = n, this._inputTextLength = n.length, this.rowIndex = e, this.colIndex = t, this._astErrors = [], this._tokenMap = /* @__PURE__ */ new Map(), this.reset(), i = this._ruleRoot(), i && this._bindAllWhitespace(i), i = v(i, (t, n) => {
5061
+ let r = t.type, i = n?.isReference ? n.value : void 0, a = typeof i == "string" && er.has(i), o = typeof i == "string" && tr.has(i), s = a ? n.inputs : void 0, c = s ? s[0] === t ? s[1] : s[0] : void 0, l = this._lexer.getMaxRow();
5062
+ if (a && r !== T.Cell && Number.isInteger(t.value)) {
5063
+ let n = C(t.image, e);
5064
+ return re(n, t), nr(c) === "row" ? rr(t.image, l) || this._reportError(n, `'${t.image}' is not a valid row — rows run from 1 to ${l}`) : this._reportError(n, `'${t.image}' is not a valid reference — a whole row can only pair with another row (as in ${t.image}:${t.image})`), n;
5056
5065
  }
5057
- if (o && r === g.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5058
- if (r === g.Cell) {
5066
+ if (o && r === T.Named) return this._reportError(t, `'${t.image ?? t.value?.nameId}' is a name — '${i}' needs a cell or range on both sides`), t;
5067
+ if (r === T.Cell) {
5059
5068
  let e = t.value, n = e.colIndex === -(2 ** 53 - 1), r = e.rowIndex === -(2 ** 53 - 1);
5060
- if ((n || r) && nr(c) === (n ? "row" : "col")) return n && !rr(t.image, u) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${u}`), t;
5069
+ if ((n || r) && nr(c) === (n ? "row" : "col")) return n && !rr(t.image, l) && this._reportError(t, `'${t.image}' is not a valid row — rows run from 1 to ${l}`), t;
5061
5070
  if (n || r || e.colIndex >= 16384) {
5062
- let a = f(t.image);
5063
- l(a, t);
5071
+ let a = p(t.image);
5072
+ re(a, t);
5064
5073
  let s = e.scope;
5065
5074
  return s && (a.value.scope = s, a.value.scopeImage = e.scopeImage), n ? this._reportError(a, `'${t.image}' is not a valid reference — a row needs a column (use ${t.image}:${t.image} for the whole row)`) : r && t.image.includes("$") ? this._reportError(a, `'${t.image}' is not a valid reference — a whole column can only pair with another column (as in ${t.image}:${t.image})`) : o && this._reportError(a, `'${t.image}' is a name — '${i}' needs a cell or range on both sides`), a;
5066
5075
  }
@@ -5123,7 +5132,7 @@ var sr = {
5123
5132
  _bindAllWhitespace(e) {
5124
5133
  if (e) {
5125
5134
  if (this._bindNodeWhitespace(e), e.inputs) for (let t of e.inputs) t && this._bindAllWhitespace(t);
5126
- if (e.type === g.Array && Array.isArray(e.value)) {
5135
+ if (e.type === T.Array && Array.isArray(e.value)) {
5127
5136
  for (let t of e.value) if (t && Array.isArray(t.value)) for (let e of t.value) e && this._bindAllWhitespace(e);
5128
5137
  }
5129
5138
  }