@dyrected/core 2.8.3 → 2.9.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 (500) hide show
  1. package/dist/{app-config-BccpBUqJ.d.cts → app-config-gEQJFvnN.d.cts} +212 -85
  2. package/dist/{app-config-BccpBUqJ.d.ts → app-config-gEQJFvnN.d.ts} +212 -85
  3. package/dist/chunk-JSBRDJBE.js +30 -0
  4. package/dist/{chunk-GFFGDHST.js → chunk-XRIONGRY.js} +1769 -12
  5. package/dist/index.cjs +1813 -6
  6. package/dist/index.d.cts +19 -4
  7. package/dist/index.d.ts +19 -4
  8. package/dist/index.js +56 -4
  9. package/dist/{observability-KCMTV7GO.js → observability-HQF4EUSV.js} +1 -0
  10. package/dist/server.cjs +1979 -13
  11. package/dist/server.d.cts +37 -15
  12. package/dist/server.d.ts +37 -15
  13. package/dist/server.js +230 -15
  14. package/dist/{where-sanitizer-WJ2W2QCE.js → where-sanitizer-3MNFMYA2.js} +2 -0
  15. package/package.json +3 -3
  16. package/dist/__tests__/access-features.test.d.ts +0 -2
  17. package/dist/__tests__/access-features.test.d.ts.map +0 -1
  18. package/dist/__tests__/access-features.test.js +0 -159
  19. package/dist/__tests__/access-features.test.js.map +0 -1
  20. package/dist/__tests__/access-parity.test.d.ts +0 -2
  21. package/dist/__tests__/access-parity.test.d.ts.map +0 -1
  22. package/dist/__tests__/access-parity.test.js +0 -338
  23. package/dist/__tests__/access-parity.test.js.map +0 -1
  24. package/dist/__tests__/access.test.d.ts +0 -2
  25. package/dist/__tests__/access.test.d.ts.map +0 -1
  26. package/dist/__tests__/access.test.js +0 -137
  27. package/dist/__tests__/access.test.js.map +0 -1
  28. package/dist/__tests__/admin-auth.test.d.ts +0 -2
  29. package/dist/__tests__/admin-auth.test.d.ts.map +0 -1
  30. package/dist/__tests__/admin-auth.test.js +0 -440
  31. package/dist/__tests__/admin-auth.test.js.map +0 -1
  32. package/dist/__tests__/app.test.d.ts +0 -2
  33. package/dist/__tests__/app.test.d.ts.map +0 -1
  34. package/dist/__tests__/app.test.js +0 -112
  35. package/dist/__tests__/app.test.js.map +0 -1
  36. package/dist/__tests__/audit.test.d.ts +0 -2
  37. package/dist/__tests__/audit.test.d.ts.map +0 -1
  38. package/dist/__tests__/audit.test.js +0 -125
  39. package/dist/__tests__/audit.test.js.map +0 -1
  40. package/dist/__tests__/auth-hydration.test.d.ts +0 -2
  41. package/dist/__tests__/auth-hydration.test.d.ts.map +0 -1
  42. package/dist/__tests__/auth-hydration.test.js +0 -90
  43. package/dist/__tests__/auth-hydration.test.js.map +0 -1
  44. package/dist/__tests__/auth-invite.test.d.ts +0 -2
  45. package/dist/__tests__/auth-invite.test.d.ts.map +0 -1
  46. package/dist/__tests__/auth-invite.test.js +0 -152
  47. package/dist/__tests__/auth-invite.test.js.map +0 -1
  48. package/dist/__tests__/auth-lockout.test.d.ts +0 -2
  49. package/dist/__tests__/auth-lockout.test.d.ts.map +0 -1
  50. package/dist/__tests__/auth-lockout.test.js +0 -154
  51. package/dist/__tests__/auth-lockout.test.js.map +0 -1
  52. package/dist/__tests__/auth-sessions.test.d.ts +0 -2
  53. package/dist/__tests__/auth-sessions.test.d.ts.map +0 -1
  54. package/dist/__tests__/auth-sessions.test.js +0 -118
  55. package/dist/__tests__/auth-sessions.test.js.map +0 -1
  56. package/dist/__tests__/config.test.d.ts +0 -2
  57. package/dist/__tests__/config.test.d.ts.map +0 -1
  58. package/dist/__tests__/config.test.js +0 -402
  59. package/dist/__tests__/config.test.js.map +0 -1
  60. package/dist/__tests__/define-field.test.d.ts +0 -2
  61. package/dist/__tests__/define-field.test.d.ts.map +0 -1
  62. package/dist/__tests__/define-field.test.js +0 -121
  63. package/dist/__tests__/define-field.test.js.map +0 -1
  64. package/dist/__tests__/deleteMany.test.d.ts +0 -2
  65. package/dist/__tests__/deleteMany.test.d.ts.map +0 -1
  66. package/dist/__tests__/deleteMany.test.js +0 -75
  67. package/dist/__tests__/deleteMany.test.js.map +0 -1
  68. package/dist/__tests__/depth.test.d.ts +0 -2
  69. package/dist/__tests__/depth.test.d.ts.map +0 -1
  70. package/dist/__tests__/depth.test.js +0 -115
  71. package/dist/__tests__/depth.test.js.map +0 -1
  72. package/dist/__tests__/dynamic-options.test.d.ts +0 -2
  73. package/dist/__tests__/dynamic-options.test.d.ts.map +0 -1
  74. package/dist/__tests__/dynamic-options.test.js +0 -168
  75. package/dist/__tests__/dynamic-options.test.js.map +0 -1
  76. package/dist/__tests__/email.service.test.d.ts +0 -2
  77. package/dist/__tests__/email.service.test.d.ts.map +0 -1
  78. package/dist/__tests__/email.service.test.js +0 -52
  79. package/dist/__tests__/email.service.test.js.map +0 -1
  80. package/dist/__tests__/field-inference.test-types.d.ts +0 -161
  81. package/dist/__tests__/field-inference.test-types.d.ts.map +0 -1
  82. package/dist/__tests__/field-inference.test-types.js +0 -87
  83. package/dist/__tests__/field-inference.test-types.js.map +0 -1
  84. package/dist/__tests__/fixtures/editorial-workflow.d.ts +0 -14
  85. package/dist/__tests__/fixtures/editorial-workflow.d.ts.map +0 -1
  86. package/dist/__tests__/fixtures/editorial-workflow.js +0 -12
  87. package/dist/__tests__/fixtures/editorial-workflow.js.map +0 -1
  88. package/dist/__tests__/hooks.test.d.ts +0 -2
  89. package/dist/__tests__/hooks.test.d.ts.map +0 -1
  90. package/dist/__tests__/hooks.test.js +0 -320
  91. package/dist/__tests__/hooks.test.js.map +0 -1
  92. package/dist/__tests__/mocks.d.ts +0 -75
  93. package/dist/__tests__/mocks.d.ts.map +0 -1
  94. package/dist/__tests__/mocks.js +0 -170
  95. package/dist/__tests__/mocks.js.map +0 -1
  96. package/dist/__tests__/observability.test.d.ts +0 -2
  97. package/dist/__tests__/observability.test.d.ts.map +0 -1
  98. package/dist/__tests__/observability.test.js +0 -233
  99. package/dist/__tests__/observability.test.js.map +0 -1
  100. package/dist/__tests__/openapi.test.d.ts +0 -2
  101. package/dist/__tests__/openapi.test.d.ts.map +0 -1
  102. package/dist/__tests__/openapi.test.js +0 -105
  103. package/dist/__tests__/openapi.test.js.map +0 -1
  104. package/dist/__tests__/parse-sort.test.d.ts +0 -2
  105. package/dist/__tests__/parse-sort.test.d.ts.map +0 -1
  106. package/dist/__tests__/parse-sort.test.js +0 -24
  107. package/dist/__tests__/parse-sort.test.js.map +0 -1
  108. package/dist/__tests__/preferences.test.d.ts +0 -2
  109. package/dist/__tests__/preferences.test.d.ts.map +0 -1
  110. package/dist/__tests__/preferences.test.js +0 -168
  111. package/dist/__tests__/preferences.test.js.map +0 -1
  112. package/dist/__tests__/router.test.d.ts +0 -2
  113. package/dist/__tests__/router.test.d.ts.map +0 -1
  114. package/dist/__tests__/router.test.js +0 -70
  115. package/dist/__tests__/router.test.js.map +0 -1
  116. package/dist/__tests__/search.test.d.ts +0 -2
  117. package/dist/__tests__/search.test.d.ts.map +0 -1
  118. package/dist/__tests__/search.test.js +0 -174
  119. package/dist/__tests__/search.test.js.map +0 -1
  120. package/dist/__tests__/upload-validation.test.d.ts +0 -2
  121. package/dist/__tests__/upload-validation.test.d.ts.map +0 -1
  122. package/dist/__tests__/upload-validation.test.js +0 -41
  123. package/dist/__tests__/upload-validation.test.js.map +0 -1
  124. package/dist/__tests__/where.test.d.ts +0 -2
  125. package/dist/__tests__/where.test.d.ts.map +0 -1
  126. package/dist/__tests__/where.test.js +0 -105
  127. package/dist/__tests__/where.test.js.map +0 -1
  128. package/dist/__tests__/workflow.test.d.ts +0 -2
  129. package/dist/__tests__/workflow.test.d.ts.map +0 -1
  130. package/dist/__tests__/workflow.test.js +0 -684
  131. package/dist/__tests__/workflow.test.js.map +0 -1
  132. package/dist/app-config-7G-3tF_I.d.cts +0 -2259
  133. package/dist/app-config-7G-3tF_I.d.ts +0 -2259
  134. package/dist/app-config-9hs8DRED.d.cts +0 -1718
  135. package/dist/app-config-9hs8DRED.d.ts +0 -1718
  136. package/dist/app-config-B3ByBjCN.d.cts +0 -2222
  137. package/dist/app-config-B3ByBjCN.d.ts +0 -2222
  138. package/dist/app-config-B5tYsZaH.d.cts +0 -2404
  139. package/dist/app-config-B5tYsZaH.d.ts +0 -2404
  140. package/dist/app-config-BEuyPktb.d.cts +0 -2556
  141. package/dist/app-config-BEuyPktb.d.ts +0 -2556
  142. package/dist/app-config-BIkjQWzU.d.cts +0 -2218
  143. package/dist/app-config-BIkjQWzU.d.ts +0 -2218
  144. package/dist/app-config-BcuZIpvL.d.cts +0 -1951
  145. package/dist/app-config-BcuZIpvL.d.ts +0 -1951
  146. package/dist/app-config-BfpeE3bF.d.cts +0 -2100
  147. package/dist/app-config-BfpeE3bF.d.ts +0 -2100
  148. package/dist/app-config-Bm9-2Am6.d.cts +0 -1875
  149. package/dist/app-config-Bm9-2Am6.d.ts +0 -1875
  150. package/dist/app-config-BqhrBrSM.d.cts +0 -1522
  151. package/dist/app-config-BqhrBrSM.d.ts +0 -1522
  152. package/dist/app-config-Bxg_DVxv.d.cts +0 -1413
  153. package/dist/app-config-Bxg_DVxv.d.ts +0 -1413
  154. package/dist/app-config-C0twGIaF.d.cts +0 -1597
  155. package/dist/app-config-C0twGIaF.d.ts +0 -1597
  156. package/dist/app-config-C0uxEU7Q.d.cts +0 -1874
  157. package/dist/app-config-C0uxEU7Q.d.ts +0 -1874
  158. package/dist/app-config-C3X5BAyK.d.cts +0 -1539
  159. package/dist/app-config-C3X5BAyK.d.ts +0 -1539
  160. package/dist/app-config-C9VJ6rTv.d.cts +0 -2092
  161. package/dist/app-config-C9VJ6rTv.d.ts +0 -2092
  162. package/dist/app-config-CBOn8IyZ.d.cts +0 -1838
  163. package/dist/app-config-CBOn8IyZ.d.ts +0 -1838
  164. package/dist/app-config-CCe-yq9q.d.cts +0 -2222
  165. package/dist/app-config-CCe-yq9q.d.ts +0 -2222
  166. package/dist/app-config-CJAGGPrk.d.cts +0 -1900
  167. package/dist/app-config-CJAGGPrk.d.ts +0 -1900
  168. package/dist/app-config-CPOs7THF.d.cts +0 -2217
  169. package/dist/app-config-CPOs7THF.d.ts +0 -2217
  170. package/dist/app-config-CYV70eoF.d.cts +0 -2100
  171. package/dist/app-config-CYV70eoF.d.ts +0 -2100
  172. package/dist/app-config-ChsrBB7p.d.cts +0 -2100
  173. package/dist/app-config-ChsrBB7p.d.ts +0 -2100
  174. package/dist/app-config-CiEDJm0e.d.cts +0 -1912
  175. package/dist/app-config-CiEDJm0e.d.ts +0 -1912
  176. package/dist/app-config-CstocO9M.d.cts +0 -1580
  177. package/dist/app-config-CstocO9M.d.ts +0 -1580
  178. package/dist/app-config-Ctp454zB.d.cts +0 -2214
  179. package/dist/app-config-Ctp454zB.d.ts +0 -2214
  180. package/dist/app-config-CwaU1de2.d.cts +0 -1868
  181. package/dist/app-config-CwaU1de2.d.ts +0 -1868
  182. package/dist/app-config-DCDh8Gbx.d.cts +0 -1926
  183. package/dist/app-config-DCDh8Gbx.d.ts +0 -1926
  184. package/dist/app-config-DCWinlNK.d.cts +0 -2091
  185. package/dist/app-config-DCWinlNK.d.ts +0 -2091
  186. package/dist/app-config-DIwvzbpe.d.cts +0 -1555
  187. package/dist/app-config-DIwvzbpe.d.ts +0 -1555
  188. package/dist/app-config-DJmNYgYh.d.cts +0 -2305
  189. package/dist/app-config-DJmNYgYh.d.ts +0 -2305
  190. package/dist/app-config-DO3laV58.d.cts +0 -2397
  191. package/dist/app-config-DO3laV58.d.ts +0 -2397
  192. package/dist/app-config-DVdSospO.d.cts +0 -1842
  193. package/dist/app-config-DVdSospO.d.ts +0 -1842
  194. package/dist/app-config-DZf_mmi9.d.cts +0 -2211
  195. package/dist/app-config-DZf_mmi9.d.ts +0 -2211
  196. package/dist/app-config-DbK2Tv6i.d.cts +0 -2080
  197. package/dist/app-config-DbK2Tv6i.d.ts +0 -2080
  198. package/dist/app-config-Dkndq5ni.d.cts +0 -1580
  199. package/dist/app-config-Dkndq5ni.d.ts +0 -1580
  200. package/dist/app-config-Dms6kvE-.d.cts +0 -2072
  201. package/dist/app-config-Dms6kvE-.d.ts +0 -2072
  202. package/dist/app-config-DqCipvSI.d.cts +0 -1411
  203. package/dist/app-config-DqCipvSI.d.ts +0 -1411
  204. package/dist/app-config-Dv5XACR4.d.cts +0 -2065
  205. package/dist/app-config-Dv5XACR4.d.ts +0 -2065
  206. package/dist/app-config-P-SF5nnR.d.cts +0 -1568
  207. package/dist/app-config-P-SF5nnR.d.ts +0 -1568
  208. package/dist/app-config-SkUoN5JU.d.cts +0 -2192
  209. package/dist/app-config-SkUoN5JU.d.ts +0 -2192
  210. package/dist/app-config-WzqpuZMr.d.cts +0 -2566
  211. package/dist/app-config-WzqpuZMr.d.ts +0 -2566
  212. package/dist/app-config-_kkj71CB.d.cts +0 -2010
  213. package/dist/app-config-_kkj71CB.d.ts +0 -2010
  214. package/dist/app-config-fEjRm1o9.d.cts +0 -2402
  215. package/dist/app-config-fEjRm1o9.d.ts +0 -2402
  216. package/dist/app-config-oU1EGHND.d.cts +0 -1538
  217. package/dist/app-config-oU1EGHND.d.ts +0 -1538
  218. package/dist/app-config-ouBRb6Bf.d.cts +0 -1716
  219. package/dist/app-config-ouBRb6Bf.d.ts +0 -1716
  220. package/dist/app-config-oz8H_MOX.d.cts +0 -2224
  221. package/dist/app-config-oz8H_MOX.d.ts +0 -2224
  222. package/dist/app-config-tITj_0sn.d.cts +0 -1926
  223. package/dist/app-config-tITj_0sn.d.ts +0 -1926
  224. package/dist/app-config-wnLtFu6c.d.cts +0 -1538
  225. package/dist/app-config-wnLtFu6c.d.ts +0 -1538
  226. package/dist/app-config-x-CnipcA.d.cts +0 -2072
  227. package/dist/app-config-x-CnipcA.d.ts +0 -2072
  228. package/dist/app.d.ts +0 -35
  229. package/dist/app.d.ts.map +0 -1
  230. package/dist/app.js +0 -164
  231. package/dist/app.js.map +0 -1
  232. package/dist/auth/access.d.ts +0 -5
  233. package/dist/auth/access.d.ts.map +0 -1
  234. package/dist/auth/access.js +0 -59
  235. package/dist/auth/access.js.map +0 -1
  236. package/dist/auth/jexl.d.ts +0 -13
  237. package/dist/auth/jexl.d.ts.map +0 -1
  238. package/dist/auth/jexl.js +0 -30
  239. package/dist/auth/jexl.js.map +0 -1
  240. package/dist/auth/lockout.d.ts +0 -11
  241. package/dist/auth/lockout.d.ts.map +0 -1
  242. package/dist/auth/lockout.js +0 -37
  243. package/dist/auth/lockout.js.map +0 -1
  244. package/dist/auth/password.d.ts +0 -10
  245. package/dist/auth/password.d.ts.map +0 -1
  246. package/dist/auth/password.js +0 -28
  247. package/dist/auth/password.js.map +0 -1
  248. package/dist/auth/sessions.d.ts +0 -39
  249. package/dist/auth/sessions.d.ts.map +0 -1
  250. package/dist/auth/sessions.js +0 -126
  251. package/dist/auth/sessions.js.map +0 -1
  252. package/dist/auth/token.d.ts +0 -23
  253. package/dist/auth/token.d.ts.map +0 -1
  254. package/dist/auth/token.js +0 -40
  255. package/dist/auth/token.js.map +0 -1
  256. package/dist/chunk-23NM4LDU.js +0 -2883
  257. package/dist/chunk-2TKDCCIR.js +0 -2622
  258. package/dist/chunk-2UXLA4YN.js +0 -3139
  259. package/dist/chunk-2WODKOUB.js +0 -1627
  260. package/dist/chunk-35NM2WPO.js +0 -1658
  261. package/dist/chunk-3CMG2BH2.js +0 -1618
  262. package/dist/chunk-3SFITPX4.js +0 -2628
  263. package/dist/chunk-3TRRTN6U.js +0 -3441
  264. package/dist/chunk-57FNM42D.js +0 -2392
  265. package/dist/chunk-5U2WRCNH.js +0 -3140
  266. package/dist/chunk-5ZIA5COH.js +0 -3414
  267. package/dist/chunk-6TWQ6GTD.js +0 -3480
  268. package/dist/chunk-AKYYGMFS.js +0 -3365
  269. package/dist/chunk-AQO4HI2Y.js +0 -3204
  270. package/dist/chunk-BAMX7YUC.js +0 -1815
  271. package/dist/chunk-BQV3QW3Y.js +0 -2588
  272. package/dist/chunk-CQVTQ67D.js +0 -2632
  273. package/dist/chunk-CUOPCOU2.js +0 -1644
  274. package/dist/chunk-DCY7QHRB.js +0 -1637
  275. package/dist/chunk-DFBLNYUH.js +0 -3402
  276. package/dist/chunk-EH3MJGB5.js +0 -2571
  277. package/dist/chunk-EJG6AMYB.js +0 -3537
  278. package/dist/chunk-ELHRRPKX.js +0 -2863
  279. package/dist/chunk-EOW4YMAV.js +0 -1637
  280. package/dist/chunk-G43REXPX.js +0 -3147
  281. package/dist/chunk-GFKBPBJJ.js +0 -3637
  282. package/dist/chunk-HRLSFTLR.js +0 -3061
  283. package/dist/chunk-JFA22YFB.js +0 -1625
  284. package/dist/chunk-K3ASMUKV.js +0 -2601
  285. package/dist/chunk-KEKOEAX6.js +0 -3139
  286. package/dist/chunk-L65PQYDP.js +0 -1536
  287. package/dist/chunk-LFGSRQLX.js +0 -3568
  288. package/dist/chunk-M3HKRN7E.js +0 -1665
  289. package/dist/chunk-MQZH7RQC.js +0 -1667
  290. package/dist/chunk-NNZRYF3U.js +0 -3537
  291. package/dist/chunk-PRQ2RF5C.js +0 -3485
  292. package/dist/chunk-PYE2JSY4.js +0 -3568
  293. package/dist/chunk-PZMDK3MH.js +0 -3203
  294. package/dist/chunk-QCXLDKZO.js +0 -3272
  295. package/dist/chunk-QTIAQBNH.js +0 -3097
  296. package/dist/chunk-ROECUARS.js +0 -2615
  297. package/dist/chunk-SM32ND5M.js +0 -3472
  298. package/dist/chunk-T2DGC4MD.js +0 -3008
  299. package/dist/chunk-T626OZMH.js +0 -2602
  300. package/dist/chunk-TEGRS6J7.js +0 -2609
  301. package/dist/chunk-TLU77TLE.js +0 -3203
  302. package/dist/chunk-UKUEKTAO.js +0 -513
  303. package/dist/chunk-VCYYBN5J.js +0 -1873
  304. package/dist/chunk-VM43G3IG.js +0 -506
  305. package/dist/chunk-VWJKFZQU.js +0 -3139
  306. package/dist/chunk-WF5A6PDJ.js +0 -1618
  307. package/dist/chunk-WVD7PORQ.js +0 -1672
  308. package/dist/chunk-XX7N64NL.js +0 -3550
  309. package/dist/chunk-XZLIBQSO.js +0 -2397
  310. package/dist/chunk-YEBCT77K.js +0 -3269
  311. package/dist/chunk-YSSHLGQ6.js +0 -3139
  312. package/dist/chunk-YXEKNN5X.js +0 -3085
  313. package/dist/chunk-Z7CFUYVP.js +0 -3653
  314. package/dist/chunk-ZISFMAEL.js +0 -3550
  315. package/dist/controllers/admin-auth.controller.d.ts +0 -71
  316. package/dist/controllers/admin-auth.controller.d.ts.map +0 -1
  317. package/dist/controllers/admin-auth.controller.js +0 -450
  318. package/dist/controllers/admin-auth.controller.js.map +0 -1
  319. package/dist/controllers/audit.controller.d.ts +0 -42
  320. package/dist/controllers/audit.controller.d.ts.map +0 -1
  321. package/dist/controllers/audit.controller.js +0 -149
  322. package/dist/controllers/audit.controller.js.map +0 -1
  323. package/dist/controllers/auth.controller.d.ts +0 -143
  324. package/dist/controllers/auth.controller.d.ts.map +0 -1
  325. package/dist/controllers/auth.controller.js +0 -572
  326. package/dist/controllers/auth.controller.js.map +0 -1
  327. package/dist/controllers/collection.controller.d.ts +0 -170
  328. package/dist/controllers/collection.controller.d.ts.map +0 -1
  329. package/dist/controllers/collection.controller.js +0 -1033
  330. package/dist/controllers/collection.controller.js.map +0 -1
  331. package/dist/controllers/global.controller.d.ts +0 -20
  332. package/dist/controllers/global.controller.d.ts.map +0 -1
  333. package/dist/controllers/global.controller.js +0 -182
  334. package/dist/controllers/global.controller.js.map +0 -1
  335. package/dist/controllers/media.controller.d.ts +0 -39
  336. package/dist/controllers/media.controller.d.ts.map +0 -1
  337. package/dist/controllers/media.controller.js +0 -178
  338. package/dist/controllers/media.controller.js.map +0 -1
  339. package/dist/controllers/preview.controller.d.ts +0 -37
  340. package/dist/controllers/preview.controller.d.ts.map +0 -1
  341. package/dist/controllers/preview.controller.js +0 -48
  342. package/dist/controllers/preview.controller.js.map +0 -1
  343. package/dist/index.d.ts.map +0 -1
  344. package/dist/index.js.map +0 -1
  345. package/dist/middleware/auth.d.ts +0 -19
  346. package/dist/middleware/auth.d.ts.map +0 -1
  347. package/dist/middleware/auth.js +0 -157
  348. package/dist/middleware/auth.js.map +0 -1
  349. package/dist/middleware/rate-limit.d.ts +0 -9
  350. package/dist/middleware/rate-limit.d.ts.map +0 -1
  351. package/dist/middleware/rate-limit.js +0 -75
  352. package/dist/middleware/rate-limit.js.map +0 -1
  353. package/dist/network.d.ts +0 -6
  354. package/dist/network.d.ts.map +0 -1
  355. package/dist/network.js +0 -70
  356. package/dist/network.js.map +0 -1
  357. package/dist/observability-CNM4QFE4.js +0 -34
  358. package/dist/observability-L5BORBB2.js +0 -34
  359. package/dist/observability.d.ts +0 -113
  360. package/dist/observability.d.ts.map +0 -1
  361. package/dist/observability.js +0 -497
  362. package/dist/observability.js.map +0 -1
  363. package/dist/router.d.ts +0 -8
  364. package/dist/router.d.ts.map +0 -1
  365. package/dist/router.js +0 -704
  366. package/dist/router.js.map +0 -1
  367. package/dist/server.d.ts.map +0 -1
  368. package/dist/server.js.map +0 -1
  369. package/dist/services/audit.service.d.ts +0 -23
  370. package/dist/services/audit.service.d.ts.map +0 -1
  371. package/dist/services/audit.service.js +0 -39
  372. package/dist/services/audit.service.js.map +0 -1
  373. package/dist/services/defaults.service.d.ts +0 -8
  374. package/dist/services/defaults.service.d.ts.map +0 -1
  375. package/dist/services/defaults.service.js +0 -55
  376. package/dist/services/defaults.service.js.map +0 -1
  377. package/dist/services/email-template.d.ts +0 -46
  378. package/dist/services/email-template.d.ts.map +0 -1
  379. package/dist/services/email-template.js +0 -88
  380. package/dist/services/email-template.js.map +0 -1
  381. package/dist/services/email.service.d.ts +0 -34
  382. package/dist/services/email.service.d.ts.map +0 -1
  383. package/dist/services/email.service.js +0 -129
  384. package/dist/services/email.service.js.map +0 -1
  385. package/dist/services/media.service.d.ts +0 -20
  386. package/dist/services/media.service.d.ts.map +0 -1
  387. package/dist/services/media.service.js +0 -49
  388. package/dist/services/media.service.js.map +0 -1
  389. package/dist/services/population.service.d.ts +0 -20
  390. package/dist/services/population.service.d.ts.map +0 -1
  391. package/dist/services/population.service.js +0 -224
  392. package/dist/services/population.service.js.map +0 -1
  393. package/dist/types/access.d.ts +0 -48
  394. package/dist/types/access.d.ts.map +0 -1
  395. package/dist/types/access.js +0 -2
  396. package/dist/types/access.js.map +0 -1
  397. package/dist/types/adapters.d.ts +0 -152
  398. package/dist/types/adapters.d.ts.map +0 -1
  399. package/dist/types/adapters.js +0 -2
  400. package/dist/types/adapters.js.map +0 -1
  401. package/dist/types/admin-auth.d.ts +0 -132
  402. package/dist/types/admin-auth.d.ts.map +0 -1
  403. package/dist/types/admin-auth.js +0 -2
  404. package/dist/types/admin-auth.js.map +0 -1
  405. package/dist/types/admin.d.ts +0 -86
  406. package/dist/types/admin.d.ts.map +0 -1
  407. package/dist/types/admin.js +0 -2
  408. package/dist/types/admin.js.map +0 -1
  409. package/dist/types/app-config.d.ts +0 -279
  410. package/dist/types/app-config.d.ts.map +0 -1
  411. package/dist/types/app-config.js +0 -2
  412. package/dist/types/app-config.js.map +0 -1
  413. package/dist/types/documents.d.ts +0 -65
  414. package/dist/types/documents.d.ts.map +0 -1
  415. package/dist/types/documents.js +0 -2
  416. package/dist/types/documents.js.map +0 -1
  417. package/dist/types/hooks.d.ts +0 -122
  418. package/dist/types/hooks.d.ts.map +0 -1
  419. package/dist/types/hooks.js +0 -2
  420. package/dist/types/hooks.js.map +0 -1
  421. package/dist/types/index.d.ts +0 -13
  422. package/dist/types/index.d.ts.map +0 -1
  423. package/dist/types/index.js +0 -13
  424. package/dist/types/index.js.map +0 -1
  425. package/dist/types/request.d.ts +0 -42
  426. package/dist/types/request.d.ts.map +0 -1
  427. package/dist/types/request.js +0 -2
  428. package/dist/types/request.js.map +0 -1
  429. package/dist/types/schema-config.d.ts +0 -443
  430. package/dist/types/schema-config.d.ts.map +0 -1
  431. package/dist/types/schema-config.js +0 -2
  432. package/dist/types/schema-config.js.map +0 -1
  433. package/dist/types/schema-core.d.ts +0 -628
  434. package/dist/types/schema-core.d.ts.map +0 -1
  435. package/dist/types/schema-core.js +0 -2
  436. package/dist/types/schema-core.js.map +0 -1
  437. package/dist/types/schema-inference.d.ts +0 -73
  438. package/dist/types/schema-inference.d.ts.map +0 -1
  439. package/dist/types/schema-inference.js +0 -2
  440. package/dist/types/schema-inference.js.map +0 -1
  441. package/dist/types/workflows.d.ts +0 -121
  442. package/dist/types/workflows.d.ts.map +0 -1
  443. package/dist/types/workflows.js +0 -7
  444. package/dist/types/workflows.js.map +0 -1
  445. package/dist/utils/access-control.d.ts +0 -35
  446. package/dist/utils/access-control.d.ts.map +0 -1
  447. package/dist/utils/access-control.js +0 -161
  448. package/dist/utils/access-control.js.map +0 -1
  449. package/dist/utils/admin-auth.d.ts +0 -5
  450. package/dist/utils/admin-auth.d.ts.map +0 -1
  451. package/dist/utils/admin-auth.js +0 -39
  452. package/dist/utils/admin-auth.js.map +0 -1
  453. package/dist/utils/block-references.d.ts +0 -10
  454. package/dist/utils/block-references.d.ts.map +0 -1
  455. package/dist/utils/block-references.js +0 -100
  456. package/dist/utils/block-references.js.map +0 -1
  457. package/dist/utils/collection-search.d.ts +0 -11
  458. package/dist/utils/collection-search.d.ts.map +0 -1
  459. package/dist/utils/collection-search.js +0 -204
  460. package/dist/utils/collection-search.js.map +0 -1
  461. package/dist/utils/config.d.ts +0 -8
  462. package/dist/utils/config.d.ts.map +0 -1
  463. package/dist/utils/config.js +0 -336
  464. package/dist/utils/config.js.map +0 -1
  465. package/dist/utils/hooks.d.ts +0 -41
  466. package/dist/utils/hooks.d.ts.map +0 -1
  467. package/dist/utils/hooks.js +0 -177
  468. package/dist/utils/hooks.js.map +0 -1
  469. package/dist/utils/openapi.d.ts +0 -6
  470. package/dist/utils/openapi.d.ts.map +0 -1
  471. package/dist/utils/openapi.js +0 -981
  472. package/dist/utils/openapi.js.map +0 -1
  473. package/dist/utils/parse-sort.d.ts +0 -43
  474. package/dist/utils/parse-sort.d.ts.map +0 -1
  475. package/dist/utils/parse-sort.js +0 -70
  476. package/dist/utils/parse-sort.js.map +0 -1
  477. package/dist/utils/parse-where.d.ts +0 -69
  478. package/dist/utils/parse-where.d.ts.map +0 -1
  479. package/dist/utils/parse-where.js +0 -202
  480. package/dist/utils/parse-where.js.map +0 -1
  481. package/dist/utils/readonly-db.d.ts +0 -9
  482. package/dist/utils/readonly-db.d.ts.map +0 -1
  483. package/dist/utils/readonly-db.js +0 -21
  484. package/dist/utils/readonly-db.js.map +0 -1
  485. package/dist/utils/swagger.d.ts +0 -11
  486. package/dist/utils/swagger.d.ts.map +0 -1
  487. package/dist/utils/swagger.js +0 -62
  488. package/dist/utils/swagger.js.map +0 -1
  489. package/dist/utils/upload-validation.d.ts +0 -23
  490. package/dist/utils/upload-validation.d.ts.map +0 -1
  491. package/dist/utils/upload-validation.js +0 -46
  492. package/dist/utils/upload-validation.js.map +0 -1
  493. package/dist/utils/where-sanitizer.d.ts +0 -10
  494. package/dist/utils/where-sanitizer.d.ts.map +0 -1
  495. package/dist/utils/where-sanitizer.js +0 -67
  496. package/dist/utils/where-sanitizer.js.map +0 -1
  497. package/dist/workflows.d.ts +0 -86
  498. package/dist/workflows.d.ts.map +0 -1
  499. package/dist/workflows.js +0 -405
  500. package/dist/workflows.js.map +0 -1
@@ -1,3 +1,1759 @@
1
+ import {
2
+ __commonJS,
3
+ __toESM
4
+ } from "./chunk-JSBRDJBE.js";
5
+
6
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/interopRequireDefault.js
7
+ var require_interopRequireDefault = __commonJS({
8
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/interopRequireDefault.js"(exports, module) {
9
+ "use strict";
10
+ function _interopRequireDefault(e) {
11
+ return e && e.__esModule ? e : {
12
+ "default": e
13
+ };
14
+ }
15
+ module.exports = _interopRequireDefault, module.exports.__esModule = true, module.exports["default"] = module.exports;
16
+ }
17
+ });
18
+
19
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/typeof.js
20
+ var require_typeof = __commonJS({
21
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/typeof.js"(exports, module) {
22
+ "use strict";
23
+ function _typeof(o) {
24
+ "@babel/helpers - typeof";
25
+ return module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o2) {
26
+ return typeof o2;
27
+ } : function(o2) {
28
+ return o2 && "function" == typeof Symbol && o2.constructor === Symbol && o2 !== Symbol.prototype ? "symbol" : typeof o2;
29
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports, _typeof(o);
30
+ }
31
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
32
+ }
33
+ });
34
+
35
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPrimitive.js
36
+ var require_toPrimitive = __commonJS({
37
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPrimitive.js"(exports, module) {
38
+ "use strict";
39
+ var _typeof = require_typeof()["default"];
40
+ function toPrimitive(t, r) {
41
+ if ("object" != _typeof(t) || !t) return t;
42
+ var e = t[Symbol.toPrimitive];
43
+ if (void 0 !== e) {
44
+ var i = e.call(t, r || "default");
45
+ if ("object" != _typeof(i)) return i;
46
+ throw new TypeError("@@toPrimitive must return a primitive value.");
47
+ }
48
+ return ("string" === r ? String : Number)(t);
49
+ }
50
+ module.exports = toPrimitive, module.exports.__esModule = true, module.exports["default"] = module.exports;
51
+ }
52
+ });
53
+
54
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPropertyKey.js
55
+ var require_toPropertyKey = __commonJS({
56
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toPropertyKey.js"(exports, module) {
57
+ "use strict";
58
+ var _typeof = require_typeof()["default"];
59
+ var toPrimitive = require_toPrimitive();
60
+ function toPropertyKey(t) {
61
+ var i = toPrimitive(t, "string");
62
+ return "symbol" == _typeof(i) ? i : i + "";
63
+ }
64
+ module.exports = toPropertyKey, module.exports.__esModule = true, module.exports["default"] = module.exports;
65
+ }
66
+ });
67
+
68
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/defineProperty.js
69
+ var require_defineProperty = __commonJS({
70
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/defineProperty.js"(exports, module) {
71
+ "use strict";
72
+ var toPropertyKey = require_toPropertyKey();
73
+ function _defineProperty(e, r, t) {
74
+ return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
75
+ value: t,
76
+ enumerable: true,
77
+ configurable: true,
78
+ writable: true
79
+ }) : e[r] = t, e;
80
+ }
81
+ module.exports = _defineProperty, module.exports.__esModule = true, module.exports["default"] = module.exports;
82
+ }
83
+ });
84
+
85
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/classCallCheck.js
86
+ var require_classCallCheck = __commonJS({
87
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/classCallCheck.js"(exports, module) {
88
+ "use strict";
89
+ function _classCallCheck(a, n) {
90
+ if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
91
+ }
92
+ module.exports = _classCallCheck, module.exports.__esModule = true, module.exports["default"] = module.exports;
93
+ }
94
+ });
95
+
96
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/createClass.js
97
+ var require_createClass = __commonJS({
98
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/createClass.js"(exports, module) {
99
+ "use strict";
100
+ var toPropertyKey = require_toPropertyKey();
101
+ function _defineProperties(e, r) {
102
+ for (var t = 0; t < r.length; t++) {
103
+ var o = r[t];
104
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, toPropertyKey(o.key), o);
105
+ }
106
+ }
107
+ function _createClass(e, r, t) {
108
+ return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
109
+ writable: false
110
+ }), e;
111
+ }
112
+ module.exports = _createClass, module.exports.__esModule = true, module.exports["default"] = module.exports;
113
+ }
114
+ });
115
+
116
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayLikeToArray.js
117
+ var require_arrayLikeToArray = __commonJS({
118
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayLikeToArray.js"(exports, module) {
119
+ "use strict";
120
+ function _arrayLikeToArray(r, a) {
121
+ (null == a || a > r.length) && (a = r.length);
122
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
123
+ return n;
124
+ }
125
+ module.exports = _arrayLikeToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
126
+ }
127
+ });
128
+
129
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js
130
+ var require_arrayWithoutHoles = __commonJS({
131
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/arrayWithoutHoles.js"(exports, module) {
132
+ "use strict";
133
+ var arrayLikeToArray = require_arrayLikeToArray();
134
+ function _arrayWithoutHoles(r) {
135
+ if (Array.isArray(r)) return arrayLikeToArray(r);
136
+ }
137
+ module.exports = _arrayWithoutHoles, module.exports.__esModule = true, module.exports["default"] = module.exports;
138
+ }
139
+ });
140
+
141
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/iterableToArray.js
142
+ var require_iterableToArray = __commonJS({
143
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/iterableToArray.js"(exports, module) {
144
+ "use strict";
145
+ function _iterableToArray(r) {
146
+ if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
147
+ }
148
+ module.exports = _iterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
149
+ }
150
+ });
151
+
152
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js
153
+ var require_unsupportedIterableToArray = __commonJS({
154
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/unsupportedIterableToArray.js"(exports, module) {
155
+ "use strict";
156
+ var arrayLikeToArray = require_arrayLikeToArray();
157
+ function _unsupportedIterableToArray(r, a) {
158
+ if (r) {
159
+ if ("string" == typeof r) return arrayLikeToArray(r, a);
160
+ var t = {}.toString.call(r).slice(8, -1);
161
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? arrayLikeToArray(r, a) : void 0;
162
+ }
163
+ }
164
+ module.exports = _unsupportedIterableToArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
165
+ }
166
+ });
167
+
168
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/nonIterableSpread.js
169
+ var require_nonIterableSpread = __commonJS({
170
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/nonIterableSpread.js"(exports, module) {
171
+ "use strict";
172
+ function _nonIterableSpread() {
173
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
174
+ }
175
+ module.exports = _nonIterableSpread, module.exports.__esModule = true, module.exports["default"] = module.exports;
176
+ }
177
+ });
178
+
179
+ // ../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toConsumableArray.js
180
+ var require_toConsumableArray = __commonJS({
181
+ "../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/toConsumableArray.js"(exports, module) {
182
+ "use strict";
183
+ var arrayWithoutHoles = require_arrayWithoutHoles();
184
+ var iterableToArray = require_iterableToArray();
185
+ var unsupportedIterableToArray = require_unsupportedIterableToArray();
186
+ var nonIterableSpread = require_nonIterableSpread();
187
+ function _toConsumableArray(r) {
188
+ return arrayWithoutHoles(r) || iterableToArray(r) || unsupportedIterableToArray(r) || nonIterableSpread();
189
+ }
190
+ module.exports = _toConsumableArray, module.exports.__esModule = true, module.exports["default"] = module.exports;
191
+ }
192
+ });
193
+
194
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/handlers.js
195
+ var require_handlers = __commonJS({
196
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/handlers.js"(exports) {
197
+ "use strict";
198
+ var _interopRequireDefault = require_interopRequireDefault();
199
+ var _toConsumableArray2 = _interopRequireDefault(require_toConsumableArray());
200
+ var poolNames = {
201
+ functions: "Jexl Function",
202
+ transforms: "Transform"
203
+ };
204
+ exports.ArrayLiteral = function(ast) {
205
+ return this.evalArray(ast.value);
206
+ };
207
+ exports.BinaryExpression = function(ast) {
208
+ var _this = this;
209
+ var grammarOp = this._grammar.elements[ast.operator];
210
+ if (grammarOp.evalOnDemand) {
211
+ var wrap = function wrap2(subAst) {
212
+ return {
213
+ eval: function _eval() {
214
+ return _this.eval(subAst);
215
+ }
216
+ };
217
+ };
218
+ return grammarOp.evalOnDemand(wrap(ast.left), wrap(ast.right));
219
+ }
220
+ return this.Promise.all([this.eval(ast.left), this.eval(ast.right)]).then(function(arr) {
221
+ return grammarOp.eval(arr[0], arr[1]);
222
+ });
223
+ };
224
+ exports.ConditionalExpression = function(ast) {
225
+ var _this2 = this;
226
+ return this.eval(ast.test).then(function(res) {
227
+ if (res) {
228
+ if (ast.consequent) {
229
+ return _this2.eval(ast.consequent);
230
+ }
231
+ return res;
232
+ }
233
+ return _this2.eval(ast.alternate);
234
+ });
235
+ };
236
+ exports.FilterExpression = function(ast) {
237
+ var _this3 = this;
238
+ return this.eval(ast.subject).then(function(subject) {
239
+ if (ast.relative) {
240
+ return _this3._filterRelative(subject, ast.expr);
241
+ }
242
+ return _this3._filterStatic(subject, ast.expr);
243
+ });
244
+ };
245
+ exports.Identifier = function(ast) {
246
+ if (!ast.from) {
247
+ return ast.relative ? this._relContext[ast.value] : this._context[ast.value];
248
+ }
249
+ return this.eval(ast.from).then(function(context) {
250
+ if (context === void 0 || context === null) {
251
+ return void 0;
252
+ }
253
+ if (Array.isArray(context)) {
254
+ context = context[0];
255
+ }
256
+ return context[ast.value];
257
+ });
258
+ };
259
+ exports.Literal = function(ast) {
260
+ return ast.value;
261
+ };
262
+ exports.ObjectLiteral = function(ast) {
263
+ return this.evalMap(ast.value);
264
+ };
265
+ exports.FunctionCall = function(ast) {
266
+ var poolName = poolNames[ast.pool];
267
+ if (!poolName) {
268
+ throw new Error("Corrupt AST: Pool '".concat(ast.pool, "' not found"));
269
+ }
270
+ var pool = this._grammar[ast.pool];
271
+ var func = pool[ast.name];
272
+ if (!func) {
273
+ throw new Error("".concat(poolName, " ").concat(ast.name, " is not defined."));
274
+ }
275
+ return this.evalArray(ast.args || []).then(function(args) {
276
+ return func.apply(void 0, (0, _toConsumableArray2.default)(args));
277
+ });
278
+ };
279
+ exports.UnaryExpression = function(ast) {
280
+ var _this4 = this;
281
+ return this.eval(ast.right).then(function(right) {
282
+ return _this4._grammar.elements[ast.operator].eval(right);
283
+ });
284
+ };
285
+ }
286
+ });
287
+
288
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/Evaluator.js
289
+ var require_Evaluator = __commonJS({
290
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/evaluator/Evaluator.js"(exports, module) {
291
+ "use strict";
292
+ var _interopRequireDefault = require_interopRequireDefault();
293
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
294
+ var _createClass2 = _interopRequireDefault(require_createClass());
295
+ var handlers = require_handlers();
296
+ var Evaluator = /* @__PURE__ */ (function() {
297
+ function Evaluator2(grammar, context, relativeContext) {
298
+ var promise = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : Promise;
299
+ (0, _classCallCheck2.default)(this, Evaluator2);
300
+ this._grammar = grammar;
301
+ this._context = context || {};
302
+ this._relContext = relativeContext || this._context;
303
+ this.Promise = promise;
304
+ }
305
+ (0, _createClass2.default)(Evaluator2, [{
306
+ key: "eval",
307
+ value: function _eval(ast) {
308
+ var _this = this;
309
+ return this.Promise.resolve().then(function() {
310
+ return handlers[ast.type].call(_this, ast);
311
+ });
312
+ }
313
+ /**
314
+ * Simultaneously evaluates each expression within an array, and delivers the
315
+ * response as an array with the resulting values at the same indexes as their
316
+ * originating expressions.
317
+ * @param {Array<string>} arr An array of expression strings to be evaluated
318
+ * @returns {Promise<Array<{}>>} resolves with the result array
319
+ */
320
+ }, {
321
+ key: "evalArray",
322
+ value: function evalArray(arr) {
323
+ var _this2 = this;
324
+ return this.Promise.all(arr.map(function(elem) {
325
+ return _this2.eval(elem);
326
+ }));
327
+ }
328
+ /**
329
+ * Simultaneously evaluates each expression within a map, and delivers the
330
+ * response as a map with the same keys, but with the evaluated result for each
331
+ * as their value.
332
+ * @param {{}} map A map of expression names to expression trees to be
333
+ * evaluated
334
+ * @returns {Promise<{}>} resolves with the result map.
335
+ */
336
+ }, {
337
+ key: "evalMap",
338
+ value: function evalMap(map) {
339
+ var _this3 = this;
340
+ var keys = Object.keys(map);
341
+ var result = {};
342
+ var asts = keys.map(function(key) {
343
+ return _this3.eval(map[key]);
344
+ });
345
+ return this.Promise.all(asts).then(function(vals) {
346
+ vals.forEach(function(val, idx) {
347
+ result[keys[idx]] = val;
348
+ });
349
+ return result;
350
+ });
351
+ }
352
+ /**
353
+ * Applies a filter expression with relative identifier elements to a subject.
354
+ * The intent is for the subject to be an array of subjects that will be
355
+ * individually used as the relative context against the provided expression
356
+ * tree. Only the elements whose expressions result in a truthy value will be
357
+ * included in the resulting array.
358
+ *
359
+ * If the subject is not an array of values, it will be converted to a single-
360
+ * element array before running the filter.
361
+ * @param {*} subject The value to be filtered usually an array. If this value is
362
+ * not an array, it will be converted to an array with this value as the
363
+ * only element.
364
+ * @param {{}} expr The expression tree to run against each subject. If the
365
+ * tree evaluates to a truthy result, then the value will be included in
366
+ * the returned array otherwise, it will be eliminated.
367
+ * @returns {Promise<Array>} resolves with an array of values that passed the
368
+ * expression filter.
369
+ * @private
370
+ */
371
+ }, {
372
+ key: "_filterRelative",
373
+ value: function _filterRelative(subject, expr) {
374
+ var _this4 = this;
375
+ var promises = [];
376
+ if (!Array.isArray(subject)) {
377
+ subject = subject === void 0 ? [] : [subject];
378
+ }
379
+ subject.forEach(function(elem) {
380
+ var evalInst = new Evaluator2(_this4._grammar, _this4._context, elem, _this4.Promise);
381
+ promises.push(evalInst.eval(expr));
382
+ });
383
+ return this.Promise.all(promises).then(function(values) {
384
+ var results = [];
385
+ values.forEach(function(value, idx) {
386
+ if (value) {
387
+ results.push(subject[idx]);
388
+ }
389
+ });
390
+ return results;
391
+ });
392
+ }
393
+ /**
394
+ * Applies a static filter expression to a subject value. If the filter
395
+ * expression evaluates to boolean true, the subject is returned if false,
396
+ * undefined.
397
+ *
398
+ * For any other resulting value of the expression, this function will attempt
399
+ * to respond with the property at that name or index of the subject.
400
+ * @param {*} subject The value to be filtered. Usually an Array (for which
401
+ * the expression would generally resolve to a numeric index) or an
402
+ * Object (for which the expression would generally resolve to a string
403
+ * indicating a property name)
404
+ * @param {{}} expr The expression tree to run against the subject
405
+ * @returns {Promise<*>} resolves with the value of the drill-down.
406
+ * @private
407
+ */
408
+ }, {
409
+ key: "_filterStatic",
410
+ value: function _filterStatic(subject, expr) {
411
+ return this.eval(expr).then(function(res) {
412
+ if (typeof res === "boolean") {
413
+ return res ? subject : void 0;
414
+ }
415
+ return subject[res];
416
+ });
417
+ }
418
+ }]);
419
+ return Evaluator2;
420
+ })();
421
+ module.exports = Evaluator;
422
+ }
423
+ });
424
+
425
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Lexer.js
426
+ var require_Lexer = __commonJS({
427
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Lexer.js"(exports, module) {
428
+ "use strict";
429
+ var _interopRequireDefault = require_interopRequireDefault();
430
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
431
+ var _createClass2 = _interopRequireDefault(require_createClass());
432
+ var numericRegex = /^-?(?:(?:[0-9]*\.[0-9]+)|[0-9]+)$/;
433
+ var identRegex = /^[a-zA-Zа-яА-Я_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$][a-zA-Zа-яА-Я0-9_\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF$]*$/;
434
+ var escEscRegex = /\\\\/;
435
+ var whitespaceRegex = /^\s*$/;
436
+ var preOpRegexElems = [
437
+ // Strings
438
+ "'(?:(?:\\\\')|[^'])*'",
439
+ '"(?:(?:\\\\")|[^"])*"',
440
+ // Whitespace
441
+ "\\s+",
442
+ // Booleans
443
+ "\\btrue\\b",
444
+ "\\bfalse\\b"
445
+ ];
446
+ var postOpRegexElems = [
447
+ // Identifiers
448
+ "[a-zA-Z\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$][a-zA-Z0-9\u0430-\u044F\u0410-\u042F_\xC0-\xD6\xD8-\xF6\xF8-\xFF\\$]*",
449
+ // Numerics (without negative symbol)
450
+ "(?:(?:[0-9]*\\.[0-9]+)|[0-9]+)"
451
+ ];
452
+ var minusNegatesAfter = ["binaryOp", "unaryOp", "openParen", "openBracket", "question", "colon"];
453
+ var Lexer = /* @__PURE__ */ (function() {
454
+ function Lexer2(grammar) {
455
+ (0, _classCallCheck2.default)(this, Lexer2);
456
+ this._grammar = grammar;
457
+ }
458
+ (0, _createClass2.default)(Lexer2, [{
459
+ key: "getElements",
460
+ value: function getElements(str) {
461
+ var regex = this._getSplitRegex();
462
+ return str.split(regex).filter(function(elem) {
463
+ return elem;
464
+ });
465
+ }
466
+ /**
467
+ * Converts an array of expression elements into an array of tokens. Note that
468
+ * the resulting array may not equal the element array in length, as any
469
+ * elements that consist only of whitespace get appended to the previous
470
+ * token's "raw" property. For the structure of a token object, please see
471
+ * {@link Lexer#tokenize}.
472
+ * @param {Array<string>} elements An array of Jexl expression elements to be
473
+ * converted to tokens
474
+ * @returns {Array<{type, value, raw}>} an array of token objects.
475
+ */
476
+ }, {
477
+ key: "getTokens",
478
+ value: function getTokens(elements) {
479
+ var tokens = [];
480
+ var negate = false;
481
+ for (var i = 0; i < elements.length; i++) {
482
+ if (this._isWhitespace(elements[i])) {
483
+ if (tokens.length) {
484
+ tokens[tokens.length - 1].raw += elements[i];
485
+ }
486
+ } else if (elements[i] === "-" && this._isNegative(tokens)) {
487
+ negate = true;
488
+ } else {
489
+ if (negate) {
490
+ elements[i] = "-" + elements[i];
491
+ negate = false;
492
+ }
493
+ tokens.push(this._createToken(elements[i]));
494
+ }
495
+ }
496
+ if (negate) {
497
+ tokens.push(this._createToken("-"));
498
+ }
499
+ return tokens;
500
+ }
501
+ /**
502
+ * Converts a Jexl string into an array of tokens. Each token is an object
503
+ * in the following format:
504
+ *
505
+ * {
506
+ * type: <string>,
507
+ * [name]: <string>,
508
+ * value: <boolean|number|string>,
509
+ * raw: <string>
510
+ * }
511
+ *
512
+ * Type is one of the following:
513
+ *
514
+ * literal, identifier, binaryOp, unaryOp
515
+ *
516
+ * OR, if the token is a control character its type is the name of the element
517
+ * defined in the Grammar.
518
+ *
519
+ * Name appears only if the token is a control string found in
520
+ * {@link grammar#elements}, and is set to the name of the element.
521
+ *
522
+ * Value is the value of the token in the correct type (boolean or numeric as
523
+ * appropriate). Raw is the string representation of this value taken directly
524
+ * from the expression string, including any trailing spaces.
525
+ * @param {string} str The Jexl string to be tokenized
526
+ * @returns {Array<{type, value, raw}>} an array of token objects.
527
+ * @throws {Error} if the provided string contains an invalid token.
528
+ */
529
+ }, {
530
+ key: "tokenize",
531
+ value: function tokenize(str) {
532
+ var elements = this.getElements(str);
533
+ return this.getTokens(elements);
534
+ }
535
+ /**
536
+ * Creates a new token object from an element of a Jexl string. See
537
+ * {@link Lexer#tokenize} for a description of the token object.
538
+ * @param {string} element The element from which a token should be made
539
+ * @returns {{value: number|boolean|string, [name]: string, type: string,
540
+ * raw: string}} a token object describing the provided element.
541
+ * @throws {Error} if the provided string is not a valid expression element.
542
+ * @private
543
+ */
544
+ }, {
545
+ key: "_createToken",
546
+ value: function _createToken(element) {
547
+ var token = {
548
+ type: "literal",
549
+ value: element,
550
+ raw: element
551
+ };
552
+ if (element[0] === '"' || element[0] === "'") {
553
+ token.value = this._unquote(element);
554
+ } else if (element.match(numericRegex)) {
555
+ token.value = parseFloat(element);
556
+ } else if (element === "true" || element === "false") {
557
+ token.value = element === "true";
558
+ } else if (this._grammar.elements[element]) {
559
+ token.type = this._grammar.elements[element].type;
560
+ } else if (element.match(identRegex)) {
561
+ token.type = "identifier";
562
+ } else {
563
+ throw new Error("Invalid expression token: ".concat(element));
564
+ }
565
+ return token;
566
+ }
567
+ /**
568
+ * Escapes a string so that it can be treated as a string literal within a
569
+ * regular expression.
570
+ * @param {string} str The string to be escaped
571
+ * @returns {string} the RegExp-escaped string.
572
+ * @see https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
573
+ * @private
574
+ */
575
+ }, {
576
+ key: "_escapeRegExp",
577
+ value: function _escapeRegExp(str) {
578
+ str = str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
579
+ if (str.match(identRegex)) {
580
+ str = "\\b" + str + "\\b";
581
+ }
582
+ return str;
583
+ }
584
+ /**
585
+ * Gets a RegEx object appropriate for splitting a Jexl string into its core
586
+ * elements.
587
+ * @returns {RegExp} An element-splitting RegExp object
588
+ * @private
589
+ */
590
+ }, {
591
+ key: "_getSplitRegex",
592
+ value: function _getSplitRegex() {
593
+ var _this = this;
594
+ if (!this._splitRegex) {
595
+ var elemArray = Object.keys(this._grammar.elements).sort(function(a, b) {
596
+ return b.length - a.length;
597
+ }).map(function(elem) {
598
+ return _this._escapeRegExp(elem);
599
+ }, this);
600
+ this._splitRegex = new RegExp("(" + [preOpRegexElems.join("|"), elemArray.join("|"), postOpRegexElems.join("|")].join("|") + ")");
601
+ }
602
+ return this._splitRegex;
603
+ }
604
+ /**
605
+ * Determines whether the addition of a '-' token should be interpreted as a
606
+ * negative symbol for an upcoming number, given an array of tokens already
607
+ * processed.
608
+ * @param {Array<Object>} tokens An array of tokens already processed
609
+ * @returns {boolean} true if adding a '-' should be considered a negative
610
+ * symbol; false otherwise
611
+ * @private
612
+ */
613
+ }, {
614
+ key: "_isNegative",
615
+ value: function _isNegative(tokens) {
616
+ if (!tokens.length) return true;
617
+ return minusNegatesAfter.some(function(type) {
618
+ return type === tokens[tokens.length - 1].type;
619
+ });
620
+ }
621
+ /**
622
+ * A utility function to determine if a string consists of only space
623
+ * characters.
624
+ * @param {string} str A string to be tested
625
+ * @returns {boolean} true if the string is empty or consists of only spaces;
626
+ * false otherwise.
627
+ * @private
628
+ */
629
+ }, {
630
+ key: "_isWhitespace",
631
+ value: function _isWhitespace(str) {
632
+ return !!str.match(whitespaceRegex);
633
+ }
634
+ /**
635
+ * Removes the beginning and trailing quotes from a string, unescapes any
636
+ * escaped quotes on its interior, and unescapes any escaped escape
637
+ * characters. Note that this function is not defensive; it assumes that the
638
+ * provided string is not empty, and that its first and last characters are
639
+ * actually quotes.
640
+ * @param {string} str A string whose first and last characters are quotes
641
+ * @returns {string} a string with the surrounding quotes stripped and escapes
642
+ * properly processed.
643
+ * @private
644
+ */
645
+ }, {
646
+ key: "_unquote",
647
+ value: function _unquote(str) {
648
+ var quote = str[0];
649
+ var escQuoteRegex = new RegExp("\\\\" + quote, "g");
650
+ return str.substr(1, str.length - 2).replace(escQuoteRegex, quote).replace(escEscRegex, "\\");
651
+ }
652
+ }]);
653
+ return Lexer2;
654
+ })();
655
+ module.exports = Lexer;
656
+ }
657
+ });
658
+
659
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/handlers.js
660
+ var require_handlers2 = __commonJS({
661
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/handlers.js"(exports) {
662
+ "use strict";
663
+ exports.argVal = function(ast) {
664
+ if (ast) this._cursor.args.push(ast);
665
+ };
666
+ exports.arrayStart = function() {
667
+ this._placeAtCursor({
668
+ type: "ArrayLiteral",
669
+ value: []
670
+ });
671
+ };
672
+ exports.arrayVal = function(ast) {
673
+ if (ast) {
674
+ this._cursor.value.push(ast);
675
+ }
676
+ };
677
+ exports.binaryOp = function(token) {
678
+ var precedence = this._grammar.elements[token.value].precedence || 0;
679
+ var parent = this._cursor._parent;
680
+ while (parent && parent.operator && this._grammar.elements[parent.operator].precedence >= precedence) {
681
+ this._cursor = parent;
682
+ parent = parent._parent;
683
+ }
684
+ var node = {
685
+ type: "BinaryExpression",
686
+ operator: token.value,
687
+ left: this._cursor
688
+ };
689
+ this._setParent(this._cursor, node);
690
+ this._cursor = parent;
691
+ this._placeAtCursor(node);
692
+ };
693
+ exports.dot = function() {
694
+ this._nextIdentEncapsulate = this._cursor && this._cursor.type !== "UnaryExpression" && (this._cursor.type !== "BinaryExpression" || this._cursor.type === "BinaryExpression" && this._cursor.right);
695
+ this._nextIdentRelative = !this._cursor || this._cursor && !this._nextIdentEncapsulate;
696
+ if (this._nextIdentRelative) {
697
+ this._relative = true;
698
+ }
699
+ };
700
+ exports.filter = function(ast) {
701
+ this._placeBeforeCursor({
702
+ type: "FilterExpression",
703
+ expr: ast,
704
+ relative: this._subParser.isRelative(),
705
+ subject: this._cursor
706
+ });
707
+ };
708
+ exports.functionCall = function() {
709
+ this._placeBeforeCursor({
710
+ type: "FunctionCall",
711
+ name: this._cursor.value,
712
+ args: [],
713
+ pool: "functions"
714
+ });
715
+ };
716
+ exports.identifier = function(token) {
717
+ var node = {
718
+ type: "Identifier",
719
+ value: token.value
720
+ };
721
+ if (this._nextIdentEncapsulate) {
722
+ node.from = this._cursor;
723
+ this._placeBeforeCursor(node);
724
+ this._nextIdentEncapsulate = false;
725
+ } else {
726
+ if (this._nextIdentRelative) {
727
+ node.relative = true;
728
+ this._nextIdentRelative = false;
729
+ }
730
+ this._placeAtCursor(node);
731
+ }
732
+ };
733
+ exports.literal = function(token) {
734
+ this._placeAtCursor({
735
+ type: "Literal",
736
+ value: token.value
737
+ });
738
+ };
739
+ exports.objKey = function(token) {
740
+ this._curObjKey = token.value;
741
+ };
742
+ exports.objStart = function() {
743
+ this._placeAtCursor({
744
+ type: "ObjectLiteral",
745
+ value: {}
746
+ });
747
+ };
748
+ exports.objVal = function(ast) {
749
+ this._cursor.value[this._curObjKey] = ast;
750
+ };
751
+ exports.subExpression = function(ast) {
752
+ this._placeAtCursor(ast);
753
+ };
754
+ exports.ternaryEnd = function(ast) {
755
+ this._cursor.alternate = ast;
756
+ };
757
+ exports.ternaryMid = function(ast) {
758
+ this._cursor.consequent = ast;
759
+ };
760
+ exports.ternaryStart = function() {
761
+ this._tree = {
762
+ type: "ConditionalExpression",
763
+ test: this._tree
764
+ };
765
+ this._cursor = this._tree;
766
+ };
767
+ exports.transform = function(token) {
768
+ this._placeBeforeCursor({
769
+ type: "FunctionCall",
770
+ name: token.value,
771
+ args: [this._cursor],
772
+ pool: "transforms"
773
+ });
774
+ };
775
+ exports.unaryOp = function(token) {
776
+ this._placeAtCursor({
777
+ type: "UnaryExpression",
778
+ operator: token.value
779
+ });
780
+ };
781
+ }
782
+ });
783
+
784
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/states.js
785
+ var require_states = __commonJS({
786
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/states.js"(exports) {
787
+ "use strict";
788
+ var h = require_handlers2();
789
+ exports.states = {
790
+ expectOperand: {
791
+ tokenTypes: {
792
+ literal: {
793
+ toState: "expectBinOp"
794
+ },
795
+ identifier: {
796
+ toState: "identifier"
797
+ },
798
+ unaryOp: {},
799
+ openParen: {
800
+ toState: "subExpression"
801
+ },
802
+ openCurl: {
803
+ toState: "expectObjKey",
804
+ handler: h.objStart
805
+ },
806
+ dot: {
807
+ toState: "traverse"
808
+ },
809
+ openBracket: {
810
+ toState: "arrayVal",
811
+ handler: h.arrayStart
812
+ }
813
+ }
814
+ },
815
+ expectBinOp: {
816
+ tokenTypes: {
817
+ binaryOp: {
818
+ toState: "expectOperand"
819
+ },
820
+ pipe: {
821
+ toState: "expectTransform"
822
+ },
823
+ dot: {
824
+ toState: "traverse"
825
+ },
826
+ question: {
827
+ toState: "ternaryMid",
828
+ handler: h.ternaryStart
829
+ }
830
+ },
831
+ completable: true
832
+ },
833
+ expectTransform: {
834
+ tokenTypes: {
835
+ identifier: {
836
+ toState: "postTransform",
837
+ handler: h.transform
838
+ }
839
+ }
840
+ },
841
+ expectObjKey: {
842
+ tokenTypes: {
843
+ identifier: {
844
+ toState: "expectKeyValSep",
845
+ handler: h.objKey
846
+ },
847
+ closeCurl: {
848
+ toState: "expectBinOp"
849
+ }
850
+ }
851
+ },
852
+ expectKeyValSep: {
853
+ tokenTypes: {
854
+ colon: {
855
+ toState: "objVal"
856
+ }
857
+ }
858
+ },
859
+ postTransform: {
860
+ tokenTypes: {
861
+ openParen: {
862
+ toState: "argVal"
863
+ },
864
+ binaryOp: {
865
+ toState: "expectOperand"
866
+ },
867
+ dot: {
868
+ toState: "traverse"
869
+ },
870
+ openBracket: {
871
+ toState: "filter"
872
+ },
873
+ pipe: {
874
+ toState: "expectTransform"
875
+ }
876
+ },
877
+ completable: true
878
+ },
879
+ postArgs: {
880
+ tokenTypes: {
881
+ binaryOp: {
882
+ toState: "expectOperand"
883
+ },
884
+ dot: {
885
+ toState: "traverse"
886
+ },
887
+ openBracket: {
888
+ toState: "filter"
889
+ },
890
+ pipe: {
891
+ toState: "expectTransform"
892
+ }
893
+ },
894
+ completable: true
895
+ },
896
+ identifier: {
897
+ tokenTypes: {
898
+ binaryOp: {
899
+ toState: "expectOperand"
900
+ },
901
+ dot: {
902
+ toState: "traverse"
903
+ },
904
+ openBracket: {
905
+ toState: "filter"
906
+ },
907
+ openParen: {
908
+ toState: "argVal",
909
+ handler: h.functionCall
910
+ },
911
+ pipe: {
912
+ toState: "expectTransform"
913
+ },
914
+ question: {
915
+ toState: "ternaryMid",
916
+ handler: h.ternaryStart
917
+ }
918
+ },
919
+ completable: true
920
+ },
921
+ traverse: {
922
+ tokenTypes: {
923
+ identifier: {
924
+ toState: "identifier"
925
+ }
926
+ }
927
+ },
928
+ filter: {
929
+ subHandler: h.filter,
930
+ endStates: {
931
+ closeBracket: "identifier"
932
+ }
933
+ },
934
+ subExpression: {
935
+ subHandler: h.subExpression,
936
+ endStates: {
937
+ closeParen: "expectBinOp"
938
+ }
939
+ },
940
+ argVal: {
941
+ subHandler: h.argVal,
942
+ endStates: {
943
+ comma: "argVal",
944
+ closeParen: "postArgs"
945
+ }
946
+ },
947
+ objVal: {
948
+ subHandler: h.objVal,
949
+ endStates: {
950
+ comma: "expectObjKey",
951
+ closeCurl: "expectBinOp"
952
+ }
953
+ },
954
+ arrayVal: {
955
+ subHandler: h.arrayVal,
956
+ endStates: {
957
+ comma: "arrayVal",
958
+ closeBracket: "expectBinOp"
959
+ }
960
+ },
961
+ ternaryMid: {
962
+ subHandler: h.ternaryMid,
963
+ endStates: {
964
+ colon: "ternaryEnd"
965
+ }
966
+ },
967
+ ternaryEnd: {
968
+ subHandler: h.ternaryEnd,
969
+ completable: true
970
+ }
971
+ };
972
+ }
973
+ });
974
+
975
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/Parser.js
976
+ var require_Parser = __commonJS({
977
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/parser/Parser.js"(exports, module) {
978
+ "use strict";
979
+ var _interopRequireDefault = require_interopRequireDefault();
980
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
981
+ var _createClass2 = _interopRequireDefault(require_createClass());
982
+ var handlers = require_handlers2();
983
+ var states = require_states().states;
984
+ var Parser = /* @__PURE__ */ (function() {
985
+ function Parser2(grammar, prefix, stopMap) {
986
+ (0, _classCallCheck2.default)(this, Parser2);
987
+ this._grammar = grammar;
988
+ this._state = "expectOperand";
989
+ this._tree = null;
990
+ this._exprStr = prefix || "";
991
+ this._relative = false;
992
+ this._stopMap = stopMap || {};
993
+ }
994
+ (0, _createClass2.default)(Parser2, [{
995
+ key: "addToken",
996
+ value: function addToken(token) {
997
+ if (this._state === "complete") {
998
+ throw new Error("Cannot add a new token to a completed Parser");
999
+ }
1000
+ var state = states[this._state];
1001
+ var startExpr = this._exprStr;
1002
+ this._exprStr += token.raw;
1003
+ if (state.subHandler) {
1004
+ if (!this._subParser) {
1005
+ this._startSubExpression(startExpr);
1006
+ }
1007
+ var stopState = this._subParser.addToken(token);
1008
+ if (stopState) {
1009
+ this._endSubExpression();
1010
+ if (this._parentStop) return stopState;
1011
+ this._state = stopState;
1012
+ }
1013
+ } else if (state.tokenTypes[token.type]) {
1014
+ var typeOpts = state.tokenTypes[token.type];
1015
+ var handleFunc = handlers[token.type];
1016
+ if (typeOpts.handler) {
1017
+ handleFunc = typeOpts.handler;
1018
+ }
1019
+ if (handleFunc) {
1020
+ handleFunc.call(this, token);
1021
+ }
1022
+ if (typeOpts.toState) {
1023
+ this._state = typeOpts.toState;
1024
+ }
1025
+ } else if (this._stopMap[token.type]) {
1026
+ return this._stopMap[token.type];
1027
+ } else {
1028
+ throw new Error("Token ".concat(token.raw, " (").concat(token.type, ") unexpected in expression: ").concat(this._exprStr));
1029
+ }
1030
+ return false;
1031
+ }
1032
+ /**
1033
+ * Processes an array of tokens iteratively through the {@link #addToken}
1034
+ * function.
1035
+ * @param {Array<{type: <string>}>} tokens An array of tokens, as provided by
1036
+ * the {@link Lexer#tokenize} function.
1037
+ */
1038
+ }, {
1039
+ key: "addTokens",
1040
+ value: function addTokens(tokens) {
1041
+ tokens.forEach(this.addToken, this);
1042
+ }
1043
+ /**
1044
+ * Marks this Parser instance as completed and retrieves the full AST.
1045
+ * @returns {{}|null} a full expression tree, ready for evaluation by the
1046
+ * {@link Evaluator#eval} function, or null if no tokens were passed to
1047
+ * the parser before complete was called
1048
+ * @throws {Error} if the parser is not in a state where it's legal to end
1049
+ * the expression, indicating that the expression is incomplete
1050
+ */
1051
+ }, {
1052
+ key: "complete",
1053
+ value: function complete() {
1054
+ if (this._cursor && !states[this._state].completable) {
1055
+ throw new Error("Unexpected end of expression: ".concat(this._exprStr));
1056
+ }
1057
+ if (this._subParser) {
1058
+ this._endSubExpression();
1059
+ }
1060
+ this._state = "complete";
1061
+ return this._cursor ? this._tree : null;
1062
+ }
1063
+ /**
1064
+ * Indicates whether the expression tree contains a relative path identifier.
1065
+ * @returns {boolean} true if a relative identifier exists false otherwise.
1066
+ */
1067
+ }, {
1068
+ key: "isRelative",
1069
+ value: function isRelative() {
1070
+ return this._relative;
1071
+ }
1072
+ /**
1073
+ * Ends a subexpression by completing the subParser and passing its result
1074
+ * to the subHandler configured in the current state.
1075
+ * @private
1076
+ */
1077
+ }, {
1078
+ key: "_endSubExpression",
1079
+ value: function _endSubExpression() {
1080
+ states[this._state].subHandler.call(this, this._subParser.complete());
1081
+ this._subParser = null;
1082
+ }
1083
+ /**
1084
+ * Places a new tree node at the current position of the cursor (to the 'right'
1085
+ * property) and then advances the cursor to the new node. This function also
1086
+ * handles setting the parent of the new node.
1087
+ * @param {{type: <string>}} node A node to be added to the AST
1088
+ * @private
1089
+ */
1090
+ }, {
1091
+ key: "_placeAtCursor",
1092
+ value: function _placeAtCursor(node) {
1093
+ if (!this._cursor) {
1094
+ this._tree = node;
1095
+ } else {
1096
+ this._cursor.right = node;
1097
+ this._setParent(node, this._cursor);
1098
+ }
1099
+ this._cursor = node;
1100
+ }
1101
+ /**
1102
+ * Places a tree node before the current position of the cursor, replacing
1103
+ * the node that the cursor currently points to. This should only be called in
1104
+ * cases where the cursor is known to exist, and the provided node already
1105
+ * contains a pointer to what's at the cursor currently.
1106
+ * @param {{type: <string>}} node A node to be added to the AST
1107
+ * @private
1108
+ */
1109
+ }, {
1110
+ key: "_placeBeforeCursor",
1111
+ value: function _placeBeforeCursor(node) {
1112
+ this._cursor = this._cursor._parent;
1113
+ this._placeAtCursor(node);
1114
+ }
1115
+ /**
1116
+ * Sets the parent of a node by creating a non-enumerable _parent property
1117
+ * that points to the supplied parent argument.
1118
+ * @param {{type: <string>}} node A node of the AST on which to set a new
1119
+ * parent
1120
+ * @param {{type: <string>}} parent An existing node of the AST to serve as the
1121
+ * parent of the new node
1122
+ * @private
1123
+ */
1124
+ }, {
1125
+ key: "_setParent",
1126
+ value: function _setParent(node, parent) {
1127
+ Object.defineProperty(node, "_parent", {
1128
+ value: parent,
1129
+ writable: true
1130
+ });
1131
+ }
1132
+ /**
1133
+ * Prepares the Parser to accept a subexpression by (re)instantiating the
1134
+ * subParser.
1135
+ * @param {string} [exprStr] The expression string to prefix to the new Parser
1136
+ * @private
1137
+ */
1138
+ }, {
1139
+ key: "_startSubExpression",
1140
+ value: function _startSubExpression(exprStr) {
1141
+ var endStates = states[this._state].endStates;
1142
+ if (!endStates) {
1143
+ this._parentStop = true;
1144
+ endStates = this._stopMap;
1145
+ }
1146
+ this._subParser = new Parser2(this._grammar, exprStr, endStates);
1147
+ }
1148
+ }]);
1149
+ return Parser2;
1150
+ })();
1151
+ module.exports = Parser;
1152
+ }
1153
+ });
1154
+
1155
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/PromiseSync.js
1156
+ var require_PromiseSync = __commonJS({
1157
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/PromiseSync.js"(exports, module) {
1158
+ "use strict";
1159
+ var _interopRequireDefault = require_interopRequireDefault();
1160
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1161
+ var _createClass2 = _interopRequireDefault(require_createClass());
1162
+ var PromiseSync = /* @__PURE__ */ (function() {
1163
+ function PromiseSync2(fn) {
1164
+ (0, _classCallCheck2.default)(this, PromiseSync2);
1165
+ fn(this._resolve.bind(this), this._reject.bind(this));
1166
+ }
1167
+ (0, _createClass2.default)(PromiseSync2, [{
1168
+ key: "catch",
1169
+ value: function _catch(rejected) {
1170
+ if (this.error) {
1171
+ try {
1172
+ this._resolve(rejected(this.error));
1173
+ } catch (e) {
1174
+ this._reject(e);
1175
+ }
1176
+ }
1177
+ return this;
1178
+ }
1179
+ }, {
1180
+ key: "then",
1181
+ value: function then(resolved, rejected) {
1182
+ if (!this.error) {
1183
+ try {
1184
+ this._resolve(resolved(this.value));
1185
+ } catch (e) {
1186
+ this._reject(e);
1187
+ }
1188
+ }
1189
+ if (rejected) this.catch(rejected);
1190
+ return this;
1191
+ }
1192
+ }, {
1193
+ key: "_reject",
1194
+ value: function _reject(error) {
1195
+ this.value = void 0;
1196
+ this.error = error;
1197
+ }
1198
+ }, {
1199
+ key: "_resolve",
1200
+ value: function _resolve(val) {
1201
+ if (val instanceof PromiseSync2) {
1202
+ if (val.error) {
1203
+ this._reject(val.error);
1204
+ } else {
1205
+ this._resolve(val.value);
1206
+ }
1207
+ } else {
1208
+ this.value = val;
1209
+ this.error = void 0;
1210
+ }
1211
+ }
1212
+ }]);
1213
+ return PromiseSync2;
1214
+ })();
1215
+ PromiseSync.all = function(vals) {
1216
+ return new PromiseSync(function(resolve) {
1217
+ var resolved = vals.map(function(val) {
1218
+ while (val instanceof PromiseSync) {
1219
+ if (val.error) throw Error(val.error);
1220
+ val = val.value;
1221
+ }
1222
+ return val;
1223
+ });
1224
+ resolve(resolved);
1225
+ });
1226
+ };
1227
+ PromiseSync.resolve = function(val) {
1228
+ return new PromiseSync(function(resolve) {
1229
+ return resolve(val);
1230
+ });
1231
+ };
1232
+ PromiseSync.reject = function(error) {
1233
+ return new PromiseSync(function(resolve, reject) {
1234
+ return reject(error);
1235
+ });
1236
+ };
1237
+ module.exports = PromiseSync;
1238
+ }
1239
+ });
1240
+
1241
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Expression.js
1242
+ var require_Expression = __commonJS({
1243
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Expression.js"(exports, module) {
1244
+ "use strict";
1245
+ var _interopRequireDefault = require_interopRequireDefault();
1246
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1247
+ var _createClass2 = _interopRequireDefault(require_createClass());
1248
+ var Evaluator = require_Evaluator();
1249
+ var Lexer = require_Lexer();
1250
+ var Parser = require_Parser();
1251
+ var PromiseSync = require_PromiseSync();
1252
+ var Expression = /* @__PURE__ */ (function() {
1253
+ function Expression2(grammar, exprStr) {
1254
+ (0, _classCallCheck2.default)(this, Expression2);
1255
+ this._grammar = grammar;
1256
+ this._exprStr = exprStr;
1257
+ this._ast = null;
1258
+ }
1259
+ (0, _createClass2.default)(Expression2, [{
1260
+ key: "compile",
1261
+ value: function compile() {
1262
+ var lexer = new Lexer(this._grammar);
1263
+ var parser = new Parser(this._grammar);
1264
+ var tokens = lexer.tokenize(this._exprStr);
1265
+ parser.addTokens(tokens);
1266
+ this._ast = parser.complete();
1267
+ return this;
1268
+ }
1269
+ /**
1270
+ * Asynchronously evaluates the expression within an optional context.
1271
+ * @param {Object} [context] A mapping of variables to values, which will be
1272
+ * made accessible to the Jexl expression when evaluating it
1273
+ * @returns {Promise<*>} resolves with the result of the evaluation.
1274
+ */
1275
+ }, {
1276
+ key: "eval",
1277
+ value: function _eval() {
1278
+ var context = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1279
+ return this._eval(context, Promise);
1280
+ }
1281
+ /**
1282
+ * Synchronously evaluates the expression within an optional context.
1283
+ * @param {Object} [context] A mapping of variables to values, which will be
1284
+ * made accessible to the Jexl expression when evaluating it
1285
+ * @returns {*} the result of the evaluation.
1286
+ * @throws {*} on error
1287
+ */
1288
+ }, {
1289
+ key: "evalSync",
1290
+ value: function evalSync() {
1291
+ var context = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
1292
+ var res = this._eval(context, PromiseSync);
1293
+ if (res.error) throw res.error;
1294
+ return res.value;
1295
+ }
1296
+ }, {
1297
+ key: "_eval",
1298
+ value: function _eval(context, promise) {
1299
+ var _this = this;
1300
+ return promise.resolve().then(function() {
1301
+ var ast = _this._getAst();
1302
+ var evaluator = new Evaluator(_this._grammar, context, void 0, promise);
1303
+ return evaluator.eval(ast);
1304
+ });
1305
+ }
1306
+ }, {
1307
+ key: "_getAst",
1308
+ value: function _getAst() {
1309
+ if (!this._ast) this.compile();
1310
+ return this._ast;
1311
+ }
1312
+ }]);
1313
+ return Expression2;
1314
+ })();
1315
+ module.exports = Expression;
1316
+ }
1317
+ });
1318
+
1319
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/grammar.js
1320
+ var require_grammar = __commonJS({
1321
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/grammar.js"(exports) {
1322
+ "use strict";
1323
+ exports.getGrammar = function() {
1324
+ return {
1325
+ /**
1326
+ * A map of all expression elements to their properties. Note that changes
1327
+ * here may require changes in the Lexer or Parser.
1328
+ * @type {{}}
1329
+ */
1330
+ elements: {
1331
+ ".": {
1332
+ type: "dot"
1333
+ },
1334
+ "[": {
1335
+ type: "openBracket"
1336
+ },
1337
+ "]": {
1338
+ type: "closeBracket"
1339
+ },
1340
+ "|": {
1341
+ type: "pipe"
1342
+ },
1343
+ "{": {
1344
+ type: "openCurl"
1345
+ },
1346
+ "}": {
1347
+ type: "closeCurl"
1348
+ },
1349
+ ":": {
1350
+ type: "colon"
1351
+ },
1352
+ ",": {
1353
+ type: "comma"
1354
+ },
1355
+ "(": {
1356
+ type: "openParen"
1357
+ },
1358
+ ")": {
1359
+ type: "closeParen"
1360
+ },
1361
+ "?": {
1362
+ type: "question"
1363
+ },
1364
+ "+": {
1365
+ type: "binaryOp",
1366
+ precedence: 30,
1367
+ eval: function _eval(left, right) {
1368
+ return left + right;
1369
+ }
1370
+ },
1371
+ "-": {
1372
+ type: "binaryOp",
1373
+ precedence: 30,
1374
+ eval: function _eval(left, right) {
1375
+ return left - right;
1376
+ }
1377
+ },
1378
+ "*": {
1379
+ type: "binaryOp",
1380
+ precedence: 40,
1381
+ eval: function _eval(left, right) {
1382
+ return left * right;
1383
+ }
1384
+ },
1385
+ "/": {
1386
+ type: "binaryOp",
1387
+ precedence: 40,
1388
+ eval: function _eval(left, right) {
1389
+ return left / right;
1390
+ }
1391
+ },
1392
+ "//": {
1393
+ type: "binaryOp",
1394
+ precedence: 40,
1395
+ eval: function _eval(left, right) {
1396
+ return Math.floor(left / right);
1397
+ }
1398
+ },
1399
+ "%": {
1400
+ type: "binaryOp",
1401
+ precedence: 50,
1402
+ eval: function _eval(left, right) {
1403
+ return left % right;
1404
+ }
1405
+ },
1406
+ "^": {
1407
+ type: "binaryOp",
1408
+ precedence: 50,
1409
+ eval: function _eval(left, right) {
1410
+ return Math.pow(left, right);
1411
+ }
1412
+ },
1413
+ "==": {
1414
+ type: "binaryOp",
1415
+ precedence: 20,
1416
+ eval: function _eval(left, right) {
1417
+ return left == right;
1418
+ }
1419
+ },
1420
+ "!=": {
1421
+ type: "binaryOp",
1422
+ precedence: 20,
1423
+ eval: function _eval(left, right) {
1424
+ return left != right;
1425
+ }
1426
+ },
1427
+ ">": {
1428
+ type: "binaryOp",
1429
+ precedence: 20,
1430
+ eval: function _eval(left, right) {
1431
+ return left > right;
1432
+ }
1433
+ },
1434
+ ">=": {
1435
+ type: "binaryOp",
1436
+ precedence: 20,
1437
+ eval: function _eval(left, right) {
1438
+ return left >= right;
1439
+ }
1440
+ },
1441
+ "<": {
1442
+ type: "binaryOp",
1443
+ precedence: 20,
1444
+ eval: function _eval(left, right) {
1445
+ return left < right;
1446
+ }
1447
+ },
1448
+ "<=": {
1449
+ type: "binaryOp",
1450
+ precedence: 20,
1451
+ eval: function _eval(left, right) {
1452
+ return left <= right;
1453
+ }
1454
+ },
1455
+ "&&": {
1456
+ type: "binaryOp",
1457
+ precedence: 10,
1458
+ evalOnDemand: function evalOnDemand(left, right) {
1459
+ return left.eval().then(function(leftVal) {
1460
+ if (!leftVal) return leftVal;
1461
+ return right.eval();
1462
+ });
1463
+ }
1464
+ },
1465
+ "||": {
1466
+ type: "binaryOp",
1467
+ precedence: 10,
1468
+ evalOnDemand: function evalOnDemand(left, right) {
1469
+ return left.eval().then(function(leftVal) {
1470
+ if (leftVal) return leftVal;
1471
+ return right.eval();
1472
+ });
1473
+ }
1474
+ },
1475
+ in: {
1476
+ type: "binaryOp",
1477
+ precedence: 20,
1478
+ eval: function _eval(left, right) {
1479
+ if (typeof right === "string") {
1480
+ return right.indexOf(left) !== -1;
1481
+ }
1482
+ if (Array.isArray(right)) {
1483
+ return right.some(function(elem) {
1484
+ return elem === left;
1485
+ });
1486
+ }
1487
+ return false;
1488
+ }
1489
+ },
1490
+ "!": {
1491
+ type: "unaryOp",
1492
+ precedence: Infinity,
1493
+ eval: function _eval(right) {
1494
+ return !right;
1495
+ }
1496
+ }
1497
+ },
1498
+ /**
1499
+ * A map of function names to javascript functions. A Jexl function
1500
+ * takes zero ore more arguemnts:
1501
+ *
1502
+ * - {*} ...args: A variable number of arguments passed to this function.
1503
+ * All of these are pre-evaluated to their actual values before calling
1504
+ * the function.
1505
+ *
1506
+ * The Jexl function should return either the transformed value, or
1507
+ * a Promises/A+ Promise object that resolves with the value and rejects
1508
+ * or throws only when an unrecoverable error occurs. Functions should
1509
+ * generally return undefined when they don't make sense to be used on the
1510
+ * given value type, rather than throw/reject. An error is only
1511
+ * appropriate when the function would normally return a value, but
1512
+ * cannot due to some other failure.
1513
+ */
1514
+ functions: {},
1515
+ /**
1516
+ * A map of transform names to transform functions. A transform function
1517
+ * takes one ore more arguemnts:
1518
+ *
1519
+ * - {*} val: A value to be transformed
1520
+ * - {*} ...args: A variable number of arguments passed to this transform.
1521
+ * All of these are pre-evaluated to their actual values before calling
1522
+ * the function.
1523
+ *
1524
+ * The transform function should return either the transformed value, or
1525
+ * a Promises/A+ Promise object that resolves with the value and rejects
1526
+ * or throws only when an unrecoverable error occurs. Transforms should
1527
+ * generally return undefined when they don't make sense to be used on the
1528
+ * given value type, rather than throw/reject. An error is only
1529
+ * appropriate when the transform would normally return a value, but
1530
+ * cannot due to some other failure.
1531
+ */
1532
+ transforms: {}
1533
+ };
1534
+ };
1535
+ }
1536
+ });
1537
+
1538
+ // ../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Jexl.js
1539
+ var require_Jexl = __commonJS({
1540
+ "../../node_modules/.pnpm/jexl@2.3.0/node_modules/jexl/dist/Jexl.js"(exports, module) {
1541
+ "use strict";
1542
+ var _interopRequireDefault = require_interopRequireDefault();
1543
+ var _defineProperty2 = _interopRequireDefault(require_defineProperty());
1544
+ var _classCallCheck2 = _interopRequireDefault(require_classCallCheck());
1545
+ var _createClass2 = _interopRequireDefault(require_createClass());
1546
+ var Expression = require_Expression();
1547
+ var _require = require_grammar();
1548
+ var getGrammar = _require.getGrammar;
1549
+ var Jexl = /* @__PURE__ */ (function() {
1550
+ function Jexl2() {
1551
+ (0, _classCallCheck2.default)(this, Jexl2);
1552
+ this.expr = this.expr.bind(this);
1553
+ this._grammar = getGrammar();
1554
+ }
1555
+ (0, _createClass2.default)(Jexl2, [{
1556
+ key: "addBinaryOp",
1557
+ value: function addBinaryOp(operator, precedence, fn, manualEval) {
1558
+ this._addGrammarElement(operator, (0, _defineProperty2.default)({
1559
+ type: "binaryOp",
1560
+ precedence
1561
+ }, manualEval ? "evalOnDemand" : "eval", fn));
1562
+ }
1563
+ /**
1564
+ * Adds or replaces an expression function in this Jexl instance.
1565
+ * @param {string} name The name of the expression function, as it will be
1566
+ * used within Jexl expressions
1567
+ * @param {function} fn The javascript function to be executed when this
1568
+ * expression function is invoked. It will be provided with each argument
1569
+ * supplied in the expression, in the same order.
1570
+ */
1571
+ }, {
1572
+ key: "addFunction",
1573
+ value: function addFunction(name, fn) {
1574
+ this._grammar.functions[name] = fn;
1575
+ }
1576
+ /**
1577
+ * Syntactic sugar for calling {@link #addFunction} repeatedly. This function
1578
+ * accepts a map of one or more expression function names to their javascript
1579
+ * function counterpart.
1580
+ * @param {{}} map A map of expression function names to javascript functions
1581
+ */
1582
+ }, {
1583
+ key: "addFunctions",
1584
+ value: function addFunctions(map) {
1585
+ for (var key in map) {
1586
+ this._grammar.functions[key] = map[key];
1587
+ }
1588
+ }
1589
+ /**
1590
+ * Adds a unary operator to Jexl. Unary operators are currently only supported
1591
+ * on the left side of the value on which it will operate.
1592
+ * @param {string} operator The operator string to be added
1593
+ * @param {function} fn A function to run to calculate the result. The function
1594
+ * will be called with one argument: the literal value to the right of the
1595
+ * operator. It should return either the resulting value, or a Promise
1596
+ * that resolves with the resulting value.
1597
+ */
1598
+ }, {
1599
+ key: "addUnaryOp",
1600
+ value: function addUnaryOp(operator, fn) {
1601
+ this._addGrammarElement(operator, {
1602
+ type: "unaryOp",
1603
+ weight: Infinity,
1604
+ eval: fn
1605
+ });
1606
+ }
1607
+ /**
1608
+ * Adds or replaces a transform function in this Jexl instance.
1609
+ * @param {string} name The name of the transform function, as it will be used
1610
+ * within Jexl expressions
1611
+ * @param {function} fn The function to be executed when this transform is
1612
+ * invoked. It will be provided with at least one argument:
1613
+ * - {*} value: The value to be transformed
1614
+ * - {...*} args: The arguments for this transform
1615
+ */
1616
+ }, {
1617
+ key: "addTransform",
1618
+ value: function addTransform(name, fn) {
1619
+ this._grammar.transforms[name] = fn;
1620
+ }
1621
+ /**
1622
+ * Syntactic sugar for calling {@link #addTransform} repeatedly. This function
1623
+ * accepts a map of one or more transform names to their transform function.
1624
+ * @param {{}} map A map of transform names to transform functions
1625
+ */
1626
+ }, {
1627
+ key: "addTransforms",
1628
+ value: function addTransforms(map) {
1629
+ for (var key in map) {
1630
+ this._grammar.transforms[key] = map[key];
1631
+ }
1632
+ }
1633
+ /**
1634
+ * Creates an Expression object from the given Jexl expression string, and
1635
+ * immediately compiles it. The returned Expression object can then be
1636
+ * evaluated multiple times with new contexts, without generating any
1637
+ * additional string processing overhead.
1638
+ * @param {string} expression The Jexl expression to be compiled
1639
+ * @returns {Expression} The compiled Expression object
1640
+ */
1641
+ }, {
1642
+ key: "compile",
1643
+ value: function compile(expression) {
1644
+ var exprObj = this.createExpression(expression);
1645
+ return exprObj.compile();
1646
+ }
1647
+ /**
1648
+ * Constructs an Expression object from a Jexl expression string.
1649
+ * @param {string} expression The Jexl expression to be wrapped in an
1650
+ * Expression object
1651
+ * @returns {Expression} The Expression object representing the given string
1652
+ */
1653
+ }, {
1654
+ key: "createExpression",
1655
+ value: function createExpression(expression) {
1656
+ return new Expression(this._grammar, expression);
1657
+ }
1658
+ /**
1659
+ * Retrieves a previously set expression function.
1660
+ * @param {string} name The name of the expression function
1661
+ * @returns {function} The expression function
1662
+ */
1663
+ }, {
1664
+ key: "getFunction",
1665
+ value: function getFunction(name) {
1666
+ return this._grammar.functions[name];
1667
+ }
1668
+ /**
1669
+ * Retrieves a previously set transform function.
1670
+ * @param {string} name The name of the transform function
1671
+ * @returns {function} The transform function
1672
+ */
1673
+ }, {
1674
+ key: "getTransform",
1675
+ value: function getTransform(name) {
1676
+ return this._grammar.transforms[name];
1677
+ }
1678
+ /**
1679
+ * Asynchronously evaluates a Jexl string within an optional context.
1680
+ * @param {string} expression The Jexl expression to be evaluated
1681
+ * @param {Object} [context] A mapping of variables to values, which will be
1682
+ * made accessible to the Jexl expression when evaluating it
1683
+ * @returns {Promise<*>} resolves with the result of the evaluation.
1684
+ */
1685
+ }, {
1686
+ key: "eval",
1687
+ value: function _eval(expression) {
1688
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1689
+ var exprObj = this.createExpression(expression);
1690
+ return exprObj.eval(context);
1691
+ }
1692
+ /**
1693
+ * Synchronously evaluates a Jexl string within an optional context.
1694
+ * @param {string} expression The Jexl expression to be evaluated
1695
+ * @param {Object} [context] A mapping of variables to values, which will be
1696
+ * made accessible to the Jexl expression when evaluating it
1697
+ * @returns {*} the result of the evaluation.
1698
+ * @throws {*} on error
1699
+ */
1700
+ }, {
1701
+ key: "evalSync",
1702
+ value: function evalSync(expression) {
1703
+ var context = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
1704
+ var exprObj = this.createExpression(expression);
1705
+ return exprObj.evalSync(context);
1706
+ }
1707
+ /**
1708
+ * A JavaScript template literal to allow expressions to be defined by the
1709
+ * syntax: expr`40 + 2`
1710
+ * @param {Array<string>} strs
1711
+ * @param {...any} args
1712
+ */
1713
+ }, {
1714
+ key: "expr",
1715
+ value: function expr(strs) {
1716
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
1717
+ args[_key - 1] = arguments[_key];
1718
+ }
1719
+ var exprStr = strs.reduce(function(acc, str, idx) {
1720
+ var arg = idx < args.length ? args[idx] : "";
1721
+ acc += str + arg;
1722
+ return acc;
1723
+ }, "");
1724
+ return this.createExpression(exprStr);
1725
+ }
1726
+ /**
1727
+ * Removes a binary or unary operator from the Jexl grammar.
1728
+ * @param {string} operator The operator string to be removed
1729
+ */
1730
+ }, {
1731
+ key: "removeOp",
1732
+ value: function removeOp(operator) {
1733
+ if (this._grammar.elements[operator] && (this._grammar.elements[operator].type === "binaryOp" || this._grammar.elements[operator].type === "unaryOp")) {
1734
+ delete this._grammar.elements[operator];
1735
+ }
1736
+ }
1737
+ /**
1738
+ * Adds an element to the grammar map used by this Jexl instance.
1739
+ * @param {string} str The key string to be added
1740
+ * @param {{type: <string>}} obj A map of configuration options for this
1741
+ * grammar element
1742
+ * @private
1743
+ */
1744
+ }, {
1745
+ key: "_addGrammarElement",
1746
+ value: function _addGrammarElement(str, obj) {
1747
+ this._grammar.elements[str] = obj;
1748
+ }
1749
+ }]);
1750
+ return Jexl2;
1751
+ })();
1752
+ module.exports = new Jexl();
1753
+ module.exports.Jexl = Jexl;
1754
+ }
1755
+ });
1756
+
1
1757
  // src/workflows.ts
2
1758
  var WORKFLOW_HISTORY_COLLECTION = "__workflow_history";
3
1759
  var LIFECYCLE_EVENTS_COLLECTION = "__lifecycle_events";
@@ -394,7 +2150,7 @@ async function transitionWorkflow(args) {
394
2150
  await hook({ ...hookContext, doc: updated, event: events[0] });
395
2151
  } catch (error) {
396
2152
  try {
397
- const { getConfigLogger, getObservabilityRuntime } = await import("./observability-KCMTV7GO.js");
2153
+ const { getConfigLogger, getObservabilityRuntime } = await import("./observability-HQF4EUSV.js");
398
2154
  getObservabilityRuntime(config)?.recordWorkflowHookFailure({
399
2155
  collection: collection.slug,
400
2156
  transition: transition.name
@@ -450,7 +2206,7 @@ function humanizeProviderName(id, type) {
450
2206
  }
451
2207
 
452
2208
  // src/utils/jexl-helpers.ts
453
- import jexl from "jexl";
2209
+ var import_jexl = __toESM(require_Jexl(), 1);
454
2210
  function slugify(val) {
455
2211
  if (val === void 0 || val === null) return "";
456
2212
  return String(val).normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^a-z0-9\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
@@ -657,7 +2413,7 @@ function get(obj, path, fallback = null) {
657
2413
  }
658
2414
  return curr === void 0 || curr === null ? fallback : curr;
659
2415
  }
660
- function registerJexlHelpers(jexlInstance = jexl) {
2416
+ function registerJexlHelpers(jexlInstance = import_jexl.default) {
661
2417
  const helpers = {
662
2418
  // Strings
663
2419
  slugify,
@@ -721,7 +2477,7 @@ function registerJexlHelpers(jexlInstance = jexl) {
721
2477
  } catch {
722
2478
  }
723
2479
  }
724
- registerJexlHelpers(jexl);
2480
+ registerJexlHelpers(import_jexl.default);
725
2481
  async function evaluateJexl(expression, context = {}) {
726
2482
  if (!expression || typeof expression !== "string") return void 0;
727
2483
  try {
@@ -732,7 +2488,7 @@ async function evaluateJexl(expression, context = {}) {
732
2488
  math: Math,
733
2489
  Math
734
2490
  };
735
- return await jexl.eval(expression, evalContext);
2491
+ return await import_jexl.default.eval(expression, evalContext);
736
2492
  } catch (_err) {
737
2493
  return void 0;
738
2494
  }
@@ -747,7 +2503,7 @@ function evaluateJexlSync(expression, context = {}) {
747
2503
  math: Math,
748
2504
  Math
749
2505
  };
750
- return jexl.evalSync(expression, evalContext);
2506
+ return import_jexl.default.evalSync(expression, evalContext);
751
2507
  } catch (_err) {
752
2508
  return void 0;
753
2509
  }
@@ -792,8 +2548,8 @@ var BUILTIN_JEXL_HELPERS = [
792
2548
  ];
793
2549
 
794
2550
  // src/utils/declarative-hooks.ts
795
- import jexl2 from "jexl";
796
- registerJexlHelpers(jexl2);
2551
+ var import_jexl2 = __toESM(require_Jexl(), 1);
2552
+ registerJexlHelpers(import_jexl2.default);
797
2553
  var SURFACE_ROOTS = {
798
2554
  "collection.beforeRead": ["req", "user", "query", ...BUILTIN_JEXL_HELPERS],
799
2555
  "collection.afterRead": ["req", "user", "doc", ...BUILTIN_JEXL_HELPERS],
@@ -811,7 +2567,7 @@ var COMPILE_CACHE = /* @__PURE__ */ new Map();
811
2567
  function compileExpression(expression) {
812
2568
  const cached = COMPILE_CACHE.get(expression);
813
2569
  if (cached) return cached;
814
- const compiled = jexl2.compile(expression);
2570
+ const compiled = import_jexl2.default.compile(expression);
815
2571
  const next = { ast: compiled._ast };
816
2572
  COMPILE_CACHE.set(expression, next);
817
2573
  return next;
@@ -1967,7 +3723,7 @@ function normalizeConfig(config) {
1967
3723
  }
1968
3724
 
1969
3725
  // src/utils/hooks.ts
1970
- import jexl3 from "jexl";
3726
+ var import_jexl3 = __toESM(require_Jexl(), 1);
1971
3727
  async function runCollectionHooks(hooks, args, options = {}) {
1972
3728
  if (!hooks || hooks.length === 0) {
1973
3729
  return args.data ?? args.doc ?? args.query ?? void 0;
@@ -1988,7 +3744,7 @@ async function runCollectionHooks(hooks, args, options = {}) {
1988
3744
  options.path ?? options.surface
1989
3745
  );
1990
3746
  }
1991
- return jexl3.eval(hook, hookArgs);
3747
+ return import_jexl3.default.eval(hook, hookArgs);
1992
3748
  })() : await hook(hookArgs);
1993
3749
  if (result !== void 0) {
1994
3750
  if (typeof hook === "string" && options.surface) {
@@ -2037,7 +3793,7 @@ async function executeFieldBeforeChange(fields, data, originalDoc, user, db, pat
2037
3793
  "field.beforeChange",
2038
3794
  fieldPath
2039
3795
  );
2040
- return jexl3.eval(hook, hookArgs);
3796
+ return import_jexl3.default.eval(hook, hookArgs);
2041
3797
  })() : await hook(hookArgs);
2042
3798
  }
2043
3799
  result[field.name] = updatedValue;
@@ -3458,6 +5214,7 @@ export {
3458
5214
  resolveAdminAuthCollection,
3459
5215
  getPublicAdminAuthConfig,
3460
5216
  mergeDynamicConfig,
5217
+ require_Jexl,
3461
5218
  slugify,
3462
5219
  lower,
3463
5220
  upper,