@splinetool/runtime 2.0.3 → 2.0.4

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 (334) hide show
  1. package/build/hana-ui.js +46 -31
  2. package/build/hana-ui.js.br +0 -0
  3. package/build/hana-ui.js.gz +0 -0
  4. package/build/hana-ui.wasm +0 -0
  5. package/build/hana-ui.wasm.br +0 -0
  6. package/build/hana-ui.wasm.gz +0 -0
  7. package/build/runtime-aiAssistant-RMA2DMFU.js +1 -0
  8. package/build/runtime-aiAssistant-RMA2DMFU.js.br +0 -0
  9. package/build/runtime-aiAssistant-RMA2DMFU.js.gz +0 -0
  10. package/build/runtime-apiServices-KA4FEP5Y.js +1 -0
  11. package/build/runtime-apiServices-KA4FEP5Y.js.br +0 -0
  12. package/build/runtime-apiServices-KA4FEP5Y.js.gz +0 -0
  13. package/build/{runtime-audio-Y3GYW4YQ.js → runtime-audio-BQSRM3W2.js} +1 -1
  14. package/build/runtime-audio-BQSRM3W2.js.br +0 -0
  15. package/build/runtime-audio-BQSRM3W2.js.gz +0 -0
  16. package/build/{runtime-chunk-MVRGHRTL.js → runtime-chunk-36FZTFCC.js} +1 -1
  17. package/build/runtime-chunk-36FZTFCC.js.br +0 -0
  18. package/build/runtime-chunk-36FZTFCC.js.gz +0 -0
  19. package/build/{runtime-chunk-ZHNGVKGZ.js → runtime-chunk-3J5YHSQW.js} +1 -1
  20. package/build/runtime-chunk-3J5YHSQW.js.br +0 -0
  21. package/build/runtime-chunk-3J5YHSQW.js.gz +0 -0
  22. package/build/{runtime-chunk-32ZE2X4C.js → runtime-chunk-4I22JDL6.js} +1 -1
  23. package/build/runtime-chunk-4I22JDL6.js.br +0 -0
  24. package/build/runtime-chunk-4I22JDL6.js.gz +0 -0
  25. package/build/{runtime-chunk-Z5OH244S.js → runtime-chunk-5XUI4Z6R.js} +1 -1
  26. package/build/runtime-chunk-5XUI4Z6R.js.br +0 -0
  27. package/build/runtime-chunk-5XUI4Z6R.js.gz +0 -0
  28. package/build/runtime-chunk-6UUF5VIS.js +1 -0
  29. package/build/runtime-chunk-6UUF5VIS.js.br +0 -0
  30. package/build/runtime-chunk-6UUF5VIS.js.gz +0 -0
  31. package/build/{runtime-chunk-RAAW7WHN.js → runtime-chunk-CIBY4YG3.js} +1 -1
  32. package/build/runtime-chunk-CIBY4YG3.js.br +0 -0
  33. package/build/runtime-chunk-CIBY4YG3.js.gz +0 -0
  34. package/build/{runtime-chunk-XTKPUDRE.js → runtime-chunk-DKGQ6OYZ.js} +1 -1
  35. package/build/runtime-chunk-DKGQ6OYZ.js.br +0 -0
  36. package/build/runtime-chunk-DKGQ6OYZ.js.gz +0 -0
  37. package/build/{runtime-chunk-4FAMJWEB.js → runtime-chunk-DSJY3WL2.js} +1 -1
  38. package/build/runtime-chunk-DSJY3WL2.js.br +0 -0
  39. package/build/runtime-chunk-DSJY3WL2.js.gz +0 -0
  40. package/build/{runtime-chunk-W7THORYR.js → runtime-chunk-ESZD4IRS.js} +1 -1
  41. package/build/runtime-chunk-ESZD4IRS.js.br +0 -0
  42. package/build/runtime-chunk-ESZD4IRS.js.gz +0 -0
  43. package/build/{runtime-chunk-NGWM5WPD.js → runtime-chunk-GPACKOH2.js} +1 -1
  44. package/build/runtime-chunk-GPACKOH2.js.br +0 -0
  45. package/build/runtime-chunk-GPACKOH2.js.gz +0 -0
  46. package/build/{runtime-chunk-6UQ4Z4JG.js → runtime-chunk-I5QFGBIU.js} +1 -1
  47. package/build/runtime-chunk-I5QFGBIU.js.br +0 -0
  48. package/build/runtime-chunk-I5QFGBIU.js.gz +0 -0
  49. package/build/{runtime-chunk-EXHPAC6T.js → runtime-chunk-JNSHQPHC.js} +1 -1
  50. package/build/runtime-chunk-JNSHQPHC.js.br +0 -0
  51. package/build/runtime-chunk-JNSHQPHC.js.gz +0 -0
  52. package/build/{runtime-chunk-TQBPVLGB.js → runtime-chunk-LT4UVXE2.js} +1 -1
  53. package/build/runtime-chunk-LT4UVXE2.js.br +0 -0
  54. package/build/runtime-chunk-LT4UVXE2.js.gz +0 -0
  55. package/build/{runtime-chunk-Y2GFSK5L.js → runtime-chunk-NTW4X3NC.js} +1 -1
  56. package/build/runtime-chunk-NTW4X3NC.js.br +0 -0
  57. package/build/runtime-chunk-NTW4X3NC.js.gz +0 -0
  58. package/build/runtime-chunk-OOC7YSI5.js +1 -0
  59. package/build/runtime-chunk-OOC7YSI5.js.br +0 -0
  60. package/build/runtime-chunk-OOC7YSI5.js.gz +0 -0
  61. package/build/runtime-chunk-QVC5UDJO.js +1 -0
  62. package/build/runtime-chunk-QVC5UDJO.js.br +0 -0
  63. package/build/runtime-chunk-QVC5UDJO.js.gz +0 -0
  64. package/build/runtime-chunk-R7NC6CZZ.js +1 -0
  65. package/build/runtime-chunk-R7NC6CZZ.js.br +0 -0
  66. package/build/runtime-chunk-R7NC6CZZ.js.gz +0 -0
  67. package/build/{runtime-chunk-D2IFC55F.js → runtime-chunk-RF63UVAU.js} +1 -1
  68. package/build/runtime-chunk-RF63UVAU.js.br +0 -0
  69. package/build/runtime-chunk-RF63UVAU.js.gz +0 -0
  70. package/build/{runtime-chunk-MC3OVJQU.js → runtime-chunk-SL64ZYCB.js} +1 -1
  71. package/build/runtime-chunk-SL64ZYCB.js.br +0 -0
  72. package/build/runtime-chunk-SL64ZYCB.js.gz +0 -0
  73. package/build/{runtime-chunk-BCJEHBXX.js → runtime-chunk-TPKGBIJU.js} +1 -1
  74. package/build/runtime-chunk-TPKGBIJU.js.br +0 -0
  75. package/build/runtime-chunk-TPKGBIJU.js.gz +0 -0
  76. package/build/{runtime-chunk-ZULFQKQK.js → runtime-chunk-V5NUL7BL.js} +1 -1
  77. package/build/runtime-chunk-V5NUL7BL.js.br +1 -0
  78. package/build/runtime-chunk-V5NUL7BL.js.gz +0 -0
  79. package/build/{runtime-chunk-G5XH52BM.js → runtime-chunk-V7XDOE2W.js} +1 -1
  80. package/build/runtime-chunk-V7XDOE2W.js.br +0 -0
  81. package/build/runtime-chunk-V7XDOE2W.js.gz +0 -0
  82. package/build/{runtime-chunk-PXPQZ7SX.js → runtime-chunk-W4ZCHGLQ.js} +1 -1
  83. package/build/runtime-chunk-W4ZCHGLQ.js.br +0 -0
  84. package/build/runtime-chunk-W4ZCHGLQ.js.gz +0 -0
  85. package/build/runtime-chunk-WHKBOV2O.js +1 -0
  86. package/build/runtime-chunk-WHKBOV2O.js.br +0 -0
  87. package/build/runtime-chunk-WHKBOV2O.js.gz +0 -0
  88. package/build/{runtime-chunk-D6NWJJTR.js → runtime-chunk-WMWQXAOH.js} +1 -1
  89. package/build/runtime-chunk-WMWQXAOH.js.br +0 -0
  90. package/build/runtime-chunk-WMWQXAOH.js.gz +0 -0
  91. package/build/runtime-chunk-YFAATRJU.js +1 -0
  92. package/build/runtime-chunk-YFAATRJU.js.br +0 -0
  93. package/build/runtime-chunk-YFAATRJU.js.gz +0 -0
  94. package/build/{runtime-chunk-Q4H7PFTE.js → runtime-chunk-ZJPGZKPX.js} +1 -1
  95. package/build/runtime-chunk-ZJPGZKPX.js.br +0 -0
  96. package/build/runtime-chunk-ZJPGZKPX.js.gz +0 -0
  97. package/build/{runtime-chunk-SQKBNW2G.js → runtime-chunk-ZMXEX5NX.js} +1 -1
  98. package/build/runtime-chunk-ZMXEX5NX.js.br +0 -0
  99. package/build/runtime-chunk-ZMXEX5NX.js.gz +0 -0
  100. package/build/{runtime-classicRuntime-IFIIFBNS.js → runtime-classicRuntime-UOZ6RID5.js} +1 -1
  101. package/build/runtime-classicRuntime-UOZ6RID5.js.br +0 -0
  102. package/build/runtime-classicRuntime-UOZ6RID5.js.gz +0 -0
  103. package/build/runtime-cloners-DALMNZYL.js +1 -0
  104. package/build/runtime-cloners-DALMNZYL.js.br +0 -0
  105. package/build/runtime-cloners-DALMNZYL.js.gz +0 -0
  106. package/build/{runtime-components-LNJJ3QLB.js → runtime-components-IGNRKI6T.js} +1 -1
  107. package/build/runtime-components-IGNRKI6T.js.br +0 -0
  108. package/build/runtime-components-IGNRKI6T.js.gz +0 -0
  109. package/build/runtime-conditional-DCOFCW5I.js +1 -0
  110. package/build/runtime-conditional-DCOFCW5I.js.br +0 -0
  111. package/build/runtime-conditional-DCOFCW5I.js.gz +0 -0
  112. package/build/{runtime-createDestroy-DWI7C4WO.js → runtime-createDestroy-JLB7IIQL.js} +1 -1
  113. package/build/runtime-createDestroy-JLB7IIQL.js.br +0 -0
  114. package/build/runtime-createDestroy-JLB7IIQL.js.gz +0 -0
  115. package/build/{runtime-dragDrop-46CHKTIE.js → runtime-dragDrop-ERDSNA3S.js} +1 -1
  116. package/build/runtime-dragDrop-ERDSNA3S.js.br +0 -0
  117. package/build/runtime-dragDrop-ERDSNA3S.js.gz +0 -0
  118. package/build/runtime-gameControls-XKOQVZZC.js +1 -0
  119. package/build/runtime-gameControls-XKOQVZZC.js.br +0 -0
  120. package/build/runtime-gameControls-XKOQVZZC.js.gz +0 -0
  121. package/build/runtime-hair-EOZHA2BH.js +1 -0
  122. package/build/runtime-hair-EOZHA2BH.js.br +0 -0
  123. package/build/runtime-hair-EOZHA2BH.js.gz +0 -0
  124. package/build/{runtime-mergeStaticGeometries-O5XKFANJ.js → runtime-mergeStaticGeometries-4Y3LE3VX.js} +1 -1
  125. package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.br +0 -0
  126. package/build/runtime-mergeStaticGeometries-4Y3LE3VX.js.gz +0 -0
  127. package/build/{runtime-miscActions-IRARI4E6.js → runtime-miscActions-KIRLTM7C.js} +1 -1
  128. package/build/runtime-miscActions-KIRLTM7C.js.br +0 -0
  129. package/build/runtime-miscActions-KIRLTM7C.js.gz +0 -0
  130. package/build/runtime-mouseHover-WULIJFG2.js +1 -0
  131. package/build/runtime-mouseHover-WULIJFG2.js.br +0 -0
  132. package/build/runtime-mouseHover-WULIJFG2.js.gz +0 -0
  133. package/build/{runtime-particles-INK4LA4P.js → runtime-particles-NNV35DLD.js} +1 -1
  134. package/build/runtime-particles-NNV35DLD.js.br +0 -0
  135. package/build/runtime-particles-NNV35DLD.js.gz +0 -0
  136. package/build/{runtime-paths-LRTW3RNL.js → runtime-paths-RRXZ3PXM.js} +1 -1
  137. package/build/runtime-paths-RRXZ3PXM.js.br +0 -0
  138. package/build/runtime-paths-RRXZ3PXM.js.gz +0 -0
  139. package/build/runtime-resize-V6LZSOZB.js +1 -0
  140. package/build/runtime-resize-V6LZSOZB.js.br +0 -0
  141. package/build/runtime-resize-V6LZSOZB.js.gz +0 -0
  142. package/build/{runtime-sceneTransition-X7RGRC3W.js → runtime-sceneTransition-CP5TI3VP.js} +1 -1
  143. package/build/runtime-sceneTransition-CP5TI3VP.js.br +0 -0
  144. package/build/runtime-sceneTransition-CP5TI3VP.js.gz +0 -0
  145. package/build/{runtime-scroll-VK7XXJPE.js → runtime-scroll-Q7VGS5NM.js} +1 -1
  146. package/build/runtime-scroll-Q7VGS5NM.js.br +0 -0
  147. package/build/runtime-scroll-Q7VGS5NM.js.gz +0 -0
  148. package/build/runtime-shapeBlends-UN7GGFRG.js +1 -0
  149. package/build/runtime-shapeBlends-UN7GGFRG.js.br +0 -0
  150. package/build/runtime-shapeBlends-UN7GGFRG.js.gz +0 -0
  151. package/build/{runtime-text-KC66JGLC.js → runtime-text-N6XLUSM2.js} +1 -1
  152. package/build/runtime-text-N6XLUSM2.js.br +0 -0
  153. package/build/runtime-text-N6XLUSM2.js.gz +0 -0
  154. package/build/{runtime-textInputs-Y7CREUMS.js → runtime-textInputs-IW2E6BNU.js} +1 -1
  155. package/build/runtime-textInputs-IW2E6BNU.js.br +0 -0
  156. package/build/runtime-textInputs-IW2E6BNU.js.gz +0 -0
  157. package/build/runtime-timeline-JA2JZIS7.js +1 -0
  158. package/build/runtime-timeline-JA2JZIS7.js.br +0 -0
  159. package/build/runtime-timeline-JA2JZIS7.js.gz +0 -0
  160. package/build/{runtime-tracking-FA45SGZJ.js → runtime-tracking-M57J2PGK.js} +1 -1
  161. package/build/runtime-tracking-M57J2PGK.js.br +0 -0
  162. package/build/runtime-tracking-M57J2PGK.js.gz +0 -0
  163. package/build/{runtime-transitions-A7UP5OMB.js → runtime-transitions-PELRDE7B.js} +1 -1
  164. package/build/runtime-transitions-PELRDE7B.js.br +0 -0
  165. package/build/runtime-transitions-PELRDE7B.js.gz +0 -0
  166. package/build/runtime-ui2d-IOB5Y76W.js +1 -0
  167. package/build/runtime-ui2d-IOB5Y76W.js.br +0 -0
  168. package/build/runtime-ui2d-IOB5Y76W.js.gz +0 -0
  169. package/build/{runtime-variables-U36KPJ5V.js → runtime-variables-Q6Q2JCGI.js} +1 -1
  170. package/build/runtime-variables-Q6Q2JCGI.js.br +0 -0
  171. package/build/runtime-variables-Q6Q2JCGI.js.gz +0 -0
  172. package/build/{runtime-vectorShapes-MA6PKTF5.js → runtime-vectorShapes-ISY7MWHY.js} +1 -1
  173. package/build/runtime-vectorShapes-ISY7MWHY.js.br +0 -0
  174. package/build/runtime-vectorShapes-ISY7MWHY.js.gz +0 -0
  175. package/build/{runtime-video-7GHZOZRJ.js → runtime-video-DUDXGADJ.js} +1 -1
  176. package/build/runtime-video-DUDXGADJ.js.br +0 -0
  177. package/build/runtime-video-DUDXGADJ.js.gz +0 -0
  178. package/build/runtime-webgpu-4ZCV5EAD.js +1 -0
  179. package/build/runtime-webgpu-4ZCV5EAD.js.br +0 -0
  180. package/build/runtime-webgpu-4ZCV5EAD.js.gz +0 -0
  181. package/build/runtime.cjs +325 -325
  182. package/build/runtime.js +1 -1
  183. package/build/runtime.js.br +0 -0
  184. package/build/runtime.js.gz +0 -0
  185. package/build/runtime.standalone.js +1 -1
  186. package/build/runtime.standalone.js.br +0 -0
  187. package/build/runtime.standalone.js.gz +0 -0
  188. package/build/runtime.standalone.webgl.js +1 -1
  189. package/build/runtime.standalone.webgl.js.br +0 -0
  190. package/build/runtime.standalone.webgl.js.gz +0 -0
  191. package/build/runtime.standalone.webgpu.js +1 -1
  192. package/build/runtime.standalone.webgpu.js.br +0 -0
  193. package/build/runtime.standalone.webgpu.js.gz +0 -0
  194. package/build/runtime.standalone.webgpu.micro.js +1 -1
  195. package/build/runtime.standalone.webgpu.micro.js.br +0 -0
  196. package/build/runtime.standalone.webgpu.micro.js.gz +0 -0
  197. package/build/runtime.standalone.webgpu.min.js +1 -1
  198. package/build/runtime.standalone.webgpu.min.js.br +0 -0
  199. package/build/runtime.standalone.webgpu.min.js.gz +0 -0
  200. package/package.json +1 -1
  201. package/build/runtime-aiAssistant-XJVJ7TQB.js +0 -1
  202. package/build/runtime-aiAssistant-XJVJ7TQB.js.br +0 -0
  203. package/build/runtime-aiAssistant-XJVJ7TQB.js.gz +0 -0
  204. package/build/runtime-apiServices-KAO5SQJZ.js +0 -1
  205. package/build/runtime-apiServices-KAO5SQJZ.js.br +0 -0
  206. package/build/runtime-apiServices-KAO5SQJZ.js.gz +0 -0
  207. package/build/runtime-audio-Y3GYW4YQ.js.br +0 -0
  208. package/build/runtime-audio-Y3GYW4YQ.js.gz +0 -0
  209. package/build/runtime-chunk-32ZE2X4C.js.br +0 -0
  210. package/build/runtime-chunk-32ZE2X4C.js.gz +0 -0
  211. package/build/runtime-chunk-4FAMJWEB.js.br +0 -0
  212. package/build/runtime-chunk-4FAMJWEB.js.gz +0 -0
  213. package/build/runtime-chunk-6UQ4Z4JG.js.br +0 -0
  214. package/build/runtime-chunk-6UQ4Z4JG.js.gz +0 -0
  215. package/build/runtime-chunk-BCJEHBXX.js.br +0 -0
  216. package/build/runtime-chunk-BCJEHBXX.js.gz +0 -0
  217. package/build/runtime-chunk-D2IFC55F.js.br +0 -0
  218. package/build/runtime-chunk-D2IFC55F.js.gz +0 -0
  219. package/build/runtime-chunk-D6NWJJTR.js.br +0 -0
  220. package/build/runtime-chunk-D6NWJJTR.js.gz +0 -0
  221. package/build/runtime-chunk-EXHPAC6T.js.br +0 -0
  222. package/build/runtime-chunk-EXHPAC6T.js.gz +0 -0
  223. package/build/runtime-chunk-G5XH52BM.js.br +0 -0
  224. package/build/runtime-chunk-G5XH52BM.js.gz +0 -0
  225. package/build/runtime-chunk-MC3OVJQU.js.br +0 -0
  226. package/build/runtime-chunk-MC3OVJQU.js.gz +0 -0
  227. package/build/runtime-chunk-MM75L5X4.js +0 -1
  228. package/build/runtime-chunk-MM75L5X4.js.br +0 -0
  229. package/build/runtime-chunk-MM75L5X4.js.gz +0 -0
  230. package/build/runtime-chunk-MVRGHRTL.js.br +0 -0
  231. package/build/runtime-chunk-MVRGHRTL.js.gz +0 -0
  232. package/build/runtime-chunk-NGWM5WPD.js.br +0 -0
  233. package/build/runtime-chunk-NGWM5WPD.js.gz +0 -0
  234. package/build/runtime-chunk-NRJDJMQZ.js +0 -1
  235. package/build/runtime-chunk-NRJDJMQZ.js.br +0 -0
  236. package/build/runtime-chunk-NRJDJMQZ.js.gz +0 -0
  237. package/build/runtime-chunk-PXPQZ7SX.js.br +0 -0
  238. package/build/runtime-chunk-PXPQZ7SX.js.gz +0 -0
  239. package/build/runtime-chunk-Q4H7PFTE.js.br +0 -0
  240. package/build/runtime-chunk-Q4H7PFTE.js.gz +0 -0
  241. package/build/runtime-chunk-QFGFABLH.js +0 -1
  242. package/build/runtime-chunk-QFGFABLH.js.br +0 -0
  243. package/build/runtime-chunk-QFGFABLH.js.gz +0 -0
  244. package/build/runtime-chunk-RAAW7WHN.js.br +0 -0
  245. package/build/runtime-chunk-RAAW7WHN.js.gz +0 -0
  246. package/build/runtime-chunk-SQKBNW2G.js.br +0 -0
  247. package/build/runtime-chunk-SQKBNW2G.js.gz +0 -0
  248. package/build/runtime-chunk-TQBPVLGB.js.br +0 -0
  249. package/build/runtime-chunk-TQBPVLGB.js.gz +0 -0
  250. package/build/runtime-chunk-U5ACSO5E.js +0 -1
  251. package/build/runtime-chunk-U5ACSO5E.js.br +0 -0
  252. package/build/runtime-chunk-U5ACSO5E.js.gz +0 -0
  253. package/build/runtime-chunk-W7THORYR.js.br +0 -0
  254. package/build/runtime-chunk-W7THORYR.js.gz +0 -0
  255. package/build/runtime-chunk-XTKPUDRE.js.br +0 -0
  256. package/build/runtime-chunk-XTKPUDRE.js.gz +0 -0
  257. package/build/runtime-chunk-XV2ZLRKD.js +0 -1
  258. package/build/runtime-chunk-XV2ZLRKD.js.br +0 -0
  259. package/build/runtime-chunk-XV2ZLRKD.js.gz +0 -0
  260. package/build/runtime-chunk-Y2GFSK5L.js.br +0 -0
  261. package/build/runtime-chunk-Y2GFSK5L.js.gz +0 -0
  262. package/build/runtime-chunk-Z5OH244S.js.br +0 -0
  263. package/build/runtime-chunk-Z5OH244S.js.gz +0 -0
  264. package/build/runtime-chunk-ZHNGVKGZ.js.br +0 -0
  265. package/build/runtime-chunk-ZHNGVKGZ.js.gz +0 -0
  266. package/build/runtime-chunk-ZLW3UWOA.js +0 -1
  267. package/build/runtime-chunk-ZLW3UWOA.js.br +0 -0
  268. package/build/runtime-chunk-ZLW3UWOA.js.gz +0 -0
  269. package/build/runtime-chunk-ZULFQKQK.js.br +0 -0
  270. package/build/runtime-chunk-ZULFQKQK.js.gz +0 -0
  271. package/build/runtime-classicRuntime-IFIIFBNS.js.br +0 -0
  272. package/build/runtime-classicRuntime-IFIIFBNS.js.gz +0 -0
  273. package/build/runtime-cloners-WEF7XIM4.js +0 -1
  274. package/build/runtime-cloners-WEF7XIM4.js.br +0 -2
  275. package/build/runtime-cloners-WEF7XIM4.js.gz +0 -0
  276. package/build/runtime-components-LNJJ3QLB.js.br +0 -0
  277. package/build/runtime-components-LNJJ3QLB.js.gz +0 -0
  278. package/build/runtime-conditional-3A423CXW.js +0 -1
  279. package/build/runtime-conditional-3A423CXW.js.br +0 -0
  280. package/build/runtime-conditional-3A423CXW.js.gz +0 -0
  281. package/build/runtime-createDestroy-DWI7C4WO.js.br +0 -0
  282. package/build/runtime-createDestroy-DWI7C4WO.js.gz +0 -0
  283. package/build/runtime-dragDrop-46CHKTIE.js.br +0 -0
  284. package/build/runtime-dragDrop-46CHKTIE.js.gz +0 -0
  285. package/build/runtime-gameControls-YA2YP4UH.js +0 -1
  286. package/build/runtime-gameControls-YA2YP4UH.js.br +0 -0
  287. package/build/runtime-gameControls-YA2YP4UH.js.gz +0 -0
  288. package/build/runtime-hair-XVWLJEZC.js +0 -1
  289. package/build/runtime-hair-XVWLJEZC.js.br +0 -3
  290. package/build/runtime-hair-XVWLJEZC.js.gz +0 -0
  291. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.br +0 -0
  292. package/build/runtime-mergeStaticGeometries-O5XKFANJ.js.gz +0 -0
  293. package/build/runtime-miscActions-IRARI4E6.js.br +0 -0
  294. package/build/runtime-miscActions-IRARI4E6.js.gz +0 -0
  295. package/build/runtime-mouseHover-3LVJJIFG.js +0 -1
  296. package/build/runtime-mouseHover-3LVJJIFG.js.br +0 -0
  297. package/build/runtime-mouseHover-3LVJJIFG.js.gz +0 -0
  298. package/build/runtime-particles-INK4LA4P.js.br +0 -0
  299. package/build/runtime-particles-INK4LA4P.js.gz +0 -0
  300. package/build/runtime-paths-LRTW3RNL.js.br +0 -0
  301. package/build/runtime-paths-LRTW3RNL.js.gz +0 -0
  302. package/build/runtime-resize-4OIVU46M.js +0 -1
  303. package/build/runtime-resize-4OIVU46M.js.br +0 -0
  304. package/build/runtime-resize-4OIVU46M.js.gz +0 -0
  305. package/build/runtime-sceneTransition-X7RGRC3W.js.br +0 -0
  306. package/build/runtime-sceneTransition-X7RGRC3W.js.gz +0 -0
  307. package/build/runtime-scroll-VK7XXJPE.js.br +0 -0
  308. package/build/runtime-scroll-VK7XXJPE.js.gz +0 -0
  309. package/build/runtime-shapeBlends-VLITROES.js +0 -1
  310. package/build/runtime-shapeBlends-VLITROES.js.br +0 -2
  311. package/build/runtime-shapeBlends-VLITROES.js.gz +0 -0
  312. package/build/runtime-text-KC66JGLC.js.br +0 -0
  313. package/build/runtime-text-KC66JGLC.js.gz +0 -0
  314. package/build/runtime-textInputs-Y7CREUMS.js.br +0 -0
  315. package/build/runtime-textInputs-Y7CREUMS.js.gz +0 -0
  316. package/build/runtime-timeline-KTMKRAZU.js +0 -1
  317. package/build/runtime-timeline-KTMKRAZU.js.br +0 -0
  318. package/build/runtime-timeline-KTMKRAZU.js.gz +0 -0
  319. package/build/runtime-tracking-FA45SGZJ.js.br +0 -0
  320. package/build/runtime-tracking-FA45SGZJ.js.gz +0 -0
  321. package/build/runtime-transitions-A7UP5OMB.js.br +0 -0
  322. package/build/runtime-transitions-A7UP5OMB.js.gz +0 -0
  323. package/build/runtime-ui2d-XLYMHVMW.js +0 -1
  324. package/build/runtime-ui2d-XLYMHVMW.js.br +0 -0
  325. package/build/runtime-ui2d-XLYMHVMW.js.gz +0 -0
  326. package/build/runtime-variables-U36KPJ5V.js.br +0 -0
  327. package/build/runtime-variables-U36KPJ5V.js.gz +0 -0
  328. package/build/runtime-vectorShapes-MA6PKTF5.js.br +0 -0
  329. package/build/runtime-vectorShapes-MA6PKTF5.js.gz +0 -0
  330. package/build/runtime-video-7GHZOZRJ.js.br +0 -0
  331. package/build/runtime-video-7GHZOZRJ.js.gz +0 -0
  332. package/build/runtime-webgpu-JPQ4VPBY.js +0 -1
  333. package/build/runtime-webgpu-JPQ4VPBY.js.br +0 -0
  334. package/build/runtime-webgpu-JPQ4VPBY.js.gz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splinetool/runtime",
3
- "version": "2.0.3",
3
+ "version": "2.0.4",
4
4
  "description": "Spline is a collaborative design platform for creating production-ready interactive experiences in multiple dimensions. © 2025 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-MM75L5X4.js";import{a as n}from"./runtime-chunk-Z5OH244S.js";import{a as r}from"./runtime-chunk-TZCHGFVF.js";import"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var o=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 c(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)}},c=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())}},h=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 l(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)}},l=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())}},d=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},p=[4186.01,4434.92,4698.63,4978.03,5274.04,5587.65,5919.91,6271.93,6644.88,7040,7458.62,7902.13],u=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],f=[],v=[];for(let e=1;e<=8;e++)for(let t=0;t<p.length;t++){let s=p[t];f.push(s/Math.pow(2,8-e)),v.push(u[t]+e)}var m=[32,2e3],y=f.filter((e,t)=>f[t]>m[0]&&f[t]<m[1]),g=v.filter((e,t)=>f[t]>m[0]&&f[t]<m[1]),E=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?y:f,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?y:f,c="voice"===i?g:v}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}}};var b=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 E.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()}},C=class{constructor(t,s,i){this.data=t,this.id=s,this.shared=i,this.emitter=e(),this.rafId=0,this.voice=0,this.frequencies=new Float32Array([0]),this.events=[],this.isConnected=!1,this.isToolsAdded=!1,this.tools=[],this.onMessage=e=>{let t=JSON.parse(e.data);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"}})},this.animate=()=>{if(this.rafId=requestAnimationFrame(this.animate),this.isConnected&&this.analyser){this.analyser.update();let e=this.analyser.value,t=this.analyser.frequencies;this.voice=e,this.frequencies=t,this.emitter.emit("voice",{value:e,frequencies:t})}}}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}=d(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)return;let e=await async function(e){try{return(await(await fetch((n&&window.location.search.includes("api-dev")?"https://relayserver-dev.spline.design/":"https://relayserver.spline.design/")+"session?uuidfile="+e)).json()).token}catch(e){console.error("Token generation error:",e)}}(this.data.integration.hash);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 b(t)};let t=await navigator.mediaDevices.getUserMedia({audio:!0});this.pc.addTrack(t.getTracks()[0]),this.dc=this.pc.createDataChannel("oai-events"),this.dc.addEventListener("message",this.onMessage),this.dc.addEventListener("open",this.onOpen);let s=await this.pc.createOffer();await this.pc.setLocalDescription(s);let i={type:"answer",sdp:await(await fetch("https://api.openai.com/v1/realtime?model=gpt-4o-realtime-preview-2024-12-17",{method:"POST",body:s.sdp,headers:{Authorization:`Bearer ${e}`,"Content-Type":"application/sdp"}})).text()};await this.pc.setRemoteDescription(i),this.animate()}appendEvent(e){this.events=[e,...this.events]}sendClientEvent(e){this.dc?(e.event_id=e.event_id||crypto.randomUUID(),this.dc.send(JSON.stringify(e)),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:{tools:this.tools.map(([e])=>e)}})}registerTool(e,t){this.tools.push([e,t])}disconnect(){cancelAnimationFrame(this.rafId),this.analyser?.disconnect(),this.voice=0,this.isConnected=!1,this.isToolsAdded=!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}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 o(e,t)),s("AIAssistantTrigger",({eventContext:e,eventManager:t})=>new h(e,t)),i((e,t,s)=>new C(e,t,s)),r("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-MM75L5X4.js";import{a}from"./runtime-chunk-4KZXQGUQ.js";import{a as h}from"./runtime-chunk-Z5OH244S.js";import{a as c}from"./runtime-chunk-TZCHGFVF.js";import{Ga as d,Ha as u,o as l}from"./runtime-chunk-OW6T4XFV.js";import"./runtime-chunk-VGN7YHB7.js";import"./runtime-chunk-ML3Z74BL.js";var p=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 f(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)})}},f=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())}},m=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 v(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()})}},v=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())}},E=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(){}},g=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=I(""===e.integration.prompt?[]:JSON.parse(e.integration.prompt),t),r=""===e.integration.behavior?[]:I(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=`${h&&window.location.search.includes("api-dev")?"https://api-dev.spline.design/":"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=I(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=I(JSON.parse(e.body),t));let a=await fetch(n,{method:o?"GET":e.method,headers:o?void 0:A(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},"OpenAI"===s?.integration?.type?this.result={content:""}:"GET"===s.method&&""!==s.url&&(this.prefetchPromise=this.prefetch(r)),this._debouncedCallUserAPI=this._innerCallUserAPI,this._updateDebouncedCallUserAPI(),this._debouncedPrefetch=a(this.prefetch,1e3,{trailing:!0})}_updateDebouncedCallUserAPI(){this._debouncedCallUserAPI=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._updateDebouncedCallUserAPI(),""!==this.userAPI.url&&"GET"===this.userAPI.method&&s&&this._debouncedPrefetch(t)}retrieveValue(e){if(this.result)try{return l.zoom(this.result,e)}catch(e){console.error(e)}}retrieveZoomedKeyValues(e){if(this.result){let s=e&&e.length?l.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 A(e){let t=new Headers;return e.headers.forEach(e=>{""!==e.data.key&&t.append(e.data.key,e.data.value)}),t}var b=(e,t)=>{if("string"==typeof e){let s=t.getVariable(e);if(s)return b(s,t)}return u.isBoolean(e)?u.getDisplayedValue(e).toLowerCase():u.getDisplayedValue(e)},I=(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":"")+I(e.children,t);if("variable"===e.type){let s=t.getVariable(e.variableId);if(void 0!==s)return b(s,t)}}return""}).join(""),P=1e3,y=512*P,C=class{constructor(t,s){this.id=t,this.userWebhook=s,this.result=void 0,this._connected=!1,this.emitter=e(),this.reconnectWaitFor=P,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=P,this._connected=!0},this._onDisconnected=()=>{clearTimeout(this.scheduledReconnectHandle),this.reconnectWaitFor=P,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>y&&(this.reconnectWaitFor=y),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 d.defaultParameterValueByType(t.data.type)}}};s("API",({eventContext:e,eventManager:t})=>new p(e,t)),s("WEBHOOK",({eventContext:e,eventManager:t})=>new m(e,t)),i("UserAPI",({data:e,page:t,shared:s,actionCondition:r})=>new E(e,t,s,r)),r({createUserAPI:(e,t,s)=>new g(e,t,s),createUserWebhook:(e,t)=>new C(e,t)}),c("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
@@ -1 +0,0 @@
1
- import{a as e}from"./runtime-chunk-Z5OH244S.js";import{c as t}from"./runtime-chunk-TZCHGFVF.js";import{Ha as r,r as i}from"./runtime-chunk-OW6T4XFV.js";var n=new Map;function s(e,t){n.set(e,t)}var o=class{static get version(){return"1.3.8"}static toString(){return"JavaScript Expression Parser (JSEP) v"+o.version}static addUnaryOp(e){return o.max_unop_len=Math.max(e.length,o.max_unop_len),o.unary_ops[e]=1,o}static addBinaryOp(e,t,r){return o.max_binop_len=Math.max(e.length,o.max_binop_len),o.binary_ops[e]=t,r?o.right_associative.add(e):o.right_associative.delete(e),o}static addIdentifierChar(e){return o.additional_identifier_chars.add(e),o}static addLiteral(e,t){return o.literals[e]=t,o}static removeUnaryOp(e){return delete o.unary_ops[e],e.length===o.max_unop_len&&(o.max_unop_len=o.getMaxKeyLen(o.unary_ops)),o}static removeAllUnaryOps(){return o.unary_ops={},o.max_unop_len=0,o}static removeIdentifierChar(e){return o.additional_identifier_chars.delete(e),o}static removeBinaryOp(e){return delete o.binary_ops[e],e.length===o.max_binop_len&&(o.max_binop_len=o.getMaxKeyLen(o.binary_ops)),o.right_associative.delete(e),o}static removeAllBinaryOps(){return o.binary_ops={},o.max_binop_len=0,o}static removeLiteral(e){return delete o.literals[e],o}static removeAllLiterals(){return o.literals={},o}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new o(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return o.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!o.binary_ops[String.fromCharCode(e)]||o.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return o.isIdentifierStart(e)||o.isDecimalDigit(e)}throwError(e){let t=new Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(o.hooks[e]){let r={context:this,node:t};return o.hooks.run(e,r),r.node}return t}searchHook(e){if(o.hooks[e]){let t={context:this};return o.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===o.SPACE_CODE||e===o.TAB_CODE||e===o.LF_CODE||e===o.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:o.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t,r,i=[];for(;this.index<this.expr.length;)if(t=this.code,t===o.SEMCOL_CODE||t===o.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())i.push(r);else if(this.index<this.expr.length){if(t===e)break;this.throwError('Unexpected "'+this.char+'"')}return i}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,o.max_binop_len),t=e.length;for(;t>0;){if(o.binary_ops.hasOwnProperty(e)&&(!o.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!o.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,r,i,n,s,a,h,l;if(s=this.gobbleToken(),!s||(t=this.gobbleBinaryOp(),!t))return s;for(n={value:t,prec:o.binaryPrecedence(t),right_a:o.right_associative.has(t)},a=this.gobbleToken(),a||this.throwError("Expected expression after "+t),i=[s,n,a];t=this.gobbleBinaryOp();){if(r=o.binaryPrecedence(t),0===r){this.index-=t.length;break}n={value:t,prec:r,right_a:o.right_associative.has(t)},l=t;let h=e=>n.right_a&&e.right_a?r>e.prec:r<=e.prec;for(;i.length>2&&h(i[i.length-2]);)a=i.pop(),t=i.pop().value,s=i.pop(),e={type:o.BINARY_EXP,operator:t,left:s,right:a},i.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+l),i.push(n,e)}for(h=i.length-1,e=i[h];h>1;)e={type:o.BINARY_EXP,operator:i[h-1].value,left:i[h-2],right:e},h-=2;return e}gobbleToken(){let e,t,r,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(e=this.code,o.isDecimalDigit(e)||e===o.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===o.SQUOTE_CODE||e===o.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===o.OBRACK_CODE)i=this.gobbleArray();else{for(t=this.expr.substr(this.index,o.max_unop_len),r=t.length;r>0;){if(o.unary_ops.hasOwnProperty(t)&&(!o.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!o.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=r;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:o.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--r)}o.isIdentifierStart(e)?(i=this.gobbleIdentifier(),o.literals.hasOwnProperty(i.name)?i={type:o.LITERAL,value:o.literals[i.name],raw:i.name}:i.name===o.this_str&&(i={type:o.THIS_EXP})):e===o.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===o.PERIOD_CODE||t===o.OBRACK_CODE||t===o.OPAREN_CODE||t===o.QUMARK_CODE;){let r;if(t===o.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==o.PERIOD_CODE)break;r=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===o.OBRACK_CODE?(e={type:o.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},this.gobbleSpaces(),t=this.code,t!==o.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===o.OPAREN_CODE?e={type:o.CALL_EXP,arguments:this.gobbleArguments(o.CPAREN_CODE),callee:e}:(t===o.PERIOD_CODE||r)&&(r&&this.index--,this.gobbleSpaces(),e={type:o.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),r&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e,t,r="";for(;o.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(this.code===o.PERIOD_CODE)for(r+=this.expr.charAt(this.index++);o.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);if(e=this.char,"e"===e||"E"===e){for(r+=this.expr.charAt(this.index++),e=this.char,("+"===e||"-"===e)&&(r+=this.expr.charAt(this.index++));o.isDecimalDigit(this.code);)r+=this.expr.charAt(this.index++);o.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")")}return t=this.code,o.isIdentifierStart(t)?this.throwError("Variable names cannot start with a number ("+r+this.char+")"):(t===o.PERIOD_CODE||1===r.length&&r.charCodeAt(0)===o.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:o.LITERAL,value:parseFloat(r),raw:r}}gobbleStringLiteral(){let e="",t=this.index,r=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===r){i=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++),t){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+="\t";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return i||this.throwError('Unclosed quote after "'+e+'"'),{type:o.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(o.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,o.isIdentifierPart(e));)this.index++;return{type:o.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],r=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let n=this.code;if(n===e){r=!0,this.index++,e===o.CPAREN_CODE&&i&&i>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(n===o.COMMA_CODE){if(this.index++,i++,i!==t.length)if(e===o.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===o.CBRACK_CODE)for(let e=t.length;e<i;e++)t.push(null)}else if(t.length!==i&&0!==i)this.throwError("Expected comma");else{let e=this.gobbleExpression();(!e||e.type===o.COMPOUND)&&this.throwError("Expected comma"),t.push(e)}}return r||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(o.CPAREN_CODE);if(this.code===o.CPAREN_CODE)return this.index++,1===e.length?e[0]:!!e.length&&{type:o.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:o.ARRAY_EXP,elements:this.gobbleArguments(o.CBRACK_CODE)}}},a=new class{add(e,t,r){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][r?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}};Object.assign(o,{hooks:a,plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw new Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(o),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10},right_associative:new Set,additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),o.max_unop_len=o.getMaxKeyLen(o.unary_ops),o.max_binop_len=o.getMaxKeyLen(o.binary_ops);var h=e=>new o(e).parse();Object.getOwnPropertyNames(o).forEach(e=>{void 0===h[e]&&"prototype"!==e&&(h[e]=o[e])}),h.Jsep=o;var l={name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let r=t.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let n=this.gobbleExpression();if(n||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:r,consequent:i,alternate:n},r.operator&&e.binary_ops[r.operator]<=.9){let i=r;for(;i.right.operator&&e.binary_ops[i.right.operator]<=.9;)i=i.right;t.node.test=i.right,i.right=t.node,t.node=r}}else this.throwError("Expected :")}})}};h.plugins.register(l);var c=["+","-","*","/","(",")","==","!=",">","<",">=","<=","and","or","!","%","^",","],d=["0","1","2","3","4","5","6","7","8","9","."],p=["sin","cos","tan","asin","acos","atan","atan2","sqrt","abs","log","exp","floor","ceil","round","min","max","random"];function u(e){return"string"==typeof e&&!isNaN(e)&&!isNaN(parseFloat(e))}function f(e,t,i="number"){let n,s,o="";for(let n=0;n<e.length;n++){let s=e[n];if("objType"in s&&"api"===s.objType){let e=JSON.parse(s.id),r=e[0],i=t.getUserAPI(r);if(void 0!==i&&"function"==typeof i.retrieveValue){let t=i.retrieveValue(e.slice(1));void 0!==t&&(o+=t)}continue}if("objType"in s&&"webhook"===s.objType){let e=JSON.parse(s.id),[r,i]=e,n=t.getUserWebhook(r);if(void 0!==n){let e=n.getParameterValue(i);void 0!==e&&(o+=e)}continue}if("objType"in s&&"aiAssistant"===s.objType){let e=t.openAIRealtime;if("objId"in s&&void 0!==s.objId){let r;if(t.scene.data.objects.traverse((e,t)=>{let i=t.events?.find(e=>e.id===s.objId);i&&(r=i)}),void 0!==r&&"AIAssistantListener"===r.data.type){let t=e?.computeAnalysisForListenerEvent(r.data);if(void 0!==t){o+=t;continue}}}o+=e?.voice??0;continue}if("id"in s){let a=e[n-1];if(n>0&&"id"in a)return void console.error("Two variables in a row",e);let h=t.getVariable(s.id),l=r.getDisplayedValue(h);"number"===i&&r.isTextValue(h)&&Array.isArray(h.textValue)&&1===h.textValue.length?l=parseFloat(l).toString():"boolean"===i&&r.isBoolean(h)?l=h?"true":"false":"boolean"===i&&r.isTextValue(h)&&!Array.isArray(h.textValue)&&(l='"'+l+'"'),o+=l;continue}"string"!==i?"and"!==s.name?"or"!==s.name?"True"!==s.name?"False"!==s.name?"boolean"!==i||u(s.name)||d.includes(s.name)||c.includes(s.name)||p.includes(s.name.replace(/\($/g,""))?o+=s.name:o+='"'+s.name+'"':o+="false":o+="true":o+="||":o+="&&":('"'!==s.name&&("+"!==s.name||s.escaped)&&(o+=s.name),"+"===s.name&&!s.escaped&&"\\"===o[o.length-1]&&(o=o.slice(0,-1)+s.name))}if("string"===i)return o;if(0===e.length){if("number"===i)return 0;if("boolean"===i)return!1}try{n=h(o)}catch(e){return void console.error(o,e)}try{s=b(n)}catch(e){console.error(o,n,e)}return s}function b(e){switch(e.type){case"BinaryExpression":switch(e.operator){case"==":return Number(b(e.left)===b(e.right));case"!=":return Number(b(e.left)!==b(e.right));case">":return Number(b(e.left)>b(e.right));case">=":return Number(b(e.left)>=b(e.right));case"<":return Number(b(e.left)<b(e.right));case"<=":return Number(b(e.left)<=b(e.right));case"+":return b(e.left)+b(e.right);case"-":return b(e.left)-b(e.right);case"*":return b(e.left)*b(e.right);case"/":return b(e.left)/b(e.right);case"%":return b(e.left)%b(e.right);case"&&":return b(e.left)&&b(e.right);case"||":return b(e.left)||b(e.right);case"^":return Math.pow(b(e.left),b(e.right));default:throw new Error("Unknown operator: "+e.operator)}case"UnaryExpression":switch(e.operator){case"-":return-b(e.argument);case"!":return Number(!b(e.argument));default:throw new Error("Unknown operator: "+e.operator)}case"Identifier":throw new Error("Unknown identifier: "+e.name);case"Literal":return e.value;case"CallExpression":if("Identifier"===e.callee.type){if("random"===e.callee.name){let t=0,r=1;if(e.arguments.length>=1)try{t=b(e.arguments[0])}catch(e){console.warn(e)}if(e.arguments.length>=2)try{r=b(e.arguments[1])}catch(e){console.warn(e)}return t=Math.min(r,t),r=Math.max(r,t),t+Math.random()*(r-t)}return Math[e.callee.name].apply(null,e.arguments.map(b))}throw new Error("Unknown node");default:throw new Error("Unknown node type: "+e.type)}}h.addBinaryOp("^",11,!0);var g={mousehover:!0,scroll:!0,dragdrop:!0,tracking:!0,resize:!0,conditional:!0,variables:!0,"api-services":!0,"ai-assistant":!0,textinputs:!0,audio:!0,video:!0,"create-destroy":!0,"scene-transition":!0,timeline:!0,transitions:!0,"misc-actions":!0},E=Object.keys(g),x={MouseHover:"mousehover",Scroll:"scroll",DragDrop:"dragdrop",Follow:"tracking",LookAt:"tracking",Resize:"resize",Conditional:"conditional",VariableChange:"variables",API:"api-services",WEBHOOK:"api-services",AIAssistantListener:"ai-assistant",AIAssistantTrigger:"ai-assistant"},y={Audio:"audio",Video:"video",Particles:"particles",Link:"misc-actions",Reset:"misc-actions",SwitchCamera:"misc-actions",ClearLocalStorage:"misc-actions",Create:"create-destroy",Destroy:"create-destroy",Transition:"transitions",Animation:"transitions",TimelineAnimation:"timeline",SceneTransition:"scene-transition",SetVariable:"variables",DynamicVariablePlay:"variables",UserAPI:"api-services"};function m(e){return"object"==typeof e&&null!==e}var _=class extends Error{};function A(e,t){void 0!==t&&t in g&&e.add(t)}function C(e,t){let r=new Set,i=e=>{if(void 0!==e){if(!Array.isArray(e))throw new _;for(let t of e){if(!m(t))throw new _;n(t.data)}}},n=e=>{if(!m(e)||"string"!=typeof e.type)throw new _;A(r,y[e.type]),"Conditional"===e.type&&(i(e.ifActions),i(e.elseActions))},s=e=>{if(!m(e)||"string"!=typeof e.type)throw new _;if(!0!==e.disabled){if(t?.(e.type),A(r,x[e.type]),i(e.actions),i(e.inActions),i(e.outActions),i(e.successActions),i(e.errorActions),void 0!==e.dragDropActions){if(!m(e.dragDropActions))throw new _;for(let t of Object.values(e.dragDropActions))i(t)}if(void 0!==e.gameActions){if(!m(e.gameActions))throw new _;for(let t of Object.values(e.gameActions))i(t)}if(void 0!==e.breakpoints){if(!Array.isArray(e.breakpoints))throw new _;for(let t of e.breakpoints){if(!m(t)||!m(t.data))throw new _;i(t.data.actions)}}}},o=e=>{if(!m(e))throw new _;(e=>{let t=e.events;if(void 0!==t)if(Array.isArray(t))for(let e of t){if(!m(e))throw new _;s(e.data)}else{if(!m(t))throw new _;for(let e of Object.values(t))s(e)}})(e),"Mesh"===e.type&&m(e.geometry)&&"InputGeometry"===e.geometry.type&&r.add("textinputs"),"Page"===e.type&&m(e.uiScene)&&a(e.uiScene.objects)},a=e=>{if(!m(e)||"function"!=typeof e.traverse)throw new _;e.traverse((e,t)=>{o(t)})},h=e=>{if(!m(e))throw new _;void 0!==e.data&&o(e.data);let t=e.children;if(void 0!==t){if(!Array.isArray(t))throw new _;for(let e of t)h(e)}};try{a(e.scene.objects);let t=e.shared;if(void 0!==t){if(!m(t))throw new _;let e=t.variables;if(void 0!==e){if(!Array.isArray(e))throw new _;for(let t of e){if(!m(t)||!m(t.data))throw new _;"dynamicVariableType"in t.data&&r.add("variables")}}let i=t.userAPIs;if(void 0!==i){if(!m(i))throw new _;for(let e of Object.values(i)){let t=m(e)?e.integration:void 0;m(t)&&"VoiceAssistant"===t.type?r.add("ai-assistant"):r.add("api-services")}}let n=t.userWebhooks;if(void 0!==n){if(!m(n))throw new _;Object.keys(n).length>0&&r.add("api-services")}let s=t.lib;if(void 0!==s){if(!m(s))throw new _;let e=s.components;if(void 0!==e){if(!m(e))throw new _;for(let t of Object.values(e)){if(!m(t))throw new _;void 0!==t.asset&&h(t.asset)}}}}}catch{return new Set(E)}return r}function O(e,t){if(void 0===t)return!0;if(0===t.expression.length)return!1;let r=f(t.expression,e,"boolean");return t.negate?!r:!!r}function w(r,s,o,a,h,l){let c={Audio:[],Video:[],Particles:[],Link:[],Destroy:[],Create:[],Reset:[],Transition:[],TimelineAnimation:[],SwitchCamera:[],Animation:[],SceneTransition:[],SetVariable:[],DynamicVariablePlay:[],ClearLocalStorage:[],UserAPI:[]},d=s=>({id:p,data:u})=>{try{if("Conditional"===u.type)return void(i[r.type].includes("Conditional")&&(u.ifActions.forEach(d({expression:u.condition,negate:!1})),u.elseActions.forEach(d({expression:u.condition,negate:!0}))));if(!i[r.type].includes(u.type))return;let e=function(e){return n.get(e)}(u.type);if(void 0===e)return void t(y[u.type]??"misc-actions",`a "${u.type}" action`);let f=e({id:p,data:u,object:l,page:o,shared:a,eventManager:h,eventType:r.type,actionCondition:s});null!=f&&u.type in c&&c[u.type].push(f)}catch(t){e&&console.error(t)}};return s.forEach(d()),c}function v(e){Object.values(e).forEach(e=>{e.forEach(e=>{"function"==typeof e.dispose&&e.dispose()})})}export{f as a,s as b,x as c,C as d,O as e,w as f,v as g};
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file