@graphrefly/graphrefly 0.44.0 → 0.45.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 (420) hide show
  1. package/README.md +21 -17
  2. package/dist/compat/index.cjs +20 -10
  3. package/dist/compat/index.cjs.map +1 -0
  4. package/dist/compat/index.d.cts +1 -22
  5. package/dist/compat/index.d.ts +1 -22
  6. package/dist/compat/index.js +3 -1
  7. package/dist/compat/index.js.map +1 -0
  8. package/dist/compat/jotai/index.cjs +21 -1
  9. package/dist/compat/jotai/index.cjs.map +1 -0
  10. package/dist/compat/jotai/index.d.cts +1 -2
  11. package/dist/compat/jotai/index.d.ts +1 -2
  12. package/dist/compat/jotai/index.js +3 -1
  13. package/dist/compat/jotai/index.js.map +1 -0
  14. package/dist/compat/nanostores/index.cjs +21 -1
  15. package/dist/compat/nanostores/index.cjs.map +1 -0
  16. package/dist/compat/nanostores/index.d.cts +1 -2
  17. package/dist/compat/nanostores/index.d.ts +1 -2
  18. package/dist/compat/nanostores/index.js +3 -1
  19. package/dist/compat/nanostores/index.js.map +1 -0
  20. package/dist/compat/nestjs/index.cjs +20 -10
  21. package/dist/compat/nestjs/index.cjs.map +1 -0
  22. package/dist/compat/nestjs/index.d.cts +1 -13
  23. package/dist/compat/nestjs/index.d.ts +1 -13
  24. package/dist/compat/nestjs/index.js +3 -1
  25. package/dist/compat/nestjs/index.js.map +1 -0
  26. package/dist/compat/react/index.cjs +21 -1
  27. package/dist/compat/react/index.cjs.map +1 -0
  28. package/dist/compat/react/index.d.cts +1 -2
  29. package/dist/compat/react/index.d.ts +1 -2
  30. package/dist/compat/react/index.js +3 -1
  31. package/dist/compat/react/index.js.map +1 -0
  32. package/dist/compat/solid/index.cjs +21 -1
  33. package/dist/compat/solid/index.cjs.map +1 -0
  34. package/dist/compat/solid/index.d.cts +1 -2
  35. package/dist/compat/solid/index.d.ts +1 -2
  36. package/dist/compat/solid/index.js +3 -1
  37. package/dist/compat/solid/index.js.map +1 -0
  38. package/dist/compat/svelte/index.cjs +21 -1
  39. package/dist/compat/svelte/index.cjs.map +1 -0
  40. package/dist/compat/svelte/index.d.cts +1 -2
  41. package/dist/compat/svelte/index.d.ts +1 -2
  42. package/dist/compat/svelte/index.js +3 -1
  43. package/dist/compat/svelte/index.js.map +1 -0
  44. package/dist/compat/vue/index.cjs +21 -1
  45. package/dist/compat/vue/index.cjs.map +1 -0
  46. package/dist/compat/vue/index.d.cts +1 -3
  47. package/dist/compat/vue/index.d.ts +1 -3
  48. package/dist/compat/vue/index.js +3 -1
  49. package/dist/compat/vue/index.js.map +1 -0
  50. package/dist/compat/zustand/index.cjs +21 -3
  51. package/dist/compat/zustand/index.cjs.map +1 -0
  52. package/dist/compat/zustand/index.d.cts +1 -6
  53. package/dist/compat/zustand/index.d.ts +1 -6
  54. package/dist/compat/zustand/index.js +3 -1
  55. package/dist/compat/zustand/index.js.map +1 -0
  56. package/dist/core/index.cjs +21 -1
  57. package/dist/core/index.cjs.map +1 -0
  58. package/dist/core/index.d.cts +1 -3
  59. package/dist/core/index.d.ts +1 -3
  60. package/dist/core/index.js +3 -1
  61. package/dist/core/index.js.map +1 -0
  62. package/dist/extra/browser.cjs +21 -1
  63. package/dist/extra/browser.cjs.map +1 -0
  64. package/dist/extra/browser.d.cts +1 -4
  65. package/dist/extra/browser.d.ts +1 -4
  66. package/dist/extra/browser.js +3 -1
  67. package/dist/extra/browser.js.map +1 -0
  68. package/dist/extra/index.cjs +20 -19
  69. package/dist/extra/index.cjs.map +1 -0
  70. package/dist/extra/index.d.cts +1 -17
  71. package/dist/extra/index.d.ts +1 -17
  72. package/dist/extra/index.js +3 -1
  73. package/dist/extra/index.js.map +1 -0
  74. package/dist/extra/node.cjs +21 -2
  75. package/dist/extra/node.cjs.map +1 -0
  76. package/dist/extra/node.d.cts +1 -187
  77. package/dist/extra/node.d.ts +1 -187
  78. package/dist/extra/node.js +3 -2
  79. package/dist/extra/node.js.map +1 -0
  80. package/dist/extra/operators.cjs +21 -1
  81. package/dist/extra/operators.cjs.map +1 -0
  82. package/dist/extra/operators.d.cts +1 -958
  83. package/dist/extra/operators.d.ts +1 -958
  84. package/dist/extra/operators.js +3 -1
  85. package/dist/extra/operators.js.map +1 -0
  86. package/dist/extra/reactive.cjs +21 -1
  87. package/dist/extra/reactive.cjs.map +1 -0
  88. package/dist/extra/reactive.d.cts +1 -353
  89. package/dist/extra/reactive.d.ts +1 -353
  90. package/dist/extra/reactive.js +3 -1
  91. package/dist/extra/reactive.js.map +1 -0
  92. package/dist/extra/render/index.cjs +21 -5
  93. package/dist/extra/render/index.cjs.map +1 -0
  94. package/dist/extra/render/index.d.cts +1 -183
  95. package/dist/extra/render/index.d.ts +1 -183
  96. package/dist/extra/render/index.js +3 -1
  97. package/dist/extra/render/index.js.map +1 -0
  98. package/dist/extra/sources.cjs +21 -3
  99. package/dist/extra/sources.cjs.map +1 -0
  100. package/dist/extra/sources.d.cts +1 -584
  101. package/dist/extra/sources.d.ts +1 -584
  102. package/dist/extra/sources.js +3 -1
  103. package/dist/extra/sources.js.map +1 -0
  104. package/dist/extra/storage-browser.cjs +21 -1
  105. package/dist/extra/storage-browser.cjs.map +1 -0
  106. package/dist/extra/storage-browser.d.cts +1 -37
  107. package/dist/extra/storage-browser.d.ts +1 -37
  108. package/dist/extra/storage-browser.js +3 -1
  109. package/dist/extra/storage-browser.js.map +1 -0
  110. package/dist/extra/storage-core.cjs +21 -1
  111. package/dist/extra/storage-core.cjs.map +1 -0
  112. package/dist/extra/storage-core.d.cts +1 -28
  113. package/dist/extra/storage-core.d.ts +1 -28
  114. package/dist/extra/storage-core.js +3 -1
  115. package/dist/extra/storage-core.js.map +1 -0
  116. package/dist/extra/storage-node.cjs +20 -0
  117. package/dist/extra/storage-node.cjs.map +1 -0
  118. package/dist/extra/storage-node.d.cts +1 -2
  119. package/dist/extra/storage-node.d.ts +1 -2
  120. package/dist/extra/storage-node.js +3 -0
  121. package/dist/extra/storage-node.js.map +1 -0
  122. package/dist/extra/storage-tiers-browser.cjs +21 -1
  123. package/dist/extra/storage-tiers-browser.cjs.map +1 -0
  124. package/dist/extra/storage-tiers-browser.d.cts +1 -120
  125. package/dist/extra/storage-tiers-browser.d.ts +1 -120
  126. package/dist/extra/storage-tiers-browser.js +3 -1
  127. package/dist/extra/storage-tiers-browser.js.map +1 -0
  128. package/dist/extra/storage-tiers-node.cjs +21 -1
  129. package/dist/extra/storage-tiers-node.cjs.map +1 -0
  130. package/dist/extra/storage-tiers-node.d.cts +1 -210
  131. package/dist/extra/storage-tiers-node.d.ts +1 -210
  132. package/dist/extra/storage-tiers-node.js +3 -1
  133. package/dist/extra/storage-tiers-node.js.map +1 -0
  134. package/dist/extra/storage-tiers.cjs +21 -1
  135. package/dist/extra/storage-tiers.cjs.map +1 -0
  136. package/dist/extra/storage-tiers.d.cts +1 -412
  137. package/dist/extra/storage-tiers.d.ts +1 -412
  138. package/dist/extra/storage-tiers.js +3 -1
  139. package/dist/extra/storage-tiers.js.map +1 -0
  140. package/dist/extra/storage-wal.cjs +21 -0
  141. package/dist/extra/storage-wal.cjs.map +1 -0
  142. package/dist/extra/storage-wal.d.cts +1 -0
  143. package/dist/extra/storage-wal.d.ts +1 -0
  144. package/dist/extra/storage-wal.js +3 -0
  145. package/dist/extra/storage-wal.js.map +1 -0
  146. package/dist/graph/index.cjs +21 -7
  147. package/dist/graph/index.cjs.map +1 -0
  148. package/dist/graph/index.d.cts +1 -7
  149. package/dist/graph/index.d.ts +1 -7
  150. package/dist/graph/index.js +3 -1
  151. package/dist/graph/index.js.map +1 -0
  152. package/dist/index.cjs +20 -227
  153. package/dist/index.cjs.map +1 -0
  154. package/dist/index.d.cts +45 -95
  155. package/dist/index.d.ts +45 -95
  156. package/dist/index.js +3 -1
  157. package/dist/index.js.map +1 -0
  158. package/dist/patterns/ai/browser.cjs +20 -7
  159. package/dist/patterns/ai/browser.cjs.map +1 -0
  160. package/dist/patterns/ai/browser.d.cts +1 -127
  161. package/dist/patterns/ai/browser.d.ts +1 -127
  162. package/dist/patterns/ai/browser.js +3 -3
  163. package/dist/patterns/ai/browser.js.map +1 -0
  164. package/dist/patterns/ai/index.cjs +20 -73
  165. package/dist/patterns/ai/index.cjs.map +1 -0
  166. package/dist/patterns/ai/index.d.cts +1 -20
  167. package/dist/patterns/ai/index.d.ts +1 -20
  168. package/dist/patterns/ai/index.js +3 -1
  169. package/dist/patterns/ai/index.js.map +1 -0
  170. package/dist/patterns/ai/node.cjs +21 -1
  171. package/dist/patterns/ai/node.cjs.map +1 -0
  172. package/dist/patterns/ai/node.d.cts +1 -59
  173. package/dist/patterns/ai/node.d.ts +1 -59
  174. package/dist/patterns/ai/node.js +3 -1
  175. package/dist/patterns/ai/node.js.map +1 -0
  176. package/dist/patterns/cqrs/index.cjs +21 -3
  177. package/dist/patterns/cqrs/index.cjs.map +1 -0
  178. package/dist/patterns/cqrs/index.d.cts +1 -8
  179. package/dist/patterns/cqrs/index.d.ts +1 -8
  180. package/dist/patterns/cqrs/index.js +3 -1
  181. package/dist/patterns/cqrs/index.js.map +1 -0
  182. package/dist/patterns/demo-shell/index.cjs +21 -5
  183. package/dist/patterns/demo-shell/index.cjs.map +1 -0
  184. package/dist/patterns/demo-shell/index.d.cts +1 -7
  185. package/dist/patterns/demo-shell/index.d.ts +1 -7
  186. package/dist/patterns/demo-shell/index.js +3 -1
  187. package/dist/patterns/demo-shell/index.js.map +1 -0
  188. package/dist/patterns/domain-templates/index.cjs +21 -3
  189. package/dist/patterns/domain-templates/index.cjs.map +1 -0
  190. package/dist/patterns/domain-templates/index.d.cts +1 -6
  191. package/dist/patterns/domain-templates/index.d.ts +1 -6
  192. package/dist/patterns/domain-templates/index.js +3 -1
  193. package/dist/patterns/domain-templates/index.js.map +1 -0
  194. package/dist/patterns/graphspec/index.cjs +21 -86
  195. package/dist/patterns/graphspec/index.cjs.map +1 -0
  196. package/dist/patterns/graphspec/index.d.cts +1 -8
  197. package/dist/patterns/graphspec/index.d.ts +1 -8
  198. package/dist/patterns/graphspec/index.js +3 -1
  199. package/dist/patterns/graphspec/index.js.map +1 -0
  200. package/dist/patterns/harness/index.cjs +21 -48
  201. package/dist/patterns/harness/index.cjs.map +1 -0
  202. package/dist/patterns/harness/index.d.cts +1 -13
  203. package/dist/patterns/harness/index.d.ts +1 -13
  204. package/dist/patterns/harness/index.js +3 -1
  205. package/dist/patterns/harness/index.js.map +1 -0
  206. package/dist/patterns/inspect/index.cjs +21 -3
  207. package/dist/patterns/inspect/index.cjs.map +1 -0
  208. package/dist/patterns/inspect/index.d.cts +1 -9
  209. package/dist/patterns/inspect/index.d.ts +1 -9
  210. package/dist/patterns/inspect/index.js +3 -1
  211. package/dist/patterns/inspect/index.js.map +1 -0
  212. package/dist/patterns/job-queue/index.cjs +21 -3
  213. package/dist/patterns/job-queue/index.cjs.map +1 -0
  214. package/dist/patterns/job-queue/index.d.cts +1 -9
  215. package/dist/patterns/job-queue/index.d.ts +1 -9
  216. package/dist/patterns/job-queue/index.js +3 -1
  217. package/dist/patterns/job-queue/index.js.map +1 -0
  218. package/dist/patterns/memory/index.cjs +21 -3
  219. package/dist/patterns/memory/index.cjs.map +1 -0
  220. package/dist/patterns/memory/index.d.cts +1 -8
  221. package/dist/patterns/memory/index.d.ts +1 -8
  222. package/dist/patterns/memory/index.js +3 -1
  223. package/dist/patterns/memory/index.js.map +1 -0
  224. package/dist/patterns/messaging/index.cjs +21 -3
  225. package/dist/patterns/messaging/index.cjs.map +1 -0
  226. package/dist/patterns/messaging/index.d.cts +1 -7
  227. package/dist/patterns/messaging/index.d.ts +1 -7
  228. package/dist/patterns/messaging/index.js +3 -1
  229. package/dist/patterns/messaging/index.js.map +1 -0
  230. package/dist/patterns/orchestration/index.cjs +21 -3
  231. package/dist/patterns/orchestration/index.cjs.map +1 -0
  232. package/dist/patterns/orchestration/index.d.cts +1 -8
  233. package/dist/patterns/orchestration/index.d.ts +1 -8
  234. package/dist/patterns/orchestration/index.js +3 -1
  235. package/dist/patterns/orchestration/index.js.map +1 -0
  236. package/dist/patterns/process/index.cjs +21 -3
  237. package/dist/patterns/process/index.cjs.map +1 -0
  238. package/dist/patterns/process/index.d.cts +1 -10
  239. package/dist/patterns/process/index.d.ts +1 -10
  240. package/dist/patterns/process/index.js +3 -1
  241. package/dist/patterns/process/index.js.map +1 -0
  242. package/dist/patterns/reactive-layout/index.cjs +21 -4
  243. package/dist/patterns/reactive-layout/index.cjs.map +1 -0
  244. package/dist/patterns/reactive-layout/index.d.cts +1 -7
  245. package/dist/patterns/reactive-layout/index.d.ts +1 -7
  246. package/dist/patterns/reactive-layout/index.js +3 -1
  247. package/dist/patterns/reactive-layout/index.js.map +1 -0
  248. package/dist/patterns/reduction/index.cjs +21 -3
  249. package/dist/patterns/reduction/index.cjs.map +1 -0
  250. package/dist/patterns/reduction/index.d.cts +1 -6
  251. package/dist/patterns/reduction/index.d.ts +1 -6
  252. package/dist/patterns/reduction/index.js +3 -1
  253. package/dist/patterns/reduction/index.js.map +1 -0
  254. package/dist/patterns/surface/index.cjs +21 -13
  255. package/dist/patterns/surface/index.cjs.map +1 -0
  256. package/dist/patterns/surface/index.d.cts +1 -9
  257. package/dist/patterns/surface/index.d.ts +1 -9
  258. package/dist/patterns/surface/index.js +3 -1
  259. package/dist/patterns/surface/index.js.map +1 -0
  260. package/dist/patterns/topology-view/index.cjs +21 -0
  261. package/dist/patterns/topology-view/index.cjs.map +1 -0
  262. package/dist/patterns/topology-view/index.d.cts +1 -0
  263. package/dist/patterns/topology-view/index.d.ts +1 -0
  264. package/dist/patterns/topology-view/index.js +3 -0
  265. package/dist/patterns/topology-view/index.js.map +1 -0
  266. package/dist/testing/index.cjs +21 -0
  267. package/dist/testing/index.cjs.map +1 -0
  268. package/dist/testing/index.d.cts +1 -0
  269. package/dist/testing/index.d.ts +1 -0
  270. package/dist/testing/index.js +3 -0
  271. package/dist/testing/index.js.map +1 -0
  272. package/package.json +608 -584
  273. package/dist/backoff-HPZMEZNF.js +0 -1
  274. package/dist/cascading-BglDkMdX.d.cts +0 -199
  275. package/dist/cascading-MFgxu7Yo.d.ts +0 -199
  276. package/dist/chunk-2T7U5EU6.js +0 -1
  277. package/dist/chunk-3G5U5QNE.js +0 -5
  278. package/dist/chunk-4VVTGLXJ.js +0 -1
  279. package/dist/chunk-5M4CCMMD.js +0 -45
  280. package/dist/chunk-5QDBSZBV.js +0 -1
  281. package/dist/chunk-5XJ6B66J.js +0 -1
  282. package/dist/chunk-6QZNQS5B.js +0 -1
  283. package/dist/chunk-6X7AFUJV.js +0 -9
  284. package/dist/chunk-7K6PWTDQ.js +0 -1
  285. package/dist/chunk-7LIAPXJB.js +0 -1
  286. package/dist/chunk-7WPU3UHQ.js +0 -1
  287. package/dist/chunk-A5WCQ5NO.js +0 -1
  288. package/dist/chunk-APPIWSGD.js +0 -84
  289. package/dist/chunk-BEZWM2SY.js +0 -1
  290. package/dist/chunk-C72GO4IZ.js +0 -1
  291. package/dist/chunk-CB676TKJ.js +0 -1
  292. package/dist/chunk-CE6TI2TL.js +0 -1
  293. package/dist/chunk-CE72X3WO.js +0 -1
  294. package/dist/chunk-CK2E7BTU.js +0 -1
  295. package/dist/chunk-CLVB32RD.js +0 -1
  296. package/dist/chunk-CRVT7D2P.js +0 -1
  297. package/dist/chunk-D5RFJOZ2.js +0 -1
  298. package/dist/chunk-D7GPHKFH.js +0 -1
  299. package/dist/chunk-DHRX7JX4.js +0 -2
  300. package/dist/chunk-ESMPEKEV.js +0 -1
  301. package/dist/chunk-F672GV32.js +0 -1
  302. package/dist/chunk-FZMYDOWV.js +0 -1
  303. package/dist/chunk-GHBWHMRZ.js +0 -1
  304. package/dist/chunk-GLERH466.js +0 -1
  305. package/dist/chunk-GPW2V3RE.js +0 -1
  306. package/dist/chunk-HIDYF36O.js +0 -1
  307. package/dist/chunk-HITNVN6B.js +0 -3
  308. package/dist/chunk-HY4DJBA7.js +0 -5
  309. package/dist/chunk-KZIEYVXN.js +0 -1
  310. package/dist/chunk-L6NSJVJZ.js +0 -1
  311. package/dist/chunk-N4MQX6JU.js +0 -18
  312. package/dist/chunk-N7FHEL4D.js +0 -1
  313. package/dist/chunk-NTEURFZH.js +0 -1
  314. package/dist/chunk-OIVP6KFV.js +0 -1
  315. package/dist/chunk-OPHBU3LG.js +0 -1
  316. package/dist/chunk-OYQOZP2F.js +0 -5
  317. package/dist/chunk-PTZK576G.js +0 -1
  318. package/dist/chunk-QYADASLV.js +0 -1
  319. package/dist/chunk-ST7UXLWR.js +0 -1
  320. package/dist/chunk-SVY7VUYU.js +0 -1
  321. package/dist/chunk-TK3NWWD4.js +0 -1
  322. package/dist/chunk-TSOYJ743.js +0 -1
  323. package/dist/chunk-UNGSTR4X.js +0 -61
  324. package/dist/chunk-VIMF6LGM.js +0 -1
  325. package/dist/chunk-VJLMUKOI.js +0 -1
  326. package/dist/chunk-VN6RDSK2.js +0 -1
  327. package/dist/chunk-VV4N5P64.js +0 -1
  328. package/dist/chunk-W3I423PS.js +0 -1
  329. package/dist/chunk-WJR24TAG.js +0 -1
  330. package/dist/chunk-XTGKMHSW.js +0 -1
  331. package/dist/chunk-YBB7ZGTY.js +0 -1
  332. package/dist/chunk-Z4NPUARF.js +0 -1
  333. package/dist/chunk-ZGNQRPDT.js +0 -1
  334. package/dist/chunk-ZKPSFFKU.js +0 -1
  335. package/dist/chunk-ZLV5SQSX.js +0 -1
  336. package/dist/content-addressed-storage-4-ST1tYk.d.cts +0 -124
  337. package/dist/content-addressed-storage-DuYMjV7o.d.ts +0 -124
  338. package/dist/decay-BvOWTZ00.d.ts +0 -112
  339. package/dist/decay-CFlLvXUT.d.cts +0 -112
  340. package/dist/fallback-74oxi34l.d.cts +0 -250
  341. package/dist/fallback-DUyyBTBK.d.ts +0 -250
  342. package/dist/graph-CWvEUQAq.d.cts +0 -1861
  343. package/dist/graph-D9LFnda9.d.ts +0 -1861
  344. package/dist/index-5k1T6jl0.d.cts +0 -121
  345. package/dist/index-9770hRuQ.d.cts +0 -779
  346. package/dist/index-B-_tFaqV.d.cts +0 -468
  347. package/dist/index-B17QddL1.d.cts +0 -374
  348. package/dist/index-B1F8Enjf.d.ts +0 -704
  349. package/dist/index-B5S8ULbU.d.ts +0 -515
  350. package/dist/index-B8YnZpIR.d.ts +0 -102
  351. package/dist/index-BHskSB8v.d.ts +0 -3413
  352. package/dist/index-BIYAkbAi.d.cts +0 -26
  353. package/dist/index-BQSKmbuG.d.cts +0 -127
  354. package/dist/index-BaQaY_IQ.d.cts +0 -231
  355. package/dist/index-BmZXHqkE.d.ts +0 -36
  356. package/dist/index-BoJ5JHxI.d.ts +0 -557
  357. package/dist/index-BocU7pqs.d.ts +0 -779
  358. package/dist/index-BrPrLl4e.d.cts +0 -86
  359. package/dist/index-BxNs2HB9.d.cts +0 -1858
  360. package/dist/index-Byu-OpX_.d.ts +0 -113
  361. package/dist/index-C1T3d7V-.d.cts +0 -704
  362. package/dist/index-C5ri2Axc.d.cts +0 -301
  363. package/dist/index-C5stwKcw.d.cts +0 -44
  364. package/dist/index-C9l6OEBL.d.ts +0 -26
  365. package/dist/index-CBBLl_rc.d.ts +0 -127
  366. package/dist/index-CBGUK09R.d.ts +0 -754
  367. package/dist/index-CC-AvFTy.d.cts +0 -557
  368. package/dist/index-CJF1URuX.d.ts +0 -121
  369. package/dist/index-CK29LV56.d.cts +0 -34
  370. package/dist/index-CMh5Rz1y.d.ts +0 -385
  371. package/dist/index-CPQlGA29.d.ts +0 -34
  372. package/dist/index-CR8QpwX8.d.ts +0 -2680
  373. package/dist/index-CS0LTlB8.d.cts +0 -385
  374. package/dist/index-CSOmP7xT.d.cts +0 -291
  375. package/dist/index-CYq8vAyV.d.ts +0 -291
  376. package/dist/index-CZ3r5Rxp.d.ts +0 -374
  377. package/dist/index-CasX6Pfq.d.cts +0 -358
  378. package/dist/index-CdAlHFEt.d.ts +0 -44
  379. package/dist/index-CdTelp1M.d.ts +0 -202
  380. package/dist/index-CeFiHtAg.d.ts +0 -468
  381. package/dist/index-Cj3WohTd.d.cts +0 -202
  382. package/dist/index-Climxqsu.d.cts +0 -754
  383. package/dist/index-Co7uli2l.d.cts +0 -3413
  384. package/dist/index-CviRnE4K.d.ts +0 -45
  385. package/dist/index-Cwv0KWcU.d.cts +0 -102
  386. package/dist/index-CzLVrjxn.d.ts +0 -231
  387. package/dist/index-D0aciIex.d.cts +0 -209
  388. package/dist/index-DHen9Klo.d.ts +0 -1858
  389. package/dist/index-DV_1YuVk.d.cts +0 -221
  390. package/dist/index-Dc4AYqrJ.d.cts +0 -515
  391. package/dist/index-Dgl1HpPn.d.ts +0 -86
  392. package/dist/index-DisjX8a-.d.ts +0 -221
  393. package/dist/index-UPSiS-X7.d.cts +0 -2680
  394. package/dist/index-Yq60JP3s.d.ts +0 -209
  395. package/dist/index-ZVQhLa2i.d.cts +0 -37
  396. package/dist/index-_6ODbuOu.d.cts +0 -45
  397. package/dist/index-hcDJ8PSI.d.cts +0 -36
  398. package/dist/index-nozs3fFC.d.ts +0 -301
  399. package/dist/index-p09KSrTN.d.ts +0 -358
  400. package/dist/index-sqkqlb1p.d.ts +0 -37
  401. package/dist/index-tRCxuAXF.d.cts +0 -113
  402. package/dist/node-kK3CvTrR.d.cts +0 -1347
  403. package/dist/node-kK3CvTrR.d.ts +0 -1347
  404. package/dist/observable-DWjNfLvC.d.ts +0 -36
  405. package/dist/observable-e3eiPPFy.d.cts +0 -36
  406. package/dist/pipeline-graph-CIKhynsF.d.cts +0 -142
  407. package/dist/pipeline-graph-Sgj0gCwn.d.ts +0 -142
  408. package/dist/reactive-layout-DOTs9P3X.d.ts +0 -183
  409. package/dist/reactive-layout-DgctbqZo.d.cts +0 -183
  410. package/dist/reactive-log-BKALbfal.d.ts +0 -223
  411. package/dist/reactive-log-DIGdYqQ6.d.cts +0 -223
  412. package/dist/reactive-map-CEFGp8TK.d.cts +0 -296
  413. package/dist/reactive-map-DS_SIAxv.d.ts +0 -296
  414. package/dist/resilience-6LYQJAC5.js +0 -1
  415. package/dist/sugar-DQjFmVqb.d.cts +0 -399
  416. package/dist/sugar-fhLIE7TT.d.ts +0 -399
  417. package/dist/topology-tree-Bcz27hpF.d.cts +0 -25
  418. package/dist/topology-tree-xvaD0fOX.d.ts +0 -25
  419. package/dist/types-C0_yquda.d.cts +0 -442
  420. package/dist/types-CWFysE9E.d.ts +0 -442
@@ -1 +1,21 @@
1
- "use strict";var i=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var E=Object.getOwnPropertyNames;var O=Object.prototype.hasOwnProperty;var x=(e,s)=>{for(var o in s)i(e,o,{get:s[o],enumerable:!0})},A=(e,s,o,r)=>{if(s&&typeof s=="object"||typeof s=="function")for(let t of E(s))!O.call(e,t)&&t!==o&&i(e,t,{get:()=>s[t],enumerable:!(r=S(s,t))||r.enumerable});return e};var h=e=>A(i({},"__esModule",{value:!0}),e);var v={};x(v,{useStore:()=>z,useSubscribe:()=>d,useSubscribeRecord:()=>V});module.exports=h(v);var n=require("solid-js");var m=Symbol.for("graphrefly/START"),u=Symbol.for("graphrefly/DATA"),b=Symbol.for("graphrefly/DIRTY"),g=Symbol.for("graphrefly/RESOLVED"),D=Symbol.for("graphrefly/INVALIDATE");var L=Symbol.for("graphrefly/TEARDOWN"),N=Symbol.for("graphrefly/COMPLETE");var _=Object.freeze([b]),j=Object.freeze([g]),I=Object.freeze([D]),P=Object.freeze([m]),C=Object.freeze([N]),w=Object.freeze([L]),Y=Object.freeze([_]),k=Object.freeze([j]),G=Object.freeze([I]),B=Object.freeze([C]),H=Object.freeze([w]);function d(e){let[s,o]=(0,n.createSignal)(e.cache,{equals:!1}),r=e.subscribe(()=>{o(()=>e.cache)});return(0,n.getOwner)()?(0,n.onCleanup)(()=>r()):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribe called outside a Solid reactive owner \u2014 subscription will not be auto-disposed."),s}function z(e){return[d(e),r=>{e.down([[b],[u,r]])}]}function V(e,s){let[o,r]=(0,n.createSignal)({},{equals:!1}),t=[],R=()=>{for(let a of t)a();t=[]},y=()=>{let a={};for(let c of e.cache??[]){let f=s(c),l={};for(let p of Object.keys(f))l[p]=f[p].cache;a[c]=l}return a},T=a=>{R();for(let c of a){let f=s(c);for(let l of Object.keys(f)){let p=f[l].subscribe(()=>{r(()=>y())});t.push(p)}}r(()=>y())},M=e.subscribe(a=>{a.some(c=>c[0]===u||c[0]===g)&&T(e.cache??[])});return T(e.cache??[]),(0,n.getOwner)()?(0,n.onCleanup)(()=>{M(),R()}):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribeRecord called outside a Solid reactive owner \u2014 subscription will not be auto-disposed."),o}0&&(module.exports={useStore,useSubscribe,useSubscribeRecord});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/solid/index.ts
18
+ var solid_exports = {};
19
+ module.exports = __toCommonJS(solid_exports);
20
+ __reExport(solid_exports, require("@graphrefly/pure-ts/compat/solid"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/solid/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/solid\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,0BAAc,6CAFd;","names":[]}
@@ -1,2 +1 @@
1
- import '../../node-kK3CvTrR.cjs';
2
- export { A as Accessor, N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-hcDJ8PSI.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/solid';
@@ -1,2 +1 @@
1
- import '../../node-kK3CvTrR.js';
2
- export { A as Accessor, N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-BmZXHqkE.js';
1
+ export * from '@graphrefly/pure-ts/compat/solid';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-VIMF6LGM.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/solid/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/solid";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/solid/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/solid\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var i=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var M=Object.prototype.hasOwnProperty;var S=(e,s)=>{for(var o in s)i(e,o,{get:s[o],enumerable:!0})},x=(e,s,o,a)=>{if(s&&typeof s=="object"||typeof s=="function")for(let r of y(s))!M.call(e,r)&&r!==o&&i(e,r,{get:()=>s[r],enumerable:!(a=g(s,r))||a.enumerable});return e};var E=e=>x(i({},"__esModule",{value:!0}),e);var C={};S(C,{useStore:()=>I,useSubscribe:()=>j,useSubscribeRecord:()=>z});module.exports=E(C);var O=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),f=Symbol.for("graphrefly/DIRTY"),p=Symbol.for("graphrefly/RESOLVED"),A=Symbol.for("graphrefly/INVALIDATE");var h=Symbol.for("graphrefly/TEARDOWN"),v=Symbol.for("graphrefly/COMPLETE");var D=Object.freeze([f]),m=Object.freeze([p]),L=Object.freeze([A]),P=Object.freeze([O]),N=Object.freeze([v]),_=Object.freeze([h]),Y=Object.freeze([D]),V=Object.freeze([m]),k=Object.freeze([L]),G=Object.freeze([N]),W=Object.freeze([_]);function j(e){return{subscribe(s){let o=e.subscribe(()=>{s(e.cache)});return s(e.cache),o}}}function I(e){return{subscribe(s){let o=e.subscribe(()=>{s(e.cache)});return s(e.cache),o},set(s){e.down([[f],[b,s]])},update(s){let o=s(e.cache);e.down([[f],[b,o]])}}}function z(e,s){return{subscribe(o){let a=[],r=()=>{for(let t of a)t();a=[]},R=()=>{let t={};for(let n of e.cache??[]){let c=s(n),l={};for(let u of Object.keys(c))l[u]=c[u].cache;t[n]=l}return t},T=t=>{r();for(let n of t){let c=s(n);for(let l of Object.keys(c)){let u=c[l].subscribe(()=>{o(R())});a.push(u)}}o(R())},d=e.subscribe(t=>{t.some(n=>n[0]===b||n[0]===p)&&T(e.cache??[])});return T(e.cache??[]),()=>{d(),r()}}}}0&&(module.exports={useStore,useSubscribe,useSubscribeRecord});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/svelte/index.ts
18
+ var svelte_exports = {};
19
+ module.exports = __toCommonJS(svelte_exports);
20
+ __reExport(svelte_exports, require("@graphrefly/pure-ts/compat/svelte"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/svelte/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/svelte\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,2BAAc,8CAFd;","names":[]}
@@ -1,2 +1 @@
1
- import '../../node-kK3CvTrR.cjs';
2
- export { N as NodeFactory, S as SvelteReadable, a as SvelteWritable, u as useStore, b as useSubscribe, c as useSubscribeRecord } from '../../index-_6ODbuOu.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/svelte';
@@ -1,2 +1 @@
1
- import '../../node-kK3CvTrR.js';
2
- export { N as NodeFactory, S as SvelteReadable, a as SvelteWritable, u as useStore, b as useSubscribe, c as useSubscribeRecord } from '../../index-CviRnE4K.js';
1
+ export * from '@graphrefly/pure-ts/compat/svelte';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-6QZNQS5B.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/svelte/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/svelte";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/svelte/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/svelte\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var R=Object.defineProperty;var S=Object.getOwnPropertyDescriptor;var x=Object.getOwnPropertyNames;var E=Object.prototype.hasOwnProperty;var O=(e,o)=>{for(var r in o)R(e,r,{get:o[r],enumerable:!0})},A=(e,o,r,t)=>{if(o&&typeof o=="object"||typeof o=="function")for(let c of x(o))!E.call(e,c)&&c!==r&&R(e,c,{get:()=>o[c],enumerable:!(t=S(o,c))||t.enumerable});return e};var h=e=>A(R({},"__esModule",{value:!0}),e);var P={};O(P,{useStore:()=>z,useSubscribe:()=>C,useSubscribeRecord:()=>V});module.exports=h(P);var s=require("vue");var m=Symbol.for("graphrefly/START"),b=Symbol.for("graphrefly/DATA"),d=Symbol.for("graphrefly/DIRTY"),D=Symbol.for("graphrefly/RESOLVED"),N=Symbol.for("graphrefly/INVALIDATE");var L=Symbol.for("graphrefly/TEARDOWN"),K=Symbol.for("graphrefly/COMPLETE");var _=Object.freeze([d]),v=Object.freeze([D]),I=Object.freeze([N]),G=Object.freeze([m]),j=Object.freeze([K]),w=Object.freeze([L]),W=Object.freeze([_]),B=Object.freeze([v]),H=Object.freeze([I]),U=Object.freeze([j]),F=Object.freeze([w]);function C(e){let o=(0,s.shallowRef)(e.cache),r=e.subscribe(()=>{o.value=e.cache});return(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>r()):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribe called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.readonly)(o)}function z(e){let o=(0,s.shallowRef)(e.cache),r=e.subscribe(()=>{o.value=e.cache});return(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>r()):typeof console<"u"&&console.warn("[graphrefly-ts] useStore called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.computed)({get:()=>o.value,set:t=>{e.down([[d],[b,t]])}})}function V(e,o){let r=(0,s.shallowRef)({}),t=new Map;function c(){let n={};for(let[f,a]of t)n[f]={...a.values};r.value=n}function g(n){for(let a of t.values())for(let u of a.subs)u();t.clear();for(let a of n){let u=o(a),T=Object.keys(u),l={},y=[];for(let p of T){let i=u[p];l[p]=i.cache;let M=i.subscribe(()=>{l[p]=i.cache,c()});y.push(M)}t.set(a,{subs:y,values:l})}let f={};for(let[a,u]of t)f[a]={...u.values};r.value=f}return(0,s.watch)(()=>[...(typeof e=="function"?e():(0,s.isRef)(e)?e.value:e)??[]],n=>g(n??[]),{immediate:!0}),(0,s.getCurrentScope)()?(0,s.onScopeDispose)(()=>{for(let n of t.values())for(let f of n.subs)f();t.clear()}):typeof console<"u"&&console.warn("[graphrefly-ts] useSubscribeRecord called outside a Vue scope \u2014 subscription will not be auto-disposed."),(0,s.readonly)(r)}0&&(module.exports={useStore,useSubscribe,useSubscribeRecord});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/vue/index.ts
18
+ var vue_exports = {};
19
+ module.exports = __toCommonJS(vue_exports);
20
+ __reExport(vue_exports, require("@graphrefly/pure-ts/compat/vue"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/vue/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/vue\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,wBAAc,2CAFd;","names":[]}
@@ -1,3 +1 @@
1
- import 'vue';
2
- import '../../node-kK3CvTrR.cjs';
3
- export { N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-CK29LV56.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/vue';
@@ -1,3 +1 @@
1
- import 'vue';
2
- import '../../node-kK3CvTrR.js';
3
- export { N as NodeFactory, u as useStore, a as useSubscribe, b as useSubscribeRecord } from '../../index-CPQlGA29.js';
1
+ export * from '@graphrefly/pure-ts/compat/vue';
@@ -1 +1,3 @@
1
- import{a,b,c}from"../../chunk-GPW2V3RE.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{b as useStore,a as useSubscribe,c as useSubscribeRecord};
1
+ // src/compat/vue/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/vue";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/vue/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/vue\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1,3 +1,21 @@
1
- "use strict";var We=Object.defineProperty;var un=Object.getOwnPropertyDescriptor;var dn=Object.getOwnPropertyNames;var cn=Object.prototype.hasOwnProperty;var P=(r,e)=>()=>(r&&(e=r(r=0)),e);var ln=(r,e)=>{for(var t in e)We(r,t,{get:e[t],enumerable:!0})},fn=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of dn(e))!cn.call(r,s)&&s!==t&&We(r,s,{get:()=>e[s],enumerable:!(n=un(e,s))||n.enumerable});return r};var pn=r=>fn(We({},"__esModule",{value:!0}),r);var ie,$,W,q,K,J,Z,L,j,R,ae,qe,hn,Ke,gn,bn,Ye,yt,vt,_t,Je,ue=P(()=>{"use strict";ie=Symbol.for("graphrefly/START"),$=Symbol.for("graphrefly/DATA"),W=Symbol.for("graphrefly/DIRTY"),q=Symbol.for("graphrefly/RESOLVED"),K=Symbol.for("graphrefly/INVALIDATE"),J=Symbol.for("graphrefly/PAUSE"),Z=Symbol.for("graphrefly/RESUME"),L=Symbol.for("graphrefly/TEARDOWN"),j=Symbol.for("graphrefly/COMPLETE"),R=Symbol.for("graphrefly/ERROR"),ae=Object.freeze([W]),qe=Object.freeze([q]),hn=Object.freeze([K]),Ke=Object.freeze([ie]),gn=Object.freeze([j]),bn=Object.freeze([L]),Ye=Object.freeze([ae]),yt=Object.freeze([qe]),vt=Object.freeze([hn]),_t=Object.freeze([gn]),Je=Object.freeze([bn])});function Tt(r,e){let t=new TextEncoder().encode(r.name);if(t.length===0||t.length>255)throw new Error(`encodeEnvelope: codec name "${r.name}" encodes to ${t.length} bytes (must be 1\u2013255)`);let n=r.version;if(!Number.isInteger(n)||n<0||n>65535)throw new Error(`encodeEnvelope: codec.version ${n} out of u16 range (expected integer 0\u201365535)`);let s=2+t.length+2+e.length;if(s>4294967295)throw new Error(`encodeEnvelope: total envelope size ${s} exceeds 2^32-1 bytes (payload ${e.length} bytes)`);let o=new Uint8Array(s),i=0;return o[i++]=Xe,o[i++]=t.length,o.set(t,i),i+=t.length,o[i++]=n>>>8&255,o[i++]=n&255,o.set(e,i),o}function Ot(r,e){if(r.length<wt)throw new Error(`decodeEnvelope: bytes too short (${r.length} < ${wt})`);let t=0,n=r[t++];if(n!==Xe)throw new Error(`decodeEnvelope: unsupported envelope version ${n} (expected ${Xe})`);let s=r[t++];if(s===0)throw new Error("decodeEnvelope: name_len must be >= 1");if(t+s+2>r.length)throw new Error(`decodeEnvelope: envelope truncated (need ${t+s+2} bytes, have ${r.length})`);let o=new TextDecoder().decode(r.subarray(t,t+s));t+=s;let i=(r[t]<<8|r[t+1])>>>0;t+=2;let a=r.subarray(t),d=e.lookupCodec(o);if(d==null)throw new Error(`decodeEnvelope: codec "${o}" not registered (envelope codec_v=${i})`);return{codec:d,codecVersion:i,payload:a}}function Nt(r){r.registerCodec(mn)}var mn,Xe,wt,Ze=P(()=>{"use strict";mn={name:"json",version:1,contentType:"application/json",encode(r){let e=JSON.stringify(r);return new TextEncoder().encode(e)},decode(r,e){let t=new TextDecoder().decode(r);return JSON.parse(t)}},Xe=1,wt=4});function Ne(r){if(r==null)return de;let{type:e,id:t,...n}=r;return{type:e??"system",id:t??"",...n}}var de,Qe=P(()=>{"use strict";de={type:"system",id:""}});function xe(){return ce>0||be}function xt(){return ce>0}function fe(r){ce>0?me.push(r):r()}function et(r){ce+=1;let e=!1;try{r()}catch(t){throw e=!0,t}finally{if(ce-=1,ce===0)if(e){if(!be){let t=me.splice(0);for(let n of t)try{n()}catch{}te.length=0,ne.length=0,le.length=0}}else yn()}}function yn(){let r=!be;r&&(be=!0);let e=[],t=0;try{for(;te.length>0||ne.length>0||le.length>0||r&&me.length>0;){if(r&&me.length>0){let o=me.splice(0);for(let i of o)try{i()}catch(a){e.push(a)}continue}if(t+=1,t>1e3)throw te.length=0,ne.length=0,le.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let s=(te.length>0?te:ne.length>0?ne:le).splice(0);for(let o of s)try{o()}catch(i){e.push(i)}}}finally{r&&(be=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ke(r,e,t){if(e.length===0)return;if(e.length===1){let u=t(e[0][0]);if(u<3||!xe()){r(e);return}(u>=5?le:u===4?ne:te).push(()=>r(e));return}let n=e.length,s=n,o=n,i=n,a=0;for(;a<n&&t(e[a][0])<3;)a++;for(s=a;a<n&&t(e[a][0])===3;)a++;for(o=a;a<n&&t(e[a][0])===4;)a++;i=a;let d=xe();if(s>0){let u=e.slice(0,s);r(u)}if(o>s){let u=e.slice(s,o);d?te.push(()=>r(u)):r(u)}if(i>o){let u=e.slice(o,i);d?ne.push(()=>r(u)):r(u)}if(n>i){let u=e.slice(i,n);d?le.push(()=>r(u)):r(u)}}var ce,be,te,ne,le,me,tt=P(()=>{"use strict";ce=0,be=!1,te=[],ne=[],le=[],me=[]});function X(){return Math.trunc(performance.now()*1e6)}function Ee(){return Date.now()*1e6}var Se=P(()=>{"use strict"});function kt(r){r.registerMessageType(ie,{tier:0,wireCrossing:!1}),r.registerMessageType(W,{tier:1,wireCrossing:!1}),r.registerMessageType(K,{tier:1,wireCrossing:!1,metaPassthrough:!1}),r.registerMessageType(J,{tier:2,wireCrossing:!1}),r.registerMessageType(Z,{tier:2,wireCrossing:!1}),r.registerMessageType($,{tier:3,wireCrossing:!0}),r.registerMessageType(q,{tier:3,wireCrossing:!0}),r.registerMessageType(j,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(R,{tier:4,wireCrossing:!0,metaPassthrough:!1}),r.registerMessageType(L,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var Ae,Et=P(()=>{"use strict";ue();Ae=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=t=>{let n=this._messageTypes.get(t);return n!=null?n.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,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.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 nt(r){let e=vn.filter(t=>r({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var U,vn,Re=P(()=>{"use strict";U=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`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}},vn=["human","llm","wallet","system"]});function rt(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(rt);if(typeof r=="object"&&r!==null){let e={};for(let t of Object.keys(r).sort())e[t]=rt(r[t]);return e}return null}function Tn(r){let e=wn.encode(r),t=e.length,n=t*8,s=t+9+63&-64,o=new Uint8Array(s);o.set(e),o[t]=128;let i=new DataView(o.buffer);i.setUint32(s-4,n>>>0,!1),i.setUint32(s-8,Math.floor(n/4294967296)>>>0,!1);let a=1779033703,d=3144134277,u=1013904242,c=2773480762,h=1359893119,f=2600822924,p=528734635,l=1541459225,v=new Uint32Array(64),g=(m,b)=>m>>>b|m<<32-b;for(let m=0;m<s;m+=64){for(let O=0;O<16;O++)v[O]=i.getUint32(m+O*4,!1);for(let O=16;O<64;O++){let V=v[O-15],G=v[O-2],D=g(V,7)^g(V,18)^V>>>3,oe=g(G,17)^g(G,19)^G>>>10;v[O]=v[O-16]+D+v[O-7]+oe>>>0}let b=a,y=d,_=u,N=c,x=h,k=f,E=p,S=l;for(let O=0;O<64;O++){let V=g(x,6)^g(x,11)^g(x,25),G=x&k^~x&E,D=S+V+G+_n[O]+v[O]>>>0,oe=g(b,2)^g(b,13)^g(b,22),Ve=b&y^b&_^y&_,Te=oe+Ve>>>0;S=E,E=k,k=x,x=N+D>>>0,N=_,_=y,y=b,b=D+Te>>>0}a=a+b>>>0,d=d+y>>>0,u=u+_>>>0,c=c+N>>>0,h=h+x>>>0,f=f+k>>>0,p=p+E>>>0,l=l+S>>>0}let w=m=>m.toString(16).padStart(8,"0");return w(a)+w(d)+w(u)+w(c)+w(h)+w(f)+w(p)+w(l)}function st(r){let e=rt(r??null),t=JSON.stringify(e);return Tn(t).slice(0,16)}function On(){let r=globalThis.crypto;if(r?.randomUUID)return r.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function ot(r,e,t){let n=t?.id??On();if(r===0)return{id:n,version:0};let o=(t?.hash??st)(e);return{id:n,version:0,cid:o,prev:null}}function St(r,e,t){r.version+=1,"cid"in r&&(r.prev=r.cid,r.cid=t(e))}var _n,wn,At=P(()=>{"use strict";_n=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]),wn=new TextEncoder});function Ct(r){return{node:r,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function it(r){r.prevData=void 0,r.dirty=!1,r.involvedThisWave=!1,r.dataBatch.length=0,r.terminal=void 0}function De(r){return r.length===0?r:typeof r[0]=="symbol"?[r]:r}function ye(r,e,t){let n=Mt(r)?r:[],s=typeof r=="function"?r:typeof e=="function"?e:void 0,o={};return Mt(r)?o=(at(e)?e:t)??{}:at(r)?o=r:o=(at(e)?e:t)??{},new F(n,s,o)}var Rt,Dt,Nn,xn,pe,F,Mt,at,ve=P(()=>{"use strict";Ze();Qe();tt();Se();Et();Re();ue();At();Rt=()=>{},Dt=100;Nn=(r,e,t,n)=>{t.direction==="down-in"&&r._onDepMessage(t.depIndex,e)},xn=(r,e,t,n)=>{let s=r;if(s._status==="completed"||s._status==="errored")return;let o=s._cached,i=o===void 0?[Ke]:[Ke,[$,o]];s._status==="dirty"&&i.push(ae),ke(e,i,s._config.tierOf)},pe=new Ae({onMessage:Nn,onSubscribe:xn});kt(pe);Nt(pe);F=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,t,n){this._config=n.config??pe,this._config.onMessage,this._optsName=n.name,this._describeKind=n.describeKind,this._equals=n.equals??Object.is,this._resubscribable=n.resubscribable??!1,this._resetOnTeardown=n.resetOnTeardown??!1,this._autoComplete=n.completeWhenDepsComplete??!0,this._autoError=n.errorWhenDepsError??!0,this._pausable=n.pausable??!0,this._guard=n.guard,this._fn=t,this._partial=n.partial??!1,this._cached=n.initial!==void 0?n.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=n.versioningHash??this._config.defaultHashFn??st;let s=n.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?ot(s,this._cached===void 0?void 0:this._cached,{id:n.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ct);let o={};for(let[a,d]of Object.entries(n.meta??{})){let u={initial:d,name:`${n.name??"node"}:meta:${a}`,describeKind:"state",config:this._config};n.guard!=null&&(u.guard=n.guard),n.resubscribable===!0&&(u.resubscribable=!0),o[a]=new r([],void 0,u)}Object.freeze(o),this.meta=o,this._hasMeta=Object.keys(o).length>0;let i=this;this._actions={emit(a){i._emit([[$,a]])},down(a){i._emit(De(a))},up(a){i._emitUp(De(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,t){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 n=this._versioningLevel;if(n!=null&&e<=n)return;let s=t?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let o=this._cached===void 0?void 0:this._cached,i=this._versioning,a=i?.id??t?.id,d=i?.version??0,u=ot(e,o,{id:a,hash:s});u.version=d,this._versioning=u,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 t=Ne(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let n of this._extraGuards)if(!n(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,n=e?.actor!=null;if(!t&&!n)return;let s=Ne(e?.actor),o=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,o))throw new U({actor:s,action:o,nodeName:this.name});if(this._extraGuards!=null){for(let i of this._extraGuards)if(!i(s,o))throw new U({actor:s,action:o,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:Ee()}}down(e,t){let n=De(e);n.length!==0&&(this._checkGuard(t),this._emit(n))}emit(e,t){this._checkGuard(t),this._emit([[$,e]])}up(e,t){if(this._deps.length===0)return;let n=De(e);if(n.length===0)return;this._checkGuard(t);let s=t??{internal:!0};this._validateUpTiers(n);for(let o of this._deps)o.node.up?.(n,s)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let n of e){let s=t(n[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,t){if(t!=null&&this._guard!=null){let d=Ne(t);if(!this._guard(d,"observe"))throw new U({actor:d,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 d of this._deps)it(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.dirty)throw new Error(`resubscribable-reset invariant: DepRecord not fully reset for node ${this._optsName??"(anonymous)"}`)}}this._sinkCount+=1;let o;try{o=this._config.onSubscribe(this,e,{sinkCount:this._sinkCount,afterTerminalReset:s},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let i=this._isTerminal;if(this._sinkCount===1&&!i)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof o=="function")try{o()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let a=!1;return()=>{a||(a=!0,this._sinkCount-=1,this._removeSink(e),typeof o=="function"&&o(),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[t]=this._sinks;this._sinks=t}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,t=0;try{for(let n=0;n<e;n++){let s=n,o=this._deps[n];o.unsub=Rt,o.unsub=o.node.subscribe(i=>{if(o.unsub===null)return;let a=this._config.tierOf,d=!1;for(let u of i)a(u[0])>=3&&(d=!0),this._config.onMessage(this,u,{direction:"down-in",depIndex:s},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(n){this._deps[t].unsub=null;for(let s=0;s<t;s++){let o=this._deps[s];if(o.unsub!=null){let i=o.unsub;o.unsub=null;try{i()}catch{}it(o)}}throw this._dirtyDepCount=0,n}}_addDep(e){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===e)return s;let t=this._deps.length,n=Ct(e);if(this._deps.push(n),this._sinks==null)return t;n.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Ye),n.unsub=Rt;try{n.unsub=e.subscribe(s=>{if(n.unsub===null)return;let o=this._config.tierOf,i=!1;for(let a of s)o(a[0])>=3&&(i=!0),this._config.onMessage(this,a,{direction:"down-in",depIndex:t},this._actions);i&&this._maybeRunFnOnSettlement()})}catch(s){throw n.unsub=null,this._deps.pop(),this._dirtyDepCount--,s}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(n){this._emit([[R,this._wrapFnError("cleanup threw",n)]])}else if(t!=null&&typeof t=="object"){let n=t.deactivate;if(typeof n=="function")try{n()}catch(s){this._emit([[R,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let n of this._deps){if(n.unsub!=null){let s=n.unsub;n.unsub=null;try{s()}catch{}}it(n)}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,t){let n=this._deps[e],s=t[0];if(this._inspectorHooks!=null){let o={kind:"dep_message",depIndex:e,message:t};for(let i of this._inspectorHooks)i(o)}if(s!==ie){if(s===W){this._depDirtied(n);return}if(s===K){if(this._depInvalidated(n),this._cached===void 0)return;this._emit(vt);return}if(s===J||s===Z){this._emit([t]);return}if(s===L){this._emit(Je);return}if(s===$)this._depSettledAsData(n,t[1]);else if(s===q)this._depSettledAsResolved(n);else if(s===j)this._depSettledAsTerminal(n,!0);else if(s===R)this._depSettledAsTerminal(n,t[1]);else{this._emit([t]);return}if(!this._fn){(s===$||s===q)&&this._emit([t]),(s===j||s===R)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Ye))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,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 t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(yt),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[R,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(_t)}_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(i){this._emit([[R,this._wrapFnError("cleanup threw",i)]]);return}}else if(e!=null&&typeof e=="object"){let i=e.beforeRun;if(typeof i=="function"){e.beforeRun=void 0;try{i()}catch(a){this._emit([[R,this._wrapFnError("cleanup.beforeRun threw",a)]]);return}}}let t=this._deps.map(i=>i.involvedThisWave?i.dataBatch.length>0?[...i.dataBatch]:[]:void 0),n=this._deps.map(i=>i.prevData);for(let i=0;i<this._deps.length;i++){let a=t[i];a!=null&&a.length>0&&(this._deps[i].prevData=a[a.length-1])}let s=this._deps.map(i=>i.terminal),o={prevData:n,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let i={kind:"run",batchData:t,prevData:n};for(let a of this._inspectorHooks)a(i)}this._isExecutingFn=!0;try{let i=this._fn(t,this._actions,o);if(typeof i=="function")this._cleanup=i;else if(i!=null&&typeof i=="object"){let a=i;(typeof a.beforeRun=="function"||typeof a.deactivate=="function"||typeof a.invalidate=="function")&&(this._cleanup=i)}}catch(i){this._emit([[R,this._wrapFnError("fn threw",i)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Dt?(this._rerunDepth=0,this._emit([[R,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Dt} \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,t){let n=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${n}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[ae,e[0]]:e;let n=!0,s=!1,o=!1,i=-1;for(let d of e){let u=t(d[0]);u<i&&(n=!1),u===3&&(s=!0),d[0]===W&&(o=!0),i=u}let a=e;if(!n){let d=e.map((u,c)=>({m:u,i:c,tier:t(u[0])}));d.sort((u,c)=>u.tier-c.tier||u.i-c.i),a=d.map(u=>u.m)}if(s&&!o&&this._status!=="dirty"){let d=0;for(;d<a.length&&t(a[d][0])===0;)d++;return d===0?[ae,...a]:[...a.slice(0,d),ae,...a.slice(d)]}return a}_emit(e){if(e.length===0)return;for(let a=0;a<e.length;a++){let d=e[a];if(d[0]===R&&d[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 t=e;if(this._isTerminal&&!this._resubscribable){let a=e.filter(d=>d[0]===L||d[0]===K);if(a.length===0)return;t=a}t=this._frameBatch(t);let s=null;for(let a=0;a<t.length;a++){let d=t[a],u=d[0];if(u!==J&&u!==Z){s?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${u===J?"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 h=d[1];if(u===J)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(h),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(h))c=!1;else if(this._pauseLocks.delete(h),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?s?.push(d):s==null&&(s=t.slice(0,a))}if(s!=null){if(s.length===0)return;t=s}if(this._hasMeta&&t.some(a=>a[0]===L))for(let a of Object.keys(this.meta))try{this.meta[a]._emit(Je)}catch{}let{finalMessages:o,equalsError:i}=this._updateState(t);if(o.length>0&&this._config.inspectorEnabled){let a=this._config.globalInspector;if(a!=null)try{a({kind:"emit",node:this,messages:o})}catch{}}if(o.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let a=this._config.tierOf,d=[];for(let u of o)a(u[0])===3?this._pauseBuffer.push(u):d.push(u);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(o);i!=null&&this._emit([[R,i]])}_updateState(e){let t=this._config.tierOf,n,s,o=-1,i=0;for(let c of e)t(c[0])===3&&i++;let a=i<=1,d=-1;if(this._versioning!=null&&i>1){for(let c=e.length-1;c>=0;c--)if(e[c][0]===$){d=c;break}}for(let c=0;c<e.length;c++){let h=e[c],f=h[0];if(f===$){if(h.length>=2){let p=!1;if(a&&this._cached!==void 0)try{p=this._equals(this._cached,h[1])}catch(l){s=this._wrapFnError("equals threw",l),o=c;break}if(p){n==null&&(n=e.slice(0,c)),n.push(qe),this._status="resolved";continue}this._cached=h[1],this._versioning!=null&&(d<0||c===d)&&St(this._versioning,h[1],this._hashFn)}this._status="settled",n?.push(h)}else if(n?.push(h),f===W)this._status="dirty";else if(f===q)this._status="resolved";else if(f===j){this._status="completed";{let p=this._config.rigorRecorder;if(p!=null)try{p.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===R){this._status="errored";{let p=this._config.rigorRecorder;if(p!=null)try{p.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(f===K){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 p=this._cleanup;if(typeof p=="function"){this._cleanup=void 0;try{p()}catch{}}else if(p!=null&&typeof p=="object"){let l=p.invalidate;if(typeof l=="function")try{l()}catch{}}}else f===L&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let u=o>=0?n??e.slice(0,o):n??e;return s!=null?{finalMessages:u,equalsError:s}:{finalMessages:u}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let n of t)n(e)};_dispatchOrAccumulate(e){if(xt()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],fe(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}ke(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);ke(this._deliverToSinks,t,this._config.tierOf)}},Mt=r=>Array.isArray(r),at=r=>typeof r=="object"&&r!=null&&!Array.isArray(r)});function Q(r,e){return ye([],{...e,initial:r})}function re(r,e){return ye((n,s,o)=>r(s,o)??void 0,{describeKind:"producer",...e})}function Ce(r,e,t){return ye(r,(s,o,i)=>{let a=s.map((d,u)=>d!=null&&d.length>0?d.at(-1):i.prevData[u]);o.emit(e(a,i))},{describeKind:"derived",...t})}function Gt(r,e,t){return ye(r,(s,o,i)=>{let a=s.map((d,u)=>d!=null&&d.length>0?d.at(-1):i.prevData[u]);return e(a,o,i)??void 0},{describeKind:"effect",...t})}var Me=P(()=>{"use strict";ve()});function ut(r,e){if(e!=null&&e.length>0)return new Set(e);switch(r){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function kn(r){return r._describeKind!=null?r._describeKind:r._deps.length>0?"derived":r._fn!=null?"producer":"state"}function En(r){let e={};for(let[t,n]of Object.entries(r.meta))try{e[t]=n.cache}catch{}return e}function dt(r,e,t){let n=e==null,s=!n&&e!=null?[...e].filter(c=>c.startsWith("meta.")).map(c=>c.slice(5)):null,o=n||e.has("meta")||s!=null&&s.length>0,i="state",a=[];r instanceof F&&(i=kn(r),a=r._deps.map(c=>c.node.name??""));let d={type:i,deps:a};(n||e.has("status"))&&(d.status=r.status);let u=r instanceof F?r._guard:void 0;if(o){let c={...En(r)};if(u!=null&&c.access===void 0&&(c.access=nt(u)),s!=null&&s.length>0&&!e.has("meta")){let h={};for(let f of s)f in c&&(h[f]=c[f]);d.meta=h}else d.meta=c}if(r.name!=null&&(d.name=r.name),(n||e.has("value"))&&(!t||i==="state")){r.status==="sentinel"&&(d.sentinel=!0);try{d.value=r.cache}catch{}}if((n||e.has("v"))&&r.v!=null){let c={id:r.v.id,version:r.v.version};"cid"in r.v&&(c.cid=r.v.cid,c.prev=r.v.prev),d.v=c}return(n||e.has("guard"))&&u!=null&&(d.guard=nt(u)),(n||e.has("lastMutation"))&&r.lastMutation!=null&&(d.lastMutation=r.lastMutation),d}var Pt=P(()=>{"use strict";Re();ve()});function ct(r,e){if(Object.is(r,e))return!0;if(r==null||e==null||typeof r!="object"||typeof e!="object")return!1;if(Array.isArray(r)){if(!Array.isArray(e)||r.length!==e.length)return!1;for(let o=0;o<r.length;o++)if(!ct(r[o],e[o]))return!1;return!0}if(Array.isArray(e))return!1;let t=Object.keys(r),n=Object.keys(e);if(t.length!==n.length)return!1;let s=new Set(n);for(let o of t)if(!s.has(o)||!ct(r[o],e[o]))return!1;return!0}function $t(r,e){return`${r}\0${e}`}function lt(r,e){let t=[],n=new Set(r.subgraphs),s=new Set(e.subgraphs),o=[];for(let g of s)n.has(g)||o.push(g);o.sort();for(let g of o)t.push({type:"subgraph-mounted",path:g});let i=new Set(Object.keys(r.nodes)),a=new Set(Object.keys(e.nodes)),d=[];for(let g of a)i.has(g)||d.push(g);d.sort();for(let g of d)t.push({type:"node-added",path:g,node:{...e.nodes[g]}});let u=[];for(let g of a){if(!i.has(g))continue;let w=r.nodes[g]?.meta,m=e.nodes[g]?.meta;w==null&&m==null||ct(w??{},m??{})||u.push(g)}u.sort();for(let g of u)t.push({type:"node-meta-changed",path:g,prevMeta:r.nodes[g]?.meta??{},nextMeta:e.nodes[g]?.meta??{}});let c=new Map;for(let g of r.edges)c.set($t(g.from,g.to),g);let h=new Map;for(let g of e.edges)h.set($t(g.from,g.to),g);let f=[];for(let[g,w]of h)c.has(g)||f.push(w);f.sort((g,w)=>g.from<w.from?-1:g.from>w.from?1:g.to<w.to?-1:g.to>w.to?1:0);for(let g of f)t.push({type:"edge-added",from:g.from,to:g.to});let p=[];for(let[g,w]of c)h.has(g)||p.push(w);p.sort((g,w)=>g.from<w.from?-1:g.from>w.from?1:g.to<w.to?-1:g.to>w.to?1:0);for(let g of p)t.push({type:"edge-removed",from:g.from,to:g.to});let l=[];for(let g of i)a.has(g)||l.push(g);l.sort();for(let g of l)t.push({type:"node-removed",path:g});let v=[];for(let g of n)s.has(g)||v.push(g);v.sort();for(let g of v)t.push({type:"subgraph-unmounted",path:g});return{events:t,flushedAt_ns:X()}}var Ft=P(()=>{"use strict";Se()});function ft(r){return{describeKind:"producer",...r}}function It(r,e){return re(t=>{let n=!1;try{for(let s of r){if(n)return;t.emit(s)}n||t.down([[j]])}catch(s){n||t.down([[R,s]])}return()=>{n=!0}},ft(e))}function Sn(r){return r!=null&&typeof r.then=="function"}function An(r,e){let{signal:t,...n}=e??{};return re(s=>{let o=!1,i=()=>{o||(o=!0,s.down([[R,t.reason]]))};if(t?.aborted){i();return}return t?.addEventListener("abort",i,{once:!0}),Promise.resolve(r).then(a=>{o||(o=!0,t?.removeEventListener("abort",i),s.emit(a),s.down([[j]]))},a=>{o||(o=!0,t?.removeEventListener("abort",i),s.down([[R,a]]))}),()=>{o=!0,t?.removeEventListener("abort",i)}},ft(n))}function Rn(r,e){let{signal:t,...n}=e??{};return re(s=>{let o=new AbortController,i=()=>o.abort(t?.reason);t?.aborted?o.abort(t.reason):t?.addEventListener("abort",i,{once:!0});let a=t??o.signal,d=!1,u=r[Symbol.asyncIterator](),c=()=>{d||a.aborted||Promise.resolve(u.next()).then(h=>{if(!(d||a.aborted)){if(h.done){s.down([[j]]);return}s.emit(h.value),c()}},h=>{!d&&!a.aborted&&s.down([[R,h]])})};return c(),()=>{d=!0,t?.removeEventListener("abort",i),o.abort(),Promise.resolve(u.return?.()).catch(()=>{})}},ft(n))}function Dn(r){return r!=null&&typeof r=="object"&&"cache"in r&&typeof r.subscribe=="function"}function Lt(r,e){if(Dn(r))return r;if(Sn(r))return An(r,e);if(r!=null){let t=r;if(typeof t[Symbol.asyncIterator]=="function")return Rn(r,e);if(typeof t[Symbol.iterator]=="function")return It(r,e)}return Cn(r)}function Cn(...r){return It(r,void 0)}function Ge(r){return r.subscribe(()=>{})}var jt=P(()=>{"use strict";ue();Me()});var Vt=P(()=>{"use strict";jt()});var Pe,Ht=P(()=>{"use strict";Pe=class{_timer;_gen=0;start(e,t){this.cancel(),this._gen+=1;let n=this._gen;this._timer=setTimeout(()=>{this._timer=void 0,n===this._gen&&t()},e)}cancel(){this._timer!==void 0&&(clearTimeout(this._timer),this._timer=void 0)}get pending(){return this._timer!==void 0}}});var _e,Bt=P(()=>{"use strict";_e=class{constructor(e){this.capacity=e;if(!Number.isInteger(e)||e<=0)throw new Error(`RingBuffer capacity must be a positive integer (got ${e})`);this.buf=new Array(e)}buf;head=0;_size=0;get size(){return this._size}get maxSize(){return this.capacity}push(e){let t=(this.head+this._size)%this.capacity;this.buf[t]=e,this._size<this.capacity?this._size++:this.head=(this.head+1)%this.capacity}shift(){if(this._size===0)return;let e=this.buf[this.head];return this.buf[this.head]=void 0,this.head=(this.head+1)%this.capacity,this._size--,e}at(e){if(this._size===0)return;let t=e<0?this._size+e:e;if(!(t<0||t>=this._size))return this.buf[(this.head+t)%this.capacity]}toArray(){let e=new Array(this._size);for(let t=0;t<this._size;t++)e[t]=this.buf[(this.head+t)%this.capacity];return e}clear(){for(let e=0;e<this._size;e++)this.buf[(this.head+e)%this.capacity]=void 0;this.head=0,this._size=0}}});function zt(r,e,t,n={}){let s=e in r.nodes,o=t in r.nodes;if(!s)return $e(e,t,"no-such-from");if(!o)return $e(e,t,"no-such-to");let i=n.maxDepth;if(i!=null&&(!Number.isInteger(i)||i<0))throw new Error("explainPath: maxDepth must be an integer >= 0");if(e===t){if(n.findCycle===!0){let u=Mn(r,e,n);if(u!=null)return u}let d=Fe(e,r.nodes[e],0,n);return Ie(e,t,[d])}if(i===0)return $e(e,t,"no-path");let a=Ut(r,e,t,i);return a.found?Ie(e,t,Wt(r,a.pathOrder,n)):$e(e,t,a.truncated?"max-depth-exceeded":"no-path")}function Ut(r,e,t,n){let s=new Map,o=[{path:t,depth:0}],i=new Set([t]),a=0,d=!1;for(;a<o.length;){let h=o[a++];if(h.path===e)break;if(n!=null&&h.depth>=n){let v=r.nodes[h.path];v?.deps&&v.deps.length>0&&(d=!0);continue}let f=r.nodes[h.path];if(f==null)continue;let p=f.deps??[],l=new Map;for(let v=0;v<p.length;v++){let g=p[v];if(!g)continue;let w=l.get(g);w==null&&(w=[],l.set(g,w)),w.push(v)}for(let[v,g]of l)i.has(v)||(i.add(v),s.set(v,{from:h.path,depIndices:g}),o.push({path:v,depth:h.depth+1}))}if(!s.has(e))return{found:!1,pathOrder:[],truncated:d};let u=[{path:e}],c=e;for(;c!==t;){let h=s.get(c);if(h==null)return{found:!1,pathOrder:[],truncated:!1};u[u.length-1].depIndices=h.depIndices,u.push({path:h.from}),c=h.from}return{found:!0,pathOrder:u,truncated:!1}}function Mn(r,e,t){let n=r.nodes[e];if(n==null)return null;let s=n.deps??[],o=[];for(let a=0;a<s.length;a++)s[a]===e&&o.push(a);if(o.length>0){let a=Fe(e,n,0,t);a.dep_index=o[0];let d=Fe(e,n,1,t);return Ie(e,e,[a,d])}let i=null;for(let a=0;a<s.length;a++){let d=s[a];if(!d||d===e)continue;let u=Ut(r,d,e,t.maxDepth);u.found&&(i==null||u.pathOrder.length<i.pathOrder.length)&&(i=u,i={found:!0,pathOrder:[{path:e,depIndices:[a]},...u.pathOrder],truncated:!1})}return i==null?null:Ie(e,e,Wt(r,i.pathOrder,t))}function Wt(r,e,t){return e.map((n,s)=>{let o=r.nodes[n.path],i=Fe(n.path,o,s,t);return n.depIndices!=null&&n.depIndices.length>0&&(i.dep_index=n.depIndices[0],n.depIndices.length>1&&(i.dep_indices=[...n.depIndices])),i})}function Fe(r,e,t,n){let s={path:r,type:e.type,hop:t};e.status!==void 0&&(s.status=e.status),"value"in e&&(s.value=e.value),e.v!=null&&(s.v=e.v);let o=n.annotations?.get(r)??e.annotation;o!=null&&(s.annotation=o);let i=n.lastMutations?.get(r)??e.lastMutation;return i!=null&&(s.lastMutation=i),s}function Ie(r,e,t){return qt(r,e,!0,"ok",t)}function $e(r,e,t){return qt(r,e,!1,t,[])}function qt(r,e,t,n,s){let o=Gn(r,e,t,n,s);return{from:r,to:e,found:t,reason:n,steps:s,text:o,toJSON(){return{from:r,to:e,found:t,reason:n,steps:s}}}}function Gn(r,e,t,n,s){if(!t)switch(n){case"no-such-from":return`explainPath: no node named "${r}"`;case"no-such-to":return`explainPath: no node named "${e}"`;case"max-depth-exceeded":return`explainPath: no path from "${r}" to "${e}" within maxDepth`;default:return`explainPath: no path from "${r}" to "${e}"`}let o=[`Causal path: ${r} \u2192 ${e} (${s.length} step(s))`];for(let i of s){let d=` ${i.hop===0?"\xB7":"\u2193"} ${i.path} (${i.type}${i.status?`/${i.status}`:""})`;if(o.push(d),"value"in i&&o.push(` value: ${Pn(i.value)}`),i.annotation!=null&&o.push(` annotation: ${i.annotation}`),i.lastMutation!=null){let u=i.lastMutation.actor;o.push(` actor: ${u.type}${u.id?`:${u.id}`:""}`)}}return o.join(`
2
- `)}function Pn(r){if(r===void 0)return"<sentinel>";if(r===null)return"null";if(typeof r=="string")return JSON.stringify(r);if(typeof r=="number"||typeof r=="boolean"||typeof r=="bigint")return String(r);try{let e=JSON.stringify(r);return e.length>80?`${e.slice(0,77)}...`:e}catch{return String(r)}}var Kt=P(()=>{"use strict"});function Yt(r){let e=new WeakSet,t=new WeakSet,n=[r],s=0;for(;n.length>0;){let o=n.pop();s+=Fn(o,e,t,n)}return s}function Fn(r,e,t,n){if(r==null)return 0;switch(typeof r){case"number":return I.number;case"boolean":return I.boolean;case"string":return I.string+r.length*2;case"bigint":return I.bigint+In(r);case"symbol":return I.symbol;case"function":return e.has(r)?0:(e.add(r),I.function);case"undefined":return 0}let o=r;if(e.has(o))return 0;e.add(o);let i=o[$n];if(typeof i=="function")try{let u=i.call(o);if(typeof u=="number"&&Number.isFinite(u))return u}catch{}if(o instanceof Date)return I.date;if(o instanceof RegExp)return I.regexp+o.source.length*2;if(o instanceof Error){let u=o.message?o.message.length*2:0,c=o.stack?o.stack.length*2:0;return I.error+u+c}if(typeof URL<"u"&&o instanceof URL)return I.url+o.href.length*2;if(typeof Promise<"u"&&o instanceof Promise)return I.promise;if(o instanceof WeakMap)return I.weakmap;if(o instanceof WeakSet)return I.weakset;if(o instanceof Map){let u=I.map;for(let[c,h]of o)u+=I.mapEntry,n.push(c),n.push(h);return u}if(o instanceof Set){let u=I.set;for(let c of o)u+=I.setEntry,n.push(c);return u}if(Array.isArray(o)){let u=I.array+o.length*8;for(let c of o)n.push(c);return u}if(o instanceof ArrayBuffer)return t.has(o)?0:(t.add(o),o.byteLength);if(ArrayBuffer.isView(o)){let u=o;return t.has(u.buffer)?48:(t.add(u.buffer),u.buffer.byteLength+48)}let a=I.object,d=Object.keys(o);for(let u of d){a+=I.string+u.length*2;try{n.push(o[u])}catch{}}return a}function In(r){let e=r<0n?-r:r;if(e===0n)return 0;let t=e.toString(2).length;return Math.ceil(t/32)*8}var I,$n,Jt=P(()=>{"use strict";I={object:56,array:64,string:40,number:8,boolean:4,null:0,undefined:0,symbol:40,bigint:16,function:120,map:72,set:72,mapEntry:40,setEntry:24,date:24,regexp:48,error:64,url:80,promise:48,weakmap:40,weakset:40},$n=Symbol.for("sizeof")});function Xt(r,e){let t=e?.topN??10,n=r.describe({detail:"standard"}),s=[],o=r._collectObserveTargets;typeof o=="function"&&o.call(r,"",s);let i=new Map;for(let[f,p]of s)i.set(f,p);let a=[];for(let[f,p]of Object.entries(n.nodes)){let l=i.get(f),v=l instanceof F?l:null,g=v?Yt(v.cache):0,w=v?v._sinkCount:0,m=p.deps?.length??0,b=p.type==="effect"&&w===0,y=w===0?p.type==="effect"?"orphan-effect":p.type==="derived"?"idle-derived":p.type==="producer"?"idle-producer":null:null;a.push({path:f,type:p.type,status:p.status??"unknown",valueSizeBytes:g,subscriberCount:w,depCount:m,isOrphanEffect:b,orphanKind:y})}let d=a.reduce((f,p)=>f+p.valueSizeBytes,0),u=(f,p)=>[...a].sort(p??((l,v)=>v[f]-l[f])).slice(0,t),c=a.filter(f=>f.orphanKind!=null),h=a.filter(f=>f.isOrphanEffect);return{nodeCount:a.length,edgeCount:n.edges.length,subgraphCount:n.subgraphs.length,nodes:a,totalValueSizeBytes:d,hotspots:{byValueSize:u("valueSizeBytes"),bySubscriberCount:u("subscriberCount"),byDepCount:u("depCount")},orphans:c,orphanEffects:h}}var Zt=P(()=>{"use strict";ve();Jt()});function Le(r,e){let t=Math.max(16,r.size*4),n=0;for(;r.size>0;){if(n++>=t){console.error(`[Graph "${e}".destroy] disposer drain exceeded cap (${t}); ${r.size} disposer(s) discarded`),r.clear();return}let s=r.values().next();if(s.done)return;let o=s.value;r.delete(o);try{o()}catch(i){console.error(`[Graph "${e}".destroy] disposer threw:`,i)}}}function sn(r){return r!=null&&typeof r=="object"&&"cache"in r&&typeof r.subscribe=="function"&&typeof r.down=="function"}function Ln(r){if(r!=null)return sn(r)?r.cache:r}function se(r){return r!=null&&typeof r=="object"&&"cache"in r&&typeof r.subscribe=="function"&&typeof r.down=="function"}function ee(r){return se(r)?r.cache??"":r}function Qt(r){return se(r)?r.cache??0:r}function en(r){return se(r)?r.cache??!1:r}function jn(r){let e=[];for(let t of Object.keys(r).sort()){let n=r[t].v;n!=null&&e.push(`${t} ${n.id} ${n.version}`)}return e.join(`
3
- `)}function tn(r){if(r.version!==he)throw new Error(`unsupported snapshot version ${String(r.version)} (expected ${he})`);for(let e of["name","nodes","edges","subgraphs"])if(!(e in r))throw new Error(`snapshot missing required key "${e}"`);if(typeof r.name!="string")throw new TypeError("snapshot 'name' must be a string");if(typeof r.nodes!="object"||r.nodes===null||Array.isArray(r.nodes))throw new TypeError("snapshot 'nodes' must be an object");if(!Array.isArray(r.edges))throw new TypeError("snapshot 'edges' must be an array");if(!Array.isArray(r.subgraphs))throw new TypeError("snapshot 'subgraphs' must be an array")}function Vn(r,e){let t=new WeakMap,n=(s,o)=>{if(Object.is(s,o))return!0;if(s==null||o==null||typeof s!="object"||typeof o!="object")return!1;let i=t.get(s);if(i==null&&(i=new WeakSet,t.set(s,i)),i.has(o))return!0;i.add(o);let a=s.constructor,d=o.constructor;if(a!==d)return!1;if(s instanceof Date)return s.getTime()===o.getTime();if(s instanceof RegExp)return s.source===o.source&&s.flags===o.flags;if(Array.isArray(s)){let f=o;if(s.length!==f.length)return!1;for(let p=0;p<s.length;p++)if(!n(s[p],f[p]))return!1;return!0}if(s instanceof Map){let f=o;if(s.size!==f.size)return!1;for(let[p,l]of s)if(!f.has(p)||!n(l,f.get(p)))return!1;return!0}if(s instanceof Set){let f=o;if(s.size!==f.size)return!1;for(let p of s){let l=!1;for(let v of f)if(n(p,v)){l=!0;break}if(!l)return!1}return!0}if(ArrayBuffer.isView(s)){let f=s,p=o;if(f.length!==p.length)return!1;for(let l=0;l<f.length;l++)if(f[l]!==p[l])return!1;return!0}let u=Object.keys(s),c=Object.keys(o);if(u.length!==c.length)return!1;let h=new Set(c);for(let f of u)if(!h.has(f)||!n(s[f],o[f]))return!1;return!0};return n(r,e)}function Hn(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function je(r){let e="^";for(let t=0;t<r.length;t+=1){let n=r[t];if(n==="*"){e+=".*";continue}if(n==="?"){e+=".";continue}if(n==="["){let s=r.indexOf("]",t+1);if(s<=t+1){e+="\\[";continue}let o=r.slice(t+1,s);o.startsWith("!")&&(o=`^${o.slice(1)}`),o=o.replace(/\\/g,"\\\\"),e+=`[${o}]`,t=s;continue}e+=Hn(n)}return e+="$",new RegExp(e)}function pt(r){if(typeof r=="string")return JSON.stringify(r);if(typeof r=="number"||typeof r=="boolean"||r==null)return String(r);try{return JSON.stringify(r)}catch{return"[unserializable]"}}function Un(r){return r==="none"?zn:r==="ansi"||r==null?Bn:{data:r.data??"",dirty:r.dirty??"",resolved:r.resolved??"",invalidate:r.invalidate??"",pause:r.pause??"",resume:r.resume??"",complete:r.complete??"",error:r.error??"",teardown:r.teardown??"",derived:r.derived??"",path:r.path??"",reset:r.reset??""}}function nn(r){if(r==null)return{};let e=r.detail;return e==="full"?{...r,structured:r.structured??!0,timeline:r.timeline??!0,causal:r.causal??!0,derived:r.derived??!0}:e==="minimal"?{...r,structured:r.structured??!0}:r.format==="stage-log"?{...r,structured:r.structured??!0,timeline:r.timeline??!0}:r}function Wn(r,e,t){for(let n=0;n<r.length;n++){let s=r.charCodeAt(n);if(s<32||s===127)throw new Error(`Graph "${e}": ${t} "${r}" must not contain control character (U+${s.toString(16).padStart(4,"0").toUpperCase()} at index ${n})`)}}function ht(r,e,t){if(r==="")throw new Error(`Graph "${e}": ${t} name must be non-empty`);if(r.includes(M))throw new Error(`Graph "${e}": ${t} "${r}" must not contain '${M}' (path separator)`);if(r===Y)throw new Error(`Graph "${e}": ${t} name "${Y}" is reserved for meta companion paths`);Wn(r,e,t)}function qn(r,e){if(r==="")throw new Error(`Graph "${e}": resolve path must be non-empty`);let t=r.split(M);for(let n of t)if(n==="")throw new Error(`Graph "${e}": resolve path has empty segment`);return t}function Kn(r,e){let t=!1;for(let s of r)if(!e.isMetaPassthrough(s[0])){t=!0;break}return t?r.filter(s=>e.isMetaPassthrough(s[0])):r}function on(r){for(let e of r._mounts.values())on(e);for(let e of r._nodes.values())try{e.down([[L]],{internal:!0})}catch{}}function Yn(r,e){let t=we.diff(r,e),n={};for(let s of t.nodesAdded){let o=e.nodes[s];o!=null&&(n[s]=o)}return{...t,nodesAddedFull:n}}function rn(r,e,t,n={}){let s={paths:[],depths:new Map,truncated:!1};if(!e)return n.withDetail?s:[];if(!n.both&&t!=="upstream"&&t!=="downstream")throw new Error('reachable: direction must be "upstream" or "downstream"');let o=n.maxDepth;if(o!=null&&(!Number.isInteger(o)||o<0))throw new Error("reachable: maxDepth must be an integer >= 0");if(o===0)return n.withDetail?s:[];let i=new Map,a=new Map,d=new Map,u=new Map,c=new Set;for(let[b,y]of Object.entries(r.nodes)){if(!b)continue;c.add(b);let _=y.deps??[];i.set(b,_);for(let N of _)N&&(c.add(N),a.has(N)||a.set(N,new Set),a.get(N).add(b))}for(let b of r.edges){if(b==null||typeof b!="object")continue;let y=typeof b.from=="string"?b.from:"",_=typeof b.to=="string"?b.to:"";!y||!_||(c.add(y),c.add(_),u.has(y)||u.set(y,new Set),u.get(y).add(_),d.has(_)||d.set(_,new Set),d.get(_).add(y))}if(!c.has(e))return n.withDetail?s:[];let h=n.both===!0,f=b=>{if(h){let x=i.get(b)??[],k=d.get(b),E=a.get(b),S=u.get(b),O=[...x];return k&&O.push(...k),E&&O.push(...E),S&&O.push(...S),O}if(t==="upstream"){let x=i.get(b)??[],k=d.get(b);return k?[...x,...k]:x}let y=a.get(b),_=u.get(b),N=y?[...y]:[];return _&&N.push(..._),N},p=new Set([e]),l=new Map,v=[{path:e,depth:0}],g=0,w=!1;for(;g<v.length;){let b=v[g++];if(o!=null&&b.depth>=o){f(b.path).length>0&&(w=!0);continue}for(let y of f(b.path))!y||p.has(y)||(p.add(y),l.set(y,b.depth+1),v.push({path:y,depth:b.depth+1}))}let m=[...l.keys()].sort((b,y)=>b<y?-1:b>y?1:0);return n.withDetail?{paths:m,depths:l,truncated:w}:m}function Jn(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++){let n=r[t],s=e[t];if(n.path!==s.path||n.type!==s.type||n.status!==s.status||n.hop!==s.hop||n.dep_index!==s.dep_index||n.annotation!==s.annotation||n.value!==s.value||n.lastMutation!==s.lastMutation)return!1;let o=n.v,i=s.v;if(o!==i&&(o==null||i==null||o.id!==i.id||o.version!==i.version))return!1}return!0}var M,Y,he,Bn,zn,we,an=P(()=>{"use strict";Qe();tt();Se();Re();ue();Pt();ve();Me();Ft();Vt();Ht();Bt();Ze();Kt();Zt();M="::",Y="__meta__",he=1;Bn={data:"\x1B[32m",dirty:"\x1B[33m",resolved:"\x1B[36m",invalidate:"\x1B[93m",pause:"\x1B[90m",resume:"\x1B[96m",complete:"\x1B[34m",error:"\x1B[31m",teardown:"\x1B[91m",derived:"\x1B[35m",path:"\x1B[90m",reset:"\x1B[0m"},zn={data:"",dirty:"",resolved:"",invalidate:"",pause:"",resume:"",complete:"",error:"",teardown:"",derived:"",path:"",reset:""};we=class r{name;opts;config;_nodes=new Map;_nodeToName=new WeakMap;_mounts=new Map;_parent=void 0;_storageDisposers=new Set;_disposers=new Set;_destroyed=!1;_topology;_topologyEmitters=new Set;_factory;_factoryArgs;constructor(e,t){if(e==="")throw new Error("Graph name must be non-empty");if(e.includes(M))throw new Error(`Graph name must not contain '${M}' (got "${e}")`);if(e===Y)throw new Error(`Graph name "${Y}" is reserved for meta companion paths`);this.name=e,this.opts=Object.freeze({...t??{}}),this.config=t?.config??pe,this._traceRing=new _e(t?.traceCapacity??1e3),t?.versioning!=null&&this.setVersioning(t.versioning),typeof t?.factory=="string"&&(this._factory=t.factory,t.factoryArgs!==void 0&&(this._factoryArgs=t.factoryArgs))}tagFactory(e,t){return this._factory=e,this._factoryArgs=t,this}ancestors(e=!0){let t=[],n=e?this:this._parent;for(;n!=null;)t.push(n),n=n._parent;return t}get topology(){return this._topology==null&&(this._topology=re(e=>{let t=n=>{e.emit(n)};return this._topologyEmitters.add(t),()=>{this._topologyEmitters.delete(t)}},{name:`${this.name}_topology`})),this._topology}_emitTopology(e){if(!(this._topology==null||this._topologyEmitters.size===0))for(let t of this._topologyEmitters)t(e)}nameOf(e){return this._nodeToName.get(e)}add(e,t){let n=e.name,s=t?.name??n;if(s==null||s==="")throw new Error(`Graph "${this.name}": graph.add requires a non-empty name \u2014 pass via opts.name or set it on the node (e.g. state(0, { name: "x" }))`);let o=s,i=t?.annotation;if(ht(o,this.name,"add"),this._mounts.has(o))throw new Error(`Graph "${this.name}": name "${o}" is already a mount point`);if(this._nodes.has(o))throw new Error(`Graph "${this.name}": node "${o}" already exists`);let a=this._nodeToName.get(e);if(a!==void 0)throw new Error(`Graph "${this.name}": node instance already registered as "${a}"`);return this._nodes.set(o,e),this._nodeToName.set(e,o),this._emitTopology({kind:"added",name:o,nodeKind:"node"}),i!=null&&(this._annotations.set(o,i),this.config.inspectorEnabled&&this._traceRing.push({path:o,annotation:i,timestamp_ns:X()})),e}setVersioning(e){if(e!=null)for(let t of this._nodes.values())t instanceof F&&t._applyVersioning(e)}remove(e){ht(e,this.name,"remove");let t=this._mounts.get(e);if(t){let o={kind:"mount",nodes:[],mounts:[]},i=[];t._collectObserveTargets("",i);for(let[a,d]of i)a.includes(`${M}${Y}${M}`)||o.nodes.push(a);return o.nodes.sort(),o.mounts.push(e),o.mounts.push(...t._collectSubgraphs(`${e}${M}`)),this._mounts.delete(e),t._parent=void 0,on(t),this._emitTopology({kind:"removed",name:e,nodeKind:"mount",audit:o}),o}let n=this._nodes.get(e);if(!n)throw new Error(`Graph "${this.name}": unknown node or mount "${e}"`);this._nodes.delete(e),this._nodeToName.delete(n),n.down([[L]],{internal:!0});let s={kind:"node",nodes:[e],mounts:[]};return this._emitTopology({kind:"removed",name:e,nodeKind:"node",audit:s}),s}removeAll(e){let t=typeof e=="function"?e:(()=>{let o=je(e);return i=>o.test(i)})(),n={kind:"mount",nodes:[],mounts:[]},s=[...this._nodes.keys(),...this._mounts.keys()].filter(o=>t(o));for(let o of s){let i=this.remove(o);n.nodes.push(...i.nodes),n.mounts.push(...i.mounts)}return n.nodes.sort(),n.mounts.sort(),n}[Symbol.iterator](){let e=[...this._nodes.keys()].sort(),t=this._nodes,n=0;return{[Symbol.iterator](){return this},next(){if(n>=e.length)return{value:void 0,done:!0};let s=e[n++];return{value:[s,t.get(s)],done:!1}}}}node(e){if(e==="")throw new Error(`Graph "${this.name}": node name must be non-empty`);if(e.includes(M))return this.resolve(e);let t=this._nodes.get(e);if(!t)throw new Error(`Graph "${this.name}": unknown node "${e}"`);return t}get(e){return this.node(e).cache}set(e,t,n){let s=n?.internal===!0;this.node(e).down([[$,t]],{actor:n?.actor,internal:s,delivery:"write"})}setAll(e,t){let n=Symbol.iterator in e?e:Object.entries(e);et(()=>{for(let[s,o]of n)this.set(s,o,t)})}invalidate(e,t){let n=t?.internal===!0;this.node(e).down([[K]],{actor:t?.actor,internal:n,delivery:"write"})}error(e,t,n){let s=n?.internal===!0;this.node(e).down([[R,t]],{actor:n?.actor,internal:s,delivery:"write"})}complete(e,t){let n=t?.internal===!0;this.node(e).down([[j]],{actor:t?.actor,internal:n,delivery:"write"})}_registerSelfPruningKeepalive(e){let t,n,s=()=>{t?.(),t=void 0,n?.(),n=void 0};t=e.subscribe(o=>{for(let i of o){let a=i[0];if(a===L||a===j||a===R){s();return}}}),n=this.addDisposer(s)}_wireSignalToRemove(e,t){if(t==null)return;let n=()=>{try{this.remove(e)}catch{}};if(t.aborted){n();return}t.addEventListener("abort",n,{once:!0}),this.addDisposer(()=>t.removeEventListener("abort",n))}derived(e,t,n,s){let o=t.map(p=>this.resolve(p)),{keepAlive:i,annotation:a,equals:d,initial:u,meta:c,signal:h}=s??{},f=Ce(o,n,{name:e,...d!=null?{equals:d}:{},...u!==void 0?{initial:u}:{},...c!=null?{meta:c}:{}});return this.add(f,{name:e,...a!=null?{annotation:a}:{}}),i===!0&&this._registerSelfPruningKeepalive(f),this._wireSignalToRemove(e,h),f}effect(e,t,n,s){let o=t.map(c=>this.resolve(c)),{annotation:i,meta:a,signal:d}=s??{},u=Gt(o,n,{name:e,...a!=null?{meta:a}:{}});return this.add(u,{name:e,...i!=null?{annotation:i}:{}}),this._wireSignalToRemove(e,d),u}produce(e,t,n){if(t===void 0)throw new Error(`Graph "${this.name}".produce("${e}", \u2026): source must not be \`undefined\` \u2014 undefined is the global SENTINEL (spec \xA71.1). Pass \`null\` for nullary DATA, or a Promise/AsyncIterable/Iterable for async sources.`);if(t!==null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function")throw new Error(`Graph "${this.name}".produce("${e}", \u2026): Node sources are rejected. For Node\u2192Node, use graph.derived(name, [path], ([v]) => v, { keepAlive: true }) \u2014 fromAny passes Nodes through verbatim and silently drops opts.`);let{annotation:s,meta:o,equals:i,signal:a}=n??{},d=Lt(t,{name:e,...o!=null?{meta:o}:{},...i!=null?{equals:i}:{},...a!=null?{signal:a}:{}});return this.add(d,{name:e,...s!=null?{annotation:s}:{}}),this._wireSignalToRemove(e,a),d}batch(e){et(e)}edges(e){let t=e?.recursive===!0,n=new Map;if(!t){for(let[d,u]of this._nodes)n.set(u,d);let a=[];for(let[d,u]of this._nodes)if(u instanceof F)for(let c of u._deps){let h=n.get(c.node);h!=null&&a.push([h,d])}return a.sort((d,u)=>d[0]<u[0]?-1:d[0]>u[0]?1:d[1]<u[1]?-1:d[1]>u[1]?1:0),a}let s=[];this._collectObserveTargets("",s);let o=new Map;for(let[a,d]of s)o.set(d,a);let i=[];for(let[a,d]of s)if(d instanceof F)for(let u of d._deps){let c=o.get(u.node);c!=null&&i.push([c,a])}return i.sort((a,d)=>a[0]<d[0]?-1:a[0]>d[0]?1:a[1]<d[1]?-1:a[1]>d[1]?1:0),i}mount(e,t){if(t===void 0){let s=new r(e);return this.mount(e,s)}if(typeof t=="function"){let s=new r(e);return t(s),this.mount(e,s)}let n=t;if(ht(e,this.name,"mount"),this._nodes.has(e))throw new Error(`Graph "${this.name}": cannot mount at "${e}" \u2014 node with that name exists`);if(this._mounts.has(e))throw new Error(`Graph "${this.name}": mount "${e}" already exists`);if(n===this)throw new Error(`Graph "${this.name}": cannot mount a graph into itself`);if(n._parent!=null)throw new Error(`Graph "${this.name}": this child graph is already mounted on "${n._parent.name}"`);for(let s=this;s!=null;s=s._parent)if(s===n)throw new Error(`Graph "${this.name}": mount("${e}", \u2026) would create a mount cycle`);return this._mounts.set(e,n),n._parent=this,this._emitTopology({kind:"added",name:e,nodeKind:"mount"}),n}resolve(e){let t=qn(e,this.name);return this._resolveFromSegments(t)}tryResolve(e){try{return this.resolve(e)}catch{return}}_resolveFromSegments(e){let t=e;if(t[0]===this.name&&(t=t.slice(1),t.length===0))throw new Error(`Graph "${this.name}": resolve path ends at graph name only`);let n=t[0],s=t.slice(1);if(s.length===0){let a=this._nodes.get(n);if(a)return a;throw this._mounts.has(n)?new Error(`Graph "${this.name}": path ends at subgraph "${n}" \u2014 not a node (GRAPHREFLY-SPEC \xA73.5)`):new Error(`Graph "${this.name}": unknown name "${n}"`)}let o=this._nodes.get(n);if(o&&s.length>0&&s[0]===Y)return this._resolveMetaChainFromNode(o,s,t.join(M));let i=this._mounts.get(n);if(!i)throw this._nodes.has(n)?new Error(`Graph "${this.name}": "${n}" is a node; trailing path "${s.join(M)}" is invalid`):new Error(`Graph "${this.name}": unknown mount or node "${n}"`);return i.resolve(s.join(M))}_resolveMetaChainFromNode(e,t,n){let s=e,o=0,i=[...t];for(;o<i.length;){if(i[o]!==Y)throw new Error(`Graph "${this.name}": expected ${Y} segment in meta path "${n}"`);if(o+1>=i.length)throw new Error(`Graph "${this.name}": meta path requires a key after ${Y} in "${n}"`);let a=i[o+1],d=s.meta[a];if(!d)throw new Error(`Graph "${this.name}": unknown meta "${a}" in path "${n}"`);s=d,o+=2}return s}signal(e,t){if(t?.internal!==!0){for(let s of e)if(this.config.messageTier(s[0])===3)throw new Error(`Graph "${this.name}": Graph.signal() rejects tier-3 messages (DATA / RESOLVED). Broadcast is for control-plane tiers (START / DIRTY / INVALIDATE / PAUSE / RESUME / COMPLETE / ERROR / TEARDOWN). For per-node value writes, use Graph.set or graph.node(name).down(...).`)}let n=[];if(this._signalDeliver(e,t??{},new Set,n),n.length>0)throw n[0]}_signalDeliver(e,t,n,s){for(let d of this._mounts.values())d._signalDeliver(e,t,n,s);let i=t.internal===!0?{internal:!0}:{actor:t.actor,delivery:"signal"},a=Kn(e,this.config);for(let d of[...this._nodes.keys()].sort()){let u=this._nodes.get(d);if(!n.has(u)){n.add(u);try{u.down(e,i)}catch(c){if(c instanceof U)throw c;s.push(c)}a.length!==0&&this._signalMetaSubtree(u,a,n,i,s)}}}_signalMetaSubtree(e,t,n,s,o){for(let i of Object.keys(e.meta).sort()){let a=e.meta[i];if(!n.has(a)){n.add(a);try{a.down(t,s)}catch(d){if(d instanceof U)throw d;o.push(d)}this._signalMetaSubtree(a,t,n,s,o)}}}describe(e){if(e?.reactive==="diff")return this._describeReactiveDiff(e);if(e?.reactive===!0)return this._describeReactive(e);let t=Ln(e?.actor),n=e?.filter;if(e?.detail!=null&&e?.fields!=null)throw new TypeError("Graph.describe(): pass either `detail` or `fields`, not both. `detail: 'spec'` is the canonical spec projection; use `fields` only when you need a custom subset.");let s=ut(e?.detail,e?.fields),o=e?.detail==="spec",i=s,a=[];this._collectObserveTargets("",a);let d=new Map;for(let[y,_]of a)d.set(_,y);let u=[];{let y=a.map(([,x])=>x),_=new Set(d.values()),N=0;for(;y.length>0;){let x=y.shift();if(x instanceof F)for(let k of x._deps){let E=k.node;if(d.has(E))continue;let S=E.name??"",O=S;if(!O||_.has(O))if(S){let V=2;for(;_.has(`${S}#${V}`);)V++;O=`${S}#${V}`}else for(O=`__internal__/${N++}`;_.has(O);)O=`__internal__/${N++}`;d.set(E,O),_.add(O),u.push([O,E]),y.push(E)}}}let c=[...a,...u],h={};for(let[y,_]of c){if(t!=null&&!_.allowsObserve(t))continue;let N=dt(_,i,o),x=_ instanceof F?_._deps.map(O=>d.get(O.node)??O.node.name??""):[],{name:k,...E}=N,S={...E,deps:x};if(!o){let O=this._annotations.get(y);O!=null&&(S.annotation=O)}if(n!=null)if(typeof n=="function"){let O=n;if(!(O.length>=2?O(y,S):O(S)))continue}else{let O=!0;for(let[V,G]of Object.entries(n)){let D=V==="deps_includes"?"depsIncludes":V==="meta_has"?"metaHas":V;if(D==="depsIncludes"){if(!S.deps.includes(String(G))){O=!1;break}continue}if(D==="metaHas"){if(!Object.hasOwn(S.meta??{},String(G))){O=!1;break}continue}if(S[D]!==G){O=!1;break}}if(!O)continue}h[y]=S}let f=new Set(Object.keys(h)),p=[];for(let[y,_]of c)if(_ instanceof F)for(let N of _._deps){let x=d.get(N.node);x!=null&&p.push([x,y])}p.sort((y,_)=>y[0]<_[0]?-1:y[0]>_[0]?1:y[1]<_[1]?-1:y[1]>_[1]?1:0);let l=p.map(([y,_])=>({from:y,to:_}));(t!=null||n!=null)&&(l=l.filter(y=>f.has(y.from)&&f.has(y.to)));let v=this._collectSubgraphs(""),g=t!=null||n!=null?v.filter(y=>{let _=`${y}${M}`;return[...f].some(N=>N===y||N.startsWith(_))}):v,w=this,m=e;return{name:this.name,nodes:h,edges:l,subgraphs:g,...this._factory!==void 0?{factory:this._factory}:{},...this._factoryArgs!==void 0?{factoryArgs:this._factoryArgs}:{},expand(y){let _={...m};return Array.isArray(y)?(_.fields=y,_.detail=void 0):(_.detail=y,_.fields=void 0),w.describe(_)}}}_collectSubgraphs(e){let t=[];for(let n of[...this._mounts.keys()].sort()){let s=e===""?n:`${e}${n}`;t.push(s),t.push(...this._mounts.get(n)._collectSubgraphs(`${s}${M}`))}return t}resourceProfile(e){return Xt(this,e)}reachable(e,t,n={}){return n.withDetail===!0?rn(this.describe(),e,t,{...n,withDetail:!0}):rn(this.describe(),e,t,n)}explain(e,t,n){return n?.reactive===!0?this._explainReactive(e,t,n):this._explainStatic(ee(e),ee(t),{...n?.maxDepth!==void 0?{maxDepth:Qt(n.maxDepth)}:{},...n?.findCycle!==void 0?{findCycle:en(n.findCycle)}:{}})}_explainStatic(e,t,n){let s=this.describe({detail:"full"}),o=new Map(this._annotations),i=new Map;for(let[a,d]of Object.entries(s.nodes))d.lastMutation!=null&&i.set(a,d.lastMutation);return zt(s,e,t,{...n?.maxDepth!=null?{maxDepth:n.maxDepth}:{},...n?.findCycle===!0?{findCycle:!0}:{},annotations:o,lastMutations:i})}_describeReactive(e){let t={...e,reactive:!1},n=e.reactiveName??"describe",s=0,o=Q(s,{name:`${n}_version`}),i=this.observe({timeline:!0,structured:!0}),a=!1,d=!1,u=()=>{a||d||(a=!0,fe(()=>{a=!1,!d&&(s+=1,o.emit(s))}))},c=i.onEvent(m=>{let b=m.type;b!=="data"&&b!=="error"&&b!=="complete"&&b!=="teardown"||u()}),h=[],f=new WeakSet,p=m=>{if(f.has(m)||d)return;f.add(m);let b=m.topology.subscribe(y=>{for(let _ of y){if(_[0]!==$)continue;let N=_[1];if(u(),N.kind==="added"&&N.nodeKind==="mount"){let x=m._mounts.get(N.name);x!=null&&p(x)}}});h.push(b);for(let y of m._mounts.keys()){let _=m._mounts.get(y);_!=null&&p(_)}};p(this);let l,v=e.actor;sn(v)&&(l=v.subscribe(m=>{let b=!1,y=!1;for(let _ of m){let N=_[0];N===$?b=!0:(N===j||N===R||N===L)&&(y=!0)}b&&u(),y&&(l?.(),l=void 0,u())}));let g;try{g=Ce([o],()=>this.describe(t),{name:n,describeKind:"derived",meta:{domain:"audit",kind:"describe"},equals:(m,b)=>m===b})}catch(m){c(),l?.();for(let b of h)b();throw i.dispose(),m}let w=Ge(g);return{node:g,dispose(){d=!0,c(),l?.();for(let m of h)m();h.length=0,i.dispose(),w()}}}_describeReactiveDiff(e){let t={...e,reactive:!1},n=e.reactiveName??"describe-diff",s={name:this.name,nodes:{},edges:[],subgraphs:[]},o=this.describe(t),i=lt(s,o),a=Q(i,{name:n,meta:{domain:"audit",kind:"describe-diff"},equals:(f,p)=>f===p}),d=this._describeReactive({...e,reactiveName:void 0}),u=!1,c=d.node.subscribe(f=>{if(!u)for(let p of f){if(p[0]!==$)continue;let l=p[1],v=lt(o,l);o=l,v.events.length!==0&&a.emit(v)}}),h=Ge(a);return{node:a,dispose(){u=!0,c(),d.dispose(),a.down([[L,"describe-diff disposed"]]),h()}}}_explainReactive(e,t,n){let s=0,o=Q(s,{name:"explain_version"}),i=this.observe({timeline:!0,structured:!0}),a=!1,d=!1,u=()=>{a||d||(a=!0,fe(()=>{a=!1,!d&&(s+=1,o.emit(s))}))},c=i.onEvent(m=>{let b=m.type;b!=="data"&&b!=="error"&&b!=="complete"&&b!=="teardown"||u()}),h=[];e!=null&&se(e)&&h.push(e),t!=null&&se(t)&&h.push(t),n?.maxDepth!=null&&se(n.maxDepth)&&h.push(n.maxDepth),n?.findCycle!=null&&se(n.findCycle)&&h.push(n.findCycle);let f=()=>{for(let m of h)if(m.cache===void 0)return!1;return!0},p=()=>{let m=ee(e),b=ee(t);return{from:m,to:b,found:!1,reason:"pending",steps:[],text:"(awaiting reactive args)",toJSON:()=>({from:m,to:b,found:!1,reason:"pending",steps:[]})}},l;try{l=Ce([o],()=>{if(!f())return p();let m=ee(e),b=ee(t),y={...n?.maxDepth!==void 0?{maxDepth:Qt(n.maxDepth)}:{},...n?.findCycle!==void 0?{findCycle:en(n.findCycle)}:{}};return this._explainStatic(m,b,y)},{name:n?.name??"explain",describeKind:"derived",meta:{domain:"audit",kind:"explain_path",from:ee(e),to:ee(t)},equals:(m,b)=>m.found===b.found&&m.reason===b.reason&&m.steps.length===b.steps.length&&Jn(m.steps,b.steps)})}catch(m){throw c(),i.dispose(),m}let v=Ge(l),g=[],w=m=>{let b;return b=m.subscribe(y=>{let _=!1,N=!1;for(let x of y){let k=x[0];k===$?_=!0:(k===j||k===R||k===L)&&(N=!0)}(_||N)&&u(),N&&b&&(b(),b=void 0)}),()=>{b&&(b(),b=void 0)}};for(let m of h)g.push(w(m));return{node:l,dispose(){d=!0,c();for(let m of g)m?.();g.length=0,i.dispose(),v()}}}_pathsMatching(e){let t=je(e),n=[];return this._collectObserveTargets("",n),n.map(([s])=>s).filter(s=>t.test(s))}_collectObserveTargets(e,t){for(let n of[...this._mounts.keys()].sort()){let s=e===""?n:`${e}${M}${n}`;this._mounts.get(n)._collectObserveTargets(s,t)}for(let n of[...this._nodes.keys()].sort()){let s=this._nodes.get(n),o=e===""?n:`${e}${M}${n}`;t.push([o,s]),this._appendMetaObserveTargets(o,s,t)}}_appendMetaObserveTargets(e,t,n){for(let s of Object.keys(t.meta).sort()){let o=t.meta[s],i=`${e}${M}${Y}${M}${s}`;n.push([i,o]),this._appendMetaObserveTargets(i,o,n)}}observe(e,t){let n=typeof e=="string",o=nn(n?t:e);if(o.reactive===!0)return this._observeReactive(n?e:void 0,o);let i=o.structured===!0||o.timeline===!0||o.causal===!0||o.derived===!0||o.detail==="minimal"||o.detail==="full"||o.format!=null,a=o.actor;if(n){let c=e,h=this.resolve(c);if(a!=null&&!h.allowsObserve(a))throw new U({actor:a,action:"observe",nodeName:c});return i?this._buildStructuredObserver([[c,h]],o,"one"):{subscribe(f){return h.subscribe(f)},up(f){try{h.up?.(f)}catch(p){if(p instanceof U)return;throw p}}}}let d=[];this._collectObserveTargets("",d),d.sort((c,h)=>c[0]<h[0]?-1:c[0]>h[0]?1:0);let u=a==null?d:d.filter(([,c])=>c.allowsObserve(a));return i?this._buildStructuredObserver(u,o,"all"):{subscribe:c=>{let h=u.map(([f,p])=>p.subscribe(l=>{c(f,l)}));return()=>{for(let f of h)f()}},up:(c,h)=>{try{this.resolve(c).up?.(h)}catch(f){if(f instanceof U)return;throw f}}}}_observeReactive(e,t){let n=t.tiers,s=n!=null?new Set(n):null,o=t.reactiveName??"observe";return re(i=>{let a=[],d=!1,u=!1,c=()=>{if(a.length===0||u)return;let v={events:a.slice(),flushedAt_ns:X()};a.length=0,i.emit(v)},h={...t,reactive:!1,structured:!0,timeline:!0},f=e!=null?this.observe(e,h):this.observe(h),p=v=>{u||(a.push(v),!d&&(d=!0,fe(()=>{d=!1,c()})))};for(let v of f.events)p(v);let l=f.onEvent(p);return()=>{u=!0,l(),f.dispose()}},{name:o,meta:{domain:"audit",kind:"observe-reactive"}})}_buildStructuredObserver(e,t,n){let s=n==="one"?e[0]?.[0]:void 0,o=i=>{if(n==="one"&&s!=null){let c=this.resolve(s);return this._buildStructuredObserver([[s,c]],i,"one")}let a=[];this._collectObserveTargets("",a),a.sort((c,h)=>c[0]<h[0]?-1:c[0]>h[0]?1:0);let d=i.actor,u=d==null?a:a.filter(([,c])=>c.allowsObserve(d));return this._buildStructuredObserver(u,i,"all")};return this._createObserveResult(e,t,o)}_createObserveResult(e,t,n){let s=t.timeline===!0,o=t.causal===!0,i=t.derived===!0,a=t.detail==="minimal",d=this.config.inspectorEnabled,u=(o||i)&&d,c=t.maxEvents,h=c!=null&&c>0?new _e(c):null,f=[],p=new Set,l=t.tiers!=null?new Set(t.tiers):null,v={},g=new Set,w=0,m=0,b=0,y=0,_=0,N=0,x=!1,k=!1,E=0,S=new Map,O=new Map,V=new Map,G=T=>{if(!(l!=null&&!l.has(T.type))){h?h.push(T):f.push(T);for(let C of p)C(T)}},D=T=>l==null||l.has(T),oe=()=>s?{timestamp_ns:X(),in_batch:xe(),batch_id:E}:{},Ve=(T,C)=>{if(!(!u||!(T instanceof F)))return T._setInspectorHook(B=>{if(B.kind==="dep_message")S.set(T,B.depIndex);else if(B.kind==="run"){let ge=B.batchData.map((A,H)=>A!=null&&A.length>0?A.at(-1):B.prevData[H]);O.set(T,ge);let z=B.batchData.map(A=>A!=null?[...A]:void 0);V.set(T,z),i&&G({type:"derived",path:C,dep_values:ge,dep_batches:z,...oe()})}})},Te=T=>{let C=S.get(T),B=O.get(T);if(!o||B==null)return{};let z=(C!=null&&C>=0&&T instanceof F?T._deps[C]:void 0)?.node,A=z?.v,H=V.get(T);return{trigger_dep_index:C,trigger_dep_name:z?.name,...A!=null?{trigger_version:{id:A.id,version:A.version}}:{},dep_values:[...B],...H!=null?{dep_batches:H}:{}}},gt=[],bt=[];for(let[T,C]of e){let B=Ve(C,T);B&&gt.push(B),bt.push(C.subscribe(ge=>{E++;for(let z of ge){let A=z[0],H=oe();if(A===$){v[T]=z[1];let Ue=C instanceof F?C.lastMutation?.actor??de:de;G({type:"data",path:T,data:z[1],actor:Ue,...H,...Te(C)})}else if(a)A===W?D("dirty")&&w++:A===q?D("resolved")&&m++:A===K?D("invalidate")&&b++:A===J?D("pause")&&y++:A===Z?D("resume")&&_++:A===L?D("teardown")&&N++:A===j&&!g.has(T)?D("complete")&&(x=!0):A===R&&D("error")&&(k=!0,g.add(T));else if(A===W)D("dirty")&&w++,G({type:"dirty",path:T,...H});else if(A===q)D("resolved")&&m++,G({type:"resolved",path:T,...H,...Te(C)});else if(A===K)D("invalidate")&&b++,G({type:"invalidate",path:T,...H});else if(A===J)D("pause")&&y++,G({type:"pause",path:T,lockId:z[1],...H});else if(A===Z)D("resume")&&_++,G({type:"resume",path:T,lockId:z[1],...H});else if(A===j)D("complete")&&!g.has(T)&&(x=!0),G({type:"complete",path:T,...H});else if(A===R){D("error")&&(k=!0,g.add(T));let Ue=C instanceof F?C.lastMutation?.actor??de:de;G({type:"error",path:T,data:z[1],actor:Ue,...H})}else A===L&&(D("teardown")&&N++,G({type:"teardown",path:T,...H}))}}))}let He=!1,Be=()=>{if(!He){He=!0;for(let T of bt)T();for(let T of gt)T();for(let T of Oe)T({value:void 0,done:!0});Oe.length=0}},ze=[],Oe=[];p.add(T=>{let C=Oe.shift();C?C({value:T,done:!1}):ze.push(T)});let mt={get values(){return v},get dirtyCount(){return w},get resolvedCount(){return m},get invalidateCount(){return b},get pauseCount(){return y},get resumeCount(){return _},get teardownCount(){return N},get events(){return h?h.toArray():[...f]},get anyCompletedCleanly(){return x},get anyErrored(){return k},get completedWithoutErrors(){return x&&!k},onEvent(T){return p.add(T),()=>p.delete(T)},dispose:Be,expand(T){Be();let C={...t};return typeof T=="string"?C.detail=T:Object.assign(C,T),n(nn(C))},[Symbol.asyncIterator](){return{next(){return ze.length>0?Promise.resolve({value:ze.shift(),done:!1}):He?Promise.resolve({value:void 0,done:!0}):new Promise(T=>Oe.push(T))},return(){return Be(),Promise.resolve({value:void 0,done:!0})}}}};return t.format!=null&&this._attachFormatLogger(mt,t),mt}_attachFormatLogger(e,t){let n=t.format;if(n==null)return;let s=t.logger??(l=>console.log(l)),o=t.includeTypes?new Set(t.includeTypes):null,i=t.excludeTypes?new Set(t.excludeTypes):null,a=o==null&&i==null?()=>!0:l=>(o==null||o.has(l))&&(i==null||!i.has(l)),d=Un(t.theme),u=n==="stage-log"?X():0,c=l=>l==null?"":t.stageLabels?.[l]??l,h=(l,v)=>l.length>v?`${l.slice(0,v-1)}\u2026`:l,f=l=>l.type==="data"||l.type==="error"?h(pt(l.data),120):"",p=l=>{if(n==="stage-log"){let x=(X()-u)/1e9,k=c(l.path).padEnd(9);if(l.type==="data"){let E=f(l);return`[${x.toFixed(3)}s] ${k} \u2190${E?` ${E}`:""}`}if(l.type==="error"){let E=f(l);return`[${x.toFixed(3)}s] ${k} \u2717${E?` ${E}`:""}`}return l.type==="complete"?`[${x.toFixed(3)}s] ${k} \u25A0 complete`:`[${x.toFixed(3)}s] ${k} ${l.type}`}if(n==="json")try{return JSON.stringify(l)}catch{return JSON.stringify({type:l.type,path:l.path,data:"[unserializable]"})}let v=d[l.type]??"",g=l.path?`${d.path}${l.path}${d.reset} `:"",w=l.type==="data"||l.type==="error",m=l.type==="pause"||l.type==="resume",b=w?` ${pt(l.data)}`:m?` ${pt(l.lockId)}`:"",y=l.type==="data"||l.type==="resolved"||l.type==="derived"?l:void 0,_=y?.trigger_dep_name!=null?` <- ${y.trigger_dep_name}`:y?.trigger_dep_index!=null?` <- #${y.trigger_dep_index}`:"",N=l.in_batch?" [batch]":"";return`${g}${v}${l.type.toUpperCase()}${d.reset}${b}${_}${N}`};e.onEvent(l=>{a(l.type)&&s(p(l),l)})}addDisposer(e){return this._disposers.add(e),()=>{this._disposers.delete(e)}}destroy(){Le(this._disposers,this.name),this.signal([[L]],{internal:!0}),Le(this._storageDisposers,this.name);for(let e of[...this._mounts.values()])e._parent=void 0,e._destroyClearOnly();this._mounts.clear(),this._nodes.clear(),this._parent=void 0,this._destroyed=!0}get destroyed(){return this._destroyed}_destroyClearOnly(){Le(this._disposers,this.name),Le(this._storageDisposers,this.name);for(let e of[...this._mounts.values()])e._parent=void 0,e._destroyClearOnly();this._mounts.clear(),this._nodes.clear(),this._parent=void 0,this._destroyed=!0}snapshot(e){let{expand:t,...n}=this.describe({detail:"full"}),s={};for(let a of Object.keys(n.nodes).sort()){let{lastMutation:d,guard:u,...c}=n.nodes[a];s[a]=c}let o=[...n.subgraphs].sort(),i={...n,version:1,nodes:s,subgraphs:o};if(e?.format==null)return i;if(e.format==="json-string")return JSON.stringify(i);if(e.format==="bytes"){if(e.codec==null)throw new Error("snapshot({format: 'bytes'}) requires a `codec` name");let a=this.config.lookupCodec(e.codec);if(a==null)throw new Error(`snapshot: codec "${e.codec}" is not registered on this graph's config. Call config.registerCodec(...) before creating nodes.`);return Tt(a,a.encode(i))}throw new Error(`snapshot: unknown format "${String(e.format)}"`)}static decode(e,t){let n=t?.config??pe,{codec:s,codecVersion:o,payload:i}=Ot(e,n);return s.decode(i,o)}restore(e,t){if(tn(e),e.name!==this.name)throw new Error(`Graph "${this.name}": restore snapshot name "${e.name}" does not match this graph`);let n=t?.only==null?null:(Array.isArray(t.only)?t.only:[t.only]).map(o=>je(o)),s=t?.includeProducers===!0;for(let o of Object.keys(e.nodes).sort()){if(n!==null&&!n.some(a=>a.test(o)))continue;let i=e.nodes[o];if(i!==void 0){if(!("value"in i)||i.value===void 0){"value"in i&&i.value===void 0&&t?.onError?.(o,new Error(`restore: slice.value is undefined for "${o}" (undefined is the global SENTINEL; not valid DATA)`));continue}if(!(i.type==="derived"||i.type==="effect")&&!(i.type==="producer"&&!s)){if(i.v!=null){let d=this.tryResolve(o)?.v;if(d!=null&&d.id===i.v.id&&d.version===i.v.version)continue}try{this.set(o,i.value)}catch(a){t?.onError?.(o,a)}}}}}static fromSnapshot(e,t){tn(e);let n=typeof t=="function"?t:t?.build,s=typeof t=="function"?void 0:t?.factories,o=new r(e.name);if(n)return n(o),o.restore(e),o;for(let p of[...e.subgraphs].sort((l,v)=>{let g=l.split(M).length,w=v.split(M).length;return g!==w?g-w:l<v?-1:l>v?1:0})){let l=p.split(M),v=o;for(let g of l)v._mounts.has(g)||v.mount(g,new r(g)),v=v._mounts.get(g)}let i=s?Object.entries(s).map(([p,l])=>({re:je(p),factory:l})):[],a=p=>{for(let l of i)if(l.re.test(p))return l.factory},d=p=>{let l=p.split(M),v=l.pop();if(v==null||v.length===0)throw new Error(`invalid snapshot path "${p}"`);let g=o;for(let w of l){let m=g._mounts.get(w);if(!m)throw new Error(`unknown mount "${w}" in path "${p}"`);g=m}return[g,v]},u=Object.entries(e.nodes).filter(([p])=>!p.includes(`${M}${Y}${M}`)).sort((p,l)=>p[0]<l[0]?-1:p[0]>l[0]?1:0),c=new Map(u),h=new Map,f=!0;for(;c.size>0&&f;){f=!1;for(let[p,l]of[...c.entries()]){let v=l?.deps??[];if(!v.every(_=>h.has(_)))continue;let[g,w]=d(p),m={...l?.meta??{}},b=a(p),y;if(l?.type==="state")y=Q(l.value,{meta:m});else{if(b==null)continue;y=b(w,{path:p,type:l.type,value:l.value,meta:m,deps:v,resolvedDeps:v.map(_=>h.get(_))})}g.add(y,{name:w}),h.set(p,y),c.delete(p),f=!0}}if(c.size>0){let p=[...c.keys()].sort().join(", ");throw new Error(`Graph.fromSnapshot could not reconstruct nodes without build callback: ${p}. Pass matching factories via fromSnapshot(data, { factories: { pattern: factoryFn } }).`)}return o.restore(e),o}toJSON(){return this.snapshot()}attachSnapshotStorage(e,t={}){let n=e.map(u=>({tier:u,debounceMs:Math.max(0,u.debounceMs??0),compactEvery:Math.max(1,u.compactEvery??10),timer:void 0,seq:0,lastSnapshot:void 0,lastFingerprint:"",disposed:!1,savePending:void 0}));t.autoRestore===!0&&this._cascadeRestore(e,t.onError);let s=(u,c)=>{if(u.disposed)return;let h=jn(c.nodes);if(u.lastSnapshot!=null&&h!==""&&h===u.lastFingerprint)return;let f=u.seq+1,p=Ee(),g=u.lastSnapshot==null||f%u.compactEvery===0?{name:this.name,mode:"full",snapshot:c,seq:f,timestamp_ns:p,format_version:he}:{name:this.name,mode:"diff",diff:Yn(u.lastSnapshot,c),seq:f,timestamp_ns:p,format_version:he};if(u.tier.filter&&!u.tier.filter(g))return;let w;try{w=u.tier.save(g)}catch(m){t.onError?.(m,u.tier);return}if(w&&typeof w.then=="function"){let y=(u.savePending??Promise.resolve()).then(()=>w,()=>w).then(()=>{u.disposed||(u.seq=f,u.lastSnapshot=c,u.lastFingerprint=h)},_=>{t.onError?.(_,u.tier)});u.savePending=y.finally(()=>{u.savePending===y&&(u.savePending=void 0)})}else u.seq=f,u.lastSnapshot=c,u.lastFingerprint=h},o=(u,c)=>{try{s(u,c)}catch(h){t.onError?.(h,u.tier)}},i=(u,c)=>{if(!c.some(l=>{let v=this.config.messageTier(l[0]);return v>=3&&v<5}))return;if(t.filter){let l=this.tryResolve(u);if(l==null)return;let v=dt(l,ut("standard"));if(!t.filter(u,v))return}let f,p=()=>(f==null&&(f=this.snapshot()),f);for(let l of n)l.disposed||(l.debounceMs===0?o(l,p()):(l.timer==null&&(l.timer=new Pe),l.timer.start(l.debounceMs,()=>{l.disposed||o(l,this.snapshot())})))},a;if(t.paths!=null){let c=(typeof t.paths=="string"?this._pathsMatching(t.paths):t.paths).map(h=>{let f=this.tryResolve(h);return f==null?()=>{}:f.subscribe(p=>i(h,p))});a=()=>{for(let h of c)h()}}else a=this.observe().subscribe((u,c)=>i(u,c));let d=()=>{a();for(let u of n)u.disposed=!0,u.timer?.cancel();this._storageDisposers.delete(d)};return this._storageDisposers.add(d),{dispose:d}}async _cascadeRestore(e,t){for(let n of e){let s;try{s=await n.load?.()}catch(i){t?.(i,n);continue}if(s==null||typeof s!="object"||Array.isArray(s))continue;let o=s;try{if(o.mode==="full"&&o.snapshot!=null)return this.restore(o.snapshot),!0;if(o.version===he&&o.nodes!=null)return this.restore(o),!0}catch(i){t?.(i,n)}}return!1}static async fromStorage(e,t,n){for(let s of t){let o;try{o=await s.load?.()}catch(d){n?.onError?.(d,s);continue}if(o==null||typeof o!="object"||Array.isArray(o))continue;let i=o,a=i.mode==="full"&&i.snapshot!=null?i.snapshot:i.version===he&&i.nodes!=null?i:void 0;if(a!=null)try{return r.fromSnapshot(a,n)}catch(d){n?.onError?.(d,s)}}throw new Error(`Graph.fromStorage: no tier held a restorable record for "${e}" across ${t.length} tier(s)`)}_annotations=new Map;_traceRing;trace(e,t,n){if(e!=null&&t!=null){if(this.tryResolve(e)==null)return;if(this._annotations.set(e,t),this.config.inspectorEnabled){let s={path:e,annotation:t,timestamp_ns:X(),...n?.actor!=null?{actor:n.actor}:{}};this._traceRing.push(s)}return}return e!=null?this.config.inspectorEnabled?this._annotations.get(e):void 0:this.config.inspectorEnabled?this._traceRing.toArray():[]}annotation(e){return this._annotations.get(e)}clearTrace(){this._annotations.clear(),this._traceRing.clear()}pruneTrace(e){let t=this._traceRing.toArray().filter(s=>!e(s)),n=this._traceRing.size-t.length;this._traceRing.clear();for(let s of t)this._traceRing.push(s);return n}static diff(e,t){let n=new Set(Object.keys(e.nodes)),s=new Set(Object.keys(t.nodes)),o=[...s].filter(m=>!n.has(m)).sort(),i=[...n].filter(m=>!s.has(m)).sort(),a=[],d=[];for(let m of n){if(!s.has(m))continue;let b=e.nodes[m],y=t.nodes[m],_=b.v,N=y.v;_!=null&&N!=null&&_.id===N.id&&_.version!==N.version&&d.push({path:m,id:_.id,from:_.version,to:N.version});let x=_!=null&&N!=null&&_.id===N.id&&_.version===N.version;for(let k of["type","status","sentinel"]){let E=b[k],S=y[k];E!==S&&a.push({path:m,field:k,from:E,to:S})}if(!x)for(let k of["value","meta"]){let E=b[k],S=y[k];Vn(E,S)||a.push({path:m,field:k,from:E,to:S})}}let u=m=>`${m.from} ${m.to}`,c=new Set(e.edges.map(u)),h=new Set(t.edges.map(u)),f=t.edges.filter(m=>!c.has(u(m))),p=e.edges.filter(m=>!h.has(u(m))),l=new Set(e.subgraphs),v=new Set(t.subgraphs),g=[...v].filter(m=>!l.has(m)).sort(),w=[...l].filter(m=>!v.has(m)).sort();return{nodesAdded:o,nodesRemoved:i,nodesChanged:a,versionChanges:d,edgesAdded:f,edgesRemoved:p,subgraphsAdded:g,subgraphsRemoved:w}}}});var Qn={};ln(Qn,{create:()=>Zn});module.exports=pn(Qn);ue();Me();an();var Xn=()=>!1;function Zn(r){let e=new we("zustand"),t=Q(void 0,{name:"state",equals:Xn});e.add(t,{name:"state"});let n=()=>t.cache,s=(a,d)=>{let u=t.cache,c=typeof a=="function"?a(u):a;t.emit(d?c:{...u,...c})},o={getState:n,setState:s,getInitialState:()=>i,subscribe:a=>{let d=!0,u=t.cache;return t.subscribe(c=>{for(let[h,f]of c)if(h===$){if(d){d=!1;continue}a(f,u),u=f}})},destroy:e.destroy.bind(e)},i=r(s,n,o);return t.emit(i),Object.assign(e,o)}0&&(module.exports={create});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/compat/zustand/index.ts
18
+ var zustand_exports = {};
19
+ module.exports = __toCommonJS(zustand_exports);
20
+ __reExport(zustand_exports, require("@graphrefly/pure-ts/compat/zustand"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/zustand/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/zustand\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,4BAAc,+CAFd;","names":[]}
@@ -1,6 +1 @@
1
- import '../../graph-CWvEUQAq.cjs';
2
- export { S as StateCreator, a as StoreApi, c as create } from '../../index-ZVQhLa2i.cjs';
3
- import '../../node-kK3CvTrR.cjs';
4
- import '../../sugar-DQjFmVqb.cjs';
5
- import '../../extra/storage-core.cjs';
6
- import '../../extra/storage-tiers.cjs';
1
+ export * from '@graphrefly/pure-ts/compat/zustand';
@@ -1,6 +1 @@
1
- import '../../graph-D9LFnda9.js';
2
- export { S as StateCreator, a as StoreApi, c as create } from '../../index-sqkqlb1p.js';
3
- import '../../node-kK3CvTrR.js';
4
- import '../../sugar-fhLIE7TT.js';
5
- import '../../extra/storage-core.js';
6
- import '../../extra/storage-tiers.js';
1
+ export * from '@graphrefly/pure-ts/compat/zustand';
@@ -1 +1,3 @@
1
- import{a}from"../../chunk-HIDYF36O.js";import"../../chunk-HITNVN6B.js";import"../../chunk-ESMPEKEV.js";import"../../chunk-GHBWHMRZ.js";import"../../chunk-CRVT7D2P.js";import"../../chunk-NTEURFZH.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{a as create};
1
+ // src/compat/zustand/index.ts
2
+ export * from "@graphrefly/pure-ts/compat/zustand";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/compat/zustand/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/compat/zustand\";\n"],"mappings":";AAEA,cAAc;","names":[]}
@@ -1 +1,21 @@
1
- "use strict";var ye=Object.defineProperty;var Qe=Object.getOwnPropertyDescriptor;var et=Object.getOwnPropertyNames;var tt=Object.prototype.hasOwnProperty;var nt=(n,e)=>{for(var t in e)ye(n,t,{get:e[t],enumerable:!0})},st=(n,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of et(e))!tt.call(n,r)&&r!==t&&ye(n,r,{get:()=>e[r],enumerable:!(s=Qe(e,r))||s.enumerable});return n};var rt=n=>st(ye({},"__esModule",{value:!0}),n);var yt={};nt(yt,{COMPLETE:()=>k,COMPLETE_MSG:()=>me,COMPLETE_ONLY_BATCH:()=>ce,DATA:()=>y,DEFAULT_ACTOR:()=>Ae,DIRTY:()=>w,DIRTY_MSG:()=>D,DIRTY_ONLY_BATCH:()=>Z,ERROR:()=>p,GraphReFlyConfig:()=>W,GuardDenied:()=>I,INVALIDATE:()=>x,INVALIDATE_MSG:()=>be,INVALIDATE_ONLY_BATCH:()=>de,NodeImpl:()=>V,PAUSE:()=>N,RESOLVED:()=>T,RESOLVED_MSG:()=>J,RESOLVED_ONLY_BATCH:()=>ae,RESUME:()=>F,START:()=>C,START_MSG:()=>X,TEARDOWN:()=>v,TEARDOWN_MSG:()=>ve,TEARDOWN_ONLY_BATCH:()=>Q,accessHintForGuard:()=>ct,advanceVersion:()=>ue,autoTrackNode:()=>qe,batch:()=>De,configure:()=>Le,createVersioning:()=>te,defaultConfig:()=>G,defaultHash:()=>ee,derived:()=>he,derivedT:()=>$e,downWithBatch:()=>U,dynamicNode:()=>Ke,effect:()=>ke,effectT:()=>Ye,factoryTag:()=>Be,isBatching:()=>oe,isV1:()=>Fe,monotonicNs:()=>Re,node:()=>H,normalizeActor:()=>Y,pipe:()=>Je,placeholderArgs:()=>Ue,policy:()=>Se,policyFromRules:()=>at,producer:()=>ze,registerBuiltins:()=>le,resolveDescribeFields:()=>Pe,state:()=>je,wallClockNs:()=>ie});module.exports=rt(yt);var Ae={type:"system",id:""};function Y(n){if(n==null)return Ae;let{type:e,id:t,...s}=n;return{type:e??"system",id:t??"",...s}}var L=0,K=!1,O=[],S=[],P=[],q=[];function oe(){return L>0||K}function Ee(){return L>0}function Me(n){L>0?q.push(n):n()}function De(n){L+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(L-=1,L===0)if(e){if(!K){let t=q.splice(0);for(let s of t)try{s()}catch{}O.length=0,S.length=0,P.length=0}}else ot()}}function ot(){let n=!K;n&&(K=!0);let e=[],t=0;try{for(;O.length>0||S.length>0||P.length>0||n&&q.length>0;){if(n&&q.length>0){let i=q.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw O.length=0,S.length=0,P.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let r=(O.length>0?O:S.length>0?S:P).splice(0);for(let i of r)try{i()}catch(a){e.push(a)}}}finally{n&&(K=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function U(n,e,t){if(e.length===0)return;if(e.length===1){let c=t(e[0][0]);if(c<3||!oe()){n(e);return}(c>=5?P:c===4?S:O).push(()=>n(e));return}let s=e.length,r=s,i=s,a=s,o=0;for(;o<s&&t(e[o][0])<3;)o++;for(r=o;o<s&&t(e[o][0])===3;)o++;for(i=o;o<s&&t(e[o][0])===4;)o++;a=o;let d=oe();if(r>0){let c=e.slice(0,r);n(c)}if(i>r){let c=e.slice(r,i);d?O.push(()=>n(c)):n(c)}if(a>i){let c=e.slice(i,a);d?S.push(()=>n(c)):n(c)}if(s>a){let c=e.slice(a,s);d?P.push(()=>n(c)):n(c)}}function Re(){return Math.trunc(performance.now()*1e6)}function ie(){return Date.now()*1e6}var C=Symbol.for("graphrefly/START"),y=Symbol.for("graphrefly/DATA"),w=Symbol.for("graphrefly/DIRTY"),T=Symbol.for("graphrefly/RESOLVED"),x=Symbol.for("graphrefly/INVALIDATE"),N=Symbol.for("graphrefly/PAUSE"),F=Symbol.for("graphrefly/RESUME"),v=Symbol.for("graphrefly/TEARDOWN"),k=Symbol.for("graphrefly/COMPLETE"),p=Symbol.for("graphrefly/ERROR"),D=Object.freeze([w]),J=Object.freeze([T]),be=Object.freeze([x]),X=Object.freeze([C]),me=Object.freeze([k]),ve=Object.freeze([v]),Z=Object.freeze([D]),ae=Object.freeze([J]),de=Object.freeze([be]),ce=Object.freeze([me]),Q=Object.freeze([ve]);var W=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=t=>{let s=this._messageTypes.get(t);return s!=null?s.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,t){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:t.tier,wireCrossing:t.wireCrossing??t.tier>=3,metaPassthrough:t.metaPassthrough??!0}),this}messageTier(e){let t=this._messageTypes.get(e);return t!=null?t.tier:1}isWireCrossing(e){let t=this._messageTypes.get(e);return t!=null?t.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let t=this._messageTypes.get(e);return t!=null?t.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 le(n){n.registerMessageType(C,{tier:0,wireCrossing:!1}),n.registerMessageType(w,{tier:1,wireCrossing:!1}),n.registerMessageType(x,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(N,{tier:2,wireCrossing:!1}),n.registerMessageType(F,{tier:2,wireCrossing:!1}),n.registerMessageType(y,{tier:3,wireCrossing:!0}),n.registerMessageType(T,{tier:3,wireCrossing:!0}),n.registerMessageType(k,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(p,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var I=class extends Error{actor;action;nodeName;constructor(e,t){super(t??`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(n){return Array.isArray(n)?[...n]:[n]}function it(n,e){return n.has(e)||n.has("*")}function Se(n){let e=[];return n((r,i)=>{e.push({kind:"allow",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})},(r,i)=>{e.push({kind:"deny",actions:new Set(Oe(r)),where:i?.where??(()=>!0)})}),(r,i)=>{let a=!1,o=!1;for(let d of e)it(d.actions,i)&&d.where(r)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}function at(n){return Se((e,t)=>{for(let s of n){let r=s.actorType==null?null:new Set(Array.isArray(s.actorType)?s.actorType:[s.actorType]),i=s.actorId==null?null:new Set(Array.isArray(s.actorId)?s.actorId:[s.actorId]),a=Object.entries(s.claims??{}),o=d=>{if(r!==null&&!r.has(String(d.type))||i!==null&&!i.has(String(d.id??"")))return!1;for(let[c,l]of a)if(d[c]!==l)return!1;return!0};s.effect==="deny"?t(s.action,{where:o}):e(s.action,{where:o})}})}var dt=["human","llm","wallet","system"];function ct(n){let e=dt.filter(t=>n({type:t,id:""},"write"));return e.length===0?"restricted":e.includes("human")&&e.includes("llm")&&e.every(t=>t==="human"||t==="llm"||t==="system")?"both":e.length===1?e[0]:e.join("+")}var lt={name:"json",version:1,contentType:"application/json",encode(n){let e=JSON.stringify(n);return new TextEncoder().encode(e)},decode(n,e){let t=new TextDecoder().decode(n);return JSON.parse(t)}};function Ce(n){n.registerCodec(lt)}function we(n){if(n===void 0)return null;if(typeof n=="number"){if(!Number.isFinite(n))throw new TypeError(`Cannot hash non-finite number: ${n}`);if(Number.isInteger(n)&&!Number.isSafeInteger(n))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${n}. Cross-language cid parity is not guaranteed for unsafe integers.`);return n}if(typeof n=="string"||typeof n=="boolean"||n===null)return n;if(Array.isArray(n))return n.map(we);if(typeof n=="object"&&n!==null){let e={};for(let t of Object.keys(n).sort())e[t]=we(n[t]);return e}return null}var ut=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]),ft=new TextEncoder;function ht(n){let e=ft.encode(n),t=e.length,s=t*8,r=t+9+63&-64,i=new Uint8Array(r);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(r-4,s>>>0,!1),a.setUint32(r-8,Math.floor(s/4294967296)>>>0,!1);let o=1779033703,d=3144134277,c=1013904242,l=2773480762,f=1359893119,g=2600822924,u=528734635,_=1541459225,R=new Uint32Array(64),m=(E,b)=>E>>>b|E<<32-b;for(let E=0;E<r;E+=64){for(let h=0;h<16;h++)R[h]=a.getUint32(E+h*4,!1);for(let h=16;h<64;h++){let z=R[h-15],$=R[h-2],re=m(z,7)^m(z,18)^z>>>3,_e=m($,17)^m($,19)^$>>>10;R[h]=R[h-16]+re+R[h-7]+_e>>>0}let b=o,B=d,j=c,pe=l,M=f,ne=g,se=u,ge=_;for(let h=0;h<64;h++){let z=m(M,6)^m(M,11)^m(M,25),$=M&ne^~M&se,re=ge+z+$+ut[h]+R[h]>>>0,_e=m(b,2)^m(b,13)^m(b,22),Xe=b&B^b&j^B&j,Ze=_e+Xe>>>0;ge=se,se=ne,ne=M,M=pe+re>>>0,pe=j,j=B,B=b,b=re+Ze>>>0}o=o+b>>>0,d=d+B>>>0,c=c+j>>>0,l=l+pe>>>0,f=f+M>>>0,g=g+ne>>>0,u=u+se>>>0,_=_+ge>>>0}let A=E=>E.toString(16).padStart(8,"0");return A(o)+A(d)+A(c)+A(l)+A(f)+A(g)+A(u)+A(_)}function ee(n){let e=we(n??null),t=JSON.stringify(e);return ht(t).slice(0,16)}function pt(){let n=globalThis.crypto;if(n?.randomUUID)return n.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),t=e()+e()+e()+e();return`${t.slice(0,8)}-${t.slice(8,12)}-4${t.slice(13,16)}-${(parseInt(t.slice(16,17),16)&3|8).toString(16)}${t.slice(17,20)}-${t.slice(20,32)}`}function te(n,e,t){let s=t?.id??pt();if(n===0)return{id:s,version:0};let i=(t?.hash??ee)(e);return{id:s,version:0,cid:i,prev:null}}function ue(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}function Fe(n){return"cid"in n}var Ie=()=>{},Ge=100;function Ve(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function Te(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function fe(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}var gt=(n,e,t,s)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},_t=(n,e,t,s)=>{let r=n;if(r._status==="completed"||r._status==="errored")return;let i=r._cached,a=i===void 0?[X]:[X,[y,i]];r._status==="dirty"&&a.push(D),U(e,a,r._config.tierOf)},G=new W({onMessage:gt,onSubscribe:_t});le(G);Ce(G);function Le(n){if(G._isFrozen())throw new Error("configure() called after a node was created \u2014 the default GraphReFlyConfig is frozen. Call configure(...) at application startup, before any node factories run.");n(G)}var V=class n{_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,t,s){this._config=s.config??G,this._config.onMessage,this._optsName=s.name,this._describeKind=s.describeKind,this._equals=s.equals??Object.is,this._resubscribable=s.resubscribable??!1,this._resetOnTeardown=s.resetOnTeardown??!1,this._autoComplete=s.completeWhenDepsComplete??!0,this._autoError=s.errorWhenDepsError??!0,this._pausable=s.pausable??!0,this._guard=s.guard,this._fn=t,this._partial=s.partial??!1,this._cached=s.initial!==void 0?s.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=s.versioningHash??this._config.defaultHashFn??ee;let r=s.versioning??this._config.defaultVersioning;this._versioningLevel=r,this._versioning=r!=null?te(r,this._cached===void 0?void 0:this._cached,{id:s.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Ve);let i={};for(let[o,d]of Object.entries(s.meta??{})){let c={initial:d,name:`${s.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};s.guard!=null&&(c.guard=s.guard),s.resubscribable===!0&&(c.resubscribable=!0),i[o]=new n([],void 0,c)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[y,o]])},down(o){a._emit(fe(o))},up(o){a._emitUp(fe(o))}},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,t){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 s=this._versioningLevel;if(s!=null&&e<=s)return;let r=t?.hash??this._hashFn;r!==this._hashFn&&(this._hashFn=r);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,c=te(e,i,{id:o,hash:r});c.version=d,this._versioning=c,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 t=Y(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let s of this._extraGuards)if(!s(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,s=e?.actor!=null;if(!t&&!s)return;let r=Y(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(r,i))throw new I({actor:r,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(r,i))throw new I({actor:r,action:i,nodeName:this.name})}this._lastMutation={actor:r,timestamp_ns:ie()}}down(e,t){let s=fe(e);s.length!==0&&(this._checkGuard(t),this._emit(s))}emit(e,t){this._checkGuard(t),this._emit([[y,e]])}up(e,t){if(this._deps.length===0)return;let s=fe(e);if(s.length===0)return;this._checkGuard(t);let r=t??{internal:!0};this._validateUpTiers(s);for(let i of this._deps)i.node.up?.(s,r)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let t of this._deps)t.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let t=this._config.tierOf;for(let s of e){let r=t(s[0]);if(r===3||r===4)throw new Error(`Node "${this.name}": tier-${r} 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,t){if(t!=null&&this._guard!=null){let d=Y(t);if(!this._guard(d,"observe"))throw new I({actor:d,action:"observe",nodeName:this.name})}let r=this._isTerminal&&this._resubscribable;if(r){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 d of this._deps)Te(d);if(this._partial===!1){for(let d of this._deps)if(d.prevData!==void 0||d.dataBatch.length!==0||d.terminal!==void 0||d.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:r},this._actions)}catch(d){throw this._sinkCount-=1,d}this._sinks==null?this._sinks=e:typeof this._sinks=="function"?this._sinks=new Set([this._sinks,e]):this._sinks.add(e);let a=this._isTerminal;if(this._sinkCount===1&&!a)try{this._activate()}catch(d){if(this._sinkCount-=1,this._removeSink(e),this._sinkCount===0&&(this._status="sentinel"),typeof i=="function")try{i()}catch{}throw d}this._status==="sentinel"&&this._cached===void 0&&(this._status="pending");let o=!1;return()=>{o||(o=!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[t]=this._sinks;this._sinks=t}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,t=0;try{for(let s=0;s<e;s++){let r=s,i=this._deps[s];i.unsub=Ie,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let c of a)o(c[0])>=3&&(d=!0),this._config.onMessage(this,c,{direction:"down-in",depIndex:r},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(s){this._deps[t].unsub=null;for(let r=0;r<t;r++){let i=this._deps[r];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}Te(i)}}throw this._dirtyDepCount=0,s}}_addDep(e){for(let r=0;r<this._deps.length;r++)if(this._deps[r].node===e)return r;let t=this._deps.length,s=Ve(e);if(this._deps.push(s),this._sinks==null)return t;s.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z),s.unsub=Ie;try{s.unsub=e.subscribe(r=>{if(s.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of r)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(r){throw s.unsub=null,this._deps.pop(),this._dirtyDepCount--,r}return t}_deactivate(e=!1){let t=this._cleanup;if(this._cleanup=void 0,typeof t=="function")try{t()}catch(s){this._emit([[p,this._wrapFnError("cleanup threw",s)]])}else if(t!=null&&typeof t=="object"){let s=t.deactivate;if(typeof s=="function")try{s()}catch(r){this._emit([[p,this._wrapFnError("cleanup.deactivate threw",r)]])}}for(let s of this._deps){if(s.unsub!=null){let r=s.unsub;s.unsub=null;try{r()}catch{}}Te(s)}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,t){let s=this._deps[e],r=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(r!==C){if(r===w){this._depDirtied(s);return}if(r===x){if(this._depInvalidated(s),this._cached===void 0)return;this._emit(de);return}if(r===N||r===F){this._emit([t]);return}if(r===v){this._emit(Q);return}if(r===y)this._depSettledAsData(s,t[1]);else if(r===T)this._depSettledAsResolved(s);else if(r===k)this._depSettledAsTerminal(s,!0);else if(r===p)this._depSettledAsTerminal(s,t[1]);else{this._emit([t]);return}if(!this._fn){(r===y||r===T)&&this._emit([t]),(r===k||r===p)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(Z))}_depSettledAsData(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(t),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,t){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=t,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 t=this._deps[e];if(t.dataBatch.length===0&&t.prevData===void 0&&t.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(ae),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(t=>t.terminal!==void 0&&t.terminal!==!0);if(e!=null){this._autoError&&this._emit([[p,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(ce)}_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(a){this._emit([[p,this._wrapFnError("cleanup threw",a)]]);return}}else if(e!=null&&typeof e=="object"){let a=e.beforeRun;if(typeof a=="function"){e.beforeRun=void 0;try{a()}catch(o){this._emit([[p,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),s=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=t[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let r=this._deps.map(a=>a.terminal),i={prevData:s,terminalDeps:r,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:s};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(t,this._actions,i);if(typeof a=="function")this._cleanup=a;else if(a!=null&&typeof a=="object"){let o=a;(typeof o.beforeRun=="function"||typeof o.deactivate=="function"||typeof o.invalidate=="function")&&(this._cleanup=a)}}catch(a){this._emit([[p,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Ge?(this._rerunDepth=0,this._emit([[p,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Ge} \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,t){let s=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${s}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[D,e[0]]:e;let s=!0,r=!1,i=!1,a=-1;for(let d of e){let c=t(d[0]);c<a&&(s=!1),c===3&&(r=!0),d[0]===w&&(i=!0),a=c}let o=e;if(!s){let d=e.map((c,l)=>({m:c,i:l,tier:t(c[0])}));d.sort((c,l)=>c.tier-l.tier||c.i-l.i),o=d.map(c=>c.m)}if(r&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[D,...o]:[...o.slice(0,d),D,...o.slice(d)]}return o}_emit(e){if(e.length===0)return;for(let o=0;o<e.length;o++){let d=e[o];if(d[0]===p&&d[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 t=e;if(this._isTerminal&&!this._resubscribable){let o=e.filter(d=>d[0]===v||d[0]===x);if(o.length===0)return;t=o}t=this._frameBatch(t);let r=null;for(let o=0;o<t.length;o++){let d=t[o],c=d[0];if(c!==N&&c!==F){r?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${c===N?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let l=!0;if(this._pausable!==!1){let f=d[1];if(c===N)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(f),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(f))l=!1;else if(this._pauseLocks.delete(f),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let g=this._pauseBuffer;this._pauseBuffer=[],this._emit(g)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}l?r?.push(d):r==null&&(r=t.slice(0,o))}if(r!=null){if(r.length===0)return;t=r}if(this._hasMeta&&t.some(o=>o[0]===v))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(Q)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(t);if(i.length>0&&this._config.inspectorEnabled){let o=this._config.globalInspector;if(o!=null)try{o({kind:"emit",node:this,messages:i})}catch{}}if(i.length>0)if(this._paused&&this._pausable==="resumeAll"&&this._pauseBuffer!=null){let o=this._config.tierOf,d=[];for(let c of i)o(c[0])===3?this._pauseBuffer.push(c):d.push(c);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[p,a]])}_updateState(e){let t=this._config.tierOf,s,r,i=-1,a=0;for(let l of e)t(l[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let l=e.length-1;l>=0;l--)if(e[l][0]===y){d=l;break}}for(let l=0;l<e.length;l++){let f=e[l],g=f[0];if(g===y){if(f.length>=2){let u=!1;if(o&&this._cached!==void 0)try{u=this._equals(this._cached,f[1])}catch(_){r=this._wrapFnError("equals threw",_),i=l;break}if(u){s==null&&(s=e.slice(0,l)),s.push(J),this._status="resolved";continue}this._cached=f[1],this._versioning!=null&&(d<0||l===d)&&ue(this._versioning,f[1],this._hashFn)}this._status="settled",s?.push(f)}else if(s?.push(f),g===w)this._status="dirty";else if(g===T)this._status="resolved";else if(g===k){this._status="completed";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===p){this._status="errored";{let u=this._config.rigorRecorder;if(u!=null)try{u.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(g===x){if(this._cached!==void 0){let _=this._config.rigorRecorder;if(_!=null)try{_.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let u=this._cleanup;if(typeof u=="function"){this._cleanup=void 0;try{u()}catch{}}else if(u!=null&&typeof u=="object"){let _=u.invalidate;if(typeof _=="function")try{_()}catch{}}}else g===v&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let c=i>=0?s??e.slice(0,i):s??e;return r!=null?{finalMessages:c,equalsError:r}:{finalMessages:c}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let s of t)s(e)};_dispatchOrAccumulate(e){if(Ee()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],Me(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}U(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let t=this._frameBatch(e);U(this._deliverToSinks,t,this._config.tierOf)}},He=n=>Array.isArray(n),xe=n=>typeof n=="object"&&n!=null&&!Array.isArray(n);function H(n,e,t){let s=He(n)?n:[],r=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return He(n)?i=(xe(e)?e:t)??{}:xe(n)?i=n:i=(xe(e)?e:t)??{},new V(s,r,i)}function Pe(n,e){if(e!=null&&e.length>0)return new Set(e);switch(n){case"standard":return new Set(["type","status","value","deps","meta","v"]);case"full":return null;case"spec":return new Set(["type","deps","meta","value"]);default:return new Set(["type","deps"])}}function Ue(n){let e=new WeakSet,t={};for(let[s,r]of We(n))t[s]=Ne(r,e);return t}function Ne(n,e){if(n==null)return n;let t=typeof n;if(t==="boolean"||t==="number"||t==="string")return n;if(t==="function")return"<function>";if(Array.isArray(n))return e.has(n)?"<cycle>":(e.add(n),n.map(s=>Ne(s,e)));if(t==="object"){let s=n;if(e.has(s))return"<cycle>";e.add(s);try{if(typeof s.subscribe=="function"&&"cache"in s)return"<Node>"}catch{return"<unserializable>"}let r={};for(let[i,a]of We(s))r[i]=Ne(a,e);return r}return"<unserializable>"}function We(n){let e=[],t;try{t=Object.keys(n)}catch{return e}for(let s of t)try{e.push([s,n[s]])}catch{e.push([s,"<unserializable>"])}return e}function Be(n,e){let t={factory:n};return e!==void 0&&(t.factoryArgs=e),t}function je(n,e){return H([],{...e,initial:n})}function ze(n,e){return H((s,r,i)=>n(r,i)??void 0,{describeKind:"producer",...e})}function he(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);i.emit(e(o,a))},{describeKind:"derived",...t})}function $e(n,e,t){return he(n,e,t)}function Ye(n,e,t){return ke(n,e,t)}function ke(n,e,t){return H(n,(r,i,a)=>{let o=r.map((d,c)=>d!=null&&d.length>0?d.at(-1):a.prevData[c]);return e(o,i,a)??void 0},{describeKind:"effect",...t})}function Ke(n,e,t){let s=new Map;return n.forEach((r,i)=>{s.set(r,i)}),he(n,(r,i)=>e(o=>{let d=s.get(o);if(d==null)throw new Error(`dynamicNode: untracked dep "${o.name??"<unnamed>"}"`);return r[d]},i),t)}function qe(n,e){let t,s=new Map,r=(i,a,o)=>{let d=!1,c=l=>{let f=s.get(l);if(f!==void 0){if(f<i.length){let u=i[f];return u!=null&&u.length>0?u.at(-1):o.prevData[f]}return l.cache}d=!0;let g=t._addDep(l);return s.set(l,g),l.cache};try{let l=n(c,o);d||(a.emit(l),o.store.__autoTrackLastDiscoveryError!=null&&delete o.store.__autoTrackLastDiscoveryError)}catch(l){if(!d)throw l;o.store.__autoTrackLastDiscoveryError=l}};return t=new V([],r,{describeKind:"derived",...e}),t}function Je(n,...e){let t=n;for(let s of e)t=s(t);return t}0&&(module.exports={COMPLETE,COMPLETE_MSG,COMPLETE_ONLY_BATCH,DATA,DEFAULT_ACTOR,DIRTY,DIRTY_MSG,DIRTY_ONLY_BATCH,ERROR,GraphReFlyConfig,GuardDenied,INVALIDATE,INVALIDATE_MSG,INVALIDATE_ONLY_BATCH,NodeImpl,PAUSE,RESOLVED,RESOLVED_MSG,RESOLVED_ONLY_BATCH,RESUME,START,START_MSG,TEARDOWN,TEARDOWN_MSG,TEARDOWN_ONLY_BATCH,accessHintForGuard,advanceVersion,autoTrackNode,batch,configure,createVersioning,defaultConfig,defaultHash,derived,derivedT,downWithBatch,dynamicNode,effect,effectT,factoryTag,isBatching,isV1,monotonicNs,node,normalizeActor,pipe,placeholderArgs,policy,policyFromRules,producer,registerBuiltins,resolveDescribeFields,state,wallClockNs});
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
15
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
16
+
17
+ // src/core/index.ts
18
+ var core_exports = {};
19
+ module.exports = __toCommonJS(core_exports);
20
+ __reExport(core_exports, require("@graphrefly/pure-ts/core"), module.exports);
21
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/core\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAAA;AAAA;AAEA,yBAAc,qCAFd;","names":[]}
@@ -1,3 +1 @@
1
- export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.cjs';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-Cj3WohTd.cjs';
3
- export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-DQjFmVqb.cjs';
1
+ export * from '@graphrefly/pure-ts/core';
@@ -1,3 +1 @@
1
- export { A as Actor, C as COMPLETE, d as COMPLETE_MSG, e as COMPLETE_ONLY_BATCH, D as DATA, f as DEFAULT_ACTOR, g as DIRTY, h as DIRTY_MSG, i as DIRTY_ONLY_BATCH, j as DepRecord, E as ERROR, F as FnCtx, G as GlobalInspectorEvent, k as GlobalInspectorHook, l as GraphReFlyConfig, m as GuardAction, n as GuardDenied, o as GuardDeniedDetails, H as HashFn, I as INVALIDATE, p as INVALIDATE_MSG, q as INVALIDATE_ONLY_BATCH, r as Message, s as MessageContext, t as MessageTypeRegistration, u as MessageTypeRegistrationInput, M as Messages, N as Node, c as NodeActions, v as NodeCtx, w as NodeDescribeKind, x as NodeFn, y as NodeFnCleanup, b as NodeGuard, z as NodeImpl, B as NodeInspectorHook, J as NodeInspectorHookEvent, a as NodeOptions, K as NodeSink, L as NodeStatus, O as NodeTransportOptions, P as NodeVersionInfo, Q as OnMessageHandler, R as OnSubscribeHandler, S as PAUSE, T as PolicyAllow, U as PolicyDeny, W as PolicyRuleData, X as RESOLVED, Y as RESOLVED_MSG, Z as RESOLVED_ONLY_BATCH, _ as RESUME, $ as RigorRecorder, a0 as START, a1 as START_MSG, a2 as SubscribeContext, a3 as TEARDOWN, a4 as TEARDOWN_MSG, a5 as TEARDOWN_ONLY_BATCH, a6 as V0, a7 as V1, V as VersioningLevel, a8 as VersioningOptions, a9 as accessHintForGuard, aa as advanceVersion, ab as configure, ac as createVersioning, ad as defaultConfig, ae as defaultHash, af as isV1, ag as node, ah as normalizeActor, ai as policy, aj as policyFromRules, ak as registerBuiltins } from '../node-kK3CvTrR.js';
2
- export { b as batch, d as downWithBatch, a as isBatching, m as monotonicNs, w as wallClockNs } from '../index-CdTelp1M.js';
3
- export { A as AutoTrackOptions, a as DerivedFn, b as DerivedTFn, c as DescribeDetail, d as DescribeField, D as DescribeNodeOutput, e as DynamicFn, E as EffectFn, f as EffectTFn, N as NodeValues, P as PipeOperator, g as ProducerFn, T as TrackFn, h as autoTrackNode, i as derived, j as derivedT, k as dynamicNode, l as effect, m as effectT, n as factoryTag, p as pipe, o as placeholderArgs, q as producer, r as resolveDescribeFields, s as state } from '../sugar-fhLIE7TT.js';
1
+ export * from '@graphrefly/pure-ts/core';
@@ -1 +1,3 @@
1
- import"../chunk-KZIEYVXN.js";import{a as Z,b as _,c as $}from"../chunk-GHBWHMRZ.js";import{A as M,B as N,C as O,D as P,E as Q,F as R,G as S,H as T,I as U,J as V,K as W,L as X,M as Y,i as v,j as w,k as x,m as y,n as z,o as A,p as B,q as C,r as D,s as E,t as F,u as G,v as H,w as I,x as J,y as K,z as L}from"../chunk-NTEURFZH.js";import{a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u}from"../chunk-CK2E7BTU.js";import"../chunk-QYADASLV.js";export{i as COMPLETE,o as COMPLETE_MSG,t as COMPLETE_ONLY_BATCH,b as DATA,v as DEFAULT_ACTOR,c as DIRTY,k as DIRTY_MSG,q as DIRTY_ONLY_BATCH,j as ERROR,C as GraphReFlyConfig,E as GuardDenied,e as INVALIDATE,m as INVALIDATE_MSG,s as INVALIDATE_ONLY_BATCH,O as NodeImpl,f as PAUSE,d as RESOLVED,l as RESOLVED_MSG,r as RESOLVED_ONLY_BATCH,g as RESUME,a as START,n as START_MSG,h as TEARDOWN,p as TEARDOWN_MSG,u as TEARDOWN_ONLY_BATCH,H as accessHintForGuard,K as advanceVersion,X as autoTrackNode,y as batch,N as configure,J as createVersioning,M as defaultConfig,I as defaultHash,S as derived,T as derivedT,z as downWithBatch,W as dynamicNode,V as effect,U as effectT,$ as factoryTag,x as isBatching,L as isV1,A as monotonicNs,P as node,w as normalizeActor,Y as pipe,_ as placeholderArgs,F as policy,G as policyFromRules,R as producer,D as registerBuiltins,Z as resolveDescribeFields,Q as state,B as wallClockNs};
1
+ // src/core/index.ts
2
+ export * from "@graphrefly/pure-ts/core";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/index.ts"],"sourcesContent":["// Phase 13.9.A shim — re-export from pure-TS sibling until\n// @graphrefly/native (napi binding) and per-milestone swap-overs land.\nexport * from \"@graphrefly/pure-ts/core\";\n"],"mappings":";AAEA,cAAc;","names":[]}