@jucie.io/cli 1.0.11 → 1.0.20

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 (629) hide show
  1. package/dist/jucie.js +223 -163
  2. package/dist/stage/chunks/addAction-3QC2Z4ZR.js +1 -0
  3. package/dist/stage/chunks/addAnimationBinding-N3UW27JM.js +1 -0
  4. package/dist/stage/chunks/addAttribute-MEJIGMHV.js +1 -0
  5. package/dist/stage/chunks/addComponent-AQQI46C3.js +1 -0
  6. package/dist/stage/chunks/addComputed-2JNIUCEP.js +1 -0
  7. package/dist/stage/chunks/addEvent-PN6P6KR5.js +1 -0
  8. package/dist/stage/chunks/addLifecycleHook-D2UKKFVW.js +1 -0
  9. package/dist/stage/chunks/addNode-UXIXDXSD.js +1 -0
  10. package/dist/stage/chunks/addOption-AFCUFOT7.js +1 -0
  11. package/dist/stage/chunks/addParamToRoute-6LOHCID7.js +1 -0
  12. package/dist/stage/chunks/addState-RSEYKWQO.js +1 -0
  13. package/dist/stage/chunks/addStore-AK2FTEON.js +1 -0
  14. package/dist/stage/chunks/addToken-35LUBJPE.js +1 -0
  15. package/dist/stage/chunks/addTree-CU7MJAKT.js +1 -0
  16. package/dist/stage/chunks/addValue-LIQSHZFR.js +1 -0
  17. package/dist/stage/chunks/{aiAttachmentContracts-4GX7AD4P.js → aiAttachmentContracts-KGD3EHZQ.js} +1 -1
  18. package/dist/stage/chunks/{aiMessagesContracts-3IZEU24J.js → aiMessagesContracts-QWUORKI3.js} +1 -1
  19. package/dist/stage/chunks/aiRelay-LW2UZKRR.js +1 -0
  20. package/dist/stage/chunks/{aiSessionContracts-SCDHZZA3.js → aiSessionContracts-RQKGQY4N.js} +1 -1
  21. package/dist/stage/chunks/assets-5J5INILR.js +1 -0
  22. package/dist/stage/chunks/capture-VQE5664P.js +1 -0
  23. package/dist/stage/chunks/{chunk-GG4NWMR6.js → chunk-2JXGTRSC.js} +1 -1
  24. package/dist/stage/chunks/{chunk-BS35FNXF.js → chunk-3GPQ3HYG.js} +1 -1
  25. package/dist/stage/chunks/chunk-3KR3JD5T.js +1 -0
  26. package/dist/stage/chunks/chunk-457GNGEV.js +1 -0
  27. package/dist/stage/chunks/chunk-4KXBOJIC.js +1 -0
  28. package/dist/stage/chunks/chunk-4UJAZNZX.js +1 -0
  29. package/dist/stage/chunks/{chunk-TS6FANUG.js → chunk-5N7NET6A.js} +1 -1
  30. package/dist/stage/chunks/chunk-5RVLCYPU.js +1 -0
  31. package/dist/stage/chunks/chunk-6JNM2JPA.js +1 -0
  32. package/dist/stage/chunks/{chunk-SRRJXNKG.js → chunk-7C53OCBB.js} +1 -1
  33. package/dist/stage/chunks/chunk-7DIGILX7.js +1 -0
  34. package/dist/stage/chunks/{chunk-LOMYBRPE.js → chunk-7H7BUWZP.js} +1 -1
  35. package/dist/stage/chunks/chunk-7SM7WG53.js +1 -0
  36. package/dist/stage/chunks/{chunk-6ZZBJPN5.js → chunk-A7T3U7OZ.js} +1 -1
  37. package/dist/stage/chunks/chunk-AOLXVYBO.js +1 -0
  38. package/dist/stage/chunks/{chunk-OB6WEYNB.js → chunk-ATDHO5ME.js} +1 -1
  39. package/dist/stage/chunks/{chunk-V4F2T2VR.js → chunk-BCDDG7CW.js} +1 -1
  40. package/dist/stage/chunks/chunk-CB4COXKW.js +1 -0
  41. package/dist/stage/chunks/{chunk-4XNQRZ5E.js → chunk-CM6UENYI.js} +1 -1
  42. package/dist/stage/chunks/{chunk-K6PCHHH7.js → chunk-CVWMERPH.js} +1 -1
  43. package/dist/stage/chunks/{chunk-XKEDVW6X.js → chunk-DDCGP5GM.js} +1 -1
  44. package/dist/stage/chunks/chunk-DOGIABU3.js +1 -0
  45. package/dist/stage/chunks/{chunk-SMO45CB3.js → chunk-DUMMXI6I.js} +1 -1
  46. package/dist/stage/chunks/{chunk-HI7ALMQD.js → chunk-E3LBHSMZ.js} +1 -1
  47. package/dist/stage/chunks/chunk-E7JXTPFA.js +1 -0
  48. package/dist/stage/chunks/chunk-GBE5QYRO.js +1 -0
  49. package/dist/stage/chunks/{chunk-BEYPHEBR.js → chunk-GFV4SJGI.js} +1 -1
  50. package/dist/stage/chunks/{chunk-NYG3CJEJ.js → chunk-GILBTTLF.js} +1 -1
  51. package/dist/stage/chunks/chunk-GPV2ZFME.js +1 -0
  52. package/dist/stage/chunks/chunk-HBNF34QX.js +1 -0
  53. package/dist/stage/chunks/{chunk-GIVV5ZCM.js → chunk-HREW6EFQ.js} +1 -1
  54. package/dist/stage/chunks/chunk-HZ7KMV42.js +1 -0
  55. package/dist/stage/chunks/{chunk-U2OFNNHI.js → chunk-HZXJUIIX.js} +1 -1
  56. package/dist/stage/chunks/{chunk-5SOTDESD.js → chunk-IE6IKN6P.js} +1 -1
  57. package/dist/stage/chunks/chunk-IWO4MU2F.js +1 -0
  58. package/dist/stage/chunks/chunk-J7XIIFXF.js +1 -0
  59. package/dist/stage/chunks/chunk-JG62FTV2.js +1 -0
  60. package/dist/stage/chunks/{chunk-L7VQYHXR.js → chunk-JGELXWD3.js} +1 -1
  61. package/dist/stage/chunks/chunk-JKJRK7ER.js +1 -0
  62. package/dist/stage/chunks/{chunk-PU3DZ3MV.js → chunk-JPPPL527.js} +1 -1
  63. package/dist/stage/chunks/chunk-JRCZXEL2.js +1 -0
  64. package/dist/stage/chunks/{chunk-ODSNVDNS.js → chunk-K33QXMAS.js} +1 -1
  65. package/dist/stage/chunks/{chunk-EPBR3BES.js → chunk-K4R2DLAT.js} +1 -1
  66. package/dist/stage/chunks/{chunk-C3DY5XVP.js → chunk-MA3WBBC6.js} +1 -1
  67. package/dist/stage/chunks/chunk-MHU6JTZC.js +1 -0
  68. package/dist/stage/chunks/{chunk-D6NZE747.js → chunk-MO2MHTOQ.js} +1 -1
  69. package/dist/stage/chunks/chunk-MQKISAKO.js +1 -0
  70. package/dist/stage/chunks/{chunk-ARGFDBBK.js → chunk-ND3BSJOS.js} +1 -1
  71. package/dist/stage/chunks/chunk-NGQ7GQSH.js +1 -0
  72. package/dist/stage/chunks/{chunk-VQ7C6EUZ.js → chunk-NM4FV6YK.js} +1 -1
  73. package/dist/stage/chunks/chunk-NOHQVE3L.js +1 -0
  74. package/dist/stage/chunks/{chunk-MLL2ANA6.js → chunk-O6ZKHW5L.js} +1 -1
  75. package/dist/stage/chunks/{chunk-GDGHGTYN.js → chunk-PBDA5G7U.js} +1 -1
  76. package/dist/stage/chunks/{chunk-RZ74UWF3.js → chunk-PBDSKQIQ.js} +1 -1
  77. package/dist/stage/chunks/chunk-PJFVW637.js +1 -0
  78. package/dist/stage/chunks/{chunk-AJVQKPCQ.js → chunk-PRXT2NXZ.js} +1 -1
  79. package/dist/stage/chunks/chunk-QAUB5H3S.js +1 -0
  80. package/dist/stage/chunks/{chunk-BVAPODQ7.js → chunk-QDH6OIAL.js} +1 -1
  81. package/dist/stage/chunks/{chunk-TEUB5MUS.js → chunk-QM4IVTLC.js} +1 -1
  82. package/dist/stage/chunks/chunk-QUWCLSNF.js +1 -0
  83. package/dist/stage/chunks/{chunk-P3WBUN2B.js → chunk-QVOXRLEG.js} +1 -1
  84. package/dist/stage/chunks/chunk-RAHM76FI.js +1 -0
  85. package/dist/stage/chunks/chunk-RONEQF2M.js +1 -0
  86. package/dist/stage/chunks/{chunk-V7BNWQS6.js → chunk-RPTOBIKP.js} +1 -1
  87. package/dist/stage/chunks/{chunk-LR6DSVPP.js → chunk-RSWDPV5U.js} +1 -1
  88. package/dist/stage/chunks/chunk-SSSTBYOF.js +1 -0
  89. package/dist/stage/chunks/{chunk-OPVVANFS.js → chunk-SV2PSWLZ.js} +1 -1
  90. package/dist/stage/chunks/{chunk-LKQDYABR.js → chunk-TDXJNI7H.js} +1 -1
  91. package/dist/stage/chunks/chunk-TFGNKPAQ.js +1 -0
  92. package/dist/stage/chunks/chunk-TYA35RCB.js +1 -0
  93. package/dist/stage/chunks/{chunk-TBDEUSP4.js → chunk-UJZNQZVK.js} +1 -1
  94. package/dist/stage/chunks/{chunk-5PUPZLDN.js → chunk-UN7EZPD7.js} +1 -1
  95. package/dist/stage/chunks/chunk-UOBNXO4G.js +1 -0
  96. package/dist/stage/chunks/chunk-UVV4NANW.js +97 -0
  97. package/dist/stage/chunks/{chunk-5OOKGI32.js → chunk-V5TNO5LS.js} +1 -1
  98. package/dist/stage/chunks/chunk-VHRU6H4C.js +1 -0
  99. package/dist/stage/chunks/chunk-VP2XJ5UI.js +1 -0
  100. package/dist/stage/chunks/{chunk-ZCAGAEP2.js → chunk-VQDQA3ID.js} +1 -1
  101. package/dist/stage/chunks/chunk-VZJTFJZN.js +1 -0
  102. package/dist/stage/chunks/chunk-WCL6XNDN.js +1 -0
  103. package/dist/stage/chunks/chunk-WKUYNMPE.js +1 -0
  104. package/dist/stage/chunks/chunk-WWWIZ7VG.js +1 -0
  105. package/dist/stage/chunks/{chunk-QG2BGE2O.js → chunk-X2R3VYWI.js} +1 -1
  106. package/dist/stage/chunks/{chunk-CVDUFBBG.js → chunk-X5HHNNED.js} +1 -1
  107. package/dist/stage/chunks/{chunk-ZEWKYCOX.js → chunk-X5INDUEQ.js} +1 -1
  108. package/dist/stage/chunks/chunk-XBUV5F3F.js +1 -0
  109. package/dist/stage/chunks/{chunk-HBEWYDHO.js → chunk-XPWU54SD.js} +1 -1
  110. package/dist/stage/chunks/chunk-YFURTAAV.js +1 -0
  111. package/dist/stage/chunks/chunk-YRI4I37X.js +1 -0
  112. package/dist/stage/chunks/chunk-ZCUNR3XN.js +1 -0
  113. package/dist/stage/chunks/clearDestination-TFFJZYZU.js +1 -0
  114. package/dist/stage/chunks/clearName-LAT5C4G3.js +1 -0
  115. package/dist/stage/chunks/clearOptionsExpression-QHE4GD2Y.js +1 -0
  116. package/dist/stage/chunks/clearRender-XEMKLRCM.js +1 -0
  117. package/dist/stage/chunks/clearRepeat-OJXLCGGV.js +1 -0
  118. package/dist/stage/chunks/contentEditor-H4QUMYKV.js +1 -0
  119. package/dist/stage/chunks/createAction-X7WWJ6BN.js +1 -0
  120. package/dist/stage/chunks/createAnimation-TYRSVQNL.js +1 -0
  121. package/dist/stage/chunks/createComputed-NVI2BGGF.js +1 -0
  122. package/dist/stage/chunks/createTextContent-R4ZOE6SM.js +1 -0
  123. package/dist/stage/chunks/createValue-GRZQQ5RR.js +1 -0
  124. package/dist/stage/chunks/design-2S7QAGYM.js +15 -0
  125. package/dist/stage/chunks/dev-PZI3DDXQ.js +1 -0
  126. package/dist/stage/chunks/disconnectNode-RRO6QPMX.js +1 -0
  127. package/dist/stage/chunks/{history-BNHS2T3X.js → history-5FAKKGJY.js} +1 -1
  128. package/dist/stage/chunks/{id-T5EU463K.js → id-G47WSCWG.js} +1 -1
  129. package/dist/stage/chunks/main-GPY4VWAB.js +1 -0
  130. package/dist/stage/chunks/{main-TUNP7F4N.js → main-OLXPOBOM.js} +1 -1
  131. package/dist/stage/chunks/{main-DDWQFH23.js → main-QADVRVCC.js} +1 -1
  132. package/dist/stage/chunks/main-RMI3HY2B.js +1 -0
  133. package/dist/stage/chunks/moveNodeToLastChildOf-SGHEMUMS.js +1 -0
  134. package/dist/stage/chunks/{nodeGraph-ZXVLUHBH.js → nodeGraph-UGMYCUUO.js} +1 -1
  135. package/dist/stage/chunks/{normalizeEventName-6HVMB5GN.js → normalizeEventName-Y34QRO25.js} +1 -1
  136. package/dist/stage/chunks/preview-UBVA3QQU.js +1 -0
  137. package/dist/stage/chunks/removeAction-UIZVYC4K.js +1 -0
  138. package/dist/stage/chunks/removeAnimationBinding-PD2IRVQZ.js +1 -0
  139. package/dist/stage/chunks/removeAttribute-HCDVVDSZ.js +1 -0
  140. package/dist/stage/chunks/removeComputed-2UWAXEAM.js +1 -0
  141. package/dist/stage/chunks/removeEvent-GBW7REQV.js +1 -0
  142. package/dist/stage/chunks/removeLifecycleHook-V4BK7NPV.js +1 -0
  143. package/dist/stage/chunks/removeNode-H7TWCLTZ.js +1 -0
  144. package/dist/stage/chunks/removeOption-4SMMGXLO.js +1 -0
  145. package/dist/stage/chunks/removeParamFromRoute-2Q2PYYP5.js +1 -0
  146. package/dist/stage/chunks/removeState-X4UQTIPT.js +1 -0
  147. package/dist/stage/chunks/removeStore-B3WQQP3D.js +1 -0
  148. package/dist/stage/chunks/removeToken-3QTFHQF6.js +1 -0
  149. package/dist/stage/chunks/removeValue-QIQBSOHR.js +1 -0
  150. package/dist/stage/chunks/setDestination-26OTLIOX.js +1 -0
  151. package/dist/stage/chunks/setHomePage-GBSAVDQC.js +1 -0
  152. package/dist/stage/chunks/setHtmlId-PZQQWCXU.js +1 -0
  153. package/dist/stage/chunks/setName-C26SXODP.js +1 -0
  154. package/dist/stage/chunks/setNodeLayout-PZMYT6M2.js +1 -0
  155. package/dist/stage/chunks/setOptionsExpression-PQ3JOVEW.js +1 -0
  156. package/dist/stage/chunks/setRender-MNCOTE35.js +1 -0
  157. package/dist/stage/chunks/setRepeat-GIOC7YT4.js +1 -0
  158. package/dist/stage/chunks/setTagName-FA7BMEUS.js +1 -0
  159. package/dist/stage/chunks/updateAction-TUQLHSJE.js +1 -0
  160. package/dist/stage/chunks/updateAnimationBinding-I3AQNLO2.js +1 -0
  161. package/dist/stage/chunks/updateAttribute-TLLDGUPR.js +1 -0
  162. package/dist/stage/chunks/updateBounds-KL4N7VYO.js +1 -0
  163. package/dist/stage/chunks/updateComputed-JGJIIC4A.js +1 -0
  164. package/dist/stage/chunks/updateEvent-YOKH67TX.js +1 -0
  165. package/dist/stage/chunks/updateHtml-Z4XI7SYU.js +1 -0
  166. package/dist/stage/chunks/updateLifecycleHook-4555YGGM.js +1 -0
  167. package/dist/stage/chunks/updateOption-YUFQYF43.js +1 -0
  168. package/dist/stage/chunks/updateRoute-42OSDVLS.js +1 -0
  169. package/dist/stage/chunks/updateState-3RQX5YED.js +1 -0
  170. package/dist/stage/chunks/updateStyle-I5NO4TOV.js +1 -0
  171. package/dist/stage/chunks/updateToken-AFJYTJ7R.js +1 -0
  172. package/dist/stage/chunks/updateValue-XGRBUCOT.js +1 -0
  173. package/dist/stage/chunks/{user-LKHAFHX4.js → user-CK5IAVFH.js} +1 -1
  174. package/dist/stage/chunks/{validateStorePayload-PJ5AD64S.js → validateStorePayload-3HAVFGVL.js} +1 -1
  175. package/dist/stage/chunks/{viewport-ANZ3RTUP.js → viewport-CQRIOXC6.js} +1 -1
  176. package/dist/stage/chunks/window-7JZPBAP7.js +1 -0
  177. package/dist/stage/design.js +1 -1
  178. package/dist/stage/dev.js +1 -1
  179. package/dist/stage/preview.js +1 -1
  180. package/dist/stage/prod.js +1 -1
  181. package/dist/stage-bundles/preact/chunks/addComponent-3JC5NC3Y.js +1 -0
  182. package/dist/stage-bundles/preact/chunks/addNode-QXU2P4AE.js +1 -0
  183. package/dist/stage-bundles/preact/chunks/addTree-S73GXWZP.js +1 -0
  184. package/dist/stage-bundles/{vue/chunks/aiAttachmentContracts-V3EW4BHI.js → preact/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  185. package/dist/stage-bundles/{vue/chunks/aiMessagesContracts-ZGHZJ7EU.js → preact/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  186. package/dist/stage-bundles/preact/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  187. package/dist/stage-bundles/preact/chunks/{aiSessionContracts-WAMOGHSG.js → aiSessionContracts-NHU57TUZ.js} +1 -1
  188. package/dist/stage-bundles/preact/chunks/assets-6LM3GVQU.js +1 -0
  189. package/dist/stage-bundles/preact/chunks/capture-ON3BO6WE.js +1 -0
  190. package/dist/stage-bundles/preact/chunks/chunk-2Z2RXHNK.js +1 -0
  191. package/dist/stage-bundles/preact/chunks/chunk-3WCN6R5H.js +1 -0
  192. package/dist/stage-bundles/preact/chunks/chunk-45YNKT2X.js +1 -0
  193. package/dist/stage-bundles/preact/chunks/chunk-4Q5R44ZZ.js +1 -0
  194. package/dist/stage-bundles/preact/chunks/chunk-7I5TQOE2.js +1 -0
  195. package/dist/stage-bundles/preact/chunks/chunk-7YVQSQRP.js +1 -0
  196. package/dist/stage-bundles/preact/chunks/chunk-AOGIMUZ2.js +103 -0
  197. package/dist/stage-bundles/preact/chunks/chunk-BGQJ5B3Q.js +1 -0
  198. package/dist/stage-bundles/preact/chunks/chunk-CGCD6S33.js +6 -0
  199. package/dist/stage-bundles/preact/chunks/chunk-DWW3567Q.js +1 -0
  200. package/dist/stage-bundles/preact/chunks/chunk-G3PYA3EU.js +1 -0
  201. package/dist/stage-bundles/preact/chunks/chunk-H5NHEM4C.js +1 -0
  202. package/dist/stage-bundles/preact/chunks/chunk-IG2Y3H6O.js +1 -0
  203. package/dist/stage-bundles/preact/chunks/chunk-IWTWZA3T.js +1 -0
  204. package/dist/stage-bundles/preact/chunks/chunk-LXD22ETU.js +1 -0
  205. package/dist/stage-bundles/preact/chunks/chunk-M577WNTV.js +1 -0
  206. package/dist/stage-bundles/preact/chunks/chunk-NFKUJQZH.js +1 -0
  207. package/dist/stage-bundles/preact/chunks/chunk-NKDO4J6J.js +1 -0
  208. package/dist/stage-bundles/preact/chunks/chunk-SCJKRPIZ.js +1 -0
  209. package/dist/stage-bundles/preact/chunks/{chunk-O24ISLGT.js → chunk-ULVFWUAU.js} +1 -1
  210. package/dist/stage-bundles/preact/chunks/contentEditor-7BYCT3TH.js +1 -0
  211. package/dist/stage-bundles/preact/chunks/design-3DHGUCPX.js +15 -0
  212. package/dist/stage-bundles/preact/chunks/{history-VAAFKC4E.js → history-CMF3VYTT.js} +1 -1
  213. package/dist/stage-bundles/preact/chunks/main-3VRCGPRY.js +1 -0
  214. package/dist/stage-bundles/preact/chunks/{main-KFGWT6OT.js → main-DH4JOS22.js} +1 -1
  215. package/dist/stage-bundles/preact/chunks/{main-MVCLW2IY.js → main-FAFZABOS.js} +1 -1
  216. package/dist/stage-bundles/preact/chunks/main-S7RT75O6.js +1 -0
  217. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-CWSWITHI.js +1 -0
  218. package/dist/stage-bundles/preact/chunks/{nodeGraph-JS64VAAQ.js → nodeGraph-UNI2HUNX.js} +1 -1
  219. package/dist/stage-bundles/preact/chunks/preview-YOYSHYJF.js +1 -0
  220. package/dist/stage-bundles/preact/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  221. package/dist/stage-bundles/preact/chunks/{user-FCPIGR7X.js → user-H5DKMGWA.js} +1 -1
  222. package/dist/stage-bundles/preact/chunks/{viewport-LLBH2LJW.js → viewport-ZRWTVYC3.js} +1 -1
  223. package/dist/stage-bundles/preact/chunks/window-IMPT5I3D.js +1 -0
  224. package/dist/stage-bundles/preact/entry.js +1 -1
  225. package/dist/stage-bundles/preact/framework-compat.js +1 -1
  226. package/dist/stage-bundles/preact/framework-hooks.js +1 -1
  227. package/dist/stage-bundles/preact/framework-jsx-runtime.js +1 -1
  228. package/dist/stage-bundles/preact/framework.js +1 -1
  229. package/dist/stage-bundles/preact/sdk.js +1 -1
  230. package/dist/stage-bundles/react/chunks/{addAction-BMIMOFKC.js → addAction-EGLGEGTS.js} +1 -1
  231. package/dist/stage-bundles/react/chunks/addAnimationBinding-WCB5VZLU.js +1 -0
  232. package/dist/stage-bundles/react/chunks/{addAttribute-2WJG6MQQ.js → addAttribute-2MZ3OFUE.js} +1 -1
  233. package/dist/stage-bundles/react/chunks/addComponent-3JC5NC3Y.js +1 -0
  234. package/dist/stage-bundles/react/chunks/{addComputed-WNYOBBU3.js → addComputed-7JLBFD6I.js} +1 -1
  235. package/dist/stage-bundles/react/chunks/{addEvent-KKSUEWJZ.js → addEvent-HOBNKM2F.js} +1 -1
  236. package/dist/stage-bundles/react/chunks/{addLifecycleHook-KXJ6HEKQ.js → addLifecycleHook-GHYL7FRH.js} +1 -1
  237. package/dist/stage-bundles/react/chunks/addNode-QXU2P4AE.js +1 -0
  238. package/dist/stage-bundles/react/chunks/{addOption-6OBUAJDH.js → addOption-PVXGN7AJ.js} +1 -1
  239. package/dist/stage-bundles/react/chunks/addParamToRoute-VL2VOFZS.js +1 -0
  240. package/dist/stage-bundles/react/chunks/{addState-BH7Q5V6N.js → addState-U2NWEGWV.js} +1 -1
  241. package/dist/stage-bundles/react/chunks/addStore-AQMFKH33.js +1 -0
  242. package/dist/stage-bundles/react/chunks/{addToken-DFONVP3M.js → addToken-XF2FFA52.js} +1 -1
  243. package/dist/stage-bundles/react/chunks/addTree-S73GXWZP.js +1 -0
  244. package/dist/stage-bundles/react/chunks/{addValue-6SJ7KR7G.js → addValue-O7YXXMST.js} +1 -1
  245. package/dist/stage-bundles/{preact/chunks/aiAttachmentContracts-V3EW4BHI.js → react/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  246. package/dist/stage-bundles/{preact/chunks/aiMessagesContracts-ZGHZJ7EU.js → react/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  247. package/dist/stage-bundles/react/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  248. package/dist/stage-bundles/{vue/chunks/aiSessionContracts-WAMOGHSG.js → react/chunks/aiSessionContracts-NHU57TUZ.js} +1 -1
  249. package/dist/stage-bundles/react/chunks/assets-6LM3GVQU.js +1 -0
  250. package/dist/stage-bundles/react/chunks/capture-6GFKGXIT.js +1 -0
  251. package/dist/stage-bundles/react/chunks/chunk-2Z2RXHNK.js +1 -0
  252. package/dist/stage-bundles/react/chunks/chunk-3WCN6R5H.js +1 -0
  253. package/dist/stage-bundles/react/chunks/chunk-45YNKT2X.js +1 -0
  254. package/dist/stage-bundles/react/chunks/chunk-4Q5R44ZZ.js +1 -0
  255. package/dist/stage-bundles/react/chunks/chunk-7I5TQOE2.js +1 -0
  256. package/dist/stage-bundles/react/chunks/chunk-7YVQSQRP.js +1 -0
  257. package/dist/stage-bundles/react/chunks/chunk-BGQJ5B3Q.js +1 -0
  258. package/dist/stage-bundles/react/chunks/chunk-CGCD6S33.js +6 -0
  259. package/dist/stage-bundles/react/chunks/chunk-G3PYA3EU.js +1 -0
  260. package/dist/stage-bundles/react/chunks/{chunk-5HITMZZP.js → chunk-G5RN6RXS.js} +1 -1
  261. package/dist/stage-bundles/react/chunks/chunk-HJOMUN4M.js +49 -0
  262. package/dist/stage-bundles/react/chunks/chunk-IG2Y3H6O.js +1 -0
  263. package/dist/stage-bundles/react/chunks/chunk-IWTWZA3T.js +1 -0
  264. package/dist/stage-bundles/react/chunks/{chunk-FCMIFWSU.js → chunk-KLPU3QNW.js} +1 -1
  265. package/dist/stage-bundles/react/chunks/chunk-LXD22ETU.js +1 -0
  266. package/dist/stage-bundles/react/chunks/chunk-M577WNTV.js +1 -0
  267. package/dist/stage-bundles/react/chunks/chunk-NFKUJQZH.js +1 -0
  268. package/dist/stage-bundles/react/chunks/chunk-NKDO4J6J.js +1 -0
  269. package/dist/stage-bundles/react/chunks/{chunk-76SRFCJO.js → chunk-P3ZDKQWG.js} +1 -1
  270. package/dist/stage-bundles/react/chunks/chunk-SCJKRPIZ.js +1 -0
  271. package/dist/stage-bundles/react/chunks/chunk-U66LRTNF.js +1 -0
  272. package/dist/stage-bundles/react/chunks/chunk-UCLSDDOL.js +1 -0
  273. package/dist/stage-bundles/{vue/chunks/chunk-O24ISLGT.js → react/chunks/chunk-ULVFWUAU.js} +1 -1
  274. package/dist/stage-bundles/react/chunks/clearDestination-IGKNL7FN.js +1 -0
  275. package/dist/stage-bundles/react/chunks/clearName-HJ7ZTHBU.js +1 -0
  276. package/dist/stage-bundles/react/chunks/clearOptionsExpression-NZQFL64E.js +1 -0
  277. package/dist/stage-bundles/react/chunks/clearRender-NPVDTNFA.js +1 -0
  278. package/dist/stage-bundles/react/chunks/clearRepeat-7YFYZODP.js +1 -0
  279. package/dist/stage-bundles/react/chunks/contentEditor-7BYCT3TH.js +1 -0
  280. package/dist/stage-bundles/react/chunks/{createAction-ITB7SY4A.js → createAction-73YUTK3T.js} +1 -1
  281. package/dist/stage-bundles/react/chunks/createAnimation-2WQSMYT5.js +1 -0
  282. package/dist/stage-bundles/react/chunks/{createComputed-BMWO4U4T.js → createComputed-DMX7CJA3.js} +1 -1
  283. package/dist/stage-bundles/react/chunks/{createTextContent-ZVU57TXU.js → createTextContent-4Z4YATBO.js} +1 -1
  284. package/dist/stage-bundles/react/chunks/createValue-DXQSLOBG.js +1 -0
  285. package/dist/stage-bundles/react/chunks/design-6KSNU4OK.js +15 -0
  286. package/dist/stage-bundles/react/chunks/{disconnectNode-PNUX55O2.js → disconnectNode-2CLWVIQP.js} +1 -1
  287. package/dist/stage-bundles/{vue/chunks/history-VAAFKC4E.js → react/chunks/history-CMF3VYTT.js} +1 -1
  288. package/dist/stage-bundles/react/chunks/{id-UUBDNSND.js → id-ZIAZZ5AS.js} +1 -1
  289. package/dist/stage-bundles/react/chunks/main-3VRCGPRY.js +1 -0
  290. package/dist/stage-bundles/{vue/chunks/main-KFGWT6OT.js → react/chunks/main-DH4JOS22.js} +1 -1
  291. package/dist/stage-bundles/react/chunks/{main-XBZULJGK.js → main-FAFZABOS.js} +1 -1
  292. package/dist/stage-bundles/react/chunks/main-S7RT75O6.js +1 -0
  293. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-CWSWITHI.js +1 -0
  294. package/dist/stage-bundles/{vue/chunks/nodeGraph-JS64VAAQ.js → react/chunks/nodeGraph-UNI2HUNX.js} +1 -1
  295. package/dist/stage-bundles/react/chunks/{normalizeEventName-3CSULWE4.js → normalizeEventName-SNBYJDUY.js} +1 -1
  296. package/dist/stage-bundles/react/chunks/preview-KOCHK3AH.js +1 -0
  297. package/dist/stage-bundles/react/chunks/removeAction-T4M5EJN7.js +1 -0
  298. package/dist/stage-bundles/react/chunks/removeAnimationBinding-AIISPC33.js +1 -0
  299. package/dist/stage-bundles/react/chunks/removeAttribute-DCKZLM55.js +1 -0
  300. package/dist/stage-bundles/react/chunks/removeComputed-WSA5GNVZ.js +1 -0
  301. package/dist/stage-bundles/react/chunks/removeEvent-2YZ55HD6.js +1 -0
  302. package/dist/stage-bundles/react/chunks/removeLifecycleHook-SBPJNF5P.js +1 -0
  303. package/dist/stage-bundles/react/chunks/{removeNode-QSDSWHNG.js → removeNode-5HXQ63V3.js} +1 -1
  304. package/dist/stage-bundles/react/chunks/removeOption-SYIFB4XW.js +1 -0
  305. package/dist/stage-bundles/react/chunks/removeParamFromRoute-HAYP3WTT.js +1 -0
  306. package/dist/stage-bundles/react/chunks/removeState-SGJVQ66N.js +1 -0
  307. package/dist/stage-bundles/react/chunks/removeStore-YVBTGA3I.js +1 -0
  308. package/dist/stage-bundles/react/chunks/removeToken-AIDV7DUM.js +1 -0
  309. package/dist/stage-bundles/react/chunks/removeValue-UP5ZFN3U.js +1 -0
  310. package/dist/stage-bundles/react/chunks/setDestination-NCPAVIIK.js +1 -0
  311. package/dist/stage-bundles/react/chunks/setHomePage-O2JYOG6H.js +1 -0
  312. package/dist/stage-bundles/react/chunks/setHtmlId-2W7YW47O.js +1 -0
  313. package/dist/stage-bundles/react/chunks/setName-NKRZPBGG.js +1 -0
  314. package/dist/stage-bundles/react/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  315. package/dist/stage-bundles/react/chunks/{setOptionsExpression-3MOFK54D.js → setOptionsExpression-K5EQXJEY.js} +1 -1
  316. package/dist/stage-bundles/react/chunks/{setRender-WJRTHRML.js → setRender-7XMGQ7ZK.js} +1 -1
  317. package/dist/stage-bundles/react/chunks/{setRepeat-JD6QROHI.js → setRepeat-WN4WZJUN.js} +1 -1
  318. package/dist/stage-bundles/react/chunks/setTagName-U6UJNJLE.js +1 -0
  319. package/dist/stage-bundles/react/chunks/{updateAction-ZW4KGOAQ.js → updateAction-3KSR6ZIJ.js} +1 -1
  320. package/dist/stage-bundles/react/chunks/updateAnimationBinding-HVVHLFBO.js +1 -0
  321. package/dist/stage-bundles/react/chunks/{updateAttribute-HFPDXXBZ.js → updateAttribute-XXZL2P43.js} +1 -1
  322. package/dist/stage-bundles/react/chunks/updateBounds-5M7YQRO3.js +1 -0
  323. package/dist/stage-bundles/react/chunks/{updateComputed-OOBDA4XY.js → updateComputed-7QA6XZIC.js} +1 -1
  324. package/dist/stage-bundles/react/chunks/{updateEvent-LCGAPMAI.js → updateEvent-R52PL2G4.js} +1 -1
  325. package/dist/stage-bundles/react/chunks/updateHtml-YBJJSWQW.js +1 -0
  326. package/dist/stage-bundles/react/chunks/{updateLifecycleHook-RCS2QC44.js → updateLifecycleHook-4RA2U4TR.js} +1 -1
  327. package/dist/stage-bundles/react/chunks/{updateOption-PPZLK4X3.js → updateOption-5U23ZUWV.js} +1 -1
  328. package/dist/stage-bundles/react/chunks/updateRoute-TFQFFFSZ.js +1 -0
  329. package/dist/stage-bundles/react/chunks/{updateState-LRZJPENX.js → updateState-JCUSBQOL.js} +1 -1
  330. package/dist/stage-bundles/react/chunks/updateStyle-JASLFXVX.js +1 -0
  331. package/dist/stage-bundles/react/chunks/updateToken-24P2P2SF.js +1 -0
  332. package/dist/stage-bundles/react/chunks/{updateValue-NTA7TSYR.js → updateValue-TSVJM3PO.js} +1 -1
  333. package/dist/stage-bundles/{vue/chunks/user-FCPIGR7X.js → react/chunks/user-H5DKMGWA.js} +1 -1
  334. package/dist/stage-bundles/react/chunks/{validateStorePayload-VVQBPX4I.js → validateStorePayload-HCBPC7HR.js} +1 -1
  335. package/dist/stage-bundles/{vue/chunks/viewport-LLBH2LJW.js → react/chunks/viewport-ZRWTVYC3.js} +1 -1
  336. package/dist/stage-bundles/react/chunks/window-IMPT5I3D.js +1 -0
  337. package/dist/stage-bundles/react/entry.js +1 -1
  338. package/dist/stage-bundles/react/framework-dom-client.js +1 -1
  339. package/dist/stage-bundles/react/framework-dom.js +1 -1
  340. package/dist/stage-bundles/react/framework-jsx-runtime.js +1 -1
  341. package/dist/stage-bundles/react/framework.js +1 -1
  342. package/dist/stage-bundles/react/sdk.js +1 -1
  343. package/dist/stage-bundles/vue/chunks/addComponent-NG2BML2S.js +1 -0
  344. package/dist/stage-bundles/vue/chunks/addNode-UNXHE5VL.js +1 -0
  345. package/dist/stage-bundles/vue/chunks/addTree-MFMYQTGN.js +1 -0
  346. package/dist/stage-bundles/{react/chunks/aiAttachmentContracts-IIM7E4TZ.js → vue/chunks/aiAttachmentContracts-7LLE57FI.js} +1 -1
  347. package/dist/stage-bundles/{react/chunks/aiMessagesContracts-LVR4HAGR.js → vue/chunks/aiMessagesContracts-RAR7ENH4.js} +1 -1
  348. package/dist/stage-bundles/vue/chunks/aiRelay-C6ZJ3PUF.js +1 -0
  349. package/dist/stage-bundles/{react/chunks/aiSessionContracts-MWOX56DC.js → vue/chunks/aiSessionContracts-NHU57TUZ.js} +1 -1
  350. package/dist/stage-bundles/vue/chunks/assets-6LM3GVQU.js +1 -0
  351. package/dist/stage-bundles/vue/chunks/capture-XURVK5HZ.js +1 -0
  352. package/dist/stage-bundles/vue/chunks/chunk-2Z2RXHNK.js +1 -0
  353. package/dist/stage-bundles/vue/chunks/chunk-4M7L75C7.js +1 -0
  354. package/dist/stage-bundles/vue/chunks/chunk-4Q5R44ZZ.js +1 -0
  355. package/dist/stage-bundles/vue/chunks/chunk-7YVQSQRP.js +1 -0
  356. package/dist/stage-bundles/vue/chunks/chunk-BJPSGTXJ.js +1 -0
  357. package/dist/stage-bundles/vue/chunks/chunk-CGCD6S33.js +6 -0
  358. package/dist/stage-bundles/vue/chunks/chunk-F7DSZRND.js +1 -0
  359. package/dist/stage-bundles/vue/chunks/chunk-GW7KMMRR.js +1 -0
  360. package/dist/stage-bundles/vue/chunks/chunk-HYSOOJLT.js +1 -0
  361. package/dist/stage-bundles/vue/chunks/chunk-IG2Y3H6O.js +1 -0
  362. package/dist/stage-bundles/vue/chunks/chunk-IWTWZA3T.js +1 -0
  363. package/dist/stage-bundles/vue/chunks/chunk-K5IR3PSI.js +1 -0
  364. package/dist/stage-bundles/vue/chunks/chunk-LXD22ETU.js +1 -0
  365. package/dist/stage-bundles/vue/chunks/chunk-NFKUJQZH.js +1 -0
  366. package/dist/stage-bundles/vue/chunks/chunk-NKDO4J6J.js +1 -0
  367. package/dist/stage-bundles/vue/chunks/chunk-QFJRB6B2.js +103 -0
  368. package/dist/stage-bundles/vue/chunks/chunk-SCJKRPIZ.js +1 -0
  369. package/dist/stage-bundles/{react/chunks/chunk-PPHD3O2M.js → vue/chunks/chunk-ULVFWUAU.js} +1 -1
  370. package/dist/stage-bundles/vue/chunks/chunk-USKXWFBI.js +1 -0
  371. package/dist/stage-bundles/vue/chunks/contentEditor-7BYCT3TH.js +1 -0
  372. package/dist/stage-bundles/vue/chunks/design-4GTDZLD2.js +15 -0
  373. package/dist/stage-bundles/{react/chunks/history-7CH6VXP4.js → vue/chunks/history-CMF3VYTT.js} +1 -1
  374. package/dist/stage-bundles/vue/chunks/main-4HW35P75.js +1 -0
  375. package/dist/stage-bundles/vue/chunks/main-BVDJS6IT.js +1 -0
  376. package/dist/stage-bundles/{react/chunks/main-D4CUN7NH.js → vue/chunks/main-DH4JOS22.js} +1 -1
  377. package/dist/stage-bundles/vue/chunks/{main-HQ4XJKUM.js → main-PALLSI3C.js} +1 -1
  378. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-BLKABBSO.js +1 -0
  379. package/dist/stage-bundles/{react/chunks/nodeGraph-2AX6JUZ4.js → vue/chunks/nodeGraph-UNI2HUNX.js} +1 -1
  380. package/dist/stage-bundles/vue/chunks/preview-QUDMZGVG.js +1 -0
  381. package/dist/stage-bundles/vue/chunks/setNodeLayout-KQVZJBYW.js +1 -0
  382. package/dist/stage-bundles/{react/chunks/user-3YXEQVFB.js → vue/chunks/user-H5DKMGWA.js} +1 -1
  383. package/dist/stage-bundles/vue/chunks/viewport-ZRWTVYC3.js +1 -0
  384. package/dist/stage-bundles/vue/chunks/window-IMPT5I3D.js +1 -0
  385. package/dist/stage-bundles/vue/entry.js +1 -1
  386. package/dist/stage-bundles/vue/framework-jsx-runtime.js +1 -1
  387. package/dist/stage-bundles/vue/framework.js +1 -1
  388. package/dist/stage-bundles/vue/sdk.js +1 -1
  389. package/dist/stage-src/dev/entry.js +8 -17
  390. package/dist/stage-src/dev/server.js +77 -24
  391. package/dist/stage-src/preview/bootstrap.js +0 -2
  392. package/package.json +16 -21
  393. package/dist/stage/chunks/addAction-FSI6BXB4.js +0 -1
  394. package/dist/stage/chunks/addAnimationBinding-Y4VROY4L.js +0 -1
  395. package/dist/stage/chunks/addAttribute-ZPJGNPHK.js +0 -1
  396. package/dist/stage/chunks/addComponent-VWD6O7CQ.js +0 -1
  397. package/dist/stage/chunks/addComputed-FQVHDUIE.js +0 -1
  398. package/dist/stage/chunks/addEvent-54ZE2DVJ.js +0 -1
  399. package/dist/stage/chunks/addLifecycleHook-VCCSTQ3G.js +0 -1
  400. package/dist/stage/chunks/addNode-IWTESHU3.js +0 -1
  401. package/dist/stage/chunks/addOption-ISGTUY6U.js +0 -1
  402. package/dist/stage/chunks/addParamToRoute-CRDV7MVF.js +0 -1
  403. package/dist/stage/chunks/addState-N3MBR533.js +0 -1
  404. package/dist/stage/chunks/addStore-PHY52777.js +0 -1
  405. package/dist/stage/chunks/addToken-QSTDKYFU.js +0 -1
  406. package/dist/stage/chunks/addValue-NBDF57UK.js +0 -1
  407. package/dist/stage/chunks/aiRelay-FDHMGC33.js +0 -1
  408. package/dist/stage/chunks/assets-RXVS3AKR.js +0 -1
  409. package/dist/stage/chunks/capture-XQFI2T7B.js +0 -1
  410. package/dist/stage/chunks/chunk-2YZN7IFG.js +0 -1
  411. package/dist/stage/chunks/chunk-32WBU6VH.js +0 -1
  412. package/dist/stage/chunks/chunk-33W74KNB.js +0 -37
  413. package/dist/stage/chunks/chunk-45CXRNTO.js +0 -1
  414. package/dist/stage/chunks/chunk-45LFQ7GZ.js +0 -1
  415. package/dist/stage/chunks/chunk-4MTM6BM7.js +0 -1
  416. package/dist/stage/chunks/chunk-4Y2YKFNP.js +0 -1
  417. package/dist/stage/chunks/chunk-55KIFGBN.js +0 -1
  418. package/dist/stage/chunks/chunk-5GOTVZFC.js +0 -1
  419. package/dist/stage/chunks/chunk-6EIGTDJQ.js +0 -1
  420. package/dist/stage/chunks/chunk-7L4V7JRT.js +0 -1
  421. package/dist/stage/chunks/chunk-D3V5OTLH.js +0 -1
  422. package/dist/stage/chunks/chunk-DCOWKGJI.js +0 -1
  423. package/dist/stage/chunks/chunk-DSKLC3WF.js +0 -1
  424. package/dist/stage/chunks/chunk-EO7UBT4B.js +0 -1
  425. package/dist/stage/chunks/chunk-FSECMWCM.js +0 -1
  426. package/dist/stage/chunks/chunk-FTRUORC5.js +0 -1
  427. package/dist/stage/chunks/chunk-G37FCH35.js +0 -1
  428. package/dist/stage/chunks/chunk-GURTWV7H.js +0 -1
  429. package/dist/stage/chunks/chunk-H3VC542J.js +0 -1
  430. package/dist/stage/chunks/chunk-IERYKQMJ.js +0 -1
  431. package/dist/stage/chunks/chunk-IEXI4PPB.js +0 -1
  432. package/dist/stage/chunks/chunk-K7MC6G4X.js +0 -1
  433. package/dist/stage/chunks/chunk-KCVDFPJI.js +0 -1
  434. package/dist/stage/chunks/chunk-L4CU73MS.js +0 -1
  435. package/dist/stage/chunks/chunk-LOILFK74.js +0 -55
  436. package/dist/stage/chunks/chunk-MXIF2FGR.js +0 -1
  437. package/dist/stage/chunks/chunk-OWARHUEW.js +0 -1
  438. package/dist/stage/chunks/chunk-P4ODI2G4.js +0 -1
  439. package/dist/stage/chunks/chunk-PUPSHZWC.js +0 -1
  440. package/dist/stage/chunks/chunk-QTBRJH2Q.js +0 -1
  441. package/dist/stage/chunks/chunk-SECM4LZZ.js +0 -1
  442. package/dist/stage/chunks/chunk-TAMEB64F.js +0 -1
  443. package/dist/stage/chunks/chunk-TIIQLNVN.js +0 -1
  444. package/dist/stage/chunks/chunk-U3IV5DRQ.js +0 -1
  445. package/dist/stage/chunks/chunk-X6HJCJ3C.js +0 -1
  446. package/dist/stage/chunks/chunk-YMUEID4R.js +0 -1
  447. package/dist/stage/chunks/chunk-YN5VQBDN.js +0 -1
  448. package/dist/stage/chunks/chunk-YZBMJY7E.js +0 -1
  449. package/dist/stage/chunks/clearDestination-P3FTW7VJ.js +0 -1
  450. package/dist/stage/chunks/clearName-EUYRSZED.js +0 -1
  451. package/dist/stage/chunks/clearOptionsExpression-DF4IPDKH.js +0 -1
  452. package/dist/stage/chunks/clearRender-IUKXUT2E.js +0 -1
  453. package/dist/stage/chunks/clearRepeat-HR5C5VWU.js +0 -1
  454. package/dist/stage/chunks/contentEditor-PCXXWARK.js +0 -1
  455. package/dist/stage/chunks/createAction-XVCUAVTP.js +0 -1
  456. package/dist/stage/chunks/createAnimation-YAXYGTZ2.js +0 -1
  457. package/dist/stage/chunks/createComputed-6XPJKJMP.js +0 -1
  458. package/dist/stage/chunks/createTextContent-BL7YGYP5.js +0 -1
  459. package/dist/stage/chunks/createValue-QMG7LOR4.js +0 -1
  460. package/dist/stage/chunks/design-SPZTUDPC.js +0 -15
  461. package/dist/stage/chunks/dev-24ZWZ22W.js +0 -1
  462. package/dist/stage/chunks/disconnectNode-OY65I4GB.js +0 -1
  463. package/dist/stage/chunks/main-BLNWJ3UJ.js +0 -1
  464. package/dist/stage/chunks/main-NTDWDKF7.js +0 -1
  465. package/dist/stage/chunks/moveNodeToLastChildOf-PRI4OYRB.js +0 -1
  466. package/dist/stage/chunks/normalizeLayoutContext-OIXYBNTH.js +0 -1
  467. package/dist/stage/chunks/preview-EIG4E5G5.js +0 -1
  468. package/dist/stage/chunks/react-G5SWVCZA.js +0 -1
  469. package/dist/stage/chunks/removeAction-H3EDG2CG.js +0 -1
  470. package/dist/stage/chunks/removeAnimationBinding-JRXL2AOH.js +0 -1
  471. package/dist/stage/chunks/removeAttribute-6RYM7MYC.js +0 -1
  472. package/dist/stage/chunks/removeComputed-3HL3BXKY.js +0 -1
  473. package/dist/stage/chunks/removeEvent-CP3SVSHQ.js +0 -1
  474. package/dist/stage/chunks/removeLifecycleHook-Q76BUDFU.js +0 -1
  475. package/dist/stage/chunks/removeNode-OFMYW2LY.js +0 -1
  476. package/dist/stage/chunks/removeOption-Y6QYTQ7C.js +0 -1
  477. package/dist/stage/chunks/removeParamFromRoute-MHUMB7RO.js +0 -1
  478. package/dist/stage/chunks/removeState-HEDFV7HD.js +0 -1
  479. package/dist/stage/chunks/removeStore-BQDKUY3I.js +0 -1
  480. package/dist/stage/chunks/removeToken-6K5JDRMK.js +0 -1
  481. package/dist/stage/chunks/removeValue-OTRFOOIB.js +0 -1
  482. package/dist/stage/chunks/setDestination-3H4RDE7F.js +0 -1
  483. package/dist/stage/chunks/setHomePage-UZUWIELK.js +0 -1
  484. package/dist/stage/chunks/setHtmlId-V2DQ2Z6D.js +0 -1
  485. package/dist/stage/chunks/setName-QKDRLH7I.js +0 -1
  486. package/dist/stage/chunks/setNodeLayout-O53CNHES.js +0 -1
  487. package/dist/stage/chunks/setOptionsExpression-4NFPAI24.js +0 -1
  488. package/dist/stage/chunks/setRender-XQJWRRYD.js +0 -1
  489. package/dist/stage/chunks/setRepeat-PAW7YMSY.js +0 -1
  490. package/dist/stage/chunks/setTagName-Y7O7I6SO.js +0 -1
  491. package/dist/stage/chunks/updateAction-XSXILF2R.js +0 -1
  492. package/dist/stage/chunks/updateAnimationBinding-LQTVD3O6.js +0 -1
  493. package/dist/stage/chunks/updateAttribute-5MWAVQAV.js +0 -1
  494. package/dist/stage/chunks/updateBounds-3L2AJ72O.js +0 -1
  495. package/dist/stage/chunks/updateComputed-UALAJ4RF.js +0 -1
  496. package/dist/stage/chunks/updateEvent-NXMQSGDQ.js +0 -1
  497. package/dist/stage/chunks/updateHtml-AEMCHPUQ.js +0 -1
  498. package/dist/stage/chunks/updateLifecycleHook-6MCUOVJH.js +0 -1
  499. package/dist/stage/chunks/updateOption-JCNXPYXP.js +0 -1
  500. package/dist/stage/chunks/updateRoute-CI3GOLVJ.js +0 -1
  501. package/dist/stage/chunks/updateState-QJID3WQV.js +0 -1
  502. package/dist/stage/chunks/updateStyle-FR7K7R73.js +0 -1
  503. package/dist/stage/chunks/updateToken-JX6R3YU7.js +0 -1
  504. package/dist/stage/chunks/updateValue-2B5ZNGZI.js +0 -1
  505. package/dist/stage/chunks/window-RFC7WGLM.js +0 -1
  506. package/dist/stage-bundles/preact/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  507. package/dist/stage-bundles/preact/chunks/addNode-2E5QNYOA.js +0 -1
  508. package/dist/stage-bundles/preact/chunks/aiRelay-WDZAC42R.js +0 -1
  509. package/dist/stage-bundles/preact/chunks/assets-NU56BTDG.js +0 -1
  510. package/dist/stage-bundles/preact/chunks/capture-XBPXL4U7.js +0 -1
  511. package/dist/stage-bundles/preact/chunks/chunk-2BGFXNGU.js +0 -1
  512. package/dist/stage-bundles/preact/chunks/chunk-34CHXN5I.js +0 -1
  513. package/dist/stage-bundles/preact/chunks/chunk-67H474GN.js +0 -1
  514. package/dist/stage-bundles/preact/chunks/chunk-ACPGC7BJ.js +0 -1
  515. package/dist/stage-bundles/preact/chunks/chunk-E4RDZ324.js +0 -1
  516. package/dist/stage-bundles/preact/chunks/chunk-FCRFPWU3.js +0 -97
  517. package/dist/stage-bundles/preact/chunks/chunk-JHWED3SX.js +0 -1
  518. package/dist/stage-bundles/preact/chunks/chunk-JRXMDYLE.js +0 -1
  519. package/dist/stage-bundles/preact/chunks/chunk-KISNK4R4.js +0 -1
  520. package/dist/stage-bundles/preact/chunks/chunk-LEELNBJC.js +0 -1
  521. package/dist/stage-bundles/preact/chunks/chunk-LHON3DKO.js +0 -1
  522. package/dist/stage-bundles/preact/chunks/chunk-PYIGBTL4.js +0 -6
  523. package/dist/stage-bundles/preact/chunks/chunk-QKFDVU2Q.js +0 -1
  524. package/dist/stage-bundles/preact/chunks/chunk-UQFZUWFP.js +0 -1
  525. package/dist/stage-bundles/preact/chunks/contentEditor-6WQFOUKV.js +0 -1
  526. package/dist/stage-bundles/preact/chunks/design-QOLOMJCH.js +0 -15
  527. package/dist/stage-bundles/preact/chunks/main-K2WJEG5C.js +0 -1
  528. package/dist/stage-bundles/preact/chunks/main-ZXFODV6O.js +0 -1
  529. package/dist/stage-bundles/preact/chunks/moveNodeToLastChildOf-OZ6F2NPU.js +0 -1
  530. package/dist/stage-bundles/preact/chunks/normalizeLayoutContext-WRK6FVHM.js +0 -1
  531. package/dist/stage-bundles/preact/chunks/preact-NBJKI6EE.js +0 -1
  532. package/dist/stage-bundles/preact/chunks/preview-AFX7D63A.js +0 -1
  533. package/dist/stage-bundles/preact/chunks/setNodeLayout-QNVAVAMX.js +0 -1
  534. package/dist/stage-bundles/preact/chunks/window-TFWZNZUJ.js +0 -1
  535. package/dist/stage-bundles/react/chunks/addAnimationBinding-7TFETALG.js +0 -1
  536. package/dist/stage-bundles/react/chunks/addComponent-P7BXPI75.js +0 -1
  537. package/dist/stage-bundles/react/chunks/addNode-4MPFG7L5.js +0 -1
  538. package/dist/stage-bundles/react/chunks/addParamToRoute-VX2GDCCP.js +0 -1
  539. package/dist/stage-bundles/react/chunks/addStore-F3E5UJ5H.js +0 -1
  540. package/dist/stage-bundles/react/chunks/aiRelay-3CLWLKMV.js +0 -1
  541. package/dist/stage-bundles/react/chunks/assets-UN6U4NZV.js +0 -1
  542. package/dist/stage-bundles/react/chunks/capture-5GIKSRCZ.js +0 -1
  543. package/dist/stage-bundles/react/chunks/chunk-2BGFXNGU.js +0 -1
  544. package/dist/stage-bundles/react/chunks/chunk-32U4X4HZ.js +0 -6
  545. package/dist/stage-bundles/react/chunks/chunk-34CHXN5I.js +0 -1
  546. package/dist/stage-bundles/react/chunks/chunk-5OEIZ3PD.js +0 -1
  547. package/dist/stage-bundles/react/chunks/chunk-ADVOIRI5.js +0 -43
  548. package/dist/stage-bundles/react/chunks/chunk-ATUQUJRM.js +0 -1
  549. package/dist/stage-bundles/react/chunks/chunk-BXIWQYSY.js +0 -1
  550. package/dist/stage-bundles/react/chunks/chunk-GYBL4LBC.js +0 -1
  551. package/dist/stage-bundles/react/chunks/chunk-HLPDOSGP.js +0 -1
  552. package/dist/stage-bundles/react/chunks/chunk-KISNK4R4.js +0 -1
  553. package/dist/stage-bundles/react/chunks/chunk-NDUX5RLD.js +0 -1
  554. package/dist/stage-bundles/react/chunks/chunk-PSQ4TIJA.js +0 -1
  555. package/dist/stage-bundles/react/chunks/chunk-QKFDVU2Q.js +0 -1
  556. package/dist/stage-bundles/react/chunks/chunk-UQFZUWFP.js +0 -1
  557. package/dist/stage-bundles/react/chunks/clearDestination-ESJ4RTEB.js +0 -1
  558. package/dist/stage-bundles/react/chunks/clearName-XLFUSVVX.js +0 -1
  559. package/dist/stage-bundles/react/chunks/clearOptionsExpression-T5UZGD3M.js +0 -1
  560. package/dist/stage-bundles/react/chunks/clearRender-QOV6MKSA.js +0 -1
  561. package/dist/stage-bundles/react/chunks/clearRepeat-KGDHK6I5.js +0 -1
  562. package/dist/stage-bundles/react/chunks/contentEditor-VQUII3R3.js +0 -1
  563. package/dist/stage-bundles/react/chunks/createAnimation-5GYHDNS4.js +0 -1
  564. package/dist/stage-bundles/react/chunks/createValue-Q2VRKXEI.js +0 -1
  565. package/dist/stage-bundles/react/chunks/design-Z6J5JRDV.js +0 -15
  566. package/dist/stage-bundles/react/chunks/main-OAJ3EVVU.js +0 -1
  567. package/dist/stage-bundles/react/chunks/main-WER4YJAR.js +0 -1
  568. package/dist/stage-bundles/react/chunks/moveNodeToLastChildOf-DQR5GURK.js +0 -1
  569. package/dist/stage-bundles/react/chunks/normalizeLayoutContext-34DZRL3Q.js +0 -1
  570. package/dist/stage-bundles/react/chunks/preview-5V5GS6PZ.js +0 -1
  571. package/dist/stage-bundles/react/chunks/react-YDAQ4KLN.js +0 -1
  572. package/dist/stage-bundles/react/chunks/removeAction-7V4VV5SS.js +0 -1
  573. package/dist/stage-bundles/react/chunks/removeAnimationBinding-26LUMVXH.js +0 -1
  574. package/dist/stage-bundles/react/chunks/removeAttribute-AZK5TQQM.js +0 -1
  575. package/dist/stage-bundles/react/chunks/removeComputed-HIYYBG3M.js +0 -1
  576. package/dist/stage-bundles/react/chunks/removeEvent-A7AUWPIF.js +0 -1
  577. package/dist/stage-bundles/react/chunks/removeLifecycleHook-Z5ZHFYSE.js +0 -1
  578. package/dist/stage-bundles/react/chunks/removeOption-7JZTAHTB.js +0 -1
  579. package/dist/stage-bundles/react/chunks/removeParamFromRoute-JBZOXNDA.js +0 -1
  580. package/dist/stage-bundles/react/chunks/removeState-RIXJ6YEL.js +0 -1
  581. package/dist/stage-bundles/react/chunks/removeStore-PKBJRCYZ.js +0 -1
  582. package/dist/stage-bundles/react/chunks/removeToken-WRU2GN7O.js +0 -1
  583. package/dist/stage-bundles/react/chunks/removeValue-KRNKQVF5.js +0 -1
  584. package/dist/stage-bundles/react/chunks/setDestination-DUGBRV24.js +0 -1
  585. package/dist/stage-bundles/react/chunks/setHomePage-GJLGWZHJ.js +0 -1
  586. package/dist/stage-bundles/react/chunks/setHtmlId-F5SPBYD7.js +0 -1
  587. package/dist/stage-bundles/react/chunks/setName-DAQAN7JR.js +0 -1
  588. package/dist/stage-bundles/react/chunks/setNodeLayout-X4PQKKZT.js +0 -1
  589. package/dist/stage-bundles/react/chunks/setTagName-42MJSWMZ.js +0 -1
  590. package/dist/stage-bundles/react/chunks/updateAnimationBinding-QETT3JF2.js +0 -1
  591. package/dist/stage-bundles/react/chunks/updateBounds-HOTYUCG4.js +0 -1
  592. package/dist/stage-bundles/react/chunks/updateHtml-VQAIKLEG.js +0 -1
  593. package/dist/stage-bundles/react/chunks/updateRoute-FPAKZBCT.js +0 -1
  594. package/dist/stage-bundles/react/chunks/updateStyle-M7YKN6C4.js +0 -1
  595. package/dist/stage-bundles/react/chunks/updateToken-LOI6M4XH.js +0 -1
  596. package/dist/stage-bundles/react/chunks/viewport-7ICM5NZY.js +0 -1
  597. package/dist/stage-bundles/react/chunks/window-SG66BA4O.js +0 -1
  598. package/dist/stage-bundles/vue/chunks/addComponent-Y2AQ2FGZ.js +0 -1
  599. package/dist/stage-bundles/vue/chunks/addNode-5OXCF22G.js +0 -1
  600. package/dist/stage-bundles/vue/chunks/aiRelay-WDZAC42R.js +0 -1
  601. package/dist/stage-bundles/vue/chunks/assets-NU56BTDG.js +0 -1
  602. package/dist/stage-bundles/vue/chunks/capture-UZVRGVM7.js +0 -1
  603. package/dist/stage-bundles/vue/chunks/chunk-7CCYKDAJ.js +0 -97
  604. package/dist/stage-bundles/vue/chunks/chunk-ACPGC7BJ.js +0 -1
  605. package/dist/stage-bundles/vue/chunks/chunk-FYWE2MO5.js +0 -1
  606. package/dist/stage-bundles/vue/chunks/chunk-ILXSVZXQ.js +0 -1
  607. package/dist/stage-bundles/vue/chunks/chunk-IZT2KVTW.js +0 -1
  608. package/dist/stage-bundles/vue/chunks/chunk-JRXMDYLE.js +0 -1
  609. package/dist/stage-bundles/vue/chunks/chunk-PYIGBTL4.js +0 -6
  610. package/dist/stage-bundles/vue/chunks/chunk-QKFDVU2Q.js +0 -1
  611. package/dist/stage-bundles/vue/chunks/chunk-RMSX6LWP.js +0 -1
  612. package/dist/stage-bundles/vue/chunks/chunk-TSL6VG3R.js +0 -1
  613. package/dist/stage-bundles/vue/chunks/chunk-TTTOAB6J.js +0 -1
  614. package/dist/stage-bundles/vue/chunks/chunk-UDTKG2KI.js +0 -1
  615. package/dist/stage-bundles/vue/chunks/chunk-UIC3GAEE.js +0 -1
  616. package/dist/stage-bundles/vue/chunks/contentEditor-EUDU6PBV.js +0 -1
  617. package/dist/stage-bundles/vue/chunks/design-LU5XWCLC.js +0 -15
  618. package/dist/stage-bundles/vue/chunks/main-R652XLC3.js +0 -1
  619. package/dist/stage-bundles/vue/chunks/main-X6SC5JYU.js +0 -1
  620. package/dist/stage-bundles/vue/chunks/moveNodeToLastChildOf-H4TZ5UMP.js +0 -1
  621. package/dist/stage-bundles/vue/chunks/normalizeLayoutContext-KGEMYC4Y.js +0 -1
  622. package/dist/stage-bundles/vue/chunks/preview-52FXOKBF.js +0 -1
  623. package/dist/stage-bundles/vue/chunks/setNodeLayout-GY4G7UZR.js +0 -1
  624. package/dist/stage-bundles/vue/chunks/vue-62USAR6D.js +0 -1
  625. package/dist/stage-bundles/vue/chunks/window-TFWZNZUJ.js +0 -1
  626. package/dist/stage-src/preview/routes/js.js +0 -100
  627. package/dist/stage-src/preview/routes/preview.js +0 -21
  628. package/dist/stage-src/preview/server.js +0 -99
  629. package/dist/stage-src/preview/views/index.js +0 -18
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-MHU6JTZC.js";import"./chunk-RONEQF2M.js";export{a as setTagName};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-NGQ7GQSH.js";import"./chunk-YFURTAAV.js";import"./chunk-V5TNO5LS.js";import"./chunk-RONEQF2M.js";export{a as updateAction};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-HREW6EFQ.js";import"./chunk-RONEQF2M.js";export{a as updateAnimationBinding};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-ATDHO5ME.js";import"./chunk-NM4FV6YK.js";import"./chunk-K33QXMAS.js";import"./chunk-QDH6OIAL.js";import"./chunk-UN7EZPD7.js";import"./chunk-CM6UENYI.js";import"./chunk-RONEQF2M.js";export{a as updateAttribute};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-X5INDUEQ.js";import"./chunk-RONEQF2M.js";export{a as updateBounds};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-JRCZXEL2.js";import"./chunk-457GNGEV.js";import"./chunk-V5TNO5LS.js";import"./chunk-RONEQF2M.js";export{a as updateComputed};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-HBNF34QX.js";import"./chunk-7SM7WG53.js";import"./chunk-QDH6OIAL.js";import"./chunk-UN7EZPD7.js";import"./chunk-CM6UENYI.js";import"./chunk-RONEQF2M.js";export{a as updateEvent};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-HZ7KMV42.js";import"./chunk-RONEQF2M.js";export{a as updateHtml};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-JKJRK7ER.js";import"./chunk-3GPQ3HYG.js";import"./chunk-RONEQF2M.js";export{a as updateLifecycleHook};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-MO2MHTOQ.js";import"./chunk-TDXJNI7H.js";import"./chunk-RONEQF2M.js";export{a as updateOption};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-QVOXRLEG.js";import"./chunk-RONEQF2M.js";export{a as updateRoute};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-GBE5QYRO.js";import"./chunk-CB4COXKW.js";import"./chunk-QDH6OIAL.js";import"./chunk-UN7EZPD7.js";import"./chunk-CM6UENYI.js";import"./chunk-RONEQF2M.js";export{a as updateState};
@@ -0,0 +1 @@
1
+ import{b as a}from"./chunk-2JXGTRSC.js";import"./chunk-RONEQF2M.js";export{a as updateStyle};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-A7T3U7OZ.js";import"./chunk-RONEQF2M.js";export{a as updateToken};
@@ -0,0 +1 @@
1
+ import{a}from"./chunk-VZJTFJZN.js";import"./chunk-JGELXWD3.js";import"./chunk-RONEQF2M.js";export{a as updateValue};
@@ -1 +1 @@
1
- import"./chunk-K7MC6G4X.js";import{defineContracts as h}from"@jucie.io/engine-message";var i=h("user",c=>{let[t,s]=c("socket","cache");if(!t||!s)throw new Error("Socket or cache not found");return{pointer:{namespace:"stage",schema:["Object"],handler:n=>{n&&t.publish("presence:pointer",n)}},selection:{namespace:"stage",schema:["Array","Array"],handler:(n,e)=>{let r=s.get(["selectedIds"])??[];if(s.set(["selectedRids"],n),s.set(["selectedIds"],e),r.length===0&&e.length===0)return;if(r.length!==e.length){t.publish("presence:selection",e);return}r.some((o,a)=>o!==e[a])&&t.publish("presence:selection",e)}}}});export{i as userContracts};
1
+ import"./chunk-RONEQF2M.js";import{defineContracts as h}from"@jucie.io/engine-message";var i=h("user",c=>{let[t,s]=c("socket","cache");if(!t||!s)throw new Error("Socket or cache not found");return{pointer:{namespace:"stage",schema:["Object"],handler:n=>{n&&t.publish("presence:pointer",n)}},selection:{namespace:"stage",schema:["Array","Array"],handler:(n,e)=>{let r=s.get(["selectedIds"])??[];if(s.set(["selectedRids"],n),s.set(["selectedIds"],e),r.length===0&&e.length===0)return;if(r.length!==e.length){t.publish("presence:selection",e);return}r.some((o,a)=>o!==e[a])&&t.publish("presence:selection",e)}}}});export{i as userContracts};
@@ -1,3 +1,3 @@
1
- import{a as o}from"./chunk-K7MC6G4X.js";var u=new Set(["string","number","boolean","array","object"]);function f(e){return typeof e=="string"&&/^\s*function\b/.test(e)}o(f,"isFunctionCode");function i(e){let n=[];if(!e||typeof e!="object"||Array.isArray(e))throw new Error("store payload must be an object");(typeof e.name!="string"||!e.name.trim())&&n.push("name must be a non-empty string"),e.state!==void 0&&(Array.isArray(e.state)?e.state.forEach((t,r)=>{if(!t||typeof t!="object"||Array.isArray(t)){n.push(`state[${r}] must be an object`);return}(typeof t.key!="string"||!t.key.trim())&&n.push(`state[${r}].key must be a non-empty string`),(typeof t.type!="string"||!u.has(t.type))&&n.push(`state[${r}].type must be one of ${[...u].join("|")}`)}):n.push("state must be an array"));for(let t of["computed","actions"])if(e[t]!==void 0){if(!Array.isArray(e[t])){n.push(`${t} must be an array`);continue}e[t].forEach((r,s)=>{if(!r||typeof r!="object"||Array.isArray(r)){n.push(`${t}[${s}] must be an object`);return}(typeof r.name!="string"||!r.name.trim())&&n.push(`${t}[${s}].name must be a non-empty string`),f(r.code)||n.push(`${t}[${s}].code must be a function expression string (e.g. function () { ... })`)})}if(n.length)throw new Error(`Invalid store payload:
1
+ import{a as o}from"./chunk-RONEQF2M.js";var u=new Set(["string","number","boolean","array","object"]);function f(e){return typeof e=="string"&&/^\s*function\b/.test(e)}o(f,"isFunctionCode");function i(e){let n=[];if(!e||typeof e!="object"||Array.isArray(e))throw new Error("store payload must be an object");(typeof e.name!="string"||!e.name.trim())&&n.push("name must be a non-empty string"),e.state!==void 0&&(Array.isArray(e.state)?e.state.forEach((t,r)=>{if(!t||typeof t!="object"||Array.isArray(t)){n.push(`state[${r}] must be an object`);return}(typeof t.key!="string"||!t.key.trim())&&n.push(`state[${r}].key must be a non-empty string`),(typeof t.type!="string"||!u.has(t.type))&&n.push(`state[${r}].type must be one of ${[...u].join("|")}`)}):n.push("state must be an array"));for(let t of["computed","actions"])if(e[t]!==void 0){if(!Array.isArray(e[t])){n.push(`${t} must be an array`);continue}e[t].forEach((r,s)=>{if(!r||typeof r!="object"||Array.isArray(r)){n.push(`${t}[${s}] must be an object`);return}(typeof r.name!="string"||!r.name.trim())&&n.push(`${t}[${s}].name must be a non-empty string`),f(r.code)||n.push(`${t}[${s}].code must be a function expression string (e.g. function () { ... })`)})}if(n.length)throw new Error(`Invalid store payload:
2
2
  - ${n.join(`
3
3
  - `)}`);return!0}o(i,"validateStorePayload");export{i as validateStorePayload};
@@ -1 +1 @@
1
- import"./chunk-K7MC6G4X.js";import{defineContracts as o}from"@jucie.io/engine-message";var s=o("viewport",e=>{let t=e("sceneCompiler");return{set:{schema:["Object"],handler:r=>(t.setViewport(r),!0)}}});export{s as viewportContracts};
1
+ import"./chunk-RONEQF2M.js";import{defineContracts as o}from"@jucie.io/engine-message";var s=o("viewport",e=>{let t=e("sceneCompiler");return{set:{schema:["Object"],handler:r=>(t.setViewport(r),!0)}}});export{s as viewportContracts};
@@ -0,0 +1 @@
1
+ import"./chunk-RONEQF2M.js";import{defineContracts as r}from"@jucie.io/engine-message";var s=r("window",e=>({back:{schema:null,namespace:"stage",handler:()=>{e("sceneCompiler").back()}},forward:{schema:null,namespace:"stage",handler:()=>{e("sceneCompiler").forward()}}}));export{s as windowContracts};
@@ -1 +1 @@
1
- import{a as s}from"./chunks/chunk-K7MC6G4X.js";import{Engine as c}from"@jucie.io/engine";import{WindowBridge as w}from"@jucie.io/engine-window-bridge";var o=c.create().install(w);function d(t={}){let e=window.location.pathname.split("/").filter(Boolean),n=e[1],a=e[2]||null;return{projectId:n,nodeId:a,socketPath:`/p/${n}/socket`,basePath:`/p/${n}`,framework:"react",view:"design",...t}}s(d,"deriveCloudConfig");async function p(){try{let t=await fetch("/config.json");if(t.ok)return await t.json()}catch{}return{}}s(p,"fetchConfig");o.windowBridge.subscribeOnce("bootstrap:initialize",async(t,e,n)=>{o.windowBridge.register("parent",window.parent,"*");try{let r=e?.env==="cloud"||window.location.pathname.startsWith("/p/")?d(e):{...await p(),...e};switch(r.view){case"design":{let{createDesignBootstrap:i}=await import("./chunks/design-SPZTUDPC.js");return await i(o,t,r,n)}case"preview":{let{createDesignPreviewBootstrap:i}=await import("./chunks/preview-EIG4E5G5.js");return await i(o,t,r)}case"screen-capture":{let{createDesignScreenCaptureBootstrap:i}=await import("./chunks/capture-XQFI2T7B.js");return await i(o,r)}default:throw new Error(`[stage] Unknown view: ${r.view}`)}}catch(a){return{error:a.message}}});
1
+ import{a as s}from"./chunks/chunk-RONEQF2M.js";window.addEventListener("message",s(async function i(n){let t=n.data;if(!t?.params)return;let{params:a,token:r}=t;try{switch(a.view){case"design":{let{createDesignBootstrap:e}=await import("./chunks/design-2S7QAGYM.js");await e(a,r);break}case"preview":{let{createDesignPreviewBootstrap:e}=await import("./chunks/preview-UBVA3QQU.js");await e(a,r);break}case"screen-capture":{let{createDesignScreenCaptureBootstrap:e}=await import("./chunks/capture-VQE5664P.js");await e(a);break}default:throw new Error(`[stage] Unknown view: ${a.view}`)}}catch(e){console.error("[stage] bootstrap failed",e)}finally{window.removeEventListener("message",i)}},"init"));
package/dist/stage/dev.js CHANGED
@@ -1 +1 @@
1
- import{a as e}from"./chunks/chunk-K7MC6G4X.js";import{Engine as c}from"@jucie.io/engine";import{WindowBridge as s}from"@jucie.io/engine-window-bridge";var n=c.create().install(s);async function w(){try{let r=await fetch("/config.json");if(r.ok)return await r.json()}catch{}return{}}e(w,"fetchConfig");n.windowBridge.subscribeOnce("bootstrap:initialize",async(r,i,o)=>{n.windowBridge.register("parent",window.parent,"*");try{let t={...await w(),...i},{createDevBootstrap:a}=await import("./chunks/dev-24ZWZ22W.js");return await a(n,r,t,o)}catch(t){return{error:t.message}}});
1
+ import{a as e}from"./chunks/chunk-RONEQF2M.js";window.addEventListener("message",e(async function r(n){let a=n.data;if(!a?.params)return;let{params:o,token:s}=a;try{let{createDevBootstrap:t}=await import("./chunks/dev-PZI3DDXQ.js");await t(o,s)}catch(t){console.error("[stage] bootstrap failed",t)}finally{window.removeEventListener("message",r)}},"init"));
@@ -1 +1 @@
1
- import{a as e}from"./chunks/chunk-33W74KNB.js";import{a as i}from"./chunks/chunk-MXIF2FGR.js";import"./chunks/chunk-LOILFK74.js";import"./chunks/chunk-LR6DSVPP.js";import"./chunks/chunk-BVAPODQ7.js";import"./chunks/chunk-5PUPZLDN.js";import"./chunks/chunk-4XNQRZ5E.js";import{a as t}from"./chunks/chunk-K7MC6G4X.js";import{Engine as f}from"@jucie.io/engine";import{jucieConfig as l}from"jucie:config";import{State as s}from"@jucie.io/engine-state";import{Reactive as n}from"@jucie.io/state-reactive";var a=t(async(o,{config:r={}}={})=>{let{loadProjectMain:c}=await import("./chunks/react-G5SWVCZA.js");await c();let{scene:m}=await import("jucie:scene"),p=(await import("@components"))?.default??{};return o.install(s.configure({state:m,plugins:[n]}),e.configure(r)),o.sceneCompiler.loadPrototypes(i),o.sceneCompiler.loadSources(p),o.sceneCompiler.create("app"),r},"createLivePreviewBootstrap");a(f.create(),{config:l});
1
+ import{a as t}from"./chunks/chunk-UVV4NANW.js";import"./chunks/chunk-4UJAZNZX.js";import"./chunks/chunk-SSSTBYOF.js";import{a as i}from"./chunks/chunk-TFGNKPAQ.js";import"./chunks/chunk-RSWDPV5U.js";import"./chunks/chunk-QDH6OIAL.js";import"./chunks/chunk-UN7EZPD7.js";import"./chunks/chunk-CM6UENYI.js";import{a as r}from"./chunks/chunk-RONEQF2M.js";import{Engine as f}from"@jucie.io/engine";import{jucieConfig as n}from"jucie:config";import{State as c}from"@jucie.io/engine-state";import{Reactive as s}from"@jucie.io/state-reactive";var m=r(async(o,{config:e={}}={})=>{let{scene:p}=await import("jucie:scene"),a=(await import("@components"))?.default??{};return o.install(c.configure({state:p,plugins:[s]}),t.configure(e)),o.sceneCompiler.loadPrototypes(i),o.sceneCompiler.loadSources(a),o.sceneCompiler.create("app"),e},"createLivePreviewBootstrap");m(f.create(),{config:n});
@@ -1 +1 @@
1
- import{a as i}from"./chunks/chunk-TS6FANUG.js";import{a as e}from"./chunks/chunk-33W74KNB.js";import{a}from"./chunks/chunk-MXIF2FGR.js";import"./chunks/chunk-LOILFK74.js";import"./chunks/chunk-LR6DSVPP.js";import"./chunks/chunk-BVAPODQ7.js";import"./chunks/chunk-5PUPZLDN.js";import"./chunks/chunk-4XNQRZ5E.js";import{a as r}from"./chunks/chunk-K7MC6G4X.js";import{Engine as u}from"@jucie.io/engine";import{jucieConfig as f}from"jucie:config";import{State as n}from"@jucie.io/engine-state";import{Reactive as l}from"@jucie.io/state-reactive";var p=r(async(o,{config:t={}}={})=>{let{loadProjectMain:m}=await import("./chunks/react-G5SWVCZA.js");await m();let{scene:c}=await import("jucie:scene"),s=(await import("@components"))?.default??{};return i(t.$el||"app"),o.install(n.configure({state:c,plugins:[l]}),e.configure({...t,view:t.view||"production"})),o.sceneCompiler.loadPrototypes(a),o.sceneCompiler.loadSources(s),await o.sceneCompiler.create("app"),t},"createProductionBootstrap");p(u.create(),{config:f});
1
+ import{a as i}from"./chunks/chunk-5N7NET6A.js";import{a as e}from"./chunks/chunk-UVV4NANW.js";import"./chunks/chunk-4UJAZNZX.js";import"./chunks/chunk-SSSTBYOF.js";import{a as p}from"./chunks/chunk-TFGNKPAQ.js";import"./chunks/chunk-RSWDPV5U.js";import"./chunks/chunk-QDH6OIAL.js";import"./chunks/chunk-UN7EZPD7.js";import"./chunks/chunk-CM6UENYI.js";import{a as t}from"./chunks/chunk-RONEQF2M.js";import{Engine as l}from"@jucie.io/engine";import{jucieConfig as u}from"jucie:config";import{State as s}from"@jucie.io/engine-state";import{Reactive as n}from"@jucie.io/state-reactive";var a=t(async(o,{config:r={}}={})=>{let{scene:m}=await import("jucie:scene"),c=(await import("@components"))?.default??{};return i(r.$el||"app"),o.install(s.configure({state:m,plugins:[n]}),e.configure({...r,view:r.view||"production"})),o.sceneCompiler.loadPrototypes(p),o.sceneCompiler.loadSources(c),await o.sceneCompiler.create("app"),r},"createProductionBootstrap");a(l.create(),{config:u});
@@ -0,0 +1 @@
1
+ import{e as a}from"./chunk-3WCN6R5H.js";import"./chunk-2Z2RXHNK.js";import"./chunk-IWTWZA3T.js";import"./chunk-A25WFH3U.js";import"./chunk-MUZZUB5Y.js";import"./chunk-TPCJQIUG.js";import"./chunk-IG2Y3H6O.js";import"./chunk-HE7IQLGK.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";export{a as addComponent};
@@ -0,0 +1 @@
1
+ import{f as a}from"./chunk-M577WNTV.js";import"./chunk-2Z2RXHNK.js";import"./chunk-7I5TQOE2.js";import"./chunk-J5QMLA3Z.js";import"./chunk-IWTWZA3T.js";import"./chunk-TPCJQIUG.js";import"./chunk-4Q5R44ZZ.js";import"./chunk-IG2Y3H6O.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";export{a as addNode};
@@ -0,0 +1 @@
1
+ import{c as a}from"./chunk-G3PYA3EU.js";import"./chunk-OQM5TMCK.js";import"./chunk-BL6GQ6ID.js";import"./chunk-K5BNCYT7.js";import"./chunk-M577WNTV.js";import"./chunk-2Z2RXHNK.js";import"./chunk-7I5TQOE2.js";import"./chunk-J5QMLA3Z.js";import"./chunk-IWTWZA3T.js";import"./chunk-TPCJQIUG.js";import"./chunk-SCJKRPIZ.js";import"./chunk-4Q5R44ZZ.js";import"./chunk-IG2Y3H6O.js";import"./chunk-HE7IQLGK.js";import"./chunk-Z3M6DQKZ.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";export{a as addTree};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-PYIGBTL4.js";import"./chunk-O24ISLGT.js";import"./chunk-UCLSDDOL.js";var m=e("ai:attachment",r=>{let a=r("socket");return{save:{namespace:"stage",schema:["String","Object"],timeoutMs:3e4,handler:async(s,{name:n,mimeType:o,data:c})=>{let t=await a.request("ai:session:attachment:save",s,{name:n,mimeType:o,data:c});if(t?.error)throw new Error(t.error);return t??{}}}}});export{m as aiAttachmentContracts};
1
+ import{a as e}from"./chunk-CGCD6S33.js";import"./chunk-ULVFWUAU.js";import"./chunk-UCLSDDOL.js";var m=e("ai:attachment",r=>{let a=r("socket");return{save:{namespace:"stage",schema:["String","Object"],timeoutMs:3e4,handler:async(s,{name:n,mimeType:o,data:c})=>{let t=await a.request("ai:session:attachment:save",s,{name:n,mimeType:o,data:c});if(t?.error)throw new Error(t.error);return t??{}}}}});export{m as aiAttachmentContracts};
@@ -1 +1 @@
1
- import{a as s}from"./chunk-PYIGBTL4.js";import"./chunk-O24ISLGT.js";import"./chunk-UCLSDDOL.js";var n=s("ai:messages",r=>{let t=r("socket");return{get:{namespace:"stage",schema:["String"],handler:async a=>{let e=await t.request("ai:session:messages:get",a);if(e?.error)throw new Error(e.error);return e??{}}}}});export{n as aiMessagesContracts};
1
+ import{a as s}from"./chunk-CGCD6S33.js";import"./chunk-ULVFWUAU.js";import"./chunk-UCLSDDOL.js";var n=s("ai:messages",r=>{let t=r("socket");return{get:{namespace:"stage",schema:["String"],handler:async a=>{let e=await t.request("ai:session:messages:get",a);if(e?.error)throw new Error(e.error);return e??{}}}}});export{n as aiMessagesContracts};
@@ -0,0 +1 @@
1
+ import{a as n}from"./chunk-CGCD6S33.js";import"./chunk-ULVFWUAU.js";import"./chunk-UCLSDDOL.js";var i=n("ai",r=>{let[a,c,s]=r("channel","cache","socket");return s.subscribe("ai:agent:progress",e=>{a.to("editor").publish("ai:progress",e)}),s.subscribe("ai:agent:response",e=>{a.to("editor").publish("ai:response",e)}),{agent:{schema:["String","Object"],namespace:"stage",timeoutMs:36e5,handler:async(e,t={})=>{s.publish("ai:agent:run",{prompt:e,sessionId:t.sessionId??null,attachments:t.attachments??[],token:c.get(["token"])??null,orgId:t.orgId??null})}},stop:{schema:[],namespace:"stage",handler:()=>{s.publish("ai:agent:stop")}}}});export{i as aiContracts};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-PYIGBTL4.js";import"./chunk-O24ISLGT.js";import"./chunk-UCLSDDOL.js";async function a(r,e,s){let t=await r.request(e,...s!==void 0?[s]:[]);if(t?.error)throw new Error(t.error);return t??{}}var i=n("ai:session",r=>{let e=r("socket");return{create:{namespace:"stage",schema:[],handler:()=>a(e,"ai:session:create")},delete:{namespace:"stage",schema:["String"],handler:s=>a(e,"ai:session:delete",s)}}});export{i as aiSessionContracts};
1
+ import{a as n}from"./chunk-CGCD6S33.js";import"./chunk-ULVFWUAU.js";import"./chunk-UCLSDDOL.js";async function a(r,e,s){let t=await r.request(e,...s!==void 0?[s]:[]);if(t?.error)throw new Error(t.error);return t??{}}var i=n("ai:session",r=>{let e=r("socket");return{create:{namespace:"stage",schema:[],handler:()=>a(e,"ai:session:create")},delete:{namespace:"stage",schema:["String"],handler:s=>a(e,"ai:session:delete",s)}}});export{i as aiSessionContracts};
@@ -0,0 +1 @@
1
+ import{a as c}from"./chunk-CGCD6S33.js";import"./chunk-ULVFWUAU.js";import"./chunk-UCLSDDOL.js";var n=c("assets",l=>{let[a,s,o]=l("socket","channel","log");if(!a||!s)throw new Error("Socket or channel not found");return{upload:{namespace:"stage",schema:["Object","ArrayBuffer"],handler:async(t,e)=>{try{let r=await a.request("assets:upload",t,e);s.to("editor").publish("asset:uploaded",r)}catch(r){o.error("upload failed",{error:r.message}),s.to("editor").publish("asset:uploaded",{success:!1,error:r.message})}}},delete:{namespace:"stage",schema:["String"],handler:async t=>{o.debug("delete request received",{path:t});try{let e=await a.request("assets:delete",t);s.to("editor").publish("asset:deleted",e)}catch(e){o.error("delete failed",{error:e.message}),s.to("editor").publish("asset:deleted",{success:!1,error:e.message})}}},check:{namespace:"stage",schema:["String"],handler:async t=>{try{let e=await a.request("assets:check",t);return s.to("editor").publish("asset:checked",e),e}catch(e){o.error("check failed",{error:e.message});let r={exists:!1,error:e.message};return s.to("editor").publish("asset:checked",r),r}}}}});export{n as assetsContracts};
@@ -0,0 +1 @@
1
+ import{a,c as s,e as c,g as m,h as p,i as u,j as f}from"./chunk-AOGIMUZ2.js";import"./chunk-NFKUJQZH.js";import"./chunk-NKDO4J6J.js";import{b as i}from"./chunk-ULVFWUAU.js";import{a as l}from"./chunk-2Z2RXHNK.js";import"./chunk-DWW3567Q.js";import"./chunk-H5NHEM4C.js";import"./chunk-NRRFAMFA.js";import"./chunk-RYWOKFM7.js";import"./chunk-DLHF7QB4.js";import"./chunk-7UENQJSC.js";import"./chunk-RFFN4NF4.js";import"./chunk-EXXAK3BP.js";import"./chunk-UCLSDDOL.js";var d=300;function w(o=d){return new Promise(e=>{let r=!1,t=()=>{r||(r=!0,e())};requestAnimationFrame(()=>requestAnimationFrame(t)),setTimeout(t,o)})}async function g(){let o=new URL("scene/snapshot",window.location.href),e=await fetch(o);if(!e.ok)throw new Error(`Failed to load ledger snapshot (${e.status})`);return e.json()}var A=async o=>{let e={...f,...o};try{let r=(await import("/components.js"))?.default??{};u(e.$el||"app");let t=await g(),n=i.create().install(a.configure({plugins:[c,p.configure({actorId:"capture"}),m]}),s.configure(e));return n.cache.load({config:e}),n.sceneCompiler.loadPrototypes(l),n.sceneCompiler.loadSources(r),n.state.ledger.hydrate(t),await n.sceneCompiler.create("app",e.nodeId),await w(),window.electron?.capture?.done(e),e}catch(r){let t={error:r.message};return window.electron?.capture?.done(t),t}};export{A as createDesignScreenCaptureBootstrap};
@@ -0,0 +1 @@
1
+ import{a as e}from"./chunk-DLHF7QB4.js";import{a as u,b as c}from"./chunk-7UENQJSC.js";import{f as S}from"./chunk-EXXAK3BP.js";import{c as l}from"./chunk-UCLSDDOL.js";var E={__version:1,type:"node",render:{name:null,mode:"value",value:!0,binding:null,computed:null,code:null,error:null},name:null,layout:"none",draggable:!0,resizable:!0,selectable:!0,locked:[],anchor:[],dimensions:[],expandedStyles:[],childrenType:null,repeat:null,contextName:null,attributes:[],events:[],className:[],states:[],lifecycle:[],animations:[],style:{}};var A={type:"element",ex:"node",style:{default:{}}};var F={type:"container",ex:"node",childrenType:"*",bounds:{width:0,height:0,x:0,y:0}};var h={};l(h,{article:()=>z,aside:()=>U,div:()=>M,footer:()=>_,form:()=>$,header:()=>Y,layout:()=>q,main:()=>G,nav:()=>W,section:()=>R,template:()=>J});var q={ex:"element",anchor:["top","left"],dimensions:["width","height"],childrenType:"*",children:[]},M={ex:"layout",tagName:"div"},R={ex:"layout",tagName:"section"},Y={ex:"layout",tagName:"header"},_={ex:"layout",tagName:"footer"},z={ex:"layout",tagName:"article"},G={ex:"layout",tagName:"main"},U={ex:"layout",tagName:"aside"},W={ex:"layout",tagName:"nav"},$={ex:"layout",tagName:"form"},J={ex:"layout",tagName:"template",html:"<div>HTML template</div>",style:{default:{width:"250px",height:"100px"}}};var f={};l(f,{blockquote:()=>le,br:()=>fe,codeElement:()=>pe,em:()=>de,h1:()=>X,h2:()=>Z,h3:()=>ee,h4:()=>te,h5:()=>ne,h6:()=>oe,heading:()=>V,hr:()=>he,label:()=>se,mark:()=>ue,p:()=>re,paragraph:()=>ae,pre:()=>ce,small:()=>xe,span:()=>ie,strong:()=>me,text:()=>Q});var Q={ex:"element",anchor:["top","left"],dimensions:["width"],childrenType:"text",textContent:e({value:""})},V={ex:"text",textContent:e({value:""}),style:{default:{margin:"0"}}},X={ex:"heading",tagName:"h1",textContent:e({value:"Heading 1"})},Z={ex:"heading",tagName:"h2",textContent:e({value:"Heading 2"})},ee={ex:"heading",tagName:"h3",textContent:e({value:"Heading 3"})},te={ex:"heading",tagName:"h4",textContent:e({value:"Heading 4"})},ne={ex:"heading",tagName:"h5",textContent:e({value:"Heading 5"})},oe={ex:"heading",tagName:"h6",textContent:e({value:"Heading 6"})},ae={ex:"text",textContent:e({value:"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."}),style:{default:{margin:"0"}}},re={ex:"paragraph",tagName:"p"},ie={ex:"text",tagName:"span",textContent:e({value:"Lorem ipsum"})},se={ex:"text",tagName:"label",textContent:e({value:"Label text"})},le={ex:"text",tagName:"blockquote",textContent:e({value:"Blockquote text"})},ce={ex:"text",tagName:"pre",textContent:e({value:"Preformatted text"})},pe={ex:"text",tagName:"code",textContent:e({value:"code"})},me={ex:"text",tagName:"strong",textContent:e({value:"Bold text"})},de={ex:"text",tagName:"em",textContent:e({value:"Emphasized text"})},xe={ex:"text",tagName:"small",textContent:e({value:"Small text"})},ue={ex:"text",tagName:"mark",textContent:e({value:"Highlighted text"})},he={ex:"element",tagName:"hr",anchor:["top","left"],dimensions:["width"],childrenType:"none"},fe={ex:"element",tagName:"br",anchor:["top","left"],dimensions:["width"],childrenType:"none"};var g={};l(g,{a:()=>ve,button:()=>ye,details:()=>be,dialog:()=>Te,interactive:()=>ge,summary:()=>Ne});var ge={ex:"element",interactive:!0,childrenType:"text",anchor:["top","left"],style:{default:{width:"auto",height:"auto",cursor:"pointer"}}},ye={ex:"interactive",tagName:"button",dimensions:["width","height"],textContent:e({value:"Button text"}),style:{default:{"background-color":"#e9e9e9",border:"1px solid #d5d5d5","border-radius":"4px",padding:"6px 12px",width:"120px",height:"auto"}}},ve={ex:"interactive",tagName:"a",textContent:e({value:"Link text"}),destination:{type:"page",id:null,path:null,target:null,replace:!1,params:null,query:null}},be={ex:"interactive",tagName:"details",childrenType:"*",dimensions:["width","height"],style:{default:{cursor:"default"}}},Ne={ex:"interactive",tagName:"summary",textContent:e({value:"Summary text"})},Te={ex:"interactive",tagName:"dialog",childrenType:"*",dimensions:["width","height"],style:{default:{cursor:"default",width:"300px",height:"200px"}}};var v={};l(v,{checkbox:()=>De,color:()=>He,date:()=>Be,email:()=>Oe,file:()=>je,hidden:()=>Ke,input:()=>Ce,number:()=>Ee,password:()=>Se,phone:()=>Fe,radio:()=>Ie,range:()=>Pe,search:()=>Ae,select:()=>Le,textInput:()=>ke,textarea:()=>qe});var a=t=>c({name:"type",mode:"value",value:t,removable:!1}),we=()=>c({name:"value",mode:"value",value:"",removable:!1}),r=()=>c({name:"model",mode:"binding",binding:null,removable:!0}),s=()=>c({name:"onInput",mode:"code",code:u,removable:!1}),y=()=>c({name:"onChange",mode:"code",code:u,removable:!1}),Ce={ex:"element",tagName:"input",anchor:["top","left"],dimensions:["width"],childrenType:"none",style:{default:{width:"auto",height:"auto"}}},ke={ex:"input",attributes:[a("text"),r()],events:[s()]},Oe={ex:"input",attributes:[a("email"),r()],events:[s()]},Se={ex:"input",attributes:[a("password"),r()],events:[s()]},Ee={ex:"input",attributes:[a("number"),r()],events:[s()]},Ae={ex:"input",attributes:[a("search"),r()],events:[s()]},Fe={ex:"input",attributes:[a("tel"),r()],events:[s()]},Pe={ex:"input",attributes:[a("range"),r()],events:[s()]},He={ex:"input",attributes:[a("color"),r()],events:[s()]},Be={ex:"input",attributes:[a("date"),r()],events:[s()]},De={ex:"input",attributes:[a("checkbox"),r()],events:[y()]},Ie={ex:"input",attributes:[a("radio"),r()],events:[y()]},je={ex:"input",attributes:[a("file")]},Ke={ex:"input",attributes:[a("hidden"),we()]},Le={ex:"input",tagName:"select",childrenType:"options",attributes:[r()],events:[y()]},qe={ex:"input",tagName:"textarea",childrenType:"text",dimensions:["width","height"],attributes:[r()],events:[s()]};var b={};l(b,{audio:()=>Ye,figcaption:()=>Ge,figure:()=>ze,iframe:()=>Ue,img:()=>Re,media:()=>Me,video:()=>_e});var P=c({name:"controls",mode:"value",value:!0,removable:!1}),Me={ex:"element",anchor:["top","left"],dimensions:["width","height"],style:{default:{display:"block",width:"auto",height:"auto","object-fit":"contain"}}},Re={ex:"media",tagName:"img",childrenType:"none"},Ye={ex:"media",tagName:"audio",childrenType:"none",dimensions:["width"],attributes:[P],style:{default:{width:"320px"}}},_e={ex:"media",tagName:"video",childrenType:"*",attributes:[P],style:{default:{width:"320px",height:"240px"}}},ze={ex:"media",tagName:"figure",childrenType:"*",dimensions:["width","height"],style:{default:{width:"auto",height:"auto",margin:"0"}}},Ge={ex:"media",tagName:"figcaption",childrenType:"text"},Ue={ex:"media",tagName:"iframe",childrenType:"none",dimensions:["width","height"]};var N={};l(N,{dd:()=>Xe,dl:()=>Qe,dt:()=>Ve,li:()=>Je,ol:()=>We,ul:()=>$e});var We={ex:"element",tagName:"ol",anchor:["top","left"],dimensions:["width"],childrenType:["li"],children:[]},$e={ex:"element",tagName:"ul",anchor:["top","left"],dimensions:["width"],childrenType:["li"],children:[]},Je={ex:"element",tagName:"li",anchor:["top","left"],dimensions:["width"],childrenType:"text"},Qe={ex:"element",tagName:"dl",anchor:["top","left"],dimensions:["width"],childrenType:["dt","dd"],children:[]},Ve={ex:"element",tagName:"dt",anchor:["top","left"],dimensions:["width"],childrenType:"text"},Xe={ex:"element",tagName:"dd",anchor:["top","left"],dimensions:["width"],childrenType:"text"};var T={};l(T,{table:()=>Ze,tbody:()=>tt,td:()=>rt,tfoot:()=>nt,th:()=>at,thead:()=>et,tr:()=>ot});var Ze={ex:"element",tagName:"table",anchor:["top","left"],dimensions:["width"],childrenType:["thead","tbody","tfoot","tr"],children:[]},et={ex:"element",tagName:"thead",childrenType:["tr"],children:[]},tt={ex:"element",tagName:"tbody",childrenType:["tr"],children:[]},nt={ex:"element",tagName:"tfoot",childrenType:["tr"],children:[]},ot={ex:"element",tagName:"tr",childrenType:["td","th"],children:[]},at={ex:"element",tagName:"th",childrenType:"*"},rt={ex:"element",tagName:"td",childrenType:"*"};var w={};l(w,{fieldset:()=>it,legend:()=>st,meter:()=>lt,progress:()=>ct});var it={ex:"element",tagName:"fieldset",anchor:["top","left"],dimensions:["width","height"],childrenType:"children",style:{default:{border:"1px solid #cccccc",padding:"16px"}}},st={ex:"element",tagName:"legend",childrenType:"text"},lt={ex:"element",tagName:"meter",childrenType:"none"},ct={ex:"element",tagName:"progress",childrenType:"none"};var C={};l(C,{slot:()=>pt});var pt={type:"slot",ex:"element",tagName:"slot",anchor:["top","left"],dimensions:["width","height"],childrenType:"*"};var H={type:"frame",ex:"container",tagName:"div",bounds:{top:0,left:0,width:360,height:740,x:void 0,y:void 0},style:{default:{background:"white"}},children:[],route:{path:null}};var B={type:"instance",ex:"node",component:null,library:null,props:[],childrenType:"component"};var D={type:"code",ex:"node",body:"",language:"js",params:[],returns:null};var I={type:"animation",ex:"node",scope:"node",name:null,duration:300,easing:"ease",fill:"none",direction:"normal",iterations:1,delay:0,endDelay:0,iterationStart:0,composite:"replace",keyframes:[]};var j={type:"component",ex:"container",name:"",library:"local",props:[],emits:[],data:[],children:[]};var K={type:"graphic",ex:"node",tagName:"div",props:{},template:[],style:{default:{margin:"0",width:"100px",height:"100px"}}};function x(t){let i=[],n=t;for(;n&&d[n];)i.push(n),n=d[n].ex;return i}function k(t){return!!d[t]}var mt=new Set(["element","container","frame","instance","component","slot","animation","graphic","code","node"]);function O(t){let i=t?.ex??t?.type;for(let n of x(i))if(mt.has(n))return n;return null}function dt(t,i){let n=new Map(t.map(o=>[o.name,o]));for(let o of i)n.set(o.name,o);return Array.from(n.values())}function L(t,i){let n=x(t).reverse(),o=[];for(let p of n){let m=d[p];m?.[i]&&(o=dt(o,m[i]))}return o}function xt(t,i={}){if(!k(t))throw new Error(`createNode: unknown prototype "${t}". Did you mean to register it first?`);let n=O({type:t}),o=n===t?{type:t,...i}:{type:n,ex:t,...i};if(!o.attributes){let p=L(t,"attributes");p.length&&(o.attributes=p.map(m=>({...m})))}if(!o.events){let p=L(t,"events");p.length&&(o.events=p.map(m=>({...m})))}return[S(),o]}var d={node:E,element:A,container:F,...h,...f,...g,...v,...b,...N,...T,...w,...C,frame:H,instance:B,code:D,animation:I,component:j,graphic:K};export{d as a,xt as b};
@@ -0,0 +1 @@
1
+ import{b}from"./chunk-2Z2RXHNK.js";import{a as A}from"./chunk-IWTWZA3T.js";import{a as N}from"./chunk-A25WFH3U.js";import{a as C}from"./chunk-MUZZUB5Y.js";import{a as S}from"./chunk-TPCJQIUG.js";import{b as E}from"./chunk-IG2Y3H6O.js";import{b as j}from"./chunk-HE7IQLGK.js";import{f as x}from"./chunk-EXXAK3BP.js";function D(o,n,i){if(!S(o,n)||!S(o,i))return!1;let r=o.findWhen("children","includes",n);return r?(o.update(r,(f=[])=>f.map(p=>p===n?i:p)),!0):!1}var F=o=>structuredClone?structuredClone(o):JSON.parse(JSON.stringify(o));function M(o,n){let i=N(o,n),r=[n,...i],f={};for(let p of r){let m=o.get([p]);m&&(f[p]=m)}return F(f)}function k(o){let n=Object.keys(o),i={},r=new Map;n.forEach(t=>{let s=x();r.set(t,s)}),n.forEach(t=>{let s=r.get(t),e={...o[t]};e.children&&Array.isArray(e.children)&&(e.children=e.children.map(c=>r.get(c)||null).filter(c=>c!==null)),e.slots&&Array.isArray(e.slots)&&(e.slots=e.slots.map(c=>({...c,id:r.get(c.id)??c.id,children:(c.children||[]).map(l=>r.get(l)??l)}))),e.type==="frame"&&(e.route=e.route?{...e.route,path:`${s}`}:{path:`${s}`}),i[s]=e});let f=Object.keys(i),p=new Set;return Object.values(i).forEach(t=>{t.children&&Array.isArray(t.children)&&t.children.forEach(s=>{s&&p.add(s)})}),[f.filter(t=>!p.has(t)),i]}function J(o,n){let r=o.get([n])?.type;return r==="frame"||r==="viewport"}var $=["top","left","right","bottom"],G=[...$];function K(o,n,i,r){let f=o.get([n,"style"]);if(!f)return;let p=new Set(r??[]);for(let m in f){let t=f[m];if(!t||typeof t!="object")continue;let s={},y=!1;for(let e of $)e in t&&p.has(e)&&(s[e]=t[e],y=!0);y&&(o.update([i,"style",m],(e={})=>({...e,...s})),o.update([n,"style",m],(e={})=>{let c={...e};for(let l of G)delete c[l];return c}))}}function L(o,n){E(o,n),o.remove([n,".position"]),o.remove([n,"bounds"]),o.set([n,"anchor"],[]),j(o,n,{width:"100%",height:"100%"})}function T(o,n){let i=N(o,n);for(let r of i)o.remove([r]);o.remove([n])}function so(o,n,i,r=null){let f=A(o,n),p=f==="root"||f==="temp",m=J(o,n),t=o.get([n,".position"]),s=o.get([n,"anchor"]),y=o.get([n,"dimensions"]),e=M(o,n),[c,l]=k(e),P=c[0],O,a=null;if(m){O=[...l[P]?.children??[]];for(let[d,g]of Object.entries(l))d!==P&&o.set([d],g)}else{a=c[0];for(let[d,g]of Object.entries(l))o.set([d],g);O=[a]}let v=r??o.get([n,"bounds"])??null,w={children:O,name:i};v&&(w.bounds=v);let[h,B]=b("component",w);o.set([h],B),o.update(["components","children"],(d=[])=>d.indexOf(h)===-1?[...d,h]:d);let u=null;if(p)C(o,n),T(o,n),a&&L(o,a);else{let[d,g]=b("instance",{component:h});u=d,o.set([u],g),D(o,n,u),T(o,n),t&&o.set([u,".position"],t),s&&o.set([u,"anchor"],s),y&&o.set([u,"dimensions"],y),a&&(K(o,a,u,s),L(o,a))}return{componentId:h,instanceId:u}}export{D as a,F as b,M as c,k as d,so as e};
@@ -0,0 +1 @@
1
+ import{a as ht,b as gt}from"./chunk-LXD22ETU.js";import{a as m}from"./chunk-CGCD6S33.js";import{a as ft}from"./chunk-EPVRMHC2.js";import{a as ut}from"./chunk-YB7FA4Y3.js";import{a as at}from"./chunk-NXBFOI3Z.js";import{a as it}from"./chunk-E6KR5RXO.js";import{a as st}from"./chunk-I57W7UZN.js";import{a as pt}from"./chunk-IBDKDP7T.js";import{a as mt}from"./chunk-5CWWFBNY.js";import{a as lt}from"./chunk-BWJHUHDJ.js";import{a as ct}from"./chunk-QFFVADTJ.js";import{a as dt}from"./chunk-QD56IMFS.js";import{a as Xe}from"./chunk-CNZYL2VV.js";import{a as Ye}from"./chunk-MGH62JQ4.js";import{a as Ze}from"./chunk-YCMBBPKT.js";import{a as et}from"./chunk-XFHQ45KR.js";import{a as tt}from"./chunk-XTAXESM6.js";import{a as rt}from"./chunk-QJ33JO3T.js";import{a as ot}from"./chunk-XE3A5HPY.js";import{a as nt}from"./chunk-GEOQWCYL.js";import{a as We}from"./chunk-GM4D3DPT.js";import{a as _e}from"./chunk-Q3IER3MW.js";import{a as qe}from"./chunk-DHPGPV5T.js";import{a as $e,b as Ve}from"./chunk-FAYUYASQ.js";import{a as Ue}from"./chunk-ICWQHFOI.js";import{a as Ke,b as ee}from"./chunk-AS76ZLXK.js";import{a as te}from"./chunk-HCRWHPFW.js";import{a as Je,b as Qe}from"./chunk-6KW4HPGN.js";import{a as Ge}from"./chunk-CAAW6MG4.js";import{a as Ie,b as Y,c as Z,d as W,e as Pe}from"./chunk-3WCN6R5H.js";import{a as Fe,b as Be,c as He}from"./chunk-G3PYA3EU.js";import{a as Re}from"./chunk-OQM5TMCK.js";import{a as je}from"./chunk-K5BNCYT7.js";import{a as Le}from"./chunk-LHK7LQPZ.js";import{a as ze}from"./chunk-GK5XUHQG.js";import{b as K,d as J,e as F,f as De}from"./chunk-M577WNTV.js";import{a as G,b as C,c as R}from"./chunk-7I5TQOE2.js";import{a as I}from"./chunk-J5QMLA3Z.js";import{a as we}from"./chunk-IWTWZA3T.js";import{a as Me,b as Te}from"./chunk-IV6PINVX.js";import{a as X}from"./chunk-A25WFH3U.js";import{a as z}from"./chunk-MUZZUB5Y.js";import{a as B}from"./chunk-TPCJQIUG.js";import{a as Ee,b as Ae}from"./chunk-SCJKRPIZ.js";import{a as S,b as Q,c as Se,d as ke,e as O}from"./chunk-4Q5R44ZZ.js";import{a as be,b as ve}from"./chunk-HE7IQLGK.js";import{a as Ce}from"./chunk-Z3M6DQKZ.js";import{a as Oe}from"./chunk-PPDOTRNT.js";import{a as U}from"./chunk-DLHF7QB4.js";import{b as V}from"./chunk-7UENQJSC.js";import{c as A}from"./chunk-UCLSDDOL.js";function yt(r,e,t){let o=t??"default";if(r.set([e,".activeBreakpoint"],o),o!=="default")r.push([e,"locked"],"width");else{let i=(r.get([e,"locked"])??[]).indexOf("width");i!==-1&&r.splice([e,"locked"],i,1)}}function xt(r,e){r.remove([e,".activeBreakpoint"])}var Nt=m("node:breakpoint",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{namespace:"scene-graph",schema:["String","Number"],handler:(t,o)=>{yt(e,t,o)}},clear:{namespace:"scene-graph",schema:["String"],handler:t=>{xt(e,t)}}}});function wt(r,e,t,o){return r.setWhere([e,"className"],{value:t},Fe(o))}function bt(r,e,t){return r.removeWhere([e,"className"],{value:t})}var vt=m("node:className",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>Be(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>wt(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>bt(e,t,o)}}});function Ct(r,e){let t=e.flatMap(a=>X(r,a));e.forEach(a=>{z(r,a)}),e=[...e,...t];let o={};for(let a of e)o[a]=r.remove([a]);return Y(o)}function St(r,e){let t=e.flatMap(a=>X(r,a));e=[...e,...t];let o={};for(let a of e){let i=r.get([a]);i&&(o[a]=i)}return Y(o)}function re(r,e){return r.update(["temp","children"],(t=[])=>t.indexOf(e)===-1?[...t,e]:t),!0}function H(r,e,t){if(!G(r,e,t,"after")){C(r,e);return}if(r.get(["app","children"])?.includes(t))return r.update(["app","children"],(s=[])=>{let c=s.indexOf(t);if(c===-1)return[...s,e];let d=[...s];return d.splice(c+1,0,e),d}),O(r,e,"app"),!0;let a=r.findWhen("children","includes",t);if(!a)return new Error("Failed to move node after: parent not found");let i=a[0],p=r.get([e,"ex"])??r.get([e,"type"]);if(I(r,i,p))return r.update(a,(s=[])=>{let c=s.indexOf(t);if(c===-1)return[...s,e];let d=[...s];return d.splice(c+1,0,e),d}),O(r,e,i),!0}function oe(r,e,t){if(!G(r,e,t,"before")){C(r,e);return}if(r.get(["app","children"])?.includes(t))return C(r,e),!0;let a=r.findWhen("children","includes",t);if(!a)return new Error("Failed to move node before: parent not found");let i=a[0],p=r.get([e,"ex"])??r.get([e,"type"]);if(I(r,i,p))return r.update(a,(s=[])=>{let c=s.indexOf(t);if(c===-1)return[e,...s];let d=[...s];return d.splice(c,0,e),d}),O(r,e,i),!0}function ne(r,e,{parent:t,after:o,before:a,root:i,temp:p}={}){let[s,c]=W(e);for(let[f,v]of Object.entries(c))r.set(f,v);let d=[],y=[];for(let f of s)c[f]?.type==="component"?d.push(f):y.push(f);if(y.length>0)for(let f of d)R(r,f,"components");else y.push(...d);if(p)for(let f of y)re(r,f);if(i)for(let f of y)C(r,f);if(t)for(let f of y)R(r,f,t);if(o)for(let f of y)H(r,f,o),o=f;if(a)for(let f of y)oe(r,f,a),a=f;return y}function ae(r,e){let t=[];for(let o of e){let a=Z(r,o);t=t.concat(ne(r,a,{after:o}))}return t}function N(r,e){let t=r.get([e,"locked"]);return!t||!t.includes("*")}var kt=m("node:clipboard",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{cut:{namespace:"scene-graph",schema:["Array"],handler:t=>{let o=t.filter(i=>N(e,i));return o.length===0?{}:Ct(e,o)}},copy:{namespace:"scene-graph",schema:["Array"],handler:t=>St(e,t)},paste:{namespace:"scene-graph",schema:["Object","Object"],handler:(t,o)=>{let a=ne(e,t,o);if(o.parent)for(let i of a)O(e,i,o.parent);return a}},duplicate:{namespace:"scene-graph",schema:["Array","Object","Object"],handler:(t,o,a)=>{let i=ae(e,t,o);a&&typeof a=="function"&&a(i)}}}});function Dt(r,e,t){return r.set([e,"contextName"],t)}function Mt(r,e,t){return r.set([e,"contextName"],t)}function Tt(r,e){return r.remove([e,"contextName"])}var Et=m("node:contextName",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","String"],handler:(t,o)=>{Dt(e,t,o)},namespace:"scene-graph"},update:{schema:["String","String"],handler:(t,o)=>{Mt(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Tt(e,t)},namespace:"scene-graph"}}});var At=m("node:state",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>Ye(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>Ze(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>et(e,t,o)}}});function Ot(r,e,t){let o=F(r,e,t);return re(r,o),o}var Pn=/^Slot (\d+)$/;function jn(r,e){let t=r.get([e,"children"])??[],o=0;for(let a of t){let i=r.get([a]);if(i?.type!=="slot")continue;let p=Pn.exec(i.name??"");p&&(o=Math.max(o,Number(p[1])))}return`Slot ${o+1}`}function Gt(r,e,t={}){let o=t.name??jn(r,e),a=F(r,"slot",{...t,name:o});return r.update([e,"children"],(i=[])=>[...i,a]),a}var It=m("node:add",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{element:{namespace:"scene-graph",schema:["String","Object","Object"],handler:(t,o,a)=>{if(t==="slot")return[Gt(e,a?.parent??"app",o)];let i=F(e,t,o);return a?.after?H(e,i,a.after):R(e,i,a?.parent??"app"),[i]}},tree:{namespace:"scene-graph",schema:["Object","String"],handler:(t,o)=>{let a=e.batch();try{return He(e,t,o??"app")}finally{a()}}},tempNode:{namespace:"scene-graph",schema:["String","Object"],handler:(t,o)=>[Ot(e,t,o)]},component:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>{let{componentId:i,instanceId:p}=Pe(e,t,o,a);return[p??i]}},duplicates:{namespace:"scene-graph",schema:["Array"],handler:t=>{for(let a of t)S(e,a);return ae(e,t)}},images:{namespace:"scene-graph",schema:["Array"],handler:t=>{let o=[],a=e.batch();for(let i of t){let p=De(e,"img",{name:i.meta.name,attributes:[{name:"src",value:i.url},{name:"alt",value:i.meta.name}]});o.push(p)}return a(),o}}}});var Pt=m("node:event",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>Le(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>ze(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>We(e,t,o)}}});var jt=m("node:attribute",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>rt(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>Re(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>je(e,t,o)}}});function _({name:r,mode:e,...t}={}){return V({name:r,mode:e??"value",...t})}function Rt(r,e,t={}){let a=_(typeof t=="string"?{name:t}:t);return r.unshift([e,"props"],a)}function Ft(r,e,t,o){let a=_(o);r.findWhere([e,"props"],{name:t})!==void 0?r.setWhere([e,"props"],{name:t},a):r.push([e,"props"],a)}function Bt(r,e,t){typeof r.removeAllWhere=="function"?r.removeAllWhere([e,"props"],{name:t}):r.removeWhere([e,"props"],{name:t})}var Ht=m("node:prop",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","Object"],handler:(t,o)=>Rt(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>Ft(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>Bt(e,t,o)}}});function Lt(r,e,t,o){r.updateWhere([e,"slots"],{id:t},a=>{switch(a.childrenType){case"text":return{...a,textContent:V(o)};default:return a}})}function zt(r=[]){if(!Array.isArray(r))return[];let e=[];for(let t of r){if(!t||typeof t=="string"||!t.id)continue;let o=t.childrenType??"children";if(t.required===!0||o==="text"&&t.textContent!=null){if(o==="text"){let i=t.textContent?.value??"";e.push({id:t.id,name:t.name,childrenType:"text",textContent:U({value:i}),children:null});continue}e.push({id:t.id,name:t.name,childrenType:o,textContent:null,children:[]})}}return e}function pe(r=[],e=[]){let t=Array.isArray(r)?[...r]:[],o=new Set(t.map(a=>a?.id).filter(Boolean));for(let a of zt(e))o.has(a.id)||(t.push(a),o.add(a.id));return t}function Wt(r,e,t=[]){if(!e)return;let o=r.get([e,"slots"])??[],a=pe(o,t),i=new Set(o.map(s=>s?.id).filter(Boolean));a.some(s=>s?.id&&!i.has(s.id))&&r.set([e,"slots"],a)}var _t=m("node:slot",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>{Lt(e,t,o,a)}},ensureFromMeta:{namespace:"scene-graph",schema:["String","Array"],handler:(t,o)=>{Wt(e,t,o)}}}});var qt=m("node:html",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{update:{schema:["String","String"],handler:(t,o)=>{dt(e,t,o)},namespace:"scene-graph"}}});function $t(r,e,t){return r.update([e,"destination"],(o={})=>$e({...o,...t}))}var Vt=m("node:destination",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{namespace:"scene-graph",schema:["String","Object"],handler:(t,o={})=>{Ve(e,t,o)}},update:{namespace:"scene-graph",schema:["String","Object"],handler:(t,o)=>{$t(e,t,o)}},remove:{namespace:"scene-graph",schema:["String"],handler:t=>{Ue(e,t)}}}});function Ut(r,e,t){return r.update([e,".position"],(o={x:0,y:0})=>({...o,...t}))}var Kt=m("node:drag",r=>{let e=r("state"),t=e?.ref(["nodes"])??null,o=null;if(!e||!t)throw new Error("State or node cache not found");return{start:{namespace:"scene-graph",handler:()=>o=e.history?.group()},apply:{namespace:"scene-graph",schema:["Array"],handler:a=>{for(let[i,p]of a)i&&p[".position"]&&Ut(t,i,p[".position"])}},end:{namespace:"scene-graph",schema:["Array"],handler:a=>{for(let i of a)i&&S(t,i);o?(o("Drag nodes"),o=null):e.history?.commit("Drag nodes")}},clear:{namespace:"scene-graph",schema:["Array"],handler:a=>{for(let i of a)i&&S(t,i);o&&(o(),o=null)}}}});var Jt=m("node:lifecycle",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>ot(e,t,o)},update:{namespace:"scene-graph",schema:["String","String","Object"],handler:(t,o,a)=>nt(e,t,o,a)},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>at(e,t,o)}}});function Qt(r,e,t){if(!(r.get([e,".interactionState"])??[]).includes(t))return r.push([e,".interactionState"],t)}function Xt(r,e,t){let a=(r.get([e,".interactionState"])??[]).indexOf(t);if(a!==-1)return r.splice([e,".interactionState"],a,1)}function Yt(r,e){r.remove([e,".interactionState"])}var Zt=m("node:interactionState",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{schema:["String","String"],namespace:"scene-graph",handler:(t,o)=>{Qt(e,t,o)}},remove:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>{Xt(e,t,o)}},clear:{namespace:"scene-graph",schema:["String"],handler:t=>{Yt(e,t)}}}});var er=m("node:patch",r=>{let[e,t]=r("state","sceneCompiler"),o=e?.ref(["nodes"])??null,a=null;if(!e||!o)throw new Error("State or node cache not found");return{start:{namespace:"scene-graph",schema:"*",handler:()=>{a=e.history?.group()}},apply:{namespace:"scene-graph",schema:["Array"],handler:i=>{let p=e.batch();for(let[s,c]of i){if(!s||!c||!N(o,s))continue;let d=t.getActiveBreakpoint(s);Q(o,s,c,d)}p()}},end:{namespace:"scene-graph",schema:["String"],handler:(i="Patch")=>{a?(a(i),a=null):e.history?.commit(i)}},clear:{namespace:"scene-graph",schema:["Array"],handler:i=>{for(let p of i)p&&S(o,p);a&&(a(),a=null)}}}});var tr=m("node:behavior",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","Object"],handler:(t,o)=>{Se(e,t,o)},namespace:"scene-graph"},update:{schema:["Array"],handler:t=>{for(let[o,a]of t)Q(e,o,a)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{ke(e,t)},namespace:"scene-graph"}}});var rr=m("node:layout",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","String"],handler:(t,o)=>{if(N(e,t))return Ae(e,t,o)},namespace:"scene-graph"}}});function or({id:r=null,name:e=void 0,children:t=[]}={}){return{id:r,name:e,children:t}}function Rn(r,e,{before:t,after:o}={}){if(r.includes(e))return r;if(t){let a=r.indexOf(t);if(a===-1)return[e,...r];let i=[...r];return i.splice(a,0,e),i}if(o){let a=r.indexOf(o);if(a===-1)return[...r,e];let i=[...r];return i.splice(a+1,0,e),i}return[...r,e]}function nr(r,e,t,{slotId:o=null,name:a=void 0,before:i,after:p}={}){if(B(r,t)&&B(r,e)){if(!G(r,e,t,"lastChildOf")){C(r,e);return}return r.update([t,"slots"],(s=[])=>{let c=s.findIndex(f=>f.id===o);if(c===-1)return[...s,or({id:o,name:a,children:[e]})];let d=s[c],y=d.children||[],T=[...s];return T[c]={...d,children:Rn(y,e,{before:i,after:p})},T}),O(r,e,o||t),!0}}function ar(r,e,t,o){if(!B(r,e)||!B(r,t))return!1;let a=r.get([e,"ex"])??r.get([e,"type"]);return!(!I(r,t,a)||!G(r,e,t,o))}var ir=m("node:move",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{apply:{namespace:"scene-graph",schema:["Array","Object"],handler:(t,o)=>{let a=t.filter(s=>N(e,s)),i=[],p=[];for(let s of a)o.before||o.after||o.instance?i.push(s):o.parent?ar(e,s,o.parent,"lastChildOf")?i.push(s):we(e,s)==="temp"&&p.push(s):i.push(s);if(!(i.length===0&&p.length===0)){for(let s of i)z(e,s),S(e,s),Me(e,s);if(o.instance)for(let s of i)nr(e,s,o.instance,{slotId:o.slotId,name:o.name,before:o.before,after:o.after});else if(o.before)for(let s of i)oe(e,s,o.before);else if(o.after)for(let s of i)H(e,s,o.after);else if(o.parent)for(let s of i)R(e,s,o.parent);for(let s of p)z(e,s),S(e,s),C(e,s)}}}}});function sr(r,e,t){return r.set([e,"name"],t)}var pr=m("node:name",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","String"],handler:(t,o)=>{Ge(e,t,o)},namespace:"scene-graph"},update:{schema:["String","String"],handler:(t,o)=>{sr(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Oe(e,t)},namespace:"scene-graph"}}});var mr=m("node:options",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{add:{schema:["String","Object"],handler:(t,o)=>{it(e,t,o)},namespace:"scene-graph"},update:{schema:["String","String","Object"],handler:(t,o,a)=>{st(e,t,o,a)},namespace:"scene-graph"},remove:{schema:["String","String"],handler:(t,o)=>{pt(e,t,o)},namespace:"scene-graph"},setExpression:{schema:["String","Object"],handler:(t,o)=>{mt(e,t,o)},namespace:"scene-graph"},clearExpression:{schema:["String"],handler:t=>{lt(e,t)},namespace:"scene-graph"}}});var lr=m("node:order",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{bringToFront:{schema:["Array"],handler:t=>{for(let o of t){let a=e.findWhen("children","includes",o);a&&e.update(a,(i=[])=>[...i.filter(s=>s!==o),o])}},namespace:"scene-graph"},sendToBack:{schema:["Array"],handler:t=>{for(let o of t){let a=e.findWhen("children","includes",o);a&&e.update(a,(i=[])=>{let p=i.filter(s=>s!==o);return[o,...p]})}},namespace:"scene-graph"},moveForward:{schema:["Array"],handler:t=>{for(let o of t){let a=e.findWhen("children","includes",o);a&&e.update(a,(i=[])=>{let p=i.indexOf(o);if(p===-1||p===i.length-1)return i;let s=[...i];return[s[p],s[p+1]]=[s[p+1],s[p]],s})}},namespace:"scene-graph"},moveBackward:{schema:["Array"],handler:t=>{for(let o of t){let a=e.findWhen("children","includes",o);a&&e.update(a,(i=[])=>{let p=i.indexOf(o);if(p===-1||p===0)return i;let s=[...i];return[s[p],s[p-1]]=[s[p-1],s[p]],s})}},namespace:"scene-graph"}}});function me(r,e,t){let o=new Set(Array.isArray(t)?t:[t]),a=[];function i(s){if(r.has([s])){let d=r.get([s,"type"]);o.has(d)&&a.push(s)}let c=r.get([s,"children"])||[];for(let d of c)i(d)}let p=r.get([e,"children"])||[];for(let s of p)i(s);return a}function cr(r,e){let t=r.get([e,"children"])||[];if(t.length===0)return[];let o=[...me(r,"app","instance"),...me(r,"temp","instance")].filter(i=>r.get([i,"component"])===e);if(o.length===0)return[];let a=[];for(let i of o){let p=r.get([i,".position"]),s=r.get([i,"anchor"]),c=r.get([i,"dimensions"]),d=r.get([i,"style"]),y={};for(let E of t)Object.assign(y,Z(r,E));let[T,f]=W(y);for(let[E,j]of Object.entries(f))r.set([E],j);let v;if(T.length===1)v=T[0];else{v=T[0];for(let E=1;E<T.length;E++)r.update([v,"children"],(j=[])=>[...j,T[E]])}p&&r.set([v,".position"],p),s&&r.set([v,"anchor"],s),c&&r.set([v,"dimensions"],c),d&&r.update([v,"style"],(E={})=>{let j={...E};for(let se in d)j[se]={...j[se]||{},...d[se]};return j}),Ie(r,i,v),r.remove([i]),a.push(v)}return a}var dr=m("node:remove",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{nodes:{namespace:"scene-graph",schema:["Array"],handler:t=>{for(let o of t)e.get([o,"type"])==="component"&&cr(e,o),Te(e,o)}}}});function fr(r,e,t){return r.update([e,"render"],(o={})=>Je({...o,...t}))}var ur=m("node:render",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","Object"],handler:(t,o)=>{Qe(e,t,o)},namespace:"scene-graph"},update:{schema:["String","Object"],handler:(t,o)=>{fr(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Xe(e,t)},namespace:"scene-graph"}}});function hr(r,e,t){return r.update([e,"repeat"],(o={})=>Ke({...o,...t}))}function gr(r,e){return r.get([e,"repeat"])?r:ee(r,e,{})}function yr(r,e){return te(r,e)}var xr=m("node:repeat",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","Object"],handler:(t,o)=>{ee(e,t,o)},namespace:"scene-graph"},update:{schema:["String","Object"],handler:(t,o)=>{hr(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{te(e,t)},namespace:"scene-graph"},enable:{schema:["String"],handler:t=>{gr(e,t)},namespace:"scene-graph"},disable:{schema:["String"],handler:t=>{yr(e,t)},namespace:"scene-graph"}}});var Nr=m("node:route",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{update:{schema:["String","Object"],namespace:"scene-graph",handler:(t,o)=>{_e(e,t,o)}},addParam:{schema:["String"],namespace:"scene-graph",handler:t=>{ft(e,t)}},removeParam:{namespace:"scene-graph",schema:["String","Number"],handler:(t,o)=>{ut(e,t,o)}},setHomePage:{schema:["String","Boolean"],namespace:"scene-graph",handler:(t,o)=>{qe(e,t,o)}}}});function wr(r,e,{breakpoint:t="default",interactionState:o=[]}={}){let a=be(t);return r.remove([e,"style",a,...o])}function ie(r,e){let t=r.get([e]),o=t?.type;return o==="frame"||o==="component"||o==="viewport"||!!t?.bounds}var br=m("node:style",r=>{let[e,t]=r("state","sceneCompiler"),o=e?.ref(["nodes"])??null;return{update:{schema:["Object"],handler:a=>{for(let[i,p]of Object.entries(a)){if(!N(o,i))continue;delete p.position;let s=ie(o,i)?"default":t.getActiveBreakpoint(i);ve(o,i,p,{breakpoint:s})}},namespace:"scene-graph"},remove:{schema:["Array","Array"],handler:(a,i)=>{for(let p of a){if(!N(o,p))continue;let s=ie(o,p)?"default":t.getActiveBreakpoint(p);for(let c of i)Ee(o,p,c,{breakpoint:s})}},namespace:"scene-graph"},clear:{schema:["Array"],handler:a=>{for(let i of a){if(!N(o,i))continue;let p=ie(o,i)?"default":t.getActiveBreakpoint(i);p==="default"||p==null||wr(o,i,{breakpoint:p})}},namespace:"scene-graph"}}});function vr(r,e,t){return r.set([e,"tagName"],t)}function Cr(r,e){return r.remove([e,"tagName"])}var Sr=m("node:tagName",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","String"],handler:(t,o)=>{ct(e,t,o)},namespace:"scene-graph"},update:{schema:["String","String"],handler:(t,o)=>{vr(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Cr(e,t)},namespace:"scene-graph"}}});function kr(r,e,t={}){if(I(r,e))return;let o=typeof t=="string"?{value:t}:t;return r.update([e,"textContent"],(a={})=>{let i={...a,...o};return!Object.prototype.hasOwnProperty.call(o,"specificPatterns")&&a.specificPatterns!==void 0&&(i.specificPatterns=a.specificPatterns),U(i)})}function Dr(r,e){return r.remove([e,"textContent"])}function q(r,e,t=!0){return r.set([e,".editingTextContent"],t)}function Mr(r,e){return r.remove([e,".editingTextContent"])}var Tr=m("node:textContent",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");let t=null;return{set:{schema:["String","Object"],handler:(o,a)=>{ht(e,o,a)},namespace:"scene-graph"},update:{schema:["String","Object"],handler:(o,a)=>{kr(e,o,a)},namespace:"scene-graph"},clear:{schema:["String"],handler:o=>{Dr(e,o)},namespace:"scene-graph"},"editing:enable":{schema:["String"],namespace:"scene-graph",handler:o=>(t&&(q(e,t,!1),t=null),t=o,q(e,o,!0),!0)},"editing:disable":{schema:"*",namespace:"scene-graph",handler:o=>(o?q(e,o,!1):t&&(q(e,t,!1),t=null),t=null,!0)},"editing:remove":{schema:["String"],namespace:"scene-graph",handler:o=>(Mr(e,o),!0)}}});function Er(r,e,t){if(Array.isArray(t))return r.set([e,"textSegments"],t)}function Ar(r,e){return r.remove([e,"textSegments"])}var Or=m("node:textSegments",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","Array"],handler:(t,o)=>{gt(e,t,o)},namespace:"scene-graph"},update:{schema:["String","Array"],handler:(t,o)=>{Er(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Ar(e,t)},namespace:"scene-graph"}}});function Gr(r,e,t){return r.set([e,"type"],t)}function Ir(r,e,t){return r.set([e,"type"],t)}function Pr(r,e){return r.remove([e,"type"])}var jr=m("node:type",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","String"],handler:(t,o)=>{Gr(e,t,o)},namespace:"scene-graph"},update:{schema:["String","String"],handler:(t,o)=>{Ir(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Pr(e,t)},namespace:"scene-graph"}}});function $(r,e,t,o={}){let{name:a,bounds:i}=J(t,o),p=r.get([e,"bounds"])??{};r.set([e,"frame"],t),r.set([e,"name"],a),r.update([e,"bounds"],()=>({...p,width:i.width,height:i.height}))}function Rr(r,e,{name:t,width:o,height:a}){if(t==="custom"){$(r,e,"custom",{name:t,width:o,height:a});return}if(!K(t))return new Error(`Invalid viewport name "${t}"`);$(r,e,t)}function Fr(r,e){return r.set([e,"frame"],void 0),r.remove([e,"viewport"])}var Br=m("node:viewport",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{schema:["String","Object"],handler:(t,o)=>{Rr(e,t,o)},namespace:"scene-graph"},setPreset:{schema:["String","String","Object"],handler:(t,o,a={})=>{$(e,t,o,a)},namespace:"scene-graph"},update:{schema:["String","Object"],handler:(t,o)=>{Ce(e,t,o)},namespace:"scene-graph"},clear:{schema:["String"],handler:t=>{Fr(e,t)},namespace:"scene-graph"}}});function Hr(r,e){return r.remove([e,"id"])}var Lr=m("node:id",r=>{let e=r("state")?.ref(["nodes"])??null;if(!e)throw new Error("Node cache not found");return{set:{namespace:"scene-graph",schema:["String","String"],handler:(t,o)=>{tt(e,t,o)}},clear:{namespace:"scene-graph",schema:["String"],handler:t=>{Hr(e,t)}}}});function le(r,e){let t=Object.entries(r),o={};for(let[a,i]of t)o[a]=e(a,i);return o}function n(r,e){return e?Array.isArray(e)?Array.isArray(r)?[...r,...e]:e:!(e instanceof Object)||e===null?e:{...r,...le(e,(t,o)=>Array.isArray(o)?Array.isArray(r[t])?[...r[t],...o]:o:o instanceof Object&&o!==null?n(r[t]||{},o):o)}:r}var ce={};A(ce,{fieldset:()=>zr,legend:()=>Wr,meter:()=>qr,progress:()=>_r});var k=()=>({__version:1,type:null,render:{name:null,mode:"value",value:!0,binding:null,computed:null,code:null,error:null},name:null,id:null,tagName:null,viewport:null,layout:"none",draggable:!0,resizable:!0,selectable:!0,locked:[],anchor:[],dimensions:[],childrenType:null,repeat:null,contextName:null,attributes:[],events:[],className:[],states:[],lifecycle:[],animations:[],style:{}});var u=()=>n(k(),{type:"element"});var P=()=>n(u(),{tagName:"",anchor:["top","left"],dimensions:["width","height"],style:{default:{top:"0",left:"0",width:"auto",height:"auto"}}});var zr=()=>n(P(),{tagName:"fieldset",style:{default:{border:"1px solid #cccccc",padding:"16px"}}});var Wr=()=>n(P(),{tagName:"legend",childrenType:"text",dimensions:["width"],textContent:{value:"Legend",binding:null},style:{default:{"font-weight":"bold"}}});var _r=()=>n(P(),{tagName:"progress",childrenType:"none",dimensions:["width"],attributes:[{key:"value",value:"50"},{key:"max",value:"100"}],style:{default:{width:"200px"}}});var qr=()=>n(P(),{tagName:"meter",childrenType:"none",dimensions:["width"],attributes:[{key:"value",value:"50"},{key:"min",value:"0"},{key:"max",value:"100"}],style:{default:{width:"200px"}}});var de={};A(de,{h1:()=>$r,h2:()=>Vr,h3:()=>Ur,h4:()=>Kr,h5:()=>Jr,h6:()=>Qr});var w=()=>n(u(),{tagName:"",childrenType:"text",anchor:["top","left"],dimensions:["width"],textContent:{value:"",binding:null},style:{default:{top:"0",left:"0",margin:"0",width:"180px"}}});var $r=()=>n(w(),{tagName:"h1",textContent:{value:"Heading 1",binding:null}});var Vr=()=>n(w(),{tagName:"h2",textContent:{value:"Heading 2",binding:null}});var Ur=()=>n(w(),{tagName:"h3",textContent:{value:"Heading 3",binding:null}});var Kr=()=>n(w(),{tagName:"h4",textContent:{value:"Heading 4",binding:null}});var Jr=()=>n(w(),{tagName:"h5",textContent:{value:"Heading 5",binding:null}});var Qr=()=>n(w(),{tagName:"h6",textContent:{value:"Heading 6",binding:null}});var fe={};A(fe,{checkbox:()=>Xr,color:()=>no,date:()=>ao,email:()=>Yr,file:()=>io,hidden:()=>so,input:()=>fo,number:()=>po,password:()=>Zr,phone:()=>eo,radio:()=>to,range:()=>mo,search:()=>lo,select:()=>oo,text:()=>ro,textarea:()=>co});var l=()=>n(u(),{tagName:"input",anchor:["top","left"],dimensions:["width"],childrenType:"none",attributes:[],style:{default:{top:"0",left:"0",width:"auto",height:"auto"}}});var Xr=()=>n(l(),{attributes:[{key:"type",value:"checkbox"}]});var Yr=()=>n(l(),{attributes:[{key:"type",value:"email"}],style:{default:{width:"240px",height:"32px"}}});var Zr=()=>n(l(),{attributes:[{key:"type",value:"password"}],style:{default:{width:"240px",height:"32px"}}});var eo=()=>n(l(),{attributes:[{key:"type",value:"tel"}],style:{default:{width:"240px",height:"32px"}}});var to=()=>n(l(),{attributes:[{key:"type",value:"radio"}],style:{default:{margin:"0"}}});var ro=()=>n(l(),{attributes:[{key:"type",value:"text"}],style:{default:{width:"240px",height:"32px"}}});var oo=()=>n(l(),{tagName:"select",childrenType:"options",options:{type:"set",set:[],binding:null,expression:null,dependencies:[],valueKey:{value:"value",expression:null,dependencies:[]},labelKey:{value:"label",expression:null,dependencies:[]}},attributes:[],style:{default:{width:"240px",height:"32px"}}});var no=()=>n(l(),{attributes:[{key:"type",value:"color"}],style:{default:{width:"40px",height:"32px"}}});var ao=()=>n(l(),{attributes:[{key:"type",value:"date"}],style:{default:{width:"240px",height:"32px"}}});var io=()=>n(l(),{attributes:[{key:"type",value:"file"}],style:{default:{width:"240px"}}});var so=()=>n(l(),{attributes:[{key:"type",value:"hidden"}]});var po=()=>n(l(),{attributes:[{key:"type",value:"number"}],style:{default:{width:"240px",height:"32px"}}});var mo=()=>n(l(),{dimensions:["width"],attributes:[{key:"type",value:"range"}],style:{default:{width:"240px"}}});var lo=()=>n(l(),{attributes:[{key:"type",value:"search"}],style:{default:{width:"240px",height:"32px"}}});var co=()=>n(l(),{tagName:"textarea",childrenType:"none",attributes:[],style:{default:{width:"240px",height:"80px"}}});var fo=()=>n(l(),{attributes:[],style:{default:{width:"240px",height:"32px"}}});var ue={};A(ue,{a:()=>ho,button:()=>uo,details:()=>go,dialog:()=>xo,summary:()=>yo});var D=()=>n(u(),{tagName:"",interactive:!0,childrenType:"text",anchor:["top","left"],attributes:[],style:{default:{top:"0",left:"0",width:"auto",height:"auto",cursor:"pointer"}}});var uo=()=>n(D(),{tagName:"button",childrenType:"text",dimensions:["width","height"],textContent:{value:"Button text",binding:null},style:{default:{"background-color":"#e9e9e9",border:"1px solid #d5d5d5","border-radius":"4px",padding:"6px 12px",width:"120px",height:"auto"}}});var ho=()=>n(D(),{tagName:"a",textContent:{value:"Link text",binding:null},destination:{type:"page",id:null,path:null,target:null,replace:!1,params:null,query:null},style:{}});var go=()=>n(D(),{tagName:"details",childrenType:"children",dimensions:["width","height"],style:{default:{cursor:"default"}}});var yo=()=>n(D(),{tagName:"summary",textContent:{value:"Summary text",binding:null}});var xo=()=>n(D(),{tagName:"dialog",childrenType:"children",dimensions:["width","height"],style:{default:{cursor:"default",width:"300px",height:"200px"}}});var he={};A(he,{article:()=>ko,aside:()=>No,div:()=>Mo,footer:()=>wo,form:()=>bo,header:()=>vo,main:()=>Co,nav:()=>Do,section:()=>So,template:()=>To});var g=()=>n(u(),{tagName:"",anchor:["top","left"],dimensions:["width","height"],childrenType:"children",children:[],style:{default:{top:"0",left:"0",width:"1px",height:"1px"}}});var No=()=>n(g(),{tagName:"aside"});var wo=()=>n(g(),{tagName:"footer"});var bo=()=>n(g(),{tagName:"form"});var vo=()=>n(g(),{tagName:"header"});var Co=()=>n(g(),{tagName:"main"});var So=()=>n(g(),{tagName:"section"});var ko=()=>n(g(),{tagName:"article"});var Do=()=>n(g(),{tagName:"nav"});var Mo=()=>n(g(),{tagName:"div"});var To=()=>n(g(),{type:"template",tagName:"template",html:"<div>HTML template</div>",style:{default:{top:"0",left:"0",width:"250px",height:"100px"}}});var ge={};A(ge,{dd:()=>Po,dl:()=>Go,dt:()=>Io,li:()=>Oo,ol:()=>Eo,ul:()=>Ao});var b=()=>n(u(),{tagName:"",anchor:["top","left"],dimensions:["width","height"],childrenType:"children",children:[],style:{default:{top:"0",left:"0",margin:"0",width:"100px",height:"10px"}}});var Eo=()=>n(b(),{tagName:"ol"});var Ao=()=>n(b(),{tagName:"ul"});var Oo=()=>n(b(),{tagName:"li",children:[]});var Go=()=>n(b(),{tagName:"dl"});var Io=()=>n(b(),{tagName:"dt",childrenType:"text",textContent:{value:"Term",binding:null}});var Po=()=>n(b(),{tagName:"dd",childrenType:"text",textContent:{value:"Description",binding:null},style:{default:{"margin-left":"0"}}});var ye={};A(ye,{audio:()=>Fo,figcaption:()=>Lo,figure:()=>Ho,iframe:()=>Bo,img:()=>jo,video:()=>Ro});var M=()=>n(u(),{tagName:"",anchor:["top","left"],dimensions:["width","height"],attributes:[],style:{default:{top:"0",left:"0",width:"auto",height:"auto","object-fit":"contain"}}});var jo=()=>n(M(),{tagName:"img",childrenType:"none"});var Ro=()=>n(M(),{tagName:"video",childrenType:"children",attributes:[{key:"controls",value:!0}],style:{default:{width:"320px",height:"240px"}}});var Fo=()=>n(M(),{tagName:"audio",childrenType:"none",dimensions:["width"],attributes:[{key:"controls",value:!0}],style:{default:{width:"320px"}}});var Bo=()=>n(M(),{tagName:"iframe",childrenType:"none",dimensions:["width","height"],style:{default:{width:"320px",height:"240px","object-fit":void 0}}});var Ho=()=>n(M(),{tagName:"figure",childrenType:"children",dimensions:["width","height"],style:{default:{width:"auto",height:"auto",margin:"0"}}});var h=()=>n(u(),{tagName:"",childrenType:"text",anchor:["top","left"],textContent:{value:"",binding:null},style:{default:{top:"0",left:"0",margin:"0",width:"auto",height:"auto"}}});var Lo=()=>n(h(),{tagName:"figcaption",textContent:{value:"Caption text",binding:null},style:{default:{"font-size":"14px",color:"#666666"}}});var xe={};A(xe,{table:()=>zo,tbody:()=>_o,td:()=>Uo,tfoot:()=>qo,th:()=>Vo,thead:()=>Wo,tr:()=>$o});var x=()=>n(u(),{tagName:"",anchor:["top","left"],dimensions:["width"],style:{default:{top:"0",left:"0",width:"auto"}}});var zo=()=>n(x(),{tagName:"table",dimensions:["width","height"],style:{default:{"border-collapse":"collapse"}}});var Wo=()=>n(x(),{tagName:"thead"});var _o=()=>n(x(),{tagName:"tbody"});var qo=()=>n(x(),{tagName:"tfoot"});var $o=()=>n(x(),{tagName:"tr"});var Vo=()=>n(x(),{tagName:"th",childrenType:"text",textContent:{value:"Header",binding:null},style:{default:{padding:"8px","text-align":"left","font-weight":"bold"}}});var Uo=()=>n(x(),{tagName:"td",childrenType:"text",textContent:{value:"Cell",binding:null},style:{default:{padding:"8px"}}});var Ne={};A(Ne,{blockquote:()=>Xo,br:()=>an,code:()=>Zo,em:()=>tn,hr:()=>nn,label:()=>Jo,mark:()=>on,p:()=>Ko,pre:()=>Yo,small:()=>rn,span:()=>Qo,strong:()=>en});var Ko=()=>n(h(),{tagName:"p",textContent:{value:"Paragraph text",binding:null},style:{default:{"font-size":"16px","line-height":"1.5",color:"#333333"}}});var Jo=()=>n(h(),{tagName:"label",textContent:{value:"Label text",binding:null},style:{default:{"font-size":"14px","font-weight":"500",color:"#666666"}}});var Qo=()=>n(h(),{tagName:"span",textContent:{value:"",binding:null},style:{default:{"font-size":"16px",color:"#333333"}}});var Xo=()=>n(h(),{tagName:"blockquote",textContent:{value:"Blockquote text",binding:null},style:{default:{"font-size":"16px","line-height":"1.5",color:"#333333","padding-left":"16px","border-left":"3px solid #cccccc"}}});var Yo=()=>n(h(),{tagName:"pre",textContent:{value:"Preformatted text",binding:null},style:{default:{"font-size":"14px","font-family":"monospace","line-height":"1.4",color:"#333333","white-space":"pre"}}});var Zo=()=>n(h(),{tagName:"code",textContent:{value:"code",binding:null},style:{default:{"font-size":"14px","font-family":"monospace",color:"#333333"}}});var en=()=>n(h(),{tagName:"strong",textContent:{value:"Bold text",binding:null},style:{default:{"font-size":"16px","font-weight":"bold",color:"#333333"}}});var tn=()=>n(h(),{tagName:"em",textContent:{value:"Emphasized text",binding:null},style:{default:{"font-size":"16px","font-style":"italic",color:"#333333"}}});var rn=()=>n(h(),{tagName:"small",textContent:{value:"Small text",binding:null},style:{default:{"font-size":"12px",color:"#666666"}}});var on=()=>n(h(),{tagName:"mark",textContent:{value:"Highlighted text",binding:null},style:{default:{"font-size":"16px",color:"#333333","background-color":"#ffff00"}}});var nn=()=>n(u(),{tagName:"hr",anchor:["top","left"],dimensions:["width"],childrenType:"none",style:{default:{top:"0",left:"0",width:"100%",border:"none","border-top":"1px solid #cccccc"}}});var an=()=>n(u(),{tagName:"br",childrenType:"none"});var Fn=()=>({...ce,...de,...fe,...ue,...he,...ge,...ye,...xe,...Ne}),sn=r=>Fn()[r],Bn=r=>!!sn(r);function pn(r){return Bn(r)?sn(r)():new Error(`Element ${r} not found`)}function mn(r,e={}){return J(r,e)}var ln=()=>n(k(),{name:null,type:"instance",component:null,library:null,props:[],slots:[],layout:"none",draggable:!0,resizable:!0,selectable:!0,locked:[],anchor:["top","left"],dimensions:["width","height"],childrenType:"children"});function cn(r,e){return n(ln(),{component:r,library:e})}var L=()=>n(k(),{type:"template",tagName:"div",props:{},template:[],style:{default:{top:"0",left:"0",margin:"0",width:"100px",height:"100px"}}});var dn=()=>n(L(),{name:"rectangle",props:{fill:{type:"color",default:"black"},stroke:{type:"color",default:"black"},strokeWidth:{type:"cssNumber",default:"1px",units:["px","rem","em","%"]}},context:{},template:["svg",{xmlns:"http://www.w3.org/2000/svg",style:"width: 100%; height: 100%; top: 0; left: 0; position: absolute;"},[["rect",{x:"0",y:"0",width:"100%",height:"100%",fill:{ref:"fill"}}]]]});var fn=()=>n(L(),{name:"rounded_rectangle",props:{rx:{type:"cssNumber",default:"10px",units:["px","rem","em","%"]},ry:{type:"cssNumber",default:"10px",units:["px","rem","em","%"]},fill:{type:"color",default:"black"},stroke:{type:"color",default:"black"},strokeWidth:{type:"cssNumber",default:"1px",units:["px","rem","em","%"]},width:{type:"cssNumber",default:"100px",units:["px","rem","em","%"]},height:{type:"cssNumber",default:"100px",units:["px","rem","em","%"]}},context:{},template:["svg",{xmlns:"http://www.w3.org/2000/svg",style:"width: 100%; height: 100%;"},[["rect",{x:"0",y:"0",width:"100%",height:"100%",fill:{ref:"fill"},rx:{ref:"rx"},ry:{ref:"ry"}}]]]});var un=()=>n(defaults(),{name:"ellipse",props:{fill:{type:"color",default:"black"},stroke:{type:"color",default:"black"},strokeWidth:{type:"cssNumber",default:"1px",units:["px","rem","em","%"]}},context:{},template:["svg",{xmlns:"http://www.w3.org/2000/svg",style:"width: 100%; height: 100%; top: 0; left: 0; position: absolute;",preserveAspectRatio:"none"},[["svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",top:"0",left:"0",preserveAspectRatio:"none"},[["ellipse",{cx:"50px",cy:"50px",rx:"50px",ry:"50px",fill:{ref:"fill"},strokeWidth:{ref:"strokeWidth"}}]]]]]},base());var hn=()=>n(L(),{name:"triangle",props:{fill:{type:"color",default:"black"},stroke:{type:"color",default:"black"},strokeWidth:{type:"cssNumber",default:"1px",units:["px","rem","em","%"]}},context:{},template:["svg",{xmlns:"http://www.w3.org/2000/svg",style:"width: 100%; height: 100%; top: 0; left: 0; position: absolute;",preserveAspectRatio:"none"},[["svg",{viewBox:"0 0 100 100",width:"100%",height:"100%",top:"0",left:"0",preserveAspectRatio:"none"},[["polygon",{points:"50,0 100,100 0,100",fill:{ref:"fill"},strokeWidth:{ref:"strokeWidth"}}]]]]]});var Ln=()=>({rectangle:dn,roundedRectangle:fn,ellipse:un,triangle:hn}),gn=r=>Ln()[r],zn=r=>!!gn(r);function yn(r){return zn(r)?n(gn(r)()):new Error(`Graphic ${r} not found`)}var xn=()=>n(k(),{childrenType:"*",bounds:{width:0,height:0,x:0,y:0}});var Nn=()=>n(xn(),{name:"",type:"component",library:"local",props:[],emits:[],data:[],children:[]});function wn(r=[],e="",t=null){return n(Nn(),{children:r,name:e,viewport:t})}var bn=()=>({__version:1,type:"animation",scope:"node",name:null,duration:300,easing:"ease",fill:"none",direction:"normal",iterations:1,delay:0,endDelay:0,iterationStart:0,composite:"replace",keyframes:[]});function vn(r={}){let e=bn();return{...e,scope:r.scope??e.scope,name:r.name??e.name,duration:r.duration??e.duration,easing:r.easing??e.easing,fill:r.fill??e.fill,direction:r.direction??e.direction,iterations:r.iterations??e.iterations,delay:r.delay??e.delay,endDelay:r.endDelay??e.endDelay,iterationStart:r.iterationStart??e.iterationStart,composite:r.composite??e.composite,keyframes:r.keyframes??e.keyframes}}var Wn=()=>n(k(),{type:"slot",tagName:"slot",anchor:["top","left"],dimensions:["width","height"],draggable:!0,resizable:!1,selectable:!0,locked:[],childrenType:"children",style:{default:{top:"0",left:"0",width:"100px",height:"80px","min-width":"40px","min-height":"40px"}},attributes:[],events:[],className:[{name:"slot",mode:"value",value:!0,binding:null,computed:null,code:null,error:null,system:!0}],states:[],lifecycle:[],animations:[]});function Cn(r="Slot 1"){return n(Wn(),{name:r})}function _n(r,{shape:e,tagName:t,viewport:o,width:a,height:i,name:p,component:s,library:c,children:d,...y}){switch(r){case"component":return wn(d,p,o);case"instance":return cn(s,c);case"frame":case"viewport":return mn(o,{width:a,height:i,name:p});case"element":return pn(t);case"graphic":return yn(e);case"animation":return vn({name:p,...y});case"slot":return Cn(p)}}function qn(r,e){return _n(r,e)}var Sn=[{type:"element",displayName:"Fieldset",category:"form",swapGroup:null,keywords:["form"],tagName:"fieldset"},{type:"element",displayName:"Legend",category:"form",swapGroup:null,keywords:["form"],tagName:"legend"},{type:"element",displayName:"Progress",category:"form",swapGroup:null,keywords:["form"],tagName:"progress"},{type:"element",displayName:"Meter",category:"form",swapGroup:null,keywords:["form"],tagName:"meter"}];var kn=[{type:"element",displayName:"Heading 1",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h1"},{type:"element",displayName:"Heading 2",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h2"},{type:"element",displayName:"Heading 3",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h3"},{type:"element",displayName:"Heading 4",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h4"},{type:"element",displayName:"Heading 5",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h5"},{type:"element",displayName:"Heading 6",keywords:["headings"],category:"headings",swapGroup:"headings",tagName:"h6"}];var Dn=[{type:"element",displayName:"Radio",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"radio"},{type:"element",displayName:"Text",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"text"},{type:"element",displayName:"Checkbox",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"checkbox"},{type:"element",displayName:"Phone",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"phone"},{type:"element",displayName:"Email",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"email"},{type:"element",displayName:"Password",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"password"},{type:"element",displayName:"Select",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"select"},{type:"element",displayName:"Textarea",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"textarea"},{type:"element",displayName:"Number",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"number"},{type:"element",displayName:"Date",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"date"},{type:"element",displayName:"Range",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"range"},{type:"element",displayName:"File Upload",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"file"},{type:"element",displayName:"Search",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"search"},{type:"element",displayName:"Color Picker",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"color"},{type:"element",displayName:"Hidden",category:"inputs",swapGroup:null,keywords:["inputs"],tagName:"hidden"}];var Mn=[{type:"element",displayName:"Button",category:"interactive",swapGroup:"interactive",keywords:["interactive"],tagName:"button"},{type:"element",displayName:"Link",category:"interactive",swapGroup:"interactive",keywords:["interactive"],tagName:"a"},{type:"element",displayName:"Details",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"details"},{type:"element",displayName:"Summary",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"summary"},{type:"element",displayName:"Dialog",category:"interactive",swapGroup:null,keywords:["interactive"],tagName:"dialog"}];var Tn=[{type:"element",displayName:"Aside",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"aside"},{type:"element",displayName:"Footer",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"footer"},{type:"element",displayName:"Form",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"form"},{type:"element",displayName:"Header",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"header"},{type:"element",displayName:"Main",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"main"},{type:"element",displayName:"Section",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"section"},{type:"element",displayName:"Article",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"article"},{type:"element",displayName:"Nav",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"nav"},{type:"element",displayName:"Div",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"div"},{type:"element",displayName:"Template",category:"layout",swapGroup:"layout",keywords:["layout"],tagName:"template"}];var En=[{type:"element",displayName:"Ordered List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"ol"},{type:"element",displayName:"Unordered List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"ul"},{type:"element",displayName:"List Item",category:"lists",swapGroup:null,keywords:["lists"],tagName:"li"},{type:"element",displayName:"Definition List",category:"lists",swapGroup:"list-container",keywords:["lists"],tagName:"dl"},{type:"element",displayName:"Definition Term",category:"lists",swapGroup:null,keywords:["lists"],tagName:"dt"},{type:"element",displayName:"Definition Description",category:"lists",swapGroup:null,keywords:["lists"],tagName:"dd"}];var An=[{type:"element",displayName:"Image",category:"media",swapGroup:null,keywords:["media"],tagName:"img"},{type:"element",displayName:"Video",category:"media",swapGroup:null,keywords:["media"],tagName:"video"},{type:"element",displayName:"Audio",category:"media",swapGroup:null,keywords:["media"],tagName:"audio"},{type:"element",displayName:"Iframe",category:"media",swapGroup:null,keywords:["media"],tagName:"iframe"},{type:"element",displayName:"Figure",category:"media",swapGroup:null,keywords:["media"],tagName:"figure"},{type:"element",displayName:"Figcaption",category:"media",swapGroup:null,keywords:["media"],tagName:"figcaption"}];var On=[{type:"element",displayName:"Table",category:"tables",swapGroup:null,keywords:["tables"],tagName:"table"},{type:"element",displayName:"Table Head",category:"tables",swapGroup:null,keywords:["tables"],tagName:"thead"},{type:"element",displayName:"Table Body",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tbody"},{type:"element",displayName:"Table Foot",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tfoot"},{type:"element",displayName:"Table Row",category:"tables",swapGroup:null,keywords:["tables"],tagName:"tr"},{type:"element",displayName:"Table Header Cell",category:"tables",swapGroup:null,keywords:["tables"],tagName:"th"},{type:"element",displayName:"Table Cell",category:"tables",swapGroup:null,keywords:["tables"],tagName:"td"}];var Gn=[{type:"element",displayName:"Paragraph",category:"text",swapGroup:"text",keywords:["text"],tagName:"p"},{type:"element",displayName:"Label",category:"text",swapGroup:"text",keywords:["text"],tagName:"label"},{type:"element",displayName:"Span",category:"text",swapGroup:"text",keywords:["text"],tagName:"span"},{type:"element",displayName:"Blockquote",category:"text",swapGroup:null,keywords:["text"],tagName:"blockquote"},{type:"element",displayName:"Preformatted",category:"text",swapGroup:null,keywords:["text"],tagName:"pre"},{type:"element",displayName:"Code",category:"text",swapGroup:"text",keywords:["text"],tagName:"code"},{type:"element",displayName:"Strong",category:"text",swapGroup:"text",keywords:["text"],tagName:"strong"},{type:"element",displayName:"Emphasis",category:"text",swapGroup:"text",keywords:["text"],tagName:"em"},{type:"element",displayName:"Small",category:"text",swapGroup:"text",keywords:["text"],tagName:"small"},{type:"element",displayName:"Mark",category:"text",swapGroup:null,keywords:["text"],tagName:"mark"},{type:"element",displayName:"Horizontal Rule",category:"text",swapGroup:null,keywords:["text","divider"],tagName:"hr"},{type:"element",displayName:"Line Break",category:"text",swapGroup:null,keywords:["text"],tagName:"br"}];var In=[{type:"slot",displayName:"Slot",category:"special",keywords:["slot","placeholder","component","template"],tagName:"slot"}];var $n=[...Tn,...kn,...Dn,...Mn,...En,...An,...Gn,...Sn,...On,...In];var Vn=[{displayName:"Rectangle",keywords:["rectangle"],category:"shapes",shape:"rectangle"},{displayName:"Rounded Rectangle",keywords:["rounded","rectangle"],category:"shapes",shape:"roundedRectangle"},{displayName:"Ellipse",keywords:["ellipse"],category:"shapes",shape:"ellipse"},{displayName:"Triangle",keywords:["triangle"],category:"shapes",shape:"triangle"}];var Xx=[Nt,vt,kt,Et,At,Pt,It,jt,Ht,_t,qt,Vt,Kt,Jt,Zt,er,tr,rr,ir,pr,mr,lr,dr,ur,xr,Nr,br,Sr,Tr,Or,jr,Br,Lr];export{Nt as a,vt as b,kt as c,Et as d,At as e,It as f,Pt as g,jt as h,_ as i,Ht as j,zt as k,pe as l,_t as m,qt as n,Vt as o,Kt as p,Jt as q,Zt as r,er as s,tr as t,rr as u,ir as v,pr as w,mr as x,lr as y,dr as z,ur as A,xr as B,Nr as C,br as D,Sr as E,Tr as F,Or as G,jr as H,Br as I,Lr as J,qn as K,$n as L,Vn as M,Xx as N};
@@ -0,0 +1 @@
1
+ import{a as s,b as a}from"./chunk-IG2Y3H6O.js";import{b as p}from"./chunk-HE7IQLGK.js";import{a as l}from"./chunk-Z3M6DQKZ.js";function u(){return{layout:"none",draggable:!0,resizable:!0,selectable:!0,locked:[],anchor:[],dimensions:[],expandedStyles:[],childrenType:"children"}}function m(e,o){return e?o?e.filter(t=>!o.includes(t)):e:[]}function y(e,o,t){let r=e.get([o,"anchor"]),n=m(r,t);return n.length&&s(e,o,n),e.set([o,"anchor"],t),!0}function h(e,o){return e.remove([o,".position"])}function c(e,o,t,r){if(!t||typeof t!="object")return;let n=Object.keys(t).sort();for(let f of n){let i=t[f];switch(f){case"style":{let b=t?.anchor;p(e,o,i,{breakpoint:r,anchor:b}),h(e,o);break}case"bounds":l(e,o,i);break;case"anchor":y(e,o,i);break;default:e.set([o,f],i);break}}}function T(e,o,t={}){let r={...u(),...t};for(let n of Object.keys(r))e.set([o,n],r[n])}function w(e,o){let t=u();for(let r of Object.keys(t))e.set([o,r],t[r]);e.set([o,"hidden"],void 0)}function d(e,o){let t=e.get([o,"layout"]);if(t&&t!=="none")return t;let r=e.get([o,"style","default","display"]);return r==="flex"||r==="grid"?r:"none"}var g=new Set(["app","temp","components"]);function x(e){return g.has(e)}function G(e,o,t){if(x(t)||e.remove([o,"bounds"]),d(e,t)!=="none"){a(e,o),c(e,o,{anchor:[],dimensions:[]});return}let n=e.get([o,"anchor"]);(!n||!n.length)&&c(e,o,{anchor:["top","left"],dimensions:["width","height"]})}export{h as a,c as b,T as c,w as d,G as e};
@@ -0,0 +1 @@
1
+ import{a as l}from"./chunk-J5QMLA3Z.js";import{a as s}from"./chunk-IWTWZA3T.js";import{a as c}from"./chunk-TPCJQIUG.js";import{e as i}from"./chunk-4Q5R44ZZ.js";function x(o,r,n,t){let e=o.get([r]),f=e?.type;if(!e||!(f==="frame"||f==="component"||f==="viewport"))return!0;if(t==="instance")return!1;let m=e.type==="component";if(t==="root"||t==="temp")return!m;if(t==="after"||t==="before"){let p=s(o,n);return m?p==="components":p==="root"||p==="temp"}return t==="firstChildOf"||t==="lastChildOf"?m?n==="components":n==="app"||n==="temp":!1}function C(o,r){return o.update(["app","children"],(n=[])=>n.indexOf(r)===-1?[...n,r]:n),i(o,r,"app"),!0}function z(o,r,n){if(!c(o,n)||!c(o,r))return;let t=o.get([r,"ex"])??o.get([r,"type"]);if(l(o,n,t)){if(!x(o,r,n,"lastChildOf")){C(o,r);return}return o.update([n,"children"],(e=[])=>{let f=e.indexOf(r);if(f!==-1){let u=[...e];return u.splice(f,1),[...u,r]}return[...e,r]}),i(o,r,n),!0}}export{x as a,C as b,z as c};
@@ -0,0 +1 @@
1
+ import{a as wt,d as pe,e as bt}from"./chunk-ULVFWUAU.js";import{e as ye,f as t,g as h,h as l,i as a}from"./chunk-UCLSDDOL.js";var w={HELLO:1,WELCOME:2,DENY:3,EVENT:4,REQUEST:5,REPLY:6,ERROR:7,SUBSCRIBE:8,UNSUB:9,PING:10,PONG:11},cr=Object.fromEntries(Object.entries(w).map(([r,i])=>[i,r])),Yt=1,p={UNAUTHORIZED:"UNAUTHORIZED",FORBIDDEN:"FORBIDDEN",PROTOCOL_MISMATCH:"PROTOCOL_MISMATCH",HANDSHAKE_TIMEOUT:"HANDSHAKE_TIMEOUT",HANDSHAKE_REQUIRED:"HANDSHAKE_REQUIRED",PAYLOAD_TOO_LARGE:"PAYLOAD_TOO_LARGE",MALFORMED:"MALFORMED",SERVER_ERROR:"SERVER_ERROR"},R={NORMAL:1e3,GOING_AWAY:1001,UNAUTHORIZED:4001,FORBIDDEN:4003,HANDSHAKE_TIMEOUT:4008,PROTOCOL_MISMATCH:4010,PAYLOAD_TOO_LARGE:4009,BACKPRESSURE:4011,HEARTBEAT_TIMEOUT:4012},fr={[p.UNAUTHORIZED]:R.UNAUTHORIZED,[p.FORBIDDEN]:R.FORBIDDEN,[p.PROTOCOL_MISMATCH]:R.PROTOCOL_MISMATCH,[p.HANDSHAKE_TIMEOUT]:R.HANDSHAKE_TIMEOUT,[p.HANDSHAKE_REQUIRED]:R.HANDSHAKE_TIMEOUT,[p.PAYLOAD_TOO_LARGE]:R.PAYLOAD_TOO_LARGE,[p.MALFORMED]:R.PROTOCOL_MISMATCH,[p.SERVER_ERROR]:R.GOING_AWAY},ht=1e6,Gt=new Set(Object.values(w)),Rt=1,Oe=typeof Buffer<"u",Lt=Oe?null:new TextEncoder;function qt(r){return r==null?!1:!!(Oe&&Buffer.isBuffer(r)||r instanceof ArrayBuffer||ArrayBuffer.isView(r))}function Wt(r){return r instanceof Uint8Array?r:r instanceof ArrayBuffer?new Uint8Array(r):ArrayBuffer.isView(r)?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):r}function St(r){return Oe?Buffer.byteLength(r,"utf8"):Lt.encode(r).length}function Vt(r){return Oe?Buffer.from(r.buffer,r.byteOffset,r.byteLength):r}function Kt(r,i="HANDLER_ERROR"){return r==null?{message:"Unknown error",code:i}:typeof r=="string"?{message:r,code:i}:{message:typeof r.message=="string"?r.message:String(r),code:r.code||i}}function Jt(r){if(r instanceof Error)return r;let i=r?.message??r?.reason??(typeof r=="string"?r:"Unknown error"),e=new Error(i);return r?.code&&(e.code=r.code),e}function ve(r,i=null,e=null,s=null,n=null,{maxBytes:o=ht}={}){let u=[r,i,e,s,n];for(;u.length>1&&(u[u.length-1]===null||u[u.length-1]===void 0);)u.pop();let c=[];if(Array.isArray(s))for(let f=0;f<s.length;f++)qt(s[f])&&c.push(f);return c.length===0?Zt(u,o):Qt(u,s,c,o)}function Zt(r,i){let e;try{e=JSON.stringify(r)}catch(n){let o=new Error(`Frame payload is not JSON-serializable: ${n.message}`);throw o.code="NOT_SERIALIZABLE",o}if(e===void 0){let n=new Error("Frame payload is not JSON-serializable");throw n.code="NOT_SERIALIZABLE",n}let s=St(e);if(s>i){let n=new Error(`Frame of ${s} bytes exceeds the ${i} byte limit`);throw n.code=p.PAYLOAD_TOO_LARGE,n}return e}function Qt(r,i,e,s){let n=[],o=i.slice();for(let M=0;M<e.length;M++){let ge=e[M],Et=Wt(i[ge]);n.push(Et),o[ge]={__bin:M,byteLength:Et.byteLength}}let u=r.slice();u[3]=o;let c;try{c=JSON.stringify(u)}catch(M){let ge=new Error(`Frame payload is not JSON-serializable: ${M.message}`);throw ge.code="NOT_SERIALIZABLE",ge}let f=Oe?Buffer.from(c,"utf8"):Lt.encode(c),y=0;for(let M of n)y+=M.byteLength;let b=5+f.byteLength+y;if(b>s){let M=new Error(`Frame of ${b} bytes exceeds the ${s} byte limit`);throw M.code=p.PAYLOAD_TOO_LARGE,M}let g=new Uint8Array(b),me=new DataView(g.buffer);g[0]=Rt,me.setUint32(1,f.byteLength,!1),g.set(f,5);let Ze=5+f.byteLength;for(let M of n)g.set(M,Ze),Ze+=M.byteLength;return g}function Xt(r,{maxBytes:i=ht}={}){return r==null?{ok:!1,code:p.MALFORMED,reason:"Empty frame"}:(typeof r=="string"?r.charCodeAt(0):r instanceof ArrayBuffer?new Uint8Array(r,0,1)[0]:r[0]??void 0)===Rt?tr(r,i):er(r,i)}function er(r,i){let e=r;if(typeof e!="string")try{e=e.toString("utf8")}catch{return{ok:!1,code:p.MALFORMED,reason:"Frame is not decodable text"}}let s=St(e);if(s>i)return{ok:!1,code:p.PAYLOAD_TOO_LARGE,reason:`Frame of ${s} bytes exceeds the ${i} byte limit`};let n;try{n=JSON.parse(e)}catch{return{ok:!1,code:p.MALFORMED,reason:"Frame is not valid JSON"}}return Mt(n)}function tr(r,i){let e;if(r instanceof Uint8Array)e=r;else if(r instanceof ArrayBuffer)e=new Uint8Array(r);else if(Oe&&Buffer.isBuffer(r))e=new Uint8Array(r.buffer,r.byteOffset,r.byteLength);else return{ok:!1,code:p.MALFORMED,reason:"Binary frame is not a byte source"};let s=e.byteLength;if(s>i)return{ok:!1,code:p.PAYLOAD_TOO_LARGE,reason:`Frame of ${s} bytes exceeds the ${i} byte limit`};if(s<5)return{ok:!1,code:p.MALFORMED,reason:"Binary frame too short"};let n=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(1,!1);if(5+n>s)return{ok:!1,code:p.MALFORMED,reason:"Binary frame header length exceeds frame size"};let o;try{let f=new TextDecoder().decode(e.subarray(5,5+n));o=JSON.parse(f)}catch{return{ok:!1,code:p.MALFORMED,reason:"Binary frame header is not valid JSON"}}let u=Mt(o);if(!u.ok)return u;let c=u.frame.payload;if(Array.isArray(c)){let f=5+n;for(let y=0;y<c.length;y++){let b=c[y];if(b&&typeof b=="object"&&"__bin"in b){let g=b.byteLength;if(f+g>s)return{ok:!1,code:p.MALFORMED,reason:"Binary chunk extends past frame boundary"};c[y]=Vt(e.slice(f,f+g)),f+=g}}}return u}function Mt(r){if(!Array.isArray(r)||r.length===0)return{ok:!1,code:p.MALFORMED,reason:"Frame must be a non-empty array"};let[i,e=null,s=null,n=null,o=null]=r;return Gt.has(i)?e!==null&&typeof e!="string"?{ok:!1,code:p.MALFORMED,reason:"Frame id must be a string or null"}:s!==null&&typeof s!="string"?{ok:!1,code:p.MALFORMED,reason:"Frame event must be a string or null"}:{ok:!0,frame:{type:i,id:e,event:s,payload:n,meta:o}}:{ok:!1,code:p.MALFORMED,reason:`Unknown frame type: ${JSON.stringify(i)}`}}function rr(){let r=globalThis.crypto;if(r&&typeof r.randomUUID=="function")return r.randomUUID();if(r&&typeof r.getRandomValues=="function"){let i=r.getRandomValues(new Uint8Array(16));i[6]=i[6]&15|64,i[8]=i[8]&63|128;let e=[...i].map(s=>s.toString(16).padStart(2,"0")).join("");return`${e.slice(0,8)}-${e.slice(8,12)}-${e.slice(12,16)}-${e.slice(16,20)}-${e.slice(20)}`}return`id-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}var Ot=1,ir=0,sr=new Set([w.REPLY,w.ERROR,w.WELCOME,w.DENY]),D,I,Le,Se,$,Me,N,Ee,T,se,O,ie,nt,Dt,Tt,Qe,vt,nr=(vt=class{constructor(r,{timeoutMs:i=1e3,maxBytes:e=ht,maxBufferedBytes:s=4e6}={}){h(this,O);h(this,D);h(this,I,new Map);h(this,Le,null);h(this,Se,null);h(this,$,null);h(this,Me);h(this,N);h(this,Ee);h(this,T,!1);h(this,se,[]);l(this,D,r),l(this,Me,i),l(this,N,e),l(this,Ee,s)}get closed(){return t(this,T)}get socket(){return t(this,D)}get bufferedAmount(){return t(this,D)?.bufferedAmount??0}get maxBytes(){return t(this,N)}attach(){let r=t(this,D);return r?(typeof r.binaryType=="string"&&(r.binaryType="arraybuffer"),r.onmessage=i=>a(this,O,Dt).call(this,i?.data??i),r.onclose=i=>a(this,O,Qe).call(this,i?.code??R.NORMAL,i?.reason??""),r.onerror=i=>{var s;let e=i instanceof Error?i:new Error(i?.message||"Socket error");(s=t(this,$))==null||s.call(this,e)},r.onopen=()=>a(this,O,nt).call(this),r.readyState===Ot&&a(this,O,nt).call(this),this):this}onFrame(r){return l(this,Le,r),this}onClose(r){return l(this,Se,r),this}onError(r){return l(this,$,r),this}send(r,i=null,e=null,s=null){var o;if(t(this,T))return!1;let n;try{n=ve(r,null,i,e,s,{maxBytes:t(this,N)})}catch(u){return(o=t(this,$))==null||o.call(this,u),!1}return a(this,O,ie).call(this,n)}request(r,i=null,e=null,s=null,n=t(this,Me)){if(t(this,T))return Promise.reject(new Error("Connection is closed"));let o=rr(),u;try{u=ve(r,o,i,e,s,{maxBytes:t(this,N)})}catch(c){return Promise.reject(c)}return new Promise((c,f)=>{let y=setTimeout(()=>{t(this,I).delete(o);let b=new Error(`Request "${i}" timed out after ${n}ms`);b.code="TIMEOUT",f(b)},n);t(this,I).set(o,{resolve:c,reject:f,timer:y}),a(this,O,ie).call(this,u)||(clearTimeout(y),t(this,I).delete(o),f(new Error(`Failed to send request "${i}"`)))})}reply(r,i){if(!r||t(this,T))return!1;let e;try{e=ve(w.REPLY,r,null,i??null,null,{maxBytes:t(this,N)})}catch(s){return this.replyError(r,s)}return a(this,O,ie).call(this,e)}replyWith(r,i,e){var n;if(t(this,T))return!1;let s;try{s=ve(r,i??null,null,e??null,null,{maxBytes:t(this,N)})}catch(o){return(n=t(this,$))==null||n.call(this,o),!1}return a(this,O,ie).call(this,s)}replyError(r,i,e){if(!r||t(this,T))return!1;let s;try{s=ve(w.ERROR,r,null,Kt(i,e),null,{maxBytes:t(this,N)})}catch{return!1}return a(this,O,ie).call(this,s)}close(r=R.NORMAL,i=""){if(!t(this,T)){try{t(this,D)?.close(r,i)}catch{}a(this,O,Qe).call(this,r,i)}}terminate(r=R.GOING_AWAY,i=""){if(typeof t(this,D)?.terminate=="function"){try{t(this,D).terminate()}catch{}a(this,O,Qe).call(this,r,i);return}this.close(r,i)}},D=new WeakMap,I=new WeakMap,Le=new WeakMap,Se=new WeakMap,$=new WeakMap,Me=new WeakMap,N=new WeakMap,Ee=new WeakMap,T=new WeakMap,se=new WeakMap,O=new WeakSet,ie=function(r){var e,s;let i=t(this,D);if(!i)return!1;if(i.readyState===ir)return t(this,se).push(r),!0;if(i.readyState!==Ot)return!1;if(this.bufferedAmount>t(this,Ee))return(e=t(this,$))==null||e.call(this,new Error(`Send buffer exceeded ${t(this,Ee)} bytes`)),this.close(R.BACKPRESSURE,"Send buffer exceeded"),!1;try{return i.send(r),!0}catch(n){return(s=t(this,$))==null||s.call(this,n),!1}},nt=function(){if(!t(this,se).length)return;let r=t(this,se).splice(0);for(let i of r)a(this,O,ie).call(this,i)},Dt=function(r){var s,n;let i=Xt(r,{maxBytes:t(this,N)});if(!i.ok){(s=t(this,$))==null||s.call(this,Object.assign(new Error(i.reason),{code:i.code,malformed:!0}));return}let e=i.frame;if(sr.has(e.type)&&e.id&&t(this,I).has(e.id)){a(this,O,Tt).call(this,e);return}(n=t(this,Le))==null||n.call(this,e)},Tt=function(r){let i=t(this,I).get(r.id);if(i){if(clearTimeout(i.timer),t(this,I).delete(r.id),r.type===w.ERROR||r.type===w.DENY){i.reject(Jt(r.payload));return}i.resolve(r.payload)}},Qe=function(r,i){var s;if(t(this,T))return;l(this,T,!0);let e=t(this,D);e&&(e.onmessage=null,e.onclose=null,e.onerror=null,e.onopen=null);for(let[,n]of t(this,I))clearTimeout(n.timer),n.reject(new Error(`Connection closed (${r}${i?`: ${i}`:""})`));t(this,I).clear(),l(this,se,[]),(s=t(this,Se))==null||s.call(this,{code:r,reason:i})},vt),A,ne,De,B,oe,we,Te,ot,At,or=(At=class{constructor({inject:r=()=>{},onSubscribe:i=null,onUnsubscribe:e=null}={}){h(this,Te);h(this,A,new Map);h(this,ne,[]);h(this,De);h(this,B,!1);h(this,oe,null);h(this,we,null);l(this,De,r),l(this,oe,i),l(this,we,e)}get live(){return t(this,B)}get size(){return t(this,A).size}setLive(r){var i;if(!r)return l(this,B,!1),this;if(t(this,ne).length){let e=t(this,ne).splice(0);for(let{namespace:s,factory:n}of e)a(this,Te,ot).call(this,s,n)}l(this,B,!0);for(let[e,s]of this.entries())(i=t(this,oe))==null||i.call(this,e,s);return this}use(r,...i){for(let e of i.flat()){if(typeof e!="function")throw new Error("use() expects contract factories created with defineContracts");t(this,B)?a(this,Te,ot).call(this,r,e):t(this,ne).push({namespace:r,factory:e})}return this}add(r,{schema:i,subscriber:e,once:s=!1,timeoutMs:n}={}){var u;if(typeof e!="function")throw new Error(`Subscriber for "${r}" must be a function`);t(this,A).has(r)||t(this,A).set(r,new Set);let o={event:r,schema:i,subscriber:e,once:s,timeoutMs:n};return t(this,A).get(r).add(o),t(this,B)&&((u=t(this,oe))==null||u.call(this,r,this.timeoutFor(r))),()=>this.remove(r,e)}remove(r,i){var n,o;let e=t(this,A).get(r);if(!e)return!1;let s=!1;for(let u of e)u.subscriber===i&&(e.delete(u),s=!0);return e.size===0?(t(this,A).delete(r),t(this,B)&&((n=t(this,we))==null||n.call(this,r))):s&&t(this,B)&&((o=t(this,oe))==null||o.call(this,r,this.timeoutFor(r))),s}has(r){return t(this,A).has(r)}timeoutFor(r){let i;for(let e of t(this,A).get(r)??[])e.timeoutMs!==void 0&&(i===void 0||e.timeoutMs>i)&&(i=e.timeoutMs);return i}entries(){return[...t(this,A).keys()].map(r=>[r,this.timeoutFor(r)])}events(){return[...t(this,A).keys()]}clear(){return t(this,A).clear(),l(this,ne,[]),l(this,B,!1),this}async dispatch(r,i=[],e=void 0){var c;let s=t(this,A).get(r);if(!s||s.size===0)return{handled:!1,result:null};let n=Array.isArray(i)?i:[i],o=!1,u;for(let f of[...s]){if(!ar(r,n,f.schema))continue;o=!0,f.once&&s.delete(f);let y=await f.subscriber(...n,e);u===void 0&&y!==void 0&&(u=y)}return s.size===0&&(t(this,A).delete(r),t(this,B)&&((c=t(this,we))==null||c.call(this,r))),{handled:o,result:u??null}}},A=new WeakMap,ne=new WeakMap,De=new WeakMap,B=new WeakMap,oe=new WeakMap,we=new WeakMap,Te=new WeakSet,ot=function(r,i){let e=i._name,s=i(t(this,De));if(!s||typeof s!="object")throw new Error(`Contract factory "${e??"anonymous"}" must return an object`);for(let[n,o]of Object.entries(s)){let{handler:u,schema:c,namespace:f,once:y,timeoutMs:b}=o??{};if(typeof u!="function")throw new Error(`Contract "${e?`${e}:`:""}${n}" is missing a handler function`);let g=[r,f].filter(Boolean).join("/"),me=e?`${e}:${n}`:n,Ze=g?`${g}/${me}`:me;this.add(Ze,{schema:c,subscriber:u,once:y,timeoutMs:b})}},At);function ar(r,i,e){if(e==null||e==="*"||!Array.isArray(e)||e.length===1&&e[0]==="*"||i===void 0)return!0;if(e.length!==i.length)return console.warn(`[socket] "${r}" arity mismatch \u2014 expected ${e.length} argument(s) [${e.join(", ")}], received ${i.length} [${i.map(gt).join(", ")}]`),!1;for(let s=0;s<e.length;s++){let n=e[s];if(n==="*")continue;let o=gt(i[s]);if(n!==o)return console.warn(`[socket] "${r}" argument ${s} type mismatch \u2014 expected ${n}, received ${o}`),!1}return!0}function gt(r){return Array.isArray(r)?"Array":r===null?"null":Object.prototype.toString.call(r).slice(8,-1)}function lr({baseDelay:r=500,maxDelay:i=1e4,jitter:e=.2,maxRetries:s=1/0}={}){let n=0;return{get attempt(){return n},reset(){n=0},next(){if(n>=s)return null;let o=Math.min(r*2**n,i);return n+=1,Math.round(o+o*e*Math.random())}}}var Bt=wt("socketContracts",[Object]),it=4e3,E,v,W,V,C,P,K,ae,le,J,x,he,Be,be,Z,Q,F,st,d,Xe,It,at,et,Nt,Ae,_t,lt,Re,G,tt,q,yr=(st=class extends pe{constructor(){super(...arguments);h(this,d);h(this,E,null);h(this,v,null);h(this,W,null);h(this,V,null);h(this,C,null);h(this,P,!1);h(this,K,!1);h(this,ae,!1);h(this,le,null);h(this,J,null);h(this,x,null);h(this,he,0);h(this,Be,3e4);h(this,be,1e3);h(this,Z,new Map);h(this,Q,null);h(this,F,{connect:new Set,disconnect:new Set,error:new Set})}initialize(i,e={}){l(this,be,e.timeout??1e3),l(this,W,e.url??null),l(this,V,e.auth??null),l(this,v,new or({inject:this.inject,onSubscribe:(s,n)=>t(this,E)?.send(w.SUBSCRIBE,s,n??null),onUnsubscribe:s=>t(this,E)?.send(w.UNSUB,s)})),e.subscriptions?.length&&t(this,v).use(null,...e.subscriptions),t(this,W)&&Promise.resolve(a(this,d,Xe).call(this)).catch(s=>a(this,d,q).call(this,s))}actions(i,e={}){let s={connect:async(n=null,o={})=>{if(a(this,d,et).call(this),l(this,ae,!1),n&&l(this,W,n),o.auth!==void 0&&l(this,V,o.auth),!t(this,W))throw new Error("A URL is required to connect");return await a(this,d,Xe).call(this),s},disconnect:()=>(l(this,ae,!0),a(this,d,et).call(this),a(this,d,Ae).call(this),t(this,v).setLive(!1),t(this,E)?.close(it,"Client disconnected"),l(this,E,null),l(this,P,!1),l(this,C,null),t(this,Z).clear(),s),ready:()=>t(this,P),id:()=>t(this,C),use:(...n)=>(t(this,v).use(null,...n),s),publish:(n,...o)=>(a(this,d,Re).call(this,n,o,null),s),request:(n,...o)=>a(this,d,G).call(this,n,o,null),gather:(n,...o)=>a(this,d,G).call(this,n,o,{gather:!0}),subscribe:(n,o)=>t(this,v).add(n,{subscriber:o}),subscribeOnce:(n,o)=>t(this,v).add(n,{subscriber:o,once:!0}),unsubscribe:(n,o)=>t(this,v).remove(n,o),to:(...n)=>{let o=n.flat();return{publish:(u,...c)=>(a(this,d,Re).call(this,u,c,{to:o}),s),request:(u,...c)=>a(this,d,G).call(this,u,c,{to:o}),gather:(u,...c)=>a(this,d,G).call(this,u,c,{to:o,gather:!0})}},namespace:n=>{let o=u=>n?`${n}/${u}`:u;return{use:(...u)=>(t(this,v).use(n,...u),s),publish:(u,...c)=>(a(this,d,Re).call(this,o(u),c,null),s),request:(u,...c)=>a(this,d,G).call(this,o(u),c,null),gather:(u,...c)=>a(this,d,G).call(this,o(u),c,{gather:!0}),subscribe:(u,c)=>t(this,v).add(o(u),{subscriber:c}),subscribeOnce:(u,c)=>t(this,v).add(o(u),{subscriber:c,once:!0}),unsubscribe:(u,c)=>t(this,v).remove(o(u),c)}},onConnect:n=>a(this,d,tt).call(this,"connect",n),onDisconnect:n=>a(this,d,tt).call(this,"disconnect",n),onError:n=>a(this,d,tt).call(this,"error",n)};return l(this,Q,s),s}uninstall(){l(this,ae,!0),a(this,d,et).call(this),a(this,d,Ae).call(this),t(this,E)?.close(it,"Service uninstalled"),l(this,E,null),t(this,v)?.clear()}},E=new WeakMap,v=new WeakMap,W=new WeakMap,V=new WeakMap,C=new WeakMap,P=new WeakMap,K=new WeakMap,ae=new WeakMap,le=new WeakMap,J=new WeakMap,x=new WeakMap,he=new WeakMap,Be=new WeakMap,be=new WeakMap,Z=new WeakMap,Q=new WeakMap,F=new WeakMap,d=new WeakSet,Xe=async function(){let i=this.config;t(this,E)&&!t(this,E).closed&&t(this,E).close(it,"Reconnecting");let e=globalThis.WebSocket;if(typeof e!="function")throw new Error("No global WebSocket available in this environment");let s=new e(t(this,W)),n=new nr(s,{timeoutMs:t(this,be),maxBytes:i.maxPayloadBytes??1e6});l(this,E,n),n.onFrame(c=>a(this,d,_t).call(this,n,c)),n.onError(c=>a(this,d,q).call(this,c)),n.onClose(({code:c,reason:f})=>a(this,d,It).call(this,n,c,f)),n.attach();let o=typeof t(this,V)=="function"?await t(this,V).call(this):t(this,V),u=await n.request(w.HELLO,null,{version:Yt,auth:o??null},null,i.handshakeTimeoutMs??1e4);if(t(this,E)===n){l(this,C,u?.id??null),l(this,Be,u?.heartbeatMs??3e4),l(this,P,!0),t(this,le)?.reset(),t(this,v).setLive(!0),a(this,d,Nt).call(this);for(let c of t(this,F).connect)try{c(t(this,Q),{id:t(this,C)})}catch(f){a(this,d,q).call(this,f)}return t(this,Q)}},It=function(i,e,s){if(t(this,E)!==i)return;a(this,d,Ae).call(this),l(this,P,!1),l(this,C,null),t(this,Z).clear(),t(this,v).setLive(!1);for(let o of t(this,F).disconnect)try{o({code:e,reason:s},t(this,Q))}catch(u){a(this,d,q).call(this,u)}let n=e===R.UNAUTHORIZED||e===R.FORBIDDEN||e===R.PROTOCOL_MISMATCH;t(this,ae)||n||a(this,d,at).call(this)},at=function(){let i=this.config.reconnect??{};if(i.enabled===!1||t(this,K))return;t(this,le)??l(this,le,lr(i));let e=t(this,le).next();if(e===null){a(this,d,q).call(this,new Error("Reconnect attempts exhausted"));return}l(this,K,!0),l(this,J,setTimeout(async()=>{l(this,J,null);try{await a(this,d,Xe).call(this)}catch(s){a(this,d,q).call(this,s),l(this,K,!1),a(this,d,at).call(this);return}l(this,K,!1)},e))},et=function(){t(this,J)&&clearTimeout(t(this,J)),l(this,J,null),l(this,K,!1),t(this,le)?.reset()},Nt=function(){a(this,d,Ae).call(this),l(this,he,0),l(this,x,setInterval(()=>{if(!(!t(this,E)||t(this,E).closed)){if(t(this,he)>=2){t(this,E).terminate(R.HEARTBEAT_TIMEOUT,"Server stopped responding");return}l(this,he,t(this,he)+1),t(this,E).send(w.PING)}},t(this,Be))),typeof t(this,x).unref=="function"&&t(this,x).unref()},Ae=function(){t(this,x)&&clearInterval(t(this,x)),l(this,x,null)},_t=async function(i,e){switch(e.type){case w.PING:i.send(w.PONG);return;case w.PONG:l(this,he,0);return;case w.SUBSCRIBE:e.payload==null?t(this,Z).delete(e.event):t(this,Z).set(e.event,e.payload);return;case w.DENY:a(this,d,q).call(this,Object.assign(new Error(e.payload?.reason||"Connection denied"),{code:e.payload?.code}));return;case w.EVENT:await t(this,v).dispatch(e.event,e.payload??[],a(this,d,lt).call(this,e));return;case w.REQUEST:{try{let{handled:s,result:n}=await t(this,v).dispatch(e.event,e.payload??[],a(this,d,lt).call(this,e));if(!s){i.replyError(e.id,new Error(`No handler for "${e.event}"`),"NO_HANDLER");return}i.reply(e.id,n)}catch(s){i.replyError(e.id,s)}return}default:return}},lt=function(i){return{id:t(this,C),from:i.meta?.from??null,identity:null,actions:t(this,Q),publish:(e,...s)=>a(this,d,Re).call(this,e,s,null),request:(e,...s)=>a(this,d,G).call(this,e,s,null)}},Re=function(i,e,s){return!t(this,E)||!t(this,P)?(console.warn(`[socket] publish "${i}" dropped \u2014 not connected`),!1):t(this,E).send(w.EVENT,i,e,s)},G=function(i,e,s){return!t(this,E)||!t(this,P)?Promise.reject(new Error(`Not connected \u2014 request "${i}" dropped`)):t(this,E).request(w.REQUEST,i,e,s,t(this,Z).get(i)??t(this,be))},tt=function(i,e){if(typeof e!="function")throw new Error("Listener must be a function");return t(this,F)[i].add(e),()=>t(this,F)[i].delete(e)},q=function(i){if(t(this,F).error.size===0){console.error("[socket] client error:",i?.message??i);return}for(let e of t(this,F).error)try{e(i)}catch{}},ye(st,"manifest",{name:"socket-client",namespace:"socket",version:"2.0.0",description:"Contract-driven WebSocket client",defaults:{url:null,auth:null,timeout:1e3,handshakeTimeoutMs:1e4,subscriptions:[],maxPayloadBytes:1e6,reconnect:{enabled:!0,maxRetries:1/0,baseDelay:500,maxDelay:1e4,jitter:.2}}}),st);var U,k,X,ue,ce,H,Ie,_,Ne,fe,de,_e,$e,Ue,m,$t,ut,L,Ut,ke,Ce,Pe,xe,Fe,He,je,ee,ze,Ye,Ge,qe,kt,Ct,ct,rt=class extends pe{constructor(){super(...arguments);h(this,m);h(this,U,new Map);h(this,k,!0);h(this,X,!0);h(this,ue,!1);h(this,ce,typeof navigator<"u"&&navigator.onLine!==void 0?navigator.onLine:!0);h(this,H,!1);h(this,Ie,!1);h(this,_,Date.now());h(this,Ne,Date.now());h(this,fe,null);h(this,de,null);h(this,_e,6e4);h(this,$e,["mousemove","mousedown","keydown","touchstart","scroll"]);h(this,Ue,null);h(this,ke,()=>{let e=t(this,k);l(this,k,!document.hidden),t(this,k)&&!e?(l(this,_,Date.now()),a(this,m,L).call(this,"visible")):!t(this,k)&&e&&a(this,m,L).call(this,"hidden")});h(this,Ce,()=>{l(this,X,!0),l(this,_,Date.now()),a(this,m,L).call(this,"focus")});h(this,Pe,()=>{l(this,X,!1),a(this,m,L).call(this,"blur")});h(this,xe,()=>{l(this,ue,!0),a(this,m,L).call(this,"suspend",{reason:"freeze"})});h(this,Fe,()=>{l(this,ue,!1),l(this,_,Date.now()),a(this,m,L).call(this,"resume",{reason:"freeze"})});h(this,He,e=>{e.persisted&&(l(this,_,Date.now()),a(this,m,L).call(this,"resume",{reason:"bfcache"}))});h(this,je,e=>{e.persisted&&a(this,m,L).call(this,"suspend",{reason:"bfcache"})});h(this,ee,()=>{t(this,Ie)||(l(this,Ie,!0),a(this,m,L).call(this,"beforeclose"))});h(this,ze,e=>{e.persisted||t(this,ee).call(this)});h(this,Ye,()=>{l(this,ce,!0),a(this,m,L).call(this,"online")});h(this,Ge,()=>{l(this,ce,!1),a(this,m,L).call(this,"offline")});h(this,qe,()=>{l(this,Ne,Date.now()),t(this,H)&&(l(this,H,!1),a(this,m,L).call(this,"active"))})}initialize(){typeof document<"u"&&(l(this,k,!document.hidden),l(this,X,document.hasFocus())),l(this,_,Date.now())}getters(){return{visible:()=>t(this,k),focused:()=>t(this,X),frozen:()=>t(this,ue),online:()=>t(this,ce),idle:()=>t(this,H)}}actions(e,s){return l(this,Ue,s||{}),a(this,m,Ut).call(this,t(this,Ue)),{on:(n,o)=>a(this,m,$t).call(this,n,o),off:(n,o)=>a(this,m,ut).call(this,n,o),isVisible:()=>t(this,k),isFocused:()=>t(this,X),isFrozen:()=>t(this,ue),isOnline:()=>t(this,ce),isIdle:()=>t(this,H),lastActiveTimestamp:()=>t(this,_),destroy:()=>a(this,m,ct).call(this)}}destroy(){a(this,m,ct).call(this)}};U=new WeakMap,k=new WeakMap,X=new WeakMap,ue=new WeakMap,ce=new WeakMap,H=new WeakMap,Ie=new WeakMap,_=new WeakMap,Ne=new WeakMap,fe=new WeakMap,de=new WeakMap,_e=new WeakMap,$e=new WeakMap,Ue=new WeakMap,m=new WeakSet,$t=function(e,s){return t(this,U).has(e)||t(this,U).set(e,new Set),t(this,U).get(e).add(s),()=>a(this,m,ut).call(this,e,s)},ut=function(e,s){let n=t(this,U).get(e);n&&(n.delete(s),n.size===0&&t(this,U).delete(e))},L=function(e,s){let n=t(this,U).get(e);if(n)for(let o of n)o(s)},Ut=function(e){if(typeof document<"u"&&(e.visibility!==!1&&document.addEventListener("visibilitychange",t(this,ke)),e.freeze!==!1&&(document.addEventListener("freeze",t(this,xe)),document.addEventListener("resume",t(this,Fe)))),typeof window<"u"&&(e.focus&&(window.addEventListener("focus",t(this,Ce)),window.addEventListener("blur",t(this,Pe))),e.freeze!==!1&&(window.addEventListener("pageshow",t(this,He)),window.addEventListener("pagehide",t(this,je))),e.close!==!1&&(window.addEventListener("beforeunload",t(this,ee)),window.addEventListener("pagehide",t(this,ze)),window.addEventListener("unload",t(this,ee))),e.network&&(window.addEventListener("online",t(this,Ye)),window.addEventListener("offline",t(this,Ge)))),e.sleepDetection?.enabled!==!1){let s=e.sleepDetection?.threshold||1e4;a(this,m,Ct).call(this,s)}e.idle?.enabled&&a(this,m,kt).call(this,e.idle.threshold||6e4)},ke=new WeakMap,Ce=new WeakMap,Pe=new WeakMap,xe=new WeakMap,Fe=new WeakMap,He=new WeakMap,je=new WeakMap,ee=new WeakMap,ze=new WeakMap,Ye=new WeakMap,Ge=new WeakMap,qe=new WeakMap,kt=function(e){if(l(this,_e,e),typeof document<"u")for(let n of t(this,$e))document.addEventListener(n,t(this,qe),{passive:!0,capture:!0});let s=Math.min(e/2,5e3);l(this,de,setInterval(()=>{if(t(this,H))return;Date.now()-t(this,Ne)>=t(this,_e)&&(l(this,H,!0),a(this,m,L).call(this,"idle"))},s))},Ct=function(e){let s=Math.min(e/2,5e3);l(this,fe,setInterval(()=>{let n=Date.now(),o=n-t(this,_);o>e&&(a(this,m,L).call(this,"suspend",{reason:"sleep",gap:o}),a(this,m,L).call(this,"resume",{reason:"sleep",gap:o})),l(this,_,n)},s))},ct=function(){if(typeof document<"u"){document.removeEventListener("visibilitychange",t(this,ke)),document.removeEventListener("freeze",t(this,xe)),document.removeEventListener("resume",t(this,Fe));for(let e of t(this,$e))document.removeEventListener(e,t(this,qe),{capture:!0})}typeof window<"u"&&(window.removeEventListener("focus",t(this,Ce)),window.removeEventListener("blur",t(this,Pe)),window.removeEventListener("pageshow",t(this,He)),window.removeEventListener("pagehide",t(this,je)),window.removeEventListener("beforeunload",t(this,ee)),window.removeEventListener("pagehide",t(this,ze)),window.removeEventListener("unload",t(this,ee)),window.removeEventListener("online",t(this,Ye)),window.removeEventListener("offline",t(this,Ge))),t(this,fe)&&(clearInterval(t(this,fe)),l(this,fe,null)),t(this,de)&&(clearInterval(t(this,de)),l(this,de,null)),t(this,U).clear()},ye(rt,"manifest",{name:"PageLifecycle",namespace:"pageLifecycle",version:"1.0.0",description:"Browser lifecycle detection for tab visibility, focus, and sleep/wake"});function Pt(r){return r instanceof ArrayBuffer||r instanceof MessagePort||typeof ImageBitmap<"u"&&r instanceof ImageBitmap||typeof OffscreenCanvas<"u"&&r instanceof OffscreenCanvas||typeof ReadableStream<"u"&&r instanceof ReadableStream||typeof WritableStream<"u"&&r instanceof WritableStream||typeof TransformStream<"u"&&r instanceof TransformStream}function Ft(r){return Pt(r)?[r]:Array.isArray(r)?r.filter(Pt):[]}var dt="__wc",We,Ve,Ke,xt,hr=(xt=class{constructor(r,i,e="*"){h(this,We);h(this,Ve);h(this,Ke);if(!i||typeof i.postMessage!="function")throw new Error(`Window "${r}" target must have postMessage`);l(this,We,r),l(this,Ve,i),l(this,Ke,e)}get name(){return t(this,We)}post(r,i,e,s){let n={[dt]:!0,type:r,topic:i,payload:e};s&&(n.rid=s);let o=Ft(e);t(this,Ve).postMessage(n,t(this,Ke),o.length?o:void 0)}},We=new WeakMap,Ve=new WeakMap,Ke=new WeakMap,xt),j,z,Y,te,re,Je,ft,S,Ht,mt,jt,yt,pt,Dr=(ft=class extends pe{constructor(){super(...arguments);h(this,S);h(this,j,new Map);h(this,z,new Map);h(this,Y,new Map);h(this,te,null);h(this,re,null);h(this,Je,1e3)}initialize(i,e){l(this,Je,e.timeout??1e3);let s=e.host??globalThis.window;s?.addEventListener&&a(this,S,Ht).call(this,s)}actions(){let i={register:(e,s,n)=>{let o=new hr(e,s,n);return t(this,j).set(e,o),i},unregister:e=>(t(this,j).delete(e),i),to:e=>{let s=t(this,j).get(e);if(!s)throw new Error(`WindowBridge: no target registered as "${e}"`);return{publish:(n,...o)=>{s.post("pub",n,o)},request:(n,...o)=>a(this,S,pt).call(this,n,o,[s])}},publish:(e,...s)=>{for(let n of t(this,j).values())n.post("pub",e,s)},request:(e,...s)=>{let n=[...t(this,j).values()];return n.length===0?Promise.reject(new Error(`WindowBridge: no targets registered \u2014 request "${e}" dropped`)):a(this,S,pt).call(this,e,s,n)},subscribe:(e,s)=>a(this,S,yt).call(this,e,s,!1),subscribeOnce:(e,s)=>a(this,S,yt).call(this,e,s,!0),destroy:()=>{a(this,S,mt).call(this),t(this,j).clear(),t(this,z).clear();for(let e of t(this,Y).values())clearTimeout(e.timer),e.reject(new Error("WindowBridge destroyed"));t(this,Y).clear()}};return i}},j=new WeakMap,z=new WeakMap,Y=new WeakMap,te=new WeakMap,re=new WeakMap,Je=new WeakMap,S=new WeakSet,Ht=function(i){a(this,S,mt).call(this),l(this,te,i),l(this,re,e=>a(this,S,jt).call(this,e)),t(this,te).addEventListener("message",t(this,re))},mt=function(){t(this,te)&&t(this,re)&&t(this,te).removeEventListener("message",t(this,re)),l(this,te,null),l(this,re,null)},jt=function(i){let e=i.data;if(!e||e[dt]!==!0)return;let{type:s,topic:n,payload:o,rid:u}=e;if(s==="res"){let f=t(this,Y).get(u);f&&(t(this,Y).delete(u),clearTimeout(f.timer),f.resolve(o));return}let c=t(this,z).get(n);if(!(!c||c.size===0))for(let f of c){let y=f.handler(...Array.isArray(o)?o:[]);s==="req"&&u&&i.source&&Promise.resolve(y).then(b=>{let g=Ft(b),me={[dt]:!0,type:"res",rid:u,payload:b};try{i.source.postMessage(me,i.origin||"*",g.length?g:void 0)}catch{}}),f.once&&c.delete(f)}},yt=function(i,e,s){if(typeof e!="function")throw new Error("Handler must be a function");t(this,z).has(i)||t(this,z).set(i,new Set);let n={handler:e,once:s};return t(this,z).get(i).add(n),()=>t(this,z).get(i)?.delete(n)},pt=function(i,e,s){return new Promise((n,o)=>{let u=bt(),c=setTimeout(()=>{t(this,Y).delete(u),o(new Error(`WindowBridge: request "${i}" timed out`))},t(this,Je));t(this,Y).set(u,{resolve:n,reject:o,timer:c});for(let f of s)f.post("req",i,e,u)})},ye(ft,"manifest",{name:"WindowBridge",dependencies:[],version:"1.0.0",namespace:"windowBridge",description:"Window postMessage abstraction with pub/sub and request/response",defaults:{timeout:1e3,host:null}}),ft);function zt(r){if(typeof window<"u"){let e=window.location.protocol==="https:"?"wss:":"ws:",s=window.location.host;if(r.basePath)try{let o=(r.basePath.startsWith("http")?new URL(r.basePath).pathname:r.basePath).replace(/\/$/,"");if(o)return`${e}//${s}${o}/socket`}catch{}return r.projectId?`${e}//${s}/p/${r.projectId}/socket`:`${e}//${s}/socket`}return`ws://localhost:${r.port??3e3}/socket`}function Cr(r,{auth:i=null,reconnect:e={enabled:!0}}={}){return{url:zt(r),auth:i,reconnect:e,maxPayloadBytes:5e7}}var Fr=Bt("stores",r=>{let[i,e]=r("state","socket"),s=new Map,n=(c,f)=>{f==null?s.delete(c):s.set(c,JSON.stringify(f))},o=(c,f)=>f==null?!s.has(c):s.get(c)===JSON.stringify(f);for(let[c,f]of Object.entries(i.get([".stores"])??{}))n(c,f);let u=c=>{if(c)for(let[f,y]of Object.entries(c))n(f,y),y?i.set([".stores",f],y):i.remove([".stores",f])};return i.matcher.createMatcher([".stores"],c=>{if(!c)return;let f={},y=!1;for(let[b,g]of Object.entries(c))o(b,g)||(n(b,g),f[b]=g,y=!0);y&&e.publish("stores:sync",f)}),e.onConnect(async()=>{try{u(await e.request("stores:requestSnapshot")??{})}catch{}}),{set:{handler:c=>u(c)}}});export{Bt as a,yr as b,rt as c,Dr as d,Cr as e,Fr as f};