@graphrefly/graphrefly 0.32.0 → 0.34.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 (289) hide show
  1. package/dist/{cascading-D3sapjue.d.ts → cascading-Bg0a4VSf.d.ts} +2 -2
  2. package/dist/{cascading-BfQmSmjU.d.cts → cascading-DKIb6Pk8.d.cts} +2 -2
  3. package/dist/{chunk-4JBKKUCJ.js → chunk-2JO6LXFT.js} +1 -1
  4. package/dist/{chunk-FTA5TB2A.js → chunk-2LZ6DL45.js} +1 -1
  5. package/dist/chunk-3Y4BXFFR.js +1 -0
  6. package/dist/{chunk-WQ7I7JVU.js → chunk-4F564IPP.js} +1 -1
  7. package/dist/{chunk-M2VFLRPJ.js → chunk-4NYSEUKV.js} +1 -1
  8. package/dist/{chunk-N2KKISCE.js → chunk-533RQFF6.js} +1 -1
  9. package/dist/{chunk-BU4SUZSA.js → chunk-55T3K37W.js} +1 -1
  10. package/dist/chunk-65WWQ5CB.js +43 -0
  11. package/dist/chunk-6HQ6HVTF.js +1 -0
  12. package/dist/{chunk-4VXL3UZK.js → chunk-7Q2WPFQ7.js} +1 -1
  13. package/dist/chunk-A3GDELMY.js +61 -0
  14. package/dist/{chunk-5PBXUVHI.js → chunk-BY4WKPKM.js} +1 -1
  15. package/dist/{chunk-JYMNVEH6.js → chunk-C5DINHNP.js} +1 -1
  16. package/dist/{chunk-7QS77X6G.js → chunk-CJMFZXIZ.js} +1 -1
  17. package/dist/{chunk-W6FQIFVE.js → chunk-CLD3F4R5.js} +1 -1
  18. package/dist/{chunk-RWGJQQLT.js → chunk-FKRPIRE6.js} +1 -1
  19. package/dist/{chunk-UXEB35L4.js → chunk-GAOX6OPT.js} +1 -1
  20. package/dist/{chunk-TOCCHQI6.js → chunk-GCUYSIM4.js} +1 -1
  21. package/dist/{chunk-XRSHMHEG.js → chunk-HTBOCKVD.js} +1 -1
  22. package/dist/{chunk-LJGPOJHS.js → chunk-IB64M7VP.js} +1 -1
  23. package/dist/{chunk-Q2SY7M7K.js → chunk-IJFSR4NU.js} +1 -1
  24. package/dist/{chunk-X4OOM6QU.js → chunk-INXDSJRC.js} +1 -1
  25. package/dist/{chunk-4YGJ7KZ6.js → chunk-IPNJDNE7.js} +1 -1
  26. package/dist/{chunk-4UUDNFYG.js → chunk-KGKJCHEK.js} +1 -1
  27. package/dist/chunk-KN2UMFT6.js +5 -0
  28. package/dist/{chunk-A4JT4SAD.js → chunk-KRH66M4O.js} +1 -1
  29. package/dist/{chunk-K54OKWNY.js → chunk-L3KUKDZC.js} +1 -1
  30. package/dist/{chunk-Y26UN6J5.js → chunk-LOF5HSD3.js} +1 -1
  31. package/dist/chunk-LYCLF26R.js +1 -0
  32. package/dist/{chunk-CZVYLXFK.js → chunk-M27MVZCP.js} +1 -1
  33. package/dist/{chunk-DWIAG62L.js → chunk-NNKJUORL.js} +1 -1
  34. package/dist/{chunk-WF3V5X2L.js → chunk-PBN426RU.js} +1 -1
  35. package/dist/{chunk-MFNOZ5E6.js → chunk-Q46YJCQH.js} +1 -1
  36. package/dist/{chunk-KD3IYBTD.js → chunk-SFIM774L.js} +1 -1
  37. package/dist/{chunk-VXJX3ZZP.js → chunk-T2TB37TW.js} +1 -1
  38. package/dist/{chunk-UMH3HSP7.js → chunk-T7EQPKOP.js} +1 -1
  39. package/dist/{chunk-JAHAJU4G.js → chunk-TONEKQM3.js} +1 -1
  40. package/dist/{chunk-CNXUW2CU.js → chunk-TZLEMGAK.js} +1 -1
  41. package/dist/{chunk-LWGLBCMU.js → chunk-TZQPPQEQ.js} +1 -1
  42. package/dist/{chunk-7JZ3YORY.js → chunk-U2T2XWDA.js} +1 -1
  43. package/dist/{chunk-WE32AFFA.js → chunk-UF746BQ4.js} +1 -1
  44. package/dist/{chunk-7QMVU3IX.js → chunk-WBWBY6LI.js} +1 -1
  45. package/dist/{chunk-7EMUF2RY.js → chunk-Y63GWRHO.js} +1 -1
  46. package/dist/{chunk-PWKLZ2XU.js → chunk-YDWTVO4E.js} +1 -1
  47. package/dist/{chunk-EIFHFDFD.js → chunk-YUBV7EEE.js} +1 -1
  48. package/dist/compat/index.cjs +5 -5
  49. package/dist/compat/index.d.cts +14 -14
  50. package/dist/compat/index.d.ts +14 -14
  51. package/dist/compat/index.js +1 -1
  52. package/dist/compat/jotai/index.cjs +1 -1
  53. package/dist/compat/jotai/index.d.cts +2 -2
  54. package/dist/compat/jotai/index.d.ts +2 -2
  55. package/dist/compat/jotai/index.js +1 -1
  56. package/dist/compat/nanostores/index.cjs +1 -1
  57. package/dist/compat/nanostores/index.d.cts +2 -2
  58. package/dist/compat/nanostores/index.d.ts +2 -2
  59. package/dist/compat/nanostores/index.js +1 -1
  60. package/dist/compat/nestjs/index.cjs +5 -5
  61. package/dist/compat/nestjs/index.d.cts +6 -6
  62. package/dist/compat/nestjs/index.d.ts +6 -6
  63. package/dist/compat/nestjs/index.js +1 -1
  64. package/dist/compat/react/index.d.cts +2 -2
  65. package/dist/compat/react/index.d.ts +2 -2
  66. package/dist/compat/solid/index.d.cts +2 -2
  67. package/dist/compat/solid/index.d.ts +2 -2
  68. package/dist/compat/svelte/index.d.cts +2 -2
  69. package/dist/compat/svelte/index.d.ts +2 -2
  70. package/dist/compat/vue/index.d.cts +2 -2
  71. package/dist/compat/vue/index.d.ts +2 -2
  72. package/dist/compat/zustand/index.cjs +3 -3
  73. package/dist/compat/zustand/index.d.cts +4 -4
  74. package/dist/compat/zustand/index.d.ts +4 -4
  75. package/dist/compat/zustand/index.js +1 -1
  76. package/dist/{composite-BY9hMxN7.d.ts → composite-BPDU_XV1.d.ts} +2 -2
  77. package/dist/{composite-CH0S8DFn.d.cts → composite-CmvdhTJe.d.cts} +2 -2
  78. package/dist/core/index.cjs +1 -1
  79. package/dist/core/index.d.cts +4 -4
  80. package/dist/core/index.d.ts +4 -4
  81. package/dist/core/index.js +1 -1
  82. package/dist/extra/browser.cjs +1 -1
  83. package/dist/extra/browser.d.cts +1 -1
  84. package/dist/extra/browser.d.ts +1 -1
  85. package/dist/extra/browser.js +1 -1
  86. package/dist/extra/index.cjs +16 -16
  87. package/dist/extra/index.d.cts +9 -9
  88. package/dist/extra/index.d.ts +9 -9
  89. package/dist/extra/index.js +1 -1
  90. package/dist/extra/node.cjs +1 -1
  91. package/dist/extra/node.d.cts +1 -1
  92. package/dist/extra/node.d.ts +1 -1
  93. package/dist/extra/node.js +1 -1
  94. package/dist/extra/operators.cjs +1 -1
  95. package/dist/extra/operators.d.cts +1 -1
  96. package/dist/extra/operators.d.ts +1 -1
  97. package/dist/extra/operators.js +1 -1
  98. package/dist/extra/reactive.cjs +1 -1
  99. package/dist/extra/reactive.d.cts +3 -3
  100. package/dist/extra/reactive.d.ts +3 -3
  101. package/dist/extra/reactive.js +1 -1
  102. package/dist/extra/sources.cjs +1 -1
  103. package/dist/extra/sources.d.cts +1 -1
  104. package/dist/extra/sources.d.ts +1 -1
  105. package/dist/extra/sources.js +1 -1
  106. package/dist/extra/storage-browser.cjs +1 -1
  107. package/dist/extra/storage-browser.d.cts +1 -1
  108. package/dist/extra/storage-browser.d.ts +1 -1
  109. package/dist/extra/storage-browser.js +1 -1
  110. package/dist/{fallback-Cb3GH1O7.d.cts → fallback-9YznPvPP.d.cts} +1 -1
  111. package/dist/{fallback-DRjJ_ZM8.d.ts → fallback-mYSd8vQo.d.ts} +1 -1
  112. package/dist/graph/index.cjs +4 -4
  113. package/dist/graph/index.d.cts +5 -5
  114. package/dist/graph/index.d.ts +5 -5
  115. package/dist/graph/index.js +1 -1
  116. package/dist/{graph-BOhEGJ6E.d.ts → graph-BROUZPG9.d.ts} +2 -2
  117. package/dist/{graph-CdJeX7O7.d.cts → graph-DaoydJ_u.d.cts} +2 -2
  118. package/dist/{index-C22aTC1X.d.cts → index-3L3RC3VJ.d.ts} +578 -108
  119. package/dist/{index-BmZb8fNF.d.cts → index-B-KCkW4M.d.cts} +4 -4
  120. package/dist/{index-CDK5RsV5.d.cts → index-B1hFhK1K.d.cts} +1 -1
  121. package/dist/{index-C7RqYbOZ.d.ts → index-B5eS17Bz.d.ts} +7 -7
  122. package/dist/{index-DSawGt8n.d.cts → index-BDEhWLF4.d.cts} +3 -3
  123. package/dist/{index-CZUzi6Dy.d.ts → index-BFHpNSsV.d.ts} +4 -4
  124. package/dist/{index-DDo-eqQ4.d.cts → index-BO6t0HjV.d.cts} +1 -1
  125. package/dist/{index-CrC7urhX.d.ts → index-BRisOxlx.d.ts} +1 -1
  126. package/dist/{index-CHfBm51k.d.ts → index-BUtCR0k6.d.ts} +4 -4
  127. package/dist/{index-BydMDMf7.d.cts → index-BVTjuKeP.d.cts} +1 -1
  128. package/dist/{index-BX22kvjh.d.ts → index-BWiX5foT.d.ts} +1 -1
  129. package/dist/{index-Dxk-pUQI.d.ts → index-Bd2AjMQY.d.ts} +2 -2
  130. package/dist/{index-Dbmj0iYR.d.ts → index-Bi4ZP6Hc.d.ts} +2 -2
  131. package/dist/{index-j33Lfb1G.d.cts → index-BkfL5MXh.d.cts} +3 -3
  132. package/dist/{index-CnjUhRbs.d.cts → index-BpjQanLs.d.cts} +2 -2
  133. package/dist/{index-LGzAYqdR.d.ts → index-BsxqmV6u.d.ts} +2 -2
  134. package/dist/{index-CCdg0JLX.d.cts → index-C2Dey3L-.d.cts} +12 -3
  135. package/dist/{index-gXTVbSax.d.ts → index-C5uMGVJw.d.ts} +4 -4
  136. package/dist/{index-C-Gsh-0a.d.cts → index-C8_bnDBZ.d.cts} +3 -3
  137. package/dist/{index-C9qCLIN4.d.ts → index-CD7qmvSf.d.ts} +3 -3
  138. package/dist/{index-wIx1Jisk.d.ts → index-CI5fULSz.d.ts} +1 -1
  139. package/dist/{index-BUZPTPSQ.d.ts → index-CNxdDb2e.d.ts} +3 -3
  140. package/dist/{index-FBqTfL_S.d.cts → index-CQ1gt4rn.d.cts} +1 -1
  141. package/dist/{index-CNyiYQWF.d.ts → index-CQtnGFrZ.d.cts} +578 -108
  142. package/dist/{index-DhlAMlm9.d.ts → index-CbCNoogR.d.ts} +218 -66
  143. package/dist/{index-BDLy6CQ9.d.cts → index-Ccv_61jG.d.cts} +2 -2
  144. package/dist/{index-MV2yGIAq.d.ts → index-Ced0dphF.d.ts} +9 -9
  145. package/dist/{index-BzxU4yhV.d.cts → index-ChZvMC4M.d.cts} +4 -4
  146. package/dist/{index-zMQIQuDu.d.ts → index-Chi9IiHJ.d.ts} +3 -3
  147. package/dist/{index-DUkuH3jP.d.cts → index-ClJUZAOr.d.cts} +18 -3
  148. package/dist/{index-D7XxY1Ff.d.cts → index-ClKm7CFB.d.cts} +1 -1
  149. package/dist/{index-D3HcdZ4d.d.cts → index-Cn3taOmp.d.cts} +2 -2
  150. package/dist/{index-C4QTaDli.d.cts → index-CoR-tOZA.d.cts} +4 -4
  151. package/dist/{index-BpFWP7Bq.d.cts → index-Cp91Sxbo.d.cts} +5 -4
  152. package/dist/{index-DD1czHj3.d.ts → index-Cq7Uqgu4.d.ts} +2 -2
  153. package/dist/{index-EGjF6iSY.d.cts → index-D23g00HE.d.cts} +4 -4
  154. package/dist/{index-Bnmttu35.d.ts → index-D80nGRb9.d.ts} +3 -3
  155. package/dist/{index-DY2QbdoP.d.cts → index-DR3XqZlV.d.cts} +1 -1
  156. package/dist/{index-BANwzwBV.d.ts → index-Db21wuaD.d.ts} +5 -4
  157. package/dist/{index-CIXaiYDE.d.cts → index-DhWrMTI6.d.cts} +1 -1
  158. package/dist/{index-Dp_pS7Bw.d.ts → index-DheNs40A.d.ts} +2 -2
  159. package/dist/{index-CVevMZ0n.d.ts → index-Dia4yc2y.d.ts} +3 -3
  160. package/dist/{index-_BXz9K7b.d.cts → index-Ds3Rz9m9.d.cts} +3 -3
  161. package/dist/{index-Ckl03Q0s.d.ts → index-Dtpr2FIB.d.ts} +18 -3
  162. package/dist/{index-ByPnK85n.d.ts → index-DupIl9wI.d.ts} +1 -1
  163. package/dist/{index-CEoU-r-g.d.ts → index-DuvQAU02.d.ts} +2 -2
  164. package/dist/{index-D0C_USMR.d.ts → index-DxEcY7Om.d.ts} +1 -1
  165. package/dist/{index-eYHRkoK-.d.ts → index-HvJ90_tX.d.ts} +12 -3
  166. package/dist/{index-BuN2wGJs.d.cts → index-IxinNgAH.d.cts} +218 -66
  167. package/dist/{index-LzCJ0kMT.d.cts → index-Jgl7ev9I.d.cts} +9 -9
  168. package/dist/{index-DlGaEBW5.d.cts → index-RJX4snyi.d.cts} +2 -2
  169. package/dist/{index-DNhTQReY.d.cts → index-ZIQaKIdY.d.cts} +7 -7
  170. package/dist/{index-lpGUhTBn.d.ts → index-b4a6Sg0R.d.ts} +4 -4
  171. package/dist/{index-BiGeETJs.d.cts → index-iKsmdnq6.d.cts} +2 -2
  172. package/dist/{index-CmSjld-4.d.ts → index-nP13Qe6T.d.ts} +1 -1
  173. package/dist/{index-BJDXj9Wf.d.cts → index-p0bkNfby.d.cts} +3 -3
  174. package/dist/{index-aBqZUx3B.d.cts → index-wcfc7W-f.d.cts} +2 -2
  175. package/dist/{index-BwdPDWI4.d.cts → index-yJY9thRY.d.cts} +2 -2
  176. package/dist/{index-BbcSZCAG.d.ts → index-ygRFoyrN.d.ts} +2 -2
  177. package/dist/{index-Ip3q9T9x.d.ts → index-zA1uVtk0.d.ts} +1 -1
  178. package/dist/index.cjs +57 -57
  179. package/dist/index.d.cts +44 -44
  180. package/dist/index.d.ts +44 -44
  181. package/dist/index.js +1 -1
  182. package/dist/{meta-COtmHLwT.d.cts → meta-BdjSt8ky.d.cts} +1 -1
  183. package/dist/{meta-BMwx3ExI.d.ts → meta-CtDjj7cU.d.ts} +1 -1
  184. package/dist/{node-BVV7G1bq.d.cts → node-8qx0kgYt.d.cts} +49 -1
  185. package/dist/{node-BVV7G1bq.d.ts → node-8qx0kgYt.d.ts} +49 -1
  186. package/dist/{observable-BrUAPeH_.d.cts → observable-B6Ba-TTI.d.cts} +1 -1
  187. package/dist/{observable-ITikPXz3.d.ts → observable-DOniYM2B.d.ts} +1 -1
  188. package/dist/patterns/ai/browser.cjs +5 -5
  189. package/dist/patterns/ai/browser.d.cts +4 -4
  190. package/dist/patterns/ai/browser.d.ts +4 -4
  191. package/dist/patterns/ai/browser.js +1 -1
  192. package/dist/patterns/ai/index.cjs +19 -19
  193. package/dist/patterns/ai/index.d.cts +16 -16
  194. package/dist/patterns/ai/index.d.ts +16 -16
  195. package/dist/patterns/ai/index.js +1 -1
  196. package/dist/patterns/ai/node.cjs +2 -2
  197. package/dist/patterns/ai/node.d.cts +4 -4
  198. package/dist/patterns/ai/node.d.ts +4 -4
  199. package/dist/patterns/ai/node.js +1 -1
  200. package/dist/patterns/audit/index.cjs +7 -7
  201. package/dist/patterns/audit/index.d.cts +5 -5
  202. package/dist/patterns/audit/index.d.ts +5 -5
  203. package/dist/patterns/audit/index.js +1 -1
  204. package/dist/patterns/cqrs/index.cjs +3 -3
  205. package/dist/patterns/cqrs/index.d.cts +4 -4
  206. package/dist/patterns/cqrs/index.d.ts +4 -4
  207. package/dist/patterns/cqrs/index.js +1 -1
  208. package/dist/patterns/demo-shell/index.cjs +6 -6
  209. package/dist/patterns/demo-shell/index.d.cts +5 -5
  210. package/dist/patterns/demo-shell/index.d.ts +5 -5
  211. package/dist/patterns/demo-shell/index.js +1 -1
  212. package/dist/patterns/domain-templates/index.cjs +6 -6
  213. package/dist/patterns/domain-templates/index.d.cts +4 -4
  214. package/dist/patterns/domain-templates/index.d.ts +4 -4
  215. package/dist/patterns/domain-templates/index.js +1 -1
  216. package/dist/patterns/graphspec/index.cjs +8 -8
  217. package/dist/patterns/graphspec/index.d.cts +5 -5
  218. package/dist/patterns/graphspec/index.d.ts +5 -5
  219. package/dist/patterns/graphspec/index.js +1 -1
  220. package/dist/patterns/guarded-execution/index.cjs +7 -7
  221. package/dist/patterns/guarded-execution/index.d.cts +6 -6
  222. package/dist/patterns/guarded-execution/index.d.ts +6 -6
  223. package/dist/patterns/guarded-execution/index.js +1 -1
  224. package/dist/patterns/harness/index.cjs +12 -12
  225. package/dist/patterns/harness/index.d.cts +11 -10
  226. package/dist/patterns/harness/index.d.ts +11 -10
  227. package/dist/patterns/harness/index.js +1 -1
  228. package/dist/patterns/job-queue/index.cjs +7 -7
  229. package/dist/patterns/job-queue/index.d.cts +4 -4
  230. package/dist/patterns/job-queue/index.d.ts +4 -4
  231. package/dist/patterns/job-queue/index.js +1 -1
  232. package/dist/patterns/lens/index.cjs +5 -5
  233. package/dist/patterns/lens/index.d.cts +6 -6
  234. package/dist/patterns/lens/index.d.ts +6 -6
  235. package/dist/patterns/lens/index.js +1 -1
  236. package/dist/patterns/memory/index.cjs +4 -4
  237. package/dist/patterns/memory/index.d.cts +4 -4
  238. package/dist/patterns/memory/index.d.ts +4 -4
  239. package/dist/patterns/memory/index.js +1 -1
  240. package/dist/patterns/messaging/index.cjs +4 -4
  241. package/dist/patterns/messaging/index.d.cts +4 -4
  242. package/dist/patterns/messaging/index.d.ts +4 -4
  243. package/dist/patterns/messaging/index.js +1 -1
  244. package/dist/patterns/orchestration/index.cjs +7 -7
  245. package/dist/patterns/orchestration/index.d.cts +5 -5
  246. package/dist/patterns/orchestration/index.d.ts +5 -5
  247. package/dist/patterns/orchestration/index.js +1 -1
  248. package/dist/patterns/reactive-layout/index.cjs +1 -1
  249. package/dist/patterns/reactive-layout/index.d.cts +5 -5
  250. package/dist/patterns/reactive-layout/index.d.ts +5 -5
  251. package/dist/patterns/reactive-layout/index.js +1 -1
  252. package/dist/patterns/reduction/index.cjs +1 -1
  253. package/dist/patterns/reduction/index.d.cts +4 -4
  254. package/dist/patterns/reduction/index.d.ts +4 -4
  255. package/dist/patterns/reduction/index.js +1 -1
  256. package/dist/patterns/refine-loop/index.cjs +7 -7
  257. package/dist/patterns/refine-loop/index.d.cts +5 -5
  258. package/dist/patterns/refine-loop/index.d.ts +5 -5
  259. package/dist/patterns/refine-loop/index.js +1 -1
  260. package/dist/patterns/resilient-pipeline/index.cjs +1 -1
  261. package/dist/patterns/resilient-pipeline/index.d.cts +6 -6
  262. package/dist/patterns/resilient-pipeline/index.d.ts +6 -6
  263. package/dist/patterns/resilient-pipeline/index.js +1 -1
  264. package/dist/patterns/surface/index.cjs +7 -7
  265. package/dist/patterns/surface/index.d.cts +6 -6
  266. package/dist/patterns/surface/index.d.ts +6 -6
  267. package/dist/patterns/surface/index.js +1 -1
  268. package/dist/{reactive-layout-Bq0rA2Wb.d.ts → reactive-layout-DBJ3Vz-m.d.ts} +2 -2
  269. package/dist/{reactive-layout-Dhhe54Oj.d.cts → reactive-layout-Dk9AOQb_.d.cts} +2 -2
  270. package/dist/{reactive-log-5jFeNRmd.d.cts → reactive-log-CWC7jO4J.d.cts} +1 -1
  271. package/dist/{reactive-log-BOJDCI5x.d.ts → reactive-log-CqaBg8nf.d.ts} +1 -1
  272. package/dist/{reactive-map-IJIfZxoh.d.cts → reactive-map-Cm89Hk0c.d.cts} +1 -1
  273. package/dist/{reactive-map-CtRaCddO.d.ts → reactive-map-LjwjcFaW.d.ts} +1 -1
  274. package/dist/{resilience-IVNDYORD.js → resilience-7UZHSSGC.js} +1 -1
  275. package/dist/{resilience-Q6Bt_7y0.d.cts → resilience-N_VtLf7W.d.cts} +1 -1
  276. package/dist/{resilience-CludlzcP.d.ts → resilience-RjDIHZNZ.d.ts} +1 -1
  277. package/dist/{sugar-BHbAACDG.d.ts → sugar-CQkn_rxB.d.ts} +1 -1
  278. package/dist/{sugar-CqR6DJ7v.d.cts → sugar-DVEYhR7a.d.cts} +1 -1
  279. package/dist/{topology-tree-CpSjvIXp.d.cts → topology-tree-BB6oJxMz.d.cts} +1 -1
  280. package/dist/{topology-tree-DAbCV2Yw.d.ts → topology-tree-CAFOG5S5.d.ts} +1 -1
  281. package/dist/{types-CdfO2QTt.d.ts → types-B2LfBvNc.d.ts} +16 -2
  282. package/dist/{types-BgMqbc7N.d.cts → types-Cp_4coR_.d.cts} +16 -2
  283. package/package.json +1 -1
  284. package/dist/chunk-2JNT5NDF.js +0 -61
  285. package/dist/chunk-2RH4QNDQ.js +0 -1
  286. package/dist/chunk-7AJKUA36.js +0 -1
  287. package/dist/chunk-LG73TUF4.js +0 -43
  288. package/dist/chunk-PNTBXOQ6.js +0 -5
  289. package/dist/chunk-ZWETYYQG.js +0 -1
@@ -1 +1 @@
1
- "use strict";var le=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Be=(r,e)=>{for(var n in e)le(r,n,{get:e[n],enumerable:!0})},We=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Pe(e))!Ue.call(r,s)&&s!==n&&le(r,s,{get:()=>e[s],enumerable:!(t=He(e,s))||t.enumerable});return r};var $e=r=>We(le({},"__esModule",{value:!0}),r);var hn={};Be(hn,{NativeIndexBackend:()=>re,NativeListBackend:()=>se,NativeLogBackend:()=>ie,NativeMapBackend:()=>oe,reactiveIndex:()=>dn,reactiveList:()=>un,reactiveLog:()=>cn,reactiveMap:()=>fn});module.exports=$e(hn);var K=0,U=!1,S=[],V=[],z=[],B=[];function xe(){return K>0||U}function Te(){return K>0}function ke(r){K>0?B.push(r):r()}function N(r){K+=1;let e=!1;try{r()}catch(n){throw e=!0,n}finally{if(K-=1,K===0)if(e){if(!U){let n=B.splice(0);for(let t of n)try{t()}catch{}S.length=0,V.length=0,z.length=0}}else je()}}function je(){let r=!U;r&&(U=!0);let e=[],n=0;try{for(;S.length>0||V.length>0||z.length>0||r&&B.length>0;){if(r&&B.length>0){let i=B.splice(0);for(let o of i)try{o()}catch(a){e.push(a)}continue}if(n+=1,n>1e3)throw S.length=0,V.length=0,z.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let s=(S.length>0?S:V.length>0?V:z).splice(0);for(let i of s)try{i()}catch(o){e.push(o)}}}finally{r&&(U=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function Z(r,e,n){if(e.length===0)return;if(e.length===1){let d=n(e[0][0]);if(d<3||!xe()){r(e);return}(d>=5?z:d===4?V:S).push(()=>r(e));return}let t=e.length,s=t,i=t,o=t,a=0;for(;a<t&&n(e[a][0])<3;)a++;for(s=a;a<t&&n(e[a][0])===3;)a++;for(i=a;a<t&&n(e[a][0])===4;)a++;o=a;let u=xe();if(s>0){let d=e.slice(0,s);r(d)}if(i>s){let d=e.slice(s,i);u?S.push(()=>r(d)):r(d)}if(o>i){let d=e.slice(i,o);u?V.push(()=>r(d)):r(d)}if(t>o){let d=e.slice(o,t);u?z.push(()=>r(d)):r(d)}}var W=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),x=Symbol.for("graphrefly/DIRTY"),O=Symbol.for("graphrefly/RESOLVED"),I=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),$=Symbol.for("graphrefly/RESUME"),A=Symbol.for("graphrefly/TEARDOWN"),C=Symbol.for("graphrefly/COMPLETE"),T=Symbol.for("graphrefly/ERROR"),F=Object.freeze([x]),ce=Object.freeze([O]),qe=Object.freeze([I]),fe=Object.freeze([W]),Ye=Object.freeze([C]),Je=Object.freeze([A]),he=Object.freeze([F]),Me=Object.freeze([ce]),Ne=Object.freeze([qe]),Ae=Object.freeze([Ye]),pe=Object.freeze([Je]);var Xe={name:"json",version:1,contentType:"application/json",encode(r){let e=JSON.stringify(r);return new TextEncoder().encode(e)},decode(r,e){let n=new TextDecoder().decode(r);return JSON.parse(n)}};function Ee(r){r.registerCodec(Xe)}var Ze={type:"system",id:""};function Q(r){if(r==null)return Ze;let{type:e,id:n,...t}=r;return{type:e??"system",id:n??"",...t}}function j(){return Math.trunc(performance.now()*1e6)}function Re(){return Date.now()*1e6}var ee=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let t=this._messageTypes.get(n);return t!=null?t.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}};function Se(r){r.registerMessageType(W,{tier:0,wireCrossing:!1}),r.registerMessageType(x,{tier:1,wireCrossing:!1}),r.registerMessageType(I,{tier:1,wireCrossing:!1,metaPassthrough:!1}),r.registerMessageType(D,{tier:2,wireCrossing:!1}),r.registerMessageType($,{tier:2,wireCrossing:!1}),r.registerMessageType(b,{tier:3,wireCrossing:!0}),r.registerMessageType(O,{tier:3,wireCrossing:!0}),r.registerMessageType(C,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(T,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(A,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var L=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}};function _e(r){if(r===void 0)return null;if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError(`Cannot hash non-finite number: ${r}`);if(Number.isInteger(r)&&!Number.isSafeInteger(r))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${r}. Cross-language cid parity is not guaranteed for unsafe integers.`);return r}if(typeof r=="string"||typeof r=="boolean"||r===null)return r;if(Array.isArray(r))return r.map(_e);if(typeof r=="object"&&r!==null){let e={};for(let n of Object.keys(r).sort())e[n]=_e(r[n]);return e}return null}var Qe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),en=new TextEncoder;function nn(r){let e=en.encode(r),n=e.length,t=n*8,s=n+9+63&-64,i=new Uint8Array(s);i.set(e),i[n]=128;let o=new DataView(i.buffer);o.setUint32(s-4,t>>>0,!1),o.setUint32(s-8,Math.floor(t/4294967296)>>>0,!1);let a=1779033703,u=3144134277,d=1013904242,f=2773480762,y=1359893119,p=2600822924,c=528734635,l=1541459225,h=new Uint32Array(64),_=(m,v)=>m>>>v|m<<32-v;for(let m=0;m<s;m+=64){for(let w=0;w<16;w++)h[w]=o.getUint32(m+w*4,!1);for(let w=16;w<64;w++){let H=h[w-15],P=h[w-2],X=_(H,7)^_(H,18)^H>>>3,ue=_(P,17)^_(P,19)^P>>>10;h[w]=h[w-16]+X+h[w-7]+ue>>>0}let v=a,R=u,k=d,ae=f,M=y,Y=p,J=c,de=l;for(let w=0;w<64;w++){let H=_(M,6)^_(M,11)^_(M,25),P=M&Y^~M&J,X=de+H+P+Qe[w]+h[w]>>>0,ue=_(v,2)^_(v,13)^_(v,22),Le=v&R^v&k^R&k,Ge=ue+Le>>>0;de=J,J=Y,Y=M,M=ae+X>>>0,ae=k,k=R,R=v,v=X+Ge>>>0}a=a+v>>>0,u=u+R>>>0,d=d+k>>>0,f=f+ae>>>0,y=y+M>>>0,p=p+Y>>>0,c=c+J>>>0,l=l+de>>>0}let g=m=>m.toString(16).padStart(8,"0");return g(a)+g(u)+g(d)+g(f)+g(y)+g(p)+g(c)+g(l)}function ge(r){let e=_e(r??null),n=JSON.stringify(e);return nn(n).slice(0,16)}function tn(){let r=globalThis.crypto;if(r?.randomUUID)return r.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function ye(r,e,n){let t=n?.id??tn();if(r===0)return{id:t,version:0};let i=(n?.hash??ge)(e);return{id:t,version:0,cid:i,prev:null}}function Ve(r,e,n){r.version+=1,"cid"in r&&(r.prev=r.cid,r.cid=n(e))}var Oe=()=>{},Ie=100;function De(r){return{node:r,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function me(r){r.prevData=void 0,r.dirty=!1,r.involvedThisWave=!1,r.dataBatch.length=0,r.terminal=void 0}function ne(r){return r.length===0?r:typeof r[0]=="symbol"?[r]:r}var rn=(r,e,n,t)=>{n.direction==="down-in"&&r._onDepMessage(n.depIndex,e)},sn=(r,e,n,t)=>{let s=r;if(s._status==="completed"||s._status==="errored")return;let i=s._cached,o=i===void 0?[fe]:[fe,[b,i]];s._status==="dirty"&&o.push(F),Z(e,o,s._config.tierOf)},ve=new ee({onMessage:rn,onSubscribe:sn});Se(ve);Ee(ve);var te=class r{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,t){this._config=t.config??ve,this._config.onMessage,this._optsName=t.name,this._describeKind=t.describeKind,this._equals=t.equals??Object.is,this._resubscribable=t.resubscribable??!1,this._resetOnTeardown=t.resetOnTeardown??!1,this._autoComplete=t.completeWhenDepsComplete??!0,this._autoError=t.errorWhenDepsError??!0,this._pausable=t.pausable??!0,this._guard=t.guard,this._fn=n,this._partial=t.partial??!1,this._cached=t.initial!==void 0?t.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=t.versioningHash??this._config.defaultHashFn??ge;let s=t.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?ye(s,this._cached===void 0?void 0:this._cached,{id:t.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(De);let i={};for(let[a,u]of Object.entries(t.meta??{})){let d={initial:u,name:`${t.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};t.guard!=null&&(d.guard=t.guard),i[a]=new r([],void 0,d)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let o=this;this._actions={emit(a){o._emit([[b,a]])},down(a){o._emit(ne(a))},up(a){o._emitUp(ne(a))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let t=this._versioningLevel;if(t!=null&&e<=t)return;let s=n?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let i=this._cached===void 0?void 0:this._cached,o=this._versioning,a=o?.id??n?.id,u=o?.version??0,d=ye(e,i,{id:a,hash:s});d.version=u,this._versioning=d,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=Q(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let t of this._extraGuards)if(!t(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,t=e?.actor!=null;if(!n&&!t)return;let s=Q(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,i))throw new L({actor:s,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let o of this._extraGuards)if(!o(s,i))throw new L({actor:s,action:i,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:Re()}}down(e,n){let t=ne(e);t.length!==0&&(this._checkGuard(n),this._emit(t))}emit(e,n){this._checkGuard(n),this._emit([[b,e]])}up(e,n){if(this._deps.length===0)return;let t=ne(e);if(t.length===0)return;this._checkGuard(n);let s=n??{internal:!0};this._validateUpTiers(t);for(let i of this._deps)i.node.up?.(t,s)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let t of e){let s=n(t[0]);if(s===3||s===4)throw new Error(`Node "${this.name}": tier-${s} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let u=Q(n);if(!this._guard(u,"observe"))throw new L({actor:u,action:"observe",nodeName:this.name})}let s=this._isTerminal&&this._resubscribable;if(s){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)me(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:s},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let o=this._isTerminal;if(this._sinkCount===1&&!o)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let t=0;t<e;t++){let s=t,i=this._deps[t];i.unsub=Oe,i.unsub=i.node.subscribe(o=>{if(i.unsub===null)return;let a=this._config.tierOf,u=!1;for(let d of o)a(d[0])>=3&&(u=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:s},this._actions);u&&this._maybeRunFnOnSettlement()}),n++}}catch(t){this._deps[n].unsub=null;for(let s=0;s<n;s++){let i=this._deps[s];if(i.unsub!=null){let o=i.unsub;i.unsub=null;try{o()}catch{}me(i)}}throw this._dirtyDepCount=0,t}}_addDep(e){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===e)return s;let n=this._deps.length,t=De(e);if(this._deps.push(t),this._sinks==null)return n;t.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(he),t.unsub=Oe;try{t.unsub=e.subscribe(s=>{if(t.unsub===null)return;let i=this._config.tierOf,o=!1;for(let a of s)i(a[0])>=3&&(o=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:n},this._actions);o&&this._maybeRunFnOnSettlement()})}catch(s){throw t.unsub=null,this._deps.pop(),this._dirtyDepCount--,s}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(t){this._emit([[T,this._wrapFnError("cleanup threw",t)]])}else if(n!=null&&typeof n=="object"){let t=n.deactivate;if(typeof t=="function")try{t()}catch(s){this._emit([[T,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let t of this._deps){if(t.unsub!=null){let s=t.unsub;t.unsub=null;try{s()}catch{}}me(t)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let t=this._deps[e],s=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:n};for(let o of this._inspectorHooks)o(i)}if(s!==W){if(s===x){this._depDirtied(t);return}if(s===I){if(this._depInvalidated(t),this._cached===void 0)return;this._emit(Ne);return}if(s===D||s===$){this._emit([n]);return}if(s===A){this._emit(pe);return}if(s===b)this._depSettledAsData(t,n[1]);else if(s===O)this._depSettledAsResolved(t);else if(s===C)this._depSettledAsTerminal(t,!0);else if(s===T)this._depSettledAsTerminal(t,n[1]);else{this._emit([n]);return}if(!this._fn){(s===b||s===O)&&this._emit([n]),(s===C||s===T)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(he))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Me),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[T,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(Ae)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(o){this._emit([[T,this._wrapFnError("cleanup threw",o)]]);return}}else if(e!=null&&typeof e=="object"){let o=e.beforeRun;if(typeof o=="function"){e.beforeRun=void 0;try{o()}catch(a){this._emit([[T,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let n=this._deps.map(o=>o.involvedThisWave?o.dataBatch.length>0?[...o.dataBatch]:[]:void 0),t=this._deps.map(o=>o.prevData);for(let o=0;o<this._deps.length;o++){let a=n[o];a!=null&&a.length>0&&(this._deps[o].prevData=a[a.length-1])}let s=this._deps.map(o=>o.terminal),i={prevData:t,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let o={kind:"run",batchData:n,prevData:t};for(let a of this._inspectorHooks)a(o)}this._isExecutingFn=!0;try{let o=this._fn(n,this._actions,i);if(typeof o=="function")this._cleanup=o;else if(o!=null&&typeof o=="object"){let a=o;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=o)}}catch(o){this._emit([[T,this._wrapFnError("fn threw",o)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ie?(this._rerunDepth=0,this._emit([[T,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ie} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let t=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${t}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[F,e[0]]:e;let t=!0,s=!1,i=!1,o=-1;for(let u of e){let d=n(u[0]);d<o&&(t=!1),d===3&&(s=!0),u[0]===x&&(i=!0),o=d}let a=e;if(!t){let u=e.map((d,f)=>({m:d,i:f,tier:n(d[0])}));u.sort((d,f)=>d.tier-f.tier||d.i-f.i),a=u.map(d=>d.m)}if(s&&!i&&this._status!=="dirty"){let u=0;for(;u<a.length&&n(a[u][0])===0;)u++;return u===0?[F,...a]:[...a.slice(0,u),F,...a.slice(u)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let u=e[a];if(u[0]===T&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(u=>u[0]===A||u[0]===I);if(a.length===0)return;n=a}n=this._frameBatch(n);let s=null;for(let a=0;a<n.length;a++){let u=n[a],d=u[0];if(d!==D&&d!==$){s?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${d===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let f=!0;if(this._pausable!==!1){let y=u[1];if(d===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(y),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(y))f=!1;else if(this._pauseLocks.delete(y),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let p=this._pauseBuffer;this._pauseBuffer=[],this._emit(p)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}f?s?.push(u):s==null&&(s=n.slice(0,a))}if(s!=null){if(s.length===0)return;n=s}if(this._hasMeta&&n.some(a=>a[0]===A))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(pe)}catch{}let{finalMessages:i,equalsError:o}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,u=[];for(let d of i)a(d[0])===3?this._pauseBuffer.push(d):u.push(d);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(i);o!=null&&this._emit([[T,o]])}_updateState(e){let n=this._config.tierOf,t,s,i=-1,o=0;for(let f of e)n(f[0])===3&&o++;let a=o<=1,u=-1;if(this._versioning!=null&&o>1){for(let f=e.length-1;f>=0;f--)if(e[f][0]===b){u=f;break}}for(let f=0;f<e.length;f++){let y=e[f],p=y[0];if(p===b){if(y.length>=2){let c=!1;if(a&&this._cached!==void 0)try{c=this._equals(this._cached,y[1])}catch(l){s=this._wrapFnError("equals threw",l),i=f;break}if(c){t==null&&(t=e.slice(0,f)),t.push(ce),this._status="resolved";continue}this._cached=y[1],this._versioning!=null&&(u<0||f===u)&&Ve(this._versioning,y[1],this._hashFn)}this._status="settled",t?.push(y)}else if(t?.push(y),p===x)this._status="dirty";else if(p===O)this._status="resolved";else if(p===C)this._status="completed";else if(p===T)this._status="errored";else if(p===I){this._cached=void 0,this._status="dirty";let c=this._cleanup;if(typeof c=="function"){this._cleanup=void 0;try{c()}catch{}}else if(c!=null&&typeof c=="object"){let l=c.invalidate;if(typeof l=="function")try{l()}catch{}}}else p===A&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=i>=0?t??e.slice(0,i):t??e;return s!=null?{finalMessages:d,equalsError:s}:{finalMessages:d}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let t of n)t(e)};_dispatchOrAccumulate(e){if(Te()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],ke(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}Z(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);Z(this._deliverToSinks,n,this._config.tierOf)}},Ce=r=>Array.isArray(r),be=r=>typeof r=="object"&&r!=null&&!Array.isArray(r);function we(r,e,n){let t=Ce(r)?r:[],s=typeof r=="function"?r:typeof e=="function"?e:void 0,i={};return Ce(r)?i=(be(e)?e:n)??{}:be(r)?i=r:i=(be(e)?e:n)??{},new te(t,s,i)}function E(r,e){return we([],{...e,initial:r})}function q(r,e,n){return we(r,(s,i,o)=>{let a=s.map((u,d)=>u!=null&&u.length>0?u.at(-1):o.prevData[d]);i.emit(e(a,o))},{describeKind:"derived",...n})}function Ke(r,e){if(r===e)return 0;let n=typeof r;if(n===typeof e&&(n==="number"||n==="string"||n==="boolean"||n==="bigint")){let s=r,i=e;return s<i?-1:s>i?1:0}return String(r).localeCompare(String(e))}function on(r,e){let n=Ke(r[0],e[0]);return n!==0?n:Ke(r[1],e[1])}function ze(r){return[r.secondary,r.primary]}function G(r,e){let n=ze(e),t=0,s=r.length;for(;t<s;){let i=t+s>>1;on(n,ze(r[i]))>0?t=i+1:s=i}return t}var re=class{_version=0;_buf=[];_byPrimary=new Map;get version(){return this._version}get size(){return this._buf.length}has(e){return this._byPrimary.has(e)}get(e){return this._byPrimary.get(e)?.value}upsert(e,n,t,s){let i=this._byPrimary.get(e),o={primary:e,secondary:n,value:t};if(i!==void 0&&s?.equals?.(i,o))return!1;if(i!==void 0){let u=G(this._buf,i);this._buf.splice(u,1)}let a=G(this._buf,o);return this._buf.splice(a,0,o),this._byPrimary.set(e,o),this._version+=1,i===void 0}upsertMany(e,n){let t=0;try{for(let s of e){let i=this._byPrimary.get(s.primary),o={primary:s.primary,secondary:s.secondary,value:s.value};if(i!==void 0&&n?.equals?.(i,o))continue;if(i!==void 0){let u=G(this._buf,i);this._buf.splice(u,1)}let a=G(this._buf,o);this._buf.splice(a,0,o),this._byPrimary.set(s.primary,o),t+=1}}finally{t>0&&(this._version+=1)}return t}delete(e){let n=this._byPrimary.get(e);if(n===void 0)return!1;let t=G(this._buf,n);return this._buf.splice(t,1),this._byPrimary.delete(e),this._version+=1,!0}deleteMany(e){let n=0;try{for(let t of e){let s=this._byPrimary.get(t);if(s===void 0)continue;let i=G(this._buf,s);this._buf.splice(i,1),this._byPrimary.delete(t),n+=1}}finally{n>0&&(this._version+=1)}return n}clear(){let e=this._buf.length;return e===0?0:(this._buf.length=0,this._byPrimary.clear(),this._version+=1,e)}toArray(){return[...this._buf]}toPrimaryMap(){let e=new Map;for(let n of this._buf)e.set(n.primary,n.value);return e}};function an(r){return r.subscribe(()=>{})}function dn(r={}){let{name:e,versioning:n,equals:t,backend:s}=r,i=s??new re;function o(c){return c?.equals!==void 0||t===void 0?c:{...c,equals:t}}let a=E([],{name:e,describeKind:"state",equals:(c,l)=>c===l,...n!=null?{versioning:n}:{}}),u=q([a],([c])=>{let l=c,h=new Map;for(let _ of l)h.set(_.primary,_.value);return h},{initial:i.toPrimaryMap(),describeKind:"derived"}),d=an(u),f=!1;function y(){let c=i.toArray();N(()=>{a.down([[x]]),a.down([[b,c]])})}function p(c){let l=i.version;try{return c()}finally{i.version!==l&&y()}}return{ordered:a,byPrimary:u,has(c){return i.has(c)},get(c){return i.get(c)},get size(){return i.size},upsert(c,l,h,_){return p(()=>i.upsert(c,l,h,o(_)))},upsertMany(c,l){let h=[...c];h.length!==0&&p(()=>i.upsertMany(h,o(l)))},delete(c){p(()=>i.delete(c))},deleteMany(c){let l=[...c];l.length!==0&&p(()=>i.deleteMany(l))},clear(){p(()=>i.clear())},dispose(){f||(f=!0,d())}}}var se=class{_version=0;_buf;constructor(e){this._buf=e?[...e]:[]}get version(){return this._version}get size(){return this._buf.length}at(e){if(!Number.isInteger(e))return;let n=e>=0?e:this._buf.length+e;if(!(n<0||n>=this._buf.length))return this._buf[n]}append(e){this._buf.push(e),this._version+=1}appendMany(e){if(e.length===0)return;let n=this._buf.length;this._buf.length=n+e.length;for(let t=0;t<e.length;t++)this._buf[n+t]=e[t];this._version+=1}insert(e,n){if(!Number.isInteger(e)||e<0||e>this._buf.length)throw new RangeError(`insert: index ${e} out of range [0, ${this._buf.length}]`);this._buf.splice(e,0,n),this._version+=1}insertMany(e,n){if(!Number.isInteger(e)||e<0||e>this._buf.length)throw new RangeError(`insertMany: index ${e} out of range [0, ${this._buf.length}]`);n.length!==0&&(this._buf.splice(e,0,...n),this._version+=1)}pop(e){if(this._buf.length===0)throw new RangeError("pop from empty list");if(!Number.isInteger(e))throw new RangeError(`pop: index ${e} must be an integer`);let n=e>=0?e:this._buf.length+e;if(n<0||n>=this._buf.length)throw new RangeError(`pop: index ${e} out of range`);let[t]=this._buf.splice(n,1);return this._version+=1,t}clear(){let e=this._buf.length;return e===0?0:(this._buf.length=0,this._version+=1,e)}toArray(){return[...this._buf]}};function un(r,e={}){let{name:n,versioning:t,backend:s}=e,i=s??new se(r),o=E(i.toArray(),{name:n,describeKind:"state",equals:(d,f)=>d===f,...t!=null?{versioning:t}:{}});function a(){let d=i.toArray();N(()=>{o.down([[x]]),o.down([[b,d]])})}function u(d){let f=i.version;try{return d()}finally{i.version!==f&&a()}}return{items:o,get size(){return i.size},at(d){return i.at(d)},append(d){u(()=>i.append(d))},appendMany(d){u(()=>i.appendMany(d))},insert(d,f){u(()=>i.insert(d,f))},insertMany(d,f){u(()=>i.insertMany(d,f))},pop(d=-1){return u(()=>i.pop(d))},clear(){u(()=>i.clear())},dispose(){}}}var ie=class{_version=0;_maxSize;_buf;_head=0;_size=0;constructor(e,n){if(n!==void 0&&n<1)throw new RangeError("maxSize must be >= 1");if(this._maxSize=n,n!==void 0){if(this._buf=new Array(n),e&&e.length>0){let t=Math.min(e.length,n),s=e.length-t;for(let i=0;i<t;i++)this._buf[i]=e[s+i];this._size=t}}else this._buf=e?[...e]:[],this._size=this._buf.length}get version(){return this._version}get size(){return this._size}at(e){if(!Number.isInteger(e))return;let n=e>=0?e:this._size+e;if(!(n<0||n>=this._size))return this._maxSize!==void 0?this._buf[(this._head+n)%this._maxSize]:this._buf[n]}append(e){this._rawAppend(e),this._version+=1}appendMany(e){if(e.length===0)return;let n=this._maxSize!==void 0&&e.length>this._maxSize?e.length-this._maxSize:0;for(let t=n;t<e.length;t++)this._rawAppend(e[t]);this._version+=1}clear(){if(this._size===0)return 0;let e=this._size;if(this._maxSize===void 0)this._buf.length=0;else for(let n=0;n<e;n++)this._buf[(this._head+n)%this._maxSize]=void 0;return this._head=0,this._size=0,this._version+=1,e}trimHead(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`trimHead: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return 0;let n=Math.min(e,this._size);if(this._maxSize===void 0)this._buf.splice(0,n);else{for(let t=0;t<n;t++)this._buf[(this._head+t)%this._maxSize]=void 0;this._head=(this._head+n)%this._maxSize}return this._size-=n,this._version+=1,n}slice(e,n){if(!Number.isInteger(e)||e<0)throw new RangeError(`slice: start must be a non-negative integer (got ${e})`);if(n!==void 0&&(!Number.isInteger(n)||n<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${n})`);let t=n===void 0?this._size:Math.min(Math.max(n,0),this._size),s=Math.min(e,this._size);if(s>=t)return[];let i=t-s;if(this._maxSize===void 0)return this._buf.slice(s,t);let o=new Array(i);for(let a=0;a<i;a++)o[a]=this._buf[(this._head+s+a)%this._maxSize];return o}tail(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`tail: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return[];let n=Math.min(e,this._size);return this.slice(this._size-n,this._size)}toArray(){if(this._maxSize===void 0)return[...this._buf];let e=new Array(this._size);for(let n=0;n<this._size;n++)e[n]=this._buf[(this._head+n)%this._maxSize];return e}_rawAppend(e){if(this._maxSize===void 0){this._buf.push(e),this._size=this._buf.length;return}this._size<this._maxSize?(this._buf[(this._head+this._size)%this._maxSize]=e,this._size+=1):(this._buf[this._head]=e,this._head=(this._head+1)%this._maxSize)}};function Fe(r){return r.subscribe(()=>{})}var ln=64;function cn(r,e={}){let{name:n,maxSize:t,versioning:s,backend:i}=e,o=i??new ie(r,t),a=E(o.toArray(),{name:n,describeKind:"state",equals:(l,h)=>l===h,...s!=null?{versioning:s}:{}});function u(){let l=o.toArray();N(()=>{a.down([[x]]),a.down([[b,l]])})}let d=new Map,f=new Map;function y(l,h){return`${l}:${h===void 0?"END":h}`}function p(l){if(l.size<ln)return;let h=l.keys().next();if(h.done)return;let _=l.get(h.value);_!==void 0&&_.dispose(),l.delete(h.value)}function c(l){let h=o.version;try{return l()}finally{o.version!==h&&u()}}return{entries:a,get size(){return o.size},at(l){return o.at(l)},append(l){c(()=>o.append(l))},appendMany(l){l.length!==0&&c(()=>o.appendMany(l))},clear(){c(()=>o.clear())},trimHead(l){c(()=>o.trimHead(l))},tail(l){if(!Number.isInteger(l)||l<0)throw new RangeError(`tail: n must be a non-negative integer (got ${l})`);let h=d.get(l);if(h!==void 0)return d.delete(l),d.set(l,h),h.node;p(d);let _=q([a],([m])=>{let v=m;return l===0||v.length===0?[]:v.slice(Math.max(0,v.length-l))},{initial:o.tail(l),describeKind:"derived"}),g=Fe(_);return d.set(l,{node:_,dispose:g}),_},slice(l,h){if(!Number.isInteger(l)||l<0)throw new RangeError(`slice: start must be a non-negative integer (got ${l})`);if(h!==void 0&&(!Number.isInteger(h)||h<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${h})`);let _=y(l,h),g=f.get(_);if(g!==void 0)return f.delete(_),f.set(_,g),g.node;p(f);let m=q([a],([R])=>{let k=R;return h===void 0?k.slice(l):k.slice(l,h)},{initial:o.slice(l,h),describeKind:"derived"}),v=Fe(m);return f.set(_,{node:m,dispose:v}),m},disposeTail(l){let h=d.get(l);return h===void 0?!1:(h.dispose(),d.delete(l),!0)},disposeSlice(l,h){let _=y(l,h),g=f.get(_);return g===void 0?!1:(g.dispose(),f.delete(_),!0)},disposeAllViews(){for(let l of d.values())l.dispose();d.clear();for(let l of f.values())l.dispose();f.clear()},dispose(){for(let l of d.values())l.dispose();d.clear();for(let l of f.values())l.dispose();f.clear()}}}var oe=class{_version=0;_store=new Map;_maxSize;_defaultTtl;constructor(e={}){let{maxSize:n,defaultTtl:t}=e;if(n!==void 0&&n<1)throw new RangeError("maxSize must be >= 1");if(t!==void 0&&t<=0)throw new RangeError("defaultTtl must be positive");this._maxSize=n,this._defaultTtl=t}get version(){return this._version}get size(){return this._store.size}has(e){let n=this._store.get(e);return n===void 0?!1:this._isExpired(n)?(this._store.delete(e),this._version+=1,!1):(this._touchLru(e,n),!0)}get(e){let n=this._store.get(e);if(n!==void 0){if(this._isExpired(n)){this._store.delete(e),this._version+=1;return}return this._touchLru(e,n),n.value}}set(e,n,t){let s=this._resolveExpiresAt(t);this._store.has(e)&&this._store.delete(e),this._store.set(e,{value:n,expiresAt:s}),this._evictLruWhileOver(),this._version+=1}setMany(e,n){let t=this._resolveExpiresAt(n),s=0;try{for(let[i,o]of e)this._store.has(i)&&this._store.delete(i),this._store.set(i,{value:o,expiresAt:t}),s+=1}finally{s>0&&(this._evictLruWhileOver(),this._version+=1)}}delete(e){let n=this._store.delete(e);return n&&(this._version+=1),n}deleteMany(e){let n=0;try{for(let t of e)this._store.delete(t)&&(n+=1)}finally{n>0&&(this._version+=1)}return n}clear(){let e=this._store.size;return e===0?0:(this._store.clear(),this._version+=1,e)}pruneExpired(){let e=j(),n=0;for(let[t,s]of this._store)this._isExpired(s,e)&&(this._store.delete(t),n+=1);return n>0&&(this._version+=1),n}toMap(){let e=j(),n=new Map;for(let[t,s]of this._store)this._isExpired(s,e)||n.set(t,s.value);return n}_resolveExpiresAt(e){let n=e??this._defaultTtl;if(n!==void 0){if(!Number.isFinite(n)||n<=0)throw new RangeError(`MapBackend: ttl must be a positive finite number (got ${n})`);return j()+n*1e9}}_isExpired(e,n){return e.expiresAt===void 0?!1:(n??j())>=e.expiresAt}_touchLru(e,n){this._store.delete(e),this._store.set(e,n)}_evictLruWhileOver(){if(this._maxSize!==void 0)for(;this._store.size>this._maxSize;){let e=this._store.keys().next().value;if(e===void 0)break;this._store.delete(e)}}};function fn(r={}){let{name:e,maxSize:n,defaultTtl:t,versioning:s,backend:i,retention:o}=r;if(o&&n!==void 0)throw new RangeError("reactiveMap: `maxSize` (LRU) and `retention` (score-based) are mutually exclusive. Pick one eviction policy.");if(o&&o.archiveThreshold===void 0&&o.maxSize===void 0)throw new RangeError("reactiveMap: `retention` requires at least one of `archiveThreshold` or `maxSize` to trigger archival.");let a=i??new oe({maxSize:n,defaultTtl:t}),u=E(a.toMap(),{name:e,describeKind:"state",equals:(p,c)=>p===c,...s!=null?{versioning:s}:{}});function d(){let p=a.toMap();N(()=>{u.down([[x]]),u.down([[b,p]])})}function f(){if(!o)return;let p=a.toMap(),c=o.archiveThreshold,l=o.maxSize,h=[];for(let[g,m]of p)h.push({key:g,value:m,score:o.score(g,m)});h.sort((g,m)=>g.score-m.score);let _=new Set;if(c!==void 0)for(let g of h)if(g.score<c)_.add(g.key);else break;if(l!==void 0&&h.length-_.size>l)for(let g of h){if(h.length-_.size<=l)break;_.has(g.key)||_.add(g.key)}if(_.size!==0)for(let g of h)_.has(g.key)&&(o.onArchive?.(g.key,g.value,g.score),a.delete(g.key))}function y(p,c="mutation"){let l=a.version;try{return p()}finally{a.version!==l&&(c==="mutation"&&f(),d())}}return{entries:u,has(p){return y(()=>a.has(p),"read")},get(p){return y(()=>a.get(p),"read")},set(p,c,l){y(()=>a.set(p,c,l?.ttl))},setMany(p,c){y(()=>a.setMany(p,c?.ttl))},delete(p){y(()=>a.delete(p))},deleteMany(p){y(()=>a.deleteMany(p))},clear(){y(()=>a.clear())},pruneExpired(){y(()=>a.pruneExpired())},get size(){return a.size},dispose(){}}}0&&(module.exports={NativeIndexBackend,NativeListBackend,NativeLogBackend,NativeMapBackend,reactiveIndex,reactiveList,reactiveLog,reactiveMap});
1
+ "use strict";var le=Object.defineProperty;var He=Object.getOwnPropertyDescriptor;var Pe=Object.getOwnPropertyNames;var Ue=Object.prototype.hasOwnProperty;var Be=(r,e)=>{for(var n in e)le(r,n,{get:e[n],enumerable:!0})},We=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Pe(e))!Ue.call(r,i)&&i!==n&&le(r,i,{get:()=>e[i],enumerable:!(t=He(e,i))||t.enumerable});return r};var $e=r=>We(le({},"__esModule",{value:!0}),r);var fn={};Be(fn,{NativeIndexBackend:()=>re,NativeListBackend:()=>ie,NativeLogBackend:()=>se,NativeMapBackend:()=>oe,reactiveIndex:()=>dn,reactiveList:()=>un,reactiveLog:()=>cn,reactiveMap:()=>hn});module.exports=$e(fn);var K=0,U=!1,S=[],V=[],z=[],B=[];function xe(){return K>0||U}function Te(){return K>0}function ke(r){K>0?B.push(r):r()}function N(r){K+=1;let e=!1;try{r()}catch(n){throw e=!0,n}finally{if(K-=1,K===0)if(e){if(!U){let n=B.splice(0);for(let t of n)try{t()}catch{}S.length=0,V.length=0,z.length=0}}else je()}}function je(){let r=!U;r&&(U=!0);let e=[],n=0;try{for(;S.length>0||V.length>0||z.length>0||r&&B.length>0;){if(r&&B.length>0){let s=B.splice(0);for(let o of s)try{o()}catch(a){e.push(a)}continue}if(n+=1,n>1e3)throw S.length=0,V.length=0,z.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let i=(S.length>0?S:V.length>0?V:z).splice(0);for(let s of i)try{s()}catch(o){e.push(o)}}}finally{r&&(U=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function Z(r,e,n){if(e.length===0)return;if(e.length===1){let d=n(e[0][0]);if(d<3||!xe()){r(e);return}(d>=5?z:d===4?V:S).push(()=>r(e));return}let t=e.length,i=t,s=t,o=t,a=0;for(;a<t&&n(e[a][0])<3;)a++;for(i=a;a<t&&n(e[a][0])===3;)a++;for(s=a;a<t&&n(e[a][0])===4;)a++;o=a;let u=xe();if(i>0){let d=e.slice(0,i);r(d)}if(s>i){let d=e.slice(i,s);u?S.push(()=>r(d)):r(d)}if(o>s){let d=e.slice(s,o);u?V.push(()=>r(d)):r(d)}if(t>o){let d=e.slice(o,t);u?z.push(()=>r(d)):r(d)}}var W=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),x=Symbol.for("graphrefly/DIRTY"),O=Symbol.for("graphrefly/RESOLVED"),I=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),$=Symbol.for("graphrefly/RESUME"),A=Symbol.for("graphrefly/TEARDOWN"),C=Symbol.for("graphrefly/COMPLETE"),T=Symbol.for("graphrefly/ERROR"),F=Object.freeze([x]),ce=Object.freeze([O]),qe=Object.freeze([I]),he=Object.freeze([W]),Ye=Object.freeze([C]),Je=Object.freeze([A]),fe=Object.freeze([F]),Me=Object.freeze([ce]),Ne=Object.freeze([qe]),Ae=Object.freeze([Ye]),pe=Object.freeze([Je]);var Xe={name:"json",version:1,contentType:"application/json",encode(r){let e=JSON.stringify(r);return new TextEncoder().encode(e)},decode(r,e){let n=new TextDecoder().decode(r);return JSON.parse(n)}};function Re(r){r.registerCodec(Xe)}var Ze={type:"system",id:""};function Q(r){if(r==null)return Ze;let{type:e,id:n,...t}=r;return{type:e??"system",id:n??"",...t}}function j(){return Math.trunc(performance.now()*1e6)}function Ee(){return Date.now()*1e6}var ee=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let t=this._messageTypes.get(n);return t!=null?t.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}};function Se(r){r.registerMessageType(W,{tier:0,wireCrossing:!1}),r.registerMessageType(x,{tier:1,wireCrossing:!1}),r.registerMessageType(I,{tier:1,wireCrossing:!1,metaPassthrough:!1}),r.registerMessageType(D,{tier:2,wireCrossing:!1}),r.registerMessageType($,{tier:2,wireCrossing:!1}),r.registerMessageType(b,{tier:3,wireCrossing:!0}),r.registerMessageType(O,{tier:3,wireCrossing:!0}),r.registerMessageType(C,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(T,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(A,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var L=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}};function _e(r){if(r===void 0)return null;if(typeof r=="number"){if(!Number.isFinite(r))throw new TypeError(`Cannot hash non-finite number: ${r}`);if(Number.isInteger(r)&&!Number.isSafeInteger(r))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${r}. Cross-language cid parity is not guaranteed for unsafe integers.`);return r}if(typeof r=="string"||typeof r=="boolean"||r===null)return r;if(Array.isArray(r))return r.map(_e);if(typeof r=="object"&&r!==null){let e={};for(let n of Object.keys(r).sort())e[n]=_e(r[n]);return e}return null}var Qe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),en=new TextEncoder;function nn(r){let e=en.encode(r),n=e.length,t=n*8,i=n+9+63&-64,s=new Uint8Array(i);s.set(e),s[n]=128;let o=new DataView(s.buffer);o.setUint32(i-4,t>>>0,!1),o.setUint32(i-8,Math.floor(t/4294967296)>>>0,!1);let a=1779033703,u=3144134277,d=1013904242,h=2773480762,y=1359893119,p=2600822924,c=528734635,l=1541459225,f=new Uint32Array(64),_=(m,v)=>m>>>v|m<<32-v;for(let m=0;m<i;m+=64){for(let w=0;w<16;w++)f[w]=o.getUint32(m+w*4,!1);for(let w=16;w<64;w++){let H=f[w-15],P=f[w-2],X=_(H,7)^_(H,18)^H>>>3,ue=_(P,17)^_(P,19)^P>>>10;f[w]=f[w-16]+X+f[w-7]+ue>>>0}let v=a,E=u,k=d,ae=h,M=y,Y=p,J=c,de=l;for(let w=0;w<64;w++){let H=_(M,6)^_(M,11)^_(M,25),P=M&Y^~M&J,X=de+H+P+Qe[w]+f[w]>>>0,ue=_(v,2)^_(v,13)^_(v,22),Le=v&E^v&k^E&k,Ge=ue+Le>>>0;de=J,J=Y,Y=M,M=ae+X>>>0,ae=k,k=E,E=v,v=X+Ge>>>0}a=a+v>>>0,u=u+E>>>0,d=d+k>>>0,h=h+ae>>>0,y=y+M>>>0,p=p+Y>>>0,c=c+J>>>0,l=l+de>>>0}let g=m=>m.toString(16).padStart(8,"0");return g(a)+g(u)+g(d)+g(h)+g(y)+g(p)+g(c)+g(l)}function ge(r){let e=_e(r??null),n=JSON.stringify(e);return nn(n).slice(0,16)}function tn(){let r=globalThis.crypto;if(r?.randomUUID)return r.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function ye(r,e,n){let t=n?.id??tn();if(r===0)return{id:t,version:0};let s=(n?.hash??ge)(e);return{id:t,version:0,cid:s,prev:null}}function Ve(r,e,n){r.version+=1,"cid"in r&&(r.prev=r.cid,r.cid=n(e))}var Oe=()=>{},Ie=100;function De(r){return{node:r,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function me(r){r.prevData=void 0,r.dirty=!1,r.involvedThisWave=!1,r.dataBatch.length=0,r.terminal=void 0}function ne(r){return r.length===0?r:typeof r[0]=="symbol"?[r]:r}var rn=(r,e,n,t)=>{n.direction==="down-in"&&r._onDepMessage(n.depIndex,e)},sn=(r,e,n,t)=>{let i=r;if(i._status==="completed"||i._status==="errored")return;let s=i._cached,o=s===void 0?[he]:[he,[b,s]];i._status==="dirty"&&o.push(F),Z(e,o,i._config.tierOf)},ve=new ee({onMessage:rn,onSubscribe:sn});Se(ve);Re(ve);var te=class r{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,t){this._config=t.config??ve,this._config.onMessage,this._optsName=t.name,this._describeKind=t.describeKind,this._equals=t.equals??Object.is,this._resubscribable=t.resubscribable??!1,this._resetOnTeardown=t.resetOnTeardown??!1,this._autoComplete=t.completeWhenDepsComplete??!0,this._autoError=t.errorWhenDepsError??!0,this._pausable=t.pausable??!0,this._guard=t.guard,this._fn=n,this._partial=t.partial??!1,this._cached=t.initial!==void 0?t.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=t.versioningHash??this._config.defaultHashFn??ge;let i=t.versioning??this._config.defaultVersioning;this._versioningLevel=i,this._versioning=i!=null?ye(i,this._cached===void 0?void 0:this._cached,{id:t.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(De);let s={};for(let[a,u]of Object.entries(t.meta??{})){let d={initial:u,name:`${t.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};t.guard!=null&&(d.guard=t.guard),s[a]=new r([],void 0,d)}Object.freeze(s),this.meta=s,this._hasMeta=Object.keys(s).length>0;let o=this;this._actions={emit(a){o._emit([[b,a]])},down(a){o._emit(ne(a))},up(a){o._emitUp(ne(a))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let t=this._versioningLevel;if(t!=null&&e<=t)return;let i=n?.hash??this._hashFn;i!==this._hashFn&&(this._hashFn=i);let s=this._cached===void 0?void 0:this._cached,o=this._versioning,a=o?.id??n?.id,u=o?.version??0,d=ye(e,s,{id:a,hash:i});d.version=u,this._versioning=d,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=Q(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let t of this._extraGuards)if(!t(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,t=e?.actor!=null;if(!n&&!t)return;let i=Q(e?.actor),s=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(i,s))throw new L({actor:i,action:s,nodeName:this.name});if(this._extraGuards!=null){for(let o of this._extraGuards)if(!o(i,s))throw new L({actor:i,action:s,nodeName:this.name})}this._lastMutation={actor:i,timestamp_ns:Ee()}}down(e,n){let t=ne(e);t.length!==0&&(this._checkGuard(n),this._emit(t))}emit(e,n){this._checkGuard(n),this._emit([[b,e]])}up(e,n){if(this._deps.length===0)return;let t=ne(e);if(t.length===0)return;this._checkGuard(n);let i=n??{internal:!0};this._validateUpTiers(t);for(let s of this._deps)s.node.up?.(t,i)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let t of e){let i=n(t[0]);if(i===3||i===4)throw new Error(`Node "${this.name}": tier-${i} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let u=Q(n);if(!this._guard(u,"observe"))throw new L({actor:u,action:"observe",nodeName:this.name})}let i=this._isTerminal&&this._resubscribable;if(i){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)me(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let s;try{s=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:i},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let o=this._isTerminal;if(this._sinkCount===1&&!o)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof s=="function")try{s()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof s=="function"&&s(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let t=0;t<e;t++){let i=t,s=this._deps[t];s.unsub=Oe,s.unsub=s.node.subscribe(o=>{if(s.unsub===null)return;let a=this._config.tierOf,u=!1;for(let d of o)a(d[0])>=3&&(u=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:i},this._actions);u&&this._maybeRunFnOnSettlement()}),n++}}catch(t){this._deps[n].unsub=null;for(let i=0;i<n;i++){let s=this._deps[i];if(s.unsub!=null){let o=s.unsub;s.unsub=null;try{o()}catch{}me(s)}}throw this._dirtyDepCount=0,t}}_addDep(e){for(let i=0;i<this._deps.length;i++)if(this._deps[i].node===e)return i;let n=this._deps.length,t=De(e);if(this._deps.push(t),this._sinks==null)return n;t.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(fe),t.unsub=Oe;try{t.unsub=e.subscribe(i=>{if(t.unsub===null)return;let s=this._config.tierOf,o=!1;for(let a of i)s(a[0])>=3&&(o=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:n},this._actions);o&&this._maybeRunFnOnSettlement()})}catch(i){throw t.unsub=null,this._deps.pop(),this._dirtyDepCount--,i}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(t){this._emit([[T,this._wrapFnError("cleanup threw",t)]])}else if(n!=null&&typeof n=="object"){let t=n.deactivate;if(typeof t=="function")try{t()}catch(i){this._emit([[T,this._wrapFnError("cleanup.deactivate threw",i)]])}}for(let t of this._deps){if(t.unsub!=null){let i=t.unsub;t.unsub=null;try{i()}catch{}}me(t)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let t=this._deps[e],i=n[0];if(this._inspectorHooks!=null){let s={kind:"dep_message",depIndex:e,message:n};for(let o of this._inspectorHooks)o(s)}if(i!==W){if(i===x){this._depDirtied(t);return}if(i===I){if(this._depInvalidated(t),this._cached===void 0)return;this._emit(Ne);return}if(i===D||i===$){this._emit([n]);return}if(i===A){this._emit(pe);return}if(i===b)this._depSettledAsData(t,n[1]);else if(i===O)this._depSettledAsResolved(t);else if(i===C)this._depSettledAsTerminal(t,!0);else if(i===T)this._depSettledAsTerminal(t,n[1]);else{this._emit([n]);return}if(!this._fn){(i===b||i===O)&&this._emit([n]),(i===C||i===T)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(fe))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Me),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[T,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(Ae)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(o){this._emit([[T,this._wrapFnError("cleanup threw",o)]]);return}}else if(e!=null&&typeof e=="object"){let o=e.beforeRun;if(typeof o=="function"){e.beforeRun=void 0;try{o()}catch(a){this._emit([[T,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let n=this._deps.map(o=>o.involvedThisWave?o.dataBatch.length>0?[...o.dataBatch]:[]:void 0),t=this._deps.map(o=>o.prevData);for(let o=0;o<this._deps.length;o++){let a=n[o];a!=null&&a.length>0&&(this._deps[o].prevData=a[a.length-1])}let i=this._deps.map(o=>o.terminal),s={prevData:t,terminalDeps:i,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let o={kind:"run",batchData:n,prevData:t};for(let a of this._inspectorHooks)a(o)}this._isExecutingFn=!0;try{let o=this._fn(n,this._actions,s);if(typeof o=="function")this._cleanup=o;else if(o!=null&&typeof o=="object"){let a=o;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=o)}}catch(o){this._emit([[T,this._wrapFnError("fn threw",o)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ie?(this._rerunDepth=0,this._emit([[T,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ie} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let t=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${t}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[F,e[0]]:e;let t=!0,i=!1,s=!1,o=-1;for(let u of e){let d=n(u[0]);d<o&&(t=!1),d===3&&(i=!0),u[0]===x&&(s=!0),o=d}let a=e;if(!t){let u=e.map((d,h)=>({m:d,i:h,tier:n(d[0])}));u.sort((d,h)=>d.tier-h.tier||d.i-h.i),a=u.map(d=>d.m)}if(i&&!s&&this._status!=="dirty"){let u=0;for(;u<a.length&&n(a[u][0])===0;)u++;return u===0?[F,...a]:[...a.slice(0,u),F,...a.slice(u)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let u=e[a];if(u[0]===T&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(u=>u[0]===A||u[0]===I);if(a.length===0)return;n=a}n=this._frameBatch(n);let i=null;for(let a=0;a<n.length;a++){let u=n[a],d=u[0];if(d!==D&&d!==$){i?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${d===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let h=!0;if(this._pausable!==!1){let y=u[1];if(d===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(y),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(y))h=!1;else if(this._pauseLocks.delete(y),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let p=this._pauseBuffer;this._pauseBuffer=[],this._emit(p)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}h?i?.push(u):i==null&&(i=n.slice(0,a))}if(i!=null){if(i.length===0)return;n=i}if(this._hasMeta&&n.some(a=>a[0]===A))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(pe)}catch{}let{finalMessages:s,equalsError:o}=this._updateState(n);if(s.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:s})}catch{}}if(s.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,u=[];for(let d of s)a(d[0])===3?this._pauseBuffer.push(d):u.push(d);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(s);o!=null&&this._emit([[T,o]])}_updateState(e){let n=this._config.tierOf,t,i,s=-1,o=0;for(let h of e)n(h[0])===3&&o++;let a=o<=1,u=-1;if(this._versioning!=null&&o>1){for(let h=e.length-1;h>=0;h--)if(e[h][0]===b){u=h;break}}for(let h=0;h<e.length;h++){let y=e[h],p=y[0];if(p===b){if(y.length>=2){let c=!1;if(a&&this._cached!==void 0)try{c=this._equals(this._cached,y[1])}catch(l){i=this._wrapFnError("equals threw",l),s=h;break}if(c){t==null&&(t=e.slice(0,h)),t.push(ce),this._status="resolved";continue}this._cached=y[1],this._versioning!=null&&(u<0||h===u)&&Ve(this._versioning,y[1],this._hashFn)}this._status="settled",t?.push(y)}else if(t?.push(y),p===x)this._status="dirty";else if(p===O)this._status="resolved";else if(p===C){this._status="completed";{let c=this._config.rigorRecorder;if(c!=null)try{c.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===T){this._status="errored";{let c=this._config.rigorRecorder;if(c!=null)try{c.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(p===I){if(this._cached!==void 0){let l=this._config.rigorRecorder;if(l!=null)try{l.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let c=this._cleanup;if(typeof c=="function"){this._cleanup=void 0;try{c()}catch{}}else if(c!=null&&typeof c=="object"){let l=c.invalidate;if(typeof l=="function")try{l()}catch{}}}else p===A&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=s>=0?t??e.slice(0,s):t??e;return i!=null?{finalMessages:d,equalsError:i}:{finalMessages:d}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let t of n)t(e)};_dispatchOrAccumulate(e){if(Te()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],ke(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}Z(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);Z(this._deliverToSinks,n,this._config.tierOf)}},Ce=r=>Array.isArray(r),be=r=>typeof r=="object"&&r!=null&&!Array.isArray(r);function we(r,e,n){let t=Ce(r)?r:[],i=typeof r=="function"?r:typeof e=="function"?e:void 0,s={};return Ce(r)?s=(be(e)?e:n)??{}:be(r)?s=r:s=(be(e)?e:n)??{},new te(t,i,s)}function R(r,e){return we([],{...e,initial:r})}function q(r,e,n){return we(r,(i,s,o)=>{let a=i.map((u,d)=>u!=null&&u.length>0?u.at(-1):o.prevData[d]);s.emit(e(a,o))},{describeKind:"derived",...n})}function Ke(r,e){if(r===e)return 0;let n=typeof r;if(n===typeof e&&(n==="number"||n==="string"||n==="boolean"||n==="bigint")){let i=r,s=e;return i<s?-1:i>s?1:0}return String(r).localeCompare(String(e))}function on(r,e){let n=Ke(r[0],e[0]);return n!==0?n:Ke(r[1],e[1])}function ze(r){return[r.secondary,r.primary]}function G(r,e){let n=ze(e),t=0,i=r.length;for(;t<i;){let s=t+i>>1;on(n,ze(r[s]))>0?t=s+1:i=s}return t}var re=class{_version=0;_buf=[];_byPrimary=new Map;get version(){return this._version}get size(){return this._buf.length}has(e){return this._byPrimary.has(e)}get(e){return this._byPrimary.get(e)?.value}upsert(e,n,t,i){let s=this._byPrimary.get(e),o={primary:e,secondary:n,value:t};if(s!==void 0&&i?.equals?.(s,o))return!1;if(s!==void 0){let u=G(this._buf,s);this._buf.splice(u,1)}let a=G(this._buf,o);return this._buf.splice(a,0,o),this._byPrimary.set(e,o),this._version+=1,s===void 0}upsertMany(e,n){let t=0;try{for(let i of e){let s=this._byPrimary.get(i.primary),o={primary:i.primary,secondary:i.secondary,value:i.value};if(s!==void 0&&n?.equals?.(s,o))continue;if(s!==void 0){let u=G(this._buf,s);this._buf.splice(u,1)}let a=G(this._buf,o);this._buf.splice(a,0,o),this._byPrimary.set(i.primary,o),t+=1}}finally{t>0&&(this._version+=1)}return t}delete(e){let n=this._byPrimary.get(e);if(n===void 0)return!1;let t=G(this._buf,n);return this._buf.splice(t,1),this._byPrimary.delete(e),this._version+=1,!0}deleteMany(e){let n=0;try{for(let t of e){let i=this._byPrimary.get(t);if(i===void 0)continue;let s=G(this._buf,i);this._buf.splice(s,1),this._byPrimary.delete(t),n+=1}}finally{n>0&&(this._version+=1)}return n}clear(){let e=this._buf.length;return e===0?0:(this._buf.length=0,this._byPrimary.clear(),this._version+=1,e)}toArray(){return[...this._buf]}toPrimaryMap(){let e=new Map;for(let n of this._buf)e.set(n.primary,n.value);return e}};function an(r){return r.subscribe(()=>{})}function dn(r={}){let{name:e,versioning:n,equals:t,backend:i}=r,s=i??new re;function o(c){return c?.equals!==void 0||t===void 0?c:{...c,equals:t}}let a=R([],{name:e,describeKind:"state",equals:(c,l)=>c===l,...n!=null?{versioning:n}:{}}),u=q([a],([c])=>{let l=c,f=new Map;for(let _ of l)f.set(_.primary,_.value);return f},{initial:s.toPrimaryMap(),describeKind:"derived"}),d=an(u),h=!1;function y(){let c=s.toArray();N(()=>{a.down([[x]]),a.down([[b,c]])})}function p(c){let l=s.version;try{return c()}finally{s.version!==l&&y()}}return{ordered:a,byPrimary:u,has(c){return s.has(c)},get(c){return s.get(c)},get size(){return s.size},upsert(c,l,f,_){return p(()=>s.upsert(c,l,f,o(_)))},upsertMany(c,l){let f=[...c];f.length!==0&&p(()=>s.upsertMany(f,o(l)))},delete(c){p(()=>s.delete(c))},deleteMany(c){let l=[...c];l.length!==0&&p(()=>s.deleteMany(l))},clear(){p(()=>s.clear())},dispose(){h||(h=!0,d())}}}var ie=class{_version=0;_buf;constructor(e){this._buf=e?[...e]:[]}get version(){return this._version}get size(){return this._buf.length}at(e){if(!Number.isInteger(e))return;let n=e>=0?e:this._buf.length+e;if(!(n<0||n>=this._buf.length))return this._buf[n]}append(e){this._buf.push(e),this._version+=1}appendMany(e){if(e.length===0)return;let n=this._buf.length;this._buf.length=n+e.length;for(let t=0;t<e.length;t++)this._buf[n+t]=e[t];this._version+=1}insert(e,n){if(!Number.isInteger(e)||e<0||e>this._buf.length)throw new RangeError(`insert: index ${e} out of range [0, ${this._buf.length}]`);this._buf.splice(e,0,n),this._version+=1}insertMany(e,n){if(!Number.isInteger(e)||e<0||e>this._buf.length)throw new RangeError(`insertMany: index ${e} out of range [0, ${this._buf.length}]`);n.length!==0&&(this._buf.splice(e,0,...n),this._version+=1)}pop(e){if(this._buf.length===0)throw new RangeError("pop from empty list");if(!Number.isInteger(e))throw new RangeError(`pop: index ${e} must be an integer`);let n=e>=0?e:this._buf.length+e;if(n<0||n>=this._buf.length)throw new RangeError(`pop: index ${e} out of range`);let[t]=this._buf.splice(n,1);return this._version+=1,t}clear(){let e=this._buf.length;return e===0?0:(this._buf.length=0,this._version+=1,e)}toArray(){return[...this._buf]}};function un(r,e={}){let{name:n,versioning:t,backend:i}=e,s=i??new ie(r),o=R(s.toArray(),{name:n,describeKind:"state",equals:(d,h)=>d===h,...t!=null?{versioning:t}:{}});function a(){let d=s.toArray();N(()=>{o.down([[x]]),o.down([[b,d]])})}function u(d){let h=s.version;try{return d()}finally{s.version!==h&&a()}}return{items:o,get size(){return s.size},at(d){return s.at(d)},append(d){u(()=>s.append(d))},appendMany(d){u(()=>s.appendMany(d))},insert(d,h){u(()=>s.insert(d,h))},insertMany(d,h){u(()=>s.insertMany(d,h))},pop(d=-1){return u(()=>s.pop(d))},clear(){u(()=>s.clear())},dispose(){}}}var se=class{_version=0;_maxSize;_buf;_head=0;_size=0;constructor(e,n){if(n!==void 0&&n<1)throw new RangeError("maxSize must be >= 1");if(this._maxSize=n,n!==void 0){if(this._buf=new Array(n),e&&e.length>0){let t=Math.min(e.length,n),i=e.length-t;for(let s=0;s<t;s++)this._buf[s]=e[i+s];this._size=t}}else this._buf=e?[...e]:[],this._size=this._buf.length}get version(){return this._version}get size(){return this._size}at(e){if(!Number.isInteger(e))return;let n=e>=0?e:this._size+e;if(!(n<0||n>=this._size))return this._maxSize!==void 0?this._buf[(this._head+n)%this._maxSize]:this._buf[n]}append(e){this._rawAppend(e),this._version+=1}appendMany(e){if(e.length===0)return;let n=this._maxSize!==void 0&&e.length>this._maxSize?e.length-this._maxSize:0;for(let t=n;t<e.length;t++)this._rawAppend(e[t]);this._version+=1}clear(){if(this._size===0)return 0;let e=this._size;if(this._maxSize===void 0)this._buf.length=0;else for(let n=0;n<e;n++)this._buf[(this._head+n)%this._maxSize]=void 0;return this._head=0,this._size=0,this._version+=1,e}trimHead(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`trimHead: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return 0;let n=Math.min(e,this._size);if(this._maxSize===void 0)this._buf.splice(0,n);else{for(let t=0;t<n;t++)this._buf[(this._head+t)%this._maxSize]=void 0;this._head=(this._head+n)%this._maxSize}return this._size-=n,this._version+=1,n}slice(e,n){if(!Number.isInteger(e)||e<0)throw new RangeError(`slice: start must be a non-negative integer (got ${e})`);if(n!==void 0&&(!Number.isInteger(n)||n<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${n})`);let t=n===void 0?this._size:Math.min(Math.max(n,0),this._size),i=Math.min(e,this._size);if(i>=t)return[];let s=t-i;if(this._maxSize===void 0)return this._buf.slice(i,t);let o=new Array(s);for(let a=0;a<s;a++)o[a]=this._buf[(this._head+i+a)%this._maxSize];return o}tail(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`tail: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return[];let n=Math.min(e,this._size);return this.slice(this._size-n,this._size)}toArray(){if(this._maxSize===void 0)return[...this._buf];let e=new Array(this._size);for(let n=0;n<this._size;n++)e[n]=this._buf[(this._head+n)%this._maxSize];return e}_rawAppend(e){if(this._maxSize===void 0){this._buf.push(e),this._size=this._buf.length;return}this._size<this._maxSize?(this._buf[(this._head+this._size)%this._maxSize]=e,this._size+=1):(this._buf[this._head]=e,this._head=(this._head+1)%this._maxSize)}};function Fe(r){return r.subscribe(()=>{})}var ln=64;function cn(r,e={}){let{name:n,maxSize:t,versioning:i,backend:s}=e,o=s??new se(r,t),a=R(o.toArray(),{name:n,describeKind:"state",equals:(l,f)=>l===f,...i!=null?{versioning:i}:{}});function u(){let l=o.toArray();N(()=>{a.down([[x]]),a.down([[b,l]])})}let d=new Map,h=new Map;function y(l,f){return`${l}:${f===void 0?"END":f}`}function p(l){if(l.size<ln)return;let f=l.keys().next();if(f.done)return;let _=l.get(f.value);_!==void 0&&_.dispose(),l.delete(f.value)}function c(l){let f=o.version;try{return l()}finally{o.version!==f&&u()}}return{entries:a,get size(){return o.size},at(l){return o.at(l)},append(l){c(()=>o.append(l))},appendMany(l){l.length!==0&&c(()=>o.appendMany(l))},clear(){c(()=>o.clear())},trimHead(l){c(()=>o.trimHead(l))},tail(l){if(!Number.isInteger(l)||l<0)throw new RangeError(`tail: n must be a non-negative integer (got ${l})`);let f=d.get(l);if(f!==void 0)return d.delete(l),d.set(l,f),f.node;p(d);let _=q([a],([m])=>{let v=m;return l===0||v.length===0?[]:v.slice(Math.max(0,v.length-l))},{initial:o.tail(l),describeKind:"derived"}),g=Fe(_);return d.set(l,{node:_,dispose:g}),_},slice(l,f){if(!Number.isInteger(l)||l<0)throw new RangeError(`slice: start must be a non-negative integer (got ${l})`);if(f!==void 0&&(!Number.isInteger(f)||f<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${f})`);let _=y(l,f),g=h.get(_);if(g!==void 0)return h.delete(_),h.set(_,g),g.node;p(h);let m=q([a],([E])=>{let k=E;return f===void 0?k.slice(l):k.slice(l,f)},{initial:o.slice(l,f),describeKind:"derived"}),v=Fe(m);return h.set(_,{node:m,dispose:v}),m},disposeTail(l){let f=d.get(l);return f===void 0?!1:(f.dispose(),d.delete(l),!0)},disposeSlice(l,f){let _=y(l,f),g=h.get(_);return g===void 0?!1:(g.dispose(),h.delete(_),!0)},disposeAllViews(){for(let l of d.values())l.dispose();d.clear();for(let l of h.values())l.dispose();h.clear()},dispose(){for(let l of d.values())l.dispose();d.clear();for(let l of h.values())l.dispose();h.clear()}}}var oe=class{_version=0;_store=new Map;_maxSize;_defaultTtl;constructor(e={}){let{maxSize:n,defaultTtl:t}=e;if(n!==void 0&&n<1)throw new RangeError("maxSize must be >= 1");if(t!==void 0&&t<=0)throw new RangeError("defaultTtl must be positive");this._maxSize=n,this._defaultTtl=t}get version(){return this._version}get size(){return this._store.size}has(e){let n=this._store.get(e);return n===void 0?!1:this._isExpired(n)?(this._store.delete(e),this._version+=1,!1):(this._touchLru(e,n),!0)}get(e){let n=this._store.get(e);if(n!==void 0){if(this._isExpired(n)){this._store.delete(e),this._version+=1;return}return this._touchLru(e,n),n.value}}set(e,n,t){let i=this._resolveExpiresAt(t);this._store.has(e)&&this._store.delete(e),this._store.set(e,{value:n,expiresAt:i}),this._evictLruWhileOver(),this._version+=1}setMany(e,n){let t=this._resolveExpiresAt(n),i=0;try{for(let[s,o]of e)this._store.has(s)&&this._store.delete(s),this._store.set(s,{value:o,expiresAt:t}),i+=1}finally{i>0&&(this._evictLruWhileOver(),this._version+=1)}}delete(e){let n=this._store.delete(e);return n&&(this._version+=1),n}deleteMany(e){let n=0;try{for(let t of e)this._store.delete(t)&&(n+=1)}finally{n>0&&(this._version+=1)}return n}clear(){let e=this._store.size;return e===0?0:(this._store.clear(),this._version+=1,e)}pruneExpired(){let e=j(),n=0;for(let[t,i]of this._store)this._isExpired(i,e)&&(this._store.delete(t),n+=1);return n>0&&(this._version+=1),n}toMap(){let e=j(),n=new Map;for(let[t,i]of this._store)this._isExpired(i,e)||n.set(t,i.value);return n}_resolveExpiresAt(e){let n=e??this._defaultTtl;if(n!==void 0){if(!Number.isFinite(n)||n<=0)throw new RangeError(`MapBackend: ttl must be a positive finite number (got ${n})`);return j()+n*1e9}}_isExpired(e,n){return e.expiresAt===void 0?!1:(n??j())>=e.expiresAt}_touchLru(e,n){this._store.delete(e),this._store.set(e,n)}_evictLruWhileOver(){if(this._maxSize!==void 0)for(;this._store.size>this._maxSize;){let e=this._store.keys().next().value;if(e===void 0)break;this._store.delete(e)}}};function hn(r={}){let{name:e,maxSize:n,defaultTtl:t,versioning:i,backend:s,retention:o}=r;if(o&&n!==void 0)throw new RangeError("reactiveMap: `maxSize` (LRU) and `retention` (score-based) are mutually exclusive. Pick one eviction policy.");if(o&&o.archiveThreshold===void 0&&o.maxSize===void 0)throw new RangeError("reactiveMap: `retention` requires at least one of `archiveThreshold` or `maxSize` to trigger archival.");let a=s??new oe({maxSize:n,defaultTtl:t}),u=R(a.toMap(),{name:e,describeKind:"state",equals:(p,c)=>p===c,...i!=null?{versioning:i}:{}});function d(){let p=a.toMap();N(()=>{u.down([[x]]),u.down([[b,p]])})}function h(){if(!o)return;let p=a.toMap(),c=o.archiveThreshold,l=o.maxSize,f=[];for(let[g,m]of p)f.push({key:g,value:m,score:o.score(g,m)});f.sort((g,m)=>g.score-m.score);let _=new Set;if(c!==void 0)for(let g of f)if(g.score<c)_.add(g.key);else break;if(l!==void 0&&f.length-_.size>l)for(let g of f){if(f.length-_.size<=l)break;_.has(g.key)||_.add(g.key)}if(_.size!==0)for(let g of f)_.has(g.key)&&(o.onArchive?.(g.key,g.value,g.score),a.delete(g.key))}function y(p,c="mutation"){let l=a.version;try{return p()}finally{a.version!==l&&(c==="mutation"&&h(),d())}}return{entries:u,has(p){return y(()=>a.has(p),"read")},get(p){return y(()=>a.get(p),"read")},set(p,c,l){y(()=>a.set(p,c,l?.ttl))},setMany(p,c){y(()=>a.setMany(p,c?.ttl))},delete(p){y(()=>a.delete(p))},deleteMany(p){y(()=>a.deleteMany(p))},clear(){y(()=>a.clear())},pruneExpired(){y(()=>a.pruneExpired())},get size(){return a.size},dispose(){}}}0&&(module.exports={NativeIndexBackend,NativeListBackend,NativeLogBackend,NativeMapBackend,reactiveIndex,reactiveList,reactiveLog,reactiveMap});
@@ -1,6 +1,6 @@
1
- import { a as Node, V as VersioningLevel } from '../node-BVV7G1bq.cjs';
2
- export { L as LogBackend, N as NativeLogBackend, R as ReactiveLogBundle, a as ReactiveLogOptions, r as reactiveLog } from '../reactive-log-5jFeNRmd.cjs';
3
- export { M as MapBackend, N as NativeMapBackend, b as NativeMapBackendOptions, R as ReactiveMapBundle, a as ReactiveMapOptions, c as ReactiveMapRetention, r as reactiveMap } from '../reactive-map-IJIfZxoh.cjs';
1
+ import { a as Node, V as VersioningLevel } from '../node-8qx0kgYt.cjs';
2
+ export { L as LogBackend, N as NativeLogBackend, R as ReactiveLogBundle, a as ReactiveLogOptions, r as reactiveLog } from '../reactive-log-CWC7jO4J.cjs';
3
+ export { M as MapBackend, N as NativeMapBackend, b as NativeMapBackendOptions, R as ReactiveMapBundle, a as ReactiveMapOptions, c as ReactiveMapRetention, r as reactiveMap } from '../reactive-map-Cm89Hk0c.cjs';
4
4
 
5
5
  type IndexRow<K, V = unknown> = {
6
6
  readonly primary: K;
@@ -1,6 +1,6 @@
1
- import { a as Node, V as VersioningLevel } from '../node-BVV7G1bq.js';
2
- export { L as LogBackend, N as NativeLogBackend, R as ReactiveLogBundle, a as ReactiveLogOptions, r as reactiveLog } from '../reactive-log-BOJDCI5x.js';
3
- export { M as MapBackend, N as NativeMapBackend, b as NativeMapBackendOptions, R as ReactiveMapBundle, a as ReactiveMapOptions, c as ReactiveMapRetention, r as reactiveMap } from '../reactive-map-CtRaCddO.js';
1
+ import { a as Node, V as VersioningLevel } from '../node-8qx0kgYt.js';
2
+ export { L as LogBackend, N as NativeLogBackend, R as ReactiveLogBundle, a as ReactiveLogOptions, r as reactiveLog } from '../reactive-log-CqaBg8nf.js';
3
+ export { M as MapBackend, N as NativeMapBackend, b as NativeMapBackendOptions, R as ReactiveMapBundle, a as ReactiveMapOptions, c as ReactiveMapRetention, r as reactiveMap } from '../reactive-map-LjwjcFaW.js';
4
4
 
5
5
  type IndexRow<K, V = unknown> = {
6
6
  readonly primary: K;
@@ -1 +1 @@
1
- import{a as m,b as p}from"../chunk-DWIAG62L.js";import{a as t,b as x}from"../chunk-4UUDNFYG.js";import{a as e,b as f}from"../chunk-LWGLBCMU.js";import{a as o,b as r}from"../chunk-XRSHMHEG.js";import"../chunk-7AJKUA36.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{m as NativeIndexBackend,t as NativeListBackend,o as NativeLogBackend,e as NativeMapBackend,p as reactiveIndex,x as reactiveList,r as reactiveLog,f as reactiveMap};
1
+ import{a as m,b as p}from"../chunk-NNKJUORL.js";import{a as t,b as x}from"../chunk-KGKJCHEK.js";import{a as e,b as f}from"../chunk-TZQPPQEQ.js";import{a as o,b as r}from"../chunk-HTBOCKVD.js";import"../chunk-LYCLF26R.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{m as NativeIndexBackend,t as NativeListBackend,o as NativeLogBackend,e as NativeMapBackend,p as reactiveIndex,x as reactiveList,r as reactiveLog,f as reactiveMap};
@@ -1 +1 @@
1
- "use strict";var ve=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var Ct=Object.prototype.hasOwnProperty;var E=(t,e)=>()=>(t&&(e=t(t=0)),e);var Te=(t,e)=>{for(var n in e)ve(t,n,{get:e[n],enumerable:!0})},Rt=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Mt(e))!Ct.call(t,o)&&o!==n&&ve(t,o,{get:()=>e[o],enumerable:!(r=Ot(e,o))||r.enumerable});return t};var Dt=t=>Rt(ve({},"__esModule",{value:!0}),t);function V(){return Math.trunc(performance.now()*1e6)}function se(){return Date.now()*1e6}var ie=E(()=>{"use strict"});var J,b,v,w,R,D,X,S,g,p,H,xe,It,Ne,Ft,Lt,ke,Ue,We,$e,Ee,Z=E(()=>{"use strict";J=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),v=Symbol.for("graphrefly/DIRTY"),w=Symbol.for("graphrefly/RESOLVED"),R=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),X=Symbol.for("graphrefly/RESUME"),S=Symbol.for("graphrefly/TEARDOWN"),g=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),H=Object.freeze([v]),xe=Object.freeze([w]),It=Object.freeze([R]),Ne=Object.freeze([J]),Ft=Object.freeze([g]),Lt=Object.freeze([S]),ke=Object.freeze([H]),Ue=Object.freeze([xe]),We=Object.freeze([It]),$e=Object.freeze([Ft]),Ee=Object.freeze([Lt])});function je(t){t.registerCodec(Pt)}var Pt,ze=E(()=>{"use strict";Pt={name:"json",version:1,contentType:"application/json",encode(t){let e=JSON.stringify(t);return new TextEncoder().encode(e)},decode(t,e){let n=new TextDecoder().decode(t);return JSON.parse(n)}}});function ae(t){if(t==null)return Bt;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var Bt,qe=E(()=>{"use strict";Bt={type:"system",id:""}});function Ye(){return U>0||Q}function Ke(){return U>0}function Je(t){U>0?ee.push(t):t()}function Se(t){U+=1;let e=!1;try{t()}catch(n){throw e=!0,n}finally{if(U-=1,U===0)if(e){if(!Q){let n=ee.splice(0);for(let r of n)try{r()}catch{}I.length=0,F.length=0,W.length=0}}else Gt()}}function Gt(){let t=!Q;t&&(Q=!0);let e=[],n=0;try{for(;I.length>0||F.length>0||W.length>0||t&&ee.length>0;){if(t&&ee.length>0){let i=ee.splice(0);for(let s of i)try{s()}catch(a){e.push(a)}continue}if(n+=1,n>1e3)throw I.length=0,F.length=0,W.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let o=(I.length>0?I:F.length>0?F:W).splice(0);for(let i of o)try{i()}catch(s){e.push(s)}}}finally{t&&(Q=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ue(t,e,n){if(e.length===0)return;if(e.length===1){let d=n(e[0][0]);if(d<3||!Ye()){t(e);return}(d>=5?W:d===4?F:I).push(()=>t(e));return}let r=e.length,o=r,i=r,s=r,a=0;for(;a<r&&n(e[a][0])<3;)a++;for(o=a;a<r&&n(e[a][0])===3;)a++;for(i=a;a<r&&n(e[a][0])===4;)a++;s=a;let u=Ye();if(o>0){let d=e.slice(0,o);t(d)}if(i>o){let d=e.slice(o,i);u?I.push(()=>t(d)):t(d)}if(s>i){let d=e.slice(i,s);u?F.push(()=>t(d)):t(d)}if(r>s){let d=e.slice(s,r);u?W.push(()=>t(d)):t(d)}}var U,Q,I,F,W,ee,Ae=E(()=>{"use strict";U=0,Q=!1,I=[],F=[],W=[],ee=[]});function Xe(t){t.registerMessageType(J,{tier:0,wireCrossing:!1}),t.registerMessageType(v,{tier:1,wireCrossing:!1}),t.registerMessageType(R,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(D,{tier:2,wireCrossing:!1}),t.registerMessageType(X,{tier:2,wireCrossing:!1}),t.registerMessageType(b,{tier:3,wireCrossing:!0}),t.registerMessageType(w,{tier:3,wireCrossing:!0}),t.registerMessageType(g,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(S,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var de,Ze=E(()=>{"use strict";Z();de=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});var $,Qe=E(()=>{"use strict";$=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}}});function Oe(t){if(t===void 0)return null;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError(`Cannot hash non-finite number: ${t}`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${t}. Cross-language cid parity is not guaranteed for unsafe integers.`);return t}if(typeof t=="string"||typeof t=="boolean"||t===null)return t;if(Array.isArray(t))return t.map(Oe);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=Oe(t[n]);return e}return null}function Ut(t){let e=Ht.encode(t),n=e.length,r=n*8,o=n+9+63&-64,i=new Uint8Array(o);i.set(e),i[n]=128;let s=new DataView(i.buffer);s.setUint32(o-4,r>>>0,!1),s.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let a=1779033703,u=3144134277,d=1013904242,c=2773480762,l=1359893119,f=2600822924,y=528734635,T=1541459225,_=new Uint32Array(64),m=(x,O)=>x>>>O|x<<32-O;for(let x=0;x<o;x+=64){for(let k=0;k<16;k++)_[k]=s.getUint32(x+k*4,!1);for(let k=16;k<64;k++){let Y=_[k-15],K=_[k-2],oe=m(Y,7)^m(Y,18)^Y>>>3,we=m(K,17)^m(K,19)^K>>>10;_[k]=_[k-16]+oe+_[k-7]+we>>>0}let O=a,z=u,q=d,_e=c,C=l,ne=f,re=y,ye=T;for(let k=0;k<64;k++){let Y=m(C,6)^m(C,11)^m(C,25),K=C&ne^~C&re,oe=ye+Y+K+Vt[k]+_[k]>>>0,we=m(O,2)^m(O,13)^m(O,22),St=O&z^O&q^z&q,At=we+St>>>0;ye=re,re=ne,ne=C,C=_e+oe>>>0,_e=q,q=z,z=O,O=oe+At>>>0}a=a+O>>>0,u=u+z>>>0,d=d+q>>>0,c=c+_e>>>0,l=l+C>>>0,f=f+ne>>>0,y=y+re>>>0,T=T+ye>>>0}let h=x=>x.toString(16).padStart(8,"0");return h(a)+h(u)+h(d)+h(c)+h(l)+h(f)+h(y)+h(T)}function Me(t){let e=Oe(t??null),n=JSON.stringify(e);return Ut(n).slice(0,16)}function Wt(){let t=globalThis.crypto;if(t?.randomUUID)return t.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function Ce(t,e,n){let r=n?.id??Wt();if(t===0)return{id:r,version:0};let i=(n?.hash??Me)(e);return{id:r,version:0,cid:i,prev:null}}function et(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var Vt,Ht,tt=E(()=>{"use strict";Vt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ht=new TextEncoder});function ot(t){return{node:t,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Re(t){t.prevData=void 0,t.dirty=!1,t.involvedThisWave=!1,t.dataBatch.length=0,t.terminal=void 0}function ce(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}function M(t,e,n){let r=st(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return st(t)?i=(De(e)?e:n)??{}:De(t)?i=t:i=(De(e)?e:n)??{},new le(r,o,i)}var nt,rt,$t,jt,Ie,le,st,De,fe=E(()=>{"use strict";ze();qe();Ae();ie();Ze();Qe();Z();tt();nt=()=>{},rt=100;$t=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},jt=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let i=o._cached,s=i===void 0?[Ne]:[Ne,[b,i]];o._status==="dirty"&&s.push(H),ue(e,s,o._config.tierOf)},Ie=new de({onMessage:$t,onSubscribe:jt});Xe(Ie);je(Ie);le=class t{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,r){this._config=r.config??Ie,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??Me;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?Ce(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(ot);let i={};for(let[a,u]of Object.entries(r.meta??{})){let d={initial:u,name:`${r.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};r.guard!=null&&(d.guard=r.guard),i[a]=new t([],void 0,d)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let s=this;this._actions={emit(a){s._emit([[b,a]])},down(a){s._emit(ce(a))},up(a){s._emitUp(ce(a))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let o=n?.hash??this._hashFn;o!==this._hashFn&&(this._hashFn=o);let i=this._cached===void 0?void 0:this._cached,s=this._versioning,a=s?.id??n?.id,u=s?.version??0,d=Ce(e,i,{id:a,hash:o});d.version=u,this._versioning=d,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=ae(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!n&&!r)return;let o=ae(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,i))throw new $({actor:o,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(o,i))throw new $({actor:o,action:i,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:se()}}down(e,n){let r=ce(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[b,e]])}up(e,n){if(this._deps.length===0)return;let r=ce(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,o)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let r of e){let o=n(r[0]);if(o===3||o===4)throw new Error(`Node "${this.name}": tier-${o} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let u=ae(n);if(!this._guard(u,"observe"))throw new $({actor:u,action:"observe",nodeName:this.name})}let o=this._isTerminal&&this._resubscribable;if(o){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)Re(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let s=this._isTerminal;if(this._sinkCount===1&&!s)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let r=0;r<e;r++){let o=r,i=this._deps[r];i.unsub=nt,i.unsub=i.node.subscribe(s=>{if(i.unsub===null)return;let a=this._config.tierOf,u=!1;for(let d of s)a(d[0])>=3&&(u=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:o},this._actions);u&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let i=this._deps[o];if(i.unsub!=null){let s=i.unsub;i.unsub=null;try{s()}catch{}Re(i)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let o=0;o<this._deps.length;o++)if(this._deps[o].node===e)return o;let n=this._deps.length,r=ot(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ke),r.unsub=nt;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let i=this._config.tierOf,s=!1;for(let a of o)i(a[0])>=3&&(s=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:n},this._actions);s&&this._maybeRunFnOnSettlement()})}catch(o){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,o}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[p,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(o){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",o)]])}}for(let r of this._deps){if(r.unsub!=null){let o=r.unsub;r.unsub=null;try{o()}catch{}}Re(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let r=this._deps[e],o=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:n};for(let s of this._inspectorHooks)s(i)}if(o!==J){if(o===v){this._depDirtied(r);return}if(o===R){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(We);return}if(o===D||o===X){this._emit([n]);return}if(o===S){this._emit(Ee);return}if(o===b)this._depSettledAsData(r,n[1]);else if(o===w)this._depSettledAsResolved(r);else if(o===g)this._depSettledAsTerminal(r,!0);else if(o===p)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===b||o===w)&&this._emit([n]),(o===g||o===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ke))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Ue),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit($e)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]]);return}}else if(e!=null&&typeof e=="object"){let s=e.beforeRun;if(typeof s=="function"){e.beforeRun=void 0;try{s()}catch(a){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let n=this._deps.map(s=>s.involvedThisWave?s.dataBatch.length>0?[...s.dataBatch]:[]:void 0),r=this._deps.map(s=>s.prevData);for(let s=0;s<this._deps.length;s++){let a=n[s];a!=null&&a.length>0&&(this._deps[s].prevData=a[a.length-1])}let o=this._deps.map(s=>s.terminal),i={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let s={kind:"run",batchData:n,prevData:r};for(let a of this._inspectorHooks)a(s)}this._isExecutingFn=!0;try{let s=this._fn(n,this._actions,i);if(typeof s=="function")this._cleanup=s;else if(s!=null&&typeof s=="object"){let a=s;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=s)}}catch(s){this._emit([[p,this._wrapFnError("fn threw",s)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>rt?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${rt} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[H,e[0]]:e;let r=!0,o=!1,i=!1,s=-1;for(let u of e){let d=n(u[0]);d<s&&(r=!1),d===3&&(o=!0),u[0]===v&&(i=!0),s=d}let a=e;if(!r){let u=e.map((d,c)=>({m:d,i:c,tier:n(d[0])}));u.sort((d,c)=>d.tier-c.tier||d.i-c.i),a=u.map(d=>d.m)}if(o&&!i&&this._status!=="dirty"){let u=0;for(;u<a.length&&n(a[u][0])===0;)u++;return u===0?[H,...a]:[...a.slice(0,u),H,...a.slice(u)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let u=e[a];if(u[0]===p&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(u=>u[0]===S||u[0]===R);if(a.length===0)return;n=a}n=this._frameBatch(n);let o=null;for(let a=0;a<n.length;a++){let u=n[a],d=u[0];if(d!==D&&d!==X){o?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${d===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let c=!0;if(this._pausable!==!1){let l=u[1];if(d===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(l),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(l))c=!1;else if(this._pauseLocks.delete(l),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let f=this._pauseBuffer;this._pauseBuffer=[],this._emit(f)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}c?o?.push(u):o==null&&(o=n.slice(0,a))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(a=>a[0]===S))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(Ee)}catch{}let{finalMessages:i,equalsError:s}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,u=[];for(let d of i)a(d[0])===3?this._pauseBuffer.push(d):u.push(d);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(i);s!=null&&this._emit([[p,s]])}_updateState(e){let n=this._config.tierOf,r,o,i=-1,s=0;for(let c of e)n(c[0])===3&&s++;let a=s<=1,u=-1;if(this._versioning!=null&&s>1){for(let c=e.length-1;c>=0;c--)if(e[c][0]===b){u=c;break}}for(let c=0;c<e.length;c++){let l=e[c],f=l[0];if(f===b){if(l.length>=2){let y=!1;if(a&&this._cached!==void 0)try{y=this._equals(this._cached,l[1])}catch(T){o=this._wrapFnError("equals threw",T),i=c;break}if(y){r==null&&(r=e.slice(0,c)),r.push(xe),this._status="resolved";continue}this._cached=l[1],this._versioning!=null&&(u<0||c===u)&&et(this._versioning,l[1],this._hashFn)}this._status="settled",r?.push(l)}else if(r?.push(l),f===v)this._status="dirty";else if(f===w)this._status="resolved";else if(f===g)this._status="completed";else if(f===p)this._status="errored";else if(f===R){this._cached=void 0,this._status="dirty";let y=this._cleanup;if(typeof y=="function"){this._cleanup=void 0;try{y()}catch{}}else if(y!=null&&typeof y=="object"){let T=y.invalidate;if(typeof T=="function")try{T()}catch{}}}else f===S&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=i>=0?r??e.slice(0,i):r??e;return o!=null?{finalMessages:d,equalsError:o}:{finalMessages:d}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let r of n)r(e)};_dispatchOrAccumulate(e){if(Ke()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Je(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}ue(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);ue(this._deliverToSinks,n,this._config.tierOf)}},st=t=>Array.isArray(t),De=t=>typeof t=="object"&&t!=null&&!Array.isArray(t)});function it(t,e){return M([],{...e,initial:t})}function N(t,e){return M((r,o,i)=>t(o,i)??void 0,{describeKind:"producer",...e})}var Fe=E(()=>{"use strict";fe()});function te(t,e,n){let r=new Set;for(let o of t.split(",")){let[i,s]=o.split("/"),a=s?Number.parseInt(s,10):1;if(Number.isNaN(a)||a<1)throw new Error(`Invalid cron step: ${o}`);let u,d;if(i==="*")u=e,d=n;else if(i.includes("-")){let[c,l]=i.split("-");u=Number.parseInt(c,10),d=Number.parseInt(l,10)}else u=Number.parseInt(i,10),d=u;if(Number.isNaN(u)||Number.isNaN(d))throw new Error(`Invalid cron field: ${t}`);if(u<e||d>n)throw new Error(`Cron field out of range: ${t} (${e}-${n})`);if(u>d)throw new Error(`Invalid cron range: ${u}-${d} in ${t}`);for(let c=u;c<=d;c+=a)r.add(c)}return r}function at(t){let e=t.trim().split(/\s+/);if(e.length!==5)throw new Error(`Invalid cron: expected 5 fields, got ${e.length}`);return{minutes:te(e[0],0,59),hours:te(e[1],0,23),daysOfMonth:te(e[2],1,31),months:te(e[3],1,12),daysOfWeek:te(e[4],0,6)}}function ut(t,e){return t.minutes.has(e.getMinutes())&&t.hours.has(e.getHours())&&t.daysOfMonth.has(e.getDate())&&t.months.has(e.getMonth()+1)&&t.daysOfWeek.has(e.getDay())}var dt=E(()=>{"use strict"});var mt={};Te(mt,{NS_PER_MS:()=>P,NS_PER_SEC:()=>j,constant:()=>ct,decorrelatedJitter:()=>ht,exponential:()=>ft,fibonacci:()=>pt,linear:()=>lt,resolveBackoffPreset:()=>pe,withMaxAttempts:()=>Yt});function L(t){return t<0?0:t}function zt(t,e){return e==="none"?t:e==="full"?Math.random()*t:t/2+Math.random()*(t/2)}function qt(t,e){return t+Math.random()*(e-t)}function ct(t){let e=L(t);return()=>e}function lt(t,e){let n=L(t),r=e===void 0?n:L(e);return o=>n+r*Math.max(0,o)}function ft(t){let e=L(t?.baseNs??1e8),n=t?.factor!==void 0&&t.factor<1?1:t?.factor??2,r=L(t?.maxDelayNs??30*1e9),o=t?.jitter??"none";return i=>{let s;if(e===0)s=0;else if(n===1)s=e;else{let a=r/e,u=1;for(let d=0;d<Math.max(0,i);d++){if(u>=a){u=a;break}u*=n}s=e*u,s>r&&(s=r)}return zt(s,o)}}function pt(t=100*1e6,e=30*1e9){let n=L(t),r=L(e);function o(i){if(i<=0)return 1;let s=1,a=2;for(let u=1;u<i;u++){let d=s+a;s=a,a=d}return a}return i=>{let s=o(i)*n;return s<=r?s:r}}function ht(t=100*1e6,e=30*1e9){return(n,r,o)=>{let s=Math.min(e,(o??t)*3);return qt(t,s)}}function Yt(t,e){return(n,r,o)=>n>=e?null:t(n,r,o)}function pe(t){if(t==="constant")return ct(1*1e9);if(t==="linear")return lt(1*1e9);if(t==="exponential")return ft();if(t==="fibonacci")return pt();if(t==="decorrelatedJitter")return ht();throw new Error(`Unknown backoff preset: "${String(t)}". Use one of: constant, linear, exponential, fibonacci, decorrelatedJitter`)}var P,j,Le=E(()=>{"use strict";P=1e6,j=1e9});var B,bt=E(()=>{"use strict";B=class{_timer;_gen=0;start(e,n){this.cancel(),this._gen+=1;let r=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,r===this._gen&&n()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});var yt={};Te(yt,{CircuitOpenError:()=>he,RateLimiterOverflowError:()=>me,TimeoutError:()=>be,circuitBreaker:()=>Zt,fallback:()=>sn,rateLimiter:()=>en,retry:()=>Jt,retrySource:()=>Xt,timeout:()=>an,tokenBucket:()=>_t,withBreaker:()=>Qt,withStatus:()=>tn});function G(t){return{describeKind:"derived",...t}}function Kt(t){return t<0?0:t}function ge(t){return t[1]}function gt(t){if(typeof t!="number"||!Number.isFinite(t))throw new TypeError("backoff strategy must return a finite number");return t<0?0:t}function Jt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let i=r===void 0?null:typeof r=="string"?pe(r):r;return N(s=>{let a=0,u=!1,d=null,c,l=new B;function f(){c?.(),c=void 0}function y(_){if(u)return;if(a>=o){f(),s.down([[p,_]]);return}let m=i===null?0:i(a,_,d);if(m==null){f(),s.down([[p,_]]);return}let h;try{h=gt(m)}catch{f(),s.down([[p,_]]);return}d=h,a+=1,f();let x=h>0?h/1e6:1;l.start(x,()=>{u||T()})}function T(){l.cancel(),f(),c=t.subscribe(_=>{if(!u)for(let m of _){let h=m[0];if(h===v)s.down([[v]]);else if(h===b)a=0,d=null,s.emit(m[1]);else if(h===w)s.down([[w]]);else if(h===g)f(),s.down([[g]]);else if(h===p){y(ge(m));return}else s.down([m])}})}return T(),()=>{u=!0,l.cancel(),f()}},{...G(),initial:t.cache})}function Xt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let i=r===void 0?null:typeof r=="string"?pe(r):r;return N(s=>{let a=0,u=!1,d=null,c,l=new B;function f(){c?.(),c=void 0}function y(_){if(u)return;if(a>=o){f(),s.down([[p,_]]);return}let m=i===null?0:i(a,_,d);if(m==null){f(),s.down([[p,_]]);return}let h;try{h=gt(m)}catch{f(),s.down([[p,_]]);return}d=h,a+=1,f();let x=h>0?h/1e6:1;l.start(x,()=>{u||T()})}function T(){l.cancel(),f();let _;try{_=t()}catch(m){y(m);return}c=_.subscribe(m=>{if(!u)for(let h of m){let x=h[0];if(x===v)s.down([[v]]);else if(x===b)a=0,d=null,s.emit(h[1]);else if(x===w)s.down([[w]]);else if(x===g)f(),s.down([[g]]);else if(x===p){y(ge(h));return}else s.down([h])}})}return T(),()=>{u=!0,l.cancel(),f()}},{...G(),initial:e?.initial})}function Zt(t){let e=Math.max(1,t?.failureThreshold??5),n=Kt(t?.cooldownNs??30*1e9),r=t?.cooldown??null,o=Math.max(1,t?.halfOpenMax??1),i=t?.now??V,s="closed",a=0,u=0,d=0,c=n,l=0;function f(){if(!r)return n;let _=r(u);return _!==null?_:n}function y(){s="open",c=f(),d=i(),l=0}return{canExecute(){return s==="closed"?!0:s==="open"?i()-d>=c?(s="half-open",l=1,!0):!1:l<o?(l++,!0):!1},recordSuccess(){s==="half-open"?(s="closed",a=0,u=0):s==="closed"&&(a=0)},recordFailure(_){if(s==="half-open"){u++,y();return}s==="closed"&&(a++,a>=e&&y())},get state(){return s},get failureCount(){return a},reset(){s="closed",a=0,u=0,l=0}}}function Qt(t,e){let n=e?.onOpen??"skip";return r=>{let o=M([],(i,s)=>{function a(){o.meta.breakerState.down([[b,t.state]])}let u=r.subscribe(d=>{for(let c of d){let l=c[0];l===v?s.down([[v]]):l===b?t.canExecute()?(a(),s.emit(c[1])):(a(),n==="error"?s.down([[p,new he]]):s.down([[w]])):l===w?s.down([[w]]):l===g?(t.recordSuccess(),a(),s.down([[g]])):l===p?(t.recordFailure(ge(c)),a(),s.down([c])):s.down([c])}});return a(),u},{...G(),meta:{breakerState:t.state},completeWhenDepsComplete:!1,initial:r.cache});return{node:o,breakerState:o.meta.breakerState}}}function _t(t,e){if(t<=0)throw new RangeError("capacity must be > 0");if(e<0)throw new RangeError("refillPerSecond must be >= 0");let n=t,r=V();function o(i){if(e>0){let s=i-r;n=Math.min(t,n+s/1e9*e)}r=i}return{available(){return o(V()),n},tryConsume(i=1){if(i<=0)return!0;let s=V();return o(s),n>=i?(n-=i,!0):!1},putBack(i=1){i<=0||(o(V()),n=Math.min(t,n+i))}}}function en(t,e){let{maxEvents:n,windowNs:r}=e;if(n<=0)throw new RangeError("maxEvents must be > 0");if(r<=0)throw new RangeError("windowNs must be > 0");let o=e.maxBuffer;if(o!==void 0&&o<1)throw new RangeError("maxBuffer must be >= 1");let i=e.onOverflow??"drop-newest",s=n*1e9/r;return N(a=>{let u=_t(n,s),d=[],c=new B,l=!1,f=1e9/s;function y(){for(;d.length>0;)if(u.tryConsume(1))a.emit(d.shift());else{c.start(Math.max(1,f/1e6),y);return}}let T=t.subscribe(_=>{for(let m of _){if(l)return;let h=m[0];if(h===v)a.down([[v]]);else if(h===b){if(o!==void 0&&d.length>=o){if(i!=="drop-newest")if(i==="drop-oldest")d.shift(),d.push(m[1]);else{l=!0,c.cancel(),d.length=0,a.down([[p,new me(o)]]);return}}else d.push(m[1]);y()}else if(h===w)a.down([[w]]);else if(h===g)l=!0,c.cancel(),d.length=0,a.down([[g]]);else if(h===p)l=!0,c.cancel(),d.length=0,a.down([m]);else if(h===S){l=!0,c.cancel(),d.length=0,a.down([m]);return}else a.down([m])}});return()=>{l=!0,c.cancel(),T()}},{...G(),initial:t.cache})}function tn(t,e){let n=e?.initialStatus??"pending",r=M([],(o,i)=>{let s=n;return r.meta.status.down([[b,n]]),r.meta.error.down([[b,null]]),t.subscribe(u=>{for(let d of u){let c=d[0];if(c===v)i.down([[v]]);else if(c===b)s==="errored"?Se(()=>{r.meta.error.down([[b,null]]),r.meta.status.down([[b,"active"]])}):r.meta.status.down([[b,"active"]]),s="active",i.emit(d[1]);else if(c===w)i.down([[w]]);else if(c===g)r.meta.status.down([[b,"completed"]]),s="completed",i.down([[g]]);else if(c===p){let l=ge(d);Se(()=>{r.meta.error.down([[b,l]]),r.meta.status.down([[b,"errored"]])}),s="errored",i.down([d])}else i.down([d])}})},{...G(),meta:{status:n,error:null},completeWhenDepsComplete:!1,resubscribable:!0,initial:t.cache});return{node:r,status:r.meta.status,error:r.meta.error}}function nn(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function rn(t){return t!=null&&typeof t.then=="function"}function on(t){return t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function"}function sn(t,e){return N(n=>{let r,o;function i(){o?.(),o=void 0,nn(e)||rn(e)||on(e)?r=Pe(e).subscribe(a=>{n.down(a)}):(n.emit(e),n.down([[g]]))}return o=t.subscribe(s=>{for(let a of s){let u=a[0];if(u===v)n.down([[v]]);else if(u===b)n.emit(a[1]);else if(u===w)n.down([[w]]);else if(u===g)n.down([[g]]);else if(u===p){i();return}else if(u===S){r?.(),n.down([a]);return}else n.down([a])}}),()=>{o?.(),r?.()}},{...G(),initial:t.cache})}function an(t,e){if(e<=0)throw new RangeError("timeoutNs must be > 0");return N(n=>{let r=!1,o=new B;function i(){let a=e/1e6;o.start(a,()=>{r||(r=!0,s(),n.down([[p,new be(e)]]))})}let s=t.subscribe(a=>{for(let u of a){if(r)return;let d=u[0];if(d===v)n.down([[v]]);else if(d===b)i(),n.emit(u[1]);else if(d===w)n.down([[w]]);else if(d===g){o.cancel(),r=!0,n.down([[g]]);return}else if(d===p){o.cancel(),r=!0,n.down([u]);return}else if(d===S){o.cancel(),r=!0,n.down([u]);return}else n.down([u])}});return i(),()=>{r=!0,o.cancel(),s()}},{...G(),initial:t.cache})}var he,me,be,wt=E(()=>{"use strict";Ae();ie();Z();fe();Fe();Le();vt();bt();he=class extends Error{name="CircuitOpenError";constructor(){super("Circuit breaker is open")}};me=class extends Error{name="RateLimiterOverflowError";constructor(e){super(`rateLimiter buffer overflow (maxBuffer=${e})`)}};be=class extends Error{name="TimeoutError";constructor(e){super(`Timed out after ${e/1e6}ms`)}}});var Mn={};Te(Mn,{awaitSettled:()=>kn,cached:()=>xn,empty:()=>gn,escapeRegexChar:()=>xt,firstValueFrom:()=>Nn,firstWhere:()=>Ge,forEach:()=>wn,fromAny:()=>Pe,fromAsyncIter:()=>kt,fromCron:()=>pn,fromEvent:()=>hn,fromIter:()=>Ve,fromPromise:()=>Nt,fromRaf:()=>fn,fromTimer:()=>ln,globToRegExp:()=>un,keepalive:()=>An,matchesAnyPattern:()=>dn,never:()=>_n,nodeSignal:()=>En,of:()=>Et,reactiveCounter:()=>On,replay:()=>He,share:()=>Tn,shareReplay:()=>Sn,throwError:()=>yn,toArray:()=>vn});module.exports=Dt(Mn);function A(t){return{describeKind:"producer",...t}}function xt(t){return/[\\^$+?.()|[\]{}]/.test(t)?`\\${t}`:t}function un(t){let e="^";for(let n=0;n<t.length;n+=1){let r=t[n];if(r==="*"){t[n+1]==="*"?(e+=".*",n+=1):e+="[^/]*";continue}e+=xt(r)}return e+="$",new RegExp(e)}function dn(t,e){for(let n of e)if(n.test(t))return!0;return!1}function cn(t,e){let n=M([t],(o,i)=>{let s=o[0];if(s==null||s.length===0){i.down([[w]]);return}for(let a of s)i.emit(a)},{describeKind:"derived",initial:t.cache}),r=n.subscribe.bind(n);return n.subscribe=(o,i)=>(e(o),r(o,i)),n}function ln(t,e){let{signal:n,period:r,...o}=e??{};return N(i=>{let s=!1,a=0,u,d,c=()=>{s=!0,u!==void 0&&clearTimeout(u),d!==void 0&&clearInterval(d),n?.removeEventListener("abort",f)},l=()=>{s||(r!=null?(i.emit(a++),d=setInterval(()=>{s||i.emit(a++)},r)):(s=!0,n?.removeEventListener("abort",f),i.emit(a++),i.down([[g]])))},f=()=>{s||(c(),i.down([[p,n.reason]]))};if(n?.aborted){f();return}return u=setTimeout(l,t),n?.addEventListener("abort",f,{once:!0}),c},A(o))}function fn(t){let{signal:e,...n}=t??{};return N(r=>{let o=!1,i,s,a=!1,u=!1,d=typeof requestAnimationFrame=="function"?requestAnimationFrame:void 0,c=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:void 0,l=typeof document<"u"?document:void 0,f=()=>{i!==void 0&&c&&c(i),s!==void 0&&clearTimeout(s),i=void 0,s=void 0},y=()=>{o=!0,f(),a&&(e?.removeEventListener("abort",T),a=!1),u&&l&&(l.removeEventListener("visibilitychange",h),u=!1)},T=()=>{o||(y(),r.down([[p,e.reason]]))},_=x=>{o||(r.emit(x),m())},m=()=>{o||(d&&(!l||l.visibilityState!=="hidden")?i=d(_):s=setTimeout(()=>_(performance.now()),16))},h=()=>{o||(f(),m())};return e?.aborted?(T(),y):(e?.addEventListener("abort",T,{once:!0}),a=e!==void 0,l&&d&&(l.addEventListener("visibilitychange",h),u=!0),m(),y)},A(n))}function pn(t,e){let n=at(t),{tickMs:r,output:o,...i}=e??{},s=r??6e4,a=o==="date";return N(u=>{let d=-1,c=()=>{let f=new Date,y=f.getFullYear()*1e8+(f.getMonth()+1)*1e6+f.getDate()*1e4+f.getHours()*100+f.getMinutes();y!==d&&ut(n,f)&&(d=y,u.emit(a?f:se()))};c();let l=setInterval(c,s);return()=>clearInterval(l)},{...A(i),name:i.name??`cron:${t}`})}function hn(t,e,n){let{capture:r,passive:o,once:i,...s}=n??{};return N(a=>{let u=c=>{a.emit(c)},d={capture:r,passive:o,once:i};return t.addEventListener(e,u,d),()=>t.removeEventListener(e,u,d)},A(s))}function Ve(t,e){return N(n=>{let r=!1;try{for(let o of t){if(r)return;n.emit(o)}r||n.down([[g]])}catch(o){r||n.down([[p,o]])}return()=>{r=!0}},A(e))}function mn(t){return t!=null&&typeof t.then=="function"}function Nt(t,e){let{signal:n,...r}=e??{};return N(o=>{let i=!1,s=()=>{i||(i=!0,o.down([[p,n.reason]]))};if(n?.aborted){s();return}return n?.addEventListener("abort",s,{once:!0}),Promise.resolve(t).then(a=>{i||(i=!0,n?.removeEventListener("abort",s),o.emit(a),o.down([[g]]))},a=>{i||(i=!0,n?.removeEventListener("abort",s),o.down([[p,a]]))}),()=>{i=!0,n?.removeEventListener("abort",s)}},A(r))}function kt(t,e){let{signal:n,...r}=e??{};return N(o=>{let i=new AbortController,s=()=>i.abort(n?.reason);n?.aborted?i.abort(n.reason):n?.addEventListener("abort",s,{once:!0});let a=n??i.signal,u=!1,d=t[Symbol.asyncIterator](),c=()=>{u||a.aborted||Promise.resolve(d.next()).then(l=>{if(!(u||a.aborted)){if(l.done){o.down([[g]]);return}o.emit(l.value),c()}},l=>{!u&&!a.aborted&&o.down([[p,l]])})};return c(),()=>{u=!0,n?.removeEventListener("abort",s),i.abort(),Promise.resolve(d.return?.()).catch(()=>{})}},A(r))}function bn(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function Pe(t,e){if(bn(t))return t;if(mn(t))return Nt(t,e);if(t!=null){let n=t;if(typeof n[Symbol.asyncIterator]=="function")return kt(t,e);if(typeof n[Symbol.iterator]=="function")return Ve(t,e)}return Et(t)}function Et(...t){return Ve(t,void 0)}function gn(t){return N(e=>{e.down([[g]])},A(t))}function _n(t){return N(()=>{},A(t))}function yn(t,e){return N(n=>{n.down([[p,t]])},A(e))}function wn(t,e,n){return M([t],(o,i)=>{let s=o[0];if(s!=null&&s.length>0)for(let a of s)e(a)},{describeKind:"effect",...n}).subscribe(()=>{})}function vn(t,e){return M([t],(n,r,o)=>{o.store.buf||(o.store.buf=[]);let i=o.store.buf,s=n[0];if(s!=null&&s.length>0)for(let a of s)i.push(a);if(o.terminalDeps[0]===!0){r.emit([...i]),r.down([[g]]);return}(s==null||s.length===0)&&r.down([[w]])},{describeKind:"derived",completeWhenDepsComplete:!1,...e})}function Tn(t,e){return N(n=>t.subscribe(r=>{n.down(r)}),{...A(e),initial:t.cache})}function He(t,e,n){if(e<1)throw new RangeError("replay expects bufferSize >= 1");let r=[],o=N(i=>t.subscribe(s=>{for(let a of s)a[0]===b&&(r.push(a[1]),r.length>e&&r.shift());i.down(s)}),{...A(n),initial:t.cache});return cn(o,i=>{for(let s of r)i([[b,s]])})}function xn(t,e){return He(t,1,e)}function Nn(t){return new Promise((e,n)=>{let r=!1,o=!1,i;i=t.subscribe(s=>{for(let a of s){if(r)return;if(a[0]===b){r=!0,e(a[1]),i?(i(),i=void 0):o=!0;return}if(a[0]===p){r=!0,n(a[1]),i?(i(),i=void 0):o=!0;return}if(a[0]===g){r=!0,n(new Error("completed without DATA")),i?(i(),i=void 0):o=!0;return}}}),o&&(i?.(),i=void 0)})}function Ge(t,e,n){return new Promise((r,o)=>{let i=!1,s=!1,a,u=n?.skipCurrent===!0;a=t.subscribe(d=>{for(let c of d){if(i)return;if(!(u&&c[0]===b)){if(c[0]===b){let l=c[1];if(e(l)){i=!0,r(l),a?(a(),a=void 0):s=!0;return}}if(c[0]===p){i=!0,o(c[1]),a?(a(),a=void 0):s=!0;return}if(c[0]===g){i=!0,o(new Error("completed without matching value")),a?(a(),a=void 0):s=!0;return}}}}),u=!1,s&&(a?.(),a=void 0)})}async function kn(t,e){let n=e?.predicate??(i=>i!=null),r=e?.skipCurrent;if(e?.timeoutMs==null||e.timeoutMs<=0)return await Ge(t,n,{skipCurrent:r});if(Be===void 0){let[i,s]=await Promise.all([Promise.resolve().then(()=>(wt(),yt)),Promise.resolve().then(()=>(Le(),mt))]);Be=i.timeout,Tt=s.NS_PER_MS}let o=Be(t,e.timeoutMs*Tt);return await Ge(o,n,{skipCurrent:r})}function En(t,e){let n=new AbortController,r=e?.reason??new Error("cancelled via nodeSignal"),o,i=!1,s=()=>{o?(o(),o=void 0):i=!0};return o=t.subscribe(a=>{if(!n.signal.aborted)for(let u of a){if(u[0]===b&&u[1]===!0){n.abort(r),s();return}if(u[0]===p){n.abort(u[1]),s();return}if(u[0]===g){s();return}}}),i&&(o?.(),o=void 0),{signal:n.signal,dispose:()=>{o&&(o(),o=void 0)}}}function An(t){return t.subscribe(()=>{})}function On(t){let e=it(0);return{node:e,increment(){let n=e.cache??0;return n>=t?!1:(e.down([[v],[b,n+1]]),!0)},get(){return e.cache??0},atCap(){return(e.cache??0)>=t}}}var Be,Tt,Sn,vt=E(()=>{ie();Z();fe();Fe();dt();Sn=He});vt();0&&(module.exports={awaitSettled,cached,empty,escapeRegexChar,firstValueFrom,firstWhere,forEach,fromAny,fromAsyncIter,fromCron,fromEvent,fromIter,fromPromise,fromRaf,fromTimer,globToRegExp,keepalive,matchesAnyPattern,never,nodeSignal,of,reactiveCounter,replay,share,shareReplay,throwError,toArray});
1
+ "use strict";var ve=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var Mt=Object.getOwnPropertyNames;var Rt=Object.prototype.hasOwnProperty;var E=(t,e)=>()=>(t&&(e=t(t=0)),e);var Te=(t,e)=>{for(var n in e)ve(t,n,{get:e[n],enumerable:!0})},Ct=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Mt(e))!Rt.call(t,o)&&o!==n&&ve(t,o,{get:()=>e[o],enumerable:!(r=Ot(e,o))||r.enumerable});return t};var Dt=t=>Ct(ve({},"__esModule",{value:!0}),t);function V(){return Math.trunc(performance.now()*1e6)}function se(){return Date.now()*1e6}var ie=E(()=>{"use strict"});var J,b,T,w,C,D,X,S,_,p,H,xe,It,Ne,Ft,Lt,ke,Ue,We,$e,Ee,Z=E(()=>{"use strict";J=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),T=Symbol.for("graphrefly/DIRTY"),w=Symbol.for("graphrefly/RESOLVED"),C=Symbol.for("graphrefly/INVALIDATE"),D=Symbol.for("graphrefly/PAUSE"),X=Symbol.for("graphrefly/RESUME"),S=Symbol.for("graphrefly/TEARDOWN"),_=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),H=Object.freeze([T]),xe=Object.freeze([w]),It=Object.freeze([C]),Ne=Object.freeze([J]),Ft=Object.freeze([_]),Lt=Object.freeze([S]),ke=Object.freeze([H]),Ue=Object.freeze([xe]),We=Object.freeze([It]),$e=Object.freeze([Ft]),Ee=Object.freeze([Lt])});function je(t){t.registerCodec(Pt)}var Pt,ze=E(()=>{"use strict";Pt={name:"json",version:1,contentType:"application/json",encode(t){let e=JSON.stringify(t);return new TextEncoder().encode(e)},decode(t,e){let n=new TextDecoder().decode(t);return JSON.parse(n)}}});function ae(t){if(t==null)return Bt;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var Bt,qe=E(()=>{"use strict";Bt={type:"system",id:""}});function Ye(){return U>0||Q}function Ke(){return U>0}function Je(t){U>0?ee.push(t):t()}function Se(t){U+=1;let e=!1;try{t()}catch(n){throw e=!0,n}finally{if(U-=1,U===0)if(e){if(!Q){let n=ee.splice(0);for(let r of n)try{r()}catch{}I.length=0,F.length=0,W.length=0}}else Gt()}}function Gt(){let t=!Q;t&&(Q=!0);let e=[],n=0;try{for(;I.length>0||F.length>0||W.length>0||t&&ee.length>0;){if(t&&ee.length>0){let i=ee.splice(0);for(let s of i)try{s()}catch(a){e.push(a)}continue}if(n+=1,n>1e3)throw I.length=0,F.length=0,W.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let o=(I.length>0?I:F.length>0?F:W).splice(0);for(let i of o)try{i()}catch(s){e.push(s)}}}finally{t&&(Q=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ue(t,e,n){if(e.length===0)return;if(e.length===1){let d=n(e[0][0]);if(d<3||!Ye()){t(e);return}(d>=5?W:d===4?F:I).push(()=>t(e));return}let r=e.length,o=r,i=r,s=r,a=0;for(;a<r&&n(e[a][0])<3;)a++;for(o=a;a<r&&n(e[a][0])===3;)a++;for(i=a;a<r&&n(e[a][0])===4;)a++;s=a;let u=Ye();if(o>0){let d=e.slice(0,o);t(d)}if(i>o){let d=e.slice(o,i);u?I.push(()=>t(d)):t(d)}if(s>i){let d=e.slice(i,s);u?F.push(()=>t(d)):t(d)}if(r>s){let d=e.slice(s,r);u?W.push(()=>t(d)):t(d)}}var U,Q,I,F,W,ee,Ae=E(()=>{"use strict";U=0,Q=!1,I=[],F=[],W=[],ee=[]});function Xe(t){t.registerMessageType(J,{tier:0,wireCrossing:!1}),t.registerMessageType(T,{tier:1,wireCrossing:!1}),t.registerMessageType(C,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(D,{tier:2,wireCrossing:!1}),t.registerMessageType(X,{tier:2,wireCrossing:!1}),t.registerMessageType(b,{tier:3,wireCrossing:!0}),t.registerMessageType(w,{tier:3,wireCrossing:!0}),t.registerMessageType(_,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(S,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var de,Ze=E(()=>{"use strict";Z();de=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});var $,Qe=E(()=>{"use strict";$=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}}});function Oe(t){if(t===void 0)return null;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError(`Cannot hash non-finite number: ${t}`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${t}. Cross-language cid parity is not guaranteed for unsafe integers.`);return t}if(typeof t=="string"||typeof t=="boolean"||t===null)return t;if(Array.isArray(t))return t.map(Oe);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=Oe(t[n]);return e}return null}function Ut(t){let e=Ht.encode(t),n=e.length,r=n*8,o=n+9+63&-64,i=new Uint8Array(o);i.set(e),i[n]=128;let s=new DataView(i.buffer);s.setUint32(o-4,r>>>0,!1),s.setUint32(o-8,Math.floor(r/4294967296)>>>0,!1);let a=1779033703,u=3144134277,d=1013904242,c=2773480762,l=1359893119,f=2600822924,g=528734635,v=1541459225,y=new Uint32Array(64),m=(x,O)=>x>>>O|x<<32-O;for(let x=0;x<o;x+=64){for(let k=0;k<16;k++)y[k]=s.getUint32(x+k*4,!1);for(let k=16;k<64;k++){let Y=y[k-15],K=y[k-2],oe=m(Y,7)^m(Y,18)^Y>>>3,we=m(K,17)^m(K,19)^K>>>10;y[k]=y[k-16]+oe+y[k-7]+we>>>0}let O=a,z=u,q=d,_e=c,R=l,ne=f,re=g,ye=v;for(let k=0;k<64;k++){let Y=m(R,6)^m(R,11)^m(R,25),K=R&ne^~R&re,oe=ye+Y+K+Vt[k]+y[k]>>>0,we=m(O,2)^m(O,13)^m(O,22),St=O&z^O&q^z&q,At=we+St>>>0;ye=re,re=ne,ne=R,R=_e+oe>>>0,_e=q,q=z,z=O,O=oe+At>>>0}a=a+O>>>0,u=u+z>>>0,d=d+q>>>0,c=c+_e>>>0,l=l+R>>>0,f=f+ne>>>0,g=g+re>>>0,v=v+ye>>>0}let h=x=>x.toString(16).padStart(8,"0");return h(a)+h(u)+h(d)+h(c)+h(l)+h(f)+h(g)+h(v)}function Me(t){let e=Oe(t??null),n=JSON.stringify(e);return Ut(n).slice(0,16)}function Wt(){let t=globalThis.crypto;if(t?.randomUUID)return t.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function Re(t,e,n){let r=n?.id??Wt();if(t===0)return{id:r,version:0};let i=(n?.hash??Me)(e);return{id:r,version:0,cid:i,prev:null}}function et(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var Vt,Ht,tt=E(()=>{"use strict";Vt=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ht=new TextEncoder});function ot(t){return{node:t,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Ce(t){t.prevData=void 0,t.dirty=!1,t.involvedThisWave=!1,t.dataBatch.length=0,t.terminal=void 0}function ce(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}function M(t,e,n){let r=st(t)?t:[],o=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return st(t)?i=(De(e)?e:n)??{}:De(t)?i=t:i=(De(e)?e:n)??{},new le(r,o,i)}var nt,rt,$t,jt,Ie,le,st,De,fe=E(()=>{"use strict";ze();qe();Ae();ie();Ze();Qe();Z();tt();nt=()=>{},rt=100;$t=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},jt=(t,e,n,r)=>{let o=t;if(o._status==="completed"||o._status==="errored")return;let i=o._cached,s=i===void 0?[Ne]:[Ne,[b,i]];o._status==="dirty"&&s.push(H),ue(e,s,o._config.tierOf)},Ie=new de({onMessage:$t,onSubscribe:jt});Xe(Ie);je(Ie);le=class t{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,r){this._config=r.config??Ie,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??Me;let o=r.versioning??this._config.defaultVersioning;this._versioningLevel=o,this._versioning=o!=null?Re(o,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(ot);let i={};for(let[a,u]of Object.entries(r.meta??{})){let d={initial:u,name:`${r.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};r.guard!=null&&(d.guard=r.guard),i[a]=new t([],void 0,d)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let s=this;this._actions={emit(a){s._emit([[b,a]])},down(a){s._emit(ce(a))},up(a){s._emitUp(ce(a))}},this.down=this.down.bind(this),this.up=this.up.bind(this)}get _isTerminal(){return this._status==="completed"||this._status==="errored"}get name(){return this._optsName}get status(){return this._status}get cache(){return this._cached===void 0?void 0:this._cached}get lastMutation(){return this._lastMutation}get v(){return this._versioning}hasGuard(){return this._guard!=null}_applyVersioning(e,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let o=n?.hash??this._hashFn;o!==this._hashFn&&(this._hashFn=o);let i=this._cached===void 0?void 0:this._cached,s=this._versioning,a=s?.id??n?.id,u=s?.version??0,d=Re(e,i,{id:a,hash:o});d.version=u,this._versioning=d,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=ae(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!n&&!r)return;let o=ae(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(o,i))throw new $({actor:o,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(o,i))throw new $({actor:o,action:i,nodeName:this.name})}this._lastMutation={actor:o,timestamp_ns:se()}}down(e,n){let r=ce(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[b,e]])}up(e,n){if(this._deps.length===0)return;let r=ce(e);if(r.length===0)return;this._checkGuard(n);let o=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,o)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let r of e){let o=n(r[0]);if(o===3||o===4)throw new Error(`Node "${this.name}": tier-${o} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let u=ae(n);if(!this._guard(u,"observe"))throw new $({actor:u,action:"observe",nodeName:this.name})}let o=this._isTerminal&&this._resubscribable;if(o){this._cached=void 0,this._status="sentinel",this._store={},this._hasCalledFnOnce=!1,this._waveHasNewData=!1,this._hasNewTerminal=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._isExecutingFn=!1,this._rerunDepth=0,this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null;for(let u of this._deps)Ce(u);if(this._partial===!1){for(let u of this._deps)if(u.prevData!==void 0||u.dataBatch.length!==0||u.terminal!==void 0||u.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let i;try{i=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:o},this._actions)}catch(u){throw this._sinkCount-=1,u}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let s=this._isTerminal;if(this._sinkCount===1&&!s)try{this._activate()}catch(u){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw u}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof i=="function"&&i(),this._sinks==null&&this._deactivate())}}_removeSink(e){if(this._sinks===e)this._sinks=null;else if(this._sinks!=null&&typeof this._sinks!="function")if(this._sinks.delete(e),this._sinks.size===1){let[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let r=0;r<e;r++){let o=r,i=this._deps[r];i.unsub=nt,i.unsub=i.node.subscribe(s=>{if(i.unsub===null)return;let a=this._config.tierOf,u=!1;for(let d of s)a(d[0])>=3&&(u=!0),this._config.onMessage(this,d,{direction:"down-in",depIndex:o},this._actions);u&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let o=0;o<n;o++){let i=this._deps[o];if(i.unsub!=null){let s=i.unsub;i.unsub=null;try{s()}catch{}Ce(i)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let o=0;o<this._deps.length;o++)if(this._deps[o].node===e)return o;let n=this._deps.length,r=ot(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ke),r.unsub=nt;try{r.unsub=e.subscribe(o=>{if(r.unsub===null)return;let i=this._config.tierOf,s=!1;for(let a of o)i(a[0])>=3&&(s=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:n},this._actions);s&&this._maybeRunFnOnSettlement()})}catch(o){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,o}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[p,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(o){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",o)]])}}for(let r of this._deps){if(r.unsub!=null){let o=r.unsub;r.unsub=null;try{o()}catch{}}Ce(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let r=this._deps[e],o=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:n};for(let s of this._inspectorHooks)s(i)}if(o!==J){if(o===T){this._depDirtied(r);return}if(o===C){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(We);return}if(o===D||o===X){this._emit([n]);return}if(o===S){this._emit(Ee);return}if(o===b)this._depSettledAsData(r,n[1]);else if(o===w)this._depSettledAsResolved(r);else if(o===_)this._depSettledAsTerminal(r,!0);else if(o===p)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(o===b||o===w)&&this._emit([n]),(o===_||o===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(ke))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(Ue),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit($e)}_execFn(){if(!this._fn||this._isTerminal&&!this._resubscribable)return;if(this._isExecutingFn){this._pendingRerun=!0;return}let e=this._cleanup;if(typeof e=="function"){this._cleanup=void 0;try{e()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]]);return}}else if(e!=null&&typeof e=="object"){let s=e.beforeRun;if(typeof s=="function"){e.beforeRun=void 0;try{s()}catch(a){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let n=this._deps.map(s=>s.involvedThisWave?s.dataBatch.length>0?[...s.dataBatch]:[]:void 0),r=this._deps.map(s=>s.prevData);for(let s=0;s<this._deps.length;s++){let a=n[s];a!=null&&a.length>0&&(this._deps[s].prevData=a[a.length-1])}let o=this._deps.map(s=>s.terminal),i={prevData:r,terminalDeps:o,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let s={kind:"run",batchData:n,prevData:r};for(let a of this._inspectorHooks)a(s)}this._isExecutingFn=!0;try{let s=this._fn(n,this._actions,i);if(typeof s=="function")this._cleanup=s;else if(s!=null&&typeof s=="object"){let a=s;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=s)}}catch(s){this._emit([[p,this._wrapFnError("fn threw",s)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>rt?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${rt} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[H,e[0]]:e;let r=!0,o=!1,i=!1,s=-1;for(let u of e){let d=n(u[0]);d<s&&(r=!1),d===3&&(o=!0),u[0]===T&&(i=!0),s=d}let a=e;if(!r){let u=e.map((d,c)=>({m:d,i:c,tier:n(d[0])}));u.sort((d,c)=>d.tier-c.tier||d.i-c.i),a=u.map(d=>d.m)}if(o&&!i&&this._status!=="dirty"){let u=0;for(;u<a.length&&n(a[u][0])===0;)u++;return u===0?[H,...a]:[...a.slice(0,u),H,...a.slice(u)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let u=e[a];if(u[0]===p&&u[1]===void 0)throw new TypeError('[ERROR, payload] requires a non-undefined payload (spec \xA71.2). Pass an Error object or domain tag instead \u2014 e.g. node.down([[ERROR, new Error("reason")]])')}let n=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(u=>u[0]===S||u[0]===C);if(a.length===0)return;n=a}n=this._frameBatch(n);let o=null;for(let a=0;a<n.length;a++){let u=n[a],d=u[0];if(d!==D&&d!==X){o?.push(u);continue}if(u.length<2)throw new Error(`Node "${this.name}": [[${d===D?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let c=!0;if(this._pausable!==!1){let l=u[1];if(d===D)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(l),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(l))c=!1;else if(this._pauseLocks.delete(l),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let f=this._pauseBuffer;this._pauseBuffer=[],this._emit(f)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}c?o?.push(u):o==null&&(o=n.slice(0,a))}if(o!=null){if(o.length===0)return;n=o}if(this._hasMeta&&n.some(a=>a[0]===S))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(Ee)}catch{}let{finalMessages:i,equalsError:s}=this._updateState(n);if(i.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,u=[];for(let d of i)a(d[0])===3?this._pauseBuffer.push(d):u.push(d);u.length>0&&this._dispatchOrAccumulate(u)}else this._dispatchOrAccumulate(i);s!=null&&this._emit([[p,s]])}_updateState(e){let n=this._config.tierOf,r,o,i=-1,s=0;for(let c of e)n(c[0])===3&&s++;let a=s<=1,u=-1;if(this._versioning!=null&&s>1){for(let c=e.length-1;c>=0;c--)if(e[c][0]===b){u=c;break}}for(let c=0;c<e.length;c++){let l=e[c],f=l[0];if(f===b){if(l.length>=2){let g=!1;if(a&&this._cached!==void 0)try{g=this._equals(this._cached,l[1])}catch(v){o=this._wrapFnError("equals threw",v),i=c;break}if(g){r==null&&(r=e.slice(0,c)),r.push(xe),this._status="resolved";continue}this._cached=l[1],this._versioning!=null&&(u<0||c===u)&&et(this._versioning,l[1],this._hashFn)}this._status="settled",r?.push(l)}else if(r?.push(l),f===T)this._status="dirty";else if(f===w)this._status="resolved";else if(f===_){this._status="completed";{let g=this._config.rigorRecorder;if(g!=null)try{g.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===p){this._status="errored";{let g=this._config.rigorRecorder;if(g!=null)try{g.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===C){if(this._cached!==void 0){let v=this._config.rigorRecorder;if(v!=null)try{v.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let g=this._cleanup;if(typeof g=="function"){this._cleanup=void 0;try{g()}catch{}}else if(g!=null&&typeof g=="object"){let v=g.invalidate;if(typeof v=="function")try{v()}catch{}}}else f===S&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let d=i>=0?r??e.slice(0,i):r??e;return o!=null?{finalMessages:d,equalsError:o}:{finalMessages:d}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let r of n)r(e)};_dispatchOrAccumulate(e){if(Ke()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Je(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}ue(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);ue(this._deliverToSinks,n,this._config.tierOf)}},st=t=>Array.isArray(t),De=t=>typeof t=="object"&&t!=null&&!Array.isArray(t)});function it(t,e){return M([],{...e,initial:t})}function N(t,e){return M((r,o,i)=>t(o,i)??void 0,{describeKind:"producer",...e})}var Fe=E(()=>{"use strict";fe()});function te(t,e,n){let r=new Set;for(let o of t.split(",")){let[i,s]=o.split("/"),a=s?Number.parseInt(s,10):1;if(Number.isNaN(a)||a<1)throw new Error(`Invalid cron step: ${o}`);let u,d;if(i==="*")u=e,d=n;else if(i.includes("-")){let[c,l]=i.split("-");u=Number.parseInt(c,10),d=Number.parseInt(l,10)}else u=Number.parseInt(i,10),d=u;if(Number.isNaN(u)||Number.isNaN(d))throw new Error(`Invalid cron field: ${t}`);if(u<e||d>n)throw new Error(`Cron field out of range: ${t} (${e}-${n})`);if(u>d)throw new Error(`Invalid cron range: ${u}-${d} in ${t}`);for(let c=u;c<=d;c+=a)r.add(c)}return r}function at(t){let e=t.trim().split(/\s+/);if(e.length!==5)throw new Error(`Invalid cron: expected 5 fields, got ${e.length}`);return{minutes:te(e[0],0,59),hours:te(e[1],0,23),daysOfMonth:te(e[2],1,31),months:te(e[3],1,12),daysOfWeek:te(e[4],0,6)}}function ut(t,e){return t.minutes.has(e.getMinutes())&&t.hours.has(e.getHours())&&t.daysOfMonth.has(e.getDate())&&t.months.has(e.getMonth()+1)&&t.daysOfWeek.has(e.getDay())}var dt=E(()=>{"use strict"});var mt={};Te(mt,{NS_PER_MS:()=>P,NS_PER_SEC:()=>j,constant:()=>ct,decorrelatedJitter:()=>ht,exponential:()=>ft,fibonacci:()=>pt,linear:()=>lt,resolveBackoffPreset:()=>pe,withMaxAttempts:()=>Yt});function L(t){return t<0?0:t}function zt(t,e){return e==="none"?t:e==="full"?Math.random()*t:t/2+Math.random()*(t/2)}function qt(t,e){return t+Math.random()*(e-t)}function ct(t){let e=L(t);return()=>e}function lt(t,e){let n=L(t),r=e===void 0?n:L(e);return o=>n+r*Math.max(0,o)}function ft(t){let e=L(t?.baseNs??1e8),n=t?.factor!==void 0&&t.factor<1?1:t?.factor??2,r=L(t?.maxDelayNs??30*1e9),o=t?.jitter??"none";return i=>{let s;if(e===0)s=0;else if(n===1)s=e;else{let a=r/e,u=1;for(let d=0;d<Math.max(0,i);d++){if(u>=a){u=a;break}u*=n}s=e*u,s>r&&(s=r)}return zt(s,o)}}function pt(t=100*1e6,e=30*1e9){let n=L(t),r=L(e);function o(i){if(i<=0)return 1;let s=1,a=2;for(let u=1;u<i;u++){let d=s+a;s=a,a=d}return a}return i=>{let s=o(i)*n;return s<=r?s:r}}function ht(t=100*1e6,e=30*1e9){return(n,r,o)=>{let s=Math.min(e,(o??t)*3);return qt(t,s)}}function Yt(t,e){return(n,r,o)=>n>=e?null:t(n,r,o)}function pe(t){if(t==="constant")return ct(1*1e9);if(t==="linear")return lt(1*1e9);if(t==="exponential")return ft();if(t==="fibonacci")return pt();if(t==="decorrelatedJitter")return ht();throw new Error(`Unknown backoff preset: "${String(t)}". Use one of: constant, linear, exponential, fibonacci, decorrelatedJitter`)}var P,j,Le=E(()=>{"use strict";P=1e6,j=1e9});var B,gt=E(()=>{"use strict";B=class{_timer;_gen=0;start(e,n){this.cancel(),this._gen+=1;let r=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,r===this._gen&&n()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});var yt={};Te(yt,{CircuitOpenError:()=>he,RateLimiterOverflowError:()=>me,TimeoutError:()=>ge,circuitBreaker:()=>Zt,fallback:()=>sn,rateLimiter:()=>en,retry:()=>Jt,retrySource:()=>Xt,timeout:()=>an,tokenBucket:()=>_t,withBreaker:()=>Qt,withStatus:()=>tn});function G(t){return{describeKind:"derived",...t}}function Kt(t){return t<0?0:t}function be(t){return t[1]}function bt(t){if(typeof t!="number"||!Number.isFinite(t))throw new TypeError("backoff strategy must return a finite number");return t<0?0:t}function Jt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let i=r===void 0?null:typeof r=="string"?pe(r):r;return N(s=>{let a=0,u=!1,d=null,c,l=new B;function f(){c?.(),c=void 0}function g(y){if(u)return;if(a>=o){f(),s.down([[p,y]]);return}let m=i===null?0:i(a,y,d);if(m==null){f(),s.down([[p,y]]);return}let h;try{h=bt(m)}catch{f(),s.down([[p,y]]);return}d=h,a+=1,f();let x=h>0?h/1e6:1;l.start(x,()=>{u||v()})}function v(){l.cancel(),f(),c=t.subscribe(y=>{if(!u)for(let m of y){let h=m[0];if(h===T)s.down([[T]]);else if(h===b)a=0,d=null,s.emit(m[1]);else if(h===w)s.down([[w]]);else if(h===_)f(),s.down([[_]]);else if(h===p){g(be(m));return}else s.down([m])}})}return v(),()=>{u=!0,l.cancel(),f()}},{...G(),initial:t.cache})}function Xt(t,e){let n=e?.count,r=e?.backoff,o=n!==void 0?n:r===void 0?0:2147483647;if(o<0)throw new RangeError("retry count must be >= 0");let i=r===void 0?null:typeof r=="string"?pe(r):r;return N(s=>{let a=0,u=!1,d=null,c,l=new B;function f(){c?.(),c=void 0}function g(y){if(u)return;if(a>=o){f(),s.down([[p,y]]);return}let m=i===null?0:i(a,y,d);if(m==null){f(),s.down([[p,y]]);return}let h;try{h=bt(m)}catch{f(),s.down([[p,y]]);return}d=h,a+=1,f();let x=h>0?h/1e6:1;l.start(x,()=>{u||v()})}function v(){l.cancel(),f();let y;try{y=t()}catch(m){g(m);return}c=y.subscribe(m=>{if(!u)for(let h of m){let x=h[0];if(x===T)s.down([[T]]);else if(x===b)a=0,d=null,s.emit(h[1]);else if(x===w)s.down([[w]]);else if(x===_)f(),s.down([[_]]);else if(x===p){g(be(h));return}else s.down([h])}})}return v(),()=>{u=!0,l.cancel(),f()}},{...G(),initial:e?.initial})}function Zt(t){let e=Math.max(1,t?.failureThreshold??5),n=Kt(t?.cooldownNs??30*1e9),r=t?.cooldown??null,o=Math.max(1,t?.halfOpenMax??1),i=t?.now??V,s="closed",a=0,u=0,d=0,c=n,l=0;function f(){if(!r)return n;let y=r(u);return y!==null?y:n}function g(){s="open",c=f(),d=i(),l=0}return{canExecute(){return s==="closed"?!0:s==="open"?i()-d>=c?(s="half-open",l=1,!0):!1:l<o?(l++,!0):!1},recordSuccess(){s==="half-open"?(s="closed",a=0,u=0):s==="closed"&&(a=0)},recordFailure(y){if(s==="half-open"){u++,g();return}s==="closed"&&(a++,a>=e&&g())},get state(){return s},get failureCount(){return a},reset(){s="closed",a=0,u=0,l=0}}}function Qt(t,e){let n=e?.onOpen??"skip";return r=>{let o=M([],(i,s)=>{function a(){o.meta.breakerState.down([[b,t.state]])}let u=r.subscribe(d=>{for(let c of d){let l=c[0];l===T?s.down([[T]]):l===b?t.canExecute()?(a(),s.emit(c[1])):(a(),n==="error"?s.down([[p,new he]]):s.down([[w]])):l===w?s.down([[w]]):l===_?(t.recordSuccess(),a(),s.down([[_]])):l===p?(t.recordFailure(be(c)),a(),s.down([c])):s.down([c])}});return a(),u},{...G(),meta:{breakerState:t.state},completeWhenDepsComplete:!1,initial:r.cache});return{node:o,breakerState:o.meta.breakerState}}}function _t(t,e){if(t<=0)throw new RangeError("capacity must be > 0");if(e<0)throw new RangeError("refillPerSecond must be >= 0");let n=t,r=V();function o(i){if(e>0){let s=i-r;n=Math.min(t,n+s/1e9*e)}r=i}return{available(){return o(V()),n},tryConsume(i=1){if(i<=0)return!0;let s=V();return o(s),n>=i?(n-=i,!0):!1},putBack(i=1){i<=0||(o(V()),n=Math.min(t,n+i))}}}function en(t,e){let{maxEvents:n,windowNs:r}=e;if(n<=0)throw new RangeError("maxEvents must be > 0");if(r<=0)throw new RangeError("windowNs must be > 0");let o=e.maxBuffer;if(o!==void 0&&o<1)throw new RangeError("maxBuffer must be >= 1");let i=e.onOverflow??"drop-newest",s=n*1e9/r;return N(a=>{let u=_t(n,s),d=[],c=new B,l=!1,f=1e9/s;function g(){for(;d.length>0;)if(u.tryConsume(1))a.emit(d.shift());else{c.start(Math.max(1,f/1e6),g);return}}let v=t.subscribe(y=>{for(let m of y){if(l)return;let h=m[0];if(h===T)a.down([[T]]);else if(h===b){if(o!==void 0&&d.length>=o){if(i!=="drop-newest")if(i==="drop-oldest")d.shift(),d.push(m[1]);else{l=!0,c.cancel(),d.length=0,a.down([[p,new me(o)]]);return}}else d.push(m[1]);g()}else if(h===w)a.down([[w]]);else if(h===_)l=!0,c.cancel(),d.length=0,a.down([[_]]);else if(h===p)l=!0,c.cancel(),d.length=0,a.down([m]);else if(h===S){l=!0,c.cancel(),d.length=0,a.down([m]);return}else a.down([m])}});return()=>{l=!0,c.cancel(),v()}},{...G(),initial:t.cache})}function tn(t,e){let n=e?.initialStatus??"pending",r=M([],(o,i)=>{let s=n;return r.meta.status.down([[b,n]]),r.meta.error.down([[b,null]]),t.subscribe(u=>{for(let d of u){let c=d[0];if(c===T)i.down([[T]]);else if(c===b)s==="errored"?Se(()=>{r.meta.error.down([[b,null]]),r.meta.status.down([[b,"active"]])}):r.meta.status.down([[b,"active"]]),s="active",i.emit(d[1]);else if(c===w)i.down([[w]]);else if(c===_)r.meta.status.down([[b,"completed"]]),s="completed",i.down([[_]]);else if(c===p){let l=be(d);Se(()=>{r.meta.error.down([[b,l]]),r.meta.status.down([[b,"errored"]])}),s="errored",i.down([d])}else i.down([d])}})},{...G(),meta:{status:n,error:null},completeWhenDepsComplete:!1,resubscribable:!0,initial:t.cache});return{node:r,status:r.meta.status,error:r.meta.error}}function nn(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function rn(t){return t!=null&&typeof t.then=="function"}function on(t){return t!=null&&typeof t=="object"&&typeof t[Symbol.asyncIterator]=="function"}function sn(t,e){return N(n=>{let r,o;function i(){o?.(),o=void 0,nn(e)||rn(e)||on(e)?r=Pe(e).subscribe(a=>{n.down(a)}):(n.emit(e),n.down([[_]]))}return o=t.subscribe(s=>{for(let a of s){let u=a[0];if(u===T)n.down([[T]]);else if(u===b)n.emit(a[1]);else if(u===w)n.down([[w]]);else if(u===_)n.down([[_]]);else if(u===p){i();return}else if(u===S){r?.(),n.down([a]);return}else n.down([a])}}),()=>{o?.(),r?.()}},{...G(),initial:t.cache})}function an(t,e){if(e<=0)throw new RangeError("timeoutNs must be > 0");return N(n=>{let r=!1,o=new B;function i(){let a=e/1e6;o.start(a,()=>{r||(r=!0,s(),n.down([[p,new ge(e)]]))})}let s=t.subscribe(a=>{for(let u of a){if(r)return;let d=u[0];if(d===T)n.down([[T]]);else if(d===b)i(),n.emit(u[1]);else if(d===w)n.down([[w]]);else if(d===_){o.cancel(),r=!0,n.down([[_]]);return}else if(d===p){o.cancel(),r=!0,n.down([u]);return}else if(d===S){o.cancel(),r=!0,n.down([u]);return}else n.down([u])}});return i(),()=>{r=!0,o.cancel(),s()}},{...G(),initial:t.cache})}var he,me,ge,wt=E(()=>{"use strict";Ae();ie();Z();fe();Fe();Le();vt();gt();he=class extends Error{name="CircuitOpenError";constructor(){super("Circuit breaker is open")}};me=class extends Error{name="RateLimiterOverflowError";constructor(e){super(`rateLimiter buffer overflow (maxBuffer=${e})`)}};ge=class extends Error{name="TimeoutError";constructor(e){super(`Timed out after ${e/1e6}ms`)}}});var Mn={};Te(Mn,{awaitSettled:()=>kn,cached:()=>xn,empty:()=>bn,escapeRegexChar:()=>xt,firstValueFrom:()=>Nn,firstWhere:()=>Ge,forEach:()=>wn,fromAny:()=>Pe,fromAsyncIter:()=>kt,fromCron:()=>pn,fromEvent:()=>hn,fromIter:()=>Ve,fromPromise:()=>Nt,fromRaf:()=>fn,fromTimer:()=>ln,globToRegExp:()=>un,keepalive:()=>An,matchesAnyPattern:()=>dn,never:()=>_n,nodeSignal:()=>En,of:()=>Et,reactiveCounter:()=>On,replay:()=>He,share:()=>Tn,shareReplay:()=>Sn,throwError:()=>yn,toArray:()=>vn});module.exports=Dt(Mn);function A(t){return{describeKind:"producer",...t}}function xt(t){return/[\\^$+?.()|[\]{}]/.test(t)?`\\${t}`:t}function un(t){let e="^";for(let n=0;n<t.length;n+=1){let r=t[n];if(r==="*"){t[n+1]==="*"?(e+=".*",n+=1):e+="[^/]*";continue}e+=xt(r)}return e+="$",new RegExp(e)}function dn(t,e){for(let n of e)if(n.test(t))return!0;return!1}function cn(t,e){let n=M([t],(o,i)=>{let s=o[0];if(s==null||s.length===0){i.down([[w]]);return}for(let a of s)i.emit(a)},{describeKind:"derived",initial:t.cache}),r=n.subscribe.bind(n);return n.subscribe=(o,i)=>(e(o),r(o,i)),n}function ln(t,e){let{signal:n,period:r,...o}=e??{};return N(i=>{let s=!1,a=0,u,d,c=()=>{s=!0,u!==void 0&&clearTimeout(u),d!==void 0&&clearInterval(d),n?.removeEventListener("abort",f)},l=()=>{s||(r!=null?(i.emit(a++),d=setInterval(()=>{s||i.emit(a++)},r)):(s=!0,n?.removeEventListener("abort",f),i.emit(a++),i.down([[_]])))},f=()=>{s||(c(),i.down([[p,n.reason]]))};if(n?.aborted){f();return}return u=setTimeout(l,t),n?.addEventListener("abort",f,{once:!0}),c},A(o))}function fn(t){let{signal:e,...n}=t??{};return N(r=>{let o=!1,i,s,a=!1,u=!1,d=typeof requestAnimationFrame=="function"?requestAnimationFrame:void 0,c=typeof cancelAnimationFrame=="function"?cancelAnimationFrame:void 0,l=typeof document<"u"?document:void 0,f=()=>{i!==void 0&&c&&c(i),s!==void 0&&clearTimeout(s),i=void 0,s=void 0},g=()=>{o=!0,f(),a&&(e?.removeEventListener("abort",v),a=!1),u&&l&&(l.removeEventListener("visibilitychange",h),u=!1)},v=()=>{o||(g(),r.down([[p,e.reason]]))},y=x=>{o||(r.emit(x),m())},m=()=>{o||(d&&(!l||l.visibilityState!=="hidden")?i=d(y):s=setTimeout(()=>y(performance.now()),16))},h=()=>{o||(f(),m())};return e?.aborted?(v(),g):(e?.addEventListener("abort",v,{once:!0}),a=e!==void 0,l&&d&&(l.addEventListener("visibilitychange",h),u=!0),m(),g)},A(n))}function pn(t,e){let n=at(t),{tickMs:r,output:o,...i}=e??{},s=r??6e4,a=o==="date";return N(u=>{let d=-1,c=()=>{let f=new Date,g=f.getFullYear()*1e8+(f.getMonth()+1)*1e6+f.getDate()*1e4+f.getHours()*100+f.getMinutes();g!==d&&ut(n,f)&&(d=g,u.emit(a?f:se()))};c();let l=setInterval(c,s);return()=>clearInterval(l)},{...A(i),name:i.name??`cron:${t}`})}function hn(t,e,n){let{capture:r,passive:o,once:i,...s}=n??{};return N(a=>{let u=c=>{a.emit(c)},d={capture:r,passive:o,once:i};return t.addEventListener(e,u,d),()=>t.removeEventListener(e,u,d)},A(s))}function Ve(t,e){return N(n=>{let r=!1;try{for(let o of t){if(r)return;n.emit(o)}r||n.down([[_]])}catch(o){r||n.down([[p,o]])}return()=>{r=!0}},A(e))}function mn(t){return t!=null&&typeof t.then=="function"}function Nt(t,e){let{signal:n,...r}=e??{};return N(o=>{let i=!1,s=()=>{i||(i=!0,o.down([[p,n.reason]]))};if(n?.aborted){s();return}return n?.addEventListener("abort",s,{once:!0}),Promise.resolve(t).then(a=>{i||(i=!0,n?.removeEventListener("abort",s),o.emit(a),o.down([[_]]))},a=>{i||(i=!0,n?.removeEventListener("abort",s),o.down([[p,a]]))}),()=>{i=!0,n?.removeEventListener("abort",s)}},A(r))}function kt(t,e){let{signal:n,...r}=e??{};return N(o=>{let i=new AbortController,s=()=>i.abort(n?.reason);n?.aborted?i.abort(n.reason):n?.addEventListener("abort",s,{once:!0});let a=n??i.signal,u=!1,d=t[Symbol.asyncIterator](),c=()=>{u||a.aborted||Promise.resolve(d.next()).then(l=>{if(!(u||a.aborted)){if(l.done){o.down([[_]]);return}o.emit(l.value),c()}},l=>{!u&&!a.aborted&&o.down([[p,l]])})};return c(),()=>{u=!0,n?.removeEventListener("abort",s),i.abort(),Promise.resolve(d.return?.()).catch(()=>{})}},A(r))}function gn(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function Pe(t,e){if(gn(t))return t;if(mn(t))return Nt(t,e);if(t!=null){let n=t;if(typeof n[Symbol.asyncIterator]=="function")return kt(t,e);if(typeof n[Symbol.iterator]=="function")return Ve(t,e)}return Et(t)}function Et(...t){return Ve(t,void 0)}function bn(t){return N(e=>{e.down([[_]])},A(t))}function _n(t){return N(()=>{},A(t))}function yn(t,e){return N(n=>{n.down([[p,t]])},A(e))}function wn(t,e,n){return M([t],(o,i)=>{let s=o[0];if(s!=null&&s.length>0)for(let a of s)e(a)},{describeKind:"effect",...n}).subscribe(()=>{})}function vn(t,e){return M([t],(n,r,o)=>{o.store.buf||(o.store.buf=[]);let i=o.store.buf,s=n[0];if(s!=null&&s.length>0)for(let a of s)i.push(a);if(o.terminalDeps[0]===!0){r.emit([...i]),r.down([[_]]);return}(s==null||s.length===0)&&r.down([[w]])},{describeKind:"derived",completeWhenDepsComplete:!1,...e})}function Tn(t,e){return N(n=>t.subscribe(r=>{n.down(r)}),{...A(e),initial:t.cache})}function He(t,e,n){if(e<1)throw new RangeError("replay expects bufferSize >= 1");let r=[],o=N(i=>t.subscribe(s=>{for(let a of s)a[0]===b&&(r.push(a[1]),r.length>e&&r.shift());i.down(s)}),{...A(n),initial:t.cache});return cn(o,i=>{for(let s of r)i([[b,s]])})}function xn(t,e){return He(t,1,e)}function Nn(t){return new Promise((e,n)=>{let r=!1,o=!1,i;i=t.subscribe(s=>{for(let a of s){if(r)return;if(a[0]===b){r=!0,e(a[1]),i?(i(),i=void 0):o=!0;return}if(a[0]===p){r=!0,n(a[1]),i?(i(),i=void 0):o=!0;return}if(a[0]===_){r=!0,n(new Error("completed without DATA")),i?(i(),i=void 0):o=!0;return}}}),o&&(i?.(),i=void 0)})}function Ge(t,e,n){return new Promise((r,o)=>{let i=!1,s=!1,a,u=n?.skipCurrent===!0;a=t.subscribe(d=>{for(let c of d){if(i)return;if(!(u&&c[0]===b)){if(c[0]===b){let l=c[1];if(e(l)){i=!0,r(l),a?(a(),a=void 0):s=!0;return}}if(c[0]===p){i=!0,o(c[1]),a?(a(),a=void 0):s=!0;return}if(c[0]===_){i=!0,o(new Error("completed without matching value")),a?(a(),a=void 0):s=!0;return}}}}),u=!1,s&&(a?.(),a=void 0)})}async function kn(t,e){let n=e?.predicate??(i=>i!=null),r=e?.skipCurrent;if(e?.timeoutMs==null||e.timeoutMs<=0)return await Ge(t,n,{skipCurrent:r});if(Be===void 0){let[i,s]=await Promise.all([Promise.resolve().then(()=>(wt(),yt)),Promise.resolve().then(()=>(Le(),mt))]);Be=i.timeout,Tt=s.NS_PER_MS}let o=Be(t,e.timeoutMs*Tt);return await Ge(o,n,{skipCurrent:r})}function En(t,e){let n=new AbortController,r=e?.reason??new Error("cancelled via nodeSignal"),o,i=!1,s=()=>{o?(o(),o=void 0):i=!0};return o=t.subscribe(a=>{if(!n.signal.aborted)for(let u of a){if(u[0]===b&&u[1]===!0){n.abort(r),s();return}if(u[0]===p){n.abort(u[1]),s();return}if(u[0]===_){s();return}}}),i&&(o?.(),o=void 0),{signal:n.signal,dispose:()=>{o&&(o(),o=void 0)}}}function An(t){return t.subscribe(()=>{})}function On(t){let e=it(0);return{node:e,increment(){let n=e.cache??0;return n>=t?!1:(e.down([[T],[b,n+1]]),!0)},get(){return e.cache??0},atCap(){return(e.cache??0)>=t}}}var Be,Tt,Sn,vt=E(()=>{ie();Z();fe();Fe();dt();Sn=He});vt();0&&(module.exports={awaitSettled,cached,empty,escapeRegexChar,firstValueFrom,firstWhere,forEach,fromAny,fromAsyncIter,fromCron,fromEvent,fromIter,fromPromise,fromRaf,fromTimer,globToRegExp,keepalive,matchesAnyPattern,never,nodeSignal,of,reactiveCounter,replay,share,shareReplay,throwError,toArray});
@@ -1,4 +1,4 @@
1
- import { N as NodeOptions, a as Node } from '../node-BVV7G1bq.cjs';
1
+ import { N as NodeOptions, a as Node } from '../node-8qx0kgYt.cjs';
2
2
 
3
3
  /**
4
4
  * Core reactive sources, sinks, and utilities (roadmap §2.3).
@@ -1,4 +1,4 @@
1
- import { N as NodeOptions, a as Node } from '../node-BVV7G1bq.js';
1
+ import { N as NodeOptions, a as Node } from '../node-8qx0kgYt.js';
2
2
 
3
3
  /**
4
4
  * Core reactive sources, sinks, and utilities (roadmap §2.3).
@@ -1 +1 @@
1
- import{A as y,B as z,C as A,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w,z as x}from"../chunk-UMH3HSP7.js";import"../chunk-7AJKUA36.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{w as awaitSettled,t as cached,m as empty,a as escapeRegexChar,u as firstValueFrom,v as firstWhere,p as forEach,k as fromAny,j as fromAsyncIter,f as fromCron,g as fromEvent,h as fromIter,i as fromPromise,e as fromRaf,d as fromTimer,b as globToRegExp,z as keepalive,c as matchesAnyPattern,n as never,x as nodeSignal,l as of,A as reactiveCounter,s as replay,r as share,y as shareReplay,o as throwError,q as toArray};
1
+ import{A as y,B as z,C as A,c as a,d as b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,v as t,w as u,x as v,y as w,z as x}from"../chunk-T7EQPKOP.js";import"../chunk-LYCLF26R.js";import"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{w as awaitSettled,t as cached,m as empty,a as escapeRegexChar,u as firstValueFrom,v as firstWhere,p as forEach,k as fromAny,j as fromAsyncIter,f as fromCron,g as fromEvent,h as fromIter,i as fromPromise,e as fromRaf,d as fromTimer,b as globToRegExp,z as keepalive,c as matchesAnyPattern,n as never,x as nodeSignal,l as of,A as reactiveCounter,s as replay,r as share,y as shareReplay,o as throwError,q as toArray};