@splinetool/runtime 2.0.57 → 2.0.59

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 (292) hide show
  1. package/build/runtime-aiAssistant-WCXMKTQK.js +1 -0
  2. package/build/runtime-aiAssistant-WCXMKTQK.js.br +0 -0
  3. package/build/runtime-aiAssistant-WCXMKTQK.js.gz +0 -0
  4. package/build/runtime-apiServices-DRMLTDTB.js +1 -0
  5. package/build/runtime-apiServices-DRMLTDTB.js.br +0 -0
  6. package/build/runtime-apiServices-DRMLTDTB.js.gz +0 -0
  7. package/build/{runtime-chunk-H6NICSNO.js → runtime-chunk-2HC35I2G.js} +1 -1
  8. package/build/runtime-chunk-2HC35I2G.js.br +0 -0
  9. package/build/runtime-chunk-2HC35I2G.js.gz +0 -0
  10. package/build/{runtime-chunk-TICMTK6A.js → runtime-chunk-3HFXKICM.js} +1 -1
  11. package/build/runtime-chunk-3HFXKICM.js.br +0 -0
  12. package/build/runtime-chunk-3HFXKICM.js.gz +0 -0
  13. package/build/{runtime-chunk-LHMA4VIW.js → runtime-chunk-4EZ7O4A2.js} +1 -1
  14. package/build/runtime-chunk-4EZ7O4A2.js.br +0 -0
  15. package/build/runtime-chunk-4EZ7O4A2.js.gz +0 -0
  16. package/build/{runtime-chunk-AOZCO4VY.js → runtime-chunk-5VGFSUYB.js} +1 -1
  17. package/build/runtime-chunk-5VGFSUYB.js.br +0 -0
  18. package/build/runtime-chunk-5VGFSUYB.js.gz +0 -0
  19. package/build/{runtime-chunk-EG55REW7.js → runtime-chunk-7LHQNWDR.js} +1 -1
  20. package/build/runtime-chunk-7LHQNWDR.js.br +0 -0
  21. package/build/runtime-chunk-7LHQNWDR.js.gz +0 -0
  22. package/build/{runtime-chunk-M3YLEACQ.js → runtime-chunk-AIZLRXLL.js} +1 -1
  23. package/build/runtime-chunk-AIZLRXLL.js.br +0 -0
  24. package/build/runtime-chunk-AIZLRXLL.js.gz +0 -0
  25. package/build/{runtime-chunk-KPQ22F5X.js → runtime-chunk-BDB2UM3E.js} +1 -1
  26. package/build/runtime-chunk-BDB2UM3E.js.br +0 -0
  27. package/build/runtime-chunk-BDB2UM3E.js.gz +0 -0
  28. package/build/{runtime-chunk-NAUVESCV.js → runtime-chunk-DJP4X7T7.js} +1 -1
  29. package/build/runtime-chunk-DJP4X7T7.js.br +0 -0
  30. package/build/runtime-chunk-DJP4X7T7.js.gz +0 -0
  31. package/build/{runtime-chunk-Z34P77VA.js → runtime-chunk-E37PNLQA.js} +1 -1
  32. package/build/runtime-chunk-E37PNLQA.js.br +0 -0
  33. package/build/runtime-chunk-E37PNLQA.js.gz +0 -0
  34. package/build/{runtime-chunk-AN2P4EN2.js → runtime-chunk-EBU2DUYR.js} +1 -1
  35. package/build/runtime-chunk-EBU2DUYR.js.br +0 -0
  36. package/build/runtime-chunk-EBU2DUYR.js.gz +0 -0
  37. package/build/{runtime-chunk-2NXWM6BD.js → runtime-chunk-EPITBSWH.js} +1 -1
  38. package/build/runtime-chunk-EPITBSWH.js.br +0 -0
  39. package/build/runtime-chunk-EPITBSWH.js.gz +0 -0
  40. package/build/{runtime-chunk-WN7LYJQL.js → runtime-chunk-I6C7UVT4.js} +1 -1
  41. package/build/runtime-chunk-I6C7UVT4.js.br +0 -0
  42. package/build/runtime-chunk-I6C7UVT4.js.gz +0 -0
  43. package/build/{runtime-chunk-RG2CIIUE.js → runtime-chunk-IVOXIBX4.js} +1 -1
  44. package/build/runtime-chunk-IVOXIBX4.js.br +0 -0
  45. package/build/runtime-chunk-IVOXIBX4.js.gz +0 -0
  46. package/build/{runtime-chunk-RLETXMN4.js → runtime-chunk-P2WZRCIB.js} +1 -1
  47. package/build/runtime-chunk-P2WZRCIB.js.br +0 -0
  48. package/build/runtime-chunk-P2WZRCIB.js.gz +0 -0
  49. package/build/{runtime-chunk-LM22QQY6.js → runtime-chunk-PYKTMGCQ.js} +1 -1
  50. package/build/runtime-chunk-PYKTMGCQ.js.br +0 -0
  51. package/build/runtime-chunk-PYKTMGCQ.js.gz +0 -0
  52. package/build/{runtime-chunk-BSEG6CWM.js → runtime-chunk-QSTRAO43.js} +1 -1
  53. package/build/runtime-chunk-QSTRAO43.js.br +0 -0
  54. package/build/runtime-chunk-QSTRAO43.js.gz +0 -0
  55. package/build/{runtime-chunk-RW4RXPZP.js → runtime-chunk-SIW5ZXXW.js} +1 -1
  56. package/build/runtime-chunk-SIW5ZXXW.js.br +0 -0
  57. package/build/runtime-chunk-SIW5ZXXW.js.gz +0 -0
  58. package/build/{runtime-chunk-UM2WZDTE.js → runtime-chunk-TC6GJGWK.js} +1 -1
  59. package/build/runtime-chunk-TC6GJGWK.js.br +0 -0
  60. package/build/runtime-chunk-TC6GJGWK.js.gz +0 -0
  61. package/build/{runtime-chunk-AFOG3EOO.js → runtime-chunk-TO7T7KNX.js} +1 -1
  62. package/build/runtime-chunk-TO7T7KNX.js.br +0 -0
  63. package/build/runtime-chunk-TO7T7KNX.js.gz +0 -0
  64. package/build/{runtime-chunk-SKEKGUY2.js → runtime-chunk-VDECEEUG.js} +1 -1
  65. package/build/runtime-chunk-VDECEEUG.js.br +0 -0
  66. package/build/runtime-chunk-VDECEEUG.js.gz +0 -0
  67. package/build/{runtime-chunk-Q7QYJUJN.js → runtime-chunk-VUKMNTOJ.js} +1 -1
  68. package/build/runtime-chunk-VUKMNTOJ.js.br +0 -0
  69. package/build/runtime-chunk-VUKMNTOJ.js.gz +0 -0
  70. package/build/{runtime-chunk-B3QJDINU.js → runtime-chunk-VWW23DE5.js} +1 -1
  71. package/build/runtime-chunk-VWW23DE5.js.br +0 -0
  72. package/build/runtime-chunk-VWW23DE5.js.gz +0 -0
  73. package/build/{runtime-chunk-4EV5RMLQ.js → runtime-chunk-XNWWSHHX.js} +1 -1
  74. package/build/runtime-chunk-XNWWSHHX.js.br +0 -0
  75. package/build/runtime-chunk-XNWWSHHX.js.gz +0 -0
  76. package/build/{runtime-chunk-H3LGDNH2.js → runtime-chunk-XQEURE23.js} +1 -1
  77. package/build/runtime-chunk-XQEURE23.js.br +0 -0
  78. package/build/runtime-chunk-XQEURE23.js.gz +0 -0
  79. package/build/{runtime-chunk-YO4ORKMI.js → runtime-chunk-XZLVKFF3.js} +1 -1
  80. package/build/runtime-chunk-XZLVKFF3.js.br +1 -0
  81. package/build/runtime-chunk-XZLVKFF3.js.gz +0 -0
  82. package/build/{runtime-classicRuntime-BCBRZA5I.js → runtime-classicRuntime-OVWGPV5L.js} +1 -1
  83. package/build/runtime-classicRuntime-OVWGPV5L.js.br +0 -0
  84. package/build/runtime-classicRuntime-OVWGPV5L.js.gz +0 -0
  85. package/build/{runtime-cloners-KXUZRBVK.js → runtime-cloners-GLDMG7SA.js} +1 -1
  86. package/build/runtime-cloners-GLDMG7SA.js.br +1 -0
  87. package/build/runtime-cloners-GLDMG7SA.js.gz +0 -0
  88. package/build/{runtime-components-TK5ZDPOW.js → runtime-components-SUBSTZH6.js} +1 -1
  89. package/build/runtime-components-SUBSTZH6.js.br +0 -0
  90. package/build/runtime-components-SUBSTZH6.js.gz +0 -0
  91. package/build/runtime-conditional-3OCYMAD5.js +1 -0
  92. package/build/runtime-conditional-3OCYMAD5.js.br +0 -0
  93. package/build/runtime-conditional-3OCYMAD5.js.gz +0 -0
  94. package/build/runtime-createDestroy-T5DB5MO5.js +1 -0
  95. package/build/runtime-createDestroy-T5DB5MO5.js.br +0 -0
  96. package/build/runtime-createDestroy-T5DB5MO5.js.gz +0 -0
  97. package/build/{runtime-dragDrop-2WAB3OJG.js → runtime-dragDrop-6GRP57ZZ.js} +1 -1
  98. package/build/runtime-dragDrop-6GRP57ZZ.js.br +0 -0
  99. package/build/runtime-dragDrop-6GRP57ZZ.js.gz +0 -0
  100. package/build/{runtime-gameControls-LKJXJWLV.js → runtime-gameControls-7RZEWGMS.js} +1 -1
  101. package/build/runtime-gameControls-7RZEWGMS.js.br +0 -0
  102. package/build/runtime-gameControls-7RZEWGMS.js.gz +0 -0
  103. package/build/{runtime-hair-JE6BT5XS.js → runtime-hair-IDVGMIQR.js} +1 -1
  104. package/build/runtime-hair-IDVGMIQR.js.br +0 -0
  105. package/build/runtime-hair-IDVGMIQR.js.gz +0 -0
  106. package/build/{runtime-mergeStaticGeometries-ZZ2NVTAF.js → runtime-mergeStaticGeometries-TCAO7L7W.js} +1 -1
  107. package/build/runtime-mergeStaticGeometries-TCAO7L7W.js.br +0 -0
  108. package/build/runtime-mergeStaticGeometries-TCAO7L7W.js.gz +0 -0
  109. package/build/{runtime-miscActions-X6WCJQS6.js → runtime-miscActions-D7OUBVXP.js} +1 -1
  110. package/build/runtime-miscActions-D7OUBVXP.js.br +0 -0
  111. package/build/runtime-miscActions-D7OUBVXP.js.gz +0 -0
  112. package/build/{runtime-mouseHover-AHV7O72A.js → runtime-mouseHover-5RWIPLPT.js} +1 -1
  113. package/build/runtime-mouseHover-5RWIPLPT.js.br +0 -0
  114. package/build/runtime-mouseHover-5RWIPLPT.js.gz +0 -0
  115. package/build/{runtime-particles-IU74DFIR.js → runtime-particles-T4ZTN4UA.js} +1 -1
  116. package/build/runtime-particles-T4ZTN4UA.js.br +0 -0
  117. package/build/runtime-particles-T4ZTN4UA.js.gz +0 -0
  118. package/build/{runtime-paths-TJ3NTELX.js → runtime-paths-QF6FE2PG.js} +1 -1
  119. package/build/runtime-paths-QF6FE2PG.js.br +0 -0
  120. package/build/runtime-paths-QF6FE2PG.js.gz +0 -0
  121. package/build/{runtime-resize-ZO5VPIUJ.js → runtime-resize-RQQGNYE6.js} +1 -1
  122. package/build/runtime-resize-RQQGNYE6.js.br +0 -0
  123. package/build/runtime-resize-RQQGNYE6.js.gz +0 -0
  124. package/build/{runtime-sceneTransition-5BOIXMYH.js → runtime-sceneTransition-XCV5BL3O.js} +1 -1
  125. package/build/runtime-sceneTransition-XCV5BL3O.js.br +0 -0
  126. package/build/runtime-sceneTransition-XCV5BL3O.js.gz +0 -0
  127. package/build/{runtime-scroll-4GFGYBMX.js → runtime-scroll-JSZN255S.js} +1 -1
  128. package/build/runtime-scroll-JSZN255S.js.br +0 -0
  129. package/build/runtime-scroll-JSZN255S.js.gz +0 -0
  130. package/build/runtime-shapeBlends-WHOB5WSG.js +1 -0
  131. package/build/runtime-shapeBlends-WHOB5WSG.js.br +0 -0
  132. package/build/runtime-shapeBlends-WHOB5WSG.js.gz +0 -0
  133. package/build/{runtime-text-ZN4A7F2B.js → runtime-text-Z6REPBDZ.js} +1 -1
  134. package/build/runtime-text-Z6REPBDZ.js.br +0 -0
  135. package/build/runtime-text-Z6REPBDZ.js.gz +0 -0
  136. package/build/{runtime-textInputs-FBXBOXZH.js → runtime-textInputs-B2P5OPTX.js} +1 -1
  137. package/build/runtime-textInputs-B2P5OPTX.js.br +0 -0
  138. package/build/runtime-textInputs-B2P5OPTX.js.gz +0 -0
  139. package/build/runtime-timeline-7W6JEZK4.js +1 -0
  140. package/build/runtime-timeline-7W6JEZK4.js.br +0 -0
  141. package/build/runtime-timeline-7W6JEZK4.js.gz +0 -0
  142. package/build/{runtime-tracking-JL3BT5LY.js → runtime-tracking-4VLKE7TU.js} +1 -1
  143. package/build/runtime-tracking-4VLKE7TU.js.br +0 -0
  144. package/build/runtime-tracking-4VLKE7TU.js.gz +0 -0
  145. package/build/runtime-transitions-WZDU2JY3.js +1 -0
  146. package/build/runtime-transitions-WZDU2JY3.js.br +0 -0
  147. package/build/runtime-transitions-WZDU2JY3.js.gz +0 -0
  148. package/build/{runtime-ui2d-4CMFBZI7.js → runtime-ui2d-BKCDVHFO.js} +1 -1
  149. package/build/runtime-ui2d-BKCDVHFO.js.br +0 -0
  150. package/build/runtime-ui2d-BKCDVHFO.js.gz +0 -0
  151. package/build/{runtime-variables-ZSNAR2ME.js → runtime-variables-QPWCA6SV.js} +1 -1
  152. package/build/runtime-variables-QPWCA6SV.js.br +0 -0
  153. package/build/runtime-variables-QPWCA6SV.js.gz +0 -0
  154. package/build/{runtime-vectorShapes-BIA3SW6I.js → runtime-vectorShapes-UFJ5IRPT.js} +1 -1
  155. package/build/runtime-vectorShapes-UFJ5IRPT.js.br +0 -0
  156. package/build/runtime-vectorShapes-UFJ5IRPT.js.gz +0 -0
  157. package/build/{runtime-webgpu-EUBP2RQZ.js → runtime-webgpu-ROKCO67O.js} +1 -1
  158. package/build/runtime-webgpu-ROKCO67O.js.br +0 -0
  159. package/build/runtime-webgpu-ROKCO67O.js.gz +0 -0
  160. package/build/runtime.cjs +292 -292
  161. package/build/runtime.js +1 -1
  162. package/build/runtime.js.br +0 -0
  163. package/build/runtime.js.gz +0 -0
  164. package/build/runtime.standalone.js +1 -1
  165. package/build/runtime.standalone.js.br +0 -0
  166. package/build/runtime.standalone.js.gz +0 -0
  167. package/build/runtime.standalone.webgl.js +1 -1
  168. package/build/runtime.standalone.webgl.js.br +0 -0
  169. package/build/runtime.standalone.webgl.js.gz +0 -0
  170. package/build/runtime.standalone.webgpu.js +1 -1
  171. package/build/runtime.standalone.webgpu.js.br +0 -0
  172. package/build/runtime.standalone.webgpu.js.gz +0 -0
  173. package/build/runtime.standalone.webgpu.micro.js +1 -1
  174. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  175. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  176. package/build/runtime.standalone.webgpu.min.js +1 -1
  177. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  178. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  179. package/package.json +1 -1
  180. package/build/runtime-aiAssistant-CXQ5KRFS.js +0 -1
  181. package/build/runtime-aiAssistant-CXQ5KRFS.js.br +0 -0
  182. package/build/runtime-aiAssistant-CXQ5KRFS.js.gz +0 -0
  183. package/build/runtime-apiServices-FBQPIC7E.js +0 -1
  184. package/build/runtime-apiServices-FBQPIC7E.js.br +0 -0
  185. package/build/runtime-apiServices-FBQPIC7E.js.gz +0 -0
  186. package/build/runtime-chunk-2NXWM6BD.js.br +0 -0
  187. package/build/runtime-chunk-2NXWM6BD.js.gz +0 -0
  188. package/build/runtime-chunk-4EV5RMLQ.js.br +0 -0
  189. package/build/runtime-chunk-4EV5RMLQ.js.gz +0 -0
  190. package/build/runtime-chunk-AFOG3EOO.js.br +0 -0
  191. package/build/runtime-chunk-AFOG3EOO.js.gz +0 -0
  192. package/build/runtime-chunk-AN2P4EN2.js.br +0 -0
  193. package/build/runtime-chunk-AN2P4EN2.js.gz +0 -0
  194. package/build/runtime-chunk-AOZCO4VY.js.br +0 -0
  195. package/build/runtime-chunk-AOZCO4VY.js.gz +0 -0
  196. package/build/runtime-chunk-B3QJDINU.js.br +0 -0
  197. package/build/runtime-chunk-B3QJDINU.js.gz +0 -0
  198. package/build/runtime-chunk-BSEG6CWM.js.br +0 -0
  199. package/build/runtime-chunk-BSEG6CWM.js.gz +0 -0
  200. package/build/runtime-chunk-EG55REW7.js.br +0 -0
  201. package/build/runtime-chunk-EG55REW7.js.gz +0 -0
  202. package/build/runtime-chunk-H3LGDNH2.js.br +0 -0
  203. package/build/runtime-chunk-H3LGDNH2.js.gz +0 -0
  204. package/build/runtime-chunk-H6NICSNO.js.br +0 -0
  205. package/build/runtime-chunk-H6NICSNO.js.gz +0 -0
  206. package/build/runtime-chunk-KPQ22F5X.js.br +0 -0
  207. package/build/runtime-chunk-KPQ22F5X.js.gz +0 -0
  208. package/build/runtime-chunk-LHMA4VIW.js.br +0 -0
  209. package/build/runtime-chunk-LHMA4VIW.js.gz +0 -0
  210. package/build/runtime-chunk-LM22QQY6.js.br +0 -0
  211. package/build/runtime-chunk-LM22QQY6.js.gz +0 -0
  212. package/build/runtime-chunk-M3YLEACQ.js.br +0 -0
  213. package/build/runtime-chunk-M3YLEACQ.js.gz +0 -0
  214. package/build/runtime-chunk-NAUVESCV.js.br +0 -0
  215. package/build/runtime-chunk-NAUVESCV.js.gz +0 -0
  216. package/build/runtime-chunk-Q7QYJUJN.js.br +0 -0
  217. package/build/runtime-chunk-Q7QYJUJN.js.gz +0 -0
  218. package/build/runtime-chunk-RG2CIIUE.js.br +0 -0
  219. package/build/runtime-chunk-RG2CIIUE.js.gz +0 -0
  220. package/build/runtime-chunk-RLETXMN4.js.br +0 -0
  221. package/build/runtime-chunk-RLETXMN4.js.gz +0 -0
  222. package/build/runtime-chunk-RW4RXPZP.js.br +0 -0
  223. package/build/runtime-chunk-RW4RXPZP.js.gz +0 -0
  224. package/build/runtime-chunk-SKEKGUY2.js.br +0 -0
  225. package/build/runtime-chunk-SKEKGUY2.js.gz +0 -0
  226. package/build/runtime-chunk-TICMTK6A.js.br +0 -0
  227. package/build/runtime-chunk-TICMTK6A.js.gz +0 -0
  228. package/build/runtime-chunk-UM2WZDTE.js.br +0 -0
  229. package/build/runtime-chunk-UM2WZDTE.js.gz +0 -0
  230. package/build/runtime-chunk-WN7LYJQL.js.br +0 -0
  231. package/build/runtime-chunk-WN7LYJQL.js.gz +0 -0
  232. package/build/runtime-chunk-YO4ORKMI.js.br +0 -2
  233. package/build/runtime-chunk-YO4ORKMI.js.gz +0 -0
  234. package/build/runtime-chunk-Z34P77VA.js.br +0 -0
  235. package/build/runtime-chunk-Z34P77VA.js.gz +0 -0
  236. package/build/runtime-classicRuntime-BCBRZA5I.js.br +0 -0
  237. package/build/runtime-classicRuntime-BCBRZA5I.js.gz +0 -0
  238. package/build/runtime-cloners-KXUZRBVK.js.br +0 -0
  239. package/build/runtime-cloners-KXUZRBVK.js.gz +0 -0
  240. package/build/runtime-components-TK5ZDPOW.js.br +0 -0
  241. package/build/runtime-components-TK5ZDPOW.js.gz +0 -0
  242. package/build/runtime-conditional-2NJAHUCV.js +0 -1
  243. package/build/runtime-conditional-2NJAHUCV.js.br +0 -0
  244. package/build/runtime-conditional-2NJAHUCV.js.gz +0 -0
  245. package/build/runtime-createDestroy-RIK2EVWW.js +0 -1
  246. package/build/runtime-createDestroy-RIK2EVWW.js.br +0 -0
  247. package/build/runtime-createDestroy-RIK2EVWW.js.gz +0 -0
  248. package/build/runtime-dragDrop-2WAB3OJG.js.br +0 -0
  249. package/build/runtime-dragDrop-2WAB3OJG.js.gz +0 -0
  250. package/build/runtime-gameControls-LKJXJWLV.js.br +0 -0
  251. package/build/runtime-gameControls-LKJXJWLV.js.gz +0 -0
  252. package/build/runtime-hair-JE6BT5XS.js.br +0 -1
  253. package/build/runtime-hair-JE6BT5XS.js.gz +0 -0
  254. package/build/runtime-mergeStaticGeometries-ZZ2NVTAF.js.br +0 -0
  255. package/build/runtime-mergeStaticGeometries-ZZ2NVTAF.js.gz +0 -0
  256. package/build/runtime-miscActions-X6WCJQS6.js.br +0 -0
  257. package/build/runtime-miscActions-X6WCJQS6.js.gz +0 -0
  258. package/build/runtime-mouseHover-AHV7O72A.js.br +0 -0
  259. package/build/runtime-mouseHover-AHV7O72A.js.gz +0 -0
  260. package/build/runtime-particles-IU74DFIR.js.br +0 -0
  261. package/build/runtime-particles-IU74DFIR.js.gz +0 -0
  262. package/build/runtime-paths-TJ3NTELX.js.br +0 -0
  263. package/build/runtime-paths-TJ3NTELX.js.gz +0 -0
  264. package/build/runtime-resize-ZO5VPIUJ.js.br +0 -0
  265. package/build/runtime-resize-ZO5VPIUJ.js.gz +0 -0
  266. package/build/runtime-sceneTransition-5BOIXMYH.js.br +0 -0
  267. package/build/runtime-sceneTransition-5BOIXMYH.js.gz +0 -0
  268. package/build/runtime-scroll-4GFGYBMX.js.br +0 -0
  269. package/build/runtime-scroll-4GFGYBMX.js.gz +0 -0
  270. package/build/runtime-shapeBlends-UNMTEEFX.js +0 -1
  271. package/build/runtime-shapeBlends-UNMTEEFX.js.br +0 -3
  272. package/build/runtime-shapeBlends-UNMTEEFX.js.gz +0 -0
  273. package/build/runtime-text-ZN4A7F2B.js.br +0 -0
  274. package/build/runtime-text-ZN4A7F2B.js.gz +0 -0
  275. package/build/runtime-textInputs-FBXBOXZH.js.br +0 -0
  276. package/build/runtime-textInputs-FBXBOXZH.js.gz +0 -0
  277. package/build/runtime-timeline-673KGMVE.js +0 -1
  278. package/build/runtime-timeline-673KGMVE.js.br +0 -0
  279. package/build/runtime-timeline-673KGMVE.js.gz +0 -0
  280. package/build/runtime-tracking-JL3BT5LY.js.br +0 -0
  281. package/build/runtime-tracking-JL3BT5LY.js.gz +0 -0
  282. package/build/runtime-transitions-M2EOAAH2.js +0 -1
  283. package/build/runtime-transitions-M2EOAAH2.js.br +0 -0
  284. package/build/runtime-transitions-M2EOAAH2.js.gz +0 -0
  285. package/build/runtime-ui2d-4CMFBZI7.js.br +0 -0
  286. package/build/runtime-ui2d-4CMFBZI7.js.gz +0 -0
  287. package/build/runtime-variables-ZSNAR2ME.js.br +0 -0
  288. package/build/runtime-variables-ZSNAR2ME.js.gz +0 -0
  289. package/build/runtime-vectorShapes-BIA3SW6I.js.br +0 -0
  290. package/build/runtime-vectorShapes-BIA3SW6I.js.gz +0 -0
  291. package/build/runtime-webgpu-EUBP2RQZ.js.br +0 -0
  292. package/build/runtime-webgpu-EUBP2RQZ.js.gz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splinetool/runtime",
3
- "version": "2.0.57",
3
+ "version": "2.0.59",
4
4
  "description": "Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2026 Spline, Inc.",
5
5
  "keywords": [
6
6
  "spline",
@@ -1 +0,0 @@
1
- import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{c as i}from"./runtime-chunk-4YV3EXSU.js";import{f as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-EFBUAWKV.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var r=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onVoice=({value:e,frequencies:t})=>{this.events.forEach(e=>{e.dispatch()})}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantListener"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new o(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("voice",this.onVoice))}disconnect(){this.openAIRealtime?.off("voice",this.onVoice)}},o=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){this.dispatchActions(this.actions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},c=class extends t{constructor(e,t){super(e),this.eventManager=t,this.events=[],this.onTriggerEvent=({description:e,direction:t})=>{let s=this.events.find(t=>t.data.description===e);s&&("backward"===t?s.dispatchReverse():s.dispatch())}}connect(){this.openAIRealtime=this.eventContext.sharedAssets.openAIRealtime,this.openAIRealtime&&(this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"AIAssistantTrigger"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new h(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),this.openAIRealtime.on("trigger_event",this.onTriggerEvent))}disconnect(){this.openAIRealtime?.off("trigger_event",this.onTriggerEvent)}},h=class{constructor(e,t,s,i,n,r){this.id=e,this.data=t,this.object=s,this.actions=a(t,t.actions,i,n,r,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}dispatchReverse(){let e=this.actions;e.Transition.forEach(e=>e.reverseFromCurrent()),e.Particles.forEach(e=>e.reverseFromCurrent()),e.Animation.forEach(e=>e.reverseFromCurrent()),e.SwitchCamera.forEach(e=>e.reverseFromCurrent()),e.Create.forEach(e=>e.dispatchStop())}},l=function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(e,t,s,i)=>String(t+t+s+s+i+i));let t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},d=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],p=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],u=[],f=[];for(let e=1;e<=8;e++)for(let t=0;t<d.length;t++){let s=d[t];u.push(s/Math.pow(2,8-e)),f.push(p[t]+e)}var v=[32,2e3],m=u.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),y=f.filter((e,t)=>u[t]>v[0]&&u[t]<v[1]),g=class{static getFrequencies(e,t,s,i="frequency",a=-100,n=-30){s||(s=new Float32Array(e.frequencyBinCount),e.getFloatFrequencyData(s));let r,o,c,h=t/2,l=1/s.length*h;if("music"===i||"voice"===i){let e="voice"===i?m:u,t=Array(e.length).fill(a);for(let i=0;i<s.length;i++){let a=i*l,n=s[i];for(let s=e.length-1;s>=0;s--)if(a>e[s]){t[s]=Math.max(t[s],n);break}}r=t,o="voice"===i?m:u,c="voice"===i?y:f}else r=Array.from(s),o=r.map((e,t)=>l*t),c=o.map(e=>`${e.toFixed(2)} Hz`);let d=r.map(e=>Math.max(0,Math.min((e-a)/(n-a),1)));return{values:new Float32Array(d),frequencies:o,labels:c}}},E=class{constructor(e){this.value=0,this.frequencies=new Float32Array(0);let t=new AudioContext;this.source=t.createMediaStreamSource(e),this.analyser=t.createAnalyser(),this.source.connect(this.analyser),this.analyser.fftSize=8192,this.analyser.smoothingTimeConstant=.1}getFrequencies(e=-100,t=-30){if(!this.analyser)throw new Error("Not connected, please call .connect() first");return g.getFrequencies(this.analyser,44100,void 0,"voice",e,t)}update(){let e=this.getFrequencies(),t=e.values.reduce((e,t)=>e+t,0)/e.values.length;this.value=t,this.frequencies=e.values}disconnect(){this.source.disconnect(),this.analyser.disconnect()}},b=class{constructor(e){this.callbacks=e,this.rafId=0,this.isOpen=!1,this.onMessage=e=>{this.callbacks.onMessage(e.data)},this.onOpen=()=>{this.isOpen=!0,this.callbacks.onOpen()},this.animate=()=>{this.rafId=requestAnimationFrame(this.animate),this.isOpen&&this.analyser&&(this.analyser.update(),this.callbacks.onVoice(this.analyser.value,this.analyser.frequencies))}}async connect(e){let t=await async function(e){try{return(await(await fetch("https://relayserver.spline.design/session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(e);this.pc=new RTCPeerConnection,this.audioElement=document.createElement("audio"),this.audioElement.autoplay=!0,this.pc.ontrack=e=>{let t=e.streams[0];this.audioElement.srcObject=t,this.analyser=new E(t)};let s=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(s.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let i=await this.pc.createOffer();await this.pc.setLocalDescription(i);let a={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime/calls?model=gpt-realtime",{method:"POST",body:i.sdp,headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(a),this.animate()}send(e){return!!this.dc&&(this.dc.send(e),!0)}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.isOpen=!1,this.dc?.removeEventListener("message",this.onMessage),this.dc?.removeEventListener("open",this.onOpen),this.dc?.close(),this.pc?.getSenders().forEach(e=>{e.track&&e.track.stop()}),this.pc?.close(),this.pc=void 0}};var w=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onServerEvent=e=>{let t=JSON.parse(e);if(this.appendEvent(t),"session.created"===t.type&&this.onSessionCreated(),"response.done"===t.type&&t.response?.output)for(let e of t.response.output)if("function_call"===e.type)for(let[t,s]of this.tools)e.name===t.name&&(s(JSON.parse(e.arguments)),setTimeout(()=>{this.sendClientEvent({type:"response.create",response:{instructions:"notice the user about what you just did"}})}))},this.onSessionCreated=()=>{this.isToolsAdded||this.registerTools()},this.onOpen=()=>{this.events=[],this.isConnected=!0,this.sendClientEvent({type:"response.create",response:{instructions:"Say hi"}})}}update(e){this.data=e}setColorByName(e,t){let s=this.shared.getColorByName(e);if(s){let{id:e}=s,{r:i,g:a,b:n}=l(t)??{r:0,g:0,b:0};this.shared.updateColor(e,{r:i/255,g:a/255,b:n/255})}}async connect(){if(this.isConnected||this.session||this.hosted)return;let e={onMessage:this.onServerEvent,onOpen:this.onOpen,onVoice:(e,t)=>{this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}};this.hosted=function(e,t,s){if(!function(){try{return!0===window.__SPLINE_PLAY_VOICE_HOST__&&window.parent!==window}catch{return!1}}())return null;let i=!1,a=e=>{window.parent.postMessage({__splinePlayFrame:!0,...e},"*")},n=t=>{if(t.source!==window.parent)return;let a=t.data;!a||!0!==a.__splinePlayFrameHost||a.id!==e||("voice-open"===a.type?(i=!0,s.onOpen()):"voice-message"===a.type&&"string"==typeof a.data?s.onMessage(a.data):"voice-level"===a.type&&"number"==typeof a.value?s.onVoice(a.value,a.frequencies instanceof Float32Array?a.frequencies:new Float32Array(0)):"voice-error"===a.type&&console.error("Voice assistant host error:",a.message))};return window.addEventListener("message",n),a({type:"voice-connect",id:e,hash:t}),{send:t=>!!i&&(a({type:"voice-send",id:e,message:t}),!0),disconnect:()=>{i=!1,window.removeEventListener("message",n),a({type:"voice-disconnect",id:e})}}}(this.id,this.data.integration.hash,e),!this.hosted&&(this.session=new b(e),await this.session.connect(this.data.integration.hash))}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){e.event_id=e.event_id||crypto.randomUUID();let t=JSON.stringify(e);(this.hosted?this.hosted.send(t):this.session?.send(t))?this.appendEvent(e):console.error("Failed to send message - no data channel available",e)}registerTools(){this.isToolsAdded=!0,this.registerTool({type:"function",name:"set_personality_color",description:"returns a color based on the voice personality of the ai assistant. This should be called by the voice assistant each time it is asks to speak differently. If a color cannot be associated to the personality, the color should be a neutral color.",parameters:{type:"object",properties:{color:{type:"string",description:"css hex color string, reflecting the personality"},personality:{type:"string",description:"the personality of the voice assistant"}},required:["color","personality"]}},({color:e})=>{this.setColorByName("Voice Assistant Color",e)});let e=this.shared.getVariablesNames().join(", ");this.registerTool({type:"function",name:"set_variable",description:"Sets a Spline variable value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the variable that needs to be set. Here's a list of available variables: ${e}. It the variable does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"The new value for this variable, should always be a string even for number and boolean variables, assume that the value will be cast to the proper type afterwards."}},required:["name","value","type"]}},({name:e,value:t})=>{let s=this.shared.getVariableByName(e);if(s){let e,i=this.shared.getVariable(s.id);e="number"==typeof i?parseFloat(t):"boolean"==typeof i?"true"===t.toLowerCase():{textValue:t},this.shared.updateVariable(s.id,e)}});let t=this.shared.getColorNames().join(", ");this.registerTool({type:"function",name:"set_color",description:"Sets a Spline color asset value when asked by the user.",parameters:{type:"object",properties:{name:{type:"string",description:`The name of the color asset that needs to be set. Here's a list of available color assets: ${t}. It the color asset does not exist, don't call the function and warn the user about it.`},value:{type:"string",description:"css hex color string"}},required:["name","value"]}},({name:e,value:t})=>{this.setColorByName(e,t)});let s=this.shared.scene,i=[];s.traverseEntity(e=>{e.data.events.forEach(e=>{if("AIAssistantTrigger"===e.data.type){let{description:t}=e.data;i.push(t)}})}),this.registerTool({type:"function",name:"trigger_event",description:"Trigger an event by name, here are the available events, please match what the user is asking for to one of these if it applies, otherwise don't call the function and warn the user.",parameters:{type:"object",properties:{description:{type:"string",description:`The name of the event that needs to be triggered. Here's a list of available events: ${JSON.stringify(i)}.`},direction:{type:"string",description:"default is forward, but can be forward or backward. Always set to forward unless the user ask to reverse or cancel the event, then set to backward."}},required:["description","direction"]}},({description:e,direction:t})=>{this.emitter.emit("trigger_event",{description:e,direction:t})}),this.sendClientEvent({type:"session.update",session:{type:"realtime",tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){this.voice=0,this.isConnected=!1,this.isToolsAdded=!1,this.session?.disconnect(),this.session=void 0,this.hosted?.disconnect(),this.hosted=null}computeAnalysisForListenerEvent(e){if("range"===e.analysis){let t=this.frequencies.slice(...e.analysisRange);return t.reduce((e,t)=>e+t,0)/t.length}return"single"===e.analysis?this.frequencies[e.analysisSingle]:this.voice}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}};s("AIAssistantListener",({eventContext:e,eventManager:t})=>new r(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new c(e,t)),i((e,t,s)=>new w(e,t,s)),n("ai-assistant");
@@ -1 +0,0 @@
1
- import{a as e}from"./runtime-chunk-NTUTXO7Q.js";import{a as t,b as s}from"./runtime-chunk-DZNU62CT.js";import{a as r}from"./runtime-chunk-4YV3EXSU.js";import{b as i,e as n,f as o}from"./runtime-chunk-M6FFVLT6.js";import{a}from"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-EFBUAWKV.js";import{a as h}from"./runtime-chunk-TZCHGFVF.js";import{Fa as c,Ga as d,n as u}from"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var l=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userAPIs={},this.events=[],this.onSuccess=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchSuccess()})},this.onError=({userAPIId:e})=>{this.events.forEach(t=>{t.data.userAPIId===e&&t.dispatchError()})},this.userAPIs=e.sharedAssets.getUserAPIs()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"API"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new p(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userAPIs).forEach(([e,t])=>{t.on("success",this.onSuccess),t.on("error",this.onError),t.autostart&&t.callUserAPI(this.eventContext.sharedAssets)})}disconnect(){Object.entries(this.userAPIs).forEach(([e,t])=>{t.off("success",this.onSuccess),t.off("error",this.onError)})}},p=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.successActions=o(t,t.successActions,r,i,n,s),this.errorActions=o(t,t.errorActions,r,i,n,s)}dispatchSuccess(){this.dispatchActions(this.successActions)}dispatchError(){this.dispatchActions(this.errorActions)}dispatchActions(e){e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},f=class extends t{constructor(e,t){super(e),this.eventManager=t,this.userWebhooks={},this.events=[],this.onMessage=({userWebhookId:e})=>{this.events.forEach(t=>{t.data.userWebhookId===e&&t.dispatch()})},this.userWebhooks=e.sharedAssets.getUserWebhooks()}connect(){this.eventContext.page.traverseEntity(e=>{e.data?.events.filter(e=>"WEBHOOK"===e.data.type&&!e.data.disabled).forEach(t=>{this.events.push(new m(t.id,t.data,e,this.eventContext.page,this.eventContext.sharedAssets,this.eventManager))})}),Object.entries(this.userWebhooks).forEach(([e,t])=>{t.connect(),t.on("message",this.onMessage)})}disconnect(){Object.entries(this.userWebhooks).forEach(([e,t])=>{t.off("message",this.onMessage),t.disconnect()})}},m=class{constructor(e,t,s,r,i,n){this.id=e,this.data=t,this.object=s,this.actions=o(t,t.actions,r,i,n,s)}dispatch(){let e=this.actions;e.Audio.forEach(e=>e.dispatchConditional()),e.Particles.forEach(e=>e.dispatchConditional()),e.Video.forEach(e=>e.dispatchConditional()),e.Create.forEach(e=>e.dispatch()),e.Destroy.forEach(e=>e.dispatch()),e.Reset.forEach(e=>e.dispatch()),e.Transition.forEach(e=>{e.object.currentTransitionEvent!==this&&(e.object.currentTransitionEvent=this),e.init()}),e.Transition.forEach(e=>e.play()),e.Animation.forEach(e=>e.play()),e.SwitchCamera.forEach(e=>e.play()),e.SceneTransition.forEach(e=>e.dispatch()),e.SetVariable.forEach(e=>e.checkConditions()),e.SetVariable.forEach(e=>e.dispatch()),e.DynamicVariablePlay.forEach(e=>e.dispatch()),e.ClearLocalStorage.forEach(e=>e.dispatch()),e.UserAPI.forEach(e=>e.dispatch())}},v=class{constructor(e,t,s,r){this.data=e,this.page=t,this.shared=s,this.condition=r}dispatch(){if(!1===n(this.shared,this.condition))return!1;if(this.data.userAPIId){let e=this.shared.getUserAPI(this.data.userAPIId);e&&"callUserAPI"in e&&e.callUserAPI(this.shared)}}dispose(){}},E=class{constructor(t,s,r){this.id=t,this.userAPI=s,this.result=void 0,this.error="null",this.isPrefetched=!1,this.isLoading=!1,this.isLoaded=!1,this.prefetchPromise=new Promise(e=>e()),this.emitter=e(),this._innerCallUserAPI=async e=>{this.emitter.emit("start",{userAPIId:this.id}),this.isLoading=!0,this.isLoading=!1;try{this.result=await async function(e,t,s=new AbortController){let r,i,n=e.url,o=e.proxy?.enabled??!1;if("OpenAI"===e.integration?.type){let s=b(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:b(JSON.parse(e.integration.behavior),t);i=`{\n\t\t"model": "${e.integration.model}",\n\t\t"messages": [${e.integration.useBehavior?`\n\t\t{\n\t\t\t"role": "system",\n\t\t\t"content": "${r}"\n\t\t},`:""}\n\t\t{\n\t\t\t"role": "user",\n\t\t\t"content": "${s}"\n\t\t}\n\t\t]\n\t}`}if(o){let s;n=`https://apis.spline.design/file/${e.proxy.fileId}/external-api/request?uuidexternalapi=${e.proxy.proxyId}`,void 0!==i?s=i:"POST"===e.method&&e.body&&(s=b(JSON.parse(e.body),t)),void 0!==s&&(n+=`&data=${encodeURIComponent(s.replace(/(\r\n|\n|\r|\t)/gm,""))}`)}else"OpenAI"===e.integration?.type?r=i:"POST"===e.method&&e.body&&(r=b(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:g(e),signal:s.signal,body:r});if(!a.ok)throw new Error("status:"+a.status+"_:_"+a.statusText);if("OpenAI"===e.integration?.type){let e=await a.json();return o&&(e=e.response),{content:e.choices[0].message.content}}{let e=await a.json();return o&&(e=e.response),e}}(this.userAPI,e),this.error="null",this.emitter.emit("success",{userAPIId:this.id})}catch(e){let t=e.message?.split("_:_")?.[0]?.replace("status:","")??"null";this.error=t,this.result=null,this.emitter.emit("error",{userAPIId:this.id})}this.isLoading=!1,this.isPrefetched=!0,this.isLoaded=!0},this._debouncedCallUserAPI=this._makeDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0}),"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r))}_makeDebouncedCallUserAPI(){return void 0!==this.userAPI.debounce&&this.userAPI.debounce>0?a(this._innerCallUserAPI,this.userAPI.debounce,{leading:!0,trailing:!0}):this._innerCallUserAPI}async prefetch(e){await this.callUserAPI(e)}async callUserAPI(e){await this._debouncedCallUserAPI(e)}update(e,t,s=!0){this.userAPI=e,this._debouncedCallUserAPI=this._makeDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return u.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?u.zoom(this.result,e):this.result;if("object"==typeof(t=s)&&null!==t)return Object.entries(s);if(function(e){return Array.isArray(e)}(s))return s.map((e,t)=>[t.toString(),e]);throw function(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null===e}(s)?new Error("This path points to a value, use retrieveValue() instead. "+e?.join(".")):new Error("Path error"+e?.join("."))}var t}dispose(){}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}get autostart(){return this.userAPI.autoStart}};function g(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var A=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return A(s,t)}return d.isBoolean(e)?d.getDisplayedValue(e).toLowerCase():d.getDisplayedValue(e)},b=(e,t)=>e.map((e,s)=>{if("text"in e)return e.text;if("type"in e){if("paragraph"===e.type)return(s>0?"\n":"")+b(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return A(s,t)}}return""}).join(""),I=1e3,P=512*I,y=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=I,this._onError=e=>{this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this._scheduleReconnect()},this._onConnected=e=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=I,this._connected=!1},this._onMessage=e=>{let t,s=e.data;try{t=JSON.parse(s)}catch(e){console.error("Error parsing webhook message",e)}if(t){let e=!1;this.userWebhook.parametersSchemas.forEach(({data:s})=>{void 0!==t[s.name]&&function(e,t){let s=typeof e;return!!(("string"===t||"number"===t)&&s===t||"boolean"===t&&("true"===e||"false"===e||!0===e||!1===e)||"image"===t&&"string"===s&&e.startsWith("http"))}(t[s.name],s.type)&&(void 0===this.result&&(this.result={}),this.result[s.name]=t[s.name],e=!0)}),e&&this.emitter.emit("message",{userWebhookId:this.id})}}}connect(){clearTimeout(this.scheduledReconnectHandle),this.userWebhook.url&&(this.eventSource=new EventSource("https://hooks.spline.design/events?hashFile="+this.userWebhook.url),this.eventSource.addEventListener("message",this._onMessage),this.eventSource.addEventListener("error",this._onError),this.eventSource.addEventListener("open",this._onConnected))}disconnect(){this.eventSource?.removeEventListener("message",this._onMessage),this.eventSource?.removeEventListener("error",this._onError),this.eventSource?.removeEventListener("open",this._onConnected),this.eventSource?.close(),this._onDisconnected(),clearTimeout(this.scheduledReconnectHandle)}_scheduleReconnect(){this.reconnectWaitFor*=2,this.reconnectWaitFor>P&&(this.reconnectWaitFor=P),clearTimeout(this.scheduledReconnectHandle),this.scheduledReconnectHandle=setTimeout(()=>{this.scheduledReconnectHandle=void 0,this.connect()},this.reconnectWaitFor)}update(e){this.userWebhook=e}dispose(){this._connected&&this.disconnect()}get connected(){return this._connected}on(e,t){this.emitter.on(e,t)}off(e,t){this.emitter.off(e,t)}getParametersKeys(){return this.userWebhook.parametersSchemas.map(e=>e.data.name)}getParameterValue(e){if(this.getParametersKeys().includes(e)){if(this.result)return this.result?.[e];for(let t of this.userWebhook.parametersSchemas)if(t.data.name===e)return c.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new l(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new f(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new v(e,t,s,r)),r({createUserAPI:(e,t,s)=>new E(e,t,s),createUserWebhook:(e,t)=>new y(e,t)}),h("api-services");
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,2 +0,0 @@
1
- G ��
2
- eK�^_��RN���Gal����j�S8�����\�:� #4p�EP�f�x�-ʊ52����@�;���2������'ŵ��F��
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a as t,b as i}from"./runtime-chunk-DZNU62CT.js";import{f as s,g as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-EFBUAWKV.js";import{a as n}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import{Ec as o,Fc as e,Oc as c,Pc as r}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";function h(t){return Object.values(t).some(t=>t.length>0)}var d=new e,p=new e,f=(new c,new e,new o,new e,new r,class{constructor(t,i,a,n,o){this.actionsIn=s(t,t.inActions,a,n,o,i),this.actionsOut=s(t,t.outActions,a,n,o,i)}disconnect(){a(this.actionsIn),a(this.actionsOut)}}),u=class extends f{constructor(t,i,s,a,n,o){super(i,s,a,n,o),this.id=t,this.data=i,this.object=s,this.stage="out",this.objects=[],this.onUpdateMatrixWorld=()=>{for(let t of this.objects)if(!t.visible)return;let t=d.setFromMatrixPosition(this.objects[0].matrixWorld),i=p.setFromMatrixPosition(this.objects[1].matrixWorld),s=t.distanceTo(i)<=this.distance?"in":"out";if(this.stage!==s){this.stage=s;let t="in"===s?this.actionsIn:this.actionsOut;t.Audio.forEach(t=>t.dispatchConditional()),t.Particles.forEach(t=>t.dispatchConditional()),t.Video.forEach(t=>t.dispatchConditional()),t.Link.forEach(t=>t.dispatch()),t.Create.forEach(t=>t.dispatch()),t.Destroy.forEach(t=>t.dispatch()),t.Reset.forEach(t=>t.dispatch()),t.Transition.forEach(t=>{t.object.currentTransitionEvent!==this&&(t.object.currentTransitionEvent=this),t.init()}),t.Transition.forEach(t=>t.play()),t.Animation.forEach(t=>t.play()),t.TimelineAnimation.forEach(t=>t.play()),t.SwitchCamera.forEach(t=>t.play()),t.SceneTransition.forEach(t=>t.dispatch()),t.SetVariable.forEach(t=>t.checkConditions()),t.SetVariable.forEach(t=>t.dispatch()),t.DynamicVariablePlay.forEach(t=>t.dispatch()),t.ClearLocalStorage.forEach(t=>t.dispatch()),t.UserAPI.forEach(t=>t.dispatch())}};let{distance:e,fromObject:c,toObject:r}=i.condition;this.distance=e;for(let t of[c,r]){if(!t)throw new Error("Missing property");let i=a.find(t);if(!i)throw new Error("Missing property");this.objects.push(i)}}connect(){window.setTimeout(()=>{this.objects.forEach(t=>{t.addEventListener("updateMatrixWorld",this.onUpdateMatrixWorld),t.addEventListener("updateMatrix",this.onUpdateMatrixWorld)}),this.onUpdateMatrixWorld()},0)}disconnect(){super.disconnect(),this.stage="out",this.objects.forEach(t=>{t.removeEventListener("updateMatrixWorld",this.onUpdateMatrixWorld),t.removeEventListener("updateMatrix",this.onUpdateMatrixWorld)})}},l=class extends f{constructor(t,i,s,a,n,o){super(i,s,a,n,o),this.id=t,this.data=i,this.object=s,this.onTransitionState=({settled:t,state:i})=>{t&&i===(this.toState??null)?h(this.actionsIn)&&this.runInActions():h(this.actionsOut)&&this.runOutActions()};let{condition:e}=i;if(!e.object)throw new Error("Missing property");let c=a.find(e.object)??a.scene.find2D(e.object);if(!c)throw new Error("Missing property");if(this.toObject=c,e.state&&!this.toObject.states?.[e.state])throw new Error("Missing property");this.toState=e.state}connect(){this.toObject.addEventListener("transitionState",this.onTransitionState)}disconnect(){super.disconnect(),this.toObject.removeEventListener("transitionState",this.onTransitionState)}runOutActions(){this.actionsOut.Audio.forEach(t=>t.dispatchConditional()),this.actionsOut.Particles.forEach(t=>t.dispatchConditional()),this.actionsOut.Video.forEach(t=>t.dispatchConditional()),this.actionsOut.Link.forEach(t=>t.dispatch()),this.actionsOut.Create.forEach(t=>t.dispatch()),this.actionsOut.Destroy.forEach(t=>t.dispatch()),this.actionsOut.Reset.forEach(t=>t.dispatch()),this.actionsIn.Transition.forEach(t=>{this.drivesWatchedObject(t)||t.pause()}),this.object.currentTransitionEvent=this,this.actionsOut.Transition.forEach(t=>t.play()),this.actionsOut.Animation.forEach(t=>t.play()),this.actionsOut.TimelineAnimation.forEach(t=>t.play()),this.actionsIn.SwitchCamera.forEach(t=>t.pause()),this.actionsOut.SwitchCamera.forEach(t=>t.play()),this.actionsOut.SceneTransition.forEach(t=>t.dispatch()),this.actionsOut.SetVariable.forEach(t=>t.checkConditions()),this.actionsOut.SetVariable.forEach(t=>t.dispatch()),this.actionsOut.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actionsOut.ClearLocalStorage.forEach(t=>t.dispatch()),this.actionsOut.UserAPI.forEach(t=>t.dispatch())}runInActions(){this.actionsIn.Audio.forEach(t=>t.dispatchConditional()),this.actionsIn.Particles.forEach(t=>t.dispatchConditional()),this.actionsIn.Video.forEach(t=>t.dispatchConditional()),this.actionsIn.Link.forEach(t=>t.dispatch()),this.actionsIn.Create.forEach(t=>t.dispatch()),this.actionsIn.Destroy.forEach(t=>t.dispatch()),this.actionsIn.Reset.forEach(t=>t.dispatch()),this.actionsOut.Transition.forEach(t=>{this.drivesWatchedObject(t)||t.pause()}),this.object.currentTransitionEvent=this,this.actionsIn.Transition.forEach(t=>t.play()),this.actionsIn.Animation.forEach(t=>t.play()),this.actionsIn.TimelineAnimation.forEach(t=>t.play()),this.actionsOut.SwitchCamera.forEach(t=>t.pause()),this.actionsIn.SwitchCamera.forEach(t=>t.play()),this.actionsIn.SceneTransition.forEach(t=>t.dispatch()),this.actionsIn.SetVariable.forEach(t=>t.checkConditions()),this.actionsIn.SetVariable.forEach(t=>t.dispatch()),this.actionsIn.DynamicVariablePlay.forEach(t=>t.dispatch()),this.actionsOut.ClearLocalStorage.forEach(t=>t.dispatch()),this.actionsOut.UserAPI.forEach(t=>t.dispatch())}drivesWatchedObject(t){return t.object===this.toObject}},E=class extends t{constructor(t,i){super(t),this.eventManager=i,this.eventsPerConditions={Comparison:[],Distance:[],State:[]},this.hasVideoAction=!1}connect(){super.connect();let{page:t,sharedAssets:i}=this.eventContext;t.traverseEntity(s=>{if(s.data?.events.length)for(let{id:a,data:n}of s.data.events)if(!n.disabled&&"Conditional"===n.type)try{let o;"Comparison"===n.condition.type||("Distance"===n.condition.type?o=new u(a,n,s,t,i,this.eventManager):"State"===n.condition.type&&(o=new l(a,n,s,t,i,this.eventManager))),o&&(this.eventsPerConditions[n.condition.type].push(o),(o.actionsIn.Video.length||o.actionsOut.Video.length)&&(this.hasVideoAction=!0))}catch(t){}}),Object.values(this.eventsPerConditions).forEach(t=>t.forEach(t=>t.connect()))}disconnect(){super.disconnect(),Object.values(this.eventsPerConditions).forEach(t=>t.forEach(t=>t.disconnect()))}};i("Conditional",({eventContext:t,eventManager:i})=>new E(t,i)),n("conditional");
@@ -1 +0,0 @@
1
- import{a as e}from"./runtime-chunk-4EV5RMLQ.js";import"./runtime-chunk-EG55REW7.js";import"./runtime-chunk-RW4RXPZP.js";import"./runtime-chunk-Z34P77VA.js";import{da as t}from"./runtime-chunk-UM2WZDTE.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as i,e as a}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-LM22QQY6.js";import{b as o}from"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-EFBUAWKV.js";import{a as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import{Cc as s,Ec as d,Fc as n}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var l=(()=>{let e,t,i,a,o=!1;function r(i){!e&&!h()&&(t?.sharedGameControlGlobals.createdObjects.length??0)>0&&(e=requestAnimationFrame(s)),i&&(t=i,a=i.requestRender,!o&&typeof document<"u"&&(document.addEventListener("visibilitychange",d),o=!0))}function s(o){if(!t||!a)return e=void 0,void(i=void 0);let r=i?o-i:0,d=t.sharedGameControlGlobals.createdObjects,n=t.sharedGameControlGlobals.nCreatedPerAction,l=d.length,h=0;for(;h<l;){let e=d[h];void 0===e.userData.createdTime&&(e.userData.createdTime=o),void 0===e.userData.lifetime&&void 0===e.userData.quantity||e.userData.lifetime&&o-e.userData.createdTime<e.userData.lifetime||e.userData.quantity&&n[e.userData.actionId]<=e.userData.quantity?(e.userData.velocity&&(e.position.addScaledVector(e.userData.velocity,r/1e3),e.updateMatrix(),a()),h++):(n[e.userData.actionId]>e.userData.quantity&&n[e.userData.actionId]--,d.splice(h,1),e.removeFromParent(),t.sharedGameControlGlobals.rapierWorld&&e.rigidBody?(t.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),t.sharedGameControlGlobals.rapierWorld.removeRigidBody(e.rigidBody)):(e.bvhGeometry=void 0,t.sharedGameControlGlobals.entitiesWithTransformAnim=t.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.bvhGeometry)),l--,a())}e=h>0?requestAnimationFrame(s):void 0,i=h>0?o:void 0}function d(){h()?e&&(cancelAnimationFrame(e),e=void 0,i=void 0):r()}return{play:r,dispose:function(){e&&(cancelAnimationFrame(e),e=void 0),o&&typeof document<"u"&&(document.removeEventListener("visibilitychange",d),o=!1),t=void 0,a=void 0,i=void 0}}})();function h(){return!!document&&document.hidden}var c=new d,u=new n,m=new n,y=class{constructor(i,r,d,h,y){this.data=i,this.page=r,this.controlsManager=d,this.shared=h,this.condition=y,this.intervalId=null,this.timeoutIdQueue=[],this.uniqueId=s.generateUUID(),this.dispatch=()=>{if(!1===a(this.shared,this.condition))return!1;this.data.delay?this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay)):this.dispatchInner()},this.dispatchFromStart=()=>{if(!1===a(this.shared,this.condition))return!1;this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay))},this.dispatchThrottled=o(this.dispatch,1e3/this.data.creationSpeed),this.dispatchStart=()=>{null===this.intervalId&&(this.intervalId=window.setInterval(this.dispatch,1e3/this.data.creationSpeed))},this.dispatchStop=()=>{null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null)},this.dispatchInner=()=>{this.timeoutIdQueue.shift();let e=new t(this.object);if(e.playModeVisible=!0,e.expand(),"world"!==this.data.coordinateSystem){let t=this.data.coordinateSystem,i=this.page.scene.find(t);i&&(i.updateMatrixWorldRigid(),e.hiddenMatrix.copy(i.matrixWorldRigid))}e.scale.copy(this.object.scale),e.position.fromArray(this.data.position.map(e=>"number"==typeof e?e:0)),e.rotation.fromArray(this.data.rotation.map(e=>"number"==typeof e?e:0)),e.updateMatrix(),this.page.add(e);let i=this.controlsManager.sharedGameControlGlobals;i.createdObjects.push(e),void 0===i.nCreatedPerAction[this.uniqueId]?i.nCreatedPerAction[this.uniqueId]=1:i.nCreatedPerAction[this.uniqueId]++,e.updateWorldMatrix(!0,!0),e.traverseObject(this.traverseObjectCB),l.play(),this.controlsManager.requestRender()},this.traverseObjectCB=i=>{let a;if(i.hasNonUniformScale&&i.updateMatrixWorldRigid(),this.controlsManager.sharedGameControlGlobals.rapierWorld){if(i instanceof e){if(!i.objectForSample)return!0===i.object.dataPatched.physics.fusedBody&&"dynamic"===i.object.dataPatched.physics.rigidBody||void 0;if(i.objectForSample.dataPatched.physics.fusedBody)return;a=i.object}else if(i instanceof t)a=i.object;else if(a=i,a.dataPatched.cloner?.hideBase)return!0}else{if(i instanceof e)return;a=i instanceof t?i.object:i}"Time"===this.data.destroy?i.userData.lifetime=1e3*this.data.lifetime:"Quantity"===this.data.destroy&&(i.userData.quantity=this.data.destroyAfterQuantity,i.userData.actionId=this.uniqueId);let o=(new n).fromArray(this.data.velocity.map(e=>"number"==typeof e?e:0)),r=a.dataPatched;if(!("visibility"===r.physics.enabled?!r.visible:!r.physics.enabled)&&(this.controlsManager.sharedGameControlGlobals.rapierWorld?(this.controlsManager.addRigidBody(i,a,{fromCreate:!0,dynamic:this.data.dynamic}),"Collision"===this.data.destroy&&(i.rigidBody?.collider(0).setActiveEvents(1),i.userData.hasCollisionDestroy=!0),i.matrixWorld.decompose(u,c,m),o.applyQuaternion(c),this.data.velocity.some(e=>0!==e)&&this.data.dynamic&&i.rigidBody?.setLinvel(o.divideScalar(this.controlsManager.pixelsPerMeter),!0)):("geometry"in i.object&&this.controlsManager.addBoundsTree(i),this.data.velocity.some(e=>0!==e)&&this.data.dynamic&&(i.userData.velocity=o)),!0===a.dataPatched.physics?.fusedBody))return!0};let p=this.page.scene.find(this.data.object);if(!p)throw new Error("Missing Property");if(this.object=p,"world"!==this.data.coordinateSystem&&!this.page.scene.find(this.data.coordinateSystem))throw new Error("Missing Property");l.play(d)}dispose(){null!==this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null),this.timeoutIdQueue.forEach(e=>window.clearTimeout(e)),this.timeoutIdQueue=[],this.dispatchThrottled.cancel(),this.page.remove(...this.controlsManager.sharedGameControlGlobals.createdObjects),this.controlsManager.sharedGameControlGlobals.createdObjects=[],l.dispose()}},p=class{constructor(e,t,i,a,o){this.data=e,this.page=t,this.controlsManager=i,this.shared=a,this.condition=o,this.timeoutIdQueue=[],this.dispatchInner=()=>{this.objects.forEach(this.destroyCallback)},this.destroyCallback=e=>{this.timeoutIdQueue.shift();let t=this.page.scene.find(e);if(void 0===t)return;let i=this.controlsManager.sharedGameControlGlobals.rapierWorld,a=!i||t.dataPatched.physics?.fusedBody;if(t.cloner){for(let e of t.cloner.children)a?(e.playModeVisible=!1,e.rigidBody&&"positioned"===t.dataPatched.physics?.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),i.removeRigidBody(e.rigidBody),e.rigidBody=void 0),e.bvhGeometry&&(e.bvhGeometry=void 0)):void 0===this.clone||this.clone===e?(e.playModeVisible=!1,e.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(e.rigidBody.collider(0).handle),i.removeRigidBody(e.rigidBody),e.rigidBody=void 0)):void 0===e.playModeVisible&&(e.playModeVisible=!0);t.cloner.syncInstanceMatrices(),(a||void 0===this.clone||!1===this.clone)&&(t.visible=!1,t.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(t.rigidBody.collider(0).handle),i.removeRigidBody(t.rigidBody),t.rigidBody=void 0),t.bvhGeometry&&(t.bvhGeometry=void 0))}else t.rigidBody&&(this.controlsManager.sharedGameControlGlobals.colliderToEntity.delete(t.rigidBody.collider(0).handle),i.removeRigidBody(t.rigidBody),t.rigidBody=void 0),t.bvhGeometry&&(t.bvhGeometry=void 0),t.visible=!1;this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim=void 0===i?this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.bvhGeometry):this.controlsManager.sharedGameControlGlobals.entitiesWithTransformAnim.filter(e=>void 0!==e.rigidBody),t.destroyedInAction=!0,this.controlsManager.requestRender()},this.objects=[...e.objects]}dispatch(e){if(!1===a(this.shared,this.condition))return!1;this.clone=e,this.data.delay?this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay)):this.dispatchInner()}dispatchFromStart(){if(!1===a(this.shared,this.condition))return!1;this.timeoutIdQueue.push(window.setTimeout(this.dispatchInner,1e3*this.data.delay))}dispose(){this.timeoutIdQueue.forEach(e=>window.clearTimeout(e))}};i("Create",({data:e,page:t,eventManager:i,shared:a,actionCondition:o})=>new y(e,t,i.controlsManager,a,o)),i("Destroy",({data:e,page:t,eventManager:i,shared:a,actionCondition:o})=>new p(e,t,i.controlsManager,a,o)),r("create-destroy");
@@ -1 +0,0 @@
1
- �@�ø��\�C5�
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{k as m}from"./runtime-chunk-Q7QYJUJN.js";import"./runtime-chunk-4EV5RMLQ.js";import"./runtime-chunk-EG55REW7.js";import"./runtime-chunk-YO4ORKMI.js";import"./runtime-chunk-RW4RXPZP.js";import"./runtime-chunk-Z34P77VA.js";import"./runtime-chunk-H3LGDNH2.js";import"./runtime-chunk-BSEG6CWM.js";import"./runtime-chunk-UM2WZDTE.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import"./runtime-chunk-LM22QQY6.js";import"./runtime-chunk-RTLL6WIB.js";import"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-EFBUAWKV.js";import{a as n,f as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-K3UQCG3P.js";import"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";r("ShapeBlendGeometry",(n,r,t)=>new m(n,r,t)),n("shape-blends");
@@ -1,3 +0,0 @@
1
- 
2
- ���t{,�k~�ac��,��?��*���f%�)��"�4‡�$���D�q:Ѝ��(�^��`]�y[�k{��H������������K_�
3
- ��`$ק�P�ԟl� ����m�v�+�ATY�H`֥�|G<#�O ��]P�>qꂈ �Z/�m���e���8��M��j9 �xQ^,q��q��R��Y������G$1�G {�p:����!��Ϸ�����搟��&��!�T�h
Binary file
Binary file
@@ -1 +0,0 @@
1
- import{a as e,c as t,d as i,e as a,f as n,g as s,j as r}from"./runtime-chunk-H6NICSNO.js";import"./runtime-chunk-TICMTK6A.js";import"./runtime-chunk-NTUTXO7Q.js";import"./runtime-chunk-HD7WF3XN.js";import{a as o}from"./runtime-chunk-SKEKGUY2.js";import{a as l}from"./runtime-chunk-GGSUJEGZ.js";import{a as h,b as c}from"./runtime-chunk-2NXWM6BD.js";import"./runtime-chunk-LHMA4VIW.js";import"./runtime-chunk-FTVQTRM7.js";import{a as d}from"./runtime-chunk-AN2P4EN2.js";import"./runtime-chunk-RW4RXPZP.js";import"./runtime-chunk-Z34P77VA.js";import"./runtime-chunk-BSEG6CWM.js";import{aa as u,ga as p,ia as f}from"./runtime-chunk-UM2WZDTE.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as m,e as y}from"./runtime-chunk-M6FFVLT6.js";import{v as g}from"./runtime-chunk-LM22QQY6.js";import"./runtime-chunk-RTLL6WIB.js";import{d as v}from"./runtime-chunk-2PT2WH66.js";import"./runtime-chunk-EFBUAWKV.js";import{a as k}from"./runtime-chunk-TZCHGFVF.js";import{A as x,B as D,D as T,E as j,Ea as E,Ja as b,Ka as C,La as A,la as O,p as I,ua as M,z as w}from"./runtime-chunk-K3UQCG3P.js";import{Bc as F,Cc as S}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";var N=Math.fround;function _(e){return"pingpong"===e||"pingpong-rewind"===e}var B=class{constructor(e){this.config=e,this.effectiveCycleDuration=this.cycleDuration(0)}layout(e){let{config:t}=this;if(_(t.direction)&&e%2==1)return{startDelay:0,endDelay:0};switch(t.delayDirection){case"start-once":return 0===e?{startDelay:t.delay,endDelay:0}:{startDelay:0,endDelay:0};case"start":return{startDelay:t.delay,endDelay:0};case"end":return{startDelay:0,endDelay:t.delay};default:return{startDelay:t.delay,endDelay:t.delay}}}cycleDuration(e){let{config:t}=this,{startDelay:i,endDelay:a}=this.layout(e);return N(t.duration+i+a)}get totalDuration(){let{config:e}=this;if(-1===e.repeat)return 1/0;let t=0;for(let i=0;i<=e.repeat;i++)t=N(t+this.cycleDuration(i));return t}isFinished(e){return e>=this.totalDuration}resolve(e){let t,i,{config:a}=this,n=N(e);if("start-once"===a.delayDirection){let e=N(a.delay+a.duration);if(n<e)t=0,i=n;else{let s=N(n-e);t=1+Math.floor(N(s/a.duration)),i=N(s%a.duration)}}else if(_(a.direction)){let e=this.cycleDuration(0),s=N(e+a.duration),r=Math.floor(N(n/s)),o=N(n%s);o<e?(t=2*r,i=o):(t=2*r+1,i=N(o-e))}else{let e=this.cycleDuration(0);t=Math.floor(N(n/e)),i=N(n%e)}if(-1!==a.repeat&&t>=a.repeat+1)return null;let s,{startDelay:r}=this.layout(t),o=_(a.direction)&&t%2==1,l=r,h=N(l+a.duration);if(i<l)s=o?a.duration:0;else if(i>=h)s=o?0:a.duration;else{let e=N(i-l);s=o?N(a.duration-e):e}return{cycleIndex:t,localTime:s,isReverse:o}}},P=Math.fround;function L(e){return[...e].sort((e,t)=>e.time-t.time)}function U(e){return{easing:e.type,control1:b(e.cubicControls?.control1,[0,0]),control2:b(e.cubicControls?.control2,[1,1]),...e.springParameters}}function z(e,t){let i=[];for(let a of e??[]){let e=t(a.data);void 0!==e&&i.push({time:a.data.time,ease:U(a.data.easing),value:e})}return{keyframes:L(i)}}function G(t,i){if(0===t.keyframes.length)return;let{index0:a,index1:n,t:s}=function(t,i){if(0===t.length)throw new Error("sampleKeyframes requires at least one keyframe");if(i<=t[0].time)return{index0:0,index1:0,t:1};let{found:a,index:n}=function(e,t){let i=e.length,a=0,n=i;for(;a<n;){let s=a+Math.floor(i/2),r=e[s].time;if(r<t)a=s+1;else{if(!(r>t))return{found:!0,index:s};n=s}i=n-a}return{found:!1,index:a}}(t,i);if(a)return{index0:n,index1:n,t:1};if(n>=t.length){let e=t.length-1;return{index0:e,index1:e,t:1}}let s=n-1,r=n,o=t[s].time,l=t[r].time;if(l===o)return{index0:s,index1:r,t:.5};let h=P(l-o),c={...t[s].ease,control2:t[r].ease.control2};return{index0:s,index1:r,t:e(c,h,P(P(i-o)/h))}}(t.keyframes,i),r=t.read;if(r&&r.index0===a&&r.index1===n&&r.t===s)return;let o={index0:a,index1:n,from:t.keyframes[a].value,to:t.keyframes[n].value,t:s};return t.read=o,o}function V(e){e.read=void 0}function R(e,t,i){return e+(t-e)*i}function W(e,t,i){!e||(e[t]={...e[t],...i})}function K(e,s,r,l,u,p,m){let y=()=>{m.transform=!0,m.bounds=!0,m.boolean=!0,m.render=!0};switch(e.on){case"position":case"scale":{let t=G(e.track,r);if(!t)return;let i=R(t.from,t.to,t.t);return s[e.on][e.axis]=i,W(p,e.on,{[e.axis]:i}),void y()}case"rotation":{let t=G(e.track,r);if(!t)return;let i=R(t.from,t.to,t.t);return s.rotation[e.axis]=i*S.DEG2RAD,W(p,"rotation",{[e.axis]:i}),void y()}case"shapeSize":{let t=G(e.track,r);if(!(t&&s instanceof f))return;let i=R(t.from,t.to,t.t);return s.userData.value={...s.userData.value,[e.axis]:i},W(p,"shapeSize",{[e.axis]:i}),m.size=!0,m.bounds=!0,m.boolean=!0,void(m.render=!0)}case"opacity":{let t=G(e.track,r);if(!t||!(s instanceof g)||Array.isArray(s.material))return;let i=s.material.getLayersOfType("light")[0];if(void 0===i)return;let a=S.lerp(t.from,t.to,t.t);return s.material.transparent=!0,n("alphaOverride",i,{alphaOverride:a},{alphaOverride:a+1},0,l.shared),p&&(p.opacity=a),void(m.render=!0)}case"material":{let t=G(e.track,r);if(!t||0===Object.keys(t.from).length||0===Object.keys(t.to).length)return;let{layer:i}=e,a={};for(let e in i.data){if(!(e in t.from)||!(e in t.to))continue;let r=Z(t.from[e],t.to[e],t.t,u);if(void 0===r)continue;a[e]=r;let o=i.getValue(e);void 0!==o&&("alpha"===e&&"number"==typeof o&&o>0&&s instanceof g&&!Array.isArray(s.material)&&(s.material.transparent=!0),n(e,i,t.from,t.to,t.t,l.shared))}return W(p,"material",{[i.uuid]:a}),void(m.render=!0)}case"light":{let t=G(e.track,r);if(!t||!(s instanceof h||s instanceof o||s instanceof c))return;let i=Z(t.from,t.to,t.t,u);return s[e.field]=i,W(p,"light",{[e.field]:i}),void(m.render=!0)}case"camera":{let t=G(e.track,r);if(!(t&&s instanceof d))return;let i=R(t.from,t.to,t.t);return s[e.field]=i,void W(p,"camera",{[e.field]:i})}case"cloner":{let t=G(e.track,r);if(!t)return;let n=s.cloner?.parameters,o=i(n,t.from,t.to,t.t);return a(n,o),W(p,"cloner",o),m.cloner=!0,m.boolean=!0,void(m.render=!0)}case"pathExtrusion":{let i=G(e.track,r);if(!i||!v(s))return;let a=t(O,i.from,i.to,i.t),n=s.geometry.userData.parameters;return n.extrusion={...n.extrusion,...a},W(p,"pathExtrusion",a),s.updateGeometryInteractions({extrusion:{...n.extrusion}},l.shared),m.bounds=!0,m.boolean=!0,void(m.render=!0)}case"pathSnapping":{let i=G(e.track,r);if(!i)return;let a=s,n=t(M,i.from,i.to,i.t);return a.userData.pathSnapping={...a.userData.pathSnapping,...n},W(p,"pathSnapping",n),a.updatePathSnapping(a.userData.pathSnapping),void(m.render=!0)}}}function Z(e,t,i,a){if("string"==typeof e&&a&&(e=a.color(e)),"string"==typeof t&&a&&(t=a.color(t)),"number"==typeof e)return S.lerp(e,t,i);if(j.is(e))return j.lerp(e,t,i);if(T.is(e))return T.lerp(e,t,i);if(Array.isArray(e))return(e.length>t.length?t:e).map((a,n)=>{if(Array.isArray(a)){let a=e[n].length>t[n].length?t[n].length:e[n].length;return(4===a?D:3===a?x:w).lerp(e[n],t[n],i)}return S.lerp(e[n],t[n],i)});if("object"==typeof e&&null!==e){let n={};for(let s in e){let r=Z(e[s],t[s],i,a);void 0!==r&&(n[s]=r)}return n}}var X=new Map,H=new Map,Q=class extends F{constructor(e,t,i,a,n,s,r){super(),this.id=e,this.data=t,this.scene=i,this.sharedAssets=a,this.object=n,this.eventType=s,this.actionCondition=r,this.evaluators=[],this.elapsed=0,this.lastTime=null,this.direction=1,this._playing=!1,this._finished=!1,this.hasPlayedOnce=!1,this.pauseOnNextCycleEnd=!1,this.lastCycleIndex=0;try{let e=E.findTimeline(this.scene.data.objects,this.data.timeline),t=e.duration;this.animatedObjectIds=Object.keys(e.objectTimelines),this.animatedObjectIds.forEach(n=>{let s=this.scene.find(n);if(!s)return;let r=e.objectTimelines[n];!r||this.evaluators.push(function(e,t,i,a,n){let s=function(e,t){let i=[];return C.groupKeyframes(t.keyframes).forEach(t=>{let a=t.path?.[0],n=t.path[1],s=()=>z(t.keyframes,e=>e.value);switch(a){case"position":case"rotation":case"scale":return void(n&&A.includes(n)&&i.push({on:a,axis:n,track:s()}));case"shape size":return void(n&&A.includes(n)&&"geometry"in e&&i.push({on:"shapeSize",axis:n,track:s()}));case"path extrusion":return void(v(e)&&i.push({on:"pathExtrusion",track:z(t.keyframes,e=>e.value)}));case"path snapping":return void(e.data.pathSnapping&&i.push({on:"pathSnapping",track:z(t.keyframes,e=>e.value)}));case"material":return void("Mesh"===e.type&&"material"in e&&function(e,t){let i=p(e.material)?e.material:void 0,a=t.layerId;if(!i||!a)return[];let n=t.keyframes.some(e=>u(e.data.value?.noiseStrength)),s=i.ensureRainbowNoiseCompiled,r=e=>{n&&"function"==typeof s&&s.call(i,e)},o=e=>"data"in e?[{on:"material",layer:e,track:z(t.keyframes,e=>e.value)}]:[];r(a);let l=i.getLayerByUuid(a);if(l)return o(l);let h=t.path[1];for(let e of i.getLayersOfType(h))r(e.uuid);return(i.getLayersOfType(h)??[]).flatMap(o)}(e,t).forEach(e=>i.push(e)));case"opacity":return void("Mesh"===e.type&&"material"in e&&i.push({on:"opacity",track:s()}));case"cloner":return void i.push({on:"cloner",track:z(t.keyframes,e=>e.value)});case"camera":return void(e instanceof d&&i.push({on:"camera",field:"zoom",track:s()}));case"light":return void((e instanceof h||e instanceof o||e instanceof c)&&i.push({on:"light",field:t.path[1],track:z(t.keyframes,e=>e.value)}))}}),i}(e,t);return{duration:i,evaluate(t,i){e.resetBBoxNeedsUpdate();let r={transform:!1,size:!1,cloner:!1,bounds:!1,boolean:!1,render:!1};for(let o of s)K(o,e,t,a,n,i,r);!function(e,t,i){if(t.size&&e instanceof f){let{x:t,y:a,z:n}=e.userData.value;e.updateGeometryInteractions({width:t,height:a,depth:n},i.shared)}t.cloner&&e.cloner?.update(i),t.transform&&e.updateMatrix(),t.bounds&&e.resetBBoxNeedsUpdate(),t.boolean&&e instanceof f&&e.invalidateDownstreamBooleanData(),t.render&&e.dispatchEvent({type:"requestRender"})}(e,r,a)},invalidate(){for(let e of s)V(e.track)}}}(s,{...r},t,{scene:i,shared:a},this.sharedAssets))}),this.schedule=new B((l=this.data,{duration:t,delay:N(l.delay/1e3),delayDirection:l.delayDirection??"start-end",direction:l.direction??"normal",repeat:l.repeat}))}catch(e){throw new Error("Missing property")}var l;n&&(H.has(n.uuid)?H.get(n.uuid).push(this):H.set(n.uuid,[this])),X.set(e,this)}get playing(){return this._playing}get finished(){return this._finished}get paused(){return!this._playing}update(e){null!==this.lastTime&&(this.elapsed=Math.max(0,this.elapsed+(e-this.lastTime)*this.direction)),this.lastTime=e,this.applyAtElapsed()}applyAtElapsed(){if(-1===this.direction&&0===this.elapsed)return void this.pause();let e=this.schedule.resolve(this.elapsed);if(e){if(e.cycleIndex!==this.lastCycleIndex&&(this.lastCycleIndex=e.cycleIndex,this.pauseOnNextCycleEnd))return this.pauseOnNextCycleEnd=!1,void this.pause();for(let t of this.evaluators)t.evaluate(e.localTime)}else 1===this.direction&&this.schedule.isFinished(this.elapsed)&&this.finish()}finish(){this.pause(),this._finished=!0,this.animatedObjectIds.forEach(e=>{let t=this.scene.find(e);t instanceof d&&t.dispatchEvent(r)})}startTicking(){this._playing=!0,this.lastTime=null;for(let e of this.evaluators)e.invalidate();l.add(this)}play(){let e=void 0!==this.eventType&&I(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&this.paused&&this.elapsed>0&&!this._finished;if(void 0!==this.eventType&&I(this.eventType)&&"Once"===this.data.runMode&&this.hasPlayedOnce&&!e||void 0===this.eventType&&this._finished)return!1;this.hasPlayedOnce=!0,this.animatedObjectIds.forEach(e=>{let t=this.scene.find(e);t instanceof d&&t.dispatchEvent(s)}),!e&&(0===this.elapsed||this._finished)&&(this.elapsed=0,this.lastCycleIndex=0,this._finished=!1),this.direction=1,this.startTicking()}pause(){this._playing=!1,this.lastTime=null,l.remove(this)}stop(){this.pause(),this.elapsed=0,this.lastCycleIndex=0,this.applyAtElapsed(),this._finished=!1}seek(e){let t=this.schedule.totalDuration;this.elapsed=e*(Number.isFinite(t)?t:this.schedule.effectiveCycleDuration);for(let e of this.evaluators)e.invalidate();this.applyAtElapsed()}toggle(e){let t=e??-1===this.direction;this._playing&&this.direction===(t?1:-1)?t&&(this.pauseOnNextCycleEnd=!1):(t?(this._finished&&(this.elapsed=0,this.lastCycleIndex=0,this._finished=!1),this.direction=1,this.pauseOnNextCycleEnd=!1):(this.direction=this.schedule.resolve(this.elapsed)?.isReverse?1:-1,this.pauseOnNextCycleEnd=!0),this.startTicking())}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){this.pause()}},Y=class{constructor(e){this.data=e}dispatch(){this.data.playTimeline?this.pauseTimeline(this.data.playTimeline):this.data.object?this.pauseAllTimelinesFromObject(this.data.object):this.pauseAllTimelines()}pauseTimeline(e){let t=this.getTimelineActions(e);!t.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(e=>{e[this.data.interaction]()}),this.disposeDelay()},this.data.delay)):t.forEach(e=>{e[this.data.interaction]()}))}getTimelineActions(e){let t=X.get(e);return t?[t]:[...X.values()].filter(t=>t.data.timeline===e)}pauseAllTimelinesFromObject(e){let t=H.get(e);!t?.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{t.forEach(e=>e[this.data.interaction]()),this.disposeDelay()},this.data.delay)):t.forEach(e=>e[this.data.interaction]()))}pauseAllTimelines(){let e=[...H.values()];!e.length||(this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{e.forEach(e=>{e.forEach(e=>{e[this.data.interaction]()})}),this.disposeDelay()},this.data.delay)):e.forEach(e=>{e.forEach(e=>{e[this.data.interaction]()})}))}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){clearTimeout(this.timeoutId),delete this.timeoutId}},q=class{constructor(e,t,i,a,n,s,r){this.data=t;let o="interaction"in t?t.interaction:"play";if("play"===o||void 0===o)this.interaction=new Q(e,t,i,a,n,s,r);else{if("pause"!==o&&"stop"!==o)throw new Error("Missing property");this.interaction=new Y(t)}}get playing(){return this.interaction instanceof Q&&this.interaction.playing}get finished(){return!(this.interaction instanceof Q)||this.interaction.finished}get paused(){return!(this.interaction instanceof Q)||this.interaction.paused}play(){if(this.interaction instanceof Q)return this.interaction.play();this.interaction.dispatch()}stop(){this.interaction instanceof Q&&this.interaction.stop()}seek(e){this.interaction instanceof Q&&this.interaction.seek(e)}toggle(e){this.interaction instanceof Q?this.interaction.toggle(e):this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof Q?this.interaction.playFromCurrent():this.interaction.dispatch()}dispatchConditional(){this.interaction instanceof Q?y(this.interaction.sharedAssets,this.interaction.actionCondition)&&this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof Q&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};m("TimelineAnimation",({id:e,data:t,page:i,shared:a,object:n,eventType:s,actionCondition:r})=>new q(e,t,i.scene,a,n,s,r)),k("timeline");
@@ -1 +0,0 @@
1
- import{i as t,k as i,l as e,m as s,n}from"./runtime-chunk-H6NICSNO.js";import"./runtime-chunk-TICMTK6A.js";import"./runtime-chunk-NTUTXO7Q.js";import{a as r,b as a,d as o}from"./runtime-chunk-JXO7S6TH.js";import"./runtime-chunk-HD7WF3XN.js";import{a as h}from"./runtime-chunk-GGSUJEGZ.js";import"./runtime-chunk-LHMA4VIW.js";import"./runtime-chunk-FTVQTRM7.js";import{a as c}from"./runtime-chunk-AN2P4EN2.js";import"./runtime-chunk-RW4RXPZP.js";import"./runtime-chunk-Z34P77VA.js";import"./runtime-chunk-BSEG6CWM.js";import"./runtime-chunk-UM2WZDTE.js";import"./runtime-chunk-4YV3EXSU.js";import"./runtime-chunk-NSD7DU3P.js";import{b as d,e as m}from"./runtime-chunk-M6FFVLT6.js";import"./runtime-chunk-LM22QQY6.js";import"./runtime-chunk-RTLL6WIB.js";import{e as l}from"./runtime-chunk-2PT2WH66.js";import{a as u}from"./runtime-chunk-EFBUAWKV.js";import{a as p}from"./runtime-chunk-TZCHGFVF.js";import{p as g}from"./runtime-chunk-K3UQCG3P.js";import{Bc as A,Cc as f}from"./runtime-chunk-BVVSZMXD.js";import"./runtime-chunk-ML3Z74BL.js";function y(t){let i=t.tweens[0]?.data;return{delay:i?.delay??t.delay,delayDirection:i?.delayDirection??"start-once",direction:i?.direction??t.direction,repeat:i?.repeat??t.repeat}}var j={state:null,duration:0,delay:0,delayDirection:"start-once",direction:"normal",repeat:0,easing:0},T=class extends A{constructor(t,i,s,n,r,a){if(super(),this.eventType=t,this.data=i,this.page=s,this.shared=n,this.condition=r,this.runModeOverride=a,this.tweens=[],this.hasPlayedOnce=!1,this.inert=e,!i.object)throw new Error("Missing property");let o=this.page.scene.find(i.object)??this.page.uiCanvas?.find(i.object)??this.page.scene.find2DInUIObjects(i.object);if(!o)throw new Error("Missing property");if(!o.states)throw new Error("Missing property");if(this.object=o,i.tweens.length<2)throw new Error("Missing property");this.init()}get playing(){return!0===this.runner?.isPlaying}get animating(){return!0===this.runner?.isAnimating}get claimTime(){return this.runner?.claimTime}get contested(){let t=this.object.previousAction;return null!==t&&t!==this&&t.animating}init(){this.initialCurrentState=i(this.object,this.object.currentState).id,this.build()}get runMode(){return void 0!==this.runModeOverride?this.runModeOverride:g(this.eventType)?this.data.runMode:"Repeat"}get currentState(){return"Toggle"===this.runMode?this.initialCurrentState:this.object.currentState}build(){let i=this.data.tweens,e=[];try{let t=i[0].data.state;void 0!==t&&e.push(new n(this.object,t,t,j,this.shared,this.data.allowSlerp??!1,this.page,{},()=>this.inert));for(let t=1;t<i.length;t++){let s=i[t-1],r=i[t];e.push(new n(this.object,void 0===s.data.state?this.currentState:s.data.state,void 0===r.data.state?this.currentState:r.data.state,r.data,this.shared,this.data.allowSlerp??!1,this.page,{},()=>this.inert))}}catch(t){return void(t instanceof Error&&console.error(t.message))}this.tweens=e,this.syncInert(),this.runner=new o({...t(y(this.data)),runMode:this.runMode},e.map(t=>t.runner),{claim:t=>this.claimObject(t),assignCurrentState:()=>this.rebindTweens(),isOwner:()=>this.object.previousAction===this})}claimObject(t){if(this.object.previousAction===this)return!1;let i=this.object.previousAction;if(!0===i?.animating){if(void 0!==t&&void 0!==i.claimTime&&i.claimTime>t)return!1;i.pause()}return this.object.previousAction=this,!0}rebindTweens(){for(let t of this.tweens)try{t.rebind()}catch(t){t instanceof Error&&console.error(t.message)}this.syncInert(),this.object instanceof c&&this.object.wasMovedByUser&&(this.object.wasMovedByUser=!1)}syncInert(){this.inert=s(this.tweens.flatMap(t=>t.endpointData));for(let t of this.tweens)t.refresh()}update(t){this.runner?.update(t),!0!==this.runner?.isPlaying&&h.remove(this)}play(){if(!1===m(this.shared,this.condition)||"Once"===this.runMode&&this.hasPlayedOnce)return!1;this.hasPlayedOnce=!0,this.start()}start(){!this.runner||(this.runner.play(h.time),this.runner.isPlaying&&h.add(this))}pause(){this.runner?.stop(),h.remove(this)}stop(){this.pause();let t=void 0===this.data.tweens[0].data.state?this.initialCurrentState:this.data.tweens[0].data.state;l(this.object)?this.object.changeSelectedState(t,{shared:this.shared}):this.object.changeSelectedState(t,{scene:this.page.scene,shared:this.shared}),this.object.currentState=t}seek(t){if(!1===m(this.shared,this.condition))return!1;this.runner?.seek(t)}playDirected(t){if(!1===m(this.shared,this.condition))return!1;!this.runner||(this.runner.playDirected(h.time,t),this.runner.isPlaying&&h.add(this))}playFromCurrent(){this.playDirected(!0)}reverseFromCurrent(){this.playDirected(!1)}dispose(){this.pause()}},w=new Map,b=new WeakSet;function C(t,i){if(void 0===i)return;let e=t.scene.find(i);return e&&Array.isArray(e.identity)?e.identity[0]:i}var I=class extends A{constructor(t,i,e,s,n){super(),this.page=i,this.animationControls=e,this.shared=s,this.condition=n,this.startOnceDelay=0,this.toggleIsForward=!1;let a=C(i,t.object)??t.object;this.data={...t,object:a};let o=this.animationControls.clipIdToAction[t.clipId+"/"+a];if(this.duration=o?.getClip()?.duration??1,this.data.crop2){let t=r(o?.getClip());this.leftFrameTime=this.data.crop2[0]/(t-1)*this.duration,this.rightFrameTime=this.data.crop2[1]/(t-1)*this.duration}else{let t=o?.getClip()?.tracks[0]?.times.length;t&&t>1?(this.leftFrameTime=this.data.crop[0]/t*this.duration,this.rightFrameTime=this.data.crop[1]/t*this.duration):(this.leftFrameTime=0,this.rightFrameTime=this.duration)}this.startOnceDelay=t.delay;let h=w.get(a);h||(h=new Set,w.set(a,h)),h.add(this)}get playing(){return this.threeAnimAction?.isRunning()??!1}cancelPending(){window.clearTimeout(this.timeoutId),delete this.timeoutId}resume(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object];return!(!t||!b.has(t)||(b.delete(t),this.threeAnimAction=t,t.paused=!1,t.play(),this.animationControls.requestRender(),0))}play(t=!1){if(!1===m(this.shared,this.condition))return!1;window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout(()=>{if(this.resume()||(this.threeAnimAction=this.animationControls.play(this.data),!this.threeAnimAction))return;b.delete(this.threeAnimAction),this.threeAnimAction.reset(),this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime;let i=this.data.object;Object.entries(this.animationControls.clipIdToAction).forEach(([e,s])=>{let n=e.split("/")[1];this.threeAnimAction!==s&&n===i&&(t?s.fadeOut(.2):s.stop())}),t&&this.threeAnimAction?.fadeIn(.2)},this.startOnceDelay)}pause(){this.threeAnimAction&&(this.threeAnimAction.paused=!0),this.cancelPending()}stop(){this.threeAnimAction?.fadeOut(.2)}seek(t){this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction&&(this.threeAnimAction.paused=!0,this.threeAnimAction.time=f.clamp(this.threeAnimAction.time+1/60*t,this.leftFrameTime,this.rightFrameTime-16e-5),this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}toggle(t,i=!1){if(!1===m(this.shared,this.condition))return!1;this.toggleIsForward=t??!this.toggleIsForward,this.threeAnimAction&&(this.threeAnimAction._loopCount=0),this.playing||this.resume()?this.threeAnimAction&&(this.threeAnimAction.timeScale=this.toggleIsForward?1:-1,this.toggleIsForward?(this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime)):this.timeoutId=window.setTimeout(()=>{if(this.threeAnimAction=this.animationControls.play(this.data),this.threeAnimAction){this.toggleIsForward?(this.threeAnimAction.time=this.leftFrameTime,this.threeAnimAction._clip.start=this.leftFrameTime,this.threeAnimAction._clip.duration=this.rightFrameTime):(this.threeAnimAction.time=this.rightFrameTime,this.threeAnimAction._clip.start=this.rightFrameTime,this.threeAnimAction._clip.duration=this.leftFrameTime),this.threeAnimAction.paused=!1,this.threeAnimAction.timeScale=this.toggleIsForward?1:-1;let t=this.data.clipId.split("/")[1];Object.entries(this.animationControls.clipIdToAction).forEach(([e,s])=>{let n=e.split("/")[1];this.threeAnimAction!==s&&n===t&&s.isRunning()&&(i?s.fadeOut(.2):s.stop())}),i&&this.threeAnimAction?.fadeIn(.2)}},this.startOnceDelay)}playFromCurrent(){this.toggle(!0)}reverseFromCurrent(){this.toggle(!1)}dispose(){let t=this.animationControls.clipIdToAction[this.data.clipId+"/"+this.data.object]?.getClip();t&&(t.duration=this.duration),this.pause();let i=w.get(this.data.object);i&&(i.delete(this),0===i.size&&w.delete(this.data.object))}},F=class{constructor(t,i,e){this.data=t,this.page=i,this.animationControls=e,this.objectId=C(i,t.object)}dispatch(){this.data.delay>0?(this.disposeDelay(),this.timeoutId=window.setTimeout(()=>{this.apply(),this.disposeDelay()},this.data.delay)):this.apply()}targetsClip(t,i){return!(void 0!==this.objectId&&i!==this.objectId||this.data.clipId&&t!==this.data.clipId)}apply(){(void 0!==this.objectId?[w.get(this.objectId)]:[...w.values()]).forEach(t=>{t?.forEach(t=>{this.targetsClip(t.data.clipId,t.data.object)&&t.cancelPending()})});let t=!1;Object.entries(this.animationControls.clipIdToAction).forEach(([i,e])=>{let[s,n]=i.split("/");if(this.targetsClip(s,n))if("pause"===this.data.interaction){if(!e.isRunning())return;e.paused=!0,b.add(e)}else{if(!e.enabled||!e.isRunning()&&!e.paused)return;e.paused=!0,b.delete(e),e.time=e._clip.start??0,e._loopCount=-1,t=!0}}),t&&(this.animationControls.needsUpdate=!0,this.animationControls.requestRender())}disposeDelay(){clearTimeout(this.timeoutId),delete this.timeoutId}dispose(){this.disposeDelay()}},v=class{constructor(t,i,e,s,n){u.isPause(t)?this.interaction=new F(t,i,e):this.interaction=new I(t,i,e,s,n)}get data(){return this.interaction.data}get playing(){return this.interaction instanceof I&&this.interaction.playing}play(t=!1){if(this.interaction instanceof I)return this.interaction.play(t);this.interaction.dispatch()}pause(){this.interaction instanceof I&&this.interaction.pause()}stop(){this.interaction instanceof I&&this.interaction.stop()}seek(t){this.interaction instanceof I&&this.interaction.seek(t)}toggle(t,i=!1){if(this.interaction instanceof I)return this.interaction.toggle(t,i);this.interaction.dispatch()}playFromCurrent(){this.interaction instanceof I?this.interaction.playFromCurrent():this.interaction.dispatch()}reverseFromCurrent(){this.interaction instanceof I&&this.interaction.reverseFromCurrent()}dispose(){this.interaction.dispose()}};a(n),d("Transition",({eventType:t,data:i,page:e,shared:s,actionCondition:n,runModeOverride:r})=>new T(t,i,e,s,n,r)),d("Animation",({data:t,page:i,eventManager:e,shared:s,actionCondition:n})=>new v(t,i,e.animationControls,s,n)),p("transitions");
Binary file
Binary file
Binary file
Binary file