@graphrefly/graphrefly 0.35.0 → 0.37.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 (193) hide show
  1. package/dist/{chunk-EUE7ELFQ.js → chunk-2C4NESZE.js} +1 -1
  2. package/dist/{chunk-PIIUJIF7.js → chunk-4EATTNAE.js} +1 -1
  3. package/dist/chunk-B4L5X2QO.js +7 -0
  4. package/dist/{chunk-YV2A2VWG.js → chunk-C5CBVOCB.js} +1 -1
  5. package/dist/{chunk-J6TGRQUP.js → chunk-CZIQ6JCE.js} +1 -1
  6. package/dist/chunk-FJ6IEMOS.js +1 -0
  7. package/dist/{chunk-T7GWBGOO.js → chunk-FMI4CWFL.js} +1 -1
  8. package/dist/{chunk-RRFOCAH6.js → chunk-G6Q3DUMJ.js} +1 -1
  9. package/dist/{chunk-CD4CB6S7.js → chunk-GDDPCDLG.js} +1 -1
  10. package/dist/{chunk-3OT7K33Q.js → chunk-GFOT6UBB.js} +1 -1
  11. package/dist/{chunk-53XJ2S6D.js → chunk-K2WYIVHM.js} +1 -1
  12. package/dist/{chunk-5XZRCS2M.js → chunk-K6ZFJ473.js} +1 -1
  13. package/dist/{chunk-E5YSBQSF.js → chunk-KTWBUJO5.js} +1 -1
  14. package/dist/{chunk-RLMYS3XZ.js → chunk-KUVDFOJH.js} +1 -1
  15. package/dist/{chunk-XMDNNSMK.js → chunk-LOQRPP4Y.js} +1 -1
  16. package/dist/{chunk-2Y3DKIZL.js → chunk-MC5LZG3U.js} +1 -1
  17. package/dist/{chunk-M5UC63ZI.js → chunk-NKKUUKPD.js} +1 -1
  18. package/dist/{chunk-GWOKTENT.js → chunk-QKBCTKH7.js} +1 -1
  19. package/dist/{chunk-YOUAVGHJ.js → chunk-QP5TH523.js} +1 -1
  20. package/dist/{chunk-T6RPUERH.js → chunk-QWVQIL3T.js} +1 -1
  21. package/dist/{chunk-6G5YD37E.js → chunk-T4U24DXX.js} +1 -1
  22. package/dist/{chunk-W2ZU226Q.js → chunk-TFK4P4CX.js} +1 -1
  23. package/dist/{chunk-PVUTRA5K.js → chunk-TLS7M7H4.js} +1 -1
  24. package/dist/{chunk-BGEY3PXH.js → chunk-U3COB5WU.js} +1 -1
  25. package/dist/{chunk-UAMWD4GG.js → chunk-UODQF4EY.js} +1 -1
  26. package/dist/{chunk-U347KVM4.js → chunk-WGST56ZH.js} +1 -1
  27. package/dist/{chunk-XINLP35X.js → chunk-WSLN4JFO.js} +1 -1
  28. package/dist/{chunk-ZGVA2SR5.js → chunk-XIJKEXWR.js} +1 -1
  29. package/dist/{chunk-JUJEPZOI.js → chunk-YVYSO5CW.js} +1 -1
  30. package/dist/compat/index.cjs +9 -9
  31. package/dist/compat/index.d.cts +6 -6
  32. package/dist/compat/index.d.ts +6 -6
  33. package/dist/compat/index.js +1 -1
  34. package/dist/compat/nestjs/index.cjs +11 -11
  35. package/dist/compat/nestjs/index.d.cts +4 -4
  36. package/dist/compat/nestjs/index.d.ts +4 -4
  37. package/dist/compat/nestjs/index.js +1 -1
  38. package/dist/compat/zustand/index.cjs +7 -7
  39. package/dist/compat/zustand/index.d.cts +2 -2
  40. package/dist/compat/zustand/index.d.ts +2 -2
  41. package/dist/compat/zustand/index.js +1 -1
  42. package/dist/extra/index.cjs +17 -17
  43. package/dist/extra/index.d.cts +3 -3
  44. package/dist/extra/index.d.ts +3 -3
  45. package/dist/extra/index.js +1 -1
  46. package/dist/extra/reactive.cjs +1 -1
  47. package/dist/extra/reactive.d.cts +1 -1
  48. package/dist/extra/reactive.d.ts +1 -1
  49. package/dist/extra/reactive.js +1 -1
  50. package/dist/graph/index.cjs +7 -7
  51. package/dist/graph/index.d.cts +3 -3
  52. package/dist/graph/index.d.ts +3 -3
  53. package/dist/graph/index.js +1 -1
  54. package/dist/{graph-kTltt95s.d.cts → graph-CaNXUc3c.d.cts} +26 -1
  55. package/dist/{graph-Cv-8x0ZI.d.ts → graph-YQXDndFy.d.ts} +26 -1
  56. package/dist/{index-KNAMYngu.d.ts → index-0qOD-421.d.ts} +2 -2
  57. package/dist/{index-CfOSES72.d.cts → index-4IwO4mH2.d.cts} +5 -5
  58. package/dist/{index-CAIhFfws.d.ts → index-9mbs_PIG.d.ts} +2 -2
  59. package/dist/{index-Bilohojo.d.ts → index-Ae6L8liv.d.ts} +2 -2
  60. package/dist/{index-BhkPzu-Z.d.cts → index-B1IcU--K.d.cts} +2 -2
  61. package/dist/{index-DzgS5uYi.d.ts → index-B46GWgk3.d.ts} +1 -1
  62. package/dist/{index-BpFwRAf9.d.cts → index-B9qJmmv3.d.cts} +1 -1
  63. package/dist/{index-CI_yjtua.d.ts → index-BCq12BqB.d.ts} +1 -1
  64. package/dist/{index-zK_mN1D-.d.cts → index-BECJ8M0T.d.cts} +2 -2
  65. package/dist/{index-DFe2Pk2u.d.ts → index-BOfHwQc1.d.ts} +1 -1
  66. package/dist/{index-hXKhbfh-.d.ts → index-BhLA9feT.d.ts} +12 -7
  67. package/dist/{index-Dp69u0ym.d.ts → index-BmLkcDlj.d.ts} +6 -6
  68. package/dist/{index-XxSeddWP.d.cts → index-BokynmA4.d.cts} +1 -1
  69. package/dist/{index-BEvsFlfH.d.ts → index-Bpzw8hx3.d.ts} +2 -2
  70. package/dist/{index-PluovH45.d.cts → index-BwtIbzSV.d.cts} +2 -2
  71. package/dist/{index-BZ1V5GzX.d.ts → index-C-pFD_FV.d.ts} +2 -2
  72. package/dist/{index-Cot94_82.d.ts → index-C0tga1_x.d.ts} +2 -2
  73. package/dist/{index-BlRVj-7Q.d.cts → index-C4N-dg5U.d.cts} +2 -2
  74. package/dist/{index-B4s70vYf.d.ts → index-CKcnuQ2c.d.ts} +2 -2
  75. package/dist/{index-D7r_vd0b.d.cts → index-CLPQyYY5.d.cts} +3 -3
  76. package/dist/{index-BuMzxRO2.d.ts → index-CRycrNfn.d.ts} +1 -1
  77. package/dist/{index-DeyzuqAi.d.cts → index-CU3z8Cel.d.cts} +2 -2
  78. package/dist/{index-DwNNufVa.d.ts → index-CUTHDZ7Q.d.ts} +3 -3
  79. package/dist/{index-CGKs5ixV.d.cts → index-C_qi0WlF.d.cts} +12 -7
  80. package/dist/{index-BBdwz2BW.d.ts → index-CajEOoAN.d.ts} +2 -2
  81. package/dist/{index-CzC0G0C3.d.cts → index-Ci358GSC.d.cts} +2 -2
  82. package/dist/{index-BkbawFkI.d.cts → index-CkN8CZlT.d.cts} +6 -6
  83. package/dist/{index-ZhKyR8co.d.cts → index-CrpjECS6.d.cts} +2 -2
  84. package/dist/{index-C40wA8zt.d.ts → index-CzIWlnPp.d.ts} +5 -5
  85. package/dist/{index-C9xF16gc.d.ts → index-D0ZxFXYl.d.ts} +2 -2
  86. package/dist/{index-BtY2QVDf.d.cts → index-D11pGlaI.d.cts} +2 -2
  87. package/dist/{index-DlccEIi3.d.ts → index-D1E1tqHT.d.ts} +1 -1
  88. package/dist/{index-Qq-G9B6g.d.cts → index-D6pwWiOc.d.cts} +2 -2
  89. package/dist/{index-BsZlbHM5.d.cts → index-D6tRNEKz.d.cts} +1 -1
  90. package/dist/{index-B3Dfl5sS.d.cts → index-DAKm44My.d.cts} +2 -2
  91. package/dist/{index-BWH17rK_.d.cts → index-DCAuN9u5.d.cts} +1 -1
  92. package/dist/{index-BF-ssbJB.d.ts → index-DPqR3wdW.d.ts} +2 -2
  93. package/dist/{index-GaW6Welt.d.cts → index-DTYIRT_v.d.cts} +2 -2
  94. package/dist/{index-DXSLMoma.d.ts → index-DXz9uwcs.d.ts} +1 -1
  95. package/dist/{index-DmtWMP0X.d.cts → index-D_DThl_J.d.cts} +1 -1
  96. package/dist/{index-BwYGLgmI.d.ts → index-D_d1erkR.d.ts} +2 -2
  97. package/dist/{index-D9qoEOj_.d.cts → index-DbWwMWiB.d.cts} +1 -1
  98. package/dist/{index-D6JRP-1_.d.cts → index-DcWbx58m.d.cts} +2 -2
  99. package/dist/{index-DzYTXMBz.d.ts → index-DfAo9WKr.d.ts} +1 -1
  100. package/dist/{index-DXZsXxtU.d.cts → index-DqtXA3yX.d.cts} +2 -2
  101. package/dist/{index-DBmBtqAN.d.ts → index-DuhOdNyg.d.ts} +2 -2
  102. package/dist/{index-DKp1CIbG.d.cts → index-e1m3ZHgc.d.cts} +1 -1
  103. package/dist/{index-DSD6xnbT.d.ts → index-fHKHdAso.d.ts} +2 -2
  104. package/dist/index.cjs +41 -41
  105. package/dist/index.d.cts +29 -29
  106. package/dist/index.d.ts +29 -29
  107. package/dist/index.js +1 -1
  108. package/dist/patterns/ai/index.cjs +19 -19
  109. package/dist/patterns/ai/index.d.cts +7 -7
  110. package/dist/patterns/ai/index.d.ts +7 -7
  111. package/dist/patterns/ai/index.js +1 -1
  112. package/dist/patterns/audit/index.cjs +7 -7
  113. package/dist/patterns/audit/index.d.cts +4 -4
  114. package/dist/patterns/audit/index.d.ts +4 -4
  115. package/dist/patterns/audit/index.js +1 -1
  116. package/dist/patterns/cqrs/index.cjs +7 -7
  117. package/dist/patterns/cqrs/index.d.cts +3 -3
  118. package/dist/patterns/cqrs/index.d.ts +3 -3
  119. package/dist/patterns/cqrs/index.js +1 -1
  120. package/dist/patterns/demo-shell/index.cjs +8 -8
  121. package/dist/patterns/demo-shell/index.d.cts +3 -3
  122. package/dist/patterns/demo-shell/index.d.ts +3 -3
  123. package/dist/patterns/demo-shell/index.js +1 -1
  124. package/dist/patterns/domain-templates/index.cjs +7 -7
  125. package/dist/patterns/domain-templates/index.d.cts +2 -2
  126. package/dist/patterns/domain-templates/index.d.ts +2 -2
  127. package/dist/patterns/domain-templates/index.js +1 -1
  128. package/dist/patterns/graphspec/index.cjs +17 -17
  129. package/dist/patterns/graphspec/index.d.cts +2 -2
  130. package/dist/patterns/graphspec/index.d.ts +2 -2
  131. package/dist/patterns/graphspec/index.js +1 -1
  132. package/dist/patterns/guarded-execution/index.cjs +7 -7
  133. package/dist/patterns/guarded-execution/index.d.cts +5 -5
  134. package/dist/patterns/guarded-execution/index.d.ts +5 -5
  135. package/dist/patterns/guarded-execution/index.js +1 -1
  136. package/dist/patterns/harness/index.cjs +10 -10
  137. package/dist/patterns/harness/index.d.cts +7 -7
  138. package/dist/patterns/harness/index.d.ts +7 -7
  139. package/dist/patterns/harness/index.js +1 -1
  140. package/dist/patterns/job-queue/index.cjs +7 -7
  141. package/dist/patterns/job-queue/index.d.cts +3 -3
  142. package/dist/patterns/job-queue/index.d.ts +3 -3
  143. package/dist/patterns/job-queue/index.js +1 -1
  144. package/dist/patterns/lens/index.cjs +7 -7
  145. package/dist/patterns/lens/index.d.cts +3 -3
  146. package/dist/patterns/lens/index.d.ts +3 -3
  147. package/dist/patterns/lens/index.js +1 -1
  148. package/dist/patterns/memory/index.cjs +7 -7
  149. package/dist/patterns/memory/index.d.cts +2 -2
  150. package/dist/patterns/memory/index.d.ts +2 -2
  151. package/dist/patterns/memory/index.js +1 -1
  152. package/dist/patterns/messaging/index.cjs +7 -7
  153. package/dist/patterns/messaging/index.d.cts +3 -3
  154. package/dist/patterns/messaging/index.d.ts +3 -3
  155. package/dist/patterns/messaging/index.js +1 -1
  156. package/dist/patterns/orchestration/index.cjs +7 -7
  157. package/dist/patterns/orchestration/index.d.cts +3 -3
  158. package/dist/patterns/orchestration/index.d.ts +3 -3
  159. package/dist/patterns/orchestration/index.js +1 -1
  160. package/dist/patterns/process/index.cjs +1 -1
  161. package/dist/patterns/process/index.d.cts +4 -4
  162. package/dist/patterns/process/index.d.ts +4 -4
  163. package/dist/patterns/process/index.js +1 -1
  164. package/dist/patterns/reactive-layout/index.cjs +8 -8
  165. package/dist/patterns/reactive-layout/index.d.cts +3 -3
  166. package/dist/patterns/reactive-layout/index.d.ts +3 -3
  167. package/dist/patterns/reactive-layout/index.js +1 -1
  168. package/dist/patterns/reduction/index.cjs +7 -7
  169. package/dist/patterns/reduction/index.d.cts +2 -2
  170. package/dist/patterns/reduction/index.d.ts +2 -2
  171. package/dist/patterns/reduction/index.js +1 -1
  172. package/dist/patterns/refine-loop/index.cjs +8 -8
  173. package/dist/patterns/refine-loop/index.d.cts +4 -4
  174. package/dist/patterns/refine-loop/index.d.ts +4 -4
  175. package/dist/patterns/refine-loop/index.js +1 -1
  176. package/dist/patterns/resilient-pipeline/index.d.cts +3 -3
  177. package/dist/patterns/resilient-pipeline/index.d.ts +3 -3
  178. package/dist/patterns/resilient-pipeline/index.js +1 -1
  179. package/dist/patterns/surface/index.cjs +10 -10
  180. package/dist/patterns/surface/index.d.cts +3 -3
  181. package/dist/patterns/surface/index.d.ts +3 -3
  182. package/dist/patterns/surface/index.js +1 -1
  183. package/dist/{pipeline-graph-B85HUrWg.d.cts → pipeline-graph-BrrYGjuZ.d.cts} +2 -2
  184. package/dist/{pipeline-graph-HOTU4UG0.d.ts → pipeline-graph-DX2Twdj-.d.ts} +2 -2
  185. package/dist/{reactive-layout-Btv0-efV.d.ts → reactive-layout-BDdngW56.d.ts} +1 -1
  186. package/dist/{reactive-layout-D9zqqaqK.d.cts → reactive-layout-DrGjuwyC.d.cts} +1 -1
  187. package/dist/{reactive-log-CgbNqksB.d.cts → reactive-log-ScpWyqny.d.cts} +11 -3
  188. package/dist/{reactive-log-ByBb8g6A.d.ts → reactive-log-jirQsxMY.d.ts} +11 -3
  189. package/dist/{topology-tree-CJsT24DP.d.ts → topology-tree-BI665P0L.d.ts} +1 -1
  190. package/dist/{topology-tree-C50l9ARE.d.cts → topology-tree-BkhmMg2a.d.cts} +1 -1
  191. package/package.json +1 -1
  192. package/dist/chunk-5KPIYVCC.js +0 -7
  193. package/dist/chunk-CUQFO6MT.js +0 -1
@@ -1 +1 @@
1
- "use strict";var pe=Object.defineProperty;var an=Object.getOwnPropertyDescriptor;var dn=Object.getOwnPropertyNames;var un=Object.prototype.hasOwnProperty;var F=(t,e)=>()=>(t&&(e=t(t=0)),e);var cn=(t,e)=>{for(var n in e)pe(t,n,{get:e[n],enumerable:!0})},ln=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of dn(e))!un.call(t,s)&&s!==n&&pe(t,s,{get:()=>e[s],enumerable:!(r=an(e,s))||r.enumerable});return t};var fn=t=>ln(pe({},"__esModule",{value:!0}),t);function j(){return Date.now()*1e6}var ge=F(()=>{"use strict"});var q,N,P,I,U,B,ne,z,M,T,K,me,hn,ye,pn,gn,_e,De,Le,Fe,be,Y=F(()=>{"use strict";q=Symbol.for("graphrefly/START"),N=Symbol.for("graphrefly/DATA"),P=Symbol.for("graphrefly/DIRTY"),I=Symbol.for("graphrefly/RESOLVED"),U=Symbol.for("graphrefly/INVALIDATE"),B=Symbol.for("graphrefly/PAUSE"),ne=Symbol.for("graphrefly/RESUME"),z=Symbol.for("graphrefly/TEARDOWN"),M=Symbol.for("graphrefly/COMPLETE"),T=Symbol.for("graphrefly/ERROR"),K=Object.freeze([P]),me=Object.freeze([I]),hn=Object.freeze([U]),ye=Object.freeze([q]),pn=Object.freeze([M]),gn=Object.freeze([z]),_e=Object.freeze([K]),De=Object.freeze([me]),Le=Object.freeze([hn]),Fe=Object.freeze([pn]),be=Object.freeze([gn])});function Pe(t){t.registerCodec(mn)}var mn,Ie=F(()=>{"use strict";mn={name:"json",version:1,contentType:"application/json",encode(t){let e=JSON.stringify(t);return new TextEncoder().encode(e)},decode(t,e){let n=new TextDecoder().decode(t);return JSON.parse(n)}}});function de(t){if(t==null)return yn;let{type:e,id:n,...r}=t;return{type:e??"system",id:n??"",...r}}var yn,Ve=F(()=>{"use strict";yn={type:"system",id:""}});function ze(){return J>0||te}function Ge(){return J>0}function He(t){J>0?re.push(t):t()}function Ue(t){J+=1;let e=!1;try{t()}catch(n){throw e=!0,n}finally{if(J-=1,J===0)if(e){if(!te){let n=re.splice(0);for(let r of n)try{r()}catch{}W.length=0,$.length=0,X.length=0}}else _n()}}function _n(){let t=!te;t&&(te=!0);let e=[],n=0;try{for(;W.length>0||$.length>0||X.length>0||t&&re.length>0;){if(t&&re.length>0){let i=re.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(n+=1,n>1e3)throw W.length=0,$.length=0,X.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let s=(W.length>0?W:$.length>0?$:X).splice(0);for(let i of s)try{i()}catch(a){e.push(a)}}}finally{t&&(te=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ue(t,e,n){if(e.length===0)return;if(e.length===1){let l=n(e[0][0]);if(l<3||!ze()){t(e);return}(l>=5?X:l===4?$:W).push(()=>t(e));return}let r=e.length,s=r,i=r,a=r,o=0;for(;o<r&&n(e[o][0])<3;)o++;for(s=o;o<r&&n(e[o][0])===3;)o++;for(i=o;o<r&&n(e[o][0])===4;)o++;a=o;let d=ze();if(s>0){let l=e.slice(0,s);t(l)}if(i>s){let l=e.slice(s,i);d?W.push(()=>t(l)):t(l)}if(a>i){let l=e.slice(i,a);d?$.push(()=>t(l)):t(l)}if(r>a){let l=e.slice(a,r);d?X.push(()=>t(l)):t(l)}}var J,te,W,$,X,re,ve=F(()=>{"use strict";J=0,te=!1,W=[],$=[],X=[],re=[]});function Be(t){t.registerMessageType(q,{tier:0,wireCrossing:!1}),t.registerMessageType(P,{tier:1,wireCrossing:!1}),t.registerMessageType(U,{tier:1,wireCrossing:!1,metaPassthrough:!1}),t.registerMessageType(B,{tier:2,wireCrossing:!1}),t.registerMessageType(ne,{tier:2,wireCrossing:!1}),t.registerMessageType(N,{tier:3,wireCrossing:!0}),t.registerMessageType(I,{tier:3,wireCrossing:!0}),t.registerMessageType(M,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(T,{tier:4,wireCrossing:!0,metaPassthrough:!1}),t.registerMessageType(z,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var ce,We=F(()=>{"use strict";Y();ce=class{_messageTypes=new Map;_codecs=new Map;_onMessage;_onSubscribe;_defaultVersioning;_defaultHashFn;_inspectorEnabled=!(typeof process<"u"&&process.env?.NODE_ENV==="production");_globalInspector;_rigorRecorder;_frozen=!1;tierOf;constructor(e){this._onMessage=e.onMessage,this._onSubscribe=e.onSubscribe,this._defaultVersioning=e.defaultVersioning,this._defaultHashFn=e.defaultHashFn,this.tierOf=n=>{let r=this._messageTypes.get(n);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,n){return this._assertUnfrozen(),this._messageTypes.set(e,{tier:n.tier,wireCrossing:n.wireCrossing??n.tier>=3,metaPassthrough:n.metaPassthrough??!0}),this}messageTier(e){let n=this._messageTypes.get(e);return n!=null?n.tier:1}isWireCrossing(e){let n=this._messageTypes.get(e);return n!=null?n.wireCrossing:!0}isLocalOnly(e){return!this.isWireCrossing(e)}isMetaPassthrough(e){let n=this._messageTypes.get(e);return n!=null?n.metaPassthrough:!0}isKnownMessageType(e){return this._messageTypes.has(e)}registerCodec(e){return this._assertUnfrozen(),this._codecs.set(e.name,e),this}lookupCodec(e){return this._codecs.get(e)}_isFrozen(){return this._frozen}_assertUnfrozen(){if(this._frozen)throw new Error("GraphReFlyConfig is frozen: a node has already captured this config. Register custom types and set hooks before creating any node.")}}});function $e(t){return Array.isArray(t)?[...t]:[t]}function bn(t,e){return t.has(e)||t.has("*")}function je(t){let e=[];return t((s,i)=>{e.push({kind:"allow",actions:new Set($e(s)),where:i?.where??(()=>!0)})},(s,i)=>{e.push({kind:"deny",actions:new Set($e(s)),where:i?.where??(()=>!0)})}),(s,i)=>{let a=!1,o=!1;for(let d of e)bn(d.actions,i)&&d.where(s)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}var Z,Te=F(()=>{"use strict";Z=class extends Error{actor;action;nodeName;constructor(e,n){super(n??`GuardDenied: action "${String(e.action)}" denied for actor type "${String(e.actor.type)}"`),this.name="GuardDenied",this.actor=e.actor,this.action=e.action,this.nodeName=e.nodeName}get node(){return this.nodeName}}});function we(t){if(t===void 0)return null;if(typeof t=="number"){if(!Number.isFinite(t))throw new TypeError(`Cannot hash non-finite number: ${t}`);if(Number.isInteger(t)&&!Number.isSafeInteger(t))throw new TypeError(`Cannot hash integer outside safe range (|n| > 2^53-1): ${t}. Cross-language cid parity is not guaranteed for unsafe integers.`);return t}if(typeof t=="string"||typeof t=="boolean"||t===null)return t;if(Array.isArray(t))return t.map(we);if(typeof t=="object"&&t!==null){let e={};for(let n of Object.keys(t).sort())e[n]=we(t[n]);return e}return null}function wn(t){let e=Tn.encode(t),n=e.length,r=n*8,s=n+9+63&-64,i=new Uint8Array(s);i.set(e),i[n]=128;let a=new DataView(i.buffer);a.setUint32(s-4,r>>>0,!1),a.setUint32(s-8,Math.floor(r/4294967296)>>>0,!1);let o=1779033703,d=3144134277,l=1013904242,p=2773480762,y=1359893119,_=2600822924,v=528734635,k=1541459225,E=new Uint32Array(64),R=(C,x)=>C>>>x|C<<32-x;for(let C=0;C<s;C+=64){for(let h=0;h<16;h++)E[h]=a.getUint32(C+h*4,!1);for(let h=16;h<64;h++){let m=E[h-15],b=E[h-2],w=R(m,7)^R(m,18)^m>>>3,D=R(b,17)^R(b,19)^b>>>10;E[h]=E[h-16]+w+E[h-7]+D>>>0}let x=o,O=d,L=l,V=p,c=y,g=_,u=v,f=k;for(let h=0;h<64;h++){let m=R(c,6)^R(c,11)^R(c,25),b=c&g^~c&u,w=f+m+b+vn[h]+E[h]>>>0,D=R(x,2)^R(x,13)^R(x,22),S=x&O^x&L^O&L,G=D+S>>>0;f=u,u=g,g=c,c=V+w>>>0,V=L,L=O,O=x,x=w+G>>>0}o=o+x>>>0,d=d+O>>>0,l=l+L>>>0,p=p+V>>>0,y=y+c>>>0,_=_+g>>>0,v=v+u>>>0,k=k+f>>>0}let A=C=>C.toString(16).padStart(8,"0");return A(o)+A(d)+A(l)+A(p)+A(y)+A(_)+A(v)+A(k)}function xe(t){let e=we(t??null),n=JSON.stringify(e);return wn(n).slice(0,16)}function xn(){let t=globalThis.crypto;if(t?.randomUUID)return t.randomUUID();let e=()=>Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0"),n=e()+e()+e()+e();return`${n.slice(0,8)}-${n.slice(8,12)}-4${n.slice(13,16)}-${(parseInt(n.slice(16,17),16)&3|8).toString(16)}${n.slice(17,20)}-${n.slice(20,32)}`}function Ne(t,e,n){let r=n?.id??xn();if(t===0)return{id:r,version:0};let i=(n?.hash??xe)(e);return{id:r,version:0,cid:i,prev:null}}function qe(t,e,n){t.version+=1,"cid"in t&&(t.prev=t.cid,t.cid=n(e))}var vn,Tn,Ke=F(()=>{"use strict";vn=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]),Tn=new TextEncoder});function Xe(t){return{node:t,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function ke(t){t.prevData=void 0,t.dirty=!1,t.involvedThisWave=!1,t.dataBatch.length=0,t.terminal=void 0}function le(t){return t.length===0?t:typeof t[0]=="symbol"?[t]:t}function Q(t,e,n){let r=Ze(t)?t:[],s=typeof t=="function"?t:typeof e=="function"?e:void 0,i={};return Ze(t)?i=(Ee(e)?e:n)??{}:Ee(t)?i=t:i=(Ee(e)?e:n)??{},new fe(r,s,i)}var Ye,Je,Nn,kn,Se,fe,Ze,Ee,Ae=F(()=>{"use strict";Ie();Ve();ve();ge();We();Te();Y();Ke();Ye=()=>{},Je=100;Nn=(t,e,n,r)=>{n.direction==="down-in"&&t._onDepMessage(n.depIndex,e)},kn=(t,e,n,r)=>{let s=t;if(s._status==="completed"||s._status==="errored")return;let i=s._cached,a=i===void 0?[ye]:[ye,[N,i]];s._status==="dirty"&&a.push(K),ue(e,a,s._config.tierOf)},Se=new ce({onMessage:Nn,onSubscribe:kn});Be(Se);Pe(Se);fe=class t{_optsName;_describeKind;meta;_hasMeta;_config;_deps;_sinks=null;_sinkCount=0;_cached;_status;_cleanup;_store={};_waveHasNewData=!1;_hasNewTerminal=!1;_hasCalledFnOnce=!1;_paused=!1;_pendingWave=!1;_isExecutingFn=!1;_pendingRerun=!1;_rerunDepth=0;_dirtyDepCount=0;_batchPendingMessages=null;_pauseLocks=null;_pauseBuffer=null;_fn;_equals;_resubscribable;_resetOnTeardown;_autoComplete;_autoError;_pausable;_partial;_guard;_extraGuards;_hashFn;_versioning;_versioningLevel;_lastMutation;_inspectorHooks;_actions;constructor(e,n,r){this._config=r.config??Se,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=n,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&n==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??xe;let s=r.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?Ne(s,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Xe);let i={};for(let[o,d]of Object.entries(r.meta??{})){let l={initial:d,name:`${r.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};r.guard!=null&&(l.guard=r.guard),i[o]=new t([],void 0,l)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[N,o]])},down(o){a._emit(le(o))},up(o){a._emitUp(le(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,n){if(this._isExecutingFn)throw new Error(`Node "${this.name}": _applyVersioning cannot run mid-fn \u2014 call it outside of \`_execFn\` (typically at graph setup time before the first subscribe).`);let r=this._versioningLevel;if(r!=null&&e<=r)return;let s=n?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??n?.id,d=a?.version??0,l=Ne(e,i,{id:o,hash:s});l.version=d,this._versioning=l,this._versioningLevel=e}_setInspectorHook(e){return e==null?()=>{}:(this._inspectorHooks==null&&(this._inspectorHooks=new Set),this._inspectorHooks.add(e),()=>{this._inspectorHooks?.delete(e),this._inspectorHooks?.size===0&&(this._inspectorHooks=void 0)})}_pushGuard(e){return this._extraGuards==null&&(this._extraGuards=new Set),this._extraGuards.add(e),()=>{this._extraGuards?.delete(e),this._extraGuards?.size===0&&(this._extraGuards=void 0)}}allowsObserve(e){if(this._guard==null&&this._extraGuards==null)return!0;let n=de(e);if(this._guard!=null&&!this._guard(n,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(n,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let n=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!n&&!r)return;let s=de(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,i))throw new Z({actor:s,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(s,i))throw new Z({actor:s,action:i,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:j()}}down(e,n){let r=le(e);r.length!==0&&(this._checkGuard(n),this._emit(r))}emit(e,n){this._checkGuard(n),this._emit([[N,e]])}up(e,n){if(this._deps.length===0)return;let r=le(e);if(r.length===0)return;this._checkGuard(n);let s=n??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,s)}_emitUp(e){if(this._deps.length!==0&&e.length!==0){this._validateUpTiers(e);for(let n of this._deps)n.node.up?.(e,{internal:!0})}}_validateUpTiers(e){let n=this._config.tierOf;for(let r of e){let s=n(r[0]);if(s===3||s===4)throw new Error(`Node "${this.name}": tier-${s} messages cannot flow up \u2014 DATA/RESOLVED/COMPLETE/ERROR are downstream-only. Use \`down(...)\` for value delivery; \`up(...)\` is for control signals (DIRTY, INVALIDATE, PAUSE, RESUME, TEARDOWN).`)}}subscribe(e,n){if(n!=null&&this._guard!=null){let d=de(n);if(!this._guard(d,"observe"))throw new Z({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)ke(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: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 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[n]=this._sinks;this._sinks=n}else this._sinks.size===0&&(this._sinks=null)}_activate(){if(this._deps.length===0){this._fn&&this._execFn();return}this._dirtyDepCount=0;let e=this._deps.length,n=0;try{for(let r=0;r<e;r++){let s=r,i=this._deps[r];i.unsub=Ye,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let l of a)o(l[0])>=3&&(d=!0),this._config.onMessage(this,l,{direction:"down-in",depIndex:s},this._actions);d&&this._maybeRunFnOnSettlement()}),n++}}catch(r){this._deps[n].unsub=null;for(let s=0;s<n;s++){let i=this._deps[s];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}ke(i)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===e)return s;let n=this._deps.length,r=Xe(e);if(this._deps.push(r),this._sinks==null)return n;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e),r.unsub=Ye;try{r.unsub=e.subscribe(s=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of s)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:n},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(s){throw r.unsub=null,this._deps.pop(),this._dirtyDepCount--,s}return n}_deactivate(e=!1){let n=this._cleanup;if(this._cleanup=void 0,typeof n=="function")try{n()}catch(r){this._emit([[T,this._wrapFnError("cleanup threw",r)]])}else if(n!=null&&typeof n=="object"){let r=n.deactivate;if(typeof r=="function")try{r()}catch(s){this._emit([[T,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let r of this._deps){if(r.unsub!=null){let s=r.unsub;r.unsub=null;try{s()}catch{}}ke(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,n){let r=this._deps[e],s=n[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:n};for(let a of this._inspectorHooks)a(i)}if(s!==q){if(s===P){this._depDirtied(r);return}if(s===U){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(Le);return}if(s===B||s===ne){this._emit([n]);return}if(s===z){this._emit(be);return}if(s===N)this._depSettledAsData(r,n[1]);else if(s===I)this._depSettledAsResolved(r);else if(s===M)this._depSettledAsTerminal(r,!0);else if(s===T)this._depSettledAsTerminal(r,n[1]);else{this._emit([n]);return}if(!this._fn){(s===N||s===I)&&this._emit([n]),(s===M||s===T)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e))}_depSettledAsData(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.involvedThisWave=!0,e.dataBatch.push(n),this._waveHasNewData=!0}_depSettledAsResolved(e){e.dirty&&(e.dirty=!1,this._dirtyDepCount--)}_depSettledAsTerminal(e,n){e.dirty&&(e.dirty=!1,this._dirtyDepCount--),e.terminal=n,e.involvedThisWave=!0,this._hasNewTerminal=!0}_depInvalidated(e){e.prevData=void 0,e.terminal=void 0,e.dataBatch.length=0,e.dirty?e.involvedThisWave=!1:(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++)}_maybeRunFnOnSettlement(){if(!(this._isTerminal&&!this._resubscribable)&&!(this._dirtyDepCount>0)){if(!this._partial&&!this._hasCalledFnOnce)for(let e=0;e<this._deps.length;e++){let n=this._deps[e];if(n.dataBatch.length===0&&n.prevData===void 0&&n.terminal===void 0){this._maybeAutoTerminalAfterWave();return}}if(this._paused){this._pendingWave=!0;return}if(!this._waveHasNewData&&!this._hasNewTerminal&&this._hasCalledFnOnce){this._clearWaveFlags(),this._emit(De),this._maybeAutoTerminalAfterWave();return}this._fn&&this._execFn(),this._maybeAutoTerminalAfterWave()}}_maybeAutoTerminalAfterWave(){if(this._deps.length===0||this._isTerminal)return;let e=this._deps.find(n=>n.terminal!==void 0&&n.terminal!==!0);if(e!=null){this._autoError&&this._emit([[T,e.terminal]]);return}this._autoComplete&&this._deps.every(n=>n.terminal!==void 0)&&this._emit(Fe)}_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([[T,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([[T,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let n=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=this._deps.map(a=>a.prevData);for(let a=0;a<this._deps.length;a++){let o=n[a];o!=null&&o.length>0&&(this._deps[a].prevData=o[o.length-1])}let s=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:n,prevData:r};for(let o of this._inspectorHooks)o(a)}this._isExecutingFn=!0;try{let a=this._fn(n,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([[T,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Je?(this._rerunDepth=0,this._emit([[T,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Je} \u2014 likely a reactive cycle`)]])):this._maybeRunFnOnSettlement()):this._rerunDepth=0,this._clearWaveFlags()}}_clearWaveFlags(){this._waveHasNewData=!1,this._hasNewTerminal=!1;for(let e of this._deps)e.involvedThisWave=!1,e.dataBatch.length=0}_wrapFnError(e,n){let r=n instanceof Error?n.message:String(n);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:n})}_frameBatch(e){let n=this._config.tierOf;if(e.length===1)return n(e[0][0])===3&&this._status!=="dirty"?[K,e[0]]:e;let r=!0,s=!1,i=!1,a=-1;for(let d of e){let l=n(d[0]);l<a&&(r=!1),l===3&&(s=!0),d[0]===P&&(i=!0),a=l}let o=e;if(!r){let d=e.map((l,p)=>({m:l,i:p,tier:n(l[0])}));d.sort((l,p)=>l.tier-p.tier||l.i-p.i),o=d.map(l=>l.m)}if(s&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&n(o[d][0])===0;)d++;return d===0?[K,...o]:[...o.slice(0,d),K,...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]===T&&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 n=e;if(this._isTerminal&&!this._resubscribable){let o=e.filter(d=>d[0]===z||d[0]===U);if(o.length===0)return;n=o}n=this._frameBatch(n);let s=null;for(let o=0;o<n.length;o++){let d=n[o],l=d[0];if(l!==B&&l!==ne){s?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${l===B?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let p=!0;if(this._pausable!==!1){let y=d[1];if(l===B)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(y),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(y))p=!1;else if(this._pauseLocks.delete(y),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let _=this._pauseBuffer;this._pauseBuffer=[],this._emit(_)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}p?s?.push(d):s==null&&(s=n.slice(0,o))}if(s!=null){if(s.length===0)return;n=s}if(this._hasMeta&&n.some(o=>o[0]===z))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(be)}catch{}let{finalMessages:i,equalsError:a}=this._updateState(n);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 l of i)o(l[0])===3?this._pauseBuffer.push(l):d.push(l);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[T,a]])}_updateState(e){let n=this._config.tierOf,r,s,i=-1,a=0;for(let p of e)n(p[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let p=e.length-1;p>=0;p--)if(e[p][0]===N){d=p;break}}for(let p=0;p<e.length;p++){let y=e[p],_=y[0];if(_===N){if(y.length>=2){let v=!1;if(o&&this._cached!==void 0)try{v=this._equals(this._cached,y[1])}catch(k){s=this._wrapFnError("equals threw",k),i=p;break}if(v){r==null&&(r=e.slice(0,p)),r.push(me),this._status="resolved";continue}this._cached=y[1],this._versioning!=null&&(d<0||p===d)&&qe(this._versioning,y[1],this._hashFn)}this._status="settled",r?.push(y)}else if(r?.push(y),_===P)this._status="dirty";else if(_===I)this._status="resolved";else if(_===M){this._status="completed";{let v=this._config.rigorRecorder;if(v!=null)try{v.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(_===T){this._status="errored";{let v=this._config.rigorRecorder;if(v!=null)try{v.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(_===U){if(this._cached!==void 0){let k=this._config.rigorRecorder;if(k!=null)try{k.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let v=this._cleanup;if(typeof v=="function"){this._cleanup=void 0;try{v()}catch{}}else if(v!=null&&typeof v=="object"){let k=v.invalidate;if(typeof k=="function")try{k()}catch{}}}else _===z&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let l=i>=0?r??e.slice(0,i):r??e;return s!=null?{finalMessages:l,equalsError:s}:{finalMessages:l}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let n=[...this._sinks];for(let r of n)r(e)};_dispatchOrAccumulate(e){if(Ge()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],He(()=>this._flushBatchPending()));for(let n of e)this._batchPendingMessages.push(n);return}ue(this._deliverToSinks,e,this._config.tierOf)}_flushBatchPending(){let e=this._batchPendingMessages;if(e===null||(this._batchPendingMessages=null,e.length===0))return;let n=this._frameBatch(e);ue(this._deliverToSinks,n,this._config.tierOf)}},Ze=t=>Array.isArray(t),Ee=t=>typeof t=="object"&&t!=null&&!Array.isArray(t)});function Me(t,e){return Q([],{...e,initial:t})}function se(t,e){return Q((r,s,i)=>t(s,i)??void 0,{describeKind:"producer",...e})}function oe(t,e,n){return Q(t,(s,i,a)=>{let o=s.map((d,l)=>d!=null&&d.length>0?d.at(-1):a.prevData[l]);i.emit(e(o,a))},{describeKind:"derived",...n})}var Re=F(()=>{"use strict";Ae()});function he(t){return{describeKind:"producer",...t}}function Qe(t,e){let{signal:n,period:r,...s}=e??{};return se(i=>{let a=!1,o=0,d,l,p=()=>{a=!0,d!==void 0&&clearTimeout(d),l!==void 0&&clearInterval(l),n?.removeEventListener("abort",_)},y=()=>{a||(r!=null?(i.emit(o++),l=setInterval(()=>{a||i.emit(o++)},r)):(a=!0,n?.removeEventListener("abort",_),i.emit(o++),i.down([[M]])))},_=()=>{a||(p(),i.down([[T,n.reason]]))};if(n?.aborted){_();return}return d=setTimeout(y,t),n?.addEventListener("abort",_,{once:!0}),p},he(s))}function en(t,e){return se(n=>{let r=!1;try{for(let s of t){if(r)return;n.emit(s)}r||n.down([[M]])}catch(s){r||n.down([[T,s]])}return()=>{r=!0}},he(e))}function En(t){return t!=null&&typeof t.then=="function"}function Sn(t,e){let{signal:n,...r}=e??{};return se(s=>{let i=!1,a=()=>{i||(i=!0,s.down([[T,n.reason]]))};if(n?.aborted){a();return}return n?.addEventListener("abort",a,{once:!0}),Promise.resolve(t).then(o=>{i||(i=!0,n?.removeEventListener("abort",a),s.emit(o),s.down([[M]]))},o=>{i||(i=!0,n?.removeEventListener("abort",a),s.down([[T,o]]))}),()=>{i=!0,n?.removeEventListener("abort",a)}},he(r))}function An(t,e){let{signal:n,...r}=e??{};return se(s=>{let i=new AbortController,a=()=>i.abort(n?.reason);n?.aborted?i.abort(n.reason):n?.addEventListener("abort",a,{once:!0});let o=n??i.signal,d=!1,l=t[Symbol.asyncIterator](),p=()=>{d||o.aborted||Promise.resolve(l.next()).then(y=>{if(!(d||o.aborted)){if(y.done){s.down([[M]]);return}s.emit(y.value),p()}},y=>{!d&&!o.aborted&&s.down([[T,y]])})};return p(),()=>{d=!0,n?.removeEventListener("abort",a),i.abort(),Promise.resolve(l.return?.()).catch(()=>{})}},he(r))}function Mn(t){return t!=null&&typeof t=="object"&&"cache"in t&&typeof t.subscribe=="function"}function nn(t,e){if(Mn(t))return t;if(En(t))return Sn(t,e);if(t!=null){let n=t;if(typeof n[Symbol.asyncIterator]=="function")return An(t,e);if(typeof n[Symbol.iterator]=="function")return en(t,e)}return Rn(t)}function Rn(...t){return en(t,void 0)}var tn=F(()=>{"use strict";Y();Re()});var Pn={};cn(Pn,{processInstanceKeyOf:()=>Dn,processManager:()=>Fn});module.exports=fn(Pn);ge();Y();tn();Te();ve();Y();Ae();Re();var Ce=class{_version=0;_maxSize;_buf;_head=0;_size=0;constructor(e,n){if(n!==void 0&&n<1)throw new RangeError("maxSize must be >= 1");if(this._maxSize=n,n!==void 0){if(this._buf=new Array(n),e&&e.length>0){let r=Math.min(e.length,n),s=e.length-r;for(let i=0;i<r;i++)this._buf[i]=e[s+i];this._size=r}}else this._buf=e?[...e]:[],this._size=this._buf.length}get version(){return this._version}get size(){return this._size}at(e){if(!Number.isInteger(e))return;let n=e>=0?e:this._size+e;if(!(n<0||n>=this._size))return this._maxSize!==void 0?this._buf[(this._head+n)%this._maxSize]:this._buf[n]}append(e){this._rawAppend(e),this._version+=1}appendMany(e){if(e.length===0)return;let n=this._maxSize!==void 0&&e.length>this._maxSize?e.length-this._maxSize:0;for(let r=n;r<e.length;r++)this._rawAppend(e[r]);this._version+=1}clear(){if(this._size===0)return 0;let e=this._size;if(this._maxSize===void 0)this._buf.length=0;else for(let n=0;n<e;n++)this._buf[(this._head+n)%this._maxSize]=void 0;return this._head=0,this._size=0,this._version+=1,e}trimHead(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`trimHead: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return 0;let n=Math.min(e,this._size);if(this._maxSize===void 0)this._buf.splice(0,n);else{for(let r=0;r<n;r++)this._buf[(this._head+r)%this._maxSize]=void 0;this._head=(this._head+n)%this._maxSize}return this._size-=n,this._version+=1,n}slice(e,n){if(!Number.isInteger(e)||e<0)throw new RangeError(`slice: start must be a non-negative integer (got ${e})`);if(n!==void 0&&(!Number.isInteger(n)||n<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${n})`);let r=n===void 0?this._size:Math.min(Math.max(n,0),this._size),s=Math.min(e,this._size);if(s>=r)return[];let i=r-s;if(this._maxSize===void 0)return this._buf.slice(s,r);let a=new Array(i);for(let o=0;o<i;o++)a[o]=this._buf[(this._head+s+o)%this._maxSize];return a}tail(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`tail: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return[];let n=Math.min(e,this._size);return this.slice(this._size-n,this._size)}toArray(){if(this._maxSize===void 0)return[...this._buf];let e=new Array(this._size);for(let n=0;n<this._size;n++)e[n]=this._buf[(this._head+n)%this._maxSize];return e}snapshot(){return this.toArray()}restore(e){if(this._maxSize===void 0){this._buf.length=0;for(let n=0;n<e.length;n++)this._buf.push(e[n]);this._size=this._buf.length}else{let n=this._maxSize;for(let i=0;i<n;i++)this._buf[i]=void 0;this._head=0;let r=Math.min(e.length,n),s=e.length-r;for(let i=0;i<r;i++)this._buf[i]=e[s+i];this._size=r}this._version+=1}_rawAppend(e){if(this._maxSize===void 0){this._buf.push(e),this._size=this._buf.length;return}this._size<this._maxSize?(this._buf[(this._head+this._size)%this._maxSize]=e,this._size+=1):(this._buf[this._head]=e,this._head=(this._head+1)%this._maxSize)}};function ie(t){return t.subscribe(()=>{})}var Cn=64;function rn(t,e={}){let{name:n,maxSize:r,versioning:s,guard:i,backend:a}=e,o=a??new Ce(t,r),d=Me(o.toArray(),{name:n,describeKind:"state",equals:(c,g)=>c===g,...s!=null?{versioning:s}:{},...i!=null?{guard:i}:{}});function l(){let c=o.toArray();Ue(()=>{d.down([[P]],{internal:!0}),d.down([[N,c]],{internal:!0})})}let p=new Map,y=new Map,_=new Map;function v(c,g){return`${c}:${g===void 0?"END":g}`}function k(c){if(c.size<Cn)return;let g=c.keys().next();if(g.done)return;let u=c.get(g.value);u!==void 0&&u.dispose(),c.delete(g.value)}function E(c){let g=o.version;try{return c()}finally{o.version!==g&&l()}}function R(c){if(!Number.isInteger(c)||c<0)throw new RangeError(`tail: n must be a non-negative integer (got ${c})`);let g=p.get(c);if(g!==void 0)return p.delete(c),p.set(c,g),g.node;k(p);let u=oe([d],([h])=>{let m=h;return c===0||m.length===0?[]:m.slice(Math.max(0,m.length-c))},{initial:o.tail(c),describeKind:"derived"}),f=ie(u);return p.set(c,{node:u,dispose:f}),u}function A(c,g){if(!Number.isInteger(c)||c<0)throw new RangeError(`slice: start must be a non-negative integer (got ${c})`);if(g!==void 0&&(!Number.isInteger(g)||g<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${g})`);let u=v(c,g),f=y.get(u);if(f!==void 0)return y.delete(u),y.set(u,f),f.node;k(y);let h=oe([d],([b])=>{let w=b;return g===void 0?w.slice(c):w.slice(c,g)},{initial:o.slice(c,g),describeKind:"derived"}),m=ie(h);return y.set(u,{node:h,dispose:m}),h}function C(c){let g=_.get(c);if(g!==void 0)return g.node;let u=oe([d,c],([h,m])=>{let b=h,w=Math.max(0,Math.trunc(m??0));return b.slice(w)},{initial:[],describeKind:"derived"}),f=ie(u);return _.set(c,{node:u,dispose:f}),u}let x,O;function L(){x===void 0&&(x=Q([d],(c,g,u)=>{let f=c[0],m=f!=null&&f.length>0?f.at(-1):u.prevData[0];if(m==null||m.length===0){g.down([[I]]);return}g.emit(m[m.length-1])},{name:n!=null?`${n}::lastValue`:"lastValue",describeKind:"derived",initial:o.size===0?void 0:o.at(o.size-1)}),O=oe([d],([c])=>c.length>0,{name:n!=null?`${n}::hasLatest`:"hasLatest",describeKind:"derived",initial:o.size>0}),ie(x),ie(O))}let V={entries:d,get size(){return o.size},at(c){return o.at(c)},append(c){E(()=>o.append(c))},appendMany(c){c.length!==0&&E(()=>o.appendMany(c))},clear(){E(()=>o.clear())},trimHead(c){E(()=>o.trimHead(c))},withLatest(){return L(),d},get lastValue(){return L(),x},get hasLatest(){return L(),O},view(c){switch(c.kind){case"tail":return R(c.n);case"slice":return A(c.start,c.stop);case"fromCursor":return C(c.cursor)}},attach(c){let g=c.subscribe(u=>{for(let f of u)f[0]===N&&V.append(f[1])});return()=>g()},attachStorage(c){if(c.length===0)return()=>{};let g=new Map;for(let f of c)g.set(f,o.size);(async()=>{for(let f of c)if(typeof f.loadEntries=="function")try{let h=await Promise.resolve(f.loadEntries());h.entries.length>0&&o.size===0&&(o.restore(h.entries),g.set(f,h.entries.length),l());break}catch{}})();let u=d.subscribe(f=>{for(let h of f){if(h[0]!==N)continue;let m=h[1];for(let b of c){let w=g.get(b)??0;if(m.length<w){try{let S=b.appendEntries(m);S instanceof Promise&&S.catch(()=>{})}catch{}g.set(b,m.length);continue}if(m.length===w)continue;let D=m.slice(w);g.set(b,m.length);try{let S=b.appendEntries(D);S instanceof Promise&&S.catch(()=>{})}catch{}}}});return()=>u()},disposeAllViews(){for(let c of p.values())c.dispose();p.clear();for(let c of y.values())c.dispose();y.clear();for(let c of _.values())c.dispose();_.clear()},dispose(){for(let c of p.values())c.dispose();p.clear();for(let c of y.values())c.dispose();y.clear();for(let c of _.values())c.dispose();_.clear()}};return V}var On=je((t,e)=>{t("observe"),t("signal"),e("write")});function sn(t){let e=rn([],{name:t.name,maxSize:t.retainedLimit??1024,guard:t.guard??On,...t.versioning!=null?{versioning:t.versioning}:{}});return e.withLatest(),t.graph&&t.graph.add(e.entries,{name:t.name}),e}var Dn=t=>t.correlationId;function on(t){if(t==null)return Promise.resolve(void 0);let e=nn(t);return new Promise((n,r)=>{let s=!1,i,a=()=>{i&&i()};i=e.subscribe(o=>{if(!s)for(let d of o){if(d[0]===N){s=!0,Promise.resolve().then(a),n(d[1]);return}if(d[0]===T){s=!0,Promise.resolve().then(a),r(d[1]);return}if(d[0]===M){s=!0,Promise.resolve().then(a),n(void 0);return}}})})}async function Ln(t,e,n,r,s){let i;for(let a=0;a<=r;a++){if(a>0){let o=s[Math.min(a-1,s.length-1)]??0;o>0&&await new Promise(d=>setTimeout(d,o))}try{return await on(t(e,n))}catch(o){i=o}}return{kind:"fail",error:i}}function Fn(t,e,n){let r=n.retryMax??0,s=n.backoffMs??[0],i=1024,a=new Map,o=new Set,d=new Map,l=sn({name:`${e}_process_instances`,retainedLimit:i,graph:t}),p=0;function y(){return++p}function _(u,f,h){v(u,f,h,void 0)}function v(u,f,h,m){let b=j(),w={correlationId:u,state:f,status:h,startedAt:d.get(u)??b,updatedAt:b,t_ns:b,seq:y(),...n.handlerVersion!==void 0?{handlerVersion:n.handlerVersion}:{},...m!==void 0?{reason:m}:{}};l.append(w)}let k=`_process_${e}_started`;t.event(k),n.persistence?.eventStorage&&t.attachEventStorage(n.persistence.eventStorage);async function E(u,f,h,m){if(o.delete(u),a.delete(u),d.delete(u),n.compensate)try{await on(n.compensate(f,h)),v(u,f,"compensated",m)}catch{_(u,f,"failed")}else _(u,f,"failed")}async function R(u,f){if(o.has(u)){if(f.kind==="fail"){let h=a.get(u)??n.initial;await E(u,h,f.error);return}if(f.kind==="continue"){if(a.set(u,f.state),f.emit)for(let h of f.emit)try{t._appendEvent(h.type,h.payload,{correlationId:u,aggregateId:u})}catch{}if(_(u,f.state,"running"),n.isTerminal?.(f.state)){o.delete(u),a.delete(u),d.delete(u),_(u,f.state,"terminated");return}if(f.schedule){let{afterMs:h,eventType:m}=f.schedule,b,w=Qe(h),D=S=>{for(let G of S)if(G[0]===N){if(b?b():queueMicrotask(()=>b?.()),!o.has(u))return;let ee=a.get(u);if(ee===void 0)return;let H=n.steps[m];if(!H)return;let ae={type:m,payload:null,timestampNs:j(),seq:Number.NaN,correlationId:u,aggregateId:u};C(u,H,ee,ae)}};b=w.subscribe(D)}return}if(f.kind==="terminate"){if(a.set(u,f.state),f.emit)for(let h of f.emit)try{t._appendEvent(h.type,h.payload,{correlationId:u,aggregateId:u})}catch{}o.delete(u),a.delete(u),d.delete(u),_(u,f.state,"terminated")}}}let A=new Map;function C(u,f,h,m){let w=(A.get(u)??Promise.resolve()).then(async()=>{let D=a.get(u);if(D===void 0||!o.has(u))return;let S;try{S=await Ln(f,D,m,r,s)}catch(G){await E(u,a.get(u)??n.initial,G);return}await R(u,S)});A.set(u,w),w.finally(()=>{A.get(u)===w&&A.delete(u)})}let x=!1,O=[];for(let u of n.watching){let f=t.event(u),h=0;h=(f.cache??[]).length;let b=f.subscribe(w=>{for(let D of w){if(D[0]!==N)continue;let S=D[1];if(S.length<=h)continue;let G=S.slice(h);h=S.length;for(let ee of G){let H=ee.correlationId;if(H===void 0||!o.has(H))continue;let ae=n.steps[u];if(!ae)continue;let Oe=a.get(H);Oe!==void 0&&C(H,ae,Oe,ee)}}});O.push(b)}function L(u,f){if(x||o.has(u))return;let h=j();d.set(u,h),a.set(u,n.initial),o.add(u);try{t._appendEvent(k,f??null,{correlationId:u,aggregateId:u})}catch{}_(u,n.initial,"running")}function V(u,f){if(x||!o.has(u))return;let h=a.get(u)??n.initial;E(u,h,new Error(`cancelled: ${f??"no reason given"}`),f)}function c(u){return a.get(u)}function g(){if(!x){x=!0;for(let u of O)try{u()}catch{}O.length=0}}return{instances:l,audit:l,start:L,cancel:V,getState:c,dispose:g}}0&&(module.exports={processInstanceKeyOf,processManager});
1
+ "use strict";var pe=Object.defineProperty;var it=Object.getOwnPropertyDescriptor;var at=Object.getOwnPropertyNames;var dt=Object.prototype.hasOwnProperty;var F=(n,e)=>()=>(n&&(e=n(n=0)),e);var ut=(n,e)=>{for(var t in e)pe(n,t,{get:e[t],enumerable:!0})},ct=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of at(e))!dt.call(n,s)&&s!==t&&pe(n,s,{get:()=>e[s],enumerable:!(r=it(e,s))||r.enumerable});return n};var lt=n=>ct(pe({},"__esModule",{value:!0}),n);function j(){return Date.now()*1e6}var ge=F(()=>{"use strict"});var q,N,P,I,B,U,te,z,R,v,K,me,ft,ye,ht,pt,_e,De,Le,Fe,be,Y=F(()=>{"use strict";q=Symbol.for("graphrefly/START"),N=Symbol.for("graphrefly/DATA"),P=Symbol.for("graphrefly/DIRTY"),I=Symbol.for("graphrefly/RESOLVED"),B=Symbol.for("graphrefly/INVALIDATE"),U=Symbol.for("graphrefly/PAUSE"),te=Symbol.for("graphrefly/RESUME"),z=Symbol.for("graphrefly/TEARDOWN"),R=Symbol.for("graphrefly/COMPLETE"),v=Symbol.for("graphrefly/ERROR"),K=Object.freeze([P]),me=Object.freeze([I]),ft=Object.freeze([B]),ye=Object.freeze([q]),ht=Object.freeze([R]),pt=Object.freeze([z]),_e=Object.freeze([K]),De=Object.freeze([me]),Le=Object.freeze([ft]),Fe=Object.freeze([ht]),be=Object.freeze([pt])});function Pe(n){n.registerCodec(gt)}var gt,Ie=F(()=>{"use strict";gt={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 de(n){if(n==null)return mt;let{type:e,id:t,...r}=n;return{type:e??"system",id:t??"",...r}}var mt,Ve=F(()=>{"use strict";mt={type:"system",id:""}});function ze(){return J>0||ne}function Ge(){return J>0}function He(n){J>0?re.push(n):n()}function Be(n){J+=1;let e=!1;try{n()}catch(t){throw e=!0,t}finally{if(J-=1,J===0)if(e){if(!ne){let t=re.splice(0);for(let r of t)try{r()}catch{}W.length=0,$.length=0,X.length=0}}else yt()}}function yt(){let n=!ne;n&&(ne=!0);let e=[],t=0;try{for(;W.length>0||$.length>0||X.length>0||n&&re.length>0;){if(n&&re.length>0){let i=re.splice(0);for(let a of i)try{a()}catch(o){e.push(o)}continue}if(t+=1,t>1e3)throw W.length=0,$.length=0,X.length=0,new Error("batch drain exceeded 1000 iterations \u2014 likely a reactive cycle");let s=(W.length>0?W:$.length>0?$:X).splice(0);for(let i of s)try{i()}catch(a){e.push(a)}}}finally{n&&(ne=!1)}if(e.length===1)throw e[0];if(e.length>1)throw new AggregateError(e,"batch drain: multiple callbacks threw")}function ue(n,e,t){if(e.length===0)return;if(e.length===1){let l=t(e[0][0]);if(l<3||!ze()){n(e);return}(l>=5?X:l===4?$:W).push(()=>n(e));return}let r=e.length,s=r,i=r,a=r,o=0;for(;o<r&&t(e[o][0])<3;)o++;for(s=o;o<r&&t(e[o][0])===3;)o++;for(i=o;o<r&&t(e[o][0])===4;)o++;a=o;let d=ze();if(s>0){let l=e.slice(0,s);n(l)}if(i>s){let l=e.slice(s,i);d?W.push(()=>n(l)):n(l)}if(a>i){let l=e.slice(i,a);d?$.push(()=>n(l)):n(l)}if(r>a){let l=e.slice(a,r);d?X.push(()=>n(l)):n(l)}}var J,ne,W,$,X,re,Te=F(()=>{"use strict";J=0,ne=!1,W=[],$=[],X=[],re=[]});function Ue(n){n.registerMessageType(q,{tier:0,wireCrossing:!1}),n.registerMessageType(P,{tier:1,wireCrossing:!1}),n.registerMessageType(B,{tier:1,wireCrossing:!1,metaPassthrough:!1}),n.registerMessageType(U,{tier:2,wireCrossing:!1}),n.registerMessageType(te,{tier:2,wireCrossing:!1}),n.registerMessageType(N,{tier:3,wireCrossing:!0}),n.registerMessageType(I,{tier:3,wireCrossing:!0}),n.registerMessageType(R,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(v,{tier:4,wireCrossing:!0,metaPassthrough:!1}),n.registerMessageType(z,{tier:5,wireCrossing:!0,metaPassthrough:!1})}var ce,We=F(()=>{"use strict";Y();ce=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 r=this._messageTypes.get(t);return r!=null?r.tier:1}}get onMessage(){return this._frozen=!0,this._onMessage}get onSubscribe(){return this._frozen=!0,this._onSubscribe}set onMessage(e){this._assertUnfrozen(),this._onMessage=e}set onSubscribe(e){this._assertUnfrozen(),this._onSubscribe=e}get defaultVersioning(){return this._defaultVersioning}set defaultVersioning(e){this._assertUnfrozen(),this._defaultVersioning=e}get defaultHashFn(){return this._defaultHashFn}set defaultHashFn(e){this._assertUnfrozen(),this._defaultHashFn=e}get inspectorEnabled(){return this._inspectorEnabled}set inspectorEnabled(e){this._inspectorEnabled=e}get globalInspector(){return this._globalInspector}set globalInspector(e){this._globalInspector=e}get rigorRecorder(){return this._rigorRecorder}set rigorRecorder(e){this._rigorRecorder=e}registerMessageType(e,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 $e(n){return Array.isArray(n)?[...n]:[n]}function _t(n,e){return n.has(e)||n.has("*")}function je(n){let e=[];return n((s,i)=>{e.push({kind:"allow",actions:new Set($e(s)),where:i?.where??(()=>!0)})},(s,i)=>{e.push({kind:"deny",actions:new Set($e(s)),where:i?.where??(()=>!0)})}),(s,i)=>{let a=!1,o=!1;for(let d of e)_t(d.actions,i)&&d.where(s)&&(d.kind==="deny"?a=!0:o=!0);return a?!1:o}}var Z,ve=F(()=>{"use strict";Z=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 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}function vt(n){let e=Tt.encode(n),t=e.length,r=t*8,s=t+9+63&-64,i=new Uint8Array(s);i.set(e),i[t]=128;let a=new DataView(i.buffer);a.setUint32(s-4,r>>>0,!1),a.setUint32(s-8,Math.floor(r/4294967296)>>>0,!1);let o=1779033703,d=3144134277,l=1013904242,p=2773480762,y=1359893119,_=2600822924,T=528734635,k=1541459225,A=new Uint32Array(64),M=(O,x)=>O>>>x|O<<32-x;for(let O=0;O<s;O+=64){for(let h=0;h<16;h++)A[h]=a.getUint32(O+h*4,!1);for(let h=16;h<64;h++){let m=A[h-15],b=A[h-2],w=M(m,7)^M(m,18)^m>>>3,D=M(b,17)^M(b,19)^b>>>10;A[h]=A[h-16]+w+A[h-7]+D>>>0}let x=o,C=d,L=l,V=p,c=y,g=_,u=T,f=k;for(let h=0;h<64;h++){let m=M(c,6)^M(c,11)^M(c,25),b=c&g^~c&u,w=f+m+b+bt[h]+A[h]>>>0,D=M(x,2)^M(x,13)^M(x,22),E=x&C^x&L^C&L,G=D+E>>>0;f=u,u=g,g=c,c=V+w>>>0,V=L,L=C,C=x,x=w+G>>>0}o=o+x>>>0,d=d+C>>>0,l=l+L>>>0,p=p+V>>>0,y=y+c>>>0,_=_+g>>>0,T=T+u>>>0,k=k+f>>>0}let S=O=>O.toString(16).padStart(8,"0");return S(o)+S(d)+S(l)+S(p)+S(y)+S(_)+S(T)+S(k)}function xe(n){let e=we(n??null),t=JSON.stringify(e);return vt(t).slice(0,16)}function wt(){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 Ne(n,e,t){let r=t?.id??wt();if(n===0)return{id:r,version:0};let i=(t?.hash??xe)(e);return{id:r,version:0,cid:i,prev:null}}function qe(n,e,t){n.version+=1,"cid"in n&&(n.prev=n.cid,n.cid=t(e))}var bt,Tt,Ke=F(()=>{"use strict";bt=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]),Tt=new TextEncoder});function Xe(n){return{node:n,unsub:null,prevData:void 0,dirty:!1,involvedThisWave:!1,dataBatch:[],terminal:void 0}}function ke(n){n.prevData=void 0,n.dirty=!1,n.involvedThisWave=!1,n.dataBatch.length=0,n.terminal=void 0}function le(n){return n.length===0?n:typeof n[0]=="symbol"?[n]:n}function Q(n,e,t){let r=Ze(n)?n:[],s=typeof n=="function"?n:typeof e=="function"?e:void 0,i={};return Ze(n)?i=(Ae(e)?e:t)??{}:Ae(n)?i=n:i=(Ae(e)?e:t)??{},new fe(r,s,i)}var Ye,Je,xt,Nt,Ee,fe,Ze,Ae,Se=F(()=>{"use strict";Ie();Ve();Te();ge();We();ve();Y();Ke();Ye=()=>{},Je=100;xt=(n,e,t,r)=>{t.direction==="down-in"&&n._onDepMessage(t.depIndex,e)},Nt=(n,e,t,r)=>{let s=n;if(s._status==="completed"||s._status==="errored")return;let i=s._cached,a=i===void 0?[ye]:[ye,[N,i]];s._status==="dirty"&&a.push(K),ue(e,a,s._config.tierOf)},Ee=new ce({onMessage:xt,onSubscribe:Nt});Ue(Ee);Pe(Ee);fe=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,r){this._config=r.config??Ee,this._config.onMessage,this._optsName=r.name,this._describeKind=r.describeKind,this._equals=r.equals??Object.is,this._resubscribable=r.resubscribable??!1,this._resetOnTeardown=r.resetOnTeardown??!1,this._autoComplete=r.completeWhenDepsComplete??!0,this._autoError=r.errorWhenDepsError??!0,this._pausable=r.pausable??!0,this._guard=r.guard,this._fn=t,this._partial=r.partial??!1,this._cached=r.initial!==void 0?r.initial:void 0,this._status=e.length===0&&t==null&&this._cached!==void 0?"settled":"sentinel",this._hashFn=r.versioningHash??this._config.defaultHashFn??xe;let s=r.versioning??this._config.defaultVersioning;this._versioningLevel=s,this._versioning=s!=null?Ne(s,this._cached===void 0?void 0:this._cached,{id:r.versioningId,hash:this._hashFn}):void 0,this._deps=e.map(Xe);let i={};for(let[o,d]of Object.entries(r.meta??{})){let l={initial:d,name:`${r.name??"node"}:meta:${o}`,describeKind:"state",config:this._config};r.guard!=null&&(l.guard=r.guard),i[o]=new n([],void 0,l)}Object.freeze(i),this.meta=i,this._hasMeta=Object.keys(i).length>0;let a=this;this._actions={emit(o){a._emit([[N,o]])},down(o){a._emit(le(o))},up(o){a._emitUp(le(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 r=this._versioningLevel;if(r!=null&&e<=r)return;let s=t?.hash??this._hashFn;s!==this._hashFn&&(this._hashFn=s);let i=this._cached===void 0?void 0:this._cached,a=this._versioning,o=a?.id??t?.id,d=a?.version??0,l=Ne(e,i,{id:o,hash:s});l.version=d,this._versioning=l,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=de(e);if(this._guard!=null&&!this._guard(t,"observe"))return!1;if(this._extraGuards!=null){for(let r of this._extraGuards)if(!r(t,"observe"))return!1}return!0}_checkGuard(e){if(e?.internal)return;let t=this._guard!=null||this._extraGuards!=null,r=e?.actor!=null;if(!t&&!r)return;let s=de(e?.actor),i=e?.delivery==="signal"?"signal":"write";if(this._guard!=null&&!this._guard(s,i))throw new Z({actor:s,action:i,nodeName:this.name});if(this._extraGuards!=null){for(let a of this._extraGuards)if(!a(s,i))throw new Z({actor:s,action:i,nodeName:this.name})}this._lastMutation={actor:s,timestamp_ns:j()}}down(e,t){let r=le(e);r.length!==0&&(this._checkGuard(t),this._emit(r))}emit(e,t){this._checkGuard(t),this._emit([[N,e]])}up(e,t){if(this._deps.length===0)return;let r=le(e);if(r.length===0)return;this._checkGuard(t);let s=t??{internal:!0};this._validateUpTiers(r);for(let i of this._deps)i.node.up?.(r,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 r of e){let s=t(r[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=de(t);if(!this._guard(d,"observe"))throw new Z({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)ke(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: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 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 r=0;r<e;r++){let s=r,i=this._deps[r];i.unsub=Ye,i.unsub=i.node.subscribe(a=>{if(i.unsub===null)return;let o=this._config.tierOf,d=!1;for(let l of a)o(l[0])>=3&&(d=!0),this._config.onMessage(this,l,{direction:"down-in",depIndex:s},this._actions);d&&this._maybeRunFnOnSettlement()}),t++}}catch(r){this._deps[t].unsub=null;for(let s=0;s<t;s++){let i=this._deps[s];if(i.unsub!=null){let a=i.unsub;i.unsub=null;try{a()}catch{}ke(i)}}throw this._dirtyDepCount=0,r}}_addDep(e){for(let s=0;s<this._deps.length;s++)if(this._deps[s].node===e)return s;let t=this._deps.length,r=Xe(e);if(this._deps.push(r),this._sinks==null)return t;r.dirty=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e),r.unsub=Ye;try{r.unsub=e.subscribe(s=>{if(r.unsub===null)return;let i=this._config.tierOf,a=!1;for(let o of s)i(o[0])>=3&&(a=!0),this._config.onMessage(this,o,{direction:"down-in",depIndex:t},this._actions);a&&this._maybeRunFnOnSettlement()})}catch(s){throw r.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(r){this._emit([[v,this._wrapFnError("cleanup threw",r)]])}else if(t!=null&&typeof t=="object"){let r=t.deactivate;if(typeof r=="function")try{r()}catch(s){this._emit([[v,this._wrapFnError("cleanup.deactivate threw",s)]])}}for(let r of this._deps){if(r.unsub!=null){let s=r.unsub;r.unsub=null;try{s()}catch{}}ke(r)}this._waveHasNewData=!1,this._hasNewTerminal=!1,this._hasCalledFnOnce=!1,this._paused=!1,this._pendingWave=!1,this._pendingRerun=!1,this._rerunDepth=0,this._store={},this._dirtyDepCount=0,this._pauseLocks=null,this._pauseBuffer=null,this._fn!=null&&(this._cached=void 0),e||(this._fn!=null||this._deps.length>0)&&(!this._isTerminal||this._resubscribable)&&(this._status="sentinel")}_onDepMessage(e,t){let r=this._deps[e],s=t[0];if(this._inspectorHooks!=null){let i={kind:"dep_message",depIndex:e,message:t};for(let a of this._inspectorHooks)a(i)}if(s!==q){if(s===P){this._depDirtied(r);return}if(s===B){if(this._depInvalidated(r),this._cached===void 0)return;this._emit(Le);return}if(s===U||s===te){this._emit([t]);return}if(s===z){this._emit(be);return}if(s===N)this._depSettledAsData(r,t[1]);else if(s===I)this._depSettledAsResolved(r);else if(s===R)this._depSettledAsTerminal(r,!0);else if(s===v)this._depSettledAsTerminal(r,t[1]);else{this._emit([t]);return}if(!this._fn){(s===N||s===I)&&this._emit([t]),(s===R||s===v)&&this._maybeAutoTerminalAfterWave();return}}}_depDirtied(e){e.dirty||(e.dirty=!0,e.involvedThisWave=!0,this._dirtyDepCount++,this._status!=="dirty"&&this._emit(_e))}_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(De),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([[v,e.terminal]]);return}this._autoComplete&&this._deps.every(t=>t.terminal!==void 0)&&this._emit(Fe)}_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([[v,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([[v,this._wrapFnError("cleanup.beforeRun threw",o)]]);return}}}let t=this._deps.map(a=>a.involvedThisWave?a.dataBatch.length>0?[...a.dataBatch]:[]:void 0),r=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 s=this._deps.map(a=>a.terminal),i={prevData:r,terminalDeps:s,store:this._store};if(this._hasCalledFnOnce=!0,this._clearWaveFlags(),this._inspectorHooks!=null){let a={kind:"run",batchData:t,prevData:r};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([[v,this._wrapFnError("fn threw",a)]])}finally{this._isExecutingFn=!1,this._pendingRerun?(this._pendingRerun=!1,this._rerunDepth+=1,this._rerunDepth>Je?(this._rerunDepth=0,this._emit([[v,new Error(`Node "${this.name}": _pendingRerun depth exceeded ${Je} \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 r=t instanceof Error?t.message:String(t);return new Error(`Node "${this.name}": ${e}: ${r}`,{cause:t})}_frameBatch(e){let t=this._config.tierOf;if(e.length===1)return t(e[0][0])===3&&this._status!=="dirty"?[K,e[0]]:e;let r=!0,s=!1,i=!1,a=-1;for(let d of e){let l=t(d[0]);l<a&&(r=!1),l===3&&(s=!0),d[0]===P&&(i=!0),a=l}let o=e;if(!r){let d=e.map((l,p)=>({m:l,i:p,tier:t(l[0])}));d.sort((l,p)=>l.tier-p.tier||l.i-p.i),o=d.map(l=>l.m)}if(s&&!i&&this._status!=="dirty"){let d=0;for(;d<o.length&&t(o[d][0])===0;)d++;return d===0?[K,...o]:[...o.slice(0,d),K,...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]===v&&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]===z||d[0]===B);if(o.length===0)return;t=o}t=this._frameBatch(t);let s=null;for(let o=0;o<t.length;o++){let d=t[o],l=d[0];if(l!==U&&l!==te){s?.push(d);continue}if(d.length<2)throw new Error(`Node "${this.name}": [[${l===U?"PAUSE":"RESUME"}]] must carry a lockId payload \u2014 bare PAUSE/RESUME is a protocol violation (C0 rule). Use \`[[PAUSE, lockId]]\` / \`[[RESUME, lockId]]\`.`);let p=!0;if(this._pausable!==!1){let y=d[1];if(l===U)this._pauseLocks==null&&(this._pauseLocks=new Set),this._pauseLocks.add(y),this._paused=!0,this._pausable==="resumeAll"&&this._pauseBuffer==null&&(this._pauseBuffer=[]);else if(this._pauseLocks==null||!this._pauseLocks.has(y))p=!1;else if(this._pauseLocks.delete(y),this._pauseLocks.size===0){if(this._paused=!1,this._pauseBuffer!=null&&this._pauseBuffer.length>0){let _=this._pauseBuffer;this._pauseBuffer=[],this._emit(_)}this._pendingWave&&(this._pendingWave=!1,this._maybeRunFnOnSettlement())}}p?s?.push(d):s==null&&(s=t.slice(0,o))}if(s!=null){if(s.length===0)return;t=s}if(this._hasMeta&&t.some(o=>o[0]===z))for(let o of Object.keys(this.meta))try{this.meta[o]._emit(be)}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 l of i)o(l[0])===3?this._pauseBuffer.push(l):d.push(l);d.length>0&&this._dispatchOrAccumulate(d)}else this._dispatchOrAccumulate(i);a!=null&&this._emit([[v,a]])}_updateState(e){let t=this._config.tierOf,r,s,i=-1,a=0;for(let p of e)t(p[0])===3&&a++;let o=a<=1,d=-1;if(this._versioning!=null&&a>1){for(let p=e.length-1;p>=0;p--)if(e[p][0]===N){d=p;break}}for(let p=0;p<e.length;p++){let y=e[p],_=y[0];if(_===N){if(y.length>=2){let T=!1;if(o&&this._cached!==void 0)try{T=this._equals(this._cached,y[1])}catch(k){s=this._wrapFnError("equals threw",k),i=p;break}if(T){r==null&&(r=e.slice(0,p)),r.push(me),this._status="resolved";continue}this._cached=y[1],this._versioning!=null&&(d<0||p===d)&&qe(this._versioning,y[1],this._hashFn)}this._status="settled",r?.push(y)}else if(r?.push(y),_===P)this._status="dirty";else if(_===I)this._status="resolved";else if(_===R){this._status="completed";{let T=this._config.rigorRecorder;if(T!=null)try{T.onTerminalTransition(this,"completed",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(_===v){this._status="errored";{let T=this._config.rigorRecorder;if(T!=null)try{T.onTerminalTransition(this,"errored",this._autoComplete,this._autoError,this._deps.length>0)}catch{}}}else if(_===B){if(this._cached!==void 0){let k=this._config.rigorRecorder;if(k!=null)try{k.onNonVacuousInvalidate(this,this._cached)}catch{}}this._cached=void 0,this._status="dirty";let T=this._cleanup;if(typeof T=="function"){this._cleanup=void 0;try{T()}catch{}}else if(T!=null&&typeof T=="object"){let k=T.invalidate;if(typeof k=="function")try{k()}catch{}}}else _===z&&(this._resetOnTeardown&&(this._cached=void 0),this._deactivate(!0),this._status="sentinel")}let l=i>=0?r??e.slice(0,i):r??e;return s!=null?{finalMessages:l,equalsError:s}:{finalMessages:l}}_deliverToSinks=e=>{if(this._sinks==null)return;if(typeof this._sinks=="function"){this._sinks(e);return}let t=[...this._sinks];for(let r of t)r(e)};_dispatchOrAccumulate(e){if(Ge()){this._batchPendingMessages===null&&(this._batchPendingMessages=[],He(()=>this._flushBatchPending()));for(let t of e)this._batchPendingMessages.push(t);return}ue(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);ue(this._deliverToSinks,t,this._config.tierOf)}},Ze=n=>Array.isArray(n),Ae=n=>typeof n=="object"&&n!=null&&!Array.isArray(n)});function Re(n,e){return Q([],{...e,initial:n})}function se(n,e){return Q((r,s,i)=>n(s,i)??void 0,{describeKind:"producer",...e})}function oe(n,e,t){return Q(n,(s,i,a)=>{let o=s.map((d,l)=>d!=null&&d.length>0?d.at(-1):a.prevData[l]);i.emit(e(o,a))},{describeKind:"derived",...t})}var Me=F(()=>{"use strict";Se()});function he(n){return{describeKind:"producer",...n}}function Qe(n,e){let{signal:t,period:r,...s}=e??{};return se(i=>{let a=!1,o=0,d,l,p=()=>{a=!0,d!==void 0&&clearTimeout(d),l!==void 0&&clearInterval(l),t?.removeEventListener("abort",_)},y=()=>{a||(r!=null?(i.emit(o++),l=setInterval(()=>{a||i.emit(o++)},r)):(a=!0,t?.removeEventListener("abort",_),i.emit(o++),i.down([[R]])))},_=()=>{a||(p(),i.down([[v,t.reason]]))};if(t?.aborted){_();return}return d=setTimeout(y,n),t?.addEventListener("abort",_,{once:!0}),p},he(s))}function et(n,e){return se(t=>{let r=!1;try{for(let s of n){if(r)return;t.emit(s)}r||t.down([[R]])}catch(s){r||t.down([[v,s]])}return()=>{r=!0}},he(e))}function kt(n){return n!=null&&typeof n.then=="function"}function At(n,e){let{signal:t,...r}=e??{};return se(s=>{let i=!1,a=()=>{i||(i=!0,s.down([[v,t.reason]]))};if(t?.aborted){a();return}return t?.addEventListener("abort",a,{once:!0}),Promise.resolve(n).then(o=>{i||(i=!0,t?.removeEventListener("abort",a),s.emit(o),s.down([[R]]))},o=>{i||(i=!0,t?.removeEventListener("abort",a),s.down([[v,o]]))}),()=>{i=!0,t?.removeEventListener("abort",a)}},he(r))}function Et(n,e){let{signal:t,...r}=e??{};return se(s=>{let i=new AbortController,a=()=>i.abort(t?.reason);t?.aborted?i.abort(t.reason):t?.addEventListener("abort",a,{once:!0});let o=t??i.signal,d=!1,l=n[Symbol.asyncIterator](),p=()=>{d||o.aborted||Promise.resolve(l.next()).then(y=>{if(!(d||o.aborted)){if(y.done){s.down([[R]]);return}s.emit(y.value),p()}},y=>{!d&&!o.aborted&&s.down([[v,y]])})};return p(),()=>{d=!0,t?.removeEventListener("abort",a),i.abort(),Promise.resolve(l.return?.()).catch(()=>{})}},he(r))}function St(n){return n!=null&&typeof n=="object"&&"cache"in n&&typeof n.subscribe=="function"}function tt(n,e){if(St(n))return n;if(kt(n))return At(n,e);if(n!=null){let t=n;if(typeof t[Symbol.asyncIterator]=="function")return Et(n,e);if(typeof t[Symbol.iterator]=="function")return et(n,e)}return Rt(n)}function Rt(...n){return et(n,void 0)}var nt=F(()=>{"use strict";Y();Me()});var Ft={};ut(Ft,{processInstanceKeyOf:()=>Ct,processManager:()=>Lt});module.exports=lt(Ft);ge();Y();nt();ve();Te();Y();Se();Me();var Oe=class{_version=0;_maxSize;_buf;_head=0;_size=0;constructor(e,t){if(t!==void 0&&t<1)throw new RangeError("maxSize must be >= 1");if(this._maxSize=t,t!==void 0){if(this._buf=new Array(t),e&&e.length>0){let r=Math.min(e.length,t),s=e.length-r;for(let i=0;i<r;i++)this._buf[i]=e[s+i];this._size=r}}else this._buf=e?[...e]:[],this._size=this._buf.length}get version(){return this._version}get size(){return this._size}at(e){if(!Number.isInteger(e))return;let t=e>=0?e:this._size+e;if(!(t<0||t>=this._size))return this._maxSize!==void 0?this._buf[(this._head+t)%this._maxSize]:this._buf[t]}append(e){this._rawAppend(e),this._version+=1}appendMany(e){if(e.length===0)return;let t=this._maxSize!==void 0&&e.length>this._maxSize?e.length-this._maxSize:0;for(let r=t;r<e.length;r++)this._rawAppend(e[r]);this._version+=1}clear(){if(this._size===0)return 0;let e=this._size;if(this._maxSize===void 0)this._buf.length=0;else for(let t=0;t<e;t++)this._buf[(this._head+t)%this._maxSize]=void 0;return this._head=0,this._size=0,this._version+=1,e}trimHead(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`trimHead: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return 0;let t=Math.min(e,this._size);if(this._maxSize===void 0)this._buf.splice(0,t);else{for(let r=0;r<t;r++)this._buf[(this._head+r)%this._maxSize]=void 0;this._head=(this._head+t)%this._maxSize}return this._size-=t,this._version+=1,t}slice(e,t){if(!Number.isInteger(e)||e<0)throw new RangeError(`slice: start must be a non-negative integer (got ${e})`);if(t!==void 0&&(!Number.isInteger(t)||t<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${t})`);let r=t===void 0?this._size:Math.min(Math.max(t,0),this._size),s=Math.min(e,this._size);if(s>=r)return[];let i=r-s;if(this._maxSize===void 0)return this._buf.slice(s,r);let a=new Array(i);for(let o=0;o<i;o++)a[o]=this._buf[(this._head+s+o)%this._maxSize];return a}tail(e){if(!Number.isInteger(e)||e<0)throw new RangeError(`tail: n must be a non-negative integer (got ${e})`);if(e===0||this._size===0)return[];let t=Math.min(e,this._size);return this.slice(this._size-t,this._size)}toArray(){if(this._maxSize===void 0)return[...this._buf];let e=new Array(this._size);for(let t=0;t<this._size;t++)e[t]=this._buf[(this._head+t)%this._maxSize];return e}snapshot(){return this.toArray()}restore(e){if(this._maxSize===void 0){this._buf.length=0;for(let t=0;t<e.length;t++)this._buf.push(e[t]);this._size=this._buf.length}else{let t=this._maxSize;for(let i=0;i<t;i++)this._buf[i]=void 0;this._head=0;let r=Math.min(e.length,t),s=e.length-r;for(let i=0;i<r;i++)this._buf[i]=e[s+i];this._size=r}this._version+=1}_rawAppend(e){if(this._maxSize===void 0){this._buf.push(e),this._size=this._buf.length;return}this._size<this._maxSize?(this._buf[(this._head+this._size)%this._maxSize]=e,this._size+=1):(this._buf[this._head]=e,this._head=(this._head+1)%this._maxSize)}};function ie(n){return n.subscribe(()=>{})}var Mt=64;function rt(n,e={}){let{name:t,maxSize:r,versioning:s,guard:i,backend:a}=e,o=a??new Oe(n,r),d=Re(o.toArray(),{name:t,describeKind:"state",equals:(c,g)=>c===g,...s!=null?{versioning:s}:{},...i!=null?{guard:i}:{}});function l(){let c=o.toArray();Be(()=>{d.down([[P]],{internal:!0}),d.down([[N,c]],{internal:!0})})}let p=new Map,y=new Map,_=new Map;function T(c,g){return`${c}:${g===void 0?"END":g}`}function k(c){if(c.size<Mt)return;let g=c.keys().next();if(g.done)return;let u=c.get(g.value);u!==void 0&&u.dispose(),c.delete(g.value)}function A(c){let g=o.version;try{return c()}finally{o.version!==g&&l()}}function M(c){if(!Number.isInteger(c)||c<0)throw new RangeError(`tail: n must be a non-negative integer (got ${c})`);let g=p.get(c);if(g!==void 0)return p.delete(c),p.set(c,g),g.node;k(p);let u=oe([d],([h])=>{let m=h;return c===0||m.length===0?[]:m.slice(Math.max(0,m.length-c))},{initial:o.tail(c),describeKind:"derived"}),f=ie(u);return p.set(c,{node:u,dispose:f}),u}function S(c,g){if(!Number.isInteger(c)||c<0)throw new RangeError(`slice: start must be a non-negative integer (got ${c})`);if(g!==void 0&&(!Number.isInteger(g)||g<0))throw new RangeError(`slice: stop must be a non-negative integer or undefined (got ${g})`);let u=T(c,g),f=y.get(u);if(f!==void 0)return y.delete(u),y.set(u,f),f.node;k(y);let h=oe([d],([b])=>{let w=b;return g===void 0?w.slice(c):w.slice(c,g)},{initial:o.slice(c,g),describeKind:"derived"}),m=ie(h);return y.set(u,{node:h,dispose:m}),h}function O(c){let g=_.get(c);if(g!==void 0)return g.node;let u=oe([d,c],([h,m])=>{let b=h,w=Math.max(0,Math.trunc(m??0));return b.slice(w)},{initial:[],describeKind:"derived"}),f=ie(u);return _.set(c,{node:u,dispose:f}),u}let x,C;function L(){x===void 0&&(x=Q([d],(c,g,u)=>{let f=c[0],m=f!=null&&f.length>0?f.at(-1):u.prevData[0];if(m==null||m.length===0){g.down([[I]]);return}g.emit(m[m.length-1])},{name:t!=null?`${t}::lastValue`:"lastValue",describeKind:"derived",initial:o.size===0?void 0:o.at(o.size-1)}),C=oe([d],([c])=>c.length>0,{name:t!=null?`${t}::hasLatest`:"hasLatest",describeKind:"derived",initial:o.size>0}),ie(x),ie(C))}let V={entries:d,get size(){return o.size},at(c){return o.at(c)},append(c){A(()=>o.append(c))},appendMany(c){c.length!==0&&A(()=>o.appendMany(c))},clear(){A(()=>o.clear())},trimHead(c){A(()=>o.trimHead(c))},withLatest(){return L(),d},get lastValue(){return L(),x},get hasLatest(){return L(),C},view(c){switch(c.kind){case"tail":return M(c.n);case"slice":return S(c.start,c.stop);case"fromCursor":return O(c.cursor)}},attach(c){let g=c.subscribe(u=>{for(let f of u)f[0]===N&&V.append(f[1])});return()=>g()},attachStorage(c){if(c.length===0)return()=>{};let g=new Map;for(let f of c)g.set(f,o.size);(async()=>{for(let f of c)if(typeof f.loadEntries=="function")try{let h=await Promise.resolve(f.loadEntries());h.entries.length>0&&o.size===0&&(o.restore(h.entries),g.set(f,h.entries.length),l());break}catch{}})();let u=d.subscribe(f=>{for(let h of f){if(h[0]!==N)continue;let m=h[1];for(let b of c){let w=g.get(b)??0;if(m.length<w){try{let E=b.appendEntries(m);E instanceof Promise&&E.catch(()=>{})}catch{}g.set(b,m.length);continue}if(m.length===w)continue;let D=m.slice(w);g.set(b,m.length);try{let E=b.appendEntries(D);E instanceof Promise&&E.catch(()=>{})}catch{}}}});return()=>u()},disposeAllViews(){for(let c of p.values())c.dispose();p.clear();for(let c of y.values())c.dispose();y.clear();for(let c of _.values())c.dispose();_.clear()},dispose(){for(let c of p.values())c.dispose();p.clear();for(let c of y.values())c.dispose();y.clear();for(let c of _.values())c.dispose();_.clear()}};return V}var Ot=je((n,e)=>{n("observe"),n("signal"),e("write")});function st(n){let e=rt([],{name:n.name,maxSize:n.retainedLimit??1024,guard:n.guard??Ot,...n.versioning!=null?{versioning:n.versioning}:{}});return e.withLatest(),n.graph&&n.graph.add(e.entries,{name:n.name}),e}var Ct=n=>n.correlationId;function ot(n){if(n==null)return Promise.resolve(void 0);let e=tt(n);return new Promise((t,r)=>{let s=!1,i,a=()=>{i&&i()};i=e.subscribe(o=>{if(!s)for(let d of o){if(d[0]===N){s=!0,Promise.resolve().then(a),t(d[1]);return}if(d[0]===v){s=!0,Promise.resolve().then(a),r(d[1]);return}if(d[0]===R){s=!0,Promise.resolve().then(a),t(void 0);return}}})})}async function Dt(n,e,t,r,s){let i;for(let a=0;a<=r;a++){if(a>0){let o=s[Math.min(a-1,s.length-1)]??0;o>0&&await new Promise(d=>setTimeout(d,o))}try{return await ot(n(e,t))}catch(o){i=o}}return{kind:"fail",error:i}}function Lt(n,e,t){let r=t.retryMax??0,s=t.backoffMs??[0],i=1024,a=new Map,o=new Set,d=new Map,l=st({name:`${e}_process_instances`,retainedLimit:i,graph:n}),p=0;function y(){return++p}function _(u,f,h){T(u,f,h,void 0)}function T(u,f,h,m){let b=j(),w={correlationId:u,state:f,status:h,startedAt:d.get(u)??b,updatedAt:b,t_ns:b,seq:y(),...t.handlerVersion!==void 0?{handlerVersion:t.handlerVersion}:{},...m!==void 0?{reason:m}:{}};l.append(w)}let k=`_process_${e}_started`;n.event(k),t.persistence?.eventStorage&&n.attachEventStorage(t.persistence.eventStorage);async function A(u,f,h,m){if(o.delete(u),a.delete(u),d.delete(u),t.compensate)try{await ot(t.compensate(f,h)),T(u,f,"compensated",m)}catch{_(u,f,"failed")}else _(u,f,"failed")}async function M(u,f){if(o.has(u)){if(f.kind==="fail"){let h=a.get(u)??t.initial;await A(u,h,f.error);return}if(f.kind==="continue"){if(a.set(u,f.state),f.emit)for(let h of f.emit)try{n._appendEvent(h.type,h.payload,{correlationId:u,aggregateId:u})}catch{}if(_(u,f.state,"running"),t.isTerminal?.(f.state)){o.delete(u),a.delete(u),d.delete(u),_(u,f.state,"terminated");return}if(f.schedule){let{afterMs:h,eventType:m}=f.schedule,b,w=Qe(h),D=E=>{for(let G of E)if(G[0]===N){if(b?b():queueMicrotask(()=>b?.()),!o.has(u))return;let ee=a.get(u);if(ee===void 0)return;let H=t.steps[m];if(!H)return;let ae={type:m,payload:null,timestampNs:j(),seq:Number.NaN,correlationId:u,aggregateId:u};O(u,H,ee,ae)}};b=w.subscribe(D)}return}if(f.kind==="terminate"){if(a.set(u,f.state),f.emit)for(let h of f.emit)try{n._appendEvent(h.type,h.payload,{correlationId:u,aggregateId:u})}catch{}o.delete(u),a.delete(u),d.delete(u),_(u,f.state,"terminated")}}}let S=new Map;function O(u,f,h,m){let w=(S.get(u)??Promise.resolve()).then(async()=>{let D=a.get(u);if(D===void 0||!o.has(u))return;let E;try{E=await Dt(f,D,m,r,s)}catch(G){await A(u,a.get(u)??t.initial,G);return}await M(u,E)});S.set(u,w),w.finally(()=>{S.get(u)===w&&S.delete(u)})}let x=!1,C=[];for(let u of t.watching){let f=n.event(u),h=0;h=(f.cache??[]).length;let b=f.subscribe(w=>{for(let D of w){if(D[0]!==N)continue;let E=D[1];if(E.length<=h)continue;let G=E.slice(h);h=E.length;for(let ee of G){let H=ee.correlationId;if(H===void 0||!o.has(H))continue;let ae=t.steps[u];if(!ae)continue;let Ce=a.get(H);Ce!==void 0&&O(H,ae,Ce,ee)}}});C.push(b)}function L(u,f){if(x||o.has(u))return;let h=j();d.set(u,h),a.set(u,t.initial),o.add(u);try{n._appendEvent(k,f??null,{correlationId:u,aggregateId:u})}catch{}_(u,t.initial,"running")}function V(u,f){if(x||!o.has(u))return;let h=a.get(u)??t.initial;A(u,h,new Error(`cancelled: ${f??"no reason given"}`),f)}function c(u){return a.get(u)}function g(){if(!x){x=!0;for(let u of C)try{u()}catch{}C.length=0}}return{instances:l,audit:l,start:L,cancel:V,getState:c,dispose:g}}0&&(module.exports={processInstanceKeyOf,processManager});
@@ -1,10 +1,10 @@
1
- import '../../reactive-log-CgbNqksB.cjs';
1
+ import '../../reactive-log-ScpWyqny.cjs';
2
2
  import '../../extra/sources.cjs';
3
3
  import '../../extra/storage-tiers.cjs';
4
4
  import '../../imperative-audit-ahAE65a9.cjs';
5
- import '../../index-zK_mN1D-.cjs';
6
- export { P as ProcessCompensate, a as ProcessInstance, b as ProcessManagerOpts, c as ProcessManagerResult, d as ProcessSchedule, e as ProcessStep, f as ProcessStepResult, p as processInstanceKeyOf, g as processManager } from '../../index-CGKs5ixV.cjs';
5
+ import '../../index-BECJ8M0T.cjs';
6
+ export { P as ProcessCompensate, a as ProcessInstance, b as ProcessManagerOpts, c as ProcessManagerResult, d as ProcessSchedule, e as ProcessStep, f as ProcessStepResult, p as processInstanceKeyOf, g as processManager } from '../../index-C_qi0WlF.cjs';
7
7
  import '../../node-fSc-hCv8.cjs';
8
- import '../../graph-kTltt95s.cjs';
8
+ import '../../graph-CaNXUc3c.cjs';
9
9
  import '../../meta-BGO6C7K9.cjs';
10
10
  import '../../extra/storage-core.cjs';
@@ -1,10 +1,10 @@
1
- import '../../reactive-log-ByBb8g6A.js';
1
+ import '../../reactive-log-jirQsxMY.js';
2
2
  import '../../extra/sources.js';
3
3
  import '../../extra/storage-tiers.js';
4
4
  import '../../imperative-audit-ahAE65a9.js';
5
- import '../../index-DBmBtqAN.js';
6
- export { P as ProcessCompensate, a as ProcessInstance, b as ProcessManagerOpts, c as ProcessManagerResult, d as ProcessSchedule, e as ProcessStep, f as ProcessStepResult, p as processInstanceKeyOf, g as processManager } from '../../index-hXKhbfh-.js';
5
+ import '../../index-DuhOdNyg.js';
6
+ export { P as ProcessCompensate, a as ProcessInstance, b as ProcessManagerOpts, c as ProcessManagerResult, d as ProcessSchedule, e as ProcessStep, f as ProcessStepResult, p as processInstanceKeyOf, g as processManager } from '../../index-BhLA9feT.js';
7
7
  import '../../node-fSc-hCv8.js';
8
- import '../../graph-Cv-8x0ZI.js';
8
+ import '../../graph-YQXDndFy.js';
9
9
  import '../../meta-CC6EPdpK.js';
10
10
  import '../../extra/storage-core.js';
@@ -1 +1 @@
1
- import{a,b}from"../../chunk-UAMWD4GG.js";import"../../chunk-CUQFO6MT.js";import"../../chunk-5KPIYVCC.js";import"../../chunk-SGS4OJGS.js";import"../../chunk-ESMPEKEV.js";import"../../chunk-533RQFF6.js";import"../../chunk-RLMYS3XZ.js";import"../../chunk-MQZWA3DF.js";import"../../chunk-LYCLF26R.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{a as processInstanceKeyOf,b as processManager};
1
+ import{a,b}from"../../chunk-UODQF4EY.js";import"../../chunk-FJ6IEMOS.js";import"../../chunk-B4L5X2QO.js";import"../../chunk-SGS4OJGS.js";import"../../chunk-ESMPEKEV.js";import"../../chunk-533RQFF6.js";import"../../chunk-KUVDFOJH.js";import"../../chunk-MQZWA3DF.js";import"../../chunk-LYCLF26R.js";import"../../chunk-CK2E7BTU.js";import"../../chunk-QYADASLV.js";export{a as processInstanceKeyOf,b as processManager};