solve-engine 1.1.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (395) hide show
  1. package/README.md +12 -17
  2. package/dist/{BytecodeBuilder-Bp9xeTmX.d.cts → BytecodeBuilder-DGGeByAP.d.cts} +18 -0
  3. package/dist/{BytecodeBuilder-Bp9xeTmX.d.ts → BytecodeBuilder-DGGeByAP.d.ts} +18 -0
  4. package/dist/{Configuration-C9W8tJv_.d.cts → Configuration-B6W0-T67.d.cts} +17 -4
  5. package/dist/{Configuration-C9W8tJv_.d.ts → Configuration-B6W0-T67.d.ts} +17 -4
  6. package/dist/{EngineError-B61GS1jp.d.cts → EngineError-Ce1lPkjZ.d.cts} +8 -0
  7. package/dist/{EngineError-B61GS1jp.d.ts → EngineError-Ce1lPkjZ.d.ts} +8 -0
  8. package/dist/{Lexer-BOs7euZe.d.cts → Lexer-B4C1qHXu.d.cts} +1 -1
  9. package/dist/{Lexer-CSI_lwbW.d.ts → Lexer-DKMlj7Sy.d.ts} +1 -1
  10. package/dist/{PackageCompatibility-B-7rK1TD.d.cts → PackageCompatibility-Bn5jnBtA.d.cts} +2 -2
  11. package/dist/{PackageCompatibility-Dh59eF-X.d.ts → PackageCompatibility-CIvq2MP5.d.ts} +2 -2
  12. package/dist/{PackageRegistry-_8rDlvxI.d.ts → PackageRegistry-DzeiWcv4.d.ts} +143 -175
  13. package/dist/{PackageRegistry-BHWJP83F.d.cts → PackageRegistry-dpdurBVO.d.cts} +143 -175
  14. package/dist/{Parselet-BBT8riYh.d.ts → Parselet-B-zoPrTa.d.ts} +9 -6
  15. package/dist/{Parselet-BHcgK9S7.d.cts → Parselet-C4Wu055_.d.cts} +9 -6
  16. package/dist/{ScopeManager-CxA24W5n.d.ts → ScopeManager-C2LDOrDx.d.ts} +14 -16
  17. package/dist/{ScopeManager-8vf02dwj.d.cts → ScopeManager-D7uMXbhS.d.cts} +14 -16
  18. package/dist/{Token-B1hdkedD.d.cts → Token-CbP_OutD.d.cts} +9 -0
  19. package/dist/{Token-B1hdkedD.d.ts → Token-CbP_OutD.d.ts} +9 -0
  20. package/dist/{TokenNormalizer-C6VzZgHa.d.ts → TokenNormalizer-DCWdZjGz.d.ts} +1 -1
  21. package/dist/{TokenNormalizer-DRc1Js1V.d.cts → TokenNormalizer-DnlL7_8c.d.cts} +1 -1
  22. package/dist/{VMCheckpoints-MK--EBH2.d.ts → VMCheckpoints-CGyFhivM.d.ts} +3 -3
  23. package/dist/{VMCheckpoints-ELYqITdF.d.cts → VMCheckpoints-I9jg3jWR.d.cts} +3 -3
  24. package/dist/{Value-BUi1RA3S.d.cts → Value-CCi_Eecs.d.cts} +72 -5
  25. package/dist/{Value-BUi1RA3S.d.ts → Value-CCi_Eecs.d.ts} +72 -5
  26. package/dist/{WorkerError-gzmaopj2.d.cts → WorkerError-B4p6PNfx.d.cts} +1 -1
  27. package/dist/{WorkerError-_-RkoQ5P.d.ts → WorkerError-Dhj9BQ_A.d.ts} +1 -1
  28. package/dist/chunk-2JMFUQZH.js +2 -0
  29. package/dist/chunk-2JMFUQZH.js.map +1 -0
  30. package/dist/chunk-2RWAXT6O.js +0 -1
  31. package/dist/chunk-4BZIYU7S.cjs +3 -0
  32. package/dist/chunk-4BZIYU7S.cjs.map +1 -0
  33. package/dist/chunk-4J7XZSZJ.cjs +5 -0
  34. package/dist/chunk-4J7XZSZJ.cjs.map +1 -0
  35. package/dist/chunk-4QVBSG6B.cjs +2 -0
  36. package/dist/chunk-4QVBSG6B.cjs.map +1 -0
  37. package/dist/chunk-5IJD5L3O.cjs +2 -0
  38. package/dist/chunk-5IJD5L3O.cjs.map +1 -0
  39. package/dist/chunk-62LMTO4F.js +2 -0
  40. package/dist/chunk-62LMTO4F.js.map +1 -0
  41. package/dist/chunk-6CY44ZPG.js +2 -0
  42. package/dist/chunk-6CY44ZPG.js.map +1 -0
  43. package/dist/chunk-6G3PMEPA.js +2 -0
  44. package/dist/chunk-6G3PMEPA.js.map +1 -0
  45. package/dist/chunk-6INX773F.cjs +2 -0
  46. package/dist/chunk-6INX773F.cjs.map +1 -0
  47. package/dist/chunk-6KFVG6UY.cjs +2 -0
  48. package/dist/chunk-6KFVG6UY.cjs.map +1 -0
  49. package/dist/chunk-76F3LCIL.js +4 -0
  50. package/dist/chunk-76F3LCIL.js.map +1 -0
  51. package/dist/chunk-7GK3XEZF.js +2 -0
  52. package/dist/chunk-7GK3XEZF.js.map +1 -0
  53. package/dist/chunk-APN442VD.cjs +2 -0
  54. package/dist/chunk-APN442VD.cjs.map +1 -0
  55. package/dist/chunk-AXMQG5TS.cjs +2 -0
  56. package/dist/chunk-AXMQG5TS.cjs.map +1 -0
  57. package/dist/chunk-CIQOK7Q4.cjs +2 -0
  58. package/dist/chunk-CIQOK7Q4.cjs.map +1 -0
  59. package/dist/chunk-E6Z4NQAS.js +2 -0
  60. package/dist/chunk-E6Z4NQAS.js.map +1 -0
  61. package/dist/chunk-EFJCC6FJ.cjs +2 -0
  62. package/dist/chunk-EFJCC6FJ.cjs.map +1 -0
  63. package/dist/chunk-ESUN2THE.cjs +2 -0
  64. package/dist/chunk-ESUN2THE.cjs.map +1 -0
  65. package/dist/chunk-EVAOPEO4.js +2 -0
  66. package/dist/chunk-EVAOPEO4.js.map +1 -0
  67. package/dist/chunk-EYRBENHC.js +3 -0
  68. package/dist/chunk-EYRBENHC.js.map +1 -0
  69. package/dist/chunk-FDE5HWDI.cjs +2 -0
  70. package/dist/chunk-FDE5HWDI.cjs.map +1 -0
  71. package/dist/chunk-FWW3M36J.cjs +2 -0
  72. package/dist/chunk-FWW3M36J.cjs.map +1 -0
  73. package/dist/chunk-GOIQYUWV.js +2 -0
  74. package/dist/chunk-GOIQYUWV.js.map +1 -0
  75. package/dist/chunk-HFKDWQUL.js +2 -0
  76. package/dist/chunk-HFKDWQUL.js.map +1 -0
  77. package/dist/chunk-HLBYHXQD.cjs +3 -0
  78. package/dist/chunk-HLBYHXQD.cjs.map +1 -0
  79. package/dist/chunk-IANAMBJQ.cjs +2 -0
  80. package/dist/chunk-IANAMBJQ.cjs.map +1 -0
  81. package/dist/chunk-IJMNVBIS.js +2 -0
  82. package/dist/chunk-IJMNVBIS.js.map +1 -0
  83. package/dist/chunk-J4LZD4ZY.js +3 -0
  84. package/dist/chunk-J4LZD4ZY.js.map +1 -0
  85. package/dist/chunk-JAK3RAFA.cjs +2 -0
  86. package/dist/chunk-JAK3RAFA.cjs.map +1 -0
  87. package/dist/chunk-JFAJN3C2.cjs +2 -0
  88. package/dist/chunk-JFAJN3C2.cjs.map +1 -0
  89. package/dist/chunk-JPFCXLJV.js +2 -0
  90. package/dist/chunk-JPFCXLJV.js.map +1 -0
  91. package/dist/chunk-JSPKKNPQ.js +3 -0
  92. package/dist/chunk-JSPKKNPQ.js.map +1 -0
  93. package/dist/chunk-L3FPQSGN.js +2 -0
  94. package/dist/chunk-L3FPQSGN.js.map +1 -0
  95. package/dist/chunk-LR4E4A4W.cjs +2 -0
  96. package/dist/chunk-LR4E4A4W.cjs.map +1 -0
  97. package/dist/chunk-MIQBJGGR.js +2 -0
  98. package/dist/chunk-MIQBJGGR.js.map +1 -0
  99. package/dist/chunk-MPB7KUN5.js +3 -0
  100. package/dist/chunk-MPB7KUN5.js.map +1 -0
  101. package/dist/chunk-MSYX32PF.cjs +2 -0
  102. package/dist/chunk-MSYX32PF.cjs.map +1 -0
  103. package/dist/chunk-MVZUTETT.js +2 -0
  104. package/dist/chunk-MVZUTETT.js.map +1 -0
  105. package/dist/chunk-N7N7MPMK.cjs +2 -0
  106. package/dist/chunk-N7N7MPMK.cjs.map +1 -0
  107. package/dist/chunk-NGBBNL4K.cjs +1 -3
  108. package/dist/chunk-P6WPEUAJ.cjs +2 -0
  109. package/dist/chunk-P6WPEUAJ.cjs.map +1 -0
  110. package/dist/chunk-PS272DZJ.cjs +2 -0
  111. package/dist/chunk-PS272DZJ.cjs.map +1 -0
  112. package/dist/chunk-QXQE7X4S.js +2 -0
  113. package/dist/chunk-QXQE7X4S.js.map +1 -0
  114. package/dist/chunk-R2ENWQ76.js +2 -0
  115. package/dist/chunk-R2ENWQ76.js.map +1 -0
  116. package/dist/chunk-R2SZFJTT.cjs +2 -0
  117. package/dist/chunk-R2SZFJTT.cjs.map +1 -0
  118. package/dist/chunk-RAF57WYO.js +2 -0
  119. package/dist/chunk-RAF57WYO.js.map +1 -0
  120. package/dist/chunk-RSF25YSJ.js +2 -0
  121. package/dist/chunk-RSF25YSJ.js.map +1 -0
  122. package/dist/chunk-SOMGSIO4.cjs +3 -0
  123. package/dist/chunk-SOMGSIO4.cjs.map +1 -0
  124. package/dist/chunk-SUXRZWH2.cjs +3 -0
  125. package/dist/chunk-SUXRZWH2.cjs.map +1 -0
  126. package/dist/chunk-SYYE3QAX.cjs +2 -0
  127. package/dist/chunk-SYYE3QAX.cjs.map +1 -0
  128. package/dist/chunk-SZGK6RIP.cjs +2 -0
  129. package/dist/chunk-SZGK6RIP.cjs.map +1 -0
  130. package/dist/chunk-TCZSPH4A.js +2 -0
  131. package/dist/chunk-TCZSPH4A.js.map +1 -0
  132. package/dist/chunk-TLG7VZRX.cjs +2 -0
  133. package/dist/chunk-TLG7VZRX.cjs.map +1 -0
  134. package/dist/chunk-TRBXW6HW.js +2 -0
  135. package/dist/{chunk-AQNHHJMJ.cjs.map → chunk-TRBXW6HW.js.map} +1 -1
  136. package/dist/chunk-TTFO4YDP.cjs +2 -0
  137. package/dist/chunk-TTFO4YDP.cjs.map +1 -0
  138. package/dist/chunk-TWC7K3ZX.js +2 -0
  139. package/dist/chunk-TWC7K3ZX.js.map +1 -0
  140. package/dist/chunk-UDQ57ZRX.cjs +2 -0
  141. package/dist/chunk-UDQ57ZRX.cjs.map +1 -0
  142. package/dist/chunk-UI6IFGBT.js +2 -0
  143. package/dist/chunk-UI6IFGBT.js.map +1 -0
  144. package/dist/chunk-UURM7P3P.cjs +4 -0
  145. package/dist/chunk-UURM7P3P.cjs.map +1 -0
  146. package/dist/chunk-W2JAR233.js +2 -0
  147. package/dist/chunk-W2JAR233.js.map +1 -0
  148. package/dist/chunk-WGZ3FNHI.js +2 -0
  149. package/dist/chunk-WGZ3FNHI.js.map +1 -0
  150. package/dist/chunk-WN5CMP4T.cjs +3 -0
  151. package/dist/chunk-WN5CMP4T.cjs.map +1 -0
  152. package/dist/chunk-XEIDV5JP.js +2 -0
  153. package/dist/chunk-XEIDV5JP.js.map +1 -0
  154. package/dist/chunk-XNIWQHXY.js +2 -0
  155. package/dist/chunk-XNIWQHXY.js.map +1 -0
  156. package/dist/chunk-XR7HEC7B.js +5 -0
  157. package/dist/chunk-XR7HEC7B.js.map +1 -0
  158. package/dist/chunk-Y7O4D3BJ.cjs +2 -0
  159. package/dist/chunk-Y7O4D3BJ.cjs.map +1 -0
  160. package/dist/chunk-YAYBVVG2.js +3 -0
  161. package/dist/chunk-YAYBVVG2.js.map +1 -0
  162. package/dist/chunk-YJ2OPULK.js +2 -0
  163. package/dist/chunk-YJ2OPULK.js.map +1 -0
  164. package/dist/chunk-YVKHEAFT.js +2 -0
  165. package/dist/chunk-YVKHEAFT.js.map +1 -0
  166. package/dist/chunk-ZCNBT44X.cjs +2 -0
  167. package/dist/chunk-ZCNBT44X.cjs.map +1 -0
  168. package/dist/chunk-ZLRJ7TDP.cjs +2 -0
  169. package/dist/chunk-ZLRJ7TDP.cjs.map +1 -0
  170. package/dist/constants.cjs +1 -21
  171. package/dist/constants.d.cts +1 -1
  172. package/dist/constants.d.ts +1 -1
  173. package/dist/constants.js +1 -4
  174. package/dist/engine.cjs +1 -94
  175. package/dist/engine.d.cts +29 -14
  176. package/dist/engine.d.ts +29 -14
  177. package/dist/engine.js +1 -37
  178. package/dist/errors.cjs +1 -105
  179. package/dist/errors.d.cts +3 -3
  180. package/dist/errors.d.ts +3 -3
  181. package/dist/errors.js +1 -4
  182. package/dist/format.cjs +1 -26
  183. package/dist/format.d.cts +2 -2
  184. package/dist/format.d.ts +2 -2
  185. package/dist/format.js +1 -9
  186. package/dist/index.cjs +1 -314
  187. package/dist/index.cjs.map +1 -1
  188. package/dist/index.d.cts +55 -23
  189. package/dist/index.d.ts +55 -23
  190. package/dist/index.js +1 -278
  191. package/dist/index.js.map +1 -1
  192. package/dist/language.cjs +1 -369
  193. package/dist/language.cjs.map +1 -1
  194. package/dist/language.d.cts +12 -13
  195. package/dist/language.d.ts +12 -13
  196. package/dist/language.js +1 -348
  197. package/dist/language.js.map +1 -1
  198. package/dist/lexer.cjs +1 -63
  199. package/dist/lexer.d.cts +3 -3
  200. package/dist/lexer.d.ts +3 -3
  201. package/dist/lexer.js +1 -10
  202. package/dist/normalizer.cjs +1 -39
  203. package/dist/normalizer.d.cts +3 -3
  204. package/dist/normalizer.d.ts +3 -3
  205. package/dist/normalizer.js +1 -10
  206. package/dist/packages.cjs +1 -128
  207. package/dist/packages.d.cts +39 -14
  208. package/dist/packages.d.ts +39 -14
  209. package/dist/packages.js +1 -23
  210. package/dist/parser.cjs +1 -54
  211. package/dist/parser.d.cts +9 -9
  212. package/dist/parser.d.ts +9 -9
  213. package/dist/parser.js +1 -9
  214. package/dist/{pipeline-CtfJtPQc.d.cts → pipeline-72QmQlGx.d.ts} +3 -3
  215. package/dist/{pipeline-DCd5M6Gk.d.ts → pipeline-DCQicwWX.d.cts} +3 -3
  216. package/dist/resolvers.cjs +1 -12
  217. package/dist/resolvers.d.cts +3 -3
  218. package/dist/resolvers.d.ts +3 -3
  219. package/dist/resolvers.js +1 -3
  220. package/dist/services.cjs +1 -20
  221. package/dist/services.js +1 -3
  222. package/dist/testing.cjs +3 -477
  223. package/dist/testing.cjs.map +1 -1
  224. package/dist/testing.d.cts +12 -13
  225. package/dist/testing.d.ts +12 -13
  226. package/dist/testing.js +3 -469
  227. package/dist/testing.js.map +1 -1
  228. package/dist/uom.cjs +1 -55
  229. package/dist/uom.d.cts +3 -3
  230. package/dist/uom.d.ts +3 -3
  231. package/dist/uom.js +1 -10
  232. package/dist/utilities.cjs +1 -36
  233. package/dist/utilities.js +1 -7
  234. package/dist/vm.cjs +1 -295
  235. package/dist/vm.cjs.map +1 -1
  236. package/dist/vm.d.cts +22 -10
  237. package/dist/vm.d.ts +22 -10
  238. package/dist/vm.js +1 -193
  239. package/dist/vm.js.map +1 -1
  240. package/dist/worker.cjs +2 -492
  241. package/dist/worker.cjs.map +1 -1
  242. package/dist/worker.d.cts +19 -20
  243. package/dist/worker.d.ts +19 -20
  244. package/dist/worker.js +2 -483
  245. package/dist/worker.js.map +1 -1
  246. package/package.json +1 -13
  247. package/dist/chunk-267JPOTF.js +0 -406
  248. package/dist/chunk-267JPOTF.js.map +0 -1
  249. package/dist/chunk-2TZKENDH.cjs +0 -448
  250. package/dist/chunk-2TZKENDH.cjs.map +0 -1
  251. package/dist/chunk-3BOK2LDK.js +0 -17
  252. package/dist/chunk-3BOK2LDK.js.map +0 -1
  253. package/dist/chunk-3OWCDIPN.js +0 -215
  254. package/dist/chunk-3OWCDIPN.js.map +0 -1
  255. package/dist/chunk-3VGDNEE3.js +0 -84
  256. package/dist/chunk-3VGDNEE3.js.map +0 -1
  257. package/dist/chunk-4D6NIHE2.js +0 -451
  258. package/dist/chunk-4D6NIHE2.js.map +0 -1
  259. package/dist/chunk-4HQKTMWG.js +0 -7985
  260. package/dist/chunk-4HQKTMWG.js.map +0 -1
  261. package/dist/chunk-536WPM2V.cjs +0 -283
  262. package/dist/chunk-536WPM2V.cjs.map +0 -1
  263. package/dist/chunk-5HRB36DK.js +0 -405
  264. package/dist/chunk-5HRB36DK.js.map +0 -1
  265. package/dist/chunk-5ON7PUAZ.js +0 -12
  266. package/dist/chunk-5ON7PUAZ.js.map +0 -1
  267. package/dist/chunk-7KYSUDQO.js +0 -109
  268. package/dist/chunk-7KYSUDQO.js.map +0 -1
  269. package/dist/chunk-7ZX6B7SY.cjs +0 -3222
  270. package/dist/chunk-7ZX6B7SY.cjs.map +0 -1
  271. package/dist/chunk-ADBA3XBE.cjs +0 -20
  272. package/dist/chunk-ADBA3XBE.cjs.map +0 -1
  273. package/dist/chunk-ALYRJ72W.cjs +0 -434
  274. package/dist/chunk-ALYRJ72W.cjs.map +0 -1
  275. package/dist/chunk-AMOJYLG2.cjs +0 -1692
  276. package/dist/chunk-AMOJYLG2.cjs.map +0 -1
  277. package/dist/chunk-AQNHHJMJ.cjs +0 -261
  278. package/dist/chunk-B4HBEFTB.cjs +0 -375
  279. package/dist/chunk-B4HBEFTB.cjs.map +0 -1
  280. package/dist/chunk-B7LXJ6LC.cjs +0 -36
  281. package/dist/chunk-B7LXJ6LC.cjs.map +0 -1
  282. package/dist/chunk-B7NLZMQ3.cjs +0 -74
  283. package/dist/chunk-B7NLZMQ3.cjs.map +0 -1
  284. package/dist/chunk-BLI4NIQY.js +0 -98
  285. package/dist/chunk-BLI4NIQY.js.map +0 -1
  286. package/dist/chunk-BYJBUL7U.js +0 -499
  287. package/dist/chunk-BYJBUL7U.js.map +0 -1
  288. package/dist/chunk-CCBZZQAE.js +0 -312
  289. package/dist/chunk-CCBZZQAE.js.map +0 -1
  290. package/dist/chunk-CKQMXMHR.cjs +0 -219
  291. package/dist/chunk-CKQMXMHR.cjs.map +0 -1
  292. package/dist/chunk-CUR2WLI4.cjs +0 -507
  293. package/dist/chunk-CUR2WLI4.cjs.map +0 -1
  294. package/dist/chunk-DLEBSLF4.js +0 -336
  295. package/dist/chunk-DLEBSLF4.js.map +0 -1
  296. package/dist/chunk-E23GZEWL.cjs +0 -209
  297. package/dist/chunk-E23GZEWL.cjs.map +0 -1
  298. package/dist/chunk-EJ3ILXX6.cjs +0 -223
  299. package/dist/chunk-EJ3ILXX6.cjs.map +0 -1
  300. package/dist/chunk-ENKKJYD3.js +0 -333
  301. package/dist/chunk-ENKKJYD3.js.map +0 -1
  302. package/dist/chunk-ENRIK36Q.cjs +0 -94
  303. package/dist/chunk-ENRIK36Q.cjs.map +0 -1
  304. package/dist/chunk-ERCOHGXD.js +0 -356
  305. package/dist/chunk-ERCOHGXD.js.map +0 -1
  306. package/dist/chunk-FD5ZZHEU.js +0 -92
  307. package/dist/chunk-FD5ZZHEU.js.map +0 -1
  308. package/dist/chunk-FEAIOR7N.cjs +0 -91
  309. package/dist/chunk-FEAIOR7N.cjs.map +0 -1
  310. package/dist/chunk-GCM5JHMX.js +0 -88
  311. package/dist/chunk-GCM5JHMX.js.map +0 -1
  312. package/dist/chunk-GLA4JXBO.js +0 -204
  313. package/dist/chunk-GLA4JXBO.js.map +0 -1
  314. package/dist/chunk-HIQ5HSZL.cjs +0 -1923
  315. package/dist/chunk-HIQ5HSZL.cjs.map +0 -1
  316. package/dist/chunk-HVRVSI2Z.cjs +0 -829
  317. package/dist/chunk-HVRVSI2Z.cjs.map +0 -1
  318. package/dist/chunk-I4GAWIPW.js +0 -825
  319. package/dist/chunk-I4GAWIPW.js.map +0 -1
  320. package/dist/chunk-J45BCEZ4.cjs +0 -339
  321. package/dist/chunk-J45BCEZ4.cjs.map +0 -1
  322. package/dist/chunk-JG6ZJ2WU.js +0 -1513
  323. package/dist/chunk-JG6ZJ2WU.js.map +0 -1
  324. package/dist/chunk-L2TE7PMO.cjs +0 -14
  325. package/dist/chunk-L2TE7PMO.cjs.map +0 -1
  326. package/dist/chunk-LHZ6VOA7.js +0 -1764
  327. package/dist/chunk-LHZ6VOA7.js.map +0 -1
  328. package/dist/chunk-MN3LHRGV.cjs +0 -8012
  329. package/dist/chunk-MN3LHRGV.cjs.map +0 -1
  330. package/dist/chunk-MVTOCRV2.js +0 -213
  331. package/dist/chunk-MVTOCRV2.js.map +0 -1
  332. package/dist/chunk-N5NNW4VG.cjs +0 -341
  333. package/dist/chunk-N5NNW4VG.cjs.map +0 -1
  334. package/dist/chunk-N7FNVFXW.cjs +0 -32
  335. package/dist/chunk-N7FNVFXW.cjs.map +0 -1
  336. package/dist/chunk-NKW7LKYU.js +0 -3185
  337. package/dist/chunk-NKW7LKYU.js.map +0 -1
  338. package/dist/chunk-NLNDMWZC.js +0 -31
  339. package/dist/chunk-NLNDMWZC.js.map +0 -1
  340. package/dist/chunk-NNQ2TYDF.js +0 -1848
  341. package/dist/chunk-NNQ2TYDF.js.map +0 -1
  342. package/dist/chunk-NNZAEUDW.js +0 -6792
  343. package/dist/chunk-NNZAEUDW.js.map +0 -1
  344. package/dist/chunk-OUHT5Z36.cjs +0 -393
  345. package/dist/chunk-OUHT5Z36.cjs.map +0 -1
  346. package/dist/chunk-QFTDTX6K.cjs +0 -457
  347. package/dist/chunk-QFTDTX6K.cjs.map +0 -1
  348. package/dist/chunk-SBUFNJVE.js +0 -258
  349. package/dist/chunk-SBUFNJVE.js.map +0 -1
  350. package/dist/chunk-SRGQ72IR.cjs +0 -2800
  351. package/dist/chunk-SRGQ72IR.cjs.map +0 -1
  352. package/dist/chunk-SSV46KFA.cjs +0 -112
  353. package/dist/chunk-SSV46KFA.cjs.map +0 -1
  354. package/dist/chunk-T6ZYQJ63.cjs +0 -6807
  355. package/dist/chunk-T6ZYQJ63.cjs.map +0 -1
  356. package/dist/chunk-UKQHXPGW.js +0 -30
  357. package/dist/chunk-UKQHXPGW.js.map +0 -1
  358. package/dist/chunk-UO6BUV6K.js +0 -278
  359. package/dist/chunk-UO6BUV6K.js.map +0 -1
  360. package/dist/chunk-V4XG5QF6.js +0 -1685
  361. package/dist/chunk-V4XG5QF6.js.map +0 -1
  362. package/dist/chunk-VEKIWQ3F.cjs +0 -39
  363. package/dist/chunk-VEKIWQ3F.cjs.map +0 -1
  364. package/dist/chunk-WWQEY7BV.js +0 -67
  365. package/dist/chunk-WWQEY7BV.js.map +0 -1
  366. package/dist/chunk-WXEHD6TT.js +0 -2795
  367. package/dist/chunk-WXEHD6TT.js.map +0 -1
  368. package/dist/chunk-X6K3HUOY.cjs +0 -86
  369. package/dist/chunk-X6K3HUOY.cjs.map +0 -1
  370. package/dist/chunk-XA4CKRML.cjs +0 -316
  371. package/dist/chunk-XA4CKRML.cjs.map +0 -1
  372. package/dist/chunk-XBTEO4OB.js +0 -391
  373. package/dist/chunk-XBTEO4OB.js.map +0 -1
  374. package/dist/chunk-XIYYHA65.cjs +0 -101
  375. package/dist/chunk-XIYYHA65.cjs.map +0 -1
  376. package/dist/chunk-YLJ4XMA6.js +0 -33
  377. package/dist/chunk-YLJ4XMA6.js.map +0 -1
  378. package/dist/chunk-YRIKITGF.cjs +0 -1768
  379. package/dist/chunk-YRIKITGF.cjs.map +0 -1
  380. package/dist/chunk-Z2XP767T.cjs +0 -35
  381. package/dist/chunk-Z2XP767T.cjs.map +0 -1
  382. package/dist/chunk-Z4X2RWOF.js +0 -37
  383. package/dist/chunk-Z4X2RWOF.js.map +0 -1
  384. package/dist/chunk-Z7XGGLI2.js +0 -455
  385. package/dist/chunk-Z7XGGLI2.js.map +0 -1
  386. package/dist/chunk-ZMW6NU2K.cjs +0 -1516
  387. package/dist/chunk-ZMW6NU2K.cjs.map +0 -1
  388. package/dist/chunk-ZVTWQLK4.cjs +0 -459
  389. package/dist/chunk-ZVTWQLK4.cjs.map +0 -1
  390. package/dist/variables.cjs +0 -17
  391. package/dist/variables.cjs.map +0 -1
  392. package/dist/variables.d.cts +0 -87
  393. package/dist/variables.d.ts +0 -87
  394. package/dist/variables.js +0 -4
  395. package/dist/variables.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ import {a,c}from'./chunk-IJMNVBIS.js';import {a as a$1}from'./chunk-62LMTO4F.js';import {c as c$1}from'./chunk-MPB7KUN5.js';var o={Lowest:0,Assignment:10,LogicalOr:12,LogicalAnd:14,Conjunction:16,BitwiseOr:18,BitwiseXor:20,BitwiseAnd:22,Conditional:24,Shift:27,Sum:30,Product:40,Uncertainty:45,Exponent:50,Prefix:60,Postfix:70,Call:80};var l={[a.PLUS]:o.Sum,[a.MINUS]:o.Sum,[a.STAR]:o.Product,[a.SLASH]:o.Product,[a.MOD]:o.Product,[a.CARET]:o.Exponent,[a.BIT_OR]:o.BitwiseOr,[a.BIT_XOR]:o.BitwiseXor,[a.BIT_AND]:o.BitwiseAnd,[a.LSHIFT]:o.Shift,[a.RSHIFT]:o.Shift,[a.URSHIFT]:o.Shift,[a.PERCENT]:o.Postfix,[a.OF]:o.Product},m=null;function N(){if(m)return m;let s=0;for(let e of Object.keys(l)){let t=c(e);t>s&&(s=t);}for(let e of Object.values(a)){let t=c(e);t>s&&(s=t);}let n=new Uint8Array(s+1);for(let[e,t]of Object.entries(l)){let u=c(e);n[u]=t;}return m=n,n}function O(){m=null;}var r=255,f=class{constructor(n){this.pluginFunctionIndex=n;this.opcodes=[];this.numbers=[];this.strings=[];this.stringIndex=new Map;this._hasAsync=false;this.userFunctionBodies=[];this.anonymousBodies=[];}get pluginIndexMap(){return this.pluginFunctionIndex}emitPluginCall(n,e){let t=this.pluginFunctionIndex?.get(n);if(t===void 0)throw c$1.execution("UNKNOWN_PLUGIN_FUNCTION",`No registered plugin function named "${n}". A package must declare it in its pluginFunctions record and be registered before an expression using it is parsed.`,{functionName:n});this.emitOpcode(50),this.emitIndex(t),this.emitIndex(e);}emitOpcode(n){this.opcodes.push(n),n===50&&(this._hasAsync=true);}emitNumber(n){let e=this.numbers.length;if(e>r)throw c$1.parsing("TOO_MANY_NUMERIC_CONSTANTS",`Expression has more than ${r+1} numeric literals, exceeding the bytecode constant pool's limit.`,{limit:r+1});this.numbers.push(n),this.opcodes.push(e);}emitString(n){let e=this.stringIndex.get(n);if(e===void 0){if(e=this.strings.length,e>r)throw c$1.parsing("TOO_MANY_STRING_CONSTANTS",`Expression has more than ${r+1} distinct string literals, exceeding the bytecode constant pool's limit.`,{limit:r+1});this.strings.push(n),this.stringIndex.set(n,e);}this.opcodes.push(e);}emitIndex(n){this.opcodes.push(n);}emitByte(n){this.opcodes.push(n);}get currentLength(){return this.opcodes.length}emitUserFunctionBody(n,e,t){let u=this.userFunctionBodies.length;if(u>r)throw c$1.parsing("TOO_MANY_FUNCTION_DEFINITIONS",`More than ${r+1} function definitions on one line, exceeding the bytecode constant pool's limit.`,{limit:r+1});return this.userFunctionBodies.push({name:n,params:e,program:t}),u}emitAnonymousBody(n,e){let t=this.anonymousBodies.length;if(t>r)throw c$1.parsing("TOO_MANY_ANONYMOUS_BODIES",`More than ${r+1} map/reduce transform expressions on one line, exceeding the bytecode constant pool's limit.`,{limit:r+1});return this.anonymousBodies.push({params:n,program:e}),t}patchJump(n,e){this.opcodes[n]=e;}build(){return {opcodes:new Uint8Array(this.opcodes),numbers:new Float64Array(this.numbers),strings:[...this.strings],constants:new Map,hasAsync:this._hasAsync,userFunctionBodies:this.userFunctionBodies.length>0?[...this.userFunctionBodies]:void 0,anonymousBodies:this.anonymousBodies.length>0?[...this.anonymousBodies]:void 0}}buildInto(n){let e=this.opcodes.length,t=this.numbers.length,u=n&&n.opcodes.length>=e,b=n&&n.numbers.length>=t,h=u?new Uint8Array(n.opcodes.buffer,n.opcodes.byteOffset,e):new Uint8Array(e),p=b?new Float64Array(n.numbers.buffer,n.numbers.byteOffset,t):new Float64Array(t);for(let d=0;d<e;d++)h[d]=this.opcodes[d];for(let d=0;d<t;d++)p[d]=this.numbers[d];return {opcodes:h,numbers:p,strings:[...this.strings],constants:new Map,hasAsync:this._hasAsync,userFunctionBodies:this.userFunctionBodies.length>0?[...this.userFunctionBodies]:void 0,anonymousBodies:this.anonymousBodies.length>0?[...this.anonymousBodies]:void 0}}reset(){this.opcodes.length=0,this.numbers.length=0,this.strings.length=0,this.stringIndex.clear(),this._hasAsync=false,this.userFunctionBodies.length=0,this.anonymousBodies.length=0;}};var B=/^\d{1,3}(\.\d{3}){2,}$/,y=/^\d+$/;function U(s,n){let e=s.endsWith("n")?s.slice(0,-1):s;if(y.test(e))return e;let t=B.test(e)?e.split(".").join(""):A(e,n);if(!y.test(t)){let u=e.includes(".")?".":e.includes(",")?",":e;throw c$1.parsing("INVALID_NUMBER_LITERAL",`"${s}" is not a whole number: "${u}" separates decimals in the ${n} locale, and a whole number cannot have a fractional part.`,{raw:s,localeCode:n,separator:u})}return t}function A(s,n){let e=a$1(n).display.thousandsSeparator;return e?s.split(e).join(""):s}export{o as a,N as b,O as c,f as d,U as e};//# sourceMappingURL=chunk-YVKHEAFT.js.map
2
+ //# sourceMappingURL=chunk-YVKHEAFT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/parser/BindingPower.ts","../src/parser/BytecodeBuilder.ts","../src/parser/BigIntLiteral.ts"],"names":["BindingPower","BUILTIN_INFIX_BP","TokenTypes","_bpTable","buildBindingPowerTable","maxId","name","id","tokenTypeId","table","bp","invalidateBindingPowerTable","MAX_CONSTANT_POOL_INDEX","BytecodeBuilder","pluginFunctionIndex","argCount","index","ErrorFactory","op","idx","s","b","params","program","position","target","buf","opLen","numLen","reuseOpcodes","reuseNumbers","opcodes","numbers","i","CHAINED_DOT_THOUSANDS_GROUPS","DIGITS_ONLY","bigIntLiteralDigits","raw","localeCode","withoutSuffix","digits","stripLocaleGrouping","separator","text","thousandsSeparator","getLocale"],"mappings":"4HAWO,IAAMA,CAAAA,CAAe,CAC1B,MAAA,CAAQ,CAAA,CACR,WAAY,EAAA,CACZ,SAAA,CAAW,EAAA,CACX,UAAA,CAAY,EAAA,CAaZ,WAAA,CAAa,GAab,SAAA,CAAW,EAAA,CACX,WAAY,EAAA,CACZ,UAAA,CAAY,GACZ,WAAA,CAAa,EAAA,CACb,KAAA,CAAO,EAAA,CACP,GAAA,CAAK,EAAA,CACL,QAAS,EAAA,CAMT,WAAA,CAAa,GAIb,QAAA,CAAU,EAAA,CACV,OAAQ,EAAA,CACR,OAAA,CAAS,EAAA,CACT,IAAA,CAAM,EACR,EAiDA,IAAMC,CAAAA,CAA2C,CAE/C,CAACC,CAAAA,CAAW,IAAI,EAAOF,CAAAA,CAAa,GAAA,CACpC,CAACE,CAAAA,CAAW,KAAK,EAAMF,EAAa,GAAA,CACpC,CAACE,EAAW,IAAI,EAAOF,EAAa,OAAA,CACpC,CAACE,CAAAA,CAAW,KAAK,EAAMF,CAAAA,CAAa,QACpC,CAACE,CAAAA,CAAW,GAAG,EAAQF,CAAAA,CAAa,QAGpC,CAACE,CAAAA,CAAW,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ACtE,IAAMM,CAAAA,CAAqBC,GAAAA,CAAUP,CAAU,EAAE,OAAA,CAAQ,kBAAA,CACzD,OAAOM,CAAAA,CAAqBD,CAAAA,CAAK,KAAA,CAAMC,CAAkB,CAAA,CAAE,IAAA,CAAK,EAAE,CAAA,CAAID,CACvE","file":"chunk-YVKHEAFT.js","sourcesContent":["/**\n * Named precedence levels for the Pratt parser, from loosest (`Lowest`) to\n * tightest (`Call`) binding. A custom infix parselet compares its own\n * binding power against the current expression's to decide whether to\n * consume the next operator (higher power binds tighter, e.g. `*` over `+`).\n *\n * Package authors reference these when declaring an infix parselet in a\n * package's `infixParselets`. See the built-in packages for examples of\n * picking an appropriate level (e.g. arithmetic `+`/`-` use `Sum`, `*`/`/`\n * use `Product`).\n */\nexport const BindingPower = {\n Lowest: 0,\n Assignment: 10,\n LogicalOr: 12, // `or`, `||` — loosest of the boolean-logic operators\n LogicalAnd: 14, // `&&` — binds tighter than `or` (\"a or b and c\" = \"a or (b and c)\")\n // The word \"and\" (`AND_CONJ`), which is both arithmetic addition (\"5 and 3\"\n // is 8) and boolean conjunction (\"true and false\"). A phrase parselet\n // collecting a list (\"average of X, Y and Z\") parses each argument at this\n // level, and an argument stops at any operator whose power is <= the level it\n // was parsed at, so putting \"and\" here is what makes it end an argument\n // rather than be consumed as the addition it also is. Everything an argument\n // should keep binds tighter, including a genuine \"+\" (`Sum`).\n //\n // It sits BELOW `Conditional` because the boolean reading needs comparisons\n // to be its operands: at 28, \"5 > 3 and 2 > 1\" parsed as \"5 > (3 and 2) > 1\"\n // and answered false. Above `LogicalAnd` so that \"and\" is still the tighter\n // of the two conjunctions, and two steps off each neighbour to leave room.\n Conjunction: 16,\n // The bitwise trio and the shifts, ordered exactly as C and JavaScript order\n // them, which is the order every language that borrowed these operators from\n // C uses: `|` looser than `xor`, `xor` looser than `&`, all three looser than\n // comparison, and the shifts tighter than comparison but looser than `+`.\n // They used to share one level (35) between `Sum` and `Product`, so\n // \"1 + 2 << 3\" answered 17 where JavaScript answers 24 and \"4 & 3 + 1\"\n // answered 1 where JavaScript answers 4. Each has its own level now because\n // a shared level makes \"4 | 6 & 3\" group left instead of letting `&` win.\n //\n // They stay TIGHTER than `Conjunction` so that a phrase argument parsed at\n // that level (\"average of 5 | 3, 2 and 4\") keeps its bitwise operators\n // instead of stopping at the first one.\n BitwiseOr: 18, // `|`\n BitwiseXor: 20, // the `xor` keyword (`BIT_XOR`), not the `^` exponent token\n BitwiseAnd: 22, // `&`\n Conditional: 24, // comparisons (`==`, `<`, `>=`, ...), tighter than the bitwise trio, looser than the shifts\n Shift: 27, // `<<`, `>>`, `>>>`\n Sum: 30,\n Product: 40,\n // `±` (the uncertainty operator), tighter than `+ - * /` and looser than `^`,\n // so the tolerance attaches to its adjacent values: `12.3 ± 0.5 * 4` reads as\n // `(12.3 ± 0.5) * 4` (the parenthesised headline case), and `2 + 3 ± 0.5` as\n // `2 + (3 ± 0.5)`. A Tier-2 parselet (packages/uncertainty/), so this level is\n // read off the parselet rather than the Tier-1 BUILTIN_INFIX_BP table below.\n Uncertainty: 45,\n // `^`, RIGHT-associative: \"2 ^ 3 ^ 2\" is 2^(3^2) = 512, as in mathematics,\n // Python, Ruby and JavaScript's `**`. See PrecedenceParser.parseExpression\n // and BinaryOpParselet for the two places that associativity is implemented.\n Exponent: 50,\n Prefix: 60,\n Postfix: 70,\n Call: 80,\n} as const;\n\n/**\n * Set the binding power of a named operator.\n *\n * Binding power is what decides precedence in the Pratt parser: a higher number\n * binds tighter, so `*` outranks `+`. Changing one changes how every existing\n * expression using that operator parses, which is why packages should allocate\n * a new name rather than adjust a built-in.\n *\n * @param name - Operator name.\n * @param power - Higher binds tighter.\n */\nexport function setBindingPower(name: string, power: number): void {\n (BindingPower as Record<string, number>)[name] = power;\n}\n\n/**\n * Read the binding power of a named operator.\n *\n * @param name - Operator name.\n * @returns Its binding power, or 0 when the name is unknown, which makes an\n * unregistered operator terminate an expression rather than swallow the rest\n * of it.\n */\nexport function getBindingPower(name: string): number {\n return (BindingPower as Record<string, number>)[name] ?? 0;\n}\n\n// ── Built-in Infix Operator Binding Power Table ──────────────────────────────\n// Pre-computed Uint8Array lookup indexed by token typeId.\n// value > 0 → built-in infix operator with that binding power\n// value = 0 → not a built-in infix, fall through to Tier 2 parselet registry\n//\n// Built at module load via buildBindingPowerTable(). The table is sparse\n// most entries are 0 since only ~15 of 80+ token types are infix operators.\n//\n// Performance: Uint8Array[typeId] is a single typed array load, no Map.get()\n// no string hashing, no property chain. V8 eliminates bounds checks when typeId\n// is known to be within array length.\n\nimport { TokenTypes } from \"@solve-js/lexer/Token\";\nimport { tokenTypeId } from \"@solve-js/lexer/Token\";\n\n/**\n * Mapping of token type names → binding powers for built-in infix operators.\n * Only operators listed here get the Tier 1 fast path in PrecedenceParser.\n * All other infix tokens use the Tier 2 parselet registry fallback.\n */\nconst BUILTIN_INFIX_BP: Record<string, number> = {\n // Arithmetic (infix, left-associative)\n [TokenTypes.PLUS]: BindingPower.Sum,\n [TokenTypes.MINUS]: BindingPower.Sum,\n [TokenTypes.STAR]: BindingPower.Product,\n [TokenTypes.SLASH]: BindingPower.Product,\n [TokenTypes.MOD]: BindingPower.Product,\n\n // Arithmetic (infix, RIGHT-associative, PrecedenceParser handles this specially)\n [TokenTypes.CARET]: BindingPower.Exponent,\n\n // Bitwise and shift (infix, left-associative), one level each, ordered as C\n // and JavaScript order them. `>>>` used to be missing from this table\n // entirely, which left it running at its Tier 2 parselet level while `>>`\n // ran at the Tier 1 one, so \"16 >> 3 & 1\" and \"16 >>> 3 & 1\" grouped\n // differently and answered 0 and 8.\n [TokenTypes.BIT_OR]: BindingPower.BitwiseOr,\n [TokenTypes.BIT_XOR]: BindingPower.BitwiseXor,\n [TokenTypes.BIT_AND]: BindingPower.BitwiseAnd,\n [TokenTypes.LSHIFT]: BindingPower.Shift,\n [TokenTypes.RSHIFT]: BindingPower.Shift,\n [TokenTypes.URSHIFT]: BindingPower.Shift,\n\n // Postfix (no right operand, PrecedenceParser handles this specially)\n [TokenTypes.PERCENT]: BindingPower.Postfix,\n\n // Percentage keyword (infix, left-associative: \"50% of 200\" → MUL)\n [TokenTypes.OF]: BindingPower.Product,\n};\n\n// Note: These token types are intentionally NOT in the BP_TABLE, they stay in\n// the Tier 2 parselet registry because they require complex handling:\n// IN, TO → UoM conversion parselets (peek at target unit token, complex logic)\n// DOT → Property access (chained OBJ_GET, needs left-token tracking)\n// EQUALS → Assignment (VariableParselet handles :var = expr pattern)\n// EQUALITY, NEQ, GTE, LTE → Comparison ops (need dedicated VM opcodes, task 2.15a)\n// COMMA → Argument separator (function calls, array/object literals)\n\n/** Cached BP_TABLE, built once at module load, immutable thereafter. */\nlet _bpTable: Uint8Array | null = null;\n\n/**\n * Build the Uint8Array binding power table indexed by token typeId.\n * Idempotent, returns cached table on subsequent calls.\n *\n * Must be called after all token types are registered (via registerAllTokenTypes())\n * and after plugin providers have registered their token types.\n */\nexport function buildBindingPowerTable(): Uint8Array {\n if (_bpTable) return _bpTable;\n\n // Size to the largest registered typeId + 1\n let maxId = 0;\n for (const name of Object.keys(BUILTIN_INFIX_BP)) {\n const id = tokenTypeId(name);\n if (id > maxId) maxId = id;\n }\n // Also scan all TokenTypes to ensure table covers all registered IDs\n for (const name of Object.values(TokenTypes)) {\n const id = tokenTypeId(name);\n if (id > maxId) maxId = id;\n }\n\n const table = new Uint8Array(maxId + 1);\n for (const [name, bp] of Object.entries(BUILTIN_INFIX_BP)) {\n const id = tokenTypeId(name);\n table[id] = bp;\n }\n\n _bpTable = table;\n return table;\n}\n\n/**\n * Drop the cached table, so the next {@link buildBindingPowerTable} call builds\n * a fresh one sized to the token types registered by then.\n *\n * It does NOT add a plugin's operator to the Tier 1 fast path, which is what\n * this comment used to promise. The values in the table come from\n * `BUILTIN_INFIX_BP`, which is module-private and has no registration path, so\n * a rebuilt table holds the same binding powers and a plugin token still reads\n * 0. `PrecedenceParser.BP_TABLE` is a static initialized once at class\n * definition time and never re-read, so it would not see a rebuild anyway.\n *\n * A plugin's infix operator takes the Tier 2 parselet-registry route instead,\n * which is where an operator whose binding power the engine does not already\n * know is meant to live.\n */\nexport function invalidateBindingPowerTable(): void {\n _bpTable = null;\n}\n","import { OpCode } from \"@solve-js/parser/OpCode\";\nimport { ErrorFactory } from \"@solve-js/errors/UnifiedErrorFramework\";\n\n/**\n * `BytecodeProgram.opcodes` is a `Uint8Array`, every operand written into\n * it (including constant-pool indices from {@link BytecodeBuilder.emitNumber}/\n * {@link BytecodeBuilder.emitString}) is truncated to a single byte on\n * `build()`. Exceeding this silently wraps the index (e.g. entry 300 reads\n * back as entry 44), producing a wrong result with no error. See\n * {@link BytecodeBuilder.emitNumber} for the guard that turns this into a\n * thrown error instead.\n */\nconst MAX_CONSTANT_POOL_INDEX = 255;\n\n/**\n * Compiled bytecode program produced by {@link BytecodeBuilder}.\n * Ready for consumption by {@link executeBytecode} without further processing.\n */\nexport interface BytecodeProgram {\n\topcodes: Uint8Array;\n\tnumbers: Float64Array;\n\tstrings: string[];\n\tconstants?: Map<number, number>;\n\t/**\n\t * Whether the program contains any async opcodes (CALL_PLUGIN, etc.).\n\t * Set during compilation by the BytecodeBuilder. Allows the engine\n\t * to skip the O(n) resolver preflight check in O(1) for purely\n\t * synchronous expressions like `2 + 2`.\n\t */\n\thasAsync: boolean;\n\t/**\n\t * User-defined-function bodies compiled alongside this program (one\n\t * entry per `name(params) = body` definition on this line). See\n\t * {@link BytecodeBuilder.emitUserFunctionBody}. `OpCode.DEFINE_USER_FUNCTION`'s\n\t * operand is an index into this array, resolved at VM-execution time\n\t * (not parse time) so a diagnostic/lookahead parse that never actually\n\t * executes the definition line has no side effect on `vm.userFunctions`.\n\t */\n\tuserFunctionBodies?: UserFunctionDef[];\n\t/**\n\t * Anonymous function bodies compiled alongside this program, one entry\n\t * per `map`/`reduce` inline transform expression (e.g. the `10*x` in\n\t * `map(10*x, [0,1,500])`). See {@link BytecodeBuilder.emitAnonymousBody}.\n\t * Deliberately a SEPARATE side-table from `userFunctionBodies`, not\n\t * routed through `vm.userFunctions` at all: an inline body has no name\n\t * and must never leak into the persistent name-keyed registry the way\n\t * a real `f(x) = ...` definition does.\n\t */\n\tanonymousBodies?: AnonymousBodyDef[];\n}\n\n/**\n * An anonymous transform body for `map`/`reduce`'s inline-expression form\n * (e.g. `10*x` in `map(10*x, [0,1,500])`, or `acc+x` in `reduce(acc+x,\n * [1,2,3])`). Structurally identical to {@link UserFunctionDef} minus the\n * `name`. See `OpCode.MAP_INVOKE`/`REDUCE_INVOKE` and\n * `vm/VM.ts`'s handlers, which build a call frame from `params`/`args`\n * exactly like `CALL_USER_FUNCTION` does, just without ever registering\n * the body in `vm.userFunctions`.\n */\nexport interface AnonymousBodyDef {\n\tparams: string[];\n\tprogram: BytecodeProgram;\n}\n\n/**\n * A user-defined, parameterized, reusable function's compiled form\n * (`f(x) = 2*x + 1`). See `OpCode.DEFINE_USER_FUNCTION`/`CALL_USER_FUNCTION`\n * and `vm/VM.ts`'s `VM.defineUserFunction`/`getUserFunction`.\n *\n * `program` is the body compiled to its OWN independent `BytecodeProgram`,\n * not a fragment of the definition line's own bytecode. Parameter names\n * inside the body compile to ORDINARY `LOAD_VAR <name>` opcodes, no\n * parse-time rewriting, because parameter resolution happens dynamically\n * at the VM level: `CALL_USER_FUNCTION` pushes a name-keyed call frame\n * (`Map<string, Value>`) before re-executing `program`, and `VM.getVar()`\n * checks the innermost call frame before falling back to the flat\n * document-variable store. This is why a `UNIT`-collision parameter name\n * (e.g. `h` in `area(w, h) = w * h`, which lexes as the \"hour\" unit) needs\n * no special handling anywhere, it's just another `LOAD_VAR \"h\"`, resolved\n * the same way as any other name.\n */\nexport interface UserFunctionDef {\n\tname: string;\n\tparams: string[];\n\tprogram: BytecodeProgram;\n}\n\n/**\n * Direct-to-bytecode compiler for the Pratt parser.\n *\n * Accumulates opcodes, numeric constants, and string references during parsing,\n * then produces a {@link BytecodeProgram} for VM execution. Supports:\n * - Standard build via {@link build}\n * - Zero-copy build into pre-allocated buffers via {@link buildInto}\n * - In-place reset for reuse without reallocation\n */\nexport class BytecodeBuilder {\n\tprivate opcodes: number[] = [];\n\tprivate numbers: number[] = [];\n\tprivate strings: string[] = [];\n\tprivate stringIndex = new Map<string, number>();\n\tprivate _hasAsync = false;\n\tprivate userFunctionBodies: UserFunctionDef[] = [];\n\tprivate anonymousBodies: AnonymousBodyDef[] = [];\n\n\t/**\n\t * The per-engine `plugin function name -> registry index` map, wired in by\n\t * the engine so {@link emitPluginCall} can resolve a name at emit time. The\n\t * same object reference is shared with every builder in an engine (the pool\n\t * and each ad-hoc nested-body builder), and the engine populates it as\n\t * packages register, so a parselet never sees the numeric index.\n\t */\n\tconstructor(private readonly pluginFunctionIndex?: ReadonlyMap<string, number>) {}\n\n\t/** The name->index map, so a nested-body builder inherits the same resolution. */\n\tget pluginIndexMap(): ReadonlyMap<string, number> | undefined {\n\t\treturn this.pluginFunctionIndex;\n\t}\n\n\t/**\n\t * Emit a plugin-function call by NAME. The engine assigns each registered\n\t * `pluginFunctions` entry an index at registration; this resolves the name to\n\t * that index and emits `CALL_PLUGIN` + index + argCount. Package authors emit\n\t * through this rather than a hand-allocated index.\n\t */\n\temitPluginCall(name: string, argCount: number): void {\n\t\tconst index = this.pluginFunctionIndex?.get(name);\n\t\tif (index === undefined) {\n\t\t\tthrow ErrorFactory.execution(\n\t\t\t\t\"UNKNOWN_PLUGIN_FUNCTION\",\n\t\t\t\t`No registered plugin function named \"${name}\". A package must declare it in its pluginFunctions record and be registered before an expression using it is parsed.`,\n\t\t\t\t{ functionName: name },\n\t\t\t);\n\t\t}\n\t\tthis.emitOpcode(OpCode.CALL_PLUGIN);\n\t\tthis.emitIndex(index);\n\t\tthis.emitIndex(argCount);\n\t}\n\n\t/** Emit an {@link OpCode} instruction. */\n\temitOpcode(op: OpCode): void {\n\t\tthis.opcodes.push(op);\n\t\tif (op === OpCode.CALL_PLUGIN) {\n\t\t\tthis._hasAsync = true;\n\t\t}\n\t}\n\n\t/**\n\t * Emit a numeric literal: appends `n` to the program's constant pool and\n\t * writes its index into the opcode stream (read back by the VM as e.g.\n\t * `PUSH_NUMBER <idx>`).\n\t *\n\t * Numeric constants are NOT deduplicated (unlike {@link emitString})\n\t * every call appends a new entry, so an expression with more than\n\t * {@link MAX_CONSTANT_POOL_INDEX}+1 distinct numeric-literal occurrences\n\t * throws rather than silently wrapping the index (see\n\t * `MAX_CONSTANT_POOL_INDEX`'s doc for what that would otherwise do).\n\t *\n\t * @throws If the constant pool would exceed 256 entries.\n\t */\n\temitNumber(n: number): void {\n\t\tconst idx = this.numbers.length;\n\t\tif (idx > MAX_CONSTANT_POOL_INDEX) {\n\t\t\tthrow ErrorFactory.parsing(\n\t\t\t\t\"TOO_MANY_NUMERIC_CONSTANTS\",\n\t\t\t\t`Expression has more than ${MAX_CONSTANT_POOL_INDEX + 1} numeric literals, exceeding the bytecode constant pool's limit.`,\n\t\t\t\t{ limit: MAX_CONSTANT_POOL_INDEX + 1 }\n\t\t\t);\n\t\t}\n\t\tthis.numbers.push(n);\n\t\tthis.opcodes.push(idx);\n\t}\n\n\t/**\n\t * Emit a string literal: interns `s` into the program's string pool\n\t * (deduplicated via `stringIndex`) and writes its index into the opcode\n\t * stream. Subject to the same constant-pool bound as {@link emitNumber},\n\t * but since strings ARE deduplicated, only distinct string values count\n\t * against the limit.\n\t *\n\t * @throws If the string pool would exceed 256 distinct entries.\n\t */\n\temitString(s: string): void {\n\t\tlet idx = this.stringIndex.get(s);\n\t\tif (idx === undefined) {\n\t\t\tidx = this.strings.length;\n\t\t\tif (idx > MAX_CONSTANT_POOL_INDEX) {\n\t\t\t\tthrow ErrorFactory.parsing(\n\t\t\t\t\t\"TOO_MANY_STRING_CONSTANTS\",\n\t\t\t\t\t`Expression has more than ${MAX_CONSTANT_POOL_INDEX + 1} distinct string literals, exceeding the bytecode constant pool's limit.`,\n\t\t\t\t\t{ limit: MAX_CONSTANT_POOL_INDEX + 1 }\n\t\t\t\t);\n\t\t\t}\n\t\t\tthis.strings.push(s);\n\t\t\tthis.stringIndex.set(s, idx);\n\t\t}\n\t\tthis.opcodes.push(idx);\n\t}\n\n\t/**\n\t * Emit a raw numeric operand (0-255) following an opcode, e.g. a\n\t * plugin-function index for `CALL_PLUGIN`, or an argument count. Unlike\n\t * {@link emitOpcode}, this does not go through the `OpCode` enum, so\n\t * package authors use this (not an unsafe cast to `OpCode`) to push\n\t * operands their own opcode handler expects to read positionally.\n\t */\n\temitIndex(idx: number): void {\n\t\tthis.opcodes.push(idx);\n\t}\n\n\t/** Emit a raw byte (0-255), used for fixed small operands like argument counts. */\n\temitByte(b: number): void {\n\t\tthis.opcodes.push(b);\n\t}\n\n\t/** Number of opcodes/operands emitted so far, used to compute jump targets before {@link patchJump}. */\n\tget currentLength(): number {\n\t\treturn this.opcodes.length;\n\t}\n\n\t/**\n\t * Register a compiled user-defined-function body, returning its index\n\t * into this program's `userFunctionBodies` side-table, the caller emits\n\t * that index as `DEFINE_USER_FUNCTION`'s operand via {@link emitIndex}.\n\t * Subject to the same {@link MAX_CONSTANT_POOL_INDEX} bound as\n\t * {@link emitNumber}/{@link emitString} (the index itself is a single\n\t * opcode-stream byte), in practice a single line defines at most a\n\t * handful of functions, so this limit is never realistically reached.\n\t *\n\t * @throws If more than 256 function bodies are registered on one program.\n\t */\n\temitUserFunctionBody(name: string, params: string[], program: BytecodeProgram): number {\n\t\tconst idx = this.userFunctionBodies.length;\n\t\tif (idx > MAX_CONSTANT_POOL_INDEX) {\n\t\t\tthrow ErrorFactory.parsing(\n\t\t\t\t\"TOO_MANY_FUNCTION_DEFINITIONS\",\n\t\t\t\t`More than ${MAX_CONSTANT_POOL_INDEX + 1} function definitions on one line, exceeding the bytecode constant pool's limit.`,\n\t\t\t\t{ limit: MAX_CONSTANT_POOL_INDEX + 1 }\n\t\t\t);\n\t\t}\n\t\tthis.userFunctionBodies.push({ name, params, program });\n\t\treturn idx;\n\t}\n\n\t/**\n\t * Register a compiled `map`/`reduce` anonymous transform body, returning\n\t * its index into this program's `anonymousBodies` side-table, the\n\t * caller emits that index as `MAP_INVOKE`/`REDUCE_INVOKE`'s operand via\n\t * {@link emitIndex}. Same {@link MAX_CONSTANT_POOL_INDEX} bound as\n\t * {@link emitUserFunctionBody}.\n\t *\n\t * @throws If more than 256 anonymous bodies are registered on one program.\n\t */\n\temitAnonymousBody(params: string[], program: BytecodeProgram): number {\n\t\tconst idx = this.anonymousBodies.length;\n\t\tif (idx > MAX_CONSTANT_POOL_INDEX) {\n\t\t\tthrow ErrorFactory.parsing(\n\t\t\t\t\"TOO_MANY_ANONYMOUS_BODIES\",\n\t\t\t\t`More than ${MAX_CONSTANT_POOL_INDEX + 1} map/reduce transform expressions on one line, exceeding the bytecode constant pool's limit.`,\n\t\t\t\t{ limit: MAX_CONSTANT_POOL_INDEX + 1 }\n\t\t\t);\n\t\t}\n\t\tthis.anonymousBodies.push({ params, program });\n\t\treturn idx;\n\t}\n\n\t/** Overwrite a previously-emitted placeholder operand at `position` with the real jump `target`, once known. */\n\tpatchJump(position: number, target: number): void {\n\t\tthis.opcodes[position] = target;\n\t}\n\n\t/**\n\t * Build the accumulated opcodes/numbers/strings into a BytecodeProgram.\n\t * Creates new TypedArrays, the builder can be reused after this call.\n\t */\n\tbuild(): BytecodeProgram {\n\t\treturn {\n\t\t\topcodes: new Uint8Array(this.opcodes),\n\t\t\tnumbers: new Float64Array(this.numbers),\n\t\t\t// Defensive copy: .length = 0 in reset() would clear a shared reference.\n\t\t\t// Strings are rare (only UoM/datetime parselets emit them), so the copy\n\t\t\t// cost is negligible.\n\t\t\tstrings: [...this.strings],\n\t\t\tconstants: new Map(),\n\t\t\thasAsync: this._hasAsync,\n\t\t\tuserFunctionBodies: this.userFunctionBodies.length > 0 ? [...this.userFunctionBodies] : undefined,\n\t\t\tanonymousBodies: this.anonymousBodies.length > 0 ? [...this.anonymousBodies] : undefined,\n\t\t};\n\t}\n\n\t/**\n\t * Build directly into a pre-allocated buffer for zero-copy VM consumption.\n\t *\n\t * When `buf` is provided and large enough, writes into it and returns\n\t * subarray **views** (not copies), the returned TypedArrays share the\n\t * buffer's underlying ArrayBuffer. The caller MUST NOT mutate the buffer\n\t * until the returned BytecodeProgram is no longer needed.\n\t *\n\t * If the caller intends to cache the result, they must copy the TypedArrays\n\t * (e.g. `new Uint8Array(program.opcodes)`) before reusing the buffer pool.\n\t *\n\t * When `buf` is omitted or too small, allocates fresh TypedArrays.\n\t */\n\tbuildInto(buf?: { opcodes: Uint8Array; numbers: Float64Array }): BytecodeProgram {\n\t\tconst opLen = this.opcodes.length;\n\t\tconst numLen = this.numbers.length;\n\n\t\tconst reuseOpcodes = buf && buf.opcodes.length >= opLen;\n\t\tconst reuseNumbers = buf && buf.numbers.length >= numLen;\n\n\t\t// Subarray views that share the buffer's ArrayBuffer (zero-copy)\n\t\tconst opcodes = reuseOpcodes\n\t\t\t? new Uint8Array(buf!.opcodes.buffer, buf!.opcodes.byteOffset, opLen)\n\t\t\t: new Uint8Array(opLen);\n\t\tconst numbers = reuseNumbers\n\t\t\t? new Float64Array(buf!.numbers.buffer, buf!.numbers.byteOffset, numLen)\n\t\t\t: new Float64Array(numLen);\n\n\t\t// Write data into the views\n\t\tfor (let i = 0; i < opLen; i++) opcodes[i] = this.opcodes[i];\n\t\tfor (let i = 0; i < numLen; i++) numbers[i] = this.numbers[i];\n\n\t\treturn {\n\t\t\topcodes,\n\t\t\tnumbers,\n\t\t\tstrings: [...this.strings],\n\t\t\tconstants: new Map(),\n\t\t\thasAsync: this._hasAsync,\n\t\t\tuserFunctionBodies: this.userFunctionBodies.length > 0 ? [...this.userFunctionBodies] : undefined,\n\t\t\tanonymousBodies: this.anonymousBodies.length > 0 ? [...this.anonymousBodies] : undefined,\n\t\t};\n\t}\n\n\treset(): void {\n\t\t// Retain backing stores with .length = 0 to avoid reallocation on growth.\n\t\t// = [] discards the ArrayBuffer, forcing V8 to reallocate on every push()\n\t\t// threshold (4→8→16→32...). For a 50-opcode expression, that's 3-4 copies.\n\t\tthis.opcodes.length = 0;\n\t\tthis.numbers.length = 0;\n\t\tthis.strings.length = 0;\n\t\tthis.stringIndex.clear();\n\t\tthis._hasAsync = false;\n\t\tthis.userFunctionBodies.length = 0;\n\t\tthis.anonymousBodies.length = 0;\n\t}\n}\n","/**\n * Turning a `123n` literal's source text into the digits `PUSH_BIGINT` stores.\n *\n * The lexer coalesces thousands groups into the number token it is building,\n * accepting both `,` and `.` as the separator regardless of locale (see\n * `lexer/ExpressionLexer.ts`'s \"Thousands separators\" block). For a NUMBER that\n * is fine, because the separators are stripped again when the text is turned\n * into a double. For a BIGINT nothing stripped them: both consumers took the\n * token text, removed the trailing `n`, and handed the rest straight to\n * `BigInt()`.\n *\n * So `1.000n` reached `BigInt(\"1.000\")`, which throws a raw `SyntaxError` that\n * arrived at the host as UNEXPECTED_ERROR/INTERNAL: the engine reporting its\n * own bug for six characters a user typed. `1.01n` and `1.1n` were fine, which\n * is the tell that the `n` suffix was never the problem, the three-digit\n * thousands group was: a dot followed by exactly three digits is what the lexer\n * swallows, and one followed by one or two digits it leaves alone.\n *\n * Written once here rather than inline at both call sites. There are two\n * (`parser/PrecedenceParser.ts`'s Tier-1 switch and\n * `packages/biginteger/parselets/BigIntNumberParselet.ts`), they already held\n * identical copies of the `n`-stripping, and the two tiers disagreeing about a\n * literal is a bug shape this codebase has had before.\n *\n * @module BigIntLiteral\n */\n\nimport { getLocale } from \"@solve-js/constants/locales\";\nimport { ErrorFactory } from \"@solve-js/errors/UnifiedErrorFramework\";\n\n/**\n * Two or more dot-separated groups of three, e.g. `1.234.567`.\n *\n * Unambiguous in any locale, since no locale writes two decimal points, so this\n * is stripped without consulting one. Same regex and same reasoning as\n * `NumberParselet.ts`'s copy for the NUMBER path.\n */\nconst CHAINED_DOT_THOUSANDS_GROUPS = /^\\d{1,3}(\\.\\d{3}){2,}$/;\n\n/** Digits and nothing else, which is what `BigInt()` can be handed safely. */\nconst DIGITS_ONLY = /^\\d+$/;\n\n/**\n * The digit string behind a bigint literal.\n *\n * A bigint literal has no fractional part by construction: the lexer only emits\n * BIGINT when it saw no decimal point of its own and no exponent, so any `.` or\n * `,` still in the text got there as a thousands group. Which of the two the\n * writer meant is a locale question, and answering it wrongly would silently\n * change the value by three orders of magnitude, so only the separator this\n * locale actually uses for grouping is removed. Anything left over is refused\n * rather than guessed at.\n *\n * @param raw - The token's text, with or without the trailing `n`.\n * @param localeCode - The engine's active locale.\n * @returns A string of digits, ready for `BigInt()`.\n * @throws An `INVALID_NUMBER_LITERAL` parsing error when what is left is not a\n * whole number, e.g. `1.000n` in a locale that writes decimals with a dot.\n */\nexport function bigIntLiteralDigits(raw: string, localeCode: string): string {\n\tconst withoutSuffix = raw.endsWith(\"n\") ? raw.slice(0, -1) : raw;\n\n\t// The common case first: nothing was grouped, so there is nothing to decide.\n\tif (DIGITS_ONLY.test(withoutSuffix)) return withoutSuffix;\n\n\tconst digits = CHAINED_DOT_THOUSANDS_GROUPS.test(withoutSuffix)\n\t\t? withoutSuffix.split(\".\").join(\"\")\n\t\t: stripLocaleGrouping(withoutSuffix, localeCode);\n\n\tif (!DIGITS_ONLY.test(digits)) {\n\t\tconst separator = withoutSuffix.includes(\".\") ? \".\" : withoutSuffix.includes(\",\") ? \",\" : withoutSuffix;\n\t\tthrow ErrorFactory.parsing(\n\t\t\t\"INVALID_NUMBER_LITERAL\",\n\t\t\t`\"${raw}\" is not a whole number: \"${separator}\" separates decimals in the ${localeCode} locale, and a whole number cannot have a fractional part.`,\n\t\t\t{ raw, localeCode, separator },\n\t\t);\n\t}\n\treturn digits;\n}\n\n/**\n * Removes the active locale's own thousands separator and nothing else.\n *\n * @param text - The literal without its `n`.\n * @param localeCode - The engine's active locale.\n * @returns The text with grouping removed, which the caller then re-checks.\n */\nfunction stripLocaleGrouping(text: string, localeCode: string): string {\n\tconst thousandsSeparator = getLocale(localeCode).display.thousandsSeparator;\n\treturn thousandsSeparator ? text.split(thousandsSeparator).join(\"\") : text;\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var n=class{constructor(){this.resolvers=new Map;}register(e){this.resolvers.has(e.namespace)&&(console.warn(`[ResolverRegistry] Namespace "${e.namespace}" already registered. Destroying old resolver and overwriting. Use distinct namespaces (e.g., "${e.namespace}:sub1", "${e.namespace}:sub2") to avoid collisions when a package needs multiple async resolvers.`),this.resolvers.get(e.namespace).destroy()),this.resolvers.set(e.namespace,e);}unregister(e,r){let s=this.resolvers.get(e);s&&(s.destroy(),this.resolvers.delete(e)),r&&r.removeQueries({queryKey:[e]});}preflightAll(e,r,s,i,l){for(let t of this.resolvers.values()){if(!t.preflight)continue;let o=t.preflight(e,r,s,i,l);if(o)return o}return null}get(e){return this.resolvers.get(e)}get size(){return this.resolvers.size}has(e){return this.resolvers.has(e)}clear(){for(let e of this.resolvers.values())e.destroy();this.resolvers.clear();}};exports.a=n;//# sourceMappingURL=chunk-ZCNBT44X.cjs.map
2
+ //# sourceMappingURL=chunk-ZCNBT44X.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/resolvers/ResolverRegistry.ts"],"names":["ResolverRegistry","resolver","namespace","queryClient","tokens","bytecode","packageId","signal","result"],"mappings":"aAuEO,IAAMA,EAAN,KAAuB,CAAvB,WAAA,EAAA,CACN,IAAA,CAAQ,UAAY,IAAI,IAAA,CAWxB,QAAA,CAASC,CAAAA,CAAgC,CAEpC,IAAA,CAAK,SAAA,CAAU,GAAA,CAAIA,CAAAA,CAAS,SAAS,CAAA,GACxC,OAAA,CAAQ,IAAA,CACP,CAAA,8BAAA,EAAiCA,EAAS,SAAS,CAAA,+FAAA,EAExCA,CAAAA,CAAS,SAAS,YAAYA,CAAAA,CAAS,SAAS,CAAA,0EAAA,CAE5D,CAAA,CACA,KAAK,SAAA,CAAU,GAAA,CAAIA,CAAAA,CAAS,SAAS,EAAG,OAAA,EAAQ,CAAA,CAEjD,IAAA,CAAK,SAAA,CAAU,IAAIA,CAAAA,CAAS,SAAA,CAAWA,CAAQ,EAChD,CAMA,UAAA,CAAWC,CAAAA,CAAmBC,CAAAA,CAAiC,CAC9D,IAAMF,CAAAA,CAAW,IAAA,CAAK,SAAA,CAAU,GAAA,CAAIC,CAAS,CAAA,CACzCD,CAAAA,GACHA,CAAAA,CAAS,OAAA,GACT,IAAA,CAAK,SAAA,CAAU,MAAA,CAAOC,CAAS,GAI5BC,CAAAA,EACHA,CAAAA,CAAY,aAAA,CAAc,CAAE,SAAU,CAACD,CAAS,CAAE,CAAC,EAErD,CASA,YAAA,CAAaE,CAAAA,CAAiBC,CAAAA,CAA2BC,EAAmBC,CAAAA,CAAqBJ,CAAAA,CAAmD,CACnJ,IAAA,IAAWF,KAAY,IAAA,CAAK,SAAA,CAAU,MAAA,EAAO,CAAG,CAC/C,GAAI,CAACA,CAAAA,CAAS,SAAA,CAAW,SACzB,IAAMO,CAAAA,CAASP,CAAAA,CAAS,SAAA,CAAUG,EAAQC,CAAAA,CAAUC,CAAAA,CAAWC,CAAAA,CAAQJ,CAAW,EAClF,GAAIK,CAAAA,CAAQ,OAAOA,CACpB,CACA,OAAO,IACR,CAMA,GAAA,CAAIN,EAA+C,CAClD,OAAO,IAAA,CAAK,SAAA,CAAU,IAAIA,CAAS,CACpC,CAGA,IAAI,MAAe,CAClB,OAAO,IAAA,CAAK,SAAA,CAAU,IACvB,CAKA,GAAA,CAAIA,CAAAA,CAA4B,CAC/B,OAAO,IAAA,CAAK,SAAA,CAAU,GAAA,CAAIA,CAAS,CACpC,CAMA,KAAA,EAAc,CACb,IAAA,IAAWD,KAAY,IAAA,CAAK,SAAA,CAAU,MAAA,EAAO,CAC5CA,EAAS,OAAA,EAAQ,CAElB,KAAK,SAAA,CAAU,KAAA,GAChB,CACD","file":"chunk-ZCNBT44X.cjs","sourcesContent":["import type { QueryClient } from \"@tanstack/query-core\";\nimport type { Token } from \"@solve-js/lexer\";\nimport type { BytecodeProgram } from \"@solve-js/parser/BytecodeBuilder\";\nimport type { Value } from \"@solve-js/vm/Value\";\n\n/**\n * Result from a resolver's preflight() check.\n * Returned when async data is needed, the orchestrator uses this\n * to subscribe to the resolver and return a Pending value immediately.\n */\nexport interface AsyncCheckResult {\n\t/** Unique cache key for deduplication (e.g., \"{packageId}:rates:USD:GBP\") */\n\tqueryKey: string;\n\t/** Promise that resolves to the final Value */\n\tresolver: Promise<Value>;\n\t/** Package owning this resolver */\n\tpackageId: string;\n\t/** AbortSignal for stale-data prevention */\n\tsignal: AbortSignal;\n\t/** Optional metadata for diagnostics */\n\tmetadata?: Record<string, unknown>;\n}\n\n/**\n * Interface for async resolvers registered by packages/plugins.\n *\n * Each resolver handles a domain of async data (currency rates,\n * weather, stock prices, etc.). The preflight() method is called\n * BEFORE VM execution to check if all data is cached. If not,\n * it returns an AsyncCheckResult and the engine skips the VM,\n * returning a Pending value instead.\n */\nexport interface IAsyncResolver {\n\t/** Unique namespace for cache key scoping (e.g., \"currency\", \"weather\") */\n\treadonly namespace: string;\n\n\t/**\n\t * Pre-flight check: called BEFORE VM execution.\n\t *\n\t * Returns null if all data for this expression is cached and ready.\n\t * Returns an AsyncCheckResult if async work is needed.\n\t *\n\t * This method is synchronous, it only checks caches, never fetches.\n\t * If data is missing, it creates a Promise and returns immediately.\n\t *\n\t * @param tokens - The lexed tokens for the expression\n\t * @param bytecode - The compiled bytecode program\n\t * @param pluginId - The plugin ID (for cache key scoping)\n\t * @param signal - AbortSignal for the current evaluation\n\t */\n\tpreflight?(tokens: Token[], bytecode: BytecodeProgram, packageId: string, signal: AbortSignal, queryClient: QueryClient): AsyncCheckResult | null;\n\n\t/**\n\t * Called when the resolver's namespace is being unregistered.\n\t * Clean up any in-flight promises, clear caches, unsubscribe.\n\t */\n\tdestroy(): void;\n}\n\n/**\n * Registry of async resolvers, keyed by namespace.\n *\n * Plugins/packages register resolvers alongside their parselets\n * and opcode handlers. The engine calls preflightAll() before\n * VM execution to short-circuit async expressions.\n *\n * Lifecycle:\n * - register(), when a package is loaded\n * - unregister(), when a package is unloaded (clears cache entries)\n * - clear(), on document switch (clears all resolvers)\n */\nexport class ResolverRegistry {\n\tprivate resolvers = new Map<string, IAsyncResolver>();\n\n\t/**\n\t * Register an async resolver.\n\t *\n\t * Each resolver must have a unique `namespace`. If a resolver with the\n\t * same namespace is already registered, the old one is destroyed and\n\t * replaced (with a console warning). Packages that need multiple async\n\t * operations should use `asyncResolvers: [...]` with distinct namespaces\n\t * (e.g., `\"weather:current\"`, `\"weather:forecast\"`).\n\t */\n\tregister(resolver: IAsyncResolver): void {\n\t\t// Clean up previous resolver with same namespace if any\n\t\tif (this.resolvers.has(resolver.namespace)) {\n\t\t\tconsole.warn(\n\t\t\t\t`[ResolverRegistry] Namespace \"${resolver.namespace}\" already registered. ` +\n\t\t\t\t`Destroying old resolver and overwriting. Use distinct namespaces ` +\n\t\t\t\t`(e.g., \"${resolver.namespace}:sub1\", \"${resolver.namespace}:sub2\") ` +\n\t\t\t\t`to avoid collisions when a package needs multiple async resolvers.`,\n\t\t\t);\n\t\t\tthis.resolvers.get(resolver.namespace)!.destroy();\n\t\t}\n\t\tthis.resolvers.set(resolver.namespace, resolver);\n\t}\n\n\t/**\n\t * Unregister a resolver by namespace.\n\t * Calls destroy() and clears all cache entries with that namespace prefix.\n\t */\n\tunregister(namespace: string, queryClient?: QueryClient): void {\n\t\tconst resolver = this.resolvers.get(namespace);\n\t\tif (resolver) {\n\t\t\tresolver.destroy();\n\t\t\tthis.resolvers.delete(namespace);\n\t\t}\n\t\t// Clear all cache entries for this namespace via TanStack Query\n\t\t// Hierarchical keys: [\"osrs\"] clears all [\"osrs\", ...] queries\n\t\tif (queryClient) {\n\t\t\tqueryClient.removeQueries({ queryKey: [namespace] });\n\t\t}\n\t}\n\n\t/**\n\t * Run all registered resolvers' preflight checks against compiled bytecode.\n\t *\n\t * Returns the first AsyncCheckResult found, or null if all data is ready.\n\t * Short-circuits on first pending, subsequent pending ops will be\n\t * discovered on re-evaluation when the first resolves.\n\t */\n\tpreflightAll(tokens: Token[], bytecode: BytecodeProgram, packageId: string, signal: AbortSignal, queryClient: QueryClient): AsyncCheckResult | null {\n\t\tfor (const resolver of this.resolvers.values()) {\n\t\t\tif (!resolver.preflight) continue;\n\t\t\tconst result = resolver.preflight(tokens, bytecode, packageId, signal, queryClient);\n\t\t\tif (result) return result;\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**\n\t * Get a resolver by namespace.\n\t * Returns undefined if no resolver is registered for that namespace.\n\t */\n\tget(namespace: string): IAsyncResolver | undefined {\n\t\treturn this.resolvers.get(namespace);\n\t}\n\n\t/** Number of registered resolvers. */\n\tget size(): number {\n\t\treturn this.resolvers.size;\n\t}\n\n\t/**\n\t * Check if a resolver is registered for the given namespace.\n\t */\n\thas(namespace: string): boolean {\n\t\treturn this.resolvers.has(namespace);\n\t}\n\n\t/**\n\t * Clear all resolvers (document switch, engine reset).\n\t * Calls destroy() on each resolver and clears the map.\n\t */\n\tclear(): void {\n\t\tfor (const resolver of this.resolvers.values()) {\n\t\t\tresolver.destroy();\n\t\t}\n\t\tthis.resolvers.clear();\n\t}\n}\n"]}
@@ -0,0 +1,2 @@
1
+ 'use strict';var queryCore=require('@tanstack/query-core');var t=null;function i(e){t=e;}function l(){return t}function u(){return new queryCore.QueryClient({defaultOptions:{queries:{staleTime:300*1e3,gcTime:600*1e3,retry:3,retryDelay:e=>Math.min(500*2**e,5e3),refetchOnWindowFocus:false,refetchOnReconnect:false}}})}exports.a=i;exports.b=l;exports.c=u;//# sourceMappingURL=chunk-ZLRJ7TDP.cjs.map
2
+ //# sourceMappingURL=chunk-ZLRJ7TDP.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/services/DataQueryService.ts"],"names":["_activeQueryClient","setActiveQueryClient","qc","getActiveQueryClient","createQueryClient","QueryClient","attempt"],"mappings":"2DA2BA,IAAIA,CAAAA,CAAyC,KAGtC,SAASC,CAAAA,CAAqBC,CAAAA,CAA8B,CACjEF,CAAAA,CAAqBE,EACvB,CAGO,SAASC,CAAAA,EAA2C,CACzD,OAAOH,CACT,CAMO,SAASI,CAAAA,EAAiC,CAC/C,OAAO,IAAIC,qBAAAA,CAAY,CACrB,cAAA,CAAgB,CACd,OAAA,CAAS,CACP,SAAA,CAAW,GAAA,CAAS,GAAA,CACpB,MAAA,CAAQ,IAAU,GAAA,CAClB,KAAA,CAAO,CAAA,CACP,UAAA,CAAaC,CAAAA,EAAY,IAAA,CAAK,IAAI,GAAA,CAAM,CAAA,EAAKA,CAAAA,CAAS,GAAI,CAAA,CAC1D,oBAAA,CAAsB,KAAA,CACtB,kBAAA,CAAoB,KACtB,CACF,CACF,CAAC,CACH","file":"chunk-ZLRJ7TDP.cjs","sourcesContent":["/**\n * QueryClient factory for the solve-js engine.\n *\n * Creates a TanStack Query QueryClient with sensible defaults for\n * stale-while-revalidate, garbage collection, and retry behavior.\n * The QueryClient is injected into resolvers via the engine, so\n * no global singleton is needed.\n *\n * Removed in this refactor:\n * - DataQueryWorker (worker thread), doesn't solve anything in Obsidian's single-threaded env\n * - localCache (raw Map), replaced by TanStack Query's built-in cache\n * - pendingQueries (manual promise plumbing), TanStack Query handles dedup\n * - DataSourceHandle, registerDataSource, unregisterDataSource, no longer needed\n * - cleanupCache timer, TanStack Query's gc does this automatically\n * - cacheUpdateListeners / errorListeners, TanStack Query has its own observer API\n */\n\nimport { QueryClient } from \"@tanstack/query-core\";\n\n// ── Active query client (execution context) ───────────────────────────────\n// Synchronous VM plugin functions (dispatched via CALL_PLUGIN) can't receive\n// the engine's QueryClient through their (args) => Value ABI, so the engine\n// publishes the client here before each execution and package handlers read\n// it back. This module is the package-agnostic home for that hand-off\n// the engine must not import from a specific package (e.g. packages/osrs)\n// to wire it.\n\nlet _activeQueryClient: QueryClient | null = null;\n\n/** Publish the QueryClient for the execution about to run. Set by the engine. */\nexport function setActiveQueryClient(qc: QueryClient | null): void {\n _activeQueryClient = qc;\n}\n\n/** Read the QueryClient of the currently executing engine, if any. */\nexport function getActiveQueryClient(): QueryClient | null {\n return _activeQueryClient;\n}\n\n/**\n * Create a new TanStack Query QueryClient with project defaults.\n * Each engine instance gets its own client for isolation.\n */\nexport function createQueryClient(): QueryClient {\n return new QueryClient({\n defaultOptions: {\n queries: {\n staleTime: 5 * 60 * 1000, // 5 minutes\n gcTime: 10 * 60 * 1000, // 10 minutes\n retry: 3,\n retryDelay: (attempt) => Math.min(500 * 2 ** attempt, 5000),\n refetchOnWindowFocus: false,\n refetchOnReconnect: false, // Not relevant in Obsidian plugin context\n },\n },\n });\n}\n"]}
@@ -1,22 +1,2 @@
1
- 'use strict';
2
-
3
- var chunkE23GZEWL_cjs = require('./chunk-E23GZEWL.cjs');
4
- require('./chunk-B4HBEFTB.cjs');
5
- require('./chunk-B7LXJ6LC.cjs');
6
-
7
-
8
-
9
- Object.defineProperty(exports, "ConfigManager", {
10
- enumerable: true,
11
- get: function () { return chunkE23GZEWL_cjs.ConfigManager; }
12
- });
13
- Object.defineProperty(exports, "DEFAULT_CONFIG", {
14
- enumerable: true,
15
- get: function () { return chunkE23GZEWL_cjs.DEFAULT_CONFIG; }
16
- });
17
- Object.defineProperty(exports, "ENGINE_VERSION", {
18
- enumerable: true,
19
- get: function () { return chunkE23GZEWL_cjs.ENGINE_VERSION; }
20
- });
21
- //# sourceMappingURL=constants.cjs.map
1
+ 'use strict';var chunkUDQ57ZRX_cjs=require('./chunk-UDQ57ZRX.cjs');require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"ConfigManager",{enumerable:true,get:function(){return chunkUDQ57ZRX_cjs.d}});Object.defineProperty(exports,"DEFAULT_CONFIG",{enumerable:true,get:function(){return chunkUDQ57ZRX_cjs.b}});Object.defineProperty(exports,"ENGINE_VERSION",{enumerable:true,get:function(){return chunkUDQ57ZRX_cjs.a}});//# sourceMappingURL=constants.cjs.map
22
2
  //# sourceMappingURL=constants.cjs.map
@@ -1,4 +1,4 @@
1
- export { C as ConfigManager, D as DEFAULT_CONFIG, a as DateConfig, b as DiagnosticConfig, E as EngineConfig, H as HolidayCalendar, c as HolidayPredicate, P as PerformanceConfig, V as VMConfig, d as ValidationConfig, e as ValidationResult, W as WorkerConfig } from './Configuration-C9W8tJv_.cjs';
1
+ export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-B6W0-T67.cjs';
2
2
 
3
3
  /**
4
4
  * The running engine's version, taken from package.json.
@@ -1,4 +1,4 @@
1
- export { C as ConfigManager, D as DEFAULT_CONFIG, a as DateConfig, b as DiagnosticConfig, E as EngineConfig, H as HolidayCalendar, c as HolidayPredicate, P as PerformanceConfig, V as VMConfig, d as ValidationConfig, e as ValidationResult, W as WorkerConfig } from './Configuration-C9W8tJv_.js';
1
+ export { C as ConfigManager, D as DEFAULT_CONFIG, b as DateConfig, c as DiagnosticConfig, a as EngineConfig, E as EngineConfigOverride, H as HolidayCalendar, d as HolidayPredicate, P as PerformanceConfig, V as VMConfig, e as ValidationConfig, f as ValidationResult, W as WorkerConfig } from './Configuration-B6W0-T67.js';
2
2
 
3
3
  /**
4
4
  * The running engine's version, taken from package.json.
package/dist/constants.js CHANGED
@@ -1,5 +1,2 @@
1
- export { ConfigManager, DEFAULT_CONFIG, ENGINE_VERSION } from './chunk-GLA4JXBO.js';
2
- import './chunk-ERCOHGXD.js';
3
- import './chunk-YLJ4XMA6.js';
4
- //# sourceMappingURL=constants.js.map
1
+ export{d as ConfigManager,b as DEFAULT_CONFIG,a as ENGINE_VERSION}from'./chunk-L3FPQSGN.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=constants.js.map
5
2
  //# sourceMappingURL=constants.js.map
package/dist/engine.cjs CHANGED
@@ -1,95 +1,2 @@
1
- 'use strict';
2
-
3
- var chunkYRIKITGF_cjs = require('./chunk-YRIKITGF.cjs');
4
- var chunkT6ZYQJ63_cjs = require('./chunk-T6ZYQJ63.cjs');
5
- require('./chunk-HVRVSI2Z.cjs');
6
- require('./chunk-NGBBNL4K.cjs');
7
- require('./chunk-X6K3HUOY.cjs');
8
- require('./chunk-L2TE7PMO.cjs');
9
- require('./chunk-ENRIK36Q.cjs');
10
- require('./chunk-SRGQ72IR.cjs');
11
- require('./chunk-XA4CKRML.cjs');
12
- require('./chunk-CKQMXMHR.cjs');
13
- require('./chunk-N7FNVFXW.cjs');
14
- require('./chunk-MN3LHRGV.cjs');
15
- require('./chunk-J45BCEZ4.cjs');
16
- require('./chunk-CUR2WLI4.cjs');
17
- require('./chunk-ADBA3XBE.cjs');
18
- require('./chunk-SSV46KFA.cjs');
19
- require('./chunk-Z2XP767T.cjs');
20
- require('./chunk-7ZX6B7SY.cjs');
21
- require('./chunk-FEAIOR7N.cjs');
22
- require('./chunk-ZVTWQLK4.cjs');
23
- require('./chunk-XIYYHA65.cjs');
24
- require('./chunk-VEKIWQ3F.cjs');
25
- require('./chunk-ALYRJ72W.cjs');
26
- require('./chunk-HIQ5HSZL.cjs');
27
- require('./chunk-2TZKENDH.cjs');
28
- require('./chunk-EJ3ILXX6.cjs');
29
- require('./chunk-E23GZEWL.cjs');
30
- require('./chunk-N5NNW4VG.cjs');
31
- require('./chunk-536WPM2V.cjs');
32
- require('./chunk-ZMW6NU2K.cjs');
33
- require('./chunk-QFTDTX6K.cjs');
34
- require('./chunk-OUHT5Z36.cjs');
35
- require('./chunk-AQNHHJMJ.cjs');
36
- require('./chunk-AMOJYLG2.cjs');
37
- require('./chunk-B4HBEFTB.cjs');
38
- require('./chunk-B7LXJ6LC.cjs');
39
-
40
-
41
-
42
- Object.defineProperty(exports, "DocumentModel", {
43
- enumerable: true,
44
- get: function () { return chunkYRIKITGF_cjs.DocumentModel; }
45
- });
46
- Object.defineProperty(exports, "EvalTier", {
47
- enumerable: true,
48
- get: function () { return chunkYRIKITGF_cjs.EvalTier; }
49
- });
50
- Object.defineProperty(exports, "ThreeTierEvaluator", {
51
- enumerable: true,
52
- get: function () { return chunkYRIKITGF_cjs.ThreeTierEvaluator; }
53
- });
54
- Object.defineProperty(exports, "AsyncResolutionBatcher", {
55
- enumerable: true,
56
- get: function () { return chunkT6ZYQJ63_cjs.AsyncResolutionBatcher; }
57
- });
58
- Object.defineProperty(exports, "ExpressionEngine", {
59
- enumerable: true,
60
- get: function () { return chunkT6ZYQJ63_cjs.ExpressionEngine; }
61
- });
62
- Object.defineProperty(exports, "SNAPSHOT_FORMAT", {
63
- enumerable: true,
64
- get: function () { return chunkT6ZYQJ63_cjs.SNAPSHOT_FORMAT; }
65
- });
66
- Object.defineProperty(exports, "SNAPSHOT_VERSION", {
67
- enumerable: true,
68
- get: function () { return chunkT6ZYQJ63_cjs.SNAPSHOT_VERSION; }
69
- });
70
- Object.defineProperty(exports, "SnapshotErrorCodes", {
71
- enumerable: true,
72
- get: function () { return chunkT6ZYQJ63_cjs.SnapshotErrorCodes; }
73
- });
74
- Object.defineProperty(exports, "checkExpressionComplexity", {
75
- enumerable: true,
76
- get: function () { return chunkT6ZYQJ63_cjs.checkExpressionComplexity; }
77
- });
78
- Object.defineProperty(exports, "checkExpressionLength", {
79
- enumerable: true,
80
- get: function () { return chunkT6ZYQJ63_cjs.checkExpressionLength; }
81
- });
82
- Object.defineProperty(exports, "extractReadsAndWrites", {
83
- enumerable: true,
84
- get: function () { return chunkT6ZYQJ63_cjs.extractReadsAndWrites; }
85
- });
86
- Object.defineProperty(exports, "findInlineSolvesInLine", {
87
- enumerable: true,
88
- get: function () { return chunkT6ZYQJ63_cjs.findInlineSolvesInLine; }
89
- });
90
- Object.defineProperty(exports, "isEmptyLine", {
91
- enumerable: true,
92
- get: function () { return chunkT6ZYQJ63_cjs.isEmptyLine; }
93
- });
94
- //# sourceMappingURL=engine.cjs.map
1
+ 'use strict';var chunkWN5CMP4T_cjs=require('./chunk-WN5CMP4T.cjs');require('./chunk-EFJCC6FJ.cjs');var chunk4J7XZSZJ_cjs=require('./chunk-4J7XZSZJ.cjs');require('./chunk-FDE5HWDI.cjs'),require('./chunk-NGBBNL4K.cjs'),require('./chunk-ZCNBT44X.cjs'),require('./chunk-TTFO4YDP.cjs'),require('./chunk-SYYE3QAX.cjs'),require('./chunk-AXMQG5TS.cjs'),require('./chunk-HLBYHXQD.cjs'),require('./chunk-R2SZFJTT.cjs'),require('./chunk-SZGK6RIP.cjs'),require('./chunk-4QVBSG6B.cjs'),require('./chunk-APN442VD.cjs'),require('./chunk-UURM7P3P.cjs'),require('./chunk-ZLRJ7TDP.cjs'),require('./chunk-JAK3RAFA.cjs'),require('./chunk-4BZIYU7S.cjs'),require('./chunk-JFAJN3C2.cjs'),require('./chunk-TLG7VZRX.cjs'),require('./chunk-ESUN2THE.cjs'),require('./chunk-N7N7MPMK.cjs'),require('./chunk-PS272DZJ.cjs'),require('./chunk-IANAMBJQ.cjs'),require('./chunk-UDQ57ZRX.cjs'),require('./chunk-LR4E4A4W.cjs'),require('./chunk-Y7O4D3BJ.cjs'),require('./chunk-6KFVG6UY.cjs'),require('./chunk-5IJD5L3O.cjs'),require('./chunk-MSYX32PF.cjs'),require('./chunk-FWW3M36J.cjs'),require('./chunk-CIQOK7Q4.cjs'),require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"DocumentModel",{enumerable:true,get:function(){return chunkWN5CMP4T_cjs.a}});Object.defineProperty(exports,"EvalTier",{enumerable:true,get:function(){return chunkWN5CMP4T_cjs.b}});Object.defineProperty(exports,"ThreeTierEvaluator",{enumerable:true,get:function(){return chunkWN5CMP4T_cjs.c}});Object.defineProperty(exports,"AsyncResolutionBatcher",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.h}});Object.defineProperty(exports,"ExpressionEngine",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.n}});Object.defineProperty(exports,"SNAPSHOT_FORMAT",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.d}});Object.defineProperty(exports,"SNAPSHOT_VERSION",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.e}});Object.defineProperty(exports,"SnapshotErrorCodes",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.f}});Object.defineProperty(exports,"checkExpressionComplexity",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.j}});Object.defineProperty(exports,"checkExpressionLength",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.i}});Object.defineProperty(exports,"extractReadsAndWrites",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.k}});Object.defineProperty(exports,"findInlineSolvesInLine",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.m}});Object.defineProperty(exports,"isEmptyLine",{enumerable:true,get:function(){return chunk4J7XZSZJ_cjs.l}});//# sourceMappingURL=engine.cjs.map
95
2
  //# sourceMappingURL=engine.cjs.map
package/dist/engine.d.cts CHANGED
@@ -1,19 +1,18 @@
1
- import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, s as InlineSolvePosition } from './PackageRegistry-BHWJP83F.cjs';
2
- export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, C as CacheSnapshot, y as CheckpointSnapshot, a as EngineRestoreOptions, b as EngineSnapshot, c as EvalResults, d as Explanation, e as ExplanationStep, z as LineCacheEntryInfo, L as LineEvaluation, F as LineState, G as LinesUpdatedEvent, S as SNAPSHOT_FORMAT, g as SNAPSHOT_VERSION, h as SerializedAnonymousBody, i as SerializedBytecode, j as SerializedDecimal, k as SerializedLineCacheEntry, l as SerializedNumber, m as SerializedRational, n as SerializedUserFunction, o as SerializedValue, p as SnapshotErrorCodes } from './PackageRegistry-BHWJP83F.cjs';
3
- import { V as Value } from './Value-BUi1RA3S.cjs';
4
- import { V as VMCheckpointer } from './VMCheckpoints-ELYqITdF.cjs';
5
- import { T as Token } from './Token-B1hdkedD.cjs';
6
- import { E as EngineError } from './EngineError-B61GS1jp.cjs';
7
- import { a as BytecodeProgram } from './BytecodeBuilder-Bp9xeTmX.cjs';
8
- export { D as DagSnapshot } from './ScopeManager-8vf02dwj.cjs';
9
- import './Parselet-BHcgK9S7.cjs';
10
- import './pipeline-CtfJtPQc.cjs';
11
- import './variables.cjs';
12
- import './Lexer-BOs7euZe.cjs';
1
+ import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, L as LineChange, p as InlineSolvePosition } from './PackageRegistry-dpdurBVO.cjs';
2
+ export { A as ApplyChangesResult, q as AsyncCachePackageInfo, r as AsyncErrorEvent, s as AsyncResolutionBatcher, t as AsyncResolutionEvent, B as BatcherMetrics, u as BytecodeCacheEntry, C as CacheSnapshot, v as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, w as LineCacheEntryInfo, x as LineState, y as LinesUpdatedEvent, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-dpdurBVO.cjs';
3
+ import { V as Value } from './Value-CCi_Eecs.cjs';
4
+ import { V as VMCheckpointer } from './VMCheckpoints-I9jg3jWR.cjs';
5
+ import { T as Token } from './Token-CbP_OutD.cjs';
6
+ import { E as EngineError } from './EngineError-Ce1lPkjZ.cjs';
7
+ import { a as BytecodeProgram } from './BytecodeBuilder-DGGeByAP.cjs';
8
+ export { D as DagSnapshot } from './ScopeManager-D7uMXbhS.cjs';
9
+ import './Parselet-C4Wu055_.cjs';
10
+ import './pipeline-DCQicwWX.cjs';
11
+ import './Lexer-B4C1qHXu.cjs';
13
12
  import './resolvers.cjs';
14
13
  import '@tanstack/query-core';
15
- import './TokenNormalizer-DRc1Js1V.cjs';
16
- import './Configuration-C9W8tJv_.cjs';
14
+ import './TokenNormalizer-DnlL7_8c.cjs';
15
+ import './Configuration-B6W0-T67.cjs';
17
16
 
18
17
  /**
19
18
  * PageManager, page-based LRU eviction + directional preloading.
@@ -338,6 +337,22 @@ declare class ThreeTierEvaluator {
338
337
  inserted: number[];
339
338
  removed: number[];
340
339
  };
340
+ /**
341
+ * Reset running-total accumulators and mark the lines that touch them
342
+ * dirty, so the from-line-1 pass in {@link evaluate} recomputes each total
343
+ * from its seed instead of reading its own previous evaluation's value.
344
+ *
345
+ * A `total += 5` line compiles to no bytecode (it rides the symbolic
346
+ * channel), so a clean one would be skipped by the tier dispatch rather
347
+ * than re-run. It must re-run to re-apply its delta over the freshly-reset
348
+ * base, so every line that WRITES an accumulator name is forced dirty (the
349
+ * DAG drops a self-writing line from its own variable's consumers, so
350
+ * getAffectedLines can't surface them). Pure readers of the total keep
351
+ * their real bytecode and re-run via Tier 2 once the total is correct, so
352
+ * they need no special handling. Cheap: a no-op unless the document
353
+ * actually uses `+=`/`-=`, and accumulators are rare.
354
+ */
355
+ private reseedAccumulators;
341
356
  /**
342
357
  * Collect evaluation results for a contiguous range of lines.
343
358
  *
package/dist/engine.d.ts CHANGED
@@ -1,19 +1,18 @@
1
- import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, r as LineChange, s as InlineSolvePosition } from './PackageRegistry-_8rDlvxI.js';
2
- export { A as ApplyChangesResult, t as AsyncCachePackageInfo, u as AsyncErrorEvent, v as AsyncResolutionBatcher, w as AsyncResolutionEvent, B as BatcherMetrics, x as BytecodeCacheEntry, C as CacheSnapshot, y as CheckpointSnapshot, a as EngineRestoreOptions, b as EngineSnapshot, c as EvalResults, d as Explanation, e as ExplanationStep, z as LineCacheEntryInfo, L as LineEvaluation, F as LineState, G as LinesUpdatedEvent, S as SNAPSHOT_FORMAT, g as SNAPSHOT_VERSION, h as SerializedAnonymousBody, i as SerializedBytecode, j as SerializedDecimal, k as SerializedLineCacheEntry, l as SerializedNumber, m as SerializedRational, n as SerializedUserFunction, o as SerializedValue, p as SnapshotErrorCodes } from './PackageRegistry-_8rDlvxI.js';
3
- import { V as Value } from './Value-BUi1RA3S.js';
4
- import { V as VMCheckpointer } from './VMCheckpoints-MK--EBH2.js';
5
- import { T as Token } from './Token-B1hdkedD.js';
6
- import { E as EngineError } from './EngineError-B61GS1jp.js';
7
- import { a as BytecodeProgram } from './BytecodeBuilder-Bp9xeTmX.js';
8
- export { D as DagSnapshot } from './ScopeManager-CxA24W5n.js';
9
- import './Parselet-BBT8riYh.js';
10
- import './pipeline-DCd5M6Gk.js';
11
- import './variables.js';
12
- import './Lexer-CSI_lwbW.js';
1
+ import { D as DocumentModel, E as ExpressionEngine, V as ViewportRange, L as LineChange, p as InlineSolvePosition } from './PackageRegistry-DzeiWcv4.js';
2
+ export { A as ApplyChangesResult, q as AsyncCachePackageInfo, r as AsyncErrorEvent, s as AsyncResolutionBatcher, t as AsyncResolutionEvent, B as BatcherMetrics, u as BytecodeCacheEntry, C as CacheSnapshot, v as CheckpointSnapshot, a as EngineOptions, b as EngineRestoreOptions, c as EngineSnapshot, d as Explanation, e as ExplanationStep, w as LineCacheEntryInfo, x as LineState, y as LinesUpdatedEvent, S as SNAPSHOT_FORMAT, f as SNAPSHOT_VERSION, g as SerializedAnonymousBody, h as SerializedBytecode, i as SerializedDecimal, j as SerializedLineCacheEntry, k as SerializedNumber, l as SerializedRational, m as SerializedUserFunction, n as SerializedValue, o as SnapshotErrorCodes } from './PackageRegistry-DzeiWcv4.js';
3
+ import { V as Value } from './Value-CCi_Eecs.js';
4
+ import { V as VMCheckpointer } from './VMCheckpoints-CGyFhivM.js';
5
+ import { T as Token } from './Token-CbP_OutD.js';
6
+ import { E as EngineError } from './EngineError-Ce1lPkjZ.js';
7
+ import { a as BytecodeProgram } from './BytecodeBuilder-DGGeByAP.js';
8
+ export { D as DagSnapshot } from './ScopeManager-C2LDOrDx.js';
9
+ import './Parselet-B-zoPrTa.js';
10
+ import './pipeline-72QmQlGx.js';
11
+ import './Lexer-DKMlj7Sy.js';
13
12
  import './resolvers.js';
14
13
  import '@tanstack/query-core';
15
- import './TokenNormalizer-C6VzZgHa.js';
16
- import './Configuration-C9W8tJv_.js';
14
+ import './TokenNormalizer-DCWdZjGz.js';
15
+ import './Configuration-B6W0-T67.js';
17
16
 
18
17
  /**
19
18
  * PageManager, page-based LRU eviction + directional preloading.
@@ -338,6 +337,22 @@ declare class ThreeTierEvaluator {
338
337
  inserted: number[];
339
338
  removed: number[];
340
339
  };
340
+ /**
341
+ * Reset running-total accumulators and mark the lines that touch them
342
+ * dirty, so the from-line-1 pass in {@link evaluate} recomputes each total
343
+ * from its seed instead of reading its own previous evaluation's value.
344
+ *
345
+ * A `total += 5` line compiles to no bytecode (it rides the symbolic
346
+ * channel), so a clean one would be skipped by the tier dispatch rather
347
+ * than re-run. It must re-run to re-apply its delta over the freshly-reset
348
+ * base, so every line that WRITES an accumulator name is forced dirty (the
349
+ * DAG drops a self-writing line from its own variable's consumers, so
350
+ * getAffectedLines can't surface them). Pure readers of the total keep
351
+ * their real bytecode and re-run via Tier 2 once the total is correct, so
352
+ * they need no special handling. Cheap: a no-op unless the document
353
+ * actually uses `+=`/`-=`, and accumulators are rare.
354
+ */
355
+ private reseedAccumulators;
341
356
  /**
342
357
  * Collect evaluation results for a contiguous range of lines.
343
358
  *
package/dist/engine.js CHANGED
@@ -1,38 +1,2 @@
1
- export { DocumentModel, EvalTier, ThreeTierEvaluator } from './chunk-LHZ6VOA7.js';
2
- export { AsyncResolutionBatcher, ExpressionEngine, SNAPSHOT_FORMAT, SNAPSHOT_VERSION, SnapshotErrorCodes, checkExpressionComplexity, checkExpressionLength, extractReadsAndWrites, findInlineSolvesInLine, isEmptyLine } from './chunk-NNZAEUDW.js';
3
- import './chunk-I4GAWIPW.js';
4
- import './chunk-2RWAXT6O.js';
5
- import './chunk-3VGDNEE3.js';
6
- import './chunk-5ON7PUAZ.js';
7
- import './chunk-FD5ZZHEU.js';
8
- import './chunk-WXEHD6TT.js';
9
- import './chunk-CCBZZQAE.js';
10
- import './chunk-3OWCDIPN.js';
11
- import './chunk-UKQHXPGW.js';
12
- import './chunk-4HQKTMWG.js';
13
- import './chunk-ENKKJYD3.js';
14
- import './chunk-BYJBUL7U.js';
15
- import './chunk-3BOK2LDK.js';
16
- import './chunk-7KYSUDQO.js';
17
- import './chunk-NLNDMWZC.js';
18
- import './chunk-NKW7LKYU.js';
19
- import './chunk-GCM5JHMX.js';
20
- import './chunk-Z7XGGLI2.js';
21
- import './chunk-BLI4NIQY.js';
22
- import './chunk-Z4X2RWOF.js';
23
- import './chunk-5HRB36DK.js';
24
- import './chunk-NNQ2TYDF.js';
25
- import './chunk-267JPOTF.js';
26
- import './chunk-MVTOCRV2.js';
27
- import './chunk-GLA4JXBO.js';
28
- import './chunk-DLEBSLF4.js';
29
- import './chunk-UO6BUV6K.js';
30
- import './chunk-JG6ZJ2WU.js';
31
- import './chunk-4D6NIHE2.js';
32
- import './chunk-XBTEO4OB.js';
33
- import './chunk-SBUFNJVE.js';
34
- import './chunk-V4XG5QF6.js';
35
- import './chunk-ERCOHGXD.js';
36
- import './chunk-YLJ4XMA6.js';
37
- //# sourceMappingURL=engine.js.map
1
+ export{a as DocumentModel,b as EvalTier,c as ThreeTierEvaluator}from'./chunk-JSPKKNPQ.js';import'./chunk-RAF57WYO.js';export{h as AsyncResolutionBatcher,n as ExpressionEngine,d as SNAPSHOT_FORMAT,e as SNAPSHOT_VERSION,f as SnapshotErrorCodes,j as checkExpressionComplexity,i as checkExpressionLength,k as extractReadsAndWrites,m as findInlineSolvesInLine,l as isEmptyLine}from'./chunk-XR7HEC7B.js';import'./chunk-XNIWQHXY.js';import'./chunk-2RWAXT6O.js';import'./chunk-7GK3XEZF.js';import'./chunk-MIQBJGGR.js';import'./chunk-YJ2OPULK.js';import'./chunk-TWC7K3ZX.js';import'./chunk-J4LZD4ZY.js';import'./chunk-XEIDV5JP.js';import'./chunk-6CY44ZPG.js';import'./chunk-YVKHEAFT.js';import'./chunk-QXQE7X4S.js';import'./chunk-76F3LCIL.js';import'./chunk-TCZSPH4A.js';import'./chunk-W2JAR233.js';import'./chunk-YAYBVVG2.js';import'./chunk-E6Z4NQAS.js';import'./chunk-HFKDWQUL.js';import'./chunk-R2ENWQ76.js';import'./chunk-RSF25YSJ.js';import'./chunk-EVAOPEO4.js';import'./chunk-WGZ3FNHI.js';import'./chunk-L3FPQSGN.js';import'./chunk-GOIQYUWV.js';import'./chunk-JPFCXLJV.js';import'./chunk-UI6IFGBT.js';import'./chunk-IJMNVBIS.js';import'./chunk-62LMTO4F.js';import'./chunk-TRBXW6HW.js';import'./chunk-2JMFUQZH.js';import'./chunk-MPB7KUN5.js';//# sourceMappingURL=engine.js.map
38
2
  //# sourceMappingURL=engine.js.map
package/dist/errors.cjs CHANGED
@@ -1,106 +1,2 @@
1
- 'use strict';
2
-
3
- var chunkB7NLZMQ3_cjs = require('./chunk-B7NLZMQ3.cjs');
4
- var chunkB4HBEFTB_cjs = require('./chunk-B4HBEFTB.cjs');
5
- require('./chunk-B7LXJ6LC.cjs');
6
-
7
-
8
-
9
- Object.defineProperty(exports, "WorkerErrorCodes", {
10
- enumerable: true,
11
- get: function () { return chunkB7NLZMQ3_cjs.WorkerErrorCodes; }
12
- });
13
- Object.defineProperty(exports, "deserializeEngineError", {
14
- enumerable: true,
15
- get: function () { return chunkB7NLZMQ3_cjs.deserializeEngineError; }
16
- });
17
- Object.defineProperty(exports, "serializeEngineError", {
18
- enumerable: true,
19
- get: function () { return chunkB7NLZMQ3_cjs.serializeEngineError; }
20
- });
21
- Object.defineProperty(exports, "workerCancelledError", {
22
- enumerable: true,
23
- get: function () { return chunkB7NLZMQ3_cjs.workerCancelledError; }
24
- });
25
- Object.defineProperty(exports, "workerTerminatedError", {
26
- enumerable: true,
27
- get: function () { return chunkB7NLZMQ3_cjs.workerTerminatedError; }
28
- });
29
- Object.defineProperty(exports, "workerTransportError", {
30
- enumerable: true,
31
- get: function () { return chunkB7NLZMQ3_cjs.workerTransportError; }
32
- });
33
- Object.defineProperty(exports, "CoreErrorCodes", {
34
- enumerable: true,
35
- get: function () { return chunkB4HBEFTB_cjs.CoreErrorCodes; }
36
- });
37
- Object.defineProperty(exports, "EngineError", {
38
- enumerable: true,
39
- get: function () { return chunkB4HBEFTB_cjs.EngineError; }
40
- });
41
- Object.defineProperty(exports, "ErrorCategory", {
42
- enumerable: true,
43
- get: function () { return chunkB4HBEFTB_cjs.ErrorCategory; }
44
- });
45
- Object.defineProperty(exports, "ErrorFactory", {
46
- enumerable: true,
47
- get: function () { return chunkB4HBEFTB_cjs.ErrorFactory; }
48
- });
49
- Object.defineProperty(exports, "andThen", {
50
- enumerable: true,
51
- get: function () { return chunkB4HBEFTB_cjs.andThen; }
52
- });
53
- Object.defineProperty(exports, "combine", {
54
- enumerable: true,
55
- get: function () { return chunkB4HBEFTB_cjs.combine; }
56
- });
57
- Object.defineProperty(exports, "err", {
58
- enumerable: true,
59
- get: function () { return chunkB4HBEFTB_cjs.err; }
60
- });
61
- Object.defineProperty(exports, "isErr", {
62
- enumerable: true,
63
- get: function () { return chunkB4HBEFTB_cjs.isErr; }
64
- });
65
- Object.defineProperty(exports, "isOk", {
66
- enumerable: true,
67
- get: function () { return chunkB4HBEFTB_cjs.isOk; }
68
- });
69
- Object.defineProperty(exports, "map", {
70
- enumerable: true,
71
- get: function () { return chunkB4HBEFTB_cjs.map; }
72
- });
73
- Object.defineProperty(exports, "mapErr", {
74
- enumerable: true,
75
- get: function () { return chunkB4HBEFTB_cjs.mapErr; }
76
- });
77
- Object.defineProperty(exports, "match", {
78
- enumerable: true,
79
- get: function () { return chunkB4HBEFTB_cjs.match; }
80
- });
81
- Object.defineProperty(exports, "normalizeUnknownError", {
82
- enumerable: true,
83
- get: function () { return chunkB4HBEFTB_cjs.normalizeUnknownError; }
84
- });
85
- Object.defineProperty(exports, "ok", {
86
- enumerable: true,
87
- get: function () { return chunkB4HBEFTB_cjs.ok; }
88
- });
89
- Object.defineProperty(exports, "throwIfErr", {
90
- enumerable: true,
91
- get: function () { return chunkB4HBEFTB_cjs.throwIfErr; }
92
- });
93
- Object.defineProperty(exports, "tryCatch", {
94
- enumerable: true,
95
- get: function () { return chunkB4HBEFTB_cjs.tryCatch; }
96
- });
97
- Object.defineProperty(exports, "tryCatchAsync", {
98
- enumerable: true,
99
- get: function () { return chunkB4HBEFTB_cjs.tryCatchAsync; }
100
- });
101
- Object.defineProperty(exports, "unwrapOr", {
102
- enumerable: true,
103
- get: function () { return chunkB4HBEFTB_cjs.unwrapOr; }
104
- });
105
- //# sourceMappingURL=errors.cjs.map
1
+ 'use strict';var chunkP6WPEUAJ_cjs=require('./chunk-P6WPEUAJ.cjs'),chunkSOMGSIO4_cjs=require('./chunk-SOMGSIO4.cjs');Object.defineProperty(exports,"WorkerErrorCodes",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.a}});Object.defineProperty(exports,"deserializeEngineError",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.c}});Object.defineProperty(exports,"serializeEngineError",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.b}});Object.defineProperty(exports,"workerCancelledError",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.d}});Object.defineProperty(exports,"workerTerminatedError",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.e}});Object.defineProperty(exports,"workerTransportError",{enumerable:true,get:function(){return chunkP6WPEUAJ_cjs.f}});Object.defineProperty(exports,"CoreErrorCodes",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.r}});Object.defineProperty(exports,"EngineError",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.b}});Object.defineProperty(exports,"ErrorCategory",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.a}});Object.defineProperty(exports,"ErrorFactory",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.c}});Object.defineProperty(exports,"andThen",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.k}});Object.defineProperty(exports,"combine",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.n}});Object.defineProperty(exports,"err",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.f}});Object.defineProperty(exports,"isErr",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.h}});Object.defineProperty(exports,"isOk",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.g}});Object.defineProperty(exports,"map",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.i}});Object.defineProperty(exports,"mapErr",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.j}});Object.defineProperty(exports,"match",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.m}});Object.defineProperty(exports,"normalizeUnknownError",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.d}});Object.defineProperty(exports,"ok",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.e}});Object.defineProperty(exports,"throwIfErr",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.o}});Object.defineProperty(exports,"tryCatch",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.p}});Object.defineProperty(exports,"tryCatchAsync",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.q}});Object.defineProperty(exports,"unwrapOr",{enumerable:true,get:function(){return chunkSOMGSIO4_cjs.l}});//# sourceMappingURL=errors.cjs.map
106
2
  //# sourceMappingURL=errors.cjs.map
package/dist/errors.d.cts CHANGED
@@ -1,6 +1,6 @@
1
- import { E as EngineError } from './EngineError-B61GS1jp.cjs';
2
- export { C as CoreErrorCode, a as CoreErrorCodes, b as EngineErrorInit, c as ErrorCategory, d as ErrorCode, e as ErrorFactory, S as SourceSpan, n as normalizeUnknownError } from './EngineError-B61GS1jp.cjs';
3
- export { S as SerializedEngineError, W as WorkerErrorCodes, d as deserializeEngineError, s as serializeEngineError, w as workerCancelledError, a as workerTerminatedError, b as workerTransportError } from './WorkerError-gzmaopj2.cjs';
1
+ import { E as EngineError } from './EngineError-Ce1lPkjZ.cjs';
2
+ export { C as CoreErrorCode, a as CoreErrorCodes, b as EngineErrorInit, c as ErrorCategory, d as ErrorCode, e as ErrorFactory, S as SourceSpan, n as normalizeUnknownError } from './EngineError-Ce1lPkjZ.cjs';
3
+ export { S as SerializedEngineError, W as WorkerErrorCodes, d as deserializeEngineError, s as serializeEngineError, w as workerCancelledError, a as workerTerminatedError, b as workerTransportError } from './WorkerError-B4p6PNfx.cjs';
4
4
 
5
5
  /**
6
6
  * A Rust-style `Result<T, E>`, the value half of this engine's error-handling
package/dist/errors.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { E as EngineError } from './EngineError-B61GS1jp.js';
2
- export { C as CoreErrorCode, a as CoreErrorCodes, b as EngineErrorInit, c as ErrorCategory, d as ErrorCode, e as ErrorFactory, S as SourceSpan, n as normalizeUnknownError } from './EngineError-B61GS1jp.js';
3
- export { S as SerializedEngineError, W as WorkerErrorCodes, d as deserializeEngineError, s as serializeEngineError, w as workerCancelledError, a as workerTerminatedError, b as workerTransportError } from './WorkerError-_-RkoQ5P.js';
1
+ import { E as EngineError } from './EngineError-Ce1lPkjZ.js';
2
+ export { C as CoreErrorCode, a as CoreErrorCodes, b as EngineErrorInit, c as ErrorCategory, d as ErrorCode, e as ErrorFactory, S as SourceSpan, n as normalizeUnknownError } from './EngineError-Ce1lPkjZ.js';
3
+ export { S as SerializedEngineError, W as WorkerErrorCodes, d as deserializeEngineError, s as serializeEngineError, w as workerCancelledError, a as workerTerminatedError, b as workerTransportError } from './WorkerError-Dhj9BQ_A.js';
4
4
 
5
5
  /**
6
6
  * A Rust-style `Result<T, E>`, the value half of this engine's error-handling
package/dist/errors.js CHANGED
@@ -1,5 +1,2 @@
1
- export { WorkerErrorCodes, deserializeEngineError, serializeEngineError, workerCancelledError, workerTerminatedError, workerTransportError } from './chunk-WWQEY7BV.js';
2
- export { CoreErrorCodes, EngineError, ErrorCategory, ErrorFactory, andThen, combine, err, isErr, isOk, map, mapErr, match, normalizeUnknownError, ok, throwIfErr, tryCatch, tryCatchAsync, unwrapOr } from './chunk-ERCOHGXD.js';
3
- import './chunk-YLJ4XMA6.js';
4
- //# sourceMappingURL=errors.js.map
1
+ export{a as WorkerErrorCodes,c as deserializeEngineError,b as serializeEngineError,d as workerCancelledError,e as workerTerminatedError,f as workerTransportError}from'./chunk-MVZUTETT.js';export{r as CoreErrorCodes,b as EngineError,a as ErrorCategory,c as ErrorFactory,k as andThen,n as combine,f as err,h as isErr,g as isOk,i as map,j as mapErr,m as match,d as normalizeUnknownError,e as ok,o as throwIfErr,p as tryCatch,q as tryCatchAsync,l as unwrapOr}from'./chunk-MPB7KUN5.js';//# sourceMappingURL=errors.js.map
5
2
  //# sourceMappingURL=errors.js.map