@uptimizr/dashboard 0.4.6 → 0.4.8

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 (388) hide show
  1. package/out/404.html +1 -1
  2. package/out/__next.__PAGE__.txt +19 -5
  3. package/out/__next._full.txt +10 -10
  4. package/out/__next._tree.txt +1 -1
  5. package/out/_next/static/chunks/{3cp5nmtwxq4gr.js → 0-6mdj5wxsfid.js} +1 -1
  6. package/out/_next/static/chunks/{2clevl_9ayd0x.js → 0-qthfqvm1jyj.js} +1 -1
  7. package/out/_next/static/chunks/01viyuclp2gm9.js +1 -0
  8. package/out/_next/static/chunks/02aym4t2hgo5c.js +1 -0
  9. package/out/_next/static/chunks/{1fervgvgv10r-.js → 02ic9b5ejugow.js} +1 -1
  10. package/out/_next/static/chunks/03p70i4c7qt0v.js +1 -0
  11. package/out/_next/static/chunks/{3zv5kyos9vtmm.js → 03pjr-ivdicng.js} +1 -1
  12. package/out/_next/static/chunks/041a06-lxipy5.js +1 -0
  13. package/out/_next/static/chunks/{3-yhe6rcsjh88.js → 06dzkwetqis-5.js} +1 -1
  14. package/out/_next/static/chunks/{2mjjo0yj-4ro4.js → 06kvanz5-fo52.js} +1 -1
  15. package/out/_next/static/chunks/{28i3wgvgn_at1.js → 07y8ke_iy59dn.js} +1 -1
  16. package/out/_next/static/chunks/09jukc-4jl735.js +1 -0
  17. package/out/_next/static/chunks/{0cmyc-uvk93kl.js → 09khmdgez3t0a.js} +74 -74
  18. package/out/_next/static/chunks/{2x-7kbwq8tl-o.js → 0_dca4876jshu.js} +196 -196
  19. package/out/_next/static/chunks/0axcgnl5qzr6e.js +1 -0
  20. package/out/_next/static/chunks/0ay4fjomijs3n.js +1 -0
  21. package/out/_next/static/chunks/0c7fy79wlccat.js +1 -0
  22. package/out/_next/static/chunks/0cqe4-l3imct3.js +1 -0
  23. package/out/_next/static/chunks/0cssvelju788j.js +1 -0
  24. package/out/_next/static/chunks/{2-_a-v1xeo5hb.js → 0ctain5xq2wsd.js} +116 -115
  25. package/out/_next/static/chunks/{3yk0hzfq5rcs6.js → 0df-dr3otg_4w.js} +1 -1
  26. package/out/_next/static/chunks/{0i9wa8hjd-5tc.js → 0endw997j7ao9.js} +1 -1
  27. package/out/_next/static/chunks/0ev_pbit1v_qg.js +1 -0
  28. package/out/_next/static/chunks/0eyw9oiwipywb.js +1 -0
  29. package/out/_next/static/chunks/0fkzbuo1tex4u.js +1 -0
  30. package/out/_next/static/chunks/0govas0u0t4w3.js +1 -0
  31. package/out/_next/static/chunks/{287hakn2ijupp.js → 0guzhnususp3-.js} +2 -2
  32. package/out/_next/static/chunks/0h7bq_ysu17q7.js +3 -0
  33. package/out/_next/static/chunks/0hneh_3xzlo28.js +1 -0
  34. package/out/_next/static/chunks/0iaqwme19z_0s.js +1 -0
  35. package/out/_next/static/chunks/0ibmar10xndpn.js +1 -0
  36. package/out/_next/static/chunks/0ii8mqoteppgh.js +11 -0
  37. package/out/_next/static/chunks/{3ioxfi3bvznhh.js → 0ip6v64di_l6x.js} +1 -1
  38. package/out/_next/static/chunks/{184pz6z3dflfm.js → 0ixymgjgz3grn.js} +20 -20
  39. package/out/_next/static/chunks/0kuah8g7lt5ox.js +1 -0
  40. package/out/_next/static/chunks/0l3k4j19vxm17.js +1 -0
  41. package/out/_next/static/chunks/0l6hg0ohwh9-m.js +1 -0
  42. package/out/_next/static/chunks/0m4um4ylhlfan.js +1 -0
  43. package/out/_next/static/chunks/0mj837d4h0ddq.js +1 -0
  44. package/out/_next/static/chunks/0nyn-f4905o91.js +1 -0
  45. package/out/_next/static/chunks/0og6i9rsgkuif.js +1 -0
  46. package/out/_next/static/chunks/0os1x-fxzgnxs.js +1 -0
  47. package/out/_next/static/chunks/0otnra7mp0hog.js +1 -0
  48. package/out/_next/static/chunks/{3p03l0z65c8vc.js → 0oyf2xzv8ofkk.js} +253 -253
  49. package/out/_next/static/chunks/0qvsy3gcqjm12.js +1 -0
  50. package/out/_next/static/chunks/{0yd4_xh476fjn.js → 0rl4ddh2vgxyl.js} +97 -97
  51. package/out/_next/static/chunks/0rwpttmsmqvn_.js +1 -0
  52. package/out/_next/static/chunks/0so3wjp9ch93y.js +1 -0
  53. package/out/_next/static/chunks/{36pz_ews7u0xb.js → 0te4g160_rb5d.js} +1 -1
  54. package/out/_next/static/chunks/0uby-zvu799ef.js +1 -0
  55. package/out/_next/static/chunks/{2kk_vvmr2xm3d.js → 0uvn0op2mlr2u.js} +12 -12
  56. package/out/_next/static/chunks/0vwj4hxjm0igv.js +1 -0
  57. package/out/_next/static/chunks/{0r-x702_jvhud.js → 0w7c30w07uct2.js} +12 -12
  58. package/out/_next/static/chunks/0wm38z3u2133a.js +1 -0
  59. package/out/_next/static/chunks/0y7yk5al7_p8q.js +4 -0
  60. package/out/_next/static/chunks/0ycr0gi6fn6bt.js +1 -0
  61. package/out/_next/static/chunks/0ywvahq9t0tki.js +1 -0
  62. package/out/_next/static/chunks/0zh6nslagkby-.js +1 -0
  63. package/out/_next/static/chunks/{3twr9ds68-9us.js → 0zo8xa0nej3ex.js} +1 -1
  64. package/out/_next/static/chunks/{1lu7rjfvxj8yj.js → 0zsir95gpf3xw.js} +1 -1
  65. package/out/_next/static/chunks/{1j4c0nvdo5q68.js → 0zu6ryyj0ig-j.js} +1 -1
  66. package/out/_next/static/chunks/{1bv-jzy_2jiqs.js → 1-jv8k10q_1uw.js} +1 -1
  67. package/out/_next/static/chunks/{0xx7_7y5jdlh4.js → 1-s5ioie9a94e.js} +1 -1
  68. package/out/_next/static/chunks/{27z7j17kcrty_.js → 1-yos1h0qws5e.js} +11 -11
  69. package/out/_next/static/chunks/10o7brc3x027r.js +1 -0
  70. package/out/_next/static/chunks/{2xe4bgir5l-9b.js → 10pae4gb9i929.js} +504 -504
  71. package/out/_next/static/chunks/13p93itm8a3ym.js +1 -0
  72. package/out/_next/static/chunks/{2mrkv0z2i74pv.js → 147s8i_lktp4_.js} +2 -2
  73. package/out/_next/static/chunks/{3nwaovnpiyrt8.js → 14tgo5xt_3j4w.js} +3 -3
  74. package/out/_next/static/chunks/1699hx-vlak0n.js +22 -0
  75. package/out/_next/static/chunks/{2b5nt7yn-pq3a.js → 16d6n9e77rqti.js} +1 -1
  76. package/out/_next/static/chunks/{3nr48h9zwum-3.js → 16f3d5dv83rsr.js} +1 -1
  77. package/out/_next/static/chunks/16i_tpwn_cmr-.js +1 -0
  78. package/out/_next/static/chunks/{2117sv2qzo6yq.js → 16rfr165nbha0.js} +1 -1
  79. package/out/_next/static/chunks/16sl51pvzo4tf.js +1 -0
  80. package/out/_next/static/chunks/1760s-32qpwgg.js +1 -0
  81. package/out/_next/static/chunks/{3rj-5v0j_2-_2.js → 18kq07c5xy_4g.js} +4 -4
  82. package/out/_next/static/chunks/{2wgh5i70bzelt.js → 190tbzt861ao3.js} +392 -392
  83. package/out/_next/static/chunks/19bhv6cupnnyj.js +1 -0
  84. package/out/_next/static/chunks/1_14pn2wwebxy.js +1 -0
  85. package/out/_next/static/chunks/{2_lw4d7t-xcqi.js → 1_kikmeubh0wq.js} +523 -522
  86. package/out/_next/static/chunks/1ay3z6agelsvz.js +1 -0
  87. package/out/_next/static/chunks/1b-fi3bfmpe31.js +1 -0
  88. package/out/_next/static/chunks/1bae3tqv53x9_.js +1 -0
  89. package/out/_next/static/chunks/{2s4fzgzkwjluu.js → 1bf421g4peccx.js} +2 -2
  90. package/out/_next/static/chunks/1bfony5qsc5tp.js +1 -0
  91. package/out/_next/static/chunks/{3vtmucpx25o7q.js → 1ddt0ot7kl8vq.js} +584 -584
  92. package/out/_next/static/chunks/1emz2vjkgck4z.js +1 -0
  93. package/out/_next/static/chunks/1eogzzw8i1wsg.js +1 -0
  94. package/out/_next/static/chunks/1g9p2h1-31q8o.js +1 -0
  95. package/out/_next/static/chunks/1gcz1k1v1woca.js +1 -0
  96. package/out/_next/static/chunks/1h8lyicgqhpxa.js +1 -0
  97. package/out/_next/static/chunks/{0e5dcxmkprebg.js → 1hot663akaepl.js} +1 -1
  98. package/out/_next/static/chunks/1i7pgl3ks5ye0.js +1 -0
  99. package/out/_next/static/chunks/{0xzamrecplwzw.js → 1i8sk_qgpdjhs.js} +1 -1
  100. package/out/_next/static/chunks/1kk3ct7pkpf3b.js +1 -0
  101. package/out/_next/static/chunks/1kq9o8del67le.js +1 -0
  102. package/out/_next/static/chunks/1l7tzyx2mumlq.js +1 -0
  103. package/out/_next/static/chunks/1n_uwed9o--go.js +1 -0
  104. package/out/_next/static/chunks/1o351eldttogn.js +1 -0
  105. package/out/_next/static/chunks/{1f07l3q77zat1.js → 1ogs4_aj84bfn.js} +1 -1
  106. package/out/_next/static/chunks/{3_dm45k0vk1aa.js → 1p206txlluipi.js} +565 -565
  107. package/out/_next/static/chunks/1p2bt1w845v6c.js +1 -0
  108. package/out/_next/static/chunks/1p3rgz4aef1gk.js +1 -0
  109. package/out/_next/static/chunks/{0ypejzd74ixbw.js → 1qcgdx9yl0gfx.js} +15 -15
  110. package/out/_next/static/chunks/1ql3mm2w5r-m8.js +1 -0
  111. package/out/_next/static/chunks/1qvcyuyshi3ll.js +53 -0
  112. package/out/_next/static/chunks/1r0yyg5a_0knc.js +1 -0
  113. package/out/_next/static/chunks/{374lzksboll-t.js → 1sa6qiidtcyk2.js} +1 -1
  114. package/out/_next/static/chunks/1t-9vrdrsi8le.js +1 -0
  115. package/out/_next/static/chunks/1t97zo0tlpbnz.js +1 -0
  116. package/out/_next/static/chunks/1te2tinzqnwck.js +1 -0
  117. package/out/_next/static/chunks/{3j3ol_d1vsdhx.js → 1trt-m2nrck0v.js} +1 -1
  118. package/out/_next/static/chunks/{3vu5y270muh-7.js → 1ty9jpwr3o_st.js} +1 -1
  119. package/out/_next/static/chunks/{415g3asdds1ac.js → 1u6w6veke8rze.js} +1 -1
  120. package/out/_next/static/chunks/{0-laj-bivzp4x.js → 1u900urmrbv73.js} +1 -1
  121. package/out/_next/static/chunks/{0o73w0cn5n_vl.js → 1vz2gd8k74lpi.js} +1 -1
  122. package/out/_next/static/chunks/1wkpl9bfb0wn7.js +1 -0
  123. package/out/_next/static/chunks/1wrly9a9c3teq.js +1 -0
  124. package/out/_next/static/chunks/1x0m05155yy4e.js +1 -0
  125. package/out/_next/static/chunks/{1my968s78he8g.js → 1xf1wfow43ekc.js} +15 -15
  126. package/out/_next/static/chunks/1y10o40v9odam.js +1 -0
  127. package/out/_next/static/chunks/{3_gfl66zf638s.js → 1y_zykt3fpen4.js} +901 -906
  128. package/out/_next/static/chunks/1ye6xtbm16pg4.js +1 -0
  129. package/out/_next/static/chunks/1z6_57k5h31u7.js +1 -0
  130. package/out/_next/static/chunks/1zboqft0h6mop.js +1 -0
  131. package/out/_next/static/chunks/1zr3c351x0ri5.js +1 -0
  132. package/out/_next/static/chunks/2-5p2lcedvrli.js +1 -0
  133. package/out/_next/static/chunks/{1_4hh3dfop93j.js → 206hxrq60f1_e.js} +1 -1
  134. package/out/_next/static/chunks/20r05k3-studj.js +1 -0
  135. package/out/_next/static/chunks/22gs24kj2du56.js +1 -0
  136. package/out/_next/static/chunks/22x5pd1gyp7sf.js +1 -0
  137. package/out/_next/static/chunks/{3qo7e6b73mfxq.js → 22z-2t_yp1jzs.js} +1 -1
  138. package/out/_next/static/chunks/{3d43gd91r06y6.js → 23hmfdw6z5zfy.js} +507 -505
  139. package/out/_next/static/chunks/23y1krqnc-8sm.js +1 -0
  140. package/out/_next/static/chunks/{0gk5rnci1hznh.js → 24tbkj1qkux88.js} +2 -2
  141. package/out/_next/static/chunks/{2-i29-jdbwww6.js → 26cmri51v7497.js} +111 -111
  142. package/out/_next/static/chunks/27jalbk9zu-2b.js +1 -0
  143. package/out/_next/static/chunks/285d2s9096ryc.js +1 -0
  144. package/out/_next/static/chunks/296ykep2nvppv.js +1 -0
  145. package/out/_next/static/chunks/29nehg5cal-ug.js +1 -0
  146. package/out/_next/static/chunks/2_a56_k3x7to6.js +1 -0
  147. package/out/_next/static/chunks/2a-0l6eb1blh3.js +4 -0
  148. package/out/_next/static/chunks/{2oacwtbslo90t.js → 2a31-txop1jzg.js} +360 -360
  149. package/out/_next/static/chunks/2bse5vll1o-x0.js +1 -0
  150. package/out/_next/static/chunks/2ct40spu9wfj7.js +1 -0
  151. package/out/_next/static/chunks/{2epukrz6paj9n.js → 2ept01b7t-e03.js} +1 -1
  152. package/out/_next/static/chunks/{22yht3s7c-xih.js → 2ey5dqelco_g5.js} +1 -1
  153. package/out/_next/static/chunks/2fd_009hw7y0m.js +1 -0
  154. package/out/_next/static/chunks/{2fspbfbxbswzd.js → 2ftz9kaxrsgxh.js} +1 -1
  155. package/out/_next/static/chunks/2gefdnozflr7p.js +1 -0
  156. package/out/_next/static/chunks/{2as_br1awqk6k.js → 2gs-u1n5uv7iz.js} +496 -496
  157. package/out/_next/static/chunks/{1a94whad0y57f.js → 2hizqql79u-54.js} +1 -1
  158. package/out/_next/static/chunks/2iqf2dpdg_vfl.js +1 -0
  159. package/out/_next/static/chunks/2j7z127s_ycjd.js +1 -0
  160. package/out/_next/static/chunks/2kax7uslfxdnx.js +31 -0
  161. package/out/_next/static/chunks/{2laz1v9fg2a2z.js → 2lh_w9rzy3vek.js} +1 -1
  162. package/out/_next/static/chunks/{3mmy9zsb7zo-m.js → 2ln1na26qwp-3.js} +23 -23
  163. package/out/_next/static/chunks/2n08l1q5o_27e.js +1 -0
  164. package/out/_next/static/chunks/2n7268gyd9z-6.js +1 -0
  165. package/out/_next/static/chunks/2nq9cgjmtqwvp.js +1 -0
  166. package/out/_next/static/chunks/{25brs445bjbik.js → 2oj8qc_pv14nk.js} +2 -2
  167. package/out/_next/static/chunks/2q24e72-olbe8.js +1 -0
  168. package/out/_next/static/chunks/2qc4hscs26cro.js +1 -0
  169. package/out/_next/static/chunks/2qe46redkqhfg.js +1 -0
  170. package/out/_next/static/chunks/2qmfe0mqw150h.js +1 -0
  171. package/out/_next/static/chunks/2qtc0nbl_521e.js +1 -0
  172. package/out/_next/static/chunks/2rofu6gu1xzuq.js +1 -0
  173. package/out/_next/static/chunks/2tdi94rkq739i.js +1 -0
  174. package/out/_next/static/chunks/2u_2sacqa9xa7.js +1 -0
  175. package/out/_next/static/chunks/2ujqz6088shm5.js +1 -0
  176. package/out/_next/static/chunks/{3my05px5mv_s5.js → 2urh9qafp3fiw.js} +235 -235
  177. package/out/_next/static/chunks/{23-y1f_zw56vo.js → 2v06n4z8wsmn9.js} +1 -1
  178. package/out/_next/static/chunks/2vp-5skbk1nfu.js +1 -0
  179. package/out/_next/static/chunks/2vu973j_n6cpx.js +1 -0
  180. package/out/_next/static/chunks/2wwra56rehfcj.js +1 -0
  181. package/out/_next/static/chunks/2xpwr97h2asal.js +1 -0
  182. package/out/_next/static/chunks/3000-0b8n9t_2.js +1 -0
  183. package/out/_next/static/chunks/{0q0i4pdyq66gb.js → 30t3203d7p2da.js} +1 -1
  184. package/out/_next/static/chunks/{3t4ys6th6gf2w.js → 31kto7-dxkt3z.js} +1 -1
  185. package/out/_next/static/chunks/{0j0a0wvmmghxj.js → 32oflcl79d8mu.js} +1 -1
  186. package/out/_next/static/chunks/32ovg81ae0l03.js +1 -0
  187. package/out/_next/static/chunks/{2c8rmxz151fxa.js → 331kthnvoma7n.js} +224 -224
  188. package/out/_next/static/chunks/337kn1mn34rc6.js +1 -0
  189. package/out/_next/static/chunks/{336ckqpboqmbn.js → 33xug8kf0-a1o.js} +1 -1
  190. package/out/_next/static/chunks/34dcb7_flbrvo.js +1 -0
  191. package/out/_next/static/chunks/34zotyeqrz_nq.js +1 -0
  192. package/out/_next/static/chunks/351wsmi75l8db.js +1 -0
  193. package/out/_next/static/chunks/36yv-ialtpx98.js +1 -0
  194. package/out/_next/static/chunks/37hwasxtee5e0.js +1 -0
  195. package/out/_next/static/chunks/37t0iclgxes05.js +1 -0
  196. package/out/_next/static/chunks/{1x0j78ohufpul.js → 37xnvnx1jxfaf.js} +1 -1
  197. package/out/_next/static/chunks/{29hkkj9raxte9.js → 38w74ixqt-9co.js} +77 -77
  198. package/out/_next/static/chunks/{0jap7l5-bskj4.js → 39t2x_9zd2rst.js} +12 -12
  199. package/out/_next/static/chunks/{38q0enmlg5q9o.js → 39v73timmzwny.js} +2 -2
  200. package/out/_next/static/chunks/{3puu2_-t0lln9.js → 3_xqc3658d8sw.js} +12 -12
  201. package/out/_next/static/chunks/3ba8eudvlczwe.js +1 -0
  202. package/out/_next/static/chunks/3buezhxqc8n6n.js +1 -0
  203. package/out/_next/static/chunks/3c5iwwj-fhbue.js +1 -0
  204. package/out/_next/static/chunks/{2kmmk9coo9_b0.js → 3d8ot2tw6yqfq.js} +143 -143
  205. package/out/_next/static/chunks/3dc057ffe7ij-.js +1 -0
  206. package/out/_next/static/chunks/3djnlzwj9869o.js +1 -0
  207. package/out/_next/static/chunks/{2_6b9lraq-exh.js → 3fuqxjjf8o1v9.js} +5 -5
  208. package/out/_next/static/chunks/{0j2ygtc_-bo3m.js → 3gt6rzg9qw-an.js} +1 -1
  209. package/out/_next/static/chunks/{0rykrf_vofbad.js → 3h_05w5j8x538.js} +1 -1
  210. package/out/_next/static/chunks/{3txu-i5qn183a.js → 3hkhd1_k8xohv.js} +321 -321
  211. package/out/_next/static/chunks/{2h07np207nlx7.js → 3ijcc5tfisfnj.js} +1 -1
  212. package/out/_next/static/chunks/3j0dbpd9zop3p.js +1 -0
  213. package/out/_next/static/chunks/{14e4k-718qadd.js → 3ju83xk-ca7ma.js} +163 -168
  214. package/out/_next/static/chunks/3jxhl4apmhbm1.js +13 -0
  215. package/out/_next/static/chunks/{1h1gixjbjkbsl.js → 3la99oz_0p0r6.js} +5 -5
  216. package/out/_next/static/chunks/{1mt4cnd_d6jvf.js → 3n1b34fd5fdrh.js} +1 -1
  217. package/out/_next/static/chunks/3nq_hq4x3rn3r.js +1 -0
  218. package/out/_next/static/chunks/3pgb1kkqrdl9t.js +1 -0
  219. package/out/_next/static/chunks/3pik_-jj-zkfl.js +1 -0
  220. package/out/_next/static/chunks/{1zmx71cvc6ksk.js → 3q38kdbzd2nbd.js} +1 -1
  221. package/out/_next/static/chunks/3q5zl4ks17au2.js +1 -0
  222. package/out/_next/static/chunks/{1t2g1v0ubcsam.js → 3qr10445lte-n.js} +1 -1
  223. package/out/_next/static/chunks/3r-8bnguvxsyo.js +1 -0
  224. package/out/_next/static/chunks/3sg56j8boe-3o.js +1 -0
  225. package/out/_next/static/chunks/3u7zj1-jdg781.js +1 -0
  226. package/out/_next/static/chunks/{0o0qtv35dqv3i.js → 3wj5dmf6cywz8.js} +239 -239
  227. package/out/_next/static/chunks/{2iu0_3cx-ny74.js → 3wr_oijfsq8lr.js} +11 -11
  228. package/out/_next/static/chunks/3xu0dh1ikzwj2.js +1 -0
  229. package/out/_next/static/chunks/{0vzo-8t8c26k9.js → 3y5tpixt23-fl.js} +1 -1
  230. package/out/_next/static/chunks/40gjf-_jt8upu.js +5 -0
  231. package/out/_next/static/chunks/41f12o_5lf-i9.js +1 -0
  232. package/out/_next/static/chunks/42ma8lqduohlc.js +1 -0
  233. package/out/_next/static/chunks/43usshq2nc125.js +1 -0
  234. package/out/_next/static/chunks/{161yjxmdz9obc.js → 44bl4ufopbmyh.js} +1 -1
  235. package/out/_next/static/chunks/44iutzkw9r21x.js +1 -0
  236. package/out/_next/static/chunks/turbopack-1xrxa3noq196-.js +1 -0
  237. package/out/_not-found/__next._full.txt +11 -11
  238. package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
  239. package/out/_not-found/__next._tree.txt +1 -1
  240. package/out/_not-found.html +1 -1
  241. package/out/_not-found.txt +11 -11
  242. package/out/index.html +1 -1
  243. package/out/index.txt +10 -10
  244. package/package.json +11 -11
  245. package/out/__next._head.txt +0 -6
  246. package/out/__next._index.txt +0 -5
  247. package/out/_next/static/chunks/0-k4hp87gwues.js +0 -1
  248. package/out/_next/static/chunks/04zj0yf1qhk1o.js +0 -1
  249. package/out/_next/static/chunks/06fbalmyyfpsy.js +0 -1
  250. package/out/_next/static/chunks/07hgbbqksqd1g.js +0 -1
  251. package/out/_next/static/chunks/08ou2nvy48e0u.js +0 -1
  252. package/out/_next/static/chunks/08y5-irjbsiy8.js +0 -1
  253. package/out/_next/static/chunks/0_jrfk2u1u3fi.js +0 -1
  254. package/out/_next/static/chunks/0a475u_q5i_dd.js +0 -62
  255. package/out/_next/static/chunks/0aad2r4s4wl1x.js +0 -5
  256. package/out/_next/static/chunks/0d9pxx1w_zqr9.js +0 -1
  257. package/out/_next/static/chunks/0gnjtwq-474uc.js +0 -1
  258. package/out/_next/static/chunks/0gsh_d0m5xss1.js +0 -1
  259. package/out/_next/static/chunks/0ibzpjo0h731v.js +0 -1
  260. package/out/_next/static/chunks/0j_3k5qhv_mdx.js +0 -1
  261. package/out/_next/static/chunks/0jis2w2mfx062.js +0 -1
  262. package/out/_next/static/chunks/0jjvp2slpf7d6.js +0 -1
  263. package/out/_next/static/chunks/0ko10wo4rc9-b.js +0 -1
  264. package/out/_next/static/chunks/0lqmvz6k2h_of.js +0 -1
  265. package/out/_next/static/chunks/0lwjmr8efrlbt.js +0 -17
  266. package/out/_next/static/chunks/0noxyupihh8dk.js +0 -1
  267. package/out/_next/static/chunks/0o1vph7x9shzu.js +0 -1
  268. package/out/_next/static/chunks/0p6phe9kjlxn8.js +0 -1
  269. package/out/_next/static/chunks/0ptxb9dcwsw3o.js +0 -1
  270. package/out/_next/static/chunks/0q8pt8fd0ma30.js +0 -1
  271. package/out/_next/static/chunks/0qqx9aoz8l5d2.js +0 -1
  272. package/out/_next/static/chunks/0tsk32q-88t_7.js +0 -1
  273. package/out/_next/static/chunks/0u7577db_ivyr.js +0 -1
  274. package/out/_next/static/chunks/0unnrt0un064x.js +0 -1
  275. package/out/_next/static/chunks/0uygtr4mo3h0v.js +0 -1
  276. package/out/_next/static/chunks/0vf3facit951s.js +0 -1
  277. package/out/_next/static/chunks/0xyija62b6txc.js +0 -1
  278. package/out/_next/static/chunks/0zeb37703zcz3.js +0 -1
  279. package/out/_next/static/chunks/0zu5ato7-1-q9.js +0 -1
  280. package/out/_next/static/chunks/0zydv7y47dxgh.js +0 -1
  281. package/out/_next/static/chunks/103x4jwovb6d-.js +0 -1
  282. package/out/_next/static/chunks/107wfq84g9-kn.js +0 -1
  283. package/out/_next/static/chunks/10afagk8yn__n.js +0 -1
  284. package/out/_next/static/chunks/12ory_c78yl31.js +0 -1
  285. package/out/_next/static/chunks/133dqp8_7_yo6.js +0 -1
  286. package/out/_next/static/chunks/1365lgwdd4vuo.js +0 -1
  287. package/out/_next/static/chunks/146ou-ohb_qhs.js +0 -1
  288. package/out/_next/static/chunks/14orr68xgdykd.js +0 -1
  289. package/out/_next/static/chunks/15qfoj-vl9thu.js +0 -1
  290. package/out/_next/static/chunks/166yqx3_qvbpy.js +0 -1
  291. package/out/_next/static/chunks/16gwjao676ieb.js +0 -1
  292. package/out/_next/static/chunks/16rmmzhy2p7bw.js +0 -1
  293. package/out/_next/static/chunks/17_jjyx4jz9dd.js +0 -1
  294. package/out/_next/static/chunks/18h9ugdz6igdb.js +0 -1
  295. package/out/_next/static/chunks/19d8n5t7ka2fb.js +0 -1
  296. package/out/_next/static/chunks/1_rbzw3n4fk0g.js +0 -1
  297. package/out/_next/static/chunks/1aa9g197l4twm.js +0 -1
  298. package/out/_next/static/chunks/1bq0fcnt1wy86.js +0 -1
  299. package/out/_next/static/chunks/1c6mho7e0enta.js +0 -1
  300. package/out/_next/static/chunks/1dfaheve77dhi.js +0 -1
  301. package/out/_next/static/chunks/1dgf112ehnhm1.js +0 -1
  302. package/out/_next/static/chunks/1eirucr9s6-h5.js +0 -1
  303. package/out/_next/static/chunks/1fsof7un7igrn.js +0 -1
  304. package/out/_next/static/chunks/1gvu5a6ffbs7l.js +0 -1
  305. package/out/_next/static/chunks/1iel4pzhhh-c3.js +0 -1
  306. package/out/_next/static/chunks/1iojfx3-g4_n9.js +0 -1
  307. package/out/_next/static/chunks/1j4jt5q7px8sy.js +0 -1
  308. package/out/_next/static/chunks/1jjw9hxgi2vzi.js +0 -1
  309. package/out/_next/static/chunks/1k_8olnprvi8r.js +0 -1
  310. package/out/_next/static/chunks/1l0rt7d4m-xdk.js +0 -5
  311. package/out/_next/static/chunks/1s0dpdqy480hg.js +0 -1
  312. package/out/_next/static/chunks/1t-yolk97lmot.js +0 -12
  313. package/out/_next/static/chunks/1tbes2sv-qzcx.js +0 -1
  314. package/out/_next/static/chunks/1upy8a5cb75kt.js +0 -1
  315. package/out/_next/static/chunks/1xed71f608m4b.js +0 -1
  316. package/out/_next/static/chunks/1z790xxb46gxy.js +0 -1
  317. package/out/_next/static/chunks/219n3q-_eengm.js +0 -1
  318. package/out/_next/static/chunks/21wo3vdr_uby8.js +0 -1
  319. package/out/_next/static/chunks/25gep78-izw79.js +0 -4
  320. package/out/_next/static/chunks/26i7dn31afdtm.js +0 -1
  321. package/out/_next/static/chunks/27hbplu797elx.js +0 -1
  322. package/out/_next/static/chunks/2992eiy52nazj.js +0 -1
  323. package/out/_next/static/chunks/29_n5j-hg_gsa.js +0 -1
  324. package/out/_next/static/chunks/29bxq-67oazfg.js +0 -1
  325. package/out/_next/static/chunks/29ings58w7kp1.js +0 -1
  326. package/out/_next/static/chunks/2_n0cpkdsjzli.js +0 -1
  327. package/out/_next/static/chunks/2a3iy701j4r_y.js +0 -1
  328. package/out/_next/static/chunks/2al9dh3_1ixhv.js +0 -1
  329. package/out/_next/static/chunks/2awr1c_vfsutb.js +0 -1
  330. package/out/_next/static/chunks/2bxe3kjr17tdp.js +0 -1
  331. package/out/_next/static/chunks/2dvbzar93ooc-.js +0 -1
  332. package/out/_next/static/chunks/2e-vp0e11g9ew.js +0 -1
  333. package/out/_next/static/chunks/2exj9-0p6n9x-.js +0 -1
  334. package/out/_next/static/chunks/2gf8l6hbmt7v3.js +0 -1
  335. package/out/_next/static/chunks/2h9i_adbqaxs4.js +0 -1
  336. package/out/_next/static/chunks/2jio3sio-_43z.js +0 -1
  337. package/out/_next/static/chunks/2neieeo9g2u56.js +0 -1
  338. package/out/_next/static/chunks/2pb_uosb-aa8x.js +0 -1
  339. package/out/_next/static/chunks/2qu-gpm3ux1l6.js +0 -1
  340. package/out/_next/static/chunks/2rsi6v7qmqx2b.js +0 -1
  341. package/out/_next/static/chunks/2tdvuc-27khif.js +0 -1
  342. package/out/_next/static/chunks/2trolrgd7neax.js +0 -1
  343. package/out/_next/static/chunks/2uyuafmoe5wi0.js +0 -3
  344. package/out/_next/static/chunks/2w2e0pxgs-n8f.js +0 -1
  345. package/out/_next/static/chunks/2xujlsx3stqig.js +0 -1
  346. package/out/_next/static/chunks/30y71dxdpv52d.js +0 -1
  347. package/out/_next/static/chunks/32c-e_v8_2xkf.js +0 -1
  348. package/out/_next/static/chunks/32oj0iudhp8bm.js +0 -1
  349. package/out/_next/static/chunks/33p9du6y9eegg.js +0 -1
  350. package/out/_next/static/chunks/38om-j0h0rryk.js +0 -1
  351. package/out/_next/static/chunks/39cou9lia_g7l.js +0 -1
  352. package/out/_next/static/chunks/39pkya0_bvcaj.js +0 -1
  353. package/out/_next/static/chunks/39rhmj_32ujyj.js +0 -1
  354. package/out/_next/static/chunks/3_1zzmx92j9c0.js +0 -1
  355. package/out/_next/static/chunks/3_earszshuz4n.js +0 -1
  356. package/out/_next/static/chunks/3ap_uxc8lx7ni.js +0 -1
  357. package/out/_next/static/chunks/3b6na8zrex8jo.js +0 -1
  358. package/out/_next/static/chunks/3c0cxt72vilyz.js +0 -1
  359. package/out/_next/static/chunks/3g78x0pdaoi_4.js +0 -1
  360. package/out/_next/static/chunks/3gjvl1p-tugfe.js +0 -4
  361. package/out/_next/static/chunks/3i8iro1gas1vx.js +0 -1
  362. package/out/_next/static/chunks/3kpqfqr99vo7z.js +0 -1
  363. package/out/_next/static/chunks/3lladf_wemm-2.js +0 -1
  364. package/out/_next/static/chunks/3n62hbywoknop.js +0 -1
  365. package/out/_next/static/chunks/3o_dmzpahx-5g.js +0 -1
  366. package/out/_next/static/chunks/3r7v7un976sn7.js +0 -1
  367. package/out/_next/static/chunks/3rl_nhqwew40w.js +0 -1
  368. package/out/_next/static/chunks/3s7hqij6xp_4e.js +0 -1
  369. package/out/_next/static/chunks/3si3migsmvz9o.js +0 -1
  370. package/out/_next/static/chunks/3uarw1i1ij1er.js +0 -1
  371. package/out/_next/static/chunks/3un-w6wutw1qn.js +0 -1
  372. package/out/_next/static/chunks/3v8kgnjk27wbe.js +0 -1
  373. package/out/_next/static/chunks/3we1khqfexh3x.js +0 -1
  374. package/out/_next/static/chunks/3z35loj4i-id4.js +0 -1
  375. package/out/_next/static/chunks/42lqt7ig40wk5.js +0 -1
  376. package/out/_next/static/chunks/42s6ghsurq5q7.js +0 -1
  377. package/out/_next/static/chunks/42yctcfi2rfwr.js +0 -1
  378. package/out/_next/static/chunks/43_fau1gg69eo.js +0 -1
  379. package/out/_next/static/chunks/43ywrdzg_7af8.js +0 -31
  380. package/out/_next/static/chunks/44m1ijc5cv80x.js +0 -1
  381. package/out/_next/static/chunks/453_bg0lgesmp.js +0 -1
  382. package/out/_next/static/chunks/turbopack-1s36ieuku1ds3.js +0 -1
  383. package/out/_not-found/__next._head.txt +0 -6
  384. package/out/_not-found/__next._index.txt +0 -5
  385. package/out/_not-found/__next._not-found.txt +0 -5
  386. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_buildManifest.js +0 -0
  387. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_clientMiddlewareManifest.js +0 -0
  388. /package/out/_next/static/{5UjNvd7WCk97iC2cSmEGH → 4r0L0ZMJeBwOJCVDsvvZ4}/_ssgManifest.js +0 -0
@@ -1,5 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,24032,e=>{"use strict";var t=e.i(20363);class s extends t.Texture{constructor(e,s,r,a,i,n=!0,o=!1,l=3,h=0,u,_,c,p){if(super(null,i,!n,o,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,u),this.format=a,!this._engine)return;this._engine._caps.textureFloatLinearFiltering||1!==h||(l=1),this._engine._caps.textureHalfFloatLinearFiltering||2!==h||(l=1),this._texture=this._engine.createRawTexture(e,s,r,a,n,o,l,null,h,u??0,_??!1,p),this.wrapU=t.Texture.CLAMP_ADDRESSMODE,this.wrapV=t.Texture.CLAMP_ADDRESSMODE,this._waitingForData=!!c&&!e}update(e){this.updateMipLevel(e,0)}updateMipLevel(e,t){this._getEngine().updateRawTexture(this._texture,e,this._texture.format,this._texture.invertY,null,this._texture.type,this._texture._useSRGBBuffer,t),this._waitingForData=!1}clone(){if(!this._texture)return super.clone();let e=new s(null,this.getSize().width,this.getSize().height,this.format,this.getScene(),this._texture.generateMipMaps,this._invertY,this.samplingMode,this._texture.type,this._texture._creationFlags,this._useSRGBBuffer);return e._texture=this._texture,this._texture.incrementReferences(),e}isReady(){return super.isReady()&&!this._waitingForData}static CreateLuminanceTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,1,a,i,n,o)}static CreateLuminanceAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,2,a,i,n,o)}static CreateAlphaTexture(e,t,r,a,i=!0,n=!1,o=3){return new s(e,t,r,0,a,i,n,o)}static CreateRGBTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1){return new s(e,t,r,4,a,i,n,o,l,h,u)}static CreateRGBATexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=0,u=!1,_=!1){return new s(e,t,r,5,a,i,n,o,l,h,u,_)}static CreateRGBAStorageTexture(e,t,r,a,i=!0,n=!1,o=3,l=0,h=!1){return new s(e,t,r,5,a,i,n,o,l,1,h)}static CreateRTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h)}static CreateRStorageTexture(e,r,a,i,n=!0,o=!1,l=t.Texture.TRILINEAR_SAMPLINGMODE,h=1){return new s(e,r,a,6,i,n,o,l,h,1)}}e.s(["RawTexture",0,s])},66861,e=>{"use strict";var t=e.i(2060),s=e.i(16347),r=e.i(41041),a=e.i(69223),i=e.i(13099),n=e.i(6949),o=e.i(55288),l=e.i(59052),h=e.i(80065),u=e.i(16771),_=e.i(23003);class c{constructor(){this.mm=new Map}get(e,t){let s=this.mm.get(e);if(void 0!==s)return s.get(t)}set(e,t,s){let r=this.mm.get(e);void 0===r&&this.mm.set(e,r=new Map),r.set(t,s)}}class p{get standalone(){return this._options?.standalone??!1}get baseMaterial(){return this._baseMaterial}get doNotInjectCode(){return this._options?.doNotInjectCode??!1}constructor(e,t,s){this._baseMaterial=e,this._scene=t??_.EngineStore.LastCreatedScene,this._options=s,this._subMeshToEffect=new Map,this._subMeshToDepthWrapper=new c,this._meshes=new Map,this._onEffectCreatedObserver=this._baseMaterial.onEffectCreatedObservable.add(e=>{let t=e.subMesh?.getMesh();t&&!this._meshes.has(t)&&this._meshes.set(t,t.onDisposeObservable.add(e=>{let t=this._subMeshToEffect.keys();for(let s=t.next();!0!==s.done;s=t.next()){let t=s.value;t?.getMesh()===e&&(this._subMeshToEffect.delete(t),this._deleteDepthWrapperEffect(t))}})),this._subMeshToEffect.get(e.subMesh)?.[0]!==e.effect&&(this._subMeshToEffect.set(e.subMesh,[e.effect,this._scene.getEngine().currentRenderPassId]),this._deleteDepthWrapperEffect(e.subMesh))})}_deleteDepthWrapperEffect(e){let t=this._subMeshToDepthWrapper.mm.get(e);t&&(t.forEach(e=>{e.mainDrawWrapper.effect?.dispose()}),this._subMeshToDepthWrapper.mm.delete(e))}getEffect(e,t,s){let r=this._subMeshToDepthWrapper.mm.get(e)?.get(t);if(!r)return null;let a=r.drawWrapper[s];return a||(a=r.drawWrapper[s]=new u.DrawWrapper(this._scene.getEngine())).setEffect(r.mainDrawWrapper.effect,r.mainDrawWrapper.defines),a}isReadyForSubMesh(e,t,s,r,a){return(!this.standalone||!!this._baseMaterial.isReadyForSubMesh(e.getMesh(),e,r))&&(this._makeEffect(e,t,s,a)?.isReady()??!1)}dispose(){this._baseMaterial.onEffectCreatedObservable.remove(this._onEffectCreatedObserver),this._onEffectCreatedObserver=null;let e=this._meshes.entries();for(let t=e.next();!0!==t.done;t=e.next()){let[e,s]=t.value;e.onDisposeObservable.remove(s)}}_makeEffect(e,t,s,r){let a=this._scene.getEngine(),i=this._subMeshToEffect.get(e);if(!i)return null;let[n,o]=i;if(!n.isReady())return null;let _=this._subMeshToDepthWrapper.get(e,s);if(!_){let t=new u.DrawWrapper(a),i=e._getDrawWrapper(o)?.defines;t.defines="string"==typeof i?null:i??null,(_={drawWrapper:[],mainDrawWrapper:t,depthDefines:"",token:(0,h.RandomGUID)()}).drawWrapper[r]=t,this._subMeshToDepthWrapper.set(e,s,_)}let c=t.join("\n");if(_.mainDrawWrapper.effect&&c===_.depthDefines)return _.mainDrawWrapper.effect;_.depthDefines=c;let p=n.getUniformNames().slice(),d=n.vertexSourceCodeBeforeMigration,f=n.fragmentSourceCodeBeforeMigration;if(!d&&!f)return null;if(!this.doNotInjectCode){let e=this._options&&this._options.remappedVariables?`#include<shadowMapVertexNormalBias>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexNormalBias>",t=this._options&&this._options.remappedVariables?`#include<shadowMapVertexMetric>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapVertexMetric>",s=this._options&&this._options.remappedVariables?`#include<shadowMapFragmentSoftTransparentShadow>(${this._options.remappedVariables.join(",")})`:"#include<shadowMapFragmentSoftTransparentShadow>",r="#include<shadowMapFragment>",a="#include<shadowMapVertexExtraDeclaration>";d=(d=-1!==(d=(d=0===n.shaderLanguage?d.replace(/void\s+?main/g,`
2
- ${a}
3
- void main`):d.replace(/@vertex/g,`
4
- ${a}
5
- @vertex`)).replace(/#define SHADOWDEPTH_NORMALBIAS|#define CUSTOM_VERTEX_UPDATE_WORLDPOS/g,e)).indexOf("#define SHADOWDEPTH_METRIC")?d.replace(/#define SHADOWDEPTH_METRIC/g,t):d.replace(/}\s*$/g,t+"\n}")).replace(/#define SHADER_NAME.*?\n|out vec4 glFragColor;\n/g,"");let i=f.indexOf("#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW")>=0||f.indexOf("#define CUSTOM_FRAGMENT_BEFORE_FOG")>=0,o=-1!==f.indexOf("#define SHADOWDEPTH_FRAGMENT"),h="";i?f=f.replace(/#define SHADOWDEPTH_SOFTTRANSPARENTSHADOW|#define CUSTOM_FRAGMENT_BEFORE_FOG/g,s):h=s+"\n",f=f.replace(/void\s+?main/g,l.Effect.IncludesShadersStore.shadowMapFragmentExtraDeclaration+"\nvoid main"),o?f=f.replace(/#define SHADOWDEPTH_FRAGMENT/g,r):h+=r+"\n",h&&(f=f.replace(/}\s*$/g,h+"}")),p.push("biasAndScaleSM","depthValuesSM","lightDataSM","softTransparentShadowSM")}_.mainDrawWrapper.effect=a.createEffect({vertexSource:d,fragmentSource:f,vertexToken:_.token,fragmentToken:_.token},{attributes:n.getAttributesNames(),uniformsNames:p,uniformBuffersNames:n.getUniformBuffersNames(),samplers:n.getSamplers(),defines:c+"\n"+n.defines.replace("#define SHADOWS","").replace(/#define SHADOW\d/g,""),indexParameters:n.getIndexParameters(),shaderLanguage:n.shaderLanguage},a);for(let e=0;e<_.drawWrapper.length;++e)e!==r&&_.drawWrapper[e]?.setEffect(_.mainDrawWrapper.effect,_.mainDrawWrapper.defines);return _.mainDrawWrapper.effect}}var d=e.i(28548),f=e.i(46533),x=e.i(22052),m=e.i(34149);function g(e){return Math.min(Math.max(Math.floor(Math.max(e.getCaps().maxVertexUniformVectors-40,0)/5),1),256)}class S extends a.MaterialDefines{constructor(e){super(e),this.FOG=!1,this.THIN_INSTANCES=!0,this.LOGARITHMICDEPTH=!1,this.CLIPPLANE=!1,this.CLIPPLANE2=!1,this.CLIPPLANE3=!1,this.CLIPPLANE4=!1,this.CLIPPLANE5=!1,this.CLIPPLANE6=!1,this.SH_DEGREE=0,this.COMPENSATION=!1,this.IS_COMPOUND=!1,this.MAX_PART_COUNT=128,this.USE_SOG=!1,this.USE_SOG_V2=!1,this.rebuild()}hasDefine(e){return -1!==this._keys.indexOf(e)}}class T extends i.PushMaterial{constructor(e,t){super(e,t),this.kernelSize=T.KernelSize,this.minPixelSize=T.MinPixelSize,this._compensation=T.Compensation,this._isDirty=!1,this._sourceMesh=null,this._voxelMissingTextureWarned=new Set,this._voxelPartWorldData=new Float32Array(0),this._voxelPartVisibilityData=[],this.backFaceCulling=!1,this.shadowDepthWrapper=T._MakeGaussianSplattingShadowDepthWrapper(t,this.shaderLanguage)}set compensation(e){this._isDirty=this._isDirty!=e,this._compensation=e}get compensation(){return this._compensation}get hasRenderTargetTextures(){return!1}needAlphaTesting(){return!1}needAlphaBlending(){return!0}isReadyForSubMesh(t,s){let r=s._drawWrapper,a=s.materialDefines;if(a&&this._isDirty&&a.markAsUnprocessed(),r.effect&&this.isFrozen&&r._wasPreviouslyReady&&!0===r._wasPreviouslyUsingInstances)return!0;if(!s.materialDefines||this.pluginManager){this._callbackPluginEventGeneric(4,this._eventInfo);let e=this._eventInfo.defineNames;(!s.materialDefines||e&&Object.keys(e).some(e=>!a.hasDefine(e)))&&(a=s.materialDefines=new S(e))}let i=this.getScene();if(this._isReadyForSubMesh(s))return!0;if(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=a,this._eventInfo.subMesh=s,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),!this._eventInfo.isReadyForSubMesh||!this._sourceMesh)return!1;let o=i.getEngine(),l=this._sourceMesh;(0,x.PrepareDefinesForMisc)(t,i,this._useLogarithmicDepth,this.pointsCloud,this.fogEnabled,!1,a,void 0,void 0,void 0,this._isVertexOutputInvariant),(0,x.PrepareDefinesForFrameBoundValues)(i,o,this,a,!0,null,!0),this._eventInfo.defines=a,this._eventInfo.mesh=t,this._callbackPluginEventPrepareDefinesBeforeAttributes(this._eventInfo),(0,x.PrepareDefinesForAttributes)(t,a,!1,!1),this._callbackPluginEventPrepareDefines(this._eventInfo),(o.version>1||o.isWebGPU)&&(a.SH_DEGREE=l.shDegree),a.IS_COMPOUND=l.isCompound,a.MAX_PART_COUNT=g(o),a.USE_SOG=l.useSog,a.USE_SOG_V2=l.useSog&&l.sogParams?.version===2;let h=l.material;if(a.COMPENSATION=h&&h.compensation?h.compensation:T.Compensation,a.isDirty){a.markAsProcessed(),i.resetCachedMaterial(),(0,x.PrepareAttributesForInstances)(T._Attribs,a);let r=T._Attribs.slice(),l=T._Uniforms.slice(),h=T._Samplers.slice(),u=T._UniformBuffers.slice();(0,x.PrepareUniformsAndSamplersList)({uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:a}),(0,n.AddClipPlaneUniforms)(l),this._uniformBufferLayoutBuilt||this.buildUniformLayout(),this._eventInfo.fallbackRank=0,this._eventInfo.defines=a,this._eventInfo.attributes=r,this._eventInfo.uniforms=l,this._eventInfo.samplers=h,this._eventInfo.uniformBuffersNames=u,this._eventInfo.customCode=void 0,this._eventInfo.mesh=t,this._callbackPluginEventGeneric(128,this._eventInfo);let _=a.toString(),c=i.getEngine().createEffect("gaussianSplatting",{attributes:r,uniformsNames:l,uniformBuffersNames:u,samplers:h,defines:_,onCompiled:this.onCompiled,onError:this.onError,indexParameters:{},processCodeAfterIncludes:this._eventInfo.customCode,shaderLanguage:this._shaderLanguage,extraInitializationsAsync:async()=>{1===this._shaderLanguage?await Promise.all([e.A(32365),e.A(43640)]):await Promise.all([e.A(55237),e.A(47780)])}},o);s.setEffect(c,a,this._materialContext)}return!!s.effect&&!!s.effect.isReady()&&(a._renderId=i.getRenderId(),r._wasPreviouslyReady=!0,r._wasPreviouslyUsingInstances=!0,this._isDirty=!1,!0)}setSourceMesh(e){this._sourceMesh=e}getSourceMesh(){return this._sourceMesh}static BindEffect(e,t,s){let r=s.getEngine(),a=s.activeCamera,i=r.getRenderWidth()*a.viewport.width,n=r.getRenderHeight()*a.viewport.height,l=e.material;if(!l._sourceMesh)return;let h=l._sourceMesh,u=a?.rigParent?.rigCameras.length||1;t.setFloat2("invViewport",1/(i/u),1/n);let _=1e3;if(a){let e=a.getProjectionMatrix().m[5];_=a.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?n*e/2:i*e/2}if(t.setFloat2("focal",_,_),t.setFloat("kernelSize",l&&l.kernelSize?l.kernelSize:T.KernelSize),t.setFloat("minPixelSize",l?l.minPixelSize:T.MinPixelSize),t.setFloat("alpha",l.alpha),s.bindEyePosition(t,"eyePosition",!0),h.covariancesATexture){let e=h.covariancesATexture.getSize();if(t.setFloat2("dataTextureSize",e.width,e.height),t.setTexture("covariancesATexture",h.covariancesATexture),t.setTexture("covariancesBTexture",h.covariancesBTexture),t.setTexture("centersTexture",h.centersTexture),t.setTexture("colorsTexture",h.colorsTexture),h.useSog)T._BindSogUniforms(h,t);else if(h.shTextures)for(let e=0;e<h.shTextures.length;e++)t.setTexture(`shTexture${e}`,h.shTextures[e]);h.bindExtraEffectUniforms(t)}}static _BindSogUniforms(e,t){let s=e.sogParams;s&&(t.setTexture("sogQuatsTexture",e.rotationsATexture),e.shTextures&&e.shTextures.length>=2&&(t.setTexture("sogShNCentroidsTexture",e.shTextures[0]),t.setTexture("sogShNLabelsTexture",e.shTextures[1])),s.codebookTexture&&t.setTexture("sogCodebookTexture",s.codebookTexture),t.setFloat3("sogMeansMin",s.meansMin[0],s.meansMin[1],s.meansMin[2]),t.setFloat3("sogMeansMax",s.meansMax[0],s.meansMax[1],s.meansMax[2]),s.scalesMin&&s.scalesMax&&(t.setFloat3("sogScalesMin",s.scalesMin[0],s.scalesMin[1],s.scalesMin[2]),t.setFloat3("sogScalesMax",s.scalesMax[0],s.scalesMax[1],s.scalesMax[2])),s.sh0Min&&s.sh0Max&&(t.setFloat4("sogSh0Min",s.sh0Min[0],s.sh0Min[1],s.sh0Min[2],s.sh0Min[3]),t.setFloat4("sogSh0Max",s.sh0Max[0],s.sh0Max[1],s.sh0Max[2],s.sh0Max[3])),t.setFloat("sogShnMin",s.shnMin??0),t.setFloat("sogShnMax",s.shnMax??0),t.setFloat("sogShCoeffCount",s.shCoeffCount??0))}bindForSubMesh(e,t,s){let r=this.getScene(),a=s.materialDefines;if(!a)return;let i=s.effect;i&&(this._activeEffect=i,t.getMeshUniformBuffer().bindToEffect(i,"Mesh"),t.transferToEffect(e),this._mustRebind(r,i,s,t.visibility)?(this.bindView(i),this.bindViewProjection(i),T.BindEffect(t,this._activeEffect,r),(0,n.BindClipPlane)(i,this,r)):r.getEngine()._features.needToAlwaysBindUniformBuffers&&(this._needToBindSceneUbo=!0),(0,x.BindFogParameters)(r,t,i),this.useLogarithmicDepth&&(0,x.BindLogDepth)(a,i,r),this._eventInfo.subMesh=s,this._callbackPluginEventBindForSubMesh(this._eventInfo),this._afterBind(t,this._activeEffect,s))}static _BindEffectUniforms(e,t,s,r){let a,i,n=r.getEngine(),l=s.getEffect(),h=r.activeCamera;if(!h)return;e.getMeshUniformBuffer().bindToEffect(l,"Mesh"),s.bindView(l),s.bindViewProjection(l);let u=n.getRenderWidth()*h.viewport.width,_=n.getRenderHeight()*h.viewport.height;l.setFloat2("invViewport",1/u,1/_);let c=1e3;if(h){let e=h.getProjectionMatrix().m[5];c=h.fovMode==o.Camera.FOVMODE_VERTICAL_FIXED?_*e/2:u*e/2}if(l.setFloat2("focal",c,c),l.setFloat("kernelSize",t&&t.kernelSize?t.kernelSize:T.KernelSize),l.setFloat("minPixelSize",t?t.minPixelSize:T.MinPixelSize),l.setFloat("alpha",t.alpha),h.mode===o.Camera.ORTHOGRAPHIC_CAMERA?(a=!n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:1):(a=n.useReverseDepthBuffer&&n.isNDCHalfZRange?h.minZ:n.isNDCHalfZRange?0:h.minZ,i=n.useReverseDepthBuffer&&n.isNDCHalfZRange?0:h.maxZ),l.setFloat2("depthValues",a,a+i),e.covariancesATexture){let t=e.covariancesATexture.getSize();l.setFloat2("dataTextureSize",t.width,t.height),l.setTexture("covariancesATexture",e.covariancesATexture),l.setTexture("covariancesBTexture",e.covariancesBTexture),l.setTexture("centersTexture",e.centersTexture),l.setTexture("colorsTexture",e.colorsTexture),e.bindExtraEffectUniforms(l)}}_bindVoxelEffectUniforms(e,t,r){if(!e.rotationsATexture&&(e.needsRotationScaleTextures=!0,!e.rotationsATexture))return!e.centersTexture||e.splatsData||this._voxelMissingTextureWarned.has(e.uniqueId)||(this._voxelMissingTextureWarned.add(e.uniqueId),s.Logger.Error("IBL voxelization: GaussianSplattingMesh rotation/scale textures are not available. Create the mesh either with keepInRam=true or needsRotationScaleTextures=true to enable IBL shadow voxelization.")),!1;this._voxelMissingTextureWarned.delete(e.uniqueId);let a=r.getEffect();e.getMeshUniformBuffer().bindToEffect(a,"Mesh");let i=e.rotationsATexture.getSize();if(a.setFloat("alpha",t.alpha),a.setFloat2("dataTextureSize",i.width,i.height),a.setTexture("rotationsATexture",e.rotationsATexture),a.setTexture("rotationsBTexture",e.rotationsBTexture),a.setTexture("rotationScaleTexture",e.rotationScaleTexture),a.setTexture("centersTexture",e.centersTexture),a.setTexture("colorsTexture",e.colorsTexture),e.partIndicesTexture){a.setTexture("partIndicesTexture",e.partIndicesTexture);let t=16*e.partCount;this._voxelPartWorldData.length!==t&&(this._voxelPartWorldData=new Float32Array(t));let s=this._voxelPartWorldData;for(let t=0;t<e.partCount;t++)e.getWorldMatrixForPart(t).toArray(s,16*t);a.setMatrices("partWorld",s);let r=this._voxelPartVisibilityData;r.length=e.partCount;for(let t=0;t<e.partCount;t++)r[t]=e.partVisibility[t]??1;a.setArray("partVisibility",r)}return!0}makeVoxelRenderingMaterial(t,s,r,a=!1){let i=[`#define MAX_DRAW_BUFFERS ${r}`];i.push("#define IS_FOR_VOXELIZATION"),a&&(i.push("#define IS_COMPOUND 1"),i.push(`#define MAX_PART_COUNT ${g(t.getEngine())}`));let n=new d.ShaderMaterial("gaussianSplattingVoxelRender",t,{vertex:"gaussianSplattingVoxel",fragment:"gaussianSplattingVoxel"},{attributes:T._Attribs,uniforms:T._VoxelUniforms,samplers:T._VoxelSamplers,uniformBuffers:T._UniformBuffers,shaderLanguage:s,defines:i,needAlphaBlending:!1,extraInitializationsAsync:async()=>{1===s?await Promise.all([e.A(61777),e.A(484)]):await Promise.all([e.A(37070),e.A(4987)])}});return n.cullBackFaces=!1,n.backFaceCulling=!1,n.depthFunction=m.Engine.ALWAYS,n.onBindObservable.add(e=>{let t=e.material;this._bindVoxelEffectUniforms(e,t,n)}),n}makeDepthRenderingMaterial(e,t,s=!1,r=!1){let a=["#define DEPTH_RENDER"];s&&a.push("#define ALPHA_BLENDED_DEPTH"),r&&(a.push("#define IS_COMPOUND 1"),a.push(`#define MAX_PART_COUNT ${g(e.getEngine())}`));let i=new d.ShaderMaterial("gaussianSplattingDepthRender",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:T._Attribs,uniforms:T._Uniforms,samplers:T._Samplers,uniformBuffers:T._UniformBuffers,shaderLanguage:t,defines:a,needAlphaBlending:s});return i.doNotSerialize=!0,i.backFaceCulling=!1,i.onBindObservable.add(t=>{let s=t.material,r=s?.getSourceMesh()??t;T._BindEffectUniforms(r,s,i,e)}),i}static _MakeGaussianSplattingShadowDepthWrapper(e,t){let s=new d.ShaderMaterial("gaussianSplattingDepth",e,{vertex:"gaussianSplattingDepth",fragment:"gaussianSplattingDepth"},{attributes:T._Attribs,uniforms:T._Uniforms,samplers:T._Samplers,uniformBuffers:T._UniformBuffers,shaderLanguage:t});s.doNotSerialize=!0,s.backFaceCulling=!1;let r=new p(s,e,{standalone:!0});return s.onBindObservable.add(t=>{let r=t.material,a=r?.getSourceMesh()??t;T._BindEffectUniforms(a,r,s,e)}),r}clone(e){let s=t.SerializationHelper.Clone(()=>new T(e,this.getScene()),this);return s.id=e,s.name=e,this._clonePlugins(s,""),s}serialize(){let e=super.serialize();return e.customType="BABYLON.GaussianSplattingMaterial",e}getClassName(){return"GaussianSplattingMaterial"}static Parse(e,s,r){let a=t.SerializationHelper.Parse(()=>new T(e.name,s),e,s,r);return f.Material._ParsePlugins(e,a,s,r),a}}T.KernelSize=.3,T.Compensation=!1,T.MinPixelSize=0,T._Attribs=[r.VertexBuffer.PositionKind,"splatIndex0","splatIndex1","splatIndex2","splatIndex3"],T._Samplers=["covariancesATexture","covariancesBTexture","centersTexture","colorsTexture","shTexture0","shTexture1","shTexture2","shTexture3","shTexture4","partIndicesTexture","sogQuatsTexture","sogShNCentroidsTexture","sogShNLabelsTexture","sogCodebookTexture"],T._UniformBuffers=["Scene","Mesh"],T._VoxelUniforms=["world","dataTextureSize","alpha","invWorldScale","viewMatrix","nearPlane","farPlane","stepSize","partWorld","partVisibility","axis"],T._VoxelSamplers=["rotationsATexture","rotationsBTexture","rotationScaleTexture","centersTexture","colorsTexture","partIndicesTexture"],T._Uniforms=["world","view","projection","vFogInfos","vFogColor","logarithmicDepthConstant","invViewport","dataTextureSize","focal","eyePosition","kernelSize","minPixelSize","alpha","depthValues","partWorld","partVisibility","sogMeansMin","sogMeansMax","sogScalesMin","sogScalesMax","sogSh0Min","sogSh0Max","sogShnMin","sogShnMax","sogShCoeffCount"],e.s(["GaussianSplattingMaterial",0,T,"GetGaussianSplattingMaxPartCount",0,g],66861)},51483,31169,e=>{"use strict";var t,s,r,a,i=e.i(69400),n=e.i(66861),o=e.i(46951),l=e.i(64831),h=e.i(64378),u=e.i(16347),_=e.i(3864),c=e.i(24032),p=e.i(6563),d=e.i(63235);let f=d.HighestCommonFactor,x={...d,TwoPi:2*Math.PI,Sign:Math.sign,Log2:Math.log2,HCF:f};var m=e.i(84856),g=e.i(23003),S=e.i(64433);let T="positions",M="partMatrices",y="partIndices",D=function(e){let t,s,r,a,i,n,o,l,h=null;e.onmessage=u=>{let _=u.data.command;if("positions"===_)t=u.data.positions;else if("positionsUpdate"===_)t&&u.data.data&&t.set(u.data.data,u.data.offset);else if("partMatrices"===_)a=u.data.partMatrices;else if("partIndices"===_)r=u.data.partIndices;else if("intervals"===_)h=u.data.intervals;else if("sort"===_){let _=u.data.cameraId,c=u.data.sortRequestId,p=u.data.rangeVersion,d=u.data.worldMatrix,f=u.data.cameraForward,x=u.data.cameraPosition;if(s=u.data.depthMix,!t||!f)return void e.postMessage({command:"sorted",depthMix:s,cameraId:_,sortRequestId:c,rangeVersion:p},[s.buffer]);let m=!1!==u.data.useCountingSort,g=!!u.data.logSortPerformance,S=u.data.rightHanded?-1:1,T=h,M=t.length/4,y=M;if(T){y=0;for(let e=1;e<T.length;e+=2)y+=T[e]}let D=Math.max(y+15&-16,16),b=f[0]*x[0]+f[1]*x[1]+f[2]*x[2],I=e=>[f[0]*e[0]+f[1]*e[1]+f[2]*e[2],f[0]*e[4]+f[1]*e[5]+f[2]*e[6],f[0]*e[8]+f[1]*e[9]+f[2]*e[10],f[0]*e[12]+f[1]*e[13]+f[2]*e[14]-b],w=globalThis.performance,A=g&&w?w.now():0;try{if(m){let e=new Uint32Array(s.buffer);if(!i||i.length<y){let e=Math.max(y,16);i=new Uint32Array(e),n=new Float32Array(e),o=new Uint32Array(e)}let h=!!(a&&r),u=[],_=0,c=0,p=0,f=0,x=0;if(h)u=a.map(e=>{let t=I(e);return t[0]*=S,t[1]*=S,t[2]*=S,t[3]*=S,t}),_=r.length;else{let e=I(d);c=e[0]*S,p=e[1]*S,f=e[2]*S,x=e[3]*S}let m=0,g=1/0,b=-1/0,w=T?T.length:2;for(let e=0;e<w;e+=2){let s=T?T[e]:0,a=s+(T?T[e+1]:M);if(h)for(let e=s;e<a;e++){let s=4*e,a=u[r[e<_?e:_-1]],o=a[0]*t[s]+a[1]*t[s+1]+a[2]*t[s+2]+a[3];i[m]=e,n[m]=o,m++,o<g&&(g=o),o>b&&(b=o)}else for(let e=s;e<a;e++){let s=4*e,r=c*t[s]+p*t[s+1]+f*t[s+2]+x;i[m]=e,n[m]=r,m++,r<g&&(g=r),r>b&&(b=r)}}let A=Math.max(10,Math.min(20,Math.round(Math.log2(Math.max(1,y)/4)))),v=2**A+1;l&&l.length===v?l.fill(0):l=new Uint32Array(v);let C=b-g;if(C>1e-12){let e=(v-1)/C,t=v-1;for(let s=0;s<y;s++){let r=(b-n[s])*e>>>0;r>t&&(r=t),o[s]=r,l[r]++}}else{for(let e=0;e<y;e++)o[e]=0;l[0]=y}for(let e=1;e<v;e++)l[e]+=l[e-1];for(let t=0;t<y;t++){let s=--l[o[t]];e[2*s]=i[t]}for(let t=y;t<D;t++)e[2*t]=0}else{let e=new Uint32Array(s.buffer),i=new Float32Array(s.buffer);if(T){let t=0;for(let s=0;s<T.length;s+=2){let r=T[s],a=T[s+1];for(let s=r;s<r+a;s++)e[2*t++]=s}for(;t<D;t++)e[2*t]=0}else for(let t=0;t<D;t++)e[2*t]=t;if(a&&r){let s=a.map(e=>I(e)),n=r.length;for(let a=0;a<D;a++){let o=e[2*a],l=s[r[Math.min(o,n-1)]];i[2*a+1]=l[0]*t[4*o+0]+l[1]*t[4*o+1]+l[2]*t[4*o+2]+l[3],e[2*a+1]=~e[2*a+1]}}else{let[s,r,a,n]=I(d);for(let o=0;o<D;o++){let l=e[2*o];i[2*o+1]=s*t[4*l+0]+r*t[4*l+1]+a*t[4*l+2]+n,e[2*o+1]=~e[2*o+1]}}s.sort()}}catch(e){console.error("Gaussian splat sort worker encountered an error (will retry next frame):",e)}g&&w&&console.log(`[GaussianSplatting] ${m?"counting":"legacy"} sort: ${y} splats in ${(w.now()-A).toFixed(2)}ms`),e.postMessage({command:"sorted",depthMix:s,cameraId:_,sortRequestId:c,rangeVersion:p},[s.buffer])}}},b="u">typeof _native,I=b?_native:null,w=(e,t)=>{let s=(1<<t)-1;return(e&s)/s},A=(e,t)=>{t.x=w(e>>>21,11),t.y=w(e>>>11,10),t.z=w(e,11)},v=(e,t)=>{t[0]=255*w(e>>>24,8),t[1]=255*w(e>>>16,8),t[2]=255*w(e>>>8,8),t[3]=255*w(e,8)},C=(e,t)=>{let s=1/(.5*Math.sqrt(2)),r=(w(e>>>20,10)-.5)*s,a=(w(e>>>10,10)-.5)*s,i=(w(e,10)-.5)*s,n=Math.sqrt(1-(r*r+a*a+i*i));switch(e>>>30){case 0:t.set(n,r,a,i);break;case 1:t.set(r,n,a,i);break;case 2:t.set(r,a,n,i);break;case 3:t.set(r,a,i,n)}};(t=r||(r={}))[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT",t[t.DOUBLE=3]="DOUBLE",t[t.UCHAR=4]="UCHAR",t[t.UNDEFINED=5]="UNDEFINED",(s=a||(a={}))[s.MIN_X=0]="MIN_X",s[s.MIN_Y=1]="MIN_Y",s[s.MIN_Z=2]="MIN_Z",s[s.MAX_X=3]="MAX_X",s[s.MAX_Y=4]="MAX_Y",s[s.MAX_Z=5]="MAX_Z",s[s.MIN_SCALE_X=6]="MIN_SCALE_X",s[s.MIN_SCALE_Y=7]="MIN_SCALE_Y",s[s.MIN_SCALE_Z=8]="MIN_SCALE_Z",s[s.MAX_SCALE_X=9]="MAX_SCALE_X",s[s.MAX_SCALE_Y=10]="MAX_SCALE_Y",s[s.MAX_SCALE_Z=11]="MAX_SCALE_Z",s[s.PACKED_POSITION=12]="PACKED_POSITION",s[s.PACKED_ROTATION=13]="PACKED_ROTATION",s[s.PACKED_SCALE=14]="PACKED_SCALE",s[s.PACKED_COLOR=15]="PACKED_COLOR",s[s.X=16]="X",s[s.Y=17]="Y",s[s.Z=18]="Z",s[s.SCALE_0=19]="SCALE_0",s[s.SCALE_1=20]="SCALE_1",s[s.SCALE_2=21]="SCALE_2",s[s.DIFFUSE_RED=22]="DIFFUSE_RED",s[s.DIFFUSE_GREEN=23]="DIFFUSE_GREEN",s[s.DIFFUSE_BLUE=24]="DIFFUSE_BLUE",s[s.OPACITY=25]="OPACITY",s[s.F_DC_0=26]="F_DC_0",s[s.F_DC_1=27]="F_DC_1",s[s.F_DC_2=28]="F_DC_2",s[s.F_DC_3=29]="F_DC_3",s[s.ROT_0=30]="ROT_0",s[s.ROT_1=31]="ROT_1",s[s.ROT_2=32]="ROT_2",s[s.ROT_3=33]="ROT_3",s[s.MIN_COLOR_R=34]="MIN_COLOR_R",s[s.MIN_COLOR_G=35]="MIN_COLOR_G",s[s.MIN_COLOR_B=36]="MIN_COLOR_B",s[s.MAX_COLOR_R=37]="MAX_COLOR_R",s[s.MAX_COLOR_G=38]="MAX_COLOR_G",s[s.MAX_COLOR_B=39]="MAX_COLOR_B",s[s.SH_0=40]="SH_0",s[s.SH_1=41]="SH_1",s[s.SH_2=42]="SH_2",s[s.SH_3=43]="SH_3",s[s.SH_4=44]="SH_4",s[s.SH_5=45]="SH_5",s[s.SH_6=46]="SH_6",s[s.SH_7=47]="SH_7",s[s.SH_8=48]="SH_8",s[s.SH_9=49]="SH_9",s[s.SH_10=50]="SH_10",s[s.SH_11=51]="SH_11",s[s.SH_12=52]="SH_12",s[s.SH_13=53]="SH_13",s[s.SH_14=54]="SH_14",s[s.SH_15=55]="SH_15",s[s.SH_16=56]="SH_16",s[s.SH_17=57]="SH_17",s[s.SH_18=58]="SH_18",s[s.SH_19=59]="SH_19",s[s.SH_20=60]="SH_20",s[s.SH_21=61]="SH_21",s[s.SH_22=62]="SH_22",s[s.SH_23=63]="SH_23",s[s.SH_24=64]="SH_24",s[s.SH_25=65]="SH_25",s[s.SH_26=66]="SH_26",s[s.SH_27=67]="SH_27",s[s.SH_28=68]="SH_28",s[s.SH_29=69]="SH_29",s[s.SH_30=70]="SH_30",s[s.SH_31=71]="SH_31",s[s.SH_32=72]="SH_32",s[s.SH_33=73]="SH_33",s[s.SH_34=74]="SH_34",s[s.SH_35=75]="SH_35",s[s.SH_36=76]="SH_36",s[s.SH_37=77]="SH_37",s[s.SH_38=78]="SH_38",s[s.SH_39=79]="SH_39",s[s.SH_40=80]="SH_40",s[s.SH_41=81]="SH_41",s[s.SH_42=82]="SH_42",s[s.SH_43=83]="SH_43",s[s.SH_44=84]="SH_44",s[s.SH_45=85]="SH_45",s[s.SH_46=86]="SH_46",s[s.SH_47=87]="SH_47",s[s.SH_48=88]="SH_48",s[s.SH_49=89]="SH_49",s[s.SH_50=90]="SH_50",s[s.SH_51=91]="SH_51",s[s.SH_52=92]="SH_52",s[s.SH_53=93]="SH_53",s[s.SH_54=94]="SH_54",s[s.SH_55=95]="SH_55",s[s.SH_56=96]="SH_56",s[s.SH_57=97]="SH_57",s[s.SH_58=98]="SH_58",s[s.SH_59=99]="SH_59",s[s.SH_60=100]="SH_60",s[s.SH_61=101]="SH_61",s[s.SH_62=102]="SH_62",s[s.SH_63=103]="SH_63",s[s.SH_64=104]="SH_64",s[s.SH_65=105]="SH_65",s[s.SH_66=106]="SH_66",s[s.SH_67=107]="SH_67",s[s.SH_68=108]="SH_68",s[s.SH_69=109]="SH_69",s[s.SH_70=110]="SH_70",s[s.SH_71=111]="SH_71",s[s.UNDEFINED=112]="UNDEFINED";class P extends l.Mesh{static _GetSplatDataBytes(e){return ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):new Uint8Array(e)}static _GetSplatDataFloats(e){let t=P._GetSplatDataBytes(e),s=Float32Array.BYTES_PER_ELEMENT;if(t.byteLength%s!=0)throw Error(`Gaussian splat data byte length (${t.byteLength}) is not divisible by ${s} and cannot be reinterpreted as Float32 data.`);if(t.byteOffset%s!=0){let e=new Uint8Array(t.byteLength);return e.set(t),new Float32Array(e.buffer,0,t.byteLength/s)}return new Float32Array(t.buffer,t.byteOffset,t.byteLength/s)}static _BuildSplatRangeData(e,t){if(null===e)return{ranges:null,count:t,key:""};let s=[],r=0,a="";for(let i of e){let e=Math.max(0,Math.floor(i.offset)),n=Math.max(0,Math.min(t,e+Math.max(0,Math.floor(i.count)))-e);0!==n&&(s.push(e,n),r+=n,a+=`${e}:${n};`)}return{ranges:new Uint32Array(s),count:r,key:a}}get disableDepthSort(){return this._disableDepthSort}set disableDepthSort(e){!this._disableDepthSort&&e?(this._worker?.terminate(),this._worker=null,this._disableDepthSort=!0):this._disableDepthSort&&!e&&(this._disableDepthSort=!1,this._sortIsDirty=!0,this._instantiateWorker())}get viewDirectionFactor(){return i.Vector3.OneReadOnly}get shDegree(){return this._shDegree}set shDegree(e){let t=Math.max(0,Math.min(Math.round(e),this._maxShDegree));this._shDegree!==t&&(this._shDegree=t,this.material?.resetDrawCache())}get maxShDegree(){return this._maxShDegree}get splatCount(){return this._splatIndex?.length}get renderedSplatCount(){return this._activeSplatRanges?this._activeSplatRenderCount:this._vertexCount}setSplatIndexRanges(e){this._setSplatIndexRanges(e)}_setSplatIndexRanges(e){let t=P._BuildSplatRangeData(e,this._vertexCount);(null===this._activeSplatRanges?null===t.ranges:null!==t.ranges&&this._activeSplatRangeKey===t.key)||(this._activeSplatRanges=t.ranges,this._activeSplatRangeKey=t.key,this._activeSplatRenderCount=t.count,this._activeRangeVersion++,this._postIntervalsToWorker(),this._worker?(this._ensureDepthMixSize(Math.max(this._activeSplatRenderCount+15&-16,16)),this._sortIsDirty=!0):this._updateSplatIndexBuffer(this._vertexCount),this._postToWorker(!0))}get _isDepthSortSettled(){return this._readyToDisplay&&!this._sortIsDirty&&this._canPostToWorker}_ensureDepthMixSize(e){!b&&(this._depthMix&&this._depthMix.length===e&&0!==this._depthMix.buffer.byteLength||(this._depthMix=new BigInt64Array(e)))}_postIntervalsToWorker(){if(!this._worker)return;let e=new Uint32Array(this._activeSplatRanges?this._activeSplatRanges:[0,this._vertexCount]);this._worker.postMessage({command:"intervals",intervals:e},[e.buffer])}_setExternalWorkBuffer(e,t,s,r,a,i){this._covariancesATexture=t,this._covariancesBTexture=s,this._centersTexture=e,this._colorsTexture=r,this._splatPositions=a,this._vertexCount=i,this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._readyToDisplay=!1,this._instantiateWorker(),this.setEnabled(!0)}get splatsData(){return this._keepInRam?this._splatsData:null}get shData(){return this._keepInRam?this._shData:null}get splatSizeRange(){return isFinite(this._splatSizeMin)&&isFinite(this._splatSizeMax)?{min:this._splatSizeMin,max:this._splatSizeMax}:null}get covariancesATexture(){return this._covariancesATexture}get covariancesBTexture(){return this._covariancesBTexture}get centersTexture(){return this._centersTexture}get colorsTexture(){return this._colorsTexture}get rotationsATexture(){return this._rotationsATexture}get rotationsBTexture(){return this._rotationsBTexture}get rotationScaleTexture(){return this._rotationScaleTexture}get needsRotationScaleTextures(){return this._needsRotationScaleTextures}set needsRotationScaleTextures(e){this._needsRotationScaleTextures!==e&&(this._needsRotationScaleTextures=e,e&&this._covariancesATexture&&(this._splatsData?this.updateData(this._splatsData,this._shData??void 0,{flipY:!1},void 0,this._shDegree):u.Logger.Error("GaussianSplattingMeshBase: needsRotationScaleTextures was enabled after the mesh was already loaded, but the splat data is not kept in RAM. The rotation and scale matrix textures cannot be initialized. Please reload the mesh data via updateData() or construct with keepInRam=true.")))}get shTextures(){return this._shTextures}get useSog(){return this._useSog}get sogParams(){return this._sogParams}setSogTextureData(e){if(this._useSog=!0,this._sogParams?.codebookTexture?.dispose(),this._sogParams=e,this._vertexCount=e.splatCount,this._shDegree=e.shDegree??0,this._maxShDegree=this._shDegree,this._splatPositions=e.positions,this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._rotationsATexture?.dispose(),this._shTextures)for(let e of this._shTextures)e.dispose();this._centersTexture=e.meansTextureL,this._covariancesATexture=e.meansTextureU,this._covariancesBTexture=e.scalesTexture,this._rotationsATexture=e.quatsTexture,this._colorsTexture=e.sh0Texture;let t=[];e.shCentroidsTexture&&t.push(e.shCentroidsTexture),e.shLabelsTexture&&t.push(e.shLabelsTexture),this._shTextures=t.length?t:null,this._material?.resetDrawCache();let s=e.meansTextureL.getSize();this._textureSize.x=s.width,this._textureSize.y=s.height,this._updateSplatIndexBuffer(this._vertexCount),this._instantiateWorker();let r=e.positions,a=new i.Vector3(1/0,1/0,1/0),n=new i.Vector3(-1/0,-1/0,-1/0);for(let e=0;e<this._vertexCount;e++){let t=r[4*e+0],s=r[4*e+1],i=r[4*e+2];t<a.x&&(a.x=t),s<a.y&&(a.y=s),i<a.z&&(a.z=i),t>n.x&&(n.x=t),s>n.y&&(n.y=s),i>n.z&&(n.z=i)}this.getBoundingInfo().reConstruct(a,n,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0}get kernelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.kernelSize:0}get compensation(){return this._material instanceof n.GaussianSplattingMaterial&&this._material.compensation}get minPixelSize(){return this._material instanceof n.GaussianSplattingMaterial?this._material.minPixelSize:0}set minPixelSize(e){this._material instanceof n.GaussianSplattingMaterial&&(this._material.minPixelSize=Math.max(0,e))}set material(e){this._material=e,this._material.backFaceCulling=!1,this._material.cullBackFaces=!1,e.resetDrawCache()}get material(){return this._material}static _MakeSplatGeometryForMesh(e){let t=new h.VertexData,s=[-2,-2,0,2,-2,0,2,2,0,-2,2,0],r=[0,1,2,0,2,3],a=[],i=[];for(let e=0;e<P._BatchSize;e++){for(let t=0;t<12;t++)2==t||5==t||8==t||11==t?a.push(e):a.push(s[t]);i.push(r.map(t=>t+4*e))}t.positions=a,t.indices=i.flat(),t.applyToMesh(e)}constructor(e,t=null,s=null,r=!1){super(e,s),this.safeOrbitCameraLimits=null,this._vertexCount=0,this._worker=null,this._modelViewProjectionMatrix=i.Matrix.Identity(),this._canPostToWorker=!0,this._readyToDisplay=!1,this._sortRequestId=0,this._activeRangeVersion=0,this._hasRenderedOnce=!1,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._needsRotationScaleTextures=!1,this._splatPositions=null,this._splatIndex=null,this._shTextures=null,this._splatsData=null,this._shData=null,this._textureSize=new i.Vector2(0,0),this._keepInRam=!1,this._alwaysRetainSplatsData=!1,this._flipY=!1,this._delayedTextureUpdate=null,this._useRGBACovariants=!1,this._useSog=!1,this._sogParams=null,this._material=null,this._tmpCovariances=[0,0,0,0,0,0],this._splatSizeMin=1/0,this._splatSizeMax=-1/0,this._sortIsDirty=!1,this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._shDegree=0,this._maxShDegree=0,this._cameraViewInfos=new Map,this.onPartCountChangedObservable=new _.Observable,this.onPartRemovedObservable=new _.Observable,this.viewUpdateThreshold=P._DefaultViewUpdateThreshold,this._disableDepthSort=!1,this._loadingPromise=null,this._updateTextureFromData=(e,t,s,r,a)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,0,r,s,a,0,0,!1)},this._updateTextureFromDataRect=(e,t,s,r,a,i)=>{this._getTextureDataUpdateEngine().updateTextureData(e.getInternalTexture(),t,s,r,a,i,0,0,!1)},this.subMeshes=[],new o.SubMesh(0,0,4*P._BatchSize,0,6*P._BatchSize,this),this.setEnabled(!1),this._useRGBACovariants=!this.getEngine().isWebGPU&&1===this.getEngine().version,function(e){if(b)return;let t=e.customAnimationFrameRequester;if(t?._gsInterFrameYield)return t._refCount++;if(t)return;let s=0,r=0;e.customAnimationFrameRequester={_gsInterFrameYield:!0,_refCount:1,requestAnimationFrame:e=>s=setTimeout(()=>{r=requestAnimationFrame(e)},0),cancelAnimationFrame:e=>{clearTimeout(s),r>0&&cancelAnimationFrame(r),s=0,r=0}}}(this.getEngine()),this._keepInRam=r,t&&(this._loadingPromise=this.loadFileAsync(t));const a=new n.GaussianSplattingMaterial(this.name+"_material",this._scene);a.setSourceMesh(this),a.doNotSerialize=!0,this._material=a,this._scene.onCameraRemovedObservable.add(e=>{let t=e.uniqueId,s=this._cameraViewInfos.get(t);s&&(this._geometry===s.mesh.geometry&&(this._geometry=null),s.mesh.dispose(),this._cameraViewInfos.delete(t))})}getLoadingPromise(){return this._loadingPromise}getClassName(){return"GaussianSplattingMeshBase"}getTotalVertices(){return this._vertexCount}isReady(e=!1){if(!super.isReady(e,!0))return!1;if(!this._readyToDisplay)return this._postToWorker(!0),!1;if(!this._hasRenderedOnce&&!this._disableDepthSort){let e=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],t=this.computeWorldMatrix(!0),s=!1;for(let r of e){if(!r)continue;let e=this._cameraViewInfos.get(r.uniqueId);if(!e||!e.splatIndexBufferSet||e.sortAppliedId!==e.sortRequestId){s=!0;continue}this._isSortStateDirty(e,t,r,!0)&&(s=!0)}if(s)return this._postToWorker(!0),!1}if(!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry),this.material&&this.material.shadowDepthWrapper){let e=this._scene.getEngine(),t=e.currentRenderPassId;try{for(let t of this._scene.lights){let s=t.getShadowGenerator();if(!s)continue;let r=s.getShadowMap(),a=r?.renderPassIds;if(a&&0!==a.length){for(let t=0;t<a.length;++t)for(let r of(e.currentRenderPassId=a[t],this.subMeshes))if(!s.isReady(r,!0,!1))return!1}}}finally{e.currentRenderPassId=t}}return!0}_getCameraDirection(e){let t=e.getViewMatrix(),s=e.getProjectionMatrix(),r=i.TmpVectors.Matrix[0];t.multiplyToRef(s,r);let a=this.computeWorldMatrix(!0),n=i.TmpVectors.Matrix[1];a.multiplyToRef(t,n),a.multiplyToRef(r,this._modelViewProjectionMatrix);let o=i.TmpVectors.Vector3[1];return o.set(n.m[2],n.m[6],n.m[10]),o.normalize(),o}_isSortStateDirty(e,t,s,r=!1){let a=t.m,i=e.sortWorldMatrix.m;for(let e=0;e<i.length;e++)if(!x.WithinEpsilon(i[e],a[e],this.viewUpdateThreshold))return!0;if(r)return!1;let n=s.getViewMatrix();if(!x.WithinEpsilon(e.sortCameraForward.x,n.m[2],this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraForward.y,n.m[6],this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraForward.z,n.m[10],this.viewUpdateThreshold))return!0;let o=s.globalPosition;return!x.WithinEpsilon(e.sortCameraPosition.x,o.x,this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraPosition.y,o.y,this.viewUpdateThreshold)||!x.WithinEpsilon(e.sortCameraPosition.z,o.z,this.viewUpdateThreshold)}_postToWorker(e=!1){let t=this._scene.getFrameId(),s=!1;this._cameraViewInfos.forEach(e=>{e.frameIdLastUpdate!==t&&(s=!0)});let r=this._scene.activeCameras?.length?this._scene.activeCameras:[this._scene.activeCamera],a=[];r.forEach(e=>{if(!e)return;let s=e.uniqueId,r=this._cameraViewInfos.get(s);if(r)a.push(r);else{let r=new l.Mesh(this.name+"_cameraMesh_"+s,this._scene);if(r.doNotSerialize=!0,r.reservedDataStore={hidden:!0},r.setEnabled(!1),r.material=this.material,r.material&&r.material instanceof n.GaussianSplattingMaterial){let e=r.material;e.getSourceMesh()||e.setSourceMesh(this)}P._MakeSplatGeometryForMesh(r);let o={camera:e,cameraDirection:new i.Vector3(0,0,0),sortWorldMatrix:i.Matrix.Identity(),sortCameraForward:new i.Vector3(0,0,0),sortCameraPosition:new i.Vector3(0,0,0),sortRequestId:0,sortAppliedId:0,mesh:r,frameIdLastUpdate:t,splatIndexBufferSet:!1};a.push(o),this._cameraViewInfos.set(s,o)}}),a.sort((e,t)=>e.splatIndexBufferSet!==t.splatIndexBufferSet?e.splatIndexBufferSet?1:-1:e.frameIdLastUpdate-t.frameIdLastUpdate);let o=!!I?.sortSplats&&!!this._splatPositions&&!!this._splatIndex,h=!this._disableDepthSort&&(this._worker||o);if((e||s)&&h&&(this._scene.activeCameras?.length||this._scene.activeCamera)&&this._canPostToWorker){let s=this.computeWorldMatrix(!0);a.forEach(r=>{let a=r.camera,i=this._getCameraDirection(a);if((e||this._isSortStateDirty(r,s,a))&&this._canPostToWorker){let e=a.getViewMatrix();r.cameraDirection.copyFrom(i),r.sortWorldMatrix.copyFrom(s),r.sortCameraForward.set(e.m[2],e.m[6],e.m[10]),r.sortCameraPosition.copyFrom(a.globalPosition),r.sortRequestId=++this._sortRequestId,r.frameIdLastUpdate=t,this._canPostToWorker=!1,this._worker?this._worker.postMessage({command:"sort",worldMatrix:s.m,cameraForward:[e.m[2],e.m[6],e.m[10]],cameraPosition:[a.globalPosition.x,a.globalPosition.y,a.globalPosition.z],depthMix:this._depthMix,cameraId:a.uniqueId,sortRequestId:r.sortRequestId,rangeVersion:this._activeRangeVersion,useCountingSort:P.UseCountingSort,rightHanded:this._scene.useRightHandedSystem,logSortPerformance:P.LogSortPerformance},[this._depthMix.buffer]):I?.sortSplats&&(this._activeSplatRanges?this._updateSplatIndexBuffer(this._vertexCount):I.sortSplats(this._modelViewProjectionMatrix,this._splatPositions,this._splatIndex,this._scene.useRightHandedSystem),r.splatIndexBufferSet?r.mesh.thinInstanceBufferUpdated("splatIndex"):(r.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),r.splatIndexBufferSet=!0),r.sortAppliedId=r.sortRequestId,this._canPostToWorker=!0,this._readyToDisplay=!0)}})}else this._disableDepthSort&&(this._splatIndex&&(a.forEach(e=>{e.splatIndexBufferSet||(e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0)}),this._readyToDisplay=!0),this._canPostToWorker=!0)}render(e,t,s){this._postToWorker(),!this._geometry&&this._cameraViewInfos.size&&(this._geometry=this._cameraViewInfos.values().next().value.mesh.geometry);let r=this._scene.activeCamera.uniqueId,a=this._cameraViewInfos.get(r);if(!a||!a.splatIndexBufferSet)return this;this.onBeforeRenderObservable&&this.onBeforeRenderObservable.notifyObservers(this);let i=a.mesh;i.getWorldMatrix().copyFrom(this.getWorldMatrix());let n=this._scene.getEngine().currentRenderPassId,o=this.getMaterialForRenderPass(n);o&&i.setMaterialForRenderPass(n,o);let l=i.render(e,t,s);return this._hasRenderedOnce=!0,o&&i.setMaterialForRenderPass(n,void 0),this.onAfterRenderObservable&&this.onAfterRenderObservable.notifyObservers(this),l}static _TypeNameToEnum(e){switch(e){case"float":return 0;case"int":return 1;case"uint":return 2;case"double":return 3;case"uchar":return 4}return 5}static _ValueNameToEnum(e){switch(e){case"min_x":return 0;case"min_y":return 1;case"min_z":return 2;case"max_x":return 3;case"max_y":return 4;case"max_z":return 5;case"min_scale_x":return 6;case"min_scale_y":return 7;case"min_scale_z":return 8;case"max_scale_x":return 9;case"max_scale_y":return 10;case"max_scale_z":return 11;case"packed_position":return 12;case"packed_rotation":return 13;case"packed_scale":return 14;case"packed_color":return 15;case"x":return 16;case"y":return 17;case"z":return 18;case"scale_0":return 19;case"scale_1":return 20;case"scale_2":return 21;case"diffuse_red":case"red":return 22;case"diffuse_green":case"green":return 23;case"diffuse_blue":case"blue":return 24;case"f_dc_0":return 26;case"f_dc_1":return 27;case"f_dc_2":return 28;case"f_dc_3":return 29;case"opacity":return 25;case"rot_0":return 30;case"rot_1":return 31;case"rot_2":return 32;case"rot_3":return 33;case"min_r":return 34;case"min_g":return 35;case"min_b":return 36;case"max_r":return 37;case"max_g":return 38;case"max_b":return 39;case"f_rest_0":return 40;case"f_rest_1":return 41;case"f_rest_2":return 42;case"f_rest_3":return 43;case"f_rest_4":return 44;case"f_rest_5":return 45;case"f_rest_6":return 46;case"f_rest_7":return 47;case"f_rest_8":return 48;case"f_rest_9":return 49;case"f_rest_10":return 50;case"f_rest_11":return 51;case"f_rest_12":return 52;case"f_rest_13":return 53;case"f_rest_14":return 54;case"f_rest_15":return 55;case"f_rest_16":return 56;case"f_rest_17":return 57;case"f_rest_18":return 58;case"f_rest_19":return 59;case"f_rest_20":return 60;case"f_rest_21":return 61;case"f_rest_22":return 62;case"f_rest_23":return 63;case"f_rest_24":return 64;case"f_rest_25":return 65;case"f_rest_26":return 66;case"f_rest_27":return 67;case"f_rest_28":return 68;case"f_rest_29":return 69;case"f_rest_30":return 70;case"f_rest_31":return 71;case"f_rest_32":return 72;case"f_rest_33":return 73;case"f_rest_34":return 74;case"f_rest_35":return 75;case"f_rest_36":return 76;case"f_rest_37":return 77;case"f_rest_38":return 78;case"f_rest_39":return 79;case"f_rest_40":return 80;case"f_rest_41":return 81;case"f_rest_42":return 82;case"f_rest_43":return 83;case"f_rest_44":return 84;case"f_rest_45":return 85;case"f_rest_46":return 86;case"f_rest_47":return 87;case"f_rest_48":return 88;case"f_rest_49":return 89;case"f_rest_50":return 90;case"f_rest_51":return 91;case"f_rest_52":return 92;case"f_rest_53":return 93;case"f_rest_54":return 94;case"f_rest_55":return 95;case"f_rest_56":return 96;case"f_rest_57":return 97;case"f_rest_58":return 98;case"f_rest_59":return 99;case"f_rest_60":return 100;case"f_rest_61":return 101;case"f_rest_62":return 102;case"f_rest_63":return 103;case"f_rest_64":return 104;case"f_rest_65":return 105;case"f_rest_66":return 106;case"f_rest_67":return 107;case"f_rest_68":return 108;case"f_rest_69":return 109;case"f_rest_70":return 110;case"f_rest_71":return 111}return 112}static ParseHeader(e){var t;let s,r=new Uint8Array(e),a=new TextDecoder().decode(r.slice(0,10240)),i="end_header\n",n=a.indexOf(i);if(n<0||!a)return null;let o=parseInt(/element vertex (\d+)\n/.exec(a)[1]),l=/element chunk (\d+)\n/.exec(a),h=0;l&&(h=parseInt(l[1]));let _=0,c=0,p={double:8,int:4,uint:4,float:4,short:2,ushort:2,uchar:1,list:0};(t=s||(s={}))[t.Vertex=0]="Vertex",t[t.Chunk=1]="Chunk",t[t.SH=2]="SH",t[t.Unused=3]="Unused";let d=1,f=[],x=[],m=a.slice(0,n).split("\n"),g=0;for(let e of m)if(e.startsWith("property ")){let[,t,s]=e.split(" "),r=P._ValueNameToEnum(s);112!=r&&(r>=111?g=4:r>=84?g=Math.max(g,3):r>=63?g=Math.max(g,2):r>=48&&(g=Math.max(g,1)));let a=P._TypeNameToEnum(t);1==d?(x.push({value:r,type:a,offset:c}),c+=p[t]):0==d?(f.push({value:r,type:a,offset:_}),_+=p[t]):2==d&&f.push({value:r,type:a,offset:_}),p[t]||u.Logger.Warn(`Unsupported property type: ${t}.`)}else if(e.startsWith("element ")){let[,t]=e.split(" ");d="chunk"==t?1:"vertex"==t?0:"sh"==t?2:3}let S=new DataView(e,n+i.length),T=new ArrayBuffer(P._RowOutputLength*o),M=null,y=0;return g&&(M=new ArrayBuffer((y=3*((g+1)*(g+1)-1))*o)),{vertexCount:o,chunkCount:h,rowVertexLength:_,rowChunkLength:c,vertexProperties:f,chunkProperties:x,dataView:S,buffer:T,shDegree:g,shCoefficientCount:y,shBuffer:M}}static _GetCompressedChunks(e,t){if(!e.chunkCount)return null;let s=e.dataView,r=Array(e.chunkCount);for(let a=0;a<e.chunkCount;a++){let n={min:new i.Vector3,max:new i.Vector3,minScale:new i.Vector3,maxScale:new i.Vector3,minColor:new i.Vector3(0,0,0),maxColor:new i.Vector3(1,1,1)};r[a]=n;for(let r=0;r<e.chunkProperties.length;r++){let a,i=e.chunkProperties[r];if(0===i.type)switch(a=s.getFloat32(i.offset+t.value,!0),i.value){case 0:n.min.x=a;break;case 1:n.min.y=a;break;case 2:n.min.z=a;break;case 3:n.max.x=a;break;case 4:n.max.y=a;break;case 5:n.max.z=a;break;case 6:n.minScale.x=a;break;case 7:n.minScale.y=a;break;case 8:n.minScale.z=a;break;case 9:n.maxScale.x=a;break;case 10:n.maxScale.y=a;break;case 11:n.maxScale.z=a;break;case 34:n.minColor.x=a;break;case 35:n.minColor.y=a;break;case 36:n.minColor.z=a;break;case 37:n.maxColor.x=a;break;case 38:n.maxColor.y=a;break;case 39:n.maxColor.z=a}}t.value+=e.rowChunkLength}return r}static _GetSplat(e,t,s,r){let a=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[0],o=P._RowOutputLength,l=e.buffer,h=e.dataView,u=new Float32Array(l,t*o,3),_=new Float32Array(l,t*o+12,3),c=new Uint8ClampedArray(l,t*o+24,4),p=new Uint8ClampedArray(l,t*o+28,4),d=null;e.shBuffer&&(d=new Uint8ClampedArray(e.shBuffer,t*e.shCoefficientCount,e.shCoefficientCount));let f=t>>8,m=255,g=0,S=0,T=0,M=[];for(let i=0;i<e.vertexProperties.length;i++){let o,l=e.vertexProperties[i];switch(l.type){case 0:o=h.getFloat32(r.value+l.offset,!0);break;case 1:o=h.getInt32(r.value+l.offset,!0);break;case 2:o=h.getUint32(r.value+l.offset,!0);break;case 3:o=h.getFloat64(r.value+l.offset,!0);break;case 4:o=h.getUint8(r.value+l.offset);break;default:continue}switch(l.value){case 12:{let e=s[f];A(o,n),u[0]=x.Lerp(e.min.x,e.max.x,n.x),u[1]=x.Lerp(e.min.y,e.max.y,n.y),u[2]=x.Lerp(e.min.z,e.max.z,n.z)}break;case 13:C(o,a),m=a.x,g=a.y,S=a.z,T=a.w;break;case 14:{let e=s[f];A(o,n),_[0]=Math.exp(x.Lerp(e.minScale.x,e.maxScale.x,n.x)),_[1]=Math.exp(x.Lerp(e.minScale.y,e.maxScale.y,n.y)),_[2]=Math.exp(x.Lerp(e.minScale.z,e.maxScale.z,n.z))}break;case 15:{let e=s[f];v(o,c),c[0]=255*x.Lerp(e.minColor.x,e.maxColor.x,c[0]/255),c[1]=255*x.Lerp(e.minColor.y,e.maxColor.y,c[1]/255),c[2]=255*x.Lerp(e.minColor.z,e.maxColor.z,c[2]/255)}break;case 16:u[0]=o;break;case 17:u[1]=o;break;case 18:u[2]=o;break;case 19:_[0]=Math.exp(o);break;case 20:_[1]=Math.exp(o);break;case 21:_[2]=Math.exp(o);break;case 22:c[0]=o;break;case 23:c[1]=o;break;case 24:c[2]=o;break;case 26:c[0]=(.5+P._SH_C0*o)*255;break;case 27:c[1]=(.5+P._SH_C0*o)*255;break;case 28:c[2]=(.5+P._SH_C0*o)*255;break;case 29:c[3]=(.5+P._SH_C0*o)*255;break;case 25:c[3]=1/(1+Math.exp(-o))*255;break;case 30:m=o;break;case 31:g=o;break;case 32:S=o;break;case 33:T=o}if(d&&l.value>=40&&l.value<=111){let s=l.value-40;if(4==l.type&&e.chunkCount){let r=h.getUint8(e.rowChunkLength*e.chunkCount+e.vertexCount*e.rowVertexLength+t*e.shCoefficientCount+s);M[s]=(8/255*r-4)*127.5+127.5}else{let e=x.Clamp(127.5*o+127.5,0,255);M[s]=e}}}if(d){let t=1==e.shDegree?3:2==e.shDegree?8:3==e.shDegree?15:24;for(let e=0;e<t;e++)d[3*e+0]=M[e],d[3*e+1]=M[e+t],d[3*e+2]=M[e+2*t]}a.set(g,S,T,m),a.normalize(),p[0]=127.5*a.w+127.5,p[1]=127.5*a.x+127.5,p[2]=127.5*a.y+127.5,p[3]=127.5*a.z+127.5,r.value+=e.rowVertexLength}static*ConvertPLYWithSHToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return{buffer:e};let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);let i=null;if(s.shDegree&&s.shBuffer){let e=Math.ceil(s.shCoefficientCount/16),t=0,r=new Uint8Array(s.shBuffer);i=[];let a=s.vertexCount,n=g.EngineStore.LastCreatedEngine;if(n){let o=n.getCaps().maxTextureSize;i=E(e,Math.ceil(a/o)*o*16);for(let e=0;e<a;e++)for(let a=0;a<s.shCoefficientCount;a++){let s=r[t++];i[Math.floor(a/16)][a%16+16*e]=s}}}return{buffer:s.buffer,sh:i,shDegree:s.shDegree}}static*ConvertPLYToSplat(e,t=!1){let s=P.ParseHeader(e);if(!s)return e;let r={value:0},a=P._GetCompressedChunks(s,r);for(let e=0;e<s.vertexCount;e++)P._GetSplat(s,e,a,r),e%P._PlyConversionBatchSize==0&&t&&(yield);return s.buffer}static async ConvertPLYToSplatAsync(e){return await (0,m.runCoroutineAsync)(P.ConvertPLYToSplat(e,!0),(0,m.createYieldingScheduler)())}static async ConvertPLYWithSHToSplatAsync(e){return await (0,m.runCoroutineAsync)(P.ConvertPLYWithSHToSplat(e,!0),(0,m.createYieldingScheduler)())}async loadDataAsync(e){return await this.updateDataAsync(e)}async loadFileAsync(e,t){await (0,S.ImportMeshAsync)(e,t||g.EngineStore.LastCreatedScene,{pluginOptions:{splat:{gaussianSplattingMesh:this}}})}dispose(e){var t;let s;if(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures)for(let e of this._shTextures)e.dispose();this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._sogParams?.codebookTexture?.dispose(),this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._rotationDataA=null,this._rotationDataB=null,this._rotationScaleData=null,this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._shTextures=null,this._cachedBoundingMin=null,this._cachedBoundingMax=null,s=(t=this.getEngine()).customAnimationFrameRequester,s?._gsInterFrameYield&&(s._refCount--,0===s._refCount&&(t.customAnimationFrameRequester=null)),this._worker?.terminate(),this._worker=null,this.onPartCountChangedObservable.clear(),this.onPartRemovedObservable.clear(),this._cameraViewInfos.forEach(e=>{e.mesh.dispose()}),super.dispose(e,!0)}_copyTextures(e){if(this._covariancesATexture=e.covariancesATexture?.clone(),this._covariancesBTexture=e.covariancesBTexture?.clone(),this._centersTexture=e.centersTexture?.clone(),this._colorsTexture=e.colorsTexture?.clone(),e._shTextures)for(let t of(this._shTextures=[],e._shTextures))this._shTextures?.push(t.clone());e._rotationsATexture&&(this._rotationsATexture=e._rotationsATexture.clone(),this._rotationsBTexture=e._rotationsBTexture?.clone(),this._rotationScaleTexture=e._rotationScaleTexture?.clone())}clone(e=""){let t=new P(e,void 0,this.getScene());t._copySource(this),t.makeGeometryUnique(),t._vertexCount=this._vertexCount,t._copyTextures(this),t._modelViewProjectionMatrix=i.Matrix.Identity(),t._splatPositions=this._splatPositions,t._readyToDisplay=!1,t._hasRenderedOnce=!1,t._disableDepthSort=this._disableDepthSort,t._instantiateWorker();let s=this.getBoundingInfo();return t.getBoundingInfo().reConstruct(s.minimum,s.maximum,this.getWorldMatrix()),t.forcedInstanceCount=this.forcedInstanceCount,t.setEnabled(!0),t}_makeEmptySplat(e,t,s,r){let a=this._useRGBACovariants?4:2;this._splatPositions[4*e+0]=0,this._splatPositions[4*e+1]=0,this._splatPositions[4*e+2]=0,t[4*e+0]=(0,p.ToHalfFloat)(0),t[4*e+1]=(0,p.ToHalfFloat)(0),t[4*e+2]=(0,p.ToHalfFloat)(0),t[4*e+3]=(0,p.ToHalfFloat)(0),s[e*a+0]=(0,p.ToHalfFloat)(0),s[e*a+1]=(0,p.ToHalfFloat)(0),r[4*e+3]=0}_makeSplat(e,t,s,r,a,n,o,l,h,u=e){let _=i.TmpVectors.Matrix[0],c=i.TmpVectors.Matrix[1],d=i.TmpVectors.Quaternion[0],f=this._useRGBACovariants?4:2,x=t[8*u+0],m=t[8*u+1]*(h?-1:1),g=t[8*u+2];if(this._splatPositions[4*e+0]=x,this._splatPositions[4*e+1]=m,this._splatPositions[4*e+2]=g,o.minimizeInPlaceFromFloats(x,m,g),l.maximizeInPlaceFromFloats(x,m,g),d.set((s[32*u+28+1]-127.5)/127.5,(s[32*u+28+2]-127.5)/127.5,(s[32*u+28+3]-127.5)/127.5,-(s[32*u+28+0]-127.5)/127.5),d.normalize(),d.toRotationMatrix(_),i.Matrix.ScalingToRef(2*t[8*u+3+0],2*t[8*u+3+1],2*t[8*u+3+2],c),this._needsRotationScaleTextures){(!this._rotationDataA||this._rotationDataA.length<r.length)&&(this._rotationDataA=new Uint16Array(r.length),this._rotationDataB=new Uint16Array(r.length),this._rotationScaleData=new Uint16Array(r.length));let t=this._rotationDataA,s=this._rotationDataB,a=this._rotationScaleData,i=_.m,n=c.m;t[4*e+0]=(0,p.ToHalfFloat)(i[0]),t[4*e+1]=(0,p.ToHalfFloat)(i[1]),t[4*e+2]=(0,p.ToHalfFloat)(i[2]),t[4*e+3]=(0,p.ToHalfFloat)(i[4]),s[4*e+0]=(0,p.ToHalfFloat)(i[5]),s[4*e+1]=(0,p.ToHalfFloat)(i[6]),s[4*e+2]=(0,p.ToHalfFloat)(i[8]),s[4*e+3]=(0,p.ToHalfFloat)(i[9]),a[4*e+0]=(0,p.ToHalfFloat)(i[10]),a[4*e+1]=(0,p.ToHalfFloat)(n[0]),a[4*e+2]=(0,p.ToHalfFloat)(n[5]),a[4*e+3]=(0,p.ToHalfFloat)(n[10])}let S=_.multiplyToRef(c,i.TmpVectors.Matrix[0]).m,T=this._tmpCovariances;T[0]=S[0]*S[0]+S[1]*S[1]+S[2]*S[2],T[1]=S[0]*S[4]+S[1]*S[5]+S[2]*S[6],T[2]=S[0]*S[8]+S[1]*S[9]+S[2]*S[10],T[3]=S[4]*S[4]+S[5]*S[5]+S[6]*S[6],T[4]=S[4]*S[8]+S[5]*S[9]+S[6]*S[10],T[5]=S[8]*S[8]+S[9]*S[9]+S[10]*S[10];let M=-1e4;for(let e=0;e<6;e++)M=Math.max(M,Math.abs(T[e]));this._splatPositions[4*e+3]=M;let y=M;r[4*e+0]=(0,p.ToHalfFloat)(T[0]/y),r[4*e+1]=(0,p.ToHalfFloat)(T[1]/y),r[4*e+2]=(0,p.ToHalfFloat)(T[2]/y),r[4*e+3]=(0,p.ToHalfFloat)(T[3]/y),a[e*f+0]=(0,p.ToHalfFloat)(T[4]/y),a[e*f+1]=(0,p.ToHalfFloat)(T[5]/y);let D=T[0],b=T[1],I=T[2],w=T[3],A=T[4],v=T[5],C=Math.pow(Math.abs(D*(w*v-A*A)-b*(b*v-A*I)+I*(b*A-w*I)),1/6);C<this._splatSizeMin&&(this._splatSizeMin=C),C>this._splatSizeMax&&(this._splatSizeMax=C),n[4*e+0]=s[32*u+24+0],n[4*e+1]=s[32*u+24+1],n[4*e+2]=s[32*u+24+2],n[4*e+3]=s[32*u+24+3]}_onUpdateTextures(e){}_onIndexDataReceived(e,t){}_onIncrementalUpdateStart(e){}get isCompound(){return!1}_setDelayedTextureUpdate(e,t,s,r){this._delayedTextureUpdate={covA:e,covB:t,colors:s,centers:this._splatPositions,sh:r}}_updateTextures(e,t,s,r){let a=this._getTextureSize(this._vertexCount),i=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,1),n=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,0),o=(e,t,s)=>new c.RawTexture(null,e,t,s,this._scene,!1,!1,1,7),l=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,2),h=null===this._covariancesATexture,u=this._textureSize.y!=a.y;if(h||u){if(this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._shTextures){for(let e of this._shTextures)e.dispose();this._shTextures=null}if(this._textureSize=a,this._covariancesATexture=l(e,a.x,a.y,5),this._covariancesBTexture=l(t,a.x,a.y,this._useRGBACovariants?5:7),this._centersTexture=i(this._splatPositions,a.x,a.y,5),this._colorsTexture=n(s,a.x,a.y,5),r){this._shTextures=[];for(let e=0;e<r.length;e++){let e=o(a.x,a.y,11);e.wrapU=0,e.wrapV=0,this._shTextures.push(e)}for(let e=0;e<r.length;e++)this._updateShTextureData(this._shTextures[e],r[e],a.x,0,a.y)}if(this._needsRotationScaleTextures){let t=this._rotationDataA??new Uint16Array(e.length),s=this._rotationDataB??new Uint16Array(e.length),r=this._rotationScaleData??new Uint16Array(e.length);this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._rotationsATexture=l(t,a.x,a.y,5),this._rotationsBTexture=l(s,a.x,a.y,5),this._rotationScaleTexture=l(r,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0}if(this._onUpdateTextures(a),h)this._instantiateWorker();else{if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:T,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._postToWorker(!0)}}else{this._setDelayedTextureUpdate(e,t,s,r);let i=Float32Array.from(this._splatPositions),n=this._vertexCount;if(this._worker&&(this._worker.postMessage({command:T,positions:i,vertexCount:n},[i.buffer]),this._postIntervalsToWorker()),r&&!this._shTextures){this._shTextures=[];for(let e=0;e<r.length;e++){let t=o(a.x,a.y,11);t.wrapU=0,t.wrapV=0,this._shTextures.push(t),this._updateShTextureData(t,r[e],a.x,0,a.y)}}this._needsRotationScaleTextures&&this._rotationDataA&&(this._rotationsATexture?(this._updateTextureFromData(this._rotationsATexture,this._rotationDataA,a.x,0,a.y),this._updateTextureFromData(this._rotationsBTexture,this._rotationDataB,a.x,0,a.y),this._updateTextureFromData(this._rotationScaleTexture,this._rotationScaleData,a.x,0,a.y)):(this._rotationsATexture=l(this._rotationDataA,a.x,a.y,5),this._rotationsBTexture=l(this._rotationDataB,a.x,a.y,5),this._rotationScaleTexture=l(this._rotationScaleData,a.x,a.y,5),this._rotationsATexture.wrapU=0,this._rotationsATexture.wrapV=0,this._rotationsBTexture.wrapU=0,this._rotationsBTexture.wrapV=0,this._rotationScaleTexture.wrapU=0,this._rotationScaleTexture.wrapV=0)),this._onUpdateTextures(a),this._postToWorker(!0)}}_canReuseCachedData(e,t){return!(e<=0)&&!(e>t)&&null!==this._splatPositions&&null!==this._cachedBoundingMin&&null!==this._cachedBoundingMax&&null!==this._covariancesATexture&&this._getTextureSize(t).y===this._textureSize.y}_notifyWorkerNewData(){if(this._worker){let e=Float32Array.from(this._splatPositions),t=this._vertexCount;this._worker.postMessage({command:T,positions:e,vertexCount:t},[e.buffer]),this._postIntervalsToWorker()}this._sortIsDirty=!0}_postWorkerPositionsRange(e,t){if(!this._worker||!this._splatPositions||t<=0)return;let s=4*e,r=this._splatPositions.slice(s,s+4*t);this._worker.postMessage({command:"positionsUpdate",offset:s,data:r},[r.buffer]),this._sortIsDirty=!0}*_updateData(e,t,s,r,{flipY:a=!1,previousVertexCount:n=0}={},o){this._covariancesATexture||(this._readyToDisplay=!1),this._flipY=a;let l=new Uint8Array(e),h=new Float32Array(l.buffer);this._keepInRam||this._alwaysRetainSplatsData?(this._splatsData=l.buffer,this._shData=s?s.map(e=>new Uint8Array(e)):null):(this._splatsData=null,this._shData=null);let u=l.length/P._RowOutputLength;u!=this._vertexCount&&(this._activeSplatRanges=null,this._activeSplatRangeKey="",this._activeSplatRenderCount=0,this._updateSplatIndexBuffer(u)),this._vertexCount=u,this._maxShDegree=s?o??0:0,this._shDegree=this._maxShDegree;let _=this._getTextureSize(u),c=_.x*_.y,p=P.ProgressiveUpdateAmount??_.y;r&&this._onIndexDataReceived(r,c);let d=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),f=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),x=this._useRGBACovariants?4:2,m=new Uint16Array(4*c),g=new Uint16Array(x*c),S=new Uint8Array(4*c),T=this._canReuseCachedData(n,u);T||(this._splatSizeMin=1/0,this._splatSizeMax=-1/0);let M=T?Math.floor(n/_.x):0,y=M*_.x,D=this._splatPositions;if(this._splatPositions=new Float32Array(4*c),T&&(this._splatPositions.set(D.subarray(0,4*n)),d.copyFrom(this._cachedBoundingMin),f.copyFrom(this._cachedBoundingMax),this._onIncrementalUpdateStart(_)),P.ProgressiveUpdateAmount){T||this._updateTextures(m,g,S,s),this.setEnabled(!0);let e=Math.ceil(_.y/p);for(let r=0;r<e;r++){let e=r*p,i=Math.min(e+p,_.y);if(i<=M)continue;let n=Math.max(e,M),o=n*_.x,c=i*_.x;for(let e=o;e<c;e++)e<u?this._makeSplat(e,h,l,m,g,S,d,f,a):this._makeEmptySplat(e,m,g,S);this._updateSubTextures(this._splatPositions,m,g,S,n,i-n,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),t&&(yield)}this._notifyWorkerNewData()}else{for(let e=y;e<u;e++)this._makeSplat(e,h,l,m,g,S,d,f,a),t&&e%P._SplatBatchSize==0&&(yield);let e=T?c:u+15&-16;for(let t=u;t<e;t++)this._makeEmptySplat(t,m,g,S);T?(this._updateSubTextures(this._splatPositions,m,g,S,M,_.y-M,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),this.setEnabled(!0),this._notifyWorkerNewData()):(this._updateTextures(m,g,S,s),this.getBoundingInfo().reConstruct(d,f,this.getWorldMatrix()),this.setEnabled(!0),this._sortIsDirty=!0)}this._cachedBoundingMin=d.clone(),this._cachedBoundingMax=f.clone(),this._postToWorker(!0)}async updateDataAsync(e,t,s,r){return await (0,m.runCoroutineAsync)(this._updateData(e,!0,t,s,void 0,r),(0,m.createYieldingScheduler)())}updateData(e,t,s={flipY:!0},r,a){(0,m.runCoroutineSync)(this._updateData(e,!1,t,r,s,a))}refreshBoundingInfo(){return this.thinInstanceRefreshBoundingInfo(!1),this}_updateSplatIndexBuffer(e){let t=Math.max((this._activeSplatRanges?this._activeSplatRenderCount:e)+15&-16,16),s=this._splatIndex;s&&t===s.length||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1)}));let r=this._splatIndex;if(this._activeSplatRanges){let e=0;for(let t=0;t<this._activeSplatRanges.length;t+=2){let s=this._activeSplatRanges[t],a=this._activeSplatRanges[t+1];for(let t=s;t<s+a;t++)r[e++]=t}for(;e<t;e++)r[e]=0}else for(let e=0;e<t;e++)r[e]=e;this._depthMix&&t===this._depthMix.length||b||(this._depthMix=new BigInt64Array(t)),this.forcedInstanceCount=Math.max(t>>4,1)}_getTextureDataUpdateEngine(){return this.getEngine()}_updateShTextureData(e,t,s,r,a){let i=this._getTextureDataUpdateEngine();if(!i._gl&&!i.isWebGPU){let r,a=e.getInternalTexture(),n=s*a.height*16;if(t.byteLength===n&&t.byteOffset%Uint32Array.BYTES_PER_ELEMENT==0)r=new Uint32Array(t.buffer,t.byteOffset,t.byteLength/Uint32Array.BYTES_PER_ELEMENT);else{let e=new Uint8Array(n);e.set(t.subarray(0,Math.min(t.byteLength,n))),r=new Uint32Array(e.buffer)}i.updateRawTexture(a,r,a.format,a.invertY,null,a.type,a._useSRGBBuffer);return}let n=r*s,o=Math.floor(t.byteLength/16);if(n>=o)return;let l=Math.min(a*s,o-n);if(l<=0)return;let h=(e,s)=>new Uint32Array(t.buffer,t.byteOffset+e,4*s),u=Math.floor(l/s);if(u>0){let t=u*s;this._updateTextureFromData(e,h(16*n,t),s,r,u),l-=t}l>0&&this._updateTextureFromDataRect(e,h((n+u*s)*16,l),0,r+u,l,1)}_updateSubTextures(e,t,s,r,a,i,n){let o=this._getTextureSize(this._vertexCount),l=this._useRGBACovariants?4:2,h=a*o.x,u=i*o.x,_=new Uint16Array(t.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),c=new Uint16Array(s.buffer,h*l*Uint16Array.BYTES_PER_ELEMENT,u*l),p=new Uint8Array(r.buffer,4*h,4*u),d=new Float32Array(e.buffer,4*h*Float32Array.BYTES_PER_ELEMENT,4*u);if(this._updateTextureFromData(this._covariancesATexture,_,o.x,a,i),this._updateTextureFromData(this._covariancesBTexture,c,o.x,a,i),this._updateTextureFromData(this._centersTexture,d,o.x,a,i),this._updateTextureFromData(this._colorsTexture,p,o.x,a,i),this._rotationsATexture&&this._rotationDataA){let e=new Uint16Array(this._rotationDataA.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),t=new Uint16Array(this._rotationDataB.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u),s=new Uint16Array(this._rotationScaleData.buffer,4*h*Uint16Array.BYTES_PER_ELEMENT,4*u);this._updateTextureFromData(this._rotationsATexture,e,o.x,a,i),this._updateTextureFromData(this._rotationsBTexture,t,o.x,a,i),this._updateTextureFromData(this._rotationScaleTexture,s,o.x,a,i)}if(n)for(let e=0;e<n.length;e++)this._updateShTextureData(this._shTextures[e],n[e],o.x,a,i)}_instantiateWorker(){if(!this._vertexCount||(this._updateSplatIndexBuffer(this._vertexCount),this._disableDepthSort||b))return;this._worker?.terminate(),this._canPostToWorker=!0,this._worker=new Worker(URL.createObjectURL(new Blob(["(",D.toString(),")(self)"],{type:"application/javascript"})));let e=Float32Array.from(this._splatPositions);this._worker.postMessage({command:T,positions:e},[e.buffer]),this._postIntervalsToWorker(),this._onWorkerCreated(this._worker),this._worker.onerror=()=>{this._canPostToWorker=!0},this._worker.onmessage=e=>{let t=Math.max(this.renderedSplatCount+15&-16,16);if(e.data.depthMix.length!=t||e.data.rangeVersion!==this._activeRangeVersion){this._depthMix.buffer.byteLength>0&&(this._canPostToWorker=!0,this._postToWorker(!0),this._sortIsDirty=!1);return}this._depthMix=e.data.depthMix;let s=e.data.cameraId,r=e.data.sortRequestId;this._splatIndex&&this._splatIndex.length===t||(this._splatIndex=new Float32Array(t),this._cameraViewInfos.forEach(e=>{e.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),e.splatIndexBufferSet=!0}));let a=new Uint32Array(e.data.depthMix.buffer);if(this._splatIndex)for(let e=0;e<t;e++)this._splatIndex[e]=a[2*e];if(this.forcedInstanceCount=Math.max(t>>4,1),this._delayedTextureUpdate){let e=this._vertexCount+15&-16,t=this._getTextureSize(e);this._updateSubTextures(this._delayedTextureUpdate.centers,this._delayedTextureUpdate.covA,this._delayedTextureUpdate.covB,this._delayedTextureUpdate.colors,0,t.y,this._delayedTextureUpdate.sh),this._delayedTextureUpdate=null}let i=this._cameraViewInfos.get(s);i&&(i.splatIndexBufferSet?i.mesh.thinInstanceBufferUpdated("splatIndex"):(i.mesh.thinInstanceSetBuffer("splatIndex",this._splatIndex,16,!1),i.splatIndexBufferSet=!0),i.sortAppliedId=r),this._canPostToWorker=!0,this._readyToDisplay=!0,this._sortIsDirty&&(this._postToWorker(!0),this._sortIsDirty=!1)}}_getTextureSize(e){let t=this._scene.getEngine(),s=t.getCaps().maxTextureSize,r=1;if(1!==t.version||t.isWebGPU)r=Math.ceil(e/s);else for(;s*r<e;)r*=2;return r>s&&(u.Logger.Error("GaussianSplatting texture size: ("+s+", "+r+"), maxTextureSize: "+s),r=s),new i.Vector2(s,r)}_onWorkerCreated(e){}bindExtraEffectUniforms(e){}_appendSourceToArrays(e,t,s,r,a,i,n,o){let l=e._vertexCount,h=e._splatsData;if(!h||0===l)return;let u=P._GetSplatDataBytes(h),_=P._GetSplatDataFloats(h);for(let e=0;e<l;e++)this._makeSplat(t+e,_,u,s,r,a,n,o,!1,e);if(i&&e._shData)for(let s=0;s<i.length;s++)s<e._shData.length&&i[s].set(e._shData[s].subarray(0,16*l),16*t)}bakeTransformIntoVertices(e){let t,s=this.splatsData;if(!s)return u.Logger.Error("Cannot bake transform into vertices if splatsData is not kept in RAM"),this;let r=e.m,a=Math.sqrt(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]),n=Math.sqrt(r[4]*r[4]+r[5]*r[5]+r[6]*r[6]),o=Math.sqrt(r[8]*r[8]+r[9]*r[9]+r[10]*r[10]);if(Math.abs(a-n)>.001||Math.abs(a-o)>.001)return u.Logger.Error("Gaussian Splatting bakeTransformIntoVertices does not support non-uniform scaling"),this;let l=new Uint8Array(s),h=new Float32Array(s),_=i.TmpVectors.Vector3[0],c=i.TmpVectors.Quaternion[0],p=i.TmpVectors.Quaternion[1];for(e.decompose(_,p,_),t=0;t<this._vertexCount;t++){let s=8*t;i.Vector3.TransformCoordinatesFromFloatsToRef(h[s],h[s+1],h[s+2],e,_),h[s]=_.x,h[s+1]=_.y,h[s+2]=_.z,h[s+3]*=a,h[s+4]*=a,h[s+5]*=a,c.set((l[32*t+28+1]-127.5)/127.5,(l[32*t+28+2]-127.5)/127.5,(l[32*t+28+3]-127.5)/127.5,(l[32*t+28+0]-127.5)/127.5),c.normalize(),this.scaling.x<0&&(c.x=-c.x,c.w=-c.w),this.scaling.y<0&&(c.y=-c.y,c.w=-c.w),this.scaling.z<0&&(c.z=-c.z,c.w=-c.w),p.multiplyToRef(c,c),c.normalize(),l[32*t+28+0]=Math.round(127.5*c.w+127.5),l[32*t+28+1]=Math.round(127.5*c.x+127.5),l[32*t+28+2]=Math.round(127.5*c.y+127.5),l[32*t+28+3]=Math.round(127.5*c.z+127.5)}return this.updateData(s,this.shData??void 0,{flipY:!1}),this}}function E(e,t){let s=[];for(let r=0;r<e;r++){let e=new Uint8Array(t);e.fill(128),s.push(e)}return s}P.UseCountingSort=!0,P.LogSortPerformance=!1,P._RowOutputLength=32,P._SH_C0=.28209479177387814,P._SplatBatchSize=327680,P._PlyConversionBatchSize=32768,P._BatchSize=16,P._DefaultViewUpdateThreshold=1e-4,P.ProgressiveUpdateAmount=0,e.s(["AllocateShBuffers",0,E,"GaussianSplattingMeshBase",0,P],31169);var R=e.i(1229),B=l,k=e.i(90025),F=e.i(92247);class U extends B.Mesh{get partIndex(){return this._partIndex}get proxiedMesh(){return this.compoundSplatMesh}constructor(e,t,s,r,a,i,n,o=n){super(e,t),this._partIndex=r,this._vertexCount=i,this._splatsDataOffset=n,this._shDataOffset=o,this._minimum=a.minimum.clone(),this._maximum=a.maximum.clone(),this.compoundSplatMesh=s,this._applyBoundingInfo(),this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix()),this.onAfterWorldMatrixUpdateObservable.add(()=>{this.compoundSplatMesh.setWorldMatrixForPart(this.partIndex,this.getWorldMatrix())})}updateBoundingInfoFromPartData(){this._applyBoundingInfo()}updateBoundingInfoFromProxiedMesh(){this.updateBoundingInfoFromPartData()}_applyBoundingInfo(){this.setBoundingInfo(new k.BoundingInfo(this._minimum.clone(),this._maximum.clone()))}getClassName(){return"GaussianSplattingPartProxyMesh"}updatePartIndex(e){this._partIndex=e}updatePartMetadata(e,t,s=t){this._vertexCount=e,this._splatsDataOffset=t,this._shDataOffset=s}get isVisible(){return this.compoundSplatMesh.getPartVisibility(this.partIndex)>0}set isVisible(e){this.compoundSplatMesh.setPartVisibility(this.partIndex,+!!e)}get visibility(){return this.compoundSplatMesh.getPartVisibility(this.partIndex)}set visibility(e){this.compoundSplatMesh.setPartVisibility(this.partIndex,e)}intersects(e){let t=new F.PickingInfo,s=this.getBoundingInfo();return s&&e.intersectsSphere(s.boundingSphere)&&e.intersectsBox(s.boundingBox)&&(t.hit=!0,t.pickedMesh=this,t.distance=i.Vector3.Distance(e.origin,s.boundingSphere.center),t.subMeshId=0),t}serialize(e={}){(e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.compoundSplatMeshId=this.compoundSplatMesh.id,e.partIndex=this._partIndex,e.vertexCount=this._vertexCount,e.splatsDataOffset=this._splatsDataOffset,e.shDataOffset=this._shDataOffset;let t=this.getBoundingInfo();return e.boundingInfo={minimum:t.minimum.asArray(),maximum:t.maximum.asArray()},e}static Parse(e,t){let s=e.partIndex,r=e.compoundSplatMesh??t.getLastMeshById(e.compoundSplatMeshId);if(!r)throw Error(`GaussianSplattingPartProxyMesh: compound mesh not found with ID ${e.compoundSplatMeshId}`);let a=i.Vector3.FromArray(e.boundingInfo.minimum),n=i.Vector3.FromArray(e.boundingInfo.maximum),o=new k.BoundingInfo(a,n),l=e.vertexCount??0,h=e.splatsDataOffset??0,u=e.shDataOffset??h;return new U(e.name,t,r,s,o,l,h,u)}}class H extends P{get partIndicesTexture(){return this._partIndicesTexture}constructor(e,t=null,s=null,r=!1,a=!1){super(e,t,s,r),this._partProxies=[],this._part0LocalMin=null,this._part0LocalMax=null,this._partMatrices=[],this._rebuilding=!1,this._partVisibility=[],this._partIndicesTexture=null,this._partIndices=null,this._alwaysRetainSplatsData=!0,this._needsRotationScaleTextures=a}getClassName(){return"GaussianSplattingMesh"}isReady(e=!1){for(let e of this._partProxies)e&&e.computeWorldMatrix(!0);return super.isReady(e)}_updateBoundingInfoFromProxies(){let e=this.getWorldMatrix(),t=i.Matrix.Invert(e),s=this._part0LocalMin?this._part0LocalMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=this._part0LocalMax?this._part0LocalMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),a=new i.Vector3;for(let e of this._partProxies){if(!e)continue;e.computeWorldMatrix(!1);let n=e.getBoundingInfo().boundingBox,o=n.minimumWorld,l=n.maximumWorld;for(let e=0;e<8;e++)a.set(1&e?l.x:o.x,2&e?l.y:o.y,4&e?l.z:o.z),i.Vector3.TransformCoordinatesToRef(a,t,a),s.minimizeInPlace(a),r.maximizeInPlace(a)}s.x<=r.x&&(this._boundingInfo?this._boundingInfo.reConstruct(s,r,e):this._boundingInfo=new k.BoundingInfo(s,r,e),this._cachedBoundingMin=s.clone(),this._cachedBoundingMax=r.clone())}_updateBoundingInfo(){return this.isCompound?(this._updateBoundingInfoFromProxies(),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this):super._updateBoundingInfo()}getHierarchyBoundingVectors(e=!0,t=null){if(!this.isCompound)return super.getHierarchyBoundingVectors(e,t);let s=new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),r=new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(this._part0LocalMin&&(this._partVisibility[0]??1)>0){let e=this.getWorldMatrix(),t=this._part0LocalMin,a=this._part0LocalMax,n=new i.Vector3;for(let o=0;o<8;o++)n.set(1&o?a.x:t.x,2&o?a.y:t.y,4&o?a.z:t.z),i.Vector3.TransformCoordinatesToRef(n,e,n),s.minimizeInPlace(n),r.maximizeInPlace(n)}for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t||(this._partVisibility[e]??1)===0)continue;t.computeWorldMatrix(!1);let a=t.getBoundingInfo().boundingBox;s.minimizeInPlace(a.minimumWorld),r.maximizeInPlace(a.maximumWorld)}return{min:s,max:r}}dispose(e){for(let e of this._partProxies)e.dispose();this._partIndicesTexture?.dispose(),this._partProxies=[],this._partMatrices=[],this._partVisibility=[],this._partIndicesTexture=null,this._part0LocalMin=null,this._part0LocalMax=null,super.dispose(e)}_onWorkerCreated(e){e.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),e.postMessage({command:y,partIndices:this._partIndices?new Uint8Array(this._partIndices):null})}_onIndexDataReceived(e,t){this._partIndices=new Uint8Array(t),this._partIndices.set(e)}get isCompound(){return this._partMatrices.length>0}_instantiateWorker(){this._rebuilding&&this._worker?this._updateSplatIndexBuffer(this._vertexCount):super._instantiateWorker()}_onIncrementalUpdateStart(e){this._ensurePartIndicesTexture(e,this._partIndices??void 0)}_notifyWorkerNewData(){super._notifyWorkerNewData(),this._worker&&this._worker.postMessage({command:y,partIndices:this._partIndices??null})}bindExtraEffectUniforms(e){if(!this._partIndicesTexture)return;e.setTexture("partIndicesTexture",this._partIndicesTexture);let t=new Float32Array(16*this.partCount);for(let e=0;e<this.partCount;e++)this._partMatrices[e].toArray(t,16*e);e.setMatrices("partWorld",t);let s=[];for(let e=0;e<this.partCount;e++)s.push(this._partVisibility[e]??1);e.setArray("partVisibility",s)}get partCount(){return this._partMatrices.length}get partVisibility(){return this._partVisibility}setWorldMatrixForPart(e,t){if(this._partMatrices.length<=e){this.computeWorldMatrix(!0);let t=this.getWorldMatrix();for(;this._partMatrices.length<=e;)this._partMatrices.push(t.clone()),this._partVisibility.push(1)}!this._partMatrices[e].equals(t)&&(this._partMatrices[e].copyFrom(t),this._rebuilding||(this._worker&&this._worker.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._postToWorker(!0)))}getWorldMatrixForPart(e){return this._partMatrices[e]??this.getWorldMatrix()}getPartVisibility(e){return this._partVisibility[e]??1}setPartVisibility(e,t){this._partVisibility[e]=Math.max(0,Math.min(1,t))}_copyTextures(e){super._copyTextures(e),this._partIndicesTexture=e._partIndicesTexture?.clone()}_onUpdateTextures(e){let t=(e,t,s,r)=>new c.RawTexture(e,t,s,r,this._scene,!1,!1,2,0);if(this._partIndices){let s=new Uint8Array(this._partIndices);if(this._partIndicesTexture){let r=this._partIndicesTexture.getSize();r.width!==e.x||r.height!==e.y?(this._partIndicesTexture.dispose(),this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0):this._updateTextureFromData(this._partIndicesTexture,s,e.x,0,e.y)}else this._partIndicesTexture=t(s,e.x,e.y,6),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0}}_updateSubTextures(e,t,s,r,a,i,n,o){if(super._updateSubTextures(e,t,s,r,a,i,n),o&&this._partIndicesTexture){let e=this._getTextureSize(this._vertexCount),t=a*e.x,s=i*e.x,r=new Uint8Array(o.buffer,t,s);this._updateTextureFromData(this._partIndicesTexture,r,e.x,a,i),this._worker&&this._worker.postMessage({command:y,partIndices:o})}}_ensurePartIndicesTexture(e,t){if(!t||this._partIndicesTexture)return;let s=new Uint8Array(this._partIndices);this._partIndicesTexture=new c.RawTexture(s,e.x,e.y,6,this._scene,!1,!1,2,0),this._partIndicesTexture.wrapU=0,this._partIndicesTexture.wrapV=0,this._worker&&this._worker.postMessage({command:y,partIndices:t??null})}_appendPartSourceToArrays(e,t,s,r,a,i,n,o){this._appendSourceToArrays(e,t,s,r,a,i,n,o)}_createRetainedPartSource(e){if(!this._splatsData||this._shDegree>0&&!this._shData)return null;let t=32*e._splatsDataOffset,s=32*e._vertexCount,r=16*e._shDataOffset,a=16*e._vertexCount,i=P._GetSplatDataBytes(this._splatsData);return{name:e.name,_vertexCount:e._vertexCount,_splatsData:i.subarray(t,t+s),_shData:this._shData?.map(e=>e.subarray(r,r+a))??null,_shDegree:this._shData?this._shDegree:0,isCompound:!1,getWorldMatrix:()=>e.getWorldMatrix(),getBoundingInfo:()=>e.getBoundingInfo(),dispose:()=>{}}}_retainMergedPartData(e,t,s,r){if(!this._keepInRam&&!this._alwaysRetainSplatsData){this._splatsData=null,this._shData=null;return}let a=new Uint8Array(32*t),i=0;for(let t of(this._splatsData&&e>0&&(a.set(P._GetSplatDataBytes(this._splatsData).subarray(0,32*e),i),i+=32*e),s)){if(!t._splatsData)continue;let e=32*t._vertexCount;a.set(P._GetSplatDataBytes(t._splatsData).subarray(0,e),i),i+=e}if(this._splatsData=a.buffer,r<=0){this._shData=null;return}let n=E(Math.ceil(((r+1)*(r+1)-1)*3/16),16*t),o=0;if(this._shData&&e>0){let t=16*e;for(let e=0;e<n.length;e++)e<this._shData.length&&n[e].set(this._shData[e].subarray(0,t),o);o+=t}for(let e of s){let t=16*e._vertexCount;if(e._shData)for(let s=0;s<n.length;s++)s<e._shData.length&&n[s].set(e._shData[s].subarray(0,t),o);o+=t}this._shData=n}_addPartsInternal(e,t){let s;if(0===e.length)return{proxyMeshes:[],assignedPartIndices:[]};for(let t of e){if(!t._splatsData)throw Error("To call addPart()/addParts(), each source mesh must be fully loaded");if(t.isCompound)throw Error("To call addPart()/addParts(), each source mesh must not be a compound")}let r=this._vertexCount,a=r+e.reduce((e,t)=>e+t._vertexCount,0),o=this._getTextureSize(a),l=o.x*o.y,h=this._useRGBACovariants?4:2,u=new Uint16Array(4*l),_=new Uint16Array(h*l),p=new Uint8Array(4*l),d=this._shDegree>0||e.some(e=>null!==e._shData),f=d?Math.max(this._shDegree,...e.map(e=>e._shDegree)):0;d&&f>0&&(s=E(Math.ceil(((f+1)*(f+1)-1)*3/16),16*l));let x=this._canReuseCachedData(r,a),m=x?Math.floor(r/o.x):0,g=x?this._cachedBoundingMin.clone():new i.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),S=x?this._cachedBoundingMax.clone():new i.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE),T=this._splatPositions;this._splatPositions=new Float32Array(4*l),x&&T&&this._splatPositions.set(T.subarray(0,4*r));let y=this.partCount,D=this._partIndices;D||(D=new Uint8Array(r),y=+(r>0)),this._partIndices=new Uint8Array(l),this._partIndices.set(D.subarray(0,r));let b=[],I=[],w=r,A=(0,n.GetGaussianSplattingMaxPartCount)(this._scene.getEngine());for(let t of e){if(y>=A)throw Error(`Cannot add part, as the maximum part count (${A}) has been reached`);let e=y++;b.push(e),I.push(w),this._partIndices.fill(e,w,w+t._vertexCount),w+=t._vertexCount}if(!x&&r>0){if(this._partProxies.length>0){let e=0;if(!this._partProxies[0]&&this._splatsData){let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0);if(t>0){let r=P._GetSplatDataBytes(this._splatsData),a=P._GetSplatDataFloats(this._splatsData);for(let e=0;e<t;e++)this._makeSplat(e,a,r,u,_,p,g,S,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*t),0);e+=t}}for(let t=0;t<this._partProxies.length;t++){let r=this._partProxies[t];if(!r)continue;let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot rebuild compound part "${r.name}": the retained compound source data is not available.`);this._appendPartSourceToArrays(a,e,u,_,p,s,g,S),e+=a._vertexCount}}else if(this._splatsData){let e=P._GetSplatDataBytes(this._splatsData),t=P._GetSplatDataFloats(this._splatsData);for(let s=0;s<r;s++)this._makeSplat(s,t,e,u,_,p,g,S,!1);if(s&&this._shData)for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(0,16*r),0)}}if(x){let e=m*o.x;if(e<r)if(0===this._partProxies.length){if(this._splatsData){let t=P._GetSplatDataBytes(this._splatsData),s=P._GetSplatDataFloats(this._splatsData);for(let a=e;a<r;a++)this._makeSplat(a,s,t,u,_,p,g,S,!1,a)}}else{let t=r-this._partProxies.reduce((e,t)=>e+(t?t._vertexCount:0),0),s=Array(this._partProxies.length).fill(null),a=Array(this._partProxies.length).fill(null),i=Array(this._partProxies.length).fill(0);!this._partProxies[0]&&this._splatsData&&t>0&&(s[0]=P._GetSplatDataBytes(this._splatsData),a[0]=P._GetSplatDataFloats(this._splatsData),i[0]=0);let n=t;for(let e=0;e<this._partProxies.length;e++){let t=this._partProxies[e];if(!t)continue;let r=this._createRetainedPartSource(t);if(!r||!r._splatsData)throw Error(`Cannot rebuild compound part "${t.name}": the retained compound source data is not available.`);s[e]=P._GetSplatDataBytes(r._splatsData),a[e]=P._GetSplatDataFloats(r._splatsData),i[e]=n,n+=r._vertexCount}for(let t=e;t<r;t++){let e=this._partIndices?this._partIndices[t]:0,r=e<s.length?s[e]:null,n=e<a.length?a[e]:null;r&&n&&this._makeSplat(t,n,r,u,_,p,g,S,!1,t-(i[e]??0))}}}for(let t of(w=r,e))this._appendPartSourceToArrays(t,w,u,_,p,s,g,S),w+=t._vertexCount;let v=a+15&-16;for(let e=a;e<v;e++)this._makeEmptySplat(e,u,_,p);a!==this._vertexCount&&this._updateSplatIndexBuffer(a),this._retainMergedPartData(r,a,e,f),this._vertexCount=a,this._shDegree=f;let C=!this._rebuilding;C&&(this._canPostToWorker=!1,this._rebuilding=!0);try{if(x){if(s&&(!this._shTextures||s.length>this._shTextures.length))for(this._shTextures||(this._shTextures=[]);this._shTextures.length<s.length;){let e=this._shTextures.length,t=new c.RawTexture(null,o.x,o.y,11,this._scene,!1,!1,1,7);t.wrapU=0,t.wrapV=0,this._shTextures.push(t);let r=this._shData&&e<this._shData.length?this._shData[e]:s[e];this._updateShTextureData(t,r,o.x,0,o.y)}if(s&&this._shData){let e=m*o.x;if(e<r){let t=16*e,a=16*r;for(let e=0;e<s.length;e++)e<this._shData.length&&s[e].set(this._shData[e].subarray(t,a),t)}}this._onUpdateTextures(o),this._updateSubTextures(this._splatPositions,u,_,p,m,o.y-m,s)}else this._updateTextures(u,_,p,s);this.setEnabled(!0),this._notifyWorkerNewData(),this._partProxies[0]||!(r>0)||this._part0LocalMin||(this._part0LocalMin=this.getBoundingInfo().minimum.clone(),this._part0LocalMax=this.getBoundingInfo().maximum.clone());let a=[];for(let s=0;s<e.length;s++){let r=e[s],n=b[s],o=r.getWorldMatrix();this.setWorldMatrixForPart(n,o);let l=new U(r.name,this.getScene(),this,n,r.getBoundingInfo(),r._vertexCount,I[s],I[s]);t&&r.dispose();let h=new i.Quaternion;o.decompose(l.scaling,h,l.position),l.rotationQuaternion=h,l.computeWorldMatrix(!0),this._partProxies[n]=l,a.push(l)}return this._updateBoundingInfoFromProxies(),C&&(this._rebuilding=!1,this._worker&&this._worker.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._postToWorker(!0)),this.onPartCountChangedObservable.notifyObservers(this.partCount),{proxyMeshes:a,assignedPartIndices:b}}catch(e){throw C&&(this._rebuilding=!1,this._canPostToWorker=!0),e}}addPart(e,t=!0){let{proxyMeshes:s}=this._addPartsInternal([e],t);return s[0]}removePart(e){if(e<0||e>=this.partCount)throw Error(`Part index ${e} is out of range [0, ${this.partCount})`);let t=[];for(let s=0;s<this._partProxies.length;s++){let r=this._partProxies[s];if(!r||s===e)continue;let a=this._createRetainedPartSource(r);if(!a)throw Error(`Cannot remove part: the retained compound source data is not available for part "${r.name}".`);t.push({proxyMesh:r,source:a,oldIndex:s,worldMatrix:r.getWorldMatrix().clone(),visibility:this._partVisibility[s]??1})}for(let{proxyMesh:e,source:s}of(t.sort((e,t)=>e.oldIndex-t.oldIndex),t)){if(!s._splatsData)throw Error(`Cannot remove part: the source data for part "${e.name}" is not available.`);if(s._shDegree>0&&!s._shData)throw Error(`Cannot remove part: the SH data for part "${e.name}" is not available.`)}if(this.onPartRemovedObservable.notifyObservers(e),this._worker&&(this._worker.terminate(),this._worker=null),this._covariancesATexture?.dispose(),this._covariancesBTexture?.dispose(),this._centersTexture?.dispose(),this._colorsTexture?.dispose(),this._rotationsATexture?.dispose(),this._rotationsBTexture?.dispose(),this._rotationScaleTexture?.dispose(),this._covariancesATexture=null,this._covariancesBTexture=null,this._centersTexture=null,this._colorsTexture=null,this._rotationsATexture=null,this._rotationsBTexture=null,this._rotationScaleTexture=null,this._shTextures){for(let e of this._shTextures)e.dispose();this._shTextures=null}this._partIndicesTexture&&(this._partIndicesTexture.dispose(),this._partIndicesTexture=null),this._vertexCount=0,this._splatPositions=null,this._partIndices=null,this._partMatrices=[],this._partVisibility=[],this._cachedBoundingMin=null,this._cachedBoundingMax=null,this._part0LocalMin=null,this._part0LocalMax=null,this._splatsData=null,this._shData=null,this._shDegree=0;let s=this._partProxies[e];if(s&&s.dispose(),this._partProxies=[],0===t.length){this.setEnabled(!1),this.onPartCountChangedObservable.notifyObservers(0);return}this._rebuilding=!0,this._canPostToWorker=!1;try{let e=t.map(e=>e.source),{proxyMeshes:s}=this._addPartsInternal(e,!1);for(let e=0;e<t.length;e++){let r=t[e].proxyMesh,a=s[e],n=a.partIndex;this.setWorldMatrixForPart(n,t[e].worldMatrix),this.setPartVisibility(n,t[e].visibility);let o=new i.Quaternion;t[e].worldMatrix.decompose(a.scaling,o,a.position),a.rotationQuaternion=o,a.computeWorldMatrix(!0),r.updatePartIndex(n),r.updatePartMetadata(a._vertexCount,a._splatsDataOffset,a._shDataOffset),this._partProxies[n]=r,a.dispose()}this._rebuilding=!1;let r=this._worker;r?.postMessage({command:M,partMatrices:this._partMatrices.map(e=>new Float32Array(e.m))}),this._canPostToWorker=!0,this._postToWorker(!0)}catch(e){throw this._rebuilding=!1,this._canPostToWorker=!0,e}}serialize(e={},t="base64"){if((e=super.serialize(e)).subMeshes=[],e.geometryUniqueId=void 0,e.geometryId=void 0,e.materialUniqueId=void 0,e.materialId=void 0,e.instances=[],e.actions=void 0,e.type=this.getClassName(),e.keepInRam=this._keepInRam,e.disableDepthSort=this._disableDepthSort,e.viewUpdateThreshold=this.viewUpdateThreshold,e._flipY=this._flipY,this._splatsData&&(e.splatsData="base64"===t?(0,R.EncodeArrayBufferToBase64)(this._splatsData):this._splatsData),this._shData&&(e.shData="base64"===t?this._shData.map(R.EncodeArrayBufferToBase64):this._shData,e.shDegree=this._shDegree),this._partIndices){let s=function(e){let t=[],s=e.length,r=0;for(;r<s;){let a=e[r],i=1;for(;r+i<s&&e[r+i]===a;)i++;t.push(i,a),r+=i}return new Uint32Array(t)}(this._partIndices.subarray(0,this._vertexCount));e.partIndices="base64"===t?(0,R.EncodeArrayBufferToBase64)(s):s}return this._partProxies.length&&(e.partProxies=this._partProxies.filter(e=>!!e).map(e=>e.serialize())),e}static _ParseInternal(e,t,s){let r,a,i=new s(e.name,null,t,e.keepInRam);i.disableDepthSort=e.disableDepthSort??!1,i.viewUpdateThreshold=e.viewUpdateThreshold??P._DefaultViewUpdateThreshold;let n=e.splatsData;"string"==typeof n&&(n=(0,R.DecodeBase64ToBinary)(n));let o=e.shData;if(Array.isArray(o)&&o.length){let e=[];for(let t=0,s=o.length;t<s;t++){let s=o[t];"string"==typeof s?e[t]=new Uint8Array((0,R.DecodeBase64ToBinary)(s)):e[t]=s}r=e}let h=e.partIndices;if("string"==typeof h&&(h=new Uint32Array((0,R.DecodeBase64ToBinary)(h))),h&&(a=function(e){let t=0,s=e.length;for(let r=0;r<s;r+=2)t+=e[r];let r=new Uint8Array(t),a=0;for(let t=0;t<s;t+=2){let s=e[t],i=e[t+1];r.fill(i,a,a+s),a+=s}return r}(h)),n){let t=e._flipY??!1;i.updateData(n,r,{flipY:t},a,e.shDegree)}if(e.partProxies)for(let s of e.partProxies){let e=Object.assign({},s);e.compoundSplatMesh=i;let r=l.Mesh.Parse(e,t,""),a=r.partIndex;i._partProxies[a]=r,i.setWorldMatrixForPart(a,r.getWorldMatrix()),i.setPartVisibility(a,r.visibility)}return i}static Parse(e,t){return H._ParseInternal(e,t,H)}}e.s(["GaussianSplattingMesh",0,H,"IsGaussianSplattingClassName",0,function(e){return"GaussianSplattingMesh"===e||"GaussianSplattingStream"===e}],51483)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96138,t=>{"use strict";var i=t.i(75105),e=t.i(16347),n=t.i(79440),o=t.i(44520);class a extends n.FlowGraphAsyncExecutionBlock{constructor(t){super(t),this.animationGroup=this.registerDataInput("animationGroup",i.RichTypeAny),this.stopAtFrame=this.registerDataInput("stopAtFrame",i.RichTypeNumber,-1)}_preparePendingTasks(t){let i=this.animationGroup.getValue(t),e=this.stopAtFrame.getValue(t)??-1,n=t._getGlobalContextVariable("pendingStopAnimations",[]);n.push({uniqueId:i.uniqueId,stopAtFrame:e}),t._setGlobalContextVariable("pendingStopAnimations",n)}_cancelPendingTasks(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId){e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e);break}}_execute(t){let i=this.animationGroup.getValue(t),n=this.stopAtFrame.getValue(t)??-1;return i?isNaN(n)?this._reportError(t,"Invalid stop time."):void(n>0?this._startPendingTasks(t):this._stopAnimation(i,t),this.out._activateSignal(t)):(e.Logger.Warn("No animation group provided to stop."),this._reportError(t,"No animation group provided to stop."))}_executeOnTick(t){let i=this.animationGroup.getValue(t),e=t._getGlobalContextVariable("pendingStopAnimations",[]);for(let n=0;n<e.length;n++)if(e[n].uniqueId===i.uniqueId&&i.getCurrentFrame()>=e[n].stopAtFrame){this._stopAnimation(i,t),e.splice(n,1),t._setGlobalContextVariable("pendingStopAnimations",e),this.done._activateSignal(t),t._removePendingBlock(this);break}}getClassName(){return"FlowGraphStopAnimationBlock"}_stopAnimation(t,i){let e=i._getGlobalContextVariable("currentlyRunningAnimationGroups",[]),n=e.indexOf(t.uniqueId);-1!==n&&(t.stop(),e.splice(n,1),i._setGlobalContextVariable("currentlyRunningAnimationGroups",e))}}let r=!1;function s(){r||(r=!0,(0,o.RegisterClass)("FlowGraphStopAnimationBlock",a))}t.s(["FlowGraphStopAnimationBlock",0,a,"RegisterFlowGraphStopAnimationBlock",0,s],35329),s(),t.s([],71884),t.i(71884),t.i(35329),t.s(["FlowGraphStopAnimationBlock",0,a],96138)}]);
@@ -1,12 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,63463,e=>{"use strict";var o=e.i(47150);let t="gaussianSplattingVoxelPixelShader",i=`var voxel_storage: texture_storage_3d<r8unorm,write>;varying vNormalizedPosition: vec3f;varying vNormalizedCenterPosition: vec3f;varying vAlpha: f32;varying vPatchPosition: vec2f;fn gsVoxelPrngCanonical1d(co: f32)->f32 {return fract(sin(co*91.3458)*47453.5453);}
2
- fn gsVoxelPrngCanonical2d(co: vec2f)->f32 {return fract(sin(dot(co,vec2f(12.9898,78.233)))*43758.5453);}
3
- fn gsVoxelPrngCanonical3d(co: vec3f)->f32 {return gsVoxelPrngCanonical2d(vec2f(co.x,co.y)+gsVoxelPrngCanonical1d(co.z));}
4
- @fragment
5
- fn main(input: FragmentInputs)->FragmentOutputs {let normPos: vec3f=input.vNormalizedPosition;let stepSize: f32=1.0/f32(textureDimensions(voxel_storage).x);let diff: vec3f=abs(input.vNormalizedCenterPosition-normPos);let distToCenter: f32=max(max(diff.x,diff.y),diff.z);let gaussian: f32=exp(-dot(input.vPatchPosition,input.vPatchPosition));let shadowingOpacity: f32=clamp(
6
- select(gaussian,1.0,distToCenter<stepSize)*input.vAlpha,
7
- 0.0,1.0
8
- );if (shadowingOpacity<1.0 && shadowingOpacity<gsVoxelPrngCanonical3d(normPos/stepSize)) {discard;}
9
- let size: vec3f=vec3f(textureDimensions(voxel_storage));textureStore(voxel_storage,
10
- vec3<i32>(i32(normPos.x*size.x),i32(normPos.y*size.y),i32(normPos.z*size.z)),
11
- vec4f(1.0,1.0,1.0,1.0));fragmentOutputs.color=vec4f(0.0,0.0,0.0,0.0);}
12
- `;o.ShaderStore.ShadersStoreWGSL[t]||(o.ShaderStore.ShadersStoreWGSL[t]=i),e.s(["gaussianSplattingVoxelPixelShaderWGSL",0,{name:t,shader:i}])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,40311,e=>{"use strict";var t=e.i(62478),s=e.i(75105),l=e.i(16347),o=e.i(44520);class r extends t.FlowGraphExecutionBlockWithOutSignal{constructor(e){if(super(e),this.message=this.registerDataInput("message",s.RichTypeAny),this.logType=this.registerDataInput("logType",s.RichTypeString,"log"),e?.messageTemplate)for(const t of this._getTemplateMatches(e.messageTemplate))this.registerDataInput(t,s.RichTypeAny)}_execute(e){let t=this.logType.getValue(e),s=this._getMessageValue(e);"warn"===t?l.Logger.Warn(s):"error"===t?l.Logger.Error(s):l.Logger.Log(s),this.out._activateSignal(e)}getClassName(){return"FlowGraphConsoleLogBlock"}_serializeValue(e){if(null==e)return String(e);if("object"==typeof e){let t=e.toString();if("[object Object]"===t)try{return JSON.stringify(e)}catch{}return t}return String(e)}_getMessageValue(e){if(!this.config?.messageTemplate)return this.message.getValue(e);{let t=this.config.messageTemplate,s=this._getTemplateMatches(t),l=this.message.getValue(e),o=null!=l&&"object"==typeof l?l:null;for(let l of s){let s;if(void 0!==(s=null!==o&&l in o?o[l]:this.getDataInput(l)?.getValue(e))){let e=l.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(RegExp(`\\{${e}\\}`,"g"),this._serializeValue(s))}}return t}}_getTemplateMatches(e){let t,s=/\{([^}]+)\}/g,l=[];for(;null!==(t=s.exec(e));)l.push(t[1]);return l}}let i=!1;function a(){i||(i=!0,(0,o.RegisterClass)("FlowGraphConsoleLogBlock",r))}e.s(["FlowGraphConsoleLogBlock",0,r,"RegisterFlowGraphConsoleLogBlock",0,a],7154),a(),e.s([],91918),e.i(91918),e.i(7154),e.s(["FlowGraphConsoleLogBlock",0,r],40311)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52624,e=>{"use strict";let t,i,s,n,a,r,o,h,l,d,_,u,c,g,f,m;var I,p=e.i(57575),b=e.i(69400),y=e.i(9855),S=e.i(3864),L=e.i(23003),M=e.i(85050),E=e.i(2060);class T{constructor(){this._doNotSerialize=!1,this._isDisposed=!1,this._sceneRootNodesIndex=-1,this._isEnabled=!0,this._isParentEnabled=!0,this._isReady=!0,this._onEnabledStateChangedObservable=new S.Observable,this._onEffectiveEnabledStateChangedObservable=null,this._onClonedObservable=new S.Observable,this._inheritVisibility=!1,this._isVisible=!0}}let D=(r=[],o=[],h=[],l=[],d=[],_=[],u=[],c=[],g=[],f=[],I=class{static AddNodeConstructor(e,t){this._NodeConstructors[e]=t}static Construct(e,t,i,s){let n=this._NodeConstructors[e];return n?n(t,i,s):null}set accessibilityTag(e){this._accessibilityTag=e,this.onAccessibilityTagChangedObservable.notifyObservers(e)}get accessibilityTag(){return this._accessibilityTag}get doNotSerialize(){return!!this._nodeDataStorage._doNotSerialize||!!this._parentNode&&this._parentNode.doNotSerialize}set doNotSerialize(e){this._nodeDataStorage._doNotSerialize=e}isDisposed(){return this._nodeDataStorage._isDisposed}set parent(e){if(this._parentNode===e)return;let t=this._parentNode;if(this._parentNode&&void 0!==this._parentNode._children&&null!==this._parentNode._children){let t=this._parentNode._children.indexOf(this);-1!==t&&this._parentNode._children.splice(t,1),e||this._nodeDataStorage._isDisposed||this._addToSceneRootNodes()}this._parentNode=e,this._isDirty=!0,this._parentNode&&((void 0===this._parentNode._children||null===this._parentNode._children)&&(this._parentNode._children=[]),this._parentNode._children.push(this),t||this._removeFromSceneRootNodes()),this._syncParentEnabledState()}get parent(){return this._parentNode}get inheritVisibility(){return this._nodeDataStorage._inheritVisibility}set inheritVisibility(e){this._nodeDataStorage._inheritVisibility=e}get isVisible(){return(!this.inheritVisibility||!this._parentNode||!!this._parentNode.isVisible)&&this._nodeDataStorage._isVisible}set isVisible(e){this._nodeDataStorage._isVisible=e}_serializeAsParent(e){e.parentId=this.uniqueId}_addToSceneRootNodes(){-1===this._nodeDataStorage._sceneRootNodesIndex&&(this._nodeDataStorage._sceneRootNodesIndex=this._scene.rootNodes.length,this._scene.rootNodes.push(this))}_removeFromSceneRootNodes(){if(-1!==this._nodeDataStorage._sceneRootNodesIndex){let e=this._scene.rootNodes,t=e.length-1;e[this._nodeDataStorage._sceneRootNodesIndex]=e[t],e[this._nodeDataStorage._sceneRootNodesIndex]._nodeDataStorage._sceneRootNodesIndex=this._nodeDataStorage._sceneRootNodesIndex,this._scene.rootNodes.pop(),this._nodeDataStorage._sceneRootNodesIndex=-1}}get animationPropertiesOverride(){return this._animationPropertiesOverride?this._animationPropertiesOverride:this._scene.animationPropertiesOverride}set animationPropertiesOverride(e){this._animationPropertiesOverride=e}getClassName(){return"Node"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onEnabledStateChangedObservable(){return this._nodeDataStorage._onEnabledStateChangedObservable}get onEffectiveEnabledStateChangedObservable(){var e;return(e=this._nodeDataStorage)._onEffectiveEnabledStateChangedObservable??(e._onEffectiveEnabledStateChangedObservable=new S.Observable)}get onClonedObservable(){return this._nodeDataStorage._onClonedObservable}constructor(e,t=null,i=!0){this._isDirty=!1,this._nodeDataStorage=new T,this.name=(0,p.__runInitializers)(this,r,void 0),this.id=((0,p.__runInitializers)(this,o),(0,p.__runInitializers)(this,h,void 0)),this.uniqueId=((0,p.__runInitializers)(this,l),(0,p.__runInitializers)(this,d,void 0)),this.state=((0,p.__runInitializers)(this,_),(0,p.__runInitializers)(this,u,"")),this.metadata=((0,p.__runInitializers)(this,c),(0,p.__runInitializers)(this,g,null)),this._internalMetadata=(0,p.__runInitializers)(this,f),this.reservedDataStore=null,this._accessibilityTag=null,this.onAccessibilityTagChangedObservable=new S.Observable,this._parentContainer=null,this.animations=[],this._ranges={},this.onReady=null,this._currentRenderId=-1,this._parentUpdateId=-1,this._childUpdateId=-1,this._waitingParentId=null,this._waitingParentInstanceIndex=null,this._waitingParsedUniqueId=null,this._cache={},this._parentNode=null,this._children=null,this._worldMatrix=b.Matrix.Identity(),this._worldMatrixDeterminant=0,this._worldMatrixDeterminantIsDirty=!0,this._animationPropertiesOverride=null,this._isNode=!0,this.onDisposeObservable=new S.Observable,this._onDisposeObserver=null,this._behaviors=[],this.name=e,this.id=e,this._scene=t||L.EngineStore.LastCreatedScene,this.uniqueId=this._scene.getUniqueId(),this._initCache(),i&&this._addToSceneRootNodes()}getScene(){return this._scene}getEngine(){return this._scene.getEngine()}addBehavior(e,t=!1){return -1!==this._behaviors.indexOf(e)||(e.init(),this._scene.isLoading&&!t?this._scene.onDataLoadedObservable.addOnce(()=>{this._behaviors.includes(e)&&e.attach(this)}):e.attach(this),this._behaviors.push(e)),this}removeBehavior(e){let t=this._behaviors.indexOf(e);return -1===t||(this._behaviors.splice(t,1),e.detach()),this}get behaviors(){return this._behaviors}getBehaviorByName(e){for(let t of this._behaviors)if(t.name===e)return t;return null}getWorldMatrix(){return this._currentRenderId!==this._scene.getRenderId()&&this.computeWorldMatrix(),this._worldMatrix}_getWorldMatrixDeterminant(){return this._worldMatrixDeterminantIsDirty&&(this._worldMatrixDeterminantIsDirty=!1,this._worldMatrixDeterminant=this._worldMatrix.determinant()),this._worldMatrixDeterminant}get worldMatrixFromCache(){return this._worldMatrix}_initCache(){this._cache={}}updateCache(e){!e&&this.isSynchronized()||this._updateCache()}_getActionManagerForTrigger(e,t=!0){return this.parent?this.parent._getActionManagerForTrigger(e,!1):null}_updateCache(e){}_isSynchronized(){return!0}_markSyncedWithParent(){this._parentNode&&(this._parentUpdateId=this._parentNode._childUpdateId)}isSynchronizedWithParent(){return!this._parentNode||!this._parentNode._isDirty&&this._parentUpdateId===this._parentNode._childUpdateId&&this._parentNode.isSynchronized()}isSynchronized(){return(!this._parentNode||!!this.isSynchronizedWithParent())&&this._isSynchronized()}isReady(e=!1){return this._nodeDataStorage._isReady}markAsDirty(e){return this._currentRenderId=Number.MAX_VALUE,this._isDirty=!0,this}isEnabled(e=!0){return!1===e?this._nodeDataStorage._isEnabled:!!this._nodeDataStorage._isEnabled&&this._nodeDataStorage._isParentEnabled}_hasEffectiveEnabledStateObservers(){let e=this._nodeDataStorage._onEffectiveEnabledStateChangedObservable;return!!e&&e.hasObservers()}_syncParentEnabledState(){let e=this._hasEffectiveEnabledStateObservers(),t=e?this.isEnabled():null;if(this._nodeDataStorage._isParentEnabled=!this._parentNode||this._parentNode.isEnabled(),this._children)for(let e of this._children)e._syncParentEnabledState();if(e){let e=this.isEnabled();e!==t&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}setEnabled(e){if(this._nodeDataStorage._isEnabled===e)return;let t=this._hasEffectiveEnabledStateObservers(),i=t?this.isEnabled():null;if(this._nodeDataStorage._isEnabled=e,this._syncParentEnabledState(),this._nodeDataStorage._onEnabledStateChangedObservable.notifyObservers(e),t){let e=this.isEnabled();e!==i&&this._nodeDataStorage._onEffectiveEnabledStateChangedObservable.notifyObservers(e)}}isDescendantOf(e){return!!this.parent&&(this.parent===e||this.parent.isDescendantOf(e))}_getDescendants(e,t=!1,i){if(this._children)for(let s=0;s<this._children.length;s++){let n=this._children[s];(!i||i(n))&&e.push(n),t||n._getDescendants(e,!1,i)}}getDescendants(e,t){let i=[];return this._getDescendants(i,e,t),i}getChildMeshes(e,t){let i=[];return this._getDescendants(i,e,e=>(!t||t(e))&&void 0!==e.cullingStrategy),i}getChildren(e,t=!0){return this.getDescendants(t,e)}_setReady(e){if(e!==this._nodeDataStorage._isReady){if(!e){this._nodeDataStorage._isReady=!1;return}this.onReady&&this.onReady(this),this._nodeDataStorage._isReady=!0}}getAnimationByName(e){for(let t=0;t<this.animations.length;t++){let i=this.animations[t];if(i.name===e)return i}return null}createAnimationRange(e,t,i){if(!this._ranges[e]){this._ranges[e]=I._AnimationRangeFactory(e,t,i);for(let s=0,n=this.animations.length;s<n;s++)this.animations[s]&&this.animations[s].createRange(e,t,i)}}deleteAnimationRange(e,t=!0){for(let i=0,s=this.animations.length;i<s;i++)this.animations[i]&&this.animations[i].deleteRange(e,t);this._ranges[e]=null}getAnimationRange(e){return this._ranges[e]||null}clone(e,t,i){let s=E.SerializationHelper.Clone(()=>new I(e,this.getScene()),this);if(t&&(s.parent=t),!i){let t=this.getDescendants(!0);for(let i=0;i<t.length;i++){let n=t[i];n.clone(e+"."+n.name,s)}}return s}getAnimationRanges(){let e,t=[];for(e in this._ranges)t.push(this._ranges[e]);return t}beginAnimation(e,t,i,s){let n=this.getAnimationRange(e);return n?this._scene.beginAnimation(this,n.from,n.to,t,i,s):null}serializeAnimationRanges(){let e=[];for(let t in this._ranges){let i=this._ranges[t];if(!i)continue;let s={};s.name=t,s.from=i.from,s.to=i.to,e.push(s)}return e}computeWorldMatrix(e){return this._worldMatrix||(this._worldMatrix=b.Matrix.Identity()),this._worldMatrix}dispose(e,t=!1){if(this._nodeDataStorage._isDisposed=!0,!e)for(let i of this.getDescendants(!0))i.dispose(e,t);for(let e of(this.parent?this.parent=null:this._removeFromSceneRootNodes(),this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onEnabledStateChangedObservable.clear(),this._nodeDataStorage._onEffectiveEnabledStateChangedObservable?.clear(),this.onClonedObservable.clear(),this._behaviors))e.detach();this._behaviors.length=0,this.metadata=null}static ParseAnimationRanges(e,t,i){if(t.ranges)for(let i=0;i<t.ranges.length;i++){let s=t.ranges[i];e.createAnimationRange(s.name,s.from,s.to)}}getHierarchyBoundingVectors(e=!0,t=null){let i,s;if(this.getScene().incrementRenderId(),this.computeWorldMatrix(!0),this.getBoundingInfo&&this.subMeshes){let e=this.getBoundingInfo();i=e.boundingBox.minimumWorld.clone(),s=e.boundingBox.maximumWorld.clone()}else i=new b.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),s=new b.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);if(e)for(let e of this.getDescendants(!1)){if(e.computeWorldMatrix(!0),t&&!t(e)||!e.getBoundingInfo||0===e.getTotalVertices())continue;let n=e.getBoundingInfo().boundingBox,a=n.minimumWorld,r=n.maximumWorld;b.Vector3.CheckExtends(a,i,s),b.Vector3.CheckExtends(r,i,s)}return{min:i,max:s}}},m="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[(0,y.serialize)()],i=[(0,y.serialize)()],s=[(0,y.serialize)()],n=[(0,y.serialize)()],a=[(0,y.serialize)()],(0,p.__esDecorate)(null,null,t,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:m},r,o),(0,p.__esDecorate)(null,null,i,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:m},h,l),(0,p.__esDecorate)(null,null,s,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:m},d,_),(0,p.__esDecorate)(null,null,n,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:m},u,c),(0,p.__esDecorate)(null,null,a,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:m},g,f),m&&Object.defineProperty(I,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:m}),I._AnimationRangeFactory=(e,t,i)=>{throw(0,M._WarnImport)("AnimationRange")},I._NodeConstructors={},I);e.s(["Node",0,D])},90160,e=>{"use strict";let t,i,s,n,a,r,o,h,l,d,_,u,c,g,f,m,I,p,b,y,S,L,M,E,T,D,N,O,v,C,A,P,x,z,R,w;var H,U,k=e.i(57575),G=e.i(9855),F=e.i(69400),Y=e.i(19919),W=e.i(52624),B=e.i(96333),V=e.i(44520),q=e.i(60420),j=e.i(2060);let X=(g=W.Node,f=[],m=[],I=[],p=[],b=[],y=[],S=[],L=[],M=[],E=[],T=[],D=[],N=[],O=[],v=[],C=[],A=[],P=[],x=[],z=[],R=[],H=class extends g{get range(){return this._range}set range(e){this._range=e,this._inverseSquaredRange=1/(this.range*this.range)}get intensityMode(){return this._intensityMode}set intensityMode(e){this._intensityMode=e,this._computePhotometricScale()}get radius(){return this._radius}set radius(e){this._radius=e,this._computePhotometricScale()}get renderPriority(){return(0,k.__classPrivateFieldGet)(this,U,"f")}set renderPriority(e){(0,k.__classPrivateFieldSet)(this,U,e,"f")}get shadowEnabled(){return this._shadowEnabled}set shadowEnabled(e){this._shadowEnabled!==e&&(this._shadowEnabled=e,this._markMeshesAsLightDirty())}get includedOnlyMeshes(){return this._includedOnlyMeshes}set includedOnlyMeshes(e){this._includedOnlyMeshes=e,this._hookArrayForIncludedOnly(e)}get excludedMeshes(){return this._excludedMeshes}set excludedMeshes(e){this._excludedMeshes=e,this._hookArrayForExcluded(e)}get excludeWithLayerMask(){return this._excludeWithLayerMask}set excludeWithLayerMask(e){this._excludeWithLayerMask=e,this._resyncMeshes()}get includeOnlyWithLayerMask(){return this._includeOnlyWithLayerMask}set includeOnlyWithLayerMask(e){this._includeOnlyWithLayerMask=e,this._resyncMeshes()}get lightmapMode(){return this._lightmapMode}set lightmapMode(e){this._lightmapMode!==e&&(this._lightmapMode=e,this._markMeshesAsLightDirty())}getViewMatrix(e){return null}getProjectionMatrix(e,t){return null}constructor(e,t,i){super(e,t,!1),this.diffuse=((0,k.__runInitializers)(this,f),(0,k.__runInitializers)(this,m,new Y.Color3(1,1,1))),this.specular=((0,k.__runInitializers)(this,I),(0,k.__runInitializers)(this,p,new Y.Color3(1,1,1))),this.falloffType=((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,y,H.FALLOFF_DEFAULT)),this.intensity=((0,k.__runInitializers)(this,S),(0,k.__runInitializers)(this,L,1)),this._range=((0,k.__runInitializers)(this,M),Number.MAX_VALUE),this._inverseSquaredRange=0,this._photometricScale=1,this._intensityMode=H.INTENSITYMODE_AUTOMATIC,this._radius=1e-5,this._renderPriority=(0,k.__runInitializers)(this,E,void 0),U.set(this,((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,D,0))),this._shadowEnabled=((0,k.__runInitializers)(this,N),(0,k.__runInitializers)(this,O,!0)),this._includedOnlyMeshes=(0,k.__runInitializers)(this,v),this._excludeWithLayerMask=(0,k.__runInitializers)(this,C,0),this._includeOnlyWithLayerMask=((0,k.__runInitializers)(this,A),(0,k.__runInitializers)(this,P,0)),this._lightmapMode=((0,k.__runInitializers)(this,x),(0,k.__runInitializers)(this,z,0)),this._shadowGenerators=((0,k.__runInitializers)(this,R),null),this._excludedMeshesIds=[],this._includedOnlyMeshesIds=[],this._currentViewDepth=0,this._clusteredContainer=null,this._isLight=!0,i||this.getScene().addLight(this),this._uniformBuffer=new B.UniformBuffer(this.getScene().getEngine(),void 0,void 0,e),this._buildUniformLayout(),this.includedOnlyMeshes=[],this.excludedMeshes=[],i||this._resyncMeshes()}transferTexturesToEffect(e,t){return this}_bindLight(e,t,i,s,n=!0){let a=e.toString(),r=!1;if(this._uniformBuffer.bindToEffect(i,"Light"+a),this._renderId!==t.getRenderId()||this._lastUseSpecular!==s||!this._uniformBuffer.useUbo){this._renderId=t.getRenderId(),this._lastUseSpecular=s;let e=this.getScaledIntensity();this.transferToEffect(i,a),this.diffuse.scaleToRef(e,Y.TmpColors.Color3[0]),this._uniformBuffer.updateColor4("vLightDiffuse",Y.TmpColors.Color3[0],this.range,a),s&&(this.specular.scaleToRef(e,Y.TmpColors.Color3[1]),this._uniformBuffer.updateColor4("vLightSpecular",Y.TmpColors.Color3[1],this.radius,a)),r=!0}if(this.transferTexturesToEffect(i,a),t.shadowsEnabled&&this.shadowEnabled&&n){let e=this.getShadowGenerator(t.activeCamera)??this.getShadowGenerator();e&&(e.bindShadowLight(a,i),r=!0)}r?this._uniformBuffer.update():this._uniformBuffer.bindUniformBuffer()}getClassName(){return"Light"}toString(e){let t="Name: "+this.name;if(t+=", type: "+["Point","Directional","Spot","Hemispheric","Clustered"][this.getTypeID()],this.animations)for(let i=0;i<this.animations.length;i++)t+=", animation[0]: "+this.animations[i].toString(e);return t}_syncParentEnabledState(){super._syncParentEnabledState(),this.isDisposed()||this._resyncMeshes()}setEnabled(e){super.setEnabled(e),this._resyncMeshes()}getShadowGenerator(e=null){return null===this._shadowGenerators?null:this._shadowGenerators.get(e)??null}getShadowGenerators(){return this._shadowGenerators}getAbsolutePosition(){return F.Vector3.Zero()}canAffectMesh(e){return!e||(!this.includedOnlyMeshes||!(this.includedOnlyMeshes.length>0)||-1!==this.includedOnlyMeshes.indexOf(e))&&(!this.excludedMeshes||!(this.excludedMeshes.length>0)||-1===this.excludedMeshes.indexOf(e))&&(0===this.includeOnlyWithLayerMask||(this.includeOnlyWithLayerMask&e.layerMask)!=0)&&(0===this.excludeWithLayerMask||!(this.excludeWithLayerMask&e.layerMask))}dispose(e,t=!1){if(this._shadowGenerators){let e=this._shadowGenerators.values();for(let t=e.next();!0!==t.done;t=e.next())t.value.dispose();this._shadowGenerators=null}if(this.getScene().stopAnimation(this),this._parentContainer){let e=this._parentContainer.lights.indexOf(this);e>-1&&this._parentContainer.lights.splice(e,1),this._parentContainer=null}for(let e of this.getScene().meshes)e._removeLightSource(this,!0);this._uniformBuffer.dispose(),this.getScene().removeLight(this),super.dispose(e,t)}getTypeID(){return 0}getScaledIntensity(){return this._photometricScale*this.intensity}clone(e,t=null){let i=H.GetConstructorFromName(this.getTypeID(),e,this.getScene());if(!i)return null;let s=j.SerializationHelper.Clone(i,this);return e&&(s.name=e),t&&(s.parent=t),s.setEnabled(this.isEnabled()),this.onClonedObservable.notifyObservers(s),s}serialize(){let e=j.SerializationHelper.Serialize(this);if(e.uniqueId=this.uniqueId,e.type=this.getTypeID(),this.parent&&this.parent._serializeAsParent(e),this.excludedMeshes.length>0)for(let t of(e.excludedMeshesIds=[],this.excludedMeshes))e.excludedMeshesIds.push(t.id);if(this.includedOnlyMeshes.length>0)for(let t of(e.includedOnlyMeshesIds=[],this.includedOnlyMeshes))e.includedOnlyMeshesIds.push(t.id);return j.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}static GetConstructorFromName(e,t,i){let s=W.Node.Construct("Light_Type_"+e,t,i);return s||null}static Parse(e,t,i=""){let s=H.GetConstructorFromName(e.type,e.name,t);if(!s)return null;let n=j.SerializationHelper.Parse(s,e,t,i);if(e.excludedMeshesIds&&(n._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(n._includedOnlyMeshesIds=e.includedOnlyMeshesIds),void 0!==e.parentId&&(n._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(n._waitingParentInstanceIndex=e.parentInstanceIndex),void 0!==e.falloffType&&(n.falloffType=e.falloffType),void 0!==e.lightmapMode&&(n.lightmapMode=e.lightmapMode),e.animations){for(let t=0;t<e.animations.length;t++){let i=e.animations[t],s=(0,V.GetClass)("BABYLON.Animation");s&&n.animations.push(s.Parse(i))}W.Node.ParseAnimationRanges(n,e,t)}return e.autoAnimate&&t.beginAnimation(n,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),void 0!==e.isEnabled&&n.setEnabled(e.isEnabled),n._onParsed(e,t,i),n}_onParsed(e,t,i=""){}_hookArrayForExcluded(e){let t=e.push;e.push=(...i)=>{let s=t.apply(e,i);if(this._clusteredContainer)return s;for(let e of i)e._resyncLightSource(this);return s};let i=e.splice;if(e.splice=(t,s)=>{let n=i.call(e,t,s??e.length);if(this._clusteredContainer)return n;for(let e of n)e._resyncLightSource(this);return n},!this._clusteredContainer)for(let t of e)t._resyncLightSource(this)}_hookArrayForIncludedOnly(e){let t=e.push;e.push=(...i)=>{let s=t.apply(e,i);return this._resyncMeshes(),s};let i=e.splice;e.splice=(t,s)=>{let n=i.call(e,t,s??e.length);return this._resyncMeshes(),n},this._resyncMeshes()}_resyncMeshes(){if(!this._clusteredContainer)for(let e of this.getScene().meshes)e._resyncLightSource(this)}_markMeshesAsLightDirty(){for(let e of this.getScene().meshes)-1!==e.lightSources.indexOf(this)&&e._markSubMeshesAsLightDirty()}_computePhotometricScale(){this._photometricScale=this._getPhotometricScale(),this.getScene().resetCachedMaterial()}_getPhotometricScale(){let e=0,t=this.getTypeID(),i=this.intensityMode;switch(i===H.INTENSITYMODE_AUTOMATIC&&(i=t===H.LIGHTTYPEID_DIRECTIONALLIGHT?H.INTENSITYMODE_ILLUMINANCE:H.INTENSITYMODE_LUMINOUSINTENSITY),t){case H.LIGHTTYPEID_POINTLIGHT:case H.LIGHTTYPEID_SPOTLIGHT:switch(i){case H.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case H.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case H.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case H.LIGHTTYPEID_DIRECTIONALLIGHT:switch(i){case H.INTENSITYMODE_ILLUMINANCE:e=1;break;case H.INTENSITYMODE_LUMINANCE:{let t=this.radius;e=2*Math.PI*(1-Math.cos(t=Math.max(t,.001)))}}break;case H.LIGHTTYPEID_HEMISPHERICLIGHT:case H.LIGHTTYPEID_RECT_AREALIGHT:e=1}return e}_reorderLightsInScene(){let e=this.getScene();0!=this._renderPriority&&(e.requireLightSorting=!0),this.getScene().sortLightsByPriority()}areLightTexturesReady(){return!0}_isReady(){return!0}},U=new WeakMap,w="function"==typeof Symbol&&Symbol.metadata?Object.create(g[Symbol.metadata]??null):void 0,t=[(0,G.serializeAsColor3)()],i=[(0,G.serializeAsColor3)()],s=[(0,G.serialize)()],n=[(0,G.serialize)()],a=[(0,G.serialize)()],r=[(0,G.serialize)()],o=[(0,G.serialize)()],h=[(0,G.serialize)()],l=[(0,G.expandToProperty)("_reorderLightsInScene")],d=[(0,G.serialize)("shadowEnabled")],_=[(0,G.serialize)("excludeWithLayerMask")],u=[(0,G.serialize)("includeOnlyWithLayerMask")],c=[(0,G.serialize)("lightmapMode")],(0,k.__esDecorate)(H,null,a,{kind:"getter",name:"range",static:!1,private:!1,access:{has:e=>"range"in e,get:e=>e.range},metadata:w},null,f),(0,k.__esDecorate)(H,null,r,{kind:"getter",name:"intensityMode",static:!1,private:!1,access:{has:e=>"intensityMode"in e,get:e=>e.intensityMode},metadata:w},null,f),(0,k.__esDecorate)(H,null,o,{kind:"getter",name:"radius",static:!1,private:!1,access:{has:e=>"radius"in e,get:e=>e.radius},metadata:w},null,f),(0,k.__esDecorate)(H,null,l,{kind:"accessor",name:"renderPriority",static:!1,private:!1,access:{has:e=>"renderPriority"in e,get:e=>e.renderPriority,set:(e,t)=>{e.renderPriority=t}},metadata:w},D,N),(0,k.__esDecorate)(null,null,t,{kind:"field",name:"diffuse",static:!1,private:!1,access:{has:e=>"diffuse"in e,get:e=>e.diffuse,set:(e,t)=>{e.diffuse=t}},metadata:w},m,I),(0,k.__esDecorate)(null,null,i,{kind:"field",name:"specular",static:!1,private:!1,access:{has:e=>"specular"in e,get:e=>e.specular,set:(e,t)=>{e.specular=t}},metadata:w},p,b),(0,k.__esDecorate)(null,null,s,{kind:"field",name:"falloffType",static:!1,private:!1,access:{has:e=>"falloffType"in e,get:e=>e.falloffType,set:(e,t)=>{e.falloffType=t}},metadata:w},y,S),(0,k.__esDecorate)(null,null,n,{kind:"field",name:"intensity",static:!1,private:!1,access:{has:e=>"intensity"in e,get:e=>e.intensity,set:(e,t)=>{e.intensity=t}},metadata:w},L,M),(0,k.__esDecorate)(null,null,h,{kind:"field",name:"_renderPriority",static:!1,private:!1,access:{has:e=>"_renderPriority"in e,get:e=>e._renderPriority,set:(e,t)=>{e._renderPriority=t}},metadata:w},E,T),(0,k.__esDecorate)(null,null,d,{kind:"field",name:"_shadowEnabled",static:!1,private:!1,access:{has:e=>"_shadowEnabled"in e,get:e=>e._shadowEnabled,set:(e,t)=>{e._shadowEnabled=t}},metadata:w},O,v),(0,k.__esDecorate)(null,null,_,{kind:"field",name:"_excludeWithLayerMask",static:!1,private:!1,access:{has:e=>"_excludeWithLayerMask"in e,get:e=>e._excludeWithLayerMask,set:(e,t)=>{e._excludeWithLayerMask=t}},metadata:w},C,A),(0,k.__esDecorate)(null,null,u,{kind:"field",name:"_includeOnlyWithLayerMask",static:!1,private:!1,access:{has:e=>"_includeOnlyWithLayerMask"in e,get:e=>e._includeOnlyWithLayerMask,set:(e,t)=>{e._includeOnlyWithLayerMask=t}},metadata:w},P,x),(0,k.__esDecorate)(null,null,c,{kind:"field",name:"_lightmapMode",static:!1,private:!1,access:{has:e=>"_lightmapMode"in e,get:e=>e._lightmapMode,set:(e,t)=>{e._lightmapMode=t}},metadata:w},z,R),w&&Object.defineProperty(H,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:w}),H.FALLOFF_DEFAULT=q.LightConstants.FALLOFF_DEFAULT,H.FALLOFF_PHYSICAL=q.LightConstants.FALLOFF_PHYSICAL,H.FALLOFF_GLTF=q.LightConstants.FALLOFF_GLTF,H.FALLOFF_STANDARD=q.LightConstants.FALLOFF_STANDARD,H.LIGHTMAP_DEFAULT=q.LightConstants.LIGHTMAP_DEFAULT,H.LIGHTMAP_SPECULAR=q.LightConstants.LIGHTMAP_SPECULAR,H.LIGHTMAP_SHADOWSONLY=q.LightConstants.LIGHTMAP_SHADOWSONLY,H.INTENSITYMODE_AUTOMATIC=q.LightConstants.INTENSITYMODE_AUTOMATIC,H.INTENSITYMODE_LUMINOUSPOWER=q.LightConstants.INTENSITYMODE_LUMINOUSPOWER,H.INTENSITYMODE_LUMINOUSINTENSITY=q.LightConstants.INTENSITYMODE_LUMINOUSINTENSITY,H.INTENSITYMODE_ILLUMINANCE=q.LightConstants.INTENSITYMODE_ILLUMINANCE,H.INTENSITYMODE_LUMINANCE=q.LightConstants.INTENSITYMODE_LUMINANCE,H.LIGHTTYPEID_POINTLIGHT=q.LightConstants.LIGHTTYPEID_POINTLIGHT,H.LIGHTTYPEID_DIRECTIONALLIGHT=q.LightConstants.LIGHTTYPEID_DIRECTIONALLIGHT,H.LIGHTTYPEID_SPOTLIGHT=q.LightConstants.LIGHTTYPEID_SPOTLIGHT,H.LIGHTTYPEID_HEMISPHERICLIGHT=q.LightConstants.LIGHTTYPEID_HEMISPHERICLIGHT,H.LIGHTTYPEID_RECT_AREALIGHT=q.LightConstants.LIGHTTYPEID_RECT_AREALIGHT,H);e.s(["Light",0,X])},88083,23017,e=>{"use strict";let t,i,s,n,a,r,o,h;var l,d=e.i(57575),_=e.i(9855),u=e.i(69400),c=e.i(19919),g=e.i(90160),f=e.i(52624),m=e.i(44520);let I=(s=g.Light,n=[],a=[],r=[],o=[],l=class extends s{constructor(e,t,i,s){super(e,i,s),this.groundColor=(0,d.__runInitializers)(this,n,new c.Color3(0,0,0)),this.direction=((0,d.__runInitializers)(this,a),(0,d.__runInitializers)(this,r,void 0)),(0,d.__runInitializers)(this,o),this.direction=t||u.Vector3.Up()}_buildUniformLayout(){this._uniformBuffer.addUniform("vLightData",4),this._uniformBuffer.addUniform("vLightDiffuse",4),this._uniformBuffer.addUniform("vLightSpecular",4),this._uniformBuffer.addUniform("vLightGround",3),this._uniformBuffer.addUniform("shadowsInfo",3),this._uniformBuffer.addUniform("depthValues",2),this._uniformBuffer.create()}getClassName(){return"HemisphericLight"}setDirectionToTarget(e){return this.direction=u.Vector3.Normalize(e.subtract(u.Vector3.Zero())),this.direction}getShadowGenerator(){return null}transferToEffect(e,t){let i=u.Vector3.Normalize(this.direction);return this._uniformBuffer.updateFloat4("vLightData",i.x,i.y,i.z,0,t),this._uniformBuffer.updateColor3("vLightGround",this.groundColor.scale(this.intensity),t),this}transferToNodeMaterialEffect(e,t){let i=u.Vector3.Normalize(this.direction);return e.setFloat3(t,i.x,i.y,i.z),this}computeWorldMatrix(){return this._worldMatrix||(this._worldMatrix=u.Matrix.Identity()),this._worldMatrix}getTypeID(){return g.Light.LIGHTTYPEID_HEMISPHERICLIGHT}prepareLightSpecificDefines(e,t){e["HEMILIGHT"+t]=!0}},h="function"==typeof Symbol&&Symbol.metadata?Object.create(s[Symbol.metadata]??null):void 0,t=[(0,_.serializeAsColor3)()],i=[(0,_.serializeAsVector3)()],(0,d.__esDecorate)(null,null,t,{kind:"field",name:"groundColor",static:!1,private:!1,access:{has:e=>"groundColor"in e,get:e=>e.groundColor,set:(e,t)=>{e.groundColor=t}},metadata:h},n,a),(0,d.__esDecorate)(null,null,i,{kind:"field",name:"direction",static:!1,private:!1,access:{has:e=>"direction"in e,get:e=>e.direction,set:(e,t)=>{e.direction=t}},metadata:h},r,o),h&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:h}),l),p=!1;function b(){p||(p=!0,f.Node.AddNodeConstructor("Light_Type_3",(e,t)=>()=>new I(e,u.Vector3.Zero(),t)),(0,m.RegisterClass)("BABYLON.HemisphericLight",I))}e.s(["HemisphericLight",0,I,"RegisterHemisphericLight",0,b],23017),b(),e.s([],88083)},5153,e=>{"use strict";e.i(88083);var t=e.i(23017);e.s(["HemisphericLight",()=>t.HemisphericLight,"RegisterHemisphericLight",()=>t.RegisterHemisphericLight])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,e=>{"use strict";class t{static GetShadersRepository(e=0){return 0===e?t.ShadersRepository:t.ShadersRepositoryWGSL}static GetShadersStore(e=0){return 0===e?t.ShadersStore:t.ShadersStoreWGSL}static GetIncludesShadersStore(e=0){return 0===e?t.IncludesShadersStore:t.IncludesShadersStoreWGSL}}t.ShadersRepository="src/Shaders/",t.ShadersStore={},t.IncludesShadersStore={},t.ShadersRepositoryWGSL="src/ShadersWGSL/",t.ShadersStoreWGSL={},t.IncludesShadersStoreWGSL={},e.s(["ShaderStore",0,t])},3524,69680,e=>{"use strict";var t=e.i(41041),r=e.i(3864);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new r.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let r=0;r<e.length;r++){let i=e[r];i&&t.push(i)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let r=this._scene.activeCamera;return!!r&&!!(t=t||this._getActivePostProcesses(r._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(r,e,null!=t),!0)}directRender(e,t=null,r=!1,i=0,s=0,n=!1,a=e.length){let o=this._scene.getEngine();for(let h=0;h<a;h++){h<e.length-1?e[h+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?o.bindFramebuffer(t,i,void 0,void 0,r,s):n||o.restoreDefaultFramebuffer(),o._debugInsertMarker?.(`post process ${e[h].name} output`));let a=e[h],c=a.apply();c&&(a.onBeforeRenderObservable.notifyObservers(c),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,c),o.drawElementsType(0,0,6),a.onAfterRenderObservable.notifyObservers(c))}o.setDepthBuffer(!0),o.setDepthWrite(!0)}_finalizeFrame(e,t,r,i,s=!1){let n=this._scene.activeCamera;if(!n||(this.onBeforeRenderObservable.notifyObservers(this),0===(i=i||this._getActivePostProcesses(n._postProcesses)).length||!this._scene.postProcessesEnabled))return;let a=this._scene.getEngine();for(let o=0,h=i.length;o<h;o++){let c=i[o];if(o<h-1?c._outputTexture=i[o+1].activate(n,t?.texture):(t?(a.bindFramebuffer(t,r,void 0,void 0,s),c._outputTexture=t):(a.restoreDefaultFramebuffer(),c._outputTexture=null),a._debugInsertMarker?.(`post process ${i[o].name} output`)),e)break;let l=c.apply();l&&(c.onBeforeRenderObservable.notifyObservers(l),this._prepareBuffers(),a.bindBuffers(this._vertexBuffers,this._indexBuffer,l),a.drawElementsType(0,0,6),c.onAfterRenderObservable.notifyObservers(l))}a.setDepthBuffer(!0),a.setDepthWrite(!0),a.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],3524);var i=e.i(32451),s=e.i(69400);class n{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=n.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=n.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=n.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,r=null,s=null,n=null){this.index=e,this._opaqueSubMeshes=new i.SmartArray(256),this._transparentSubMeshes=new i.SmartArray(256),this._alphaTestSubMeshes=new i.SmartArray(256),this._depthOnlySubMeshes=new i.SmartArray(256),this._particleSystems=new i.SmartArray(256),this._spriteManagers=new i.SmartArray(256),this._empty=!0,this._edgesRenderers=new i.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=r,this.alphaTestSortCompareFn=s,this.transparentSortCompareFn=n}render(e,t,r,i,s=!0,n=!0,a=!0,o=!0,h){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let c=this._scene.getEngine();s&&0!==this._depthOnlySubMeshes.length&&(c.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),c.setColorWrite(!0)),n&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),a&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let l=c.getStencilBuffer();if(c.setStencilBuffer(!1),t&&this._renderSprites(),r&&this._renderParticles(i),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),o&&(h||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(c.setStencilBuffer(l),h)h(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);c.setAlphaMode(0)}if(c.setStencilBuffer(!1),n&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();c.setAlphaMode(0)}c.setStencilBuffer(l)}_renderOpaqueSorted(e){n._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){n._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){n._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,r,i,a){let o,h=0,c=r?r.globalPosition:n._ZeroVector;if(i)for(;h<e.length;h++)(o=e.data[h])._alphaIndex=o.getMesh().alphaIndex,o._distanceToCamera=s.Vector3.Distance(o.getBoundingInfo().boundingSphere.centerWorld,c);let l=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&l.sort(t);let u=l[0].getMesh().getScene();for(h=0;h<l.length;h++)if(o=l[h],!u._activeMeshesFrozenButKeepClipping||o.isInFrustum(u._frustumPlanes)){if(i){let e=o.getMaterial();if(e&&e.needDepthPrePass&&!a){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),o.render(!1),t.setColorWrite(!0)}}o.render(i)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:n.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let r=e.getMesh(),i=t.getMesh();return r.material&&i.material?r.material.uniqueId-i.material.uniqueId:r.uniqueId-i.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),void 0===r&&(r=e.getMaterial()),null!=r&&(r.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):r.needAlphaTestingForMesh(t)?(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let r=0;r<this._particleSystems.length;r++){let i=this._particleSystems.data[r];if(0===(t&&t.layerMask&i.layerMask))continue;let s=i.emitter;s.position&&e&&-1===e.indexOf(s)||this._scene._activeParticles.addCount(i.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let r=this._spriteManagers.data[t];0!==(e&&e.layerMask&r.layerMask)&&r.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}n._ZeroVector=s.Vector3.Zero();class a{}class o{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new a,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,r,i,s=!0,n=!0,a=!0,h=!0,c){let l=this._renderingGroupInfo;if(l.scene=this._scene,l.camera=this._scene.activeCamera,l.renderingManager=this,this._scene.spriteManagers&&i)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let u=o.MIN_RENDERINGGROUPS;u<o.MAX_RENDERINGGROUPS;u++){this._depthStencilBufferAlreadyCleaned=u===o.MIN_RENDERINGGROUPS;let p=this._renderingGroups[u];if(!p||p._empty)continue;let d=1<<u;if(l.renderingGroupId=u,this._scene.onBeforeRenderingGroupObservable.notifyObservers(l,d),o.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(u):this._autoClearDepthStencil[u];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(u);for(let o of(p.render(e,i,r,t,s,n,a,h,c),this._scene._afterRenderingGroupDrawStage))o.action(u);this._scene.onAfterRenderingGroupObservable.notifyObservers(l,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new n(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,r))}setRenderingOrder(e,t=null,r=null,i=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=r,this._customTransparentSortCompareFn[e]=i,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,r=!0,i=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:r,stencil:i}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}o.MAX_RENDERINGGROUPS=4,o.MIN_RENDERINGGROUPS=0,o.AUTOCLEAR=!0,e.s(["RenderingManager",0,o],69680)},11267,e=>{"use strict";var t=e.i(87627);class r{get min(){return this._min}get max(){return this._max}get average(){return this._average}get lastSecAverage(){return this._lastSecAverage}get current(){return this._current}get total(){return this._totalAccumulated}get count(){return this._totalValueCount}constructor(){this._startMonitoringTime=0,this._min=0,this._max=0,this._hasResult=!1,this._hasCurrentValue=!1,this._average=0,this._lastSecAverage=0,this._current=0,this._totalValueCount=0,this._totalAccumulated=0,this._lastSecAccumulated=0,this._lastSecTime=0,this._lastSecValueCount=0}fetchNewFrame(){this._totalValueCount++,this._current=0,this._hasCurrentValue=r.Enabled,this._lastSecValueCount++}addCount(e,t){r.Enabled&&(this._current+=e,this._hasCurrentValue=!0,t&&this._fetchResult())}beginMonitoring(){r.Enabled&&(this._startMonitoringTime=t.PrecisionDate.Now)}endMonitoring(e=!0){if(!r.Enabled)return;e&&this.fetchNewFrame();let i=t.PrecisionDate.Now;this._current=i-this._startMonitoringTime,this._hasCurrentValue=!0,e&&this._fetchResult()}endFrame(){this._fetchResult()}_fetchResult(){if(!this._hasCurrentValue)return;this._totalAccumulated+=this._current,this._lastSecAccumulated+=this._current,this._hasResult?(this._min=Math.min(this._min,this._current),this._max=Math.max(this._max,this._current)):(this._min=this._current,this._max=this._current,this._hasResult=!0),this._average=this._totalAccumulated/this._totalValueCount;let e=t.PrecisionDate.Now;e-this._lastSecTime>1e3&&(this._lastSecAverage=this._lastSecAccumulated/this._lastSecValueCount,this._lastSecTime=e,this._lastSecAccumulated=0,this._lastSecValueCount=0)}}r.Enabled=!0,e.s(["PerfCounter",0,r])},57660,e=>{"use strict";var t=e.i(96042);class r{static GetPlanes(e){let i=[];for(let e=0;e<6;e++)i.push(new t.Plane(0,0,0,0));return r.GetPlanesToRef(e,i),i}static GetNearPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[2],t.normal.y=r[7]+r[6],t.normal.z=r[11]+r[10],t.d=r[15]+r[14],t.normalize()}static GetFarPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[2],t.normal.y=r[7]-r[6],t.normal.z=r[11]-r[10],t.d=r[15]-r[14],t.normalize()}static GetLeftPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[0],t.normal.y=r[7]+r[4],t.normal.z=r[11]+r[8],t.d=r[15]+r[12],t.normalize()}static GetRightPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[0],t.normal.y=r[7]-r[4],t.normal.z=r[11]-r[8],t.d=r[15]-r[12],t.normalize()}static GetTopPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[1],t.normal.y=r[7]-r[5],t.normal.z=r[11]-r[9],t.d=r[15]-r[13],t.normalize()}static GetBottomPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[1],t.normal.y=r[7]+r[5],t.normal.z=r[11]+r[9],t.d=r[15]+r[13],t.normalize()}static GetPlanesToRef(e,t){r.GetNearPlaneToRef(e,t[0]),r.GetFarPlaneToRef(e,t[1]),r.GetLeftPlaneToRef(e,t[2]),r.GetRightPlaneToRef(e,t[3]),r.GetTopPlaneToRef(e,t[4]),r.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let r=0;r<6;r++)if(0>t[r].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,r])},92247,e=>{"use strict";var t=e.i(69400),r=e.i(41041);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,i=!0){let s;if(!this.pickedMesh||i&&!this.pickedMesh.isVerticesDataPresent(r.VertexBuffer.NormalKind))return null;let n=this.pickedMesh.getIndices();n?.length===0&&(n=null);let a=t.TmpVectors.Vector3[0],o=t.TmpVectors.Vector3[1],h=t.TmpVectors.Vector3[2];if(i){let e=this.pickedMesh.getVerticesData(r.VertexBuffer.NormalKind),i=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);i=i.scale(this.bu),c=c.scale(this.bv),l=l.scale(1-this.bu-this.bv),s=new t.Vector3(i.x+c.x+l.x,i.y+c.y+l.y,i.z+c.z+l.z)}else{let e=this.pickedMesh.getVerticesData(r.VertexBuffer.PositionKind),i=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId],a):a.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),c=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),l=n?t.Vector3.FromArrayToRef(e,3*n[3*this.faceId+2],h):h.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),u=i.subtract(c),p=l.subtract(c);s=t.Vector3.Cross(u,p)}let c=(e,r)=>{if(-1!==this.thinInstanceIndex){let i=e._thinInstanceDataStorage.matrixData,s=this.thinInstanceIndex<<4;if(i&&i.length>s){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(i,s,e),t.Vector3.TransformNormalToRef(r,e,r)}}let i=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(i),(i=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),i.invert(),i.transposeToRef(t.TmpVectors.Matrix[1]),i=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(r,i,r)};if(e&&c(this.pickedMesh,s),this.ray){let r=t.TmpVectors.Vector3[0].copyFrom(s);e||c(this.pickedMesh,r),t.Vector3.Dot(r,this.ray.direction)>0&&s.negateInPlace()}return s.normalize(),s}getTextureCoordinates(e=r.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let i=this.pickedMesh.getIndices();if(!i)return null;let s=this.pickedMesh.getVerticesData(e);if(!s)return null;let n=t.Vector2.FromArray(s,2*i[3*this.faceId]),a=t.Vector2.FromArray(s,2*i[3*this.faceId+1]),o=t.Vector2.FromArray(s,2*i[3*this.faceId+2]);return n=n.scale(this.bu),a=a.scale(this.bv),o=o.scale(1-this.bu-this.bv),new t.Vector2(n.x+a.x+o.x,n.y+a.y+o.y)}}])},84964,e=>{"use strict";var t=e.i(69400);class r{}r.POINTERDOWN=1,r.POINTERUP=2,r.POINTERMOVE=4,r.POINTERWHEEL=8,r.POINTERPICK=16,r.POINTERTAP=32,r.POINTERDOUBLETAP=64;class i{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,r,"PointerInfo",0,class extends i{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,r,i=null){super(e,t),this._pickInfo=r,this._inputManager=i}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends i{constructor(e,r,i,s){super(e,r),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(i,s)}}])},71092,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,r,"KeyboardInfoPre",0,class extends r{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},4021,e=>{"use strict";var t,r;(r=t||(t={}))[r.PointerMove=0]="PointerMove",r[r.PointerDown=1]="PointerDown",r[r.PointerUp=2]="PointerUp";class i{}i.DOM_DELTA_PIXEL=0,i.DOM_DELTA_LINE=1,i.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,i])},22287,e=>{"use strict";e.s(["IntersectionInfo",0,class{constructor(e,t,r){this.bu=e,this.bv=t,this.distance=r,this.faceId=0,this.subMeshId=0,this._internalSubMeshId=0}}])},12675,e=>{"use strict";var t=e.i(66460),r=e.i(55288),i=e.i(84106),s=e.i(69400),n=e.i(30672),a=e.i(22287),o=e.i(92247),h=e.i(23003),c=e.i(52390);let l={internalPickerForMesh:void 0};class u{constructor(e,t,r=Number.MAX_VALUE,s=i.Epsilon){this.origin=e,this.direction=t,this.length=r,this.epsilon=s}clone(){return new u(this.origin.clone(),this.direction.clone(),this.length)}intersectsBoxMinMax(e,t,r=0){let i,s,n,a,o=u._TmpVector3[0].copyFromFloats(e.x-r,e.y-r,e.z-r),h=u._TmpVector3[1].copyFromFloats(t.x+r,t.y+r,t.z+r),c=0,l=Number.MAX_VALUE;if(1e-7>Math.abs(this.direction.x)){if(this.origin.x<o.x||this.origin.x>h.x)return!1}else if(i=1/this.direction.x,s=(o.x-this.origin.x)*i,(n=(h.x-this.origin.x)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;if(1e-7>Math.abs(this.direction.y)){if(this.origin.y<o.y||this.origin.y>h.y)return!1}else if(i=1/this.direction.y,s=(o.y-this.origin.y)*i,(n=(h.y-this.origin.y)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;if(1e-7>Math.abs(this.direction.z)){if(this.origin.z<o.z||this.origin.z>h.z)return!1}else if(i=1/this.direction.z,s=(o.z-this.origin.z)*i,(n=(h.z-this.origin.z)*i)==-1/0&&(n=1/0),s>n&&(a=s,s=n,n=a),(c=Math.max(s,c))>(l=Math.min(n,l)))return!1;return!0}intersectsBox(e,t=0){return this.intersectsBoxMinMax(e.minimum,e.maximum,t)}intersectsSphere(e,t=0){let r=e.center.x-this.origin.x,i=e.center.y-this.origin.y,s=e.center.z-this.origin.z,n=r*r+i*i+s*s,a=e.radius+t,o=a*a;if(n<=o)return!0;let h=r*this.direction.x+i*this.direction.y+s*this.direction.z;return!(h<0)&&n-h*h<=o}intersectsTriangle(e,t,r){let i=u._TmpVector3[0],n=u._TmpVector3[1],o=u._TmpVector3[2],h=u._TmpVector3[3],c=u._TmpVector3[4];t.subtractToRef(e,i),r.subtractToRef(e,n),s.Vector3.CrossToRef(this.direction,n,o);let l=s.Vector3.Dot(i,o);if(0===l)return null;let p=1/l;this.origin.subtractToRef(e,h);let d=s.Vector3.Dot(h,o)*p;if(d<-this.epsilon||d>1+this.epsilon)return null;s.Vector3.CrossToRef(h,i,c);let f=s.Vector3.Dot(this.direction,c)*p;if(f<-this.epsilon||d+f>1+this.epsilon)return null;let _=s.Vector3.Dot(n,c)*p;return _>this.length||_<0?null:new a.IntersectionInfo(1-d-f,d,_)}intersectsPlane(e){let t,r=s.Vector3.Dot(e.normal,this.direction);if(999999997475243e-21>Math.abs(r))return null;{let i=s.Vector3.Dot(e.normal,this.origin);if((t=(-e.d-i)/r)<0)if(t<-999999997475243e-21)return null;else return 0;return t}}intersectsAxis(e,t=0){switch(e){case"y":{let e=(this.origin.y-t)/this.direction.y;if(e>0)return null;return new s.Vector3(this.origin.x+-(this.direction.x*e),t,this.origin.z+-(this.direction.z*e))}case"x":{let e=(this.origin.x-t)/this.direction.x;if(e>0)return null;return new s.Vector3(t,this.origin.y+-(this.direction.y*e),this.origin.z+-(this.direction.z*e))}case"z":{let e=(this.origin.z-t)/this.direction.z;if(e>0)return null;return new s.Vector3(this.origin.x+-(this.direction.x*e),this.origin.y+-(this.direction.y*e),t)}default:return null}}intersectsMesh(e,t,r,i=!1,n,a=!1){let o=s.TmpVectors.Matrix[0];return e.getWorldMatrix().invertToRef(o),this._tmpRay?u.TransformToRef(this,o,this._tmpRay):this._tmpRay=u.Transform(this,o),e.intersects(this._tmpRay,t,r,i,n,a)}intersectsMeshes(e,t,r){r?r.length=0:r=[];for(let i=0;i<e.length;i++){let s=this.intersectsMesh(e[i],t);s.hit&&r.push(s)}return r.sort(this._comparePickingInfo),r}_comparePickingInfo(e,t){return e.distance<t.distance?-1:+(e.distance>t.distance)}intersectionSegment(e,t,r){let i=this.origin,n=s.TmpVectors.Vector3[0],a=s.TmpVectors.Vector3[1],o=s.TmpVectors.Vector3[2],h=s.TmpVectors.Vector3[3];t.subtractToRef(e,n),this.direction.scaleToRef(u._Rayl,o),i.addToRef(o,a),e.subtractToRef(i,h);let c=s.Vector3.Dot(n,n),l=s.Vector3.Dot(n,o),p=s.Vector3.Dot(o,o),d=s.Vector3.Dot(n,h),f=s.Vector3.Dot(o,h),_=c*p-l*l,m,g=_,R,y=_;_<u._Smallnum?(m=0,g=1,R=f,y=p):(m=l*f-p*d,R=c*f-l*d,m<0?(m=0,R=f,y=p):m>g&&(m=g,R=f+l,y=p)),R<0?(R=0,0>-d?m=0:-d>c?m=g:(m=-d,g=c)):R>y&&(R=y,-d+l<0?m=0:-d+l>c?m=g:(m=-d+l,g=c));let S=Math.abs(m)<u._Smallnum?0:m/g,T=Math.abs(R)<u._Smallnum?0:R/y,P=s.TmpVectors.Vector3[4];o.scaleToRef(T,P);let M=s.TmpVectors.Vector3[5];n.scaleToRef(S,M),M.addInPlace(h);let b=s.TmpVectors.Vector3[6];return(M.subtractToRef(P,b),T>0&&T<=this.length&&b.lengthSquared()<r*r)?M.length():-1}update(e,t,r,i,n,a,o,h=!1){if(h){u._RayDistant||(u._RayDistant=u.Zero()),u._RayDistant.unprojectRayToRef(e,t,r,i,s.Matrix.IdentityReadOnly,a,o);let h=s.TmpVectors.Matrix[0];n.invertToRef(h),u.TransformToRef(u._RayDistant,h,this)}else this.unprojectRayToRef(e,t,r,i,n,a,o);return this}static Zero(){return new u(s.Vector3.Zero(),s.Vector3.Zero())}static CreateNew(e,t,r,i,s,n,a){return u.Zero().update(e,t,r,i,s,n,a)}static CreateNewFromTo(e,t,r=s.Matrix.IdentityReadOnly){let i=new u(new s.Vector3(0,0,0),new s.Vector3(0,0,0));return u.CreateFromToToRef(e,t,i,r)}static CreateFromToToRef(e,t,r,i=s.Matrix.IdentityReadOnly){r.origin.copyFrom(e);let n=t.subtractToRef(e,r.direction);return r.length=Math.sqrt(n.x*n.x+n.y*n.y+n.z*n.z),r.direction.normalize(),u.TransformToRef(r,i,r)}static Transform(e,t){let r=new u(new s.Vector3(0,0,0),new s.Vector3(0,0,0));return u.TransformToRef(e,t,r),r}static TransformToRef(e,t,r){s.Vector3.TransformCoordinatesToRef(e.origin,t,r.origin),s.Vector3.TransformNormalToRef(e.direction,t,r.direction),r.length=e.length,r.epsilon=e.epsilon;let i=r.direction,n=i.length();if(0!==n&&1!==n){let e=1/n;i.x*=e,i.y*=e,i.z*=e,r.length*=n}return r}unprojectRayToRef(e,t,r,i,n,a,o){let c=s.TmpVectors.Matrix[0];n.multiplyToRef(a,c),c.multiplyToRef(o,c),c.invert();let l=h.EngineStore.LastCreatedEngine,u=s.TmpVectors.Vector3[0];u.x=e/r*2-1,u.y=-(t/i*2-1),u.z=l?.useReverseDepthBuffer?1:l?.isNDCHalfZRange?0:-1;let p=s.TmpVectors.Vector3[1].copyFromFloats(u.x,u.y,1-1e-8),d=s.TmpVectors.Vector3[2],f=s.TmpVectors.Vector3[3];s.Vector3.TransformCoordinatesToRef(u,c,d),s.Vector3.TransformCoordinatesToRef(p,c,f),this.origin.copyFrom(d),f.subtractToRef(d,this.direction),this.direction.normalize()}}function p(e,t,r,i,s,n=!1){let a=u.Zero();return d(e,t,r,i,a,s,n),a}function d(e,t,r,i,n,a,o=!1,h=!1){let c=e.getEngine();if(!a&&!(a=e.activeCamera)&&!(a=e.cameraToUseForPointers))return e;let l=a.viewport,u=c.getRenderHeight(),{x:p,y:f,width:_,height:m}=l.toGlobal(c.getRenderWidth(),u),g=1/c.getHardwareScalingLevel();return t=t*g-p,r=r*g-(u-f-m),n.update(t,r,_,m,i||s.Matrix.IdentityReadOnly,o?s.Matrix.IdentityReadOnly:a.getViewMatrix(),a.getProjectionMatrix(),h),e}function f(e,t,r,i){let s=u.Zero();return _(e,t,r,s,i),s}function _(e,t,r,i,n){if(!o.PickingInfo)return e;let a=e.getEngine();if(!n&&!(n=e.activeCamera)&&!(n=e.cameraToUseForPointers))throw Error("Active camera not set");let h=n.viewport,c=a.getRenderHeight(),{x:l,y:u,width:p,height:d}=h.toGlobal(a.getRenderWidth(),c),f=s.Matrix.Identity(),_=1/a.getHardwareScalingLevel();return t=t*_-l,r=r*_-(c-u-d),i.update(t,r,p,d,f,f,n.getProjectionMatrix()),e}function m(e,t,r,i,s,n,a,o){let h=t(i,r.enableDistantPicking);return g(e,r,i,h,s,n,a,o)}function g(e,t,r,i,s,n,a,o){let h=t.intersects(i,s,a,n,r,o);return h&&h.hit&&(s||null==e||!(h.distance>=e.distance))?h:null}function R(e){let t=e.getClassName();if("GreasedLineMesh"===t)return{rawBoundingInfo:null,intersectionThreshold:0};let r=e.rawBoundingInfo;return{rawBoundingInfo:r,intersectionThreshold:r?"InstancedLinesMesh"===t||"LinesMesh"===t?e.intersectionThreshold:0:0}}function y(e,t,r,i,s){let n=e(r,t.enableDistantPicking);return n.intersectsSphere(i.boundingSphere,s)&&n.intersectsBox(i.boundingBox,s)?n:null}function S(e,t,r,i,n,a){let h=null,c=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),u=e.cameraToUseForPointers||e.activeCamera,p=l.internalPickerForMesh||m,d=p===m;for(let o=0;o<e.meshes.length;o++){let l=e.meshes[o];if(r){if(!r(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;let f=c&&l.isWorldMatrixCameraDependent(),_=l.computeWorldMatrix(f,u);if(l.hasThinInstances&&l.thinInstanceEnablePicking){let e=p(h,t,l,_,!0,!0,a);if(e){if(n)return e;let{rawBoundingInfo:o,intersectionThreshold:c}=R(l),u=l._thinInstanceDataStorage.matrixData;if(u){let e=s.TmpVectors.Matrix[0],f=s.TmpVectors.Matrix[1],m=Math.min(l.thinInstanceCount,u.length>>4);for(let R=0;R<m;R++){if(r&&!r(l,R))continue;s.Matrix.FromArrayToRef(u,R<<4,e),e.multiplyToRef(_,f);let m=d&&o?y(t,l,f,o,c):null;if(d&&o&&!m)continue;let S=d&&m?g(h,l,f,m,i,n,a,!0):p(h,t,l,f,i,n,a,!0);if(S&&((h=S).thinInstanceIndex=R,i))return h}}}}else{let e=p(h,t,l,_,i,n,a);if(e&&(h=e,i))return h}}return h||new o.PickingInfo}function T(e,t,r,i){if(!o.PickingInfo)return null;let n=[],a=!!(e.activeCameras&&e.activeCameras.length>1&&e.cameraToUseForPointers!==e.activeCamera),h=e.cameraToUseForPointers||e.activeCamera,c=l.internalPickerForMesh||m,u=c===m;for(let o=0;o<e.meshes.length;o++){let l=e.meshes[o];if(r){if(!r(l,-1))continue}else if(!l.isEnabled()||!l.isVisible||!l.isPickable)continue;let p=a&&l.isWorldMatrixCameraDependent(),d=l.computeWorldMatrix(p,h);if(l.hasThinInstances&&l.thinInstanceEnablePicking){if(c(null,t,l,d,!0,!0,i)){let{rawBoundingInfo:e,intersectionThreshold:a}=R(l),o=l._thinInstanceDataStorage.matrixData;if(o){let h=s.TmpVectors.Matrix[0],p=s.TmpVectors.Matrix[1],f=Math.min(l.thinInstanceCount,o.length>>4);for(let _=0;_<f;_++){if(r&&!r(l,_))continue;s.Matrix.FromArrayToRef(o,_<<4,h),h.multiplyToRef(d,p);let f=u&&e?y(t,l,p,e,a):null;if(u&&e&&!f)continue;let m=u&&f?g(null,l,p,f,!1,!1,i,!0):c(null,t,l,p,!1,!1,i,!0);m&&(m.thinInstanceIndex=_,n.push(m))}}}}else{let e=c(null,t,l,d,!1,!1,i);e&&n.push(e)}}return n}function P(e,t,r,i,n,a){if(!o.PickingInfo)return null;let h=S(e,i=>(e._tempPickingRay||(e._tempPickingRay=u.Zero()),d(e,t,r,i,e._tempPickingRay,a||null),e._tempPickingRay),i,n,!0);return h&&(h.ray=p(e,t,r,s.Matrix.Identity(),a||null)),h}function M(e,t,r,i,n,a,o,h=!1){let c=S(e,(i,s)=>(e._tempPickingRay||(e._tempPickingRay=u.Zero()),d(e,t,r,i,e._tempPickingRay,a||null,!1,s),e._tempPickingRay),i,n,!1,o);return c&&(c.ray=p(e,t,r,s.Matrix.Identity(),a||null)),c}function b(e,t,r,i,n){let a=S(e,r=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=s.Matrix.Identity()),r.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=u.Zero()),u.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform),r,i,!1,n);return a&&(a.ray=t),a}function I(e,t,r,i,s,n){return T(e,i=>p(e,t,r,i,s||null),i,n)}function x(e,t,r,i){return T(e,r=>(e._pickWithRayInverseMatrix||(e._pickWithRayInverseMatrix=s.Matrix.Identity()),r.invertToRef(e._pickWithRayInverseMatrix),e._cachedRayForTransform||(e._cachedRayForTransform=u.Zero()),u.TransformToRef(t,e._pickWithRayInverseMatrix,e._cachedRayForTransform),e._cachedRayForTransform),r,i)}function C(e,t=100,r,i){return V(e,new u(s.Vector3.Zero(),s.Vector3.Zero(),t),t,r,i)}function V(e,t,r=100,i,n){i||(i=e.getWorldMatrix()),t.length=r,n?t.origin.copyFrom(n):t.origin.copyFrom(e.position);let a=s.TmpVectors.Vector3[2];a.set(0,0,e._scene.useRightHandedSystem?-1:1);let o=s.TmpVectors.Vector3[3];return s.Vector3.TransformNormalToRef(a,i,o),s.Vector3.NormalizeToRef(o,t.direction),t}function v(e,t){t&&(t.prototype.getForwardRay=function(e=100,t,r){return V(this,new u(s.Vector3.Zero(),s.Vector3.Zero(),e),e,t,r)},t.prototype.getForwardRayToRef=function(e,t=100,r,i){return V(this,e,t,r,i)}),e&&(c._ImportHelper._IsPickingAvailable=!0,e.prototype.createPickingRay=function(e,t,r,i,s=!1){return p(this,e,t,r,i,s)})}u._TmpVector3=(0,n.BuildArray)(6,s.Vector3.Zero),u._RayDistant=u.Zero(),u._Smallnum=1e-8,u._Rayl=1e9,e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u],75258);let F=!1;function k(){F||(F=!0,v(t.Scene,r.Camera),t.Scene.prototype.createPickingRayToRef=function(e,t,r,i,s,n=!1,a=!1){return d(this,e,t,r,i,s,n,a)},t.Scene.prototype.createPickingRayInCameraSpace=function(e,t,r){return f(this,e,t,r)},t.Scene.prototype.createPickingRayInCameraSpaceToRef=function(e,t,r,i){return _(this,e,t,r,i)},t.Scene.prototype.pickWithBoundingInfo=function(e,t,r,i,s){return P(this,e,t,r,i,s)},t.Scene.prototype.pick=function(e,t,r,i,s,n,a=!1){return M(this,e,t,r,i,s,n,a)},t.Scene.prototype.pickWithRay=function(e,t,r,i){return b(this,e,t,r,i)},t.Scene.prototype.multiPick=function(e,t,r,i,s){return I(this,e,t,r,i,s)},t.Scene.prototype.multiPickWithRay=function(e,t,r){return x(this,e,t,r)})}e.s(["RegisterRay",0,k],88165),k(),e.s([],95484),e.i(95484),e.i(88165),e.i(75258),e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u,"RegisterRay",0,k],73034),e.i(73034),e.s(["AddRayExtensions",0,v,"CreatePickingRay",0,p,"CreatePickingRayInCameraSpace",0,f,"CreatePickingRayInCameraSpaceToRef",0,_,"CreatePickingRayToRef",0,d,"GetForwardRay",0,C,"GetForwardRayToRef",0,V,"MultiPick",0,I,"MultiPickWithRay",0,x,"Pick",0,M,"PickWithBoundingInfo",0,P,"PickWithRay",0,b,"PickingCustomization",0,l,"Ray",0,u,"RegisterRay",0,k],12675)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,52542,i=>{"use strict";i.i(79714);var n=i.i(56447);i.i(73935),i.s(["AnimationGroup",()=>n.AnimationGroup,"AnimationGroupClipFrames",()=>n.AnimationGroupClipFrames,"AnimationGroupClipFramesInPlace",()=>n.AnimationGroupClipFramesInPlace,"AnimationGroupClipInPlace",()=>n.AnimationGroupClipInPlace,"AnimationGroupClipKeys",()=>n.AnimationGroupClipKeys,"AnimationGroupClipKeysInPlace",()=>n.AnimationGroupClipKeysInPlace,"AnimationGroupMakeAnimationAdditive",()=>n.AnimationGroupMakeAnimationAdditive,"AnimationGroupMergeAnimationGroups",()=>n.AnimationGroupMergeAnimationGroups,"AnimationGroupParse",()=>n.AnimationGroupParse,"RegisterAnimationGroup",()=>n.RegisterAnimationGroup,"TargetedAnimation",()=>n.TargetedAnimation])}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,47150,t=>{"use strict";class e{static GetShadersRepository(t=0){return 0===t?e.ShadersRepository:e.ShadersRepositoryWGSL}static GetShadersStore(t=0){return 0===t?e.ShadersStore:e.ShadersStoreWGSL}static GetIncludesShadersStore(t=0){return 0===t?e.IncludesShadersStore:e.IncludesShadersStoreWGSL}}e.ShadersRepository="src/Shaders/",e.ShadersStore={},e.IncludesShadersStore={},e.ShadersRepositoryWGSL="src/ShadersWGSL/",e.ShadersStoreWGSL={},e.IncludesShadersStoreWGSL={},t.s(["ShaderStore",0,e])},21758,27480,68056,t=>{"use strict";t.s([],27480);var e=t.i(69400),n=t.i(16347),r=t.i(90025),a=t.i(64831),s=t.i(41041);let i="bakedVertexAnimationSettingsInstanced";function o(t){let e=t.bakedVertexAnimationManager?.texture?.getInternalTexture()?._bufferView;return e instanceof Float32Array||e instanceof Uint16Array}let h=!1;function f(){h||(h=!0,a.Mesh.prototype.thinInstanceAdd=function(t,e=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return n.Logger.Error("Thin Instances are not supported on this device as Instanced Array extension not supported"),-1;this._thinInstanceUpdateBufferSize("matrix",Array.isArray(t)?t.length:1);let r=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(t))for(let n=0;n<t.length;++n)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t[n],n===t.length-1&&e);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,t,e);return r},a.Mesh.prototype.thinInstanceAddSelf=function(t=!0){return this.thinInstanceAdd(e.Matrix.IdentityReadOnly,t)},a.Mesh.prototype.thinInstanceRegisterAttribute=function(t,e){t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this.removeVerticesData(t),this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.strides[t]=e,this._userThinInstanceBuffersStorage.sizes[t]=e*Math.max(32,this._thinInstanceDataStorage.instancesCount),this._userThinInstanceBuffersStorage.data[t]=new Float32Array(this._userThinInstanceBuffersStorage.sizes[t]),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!0,!1,e,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t])},a.Mesh.prototype.thinInstanceSetMatrixAt=function(t,e,n=!0){if(!this._thinInstanceDataStorage.matrixData||t>=this._thinInstanceDataStorage.instancesCount)return!1;let r=this._thinInstanceDataStorage.matrixData;return e.copyToArray(r,16*t),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[t]=e),n&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},a.Mesh.prototype.thinInstanceSetAttributeAt=function(t,e,n,r=!0){return t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),!!this._userThinInstanceBuffersStorage&&!!this._userThinInstanceBuffersStorage.data[t]&&!(e>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(t,0),this._userThinInstanceBuffersStorage.data[t].set(n,e*this._userThinInstanceBuffersStorage.strides[t]),r&&this.thinInstanceBufferUpdated(t),!0)},Object.defineProperty(a.Mesh.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(t){let e=this._thinInstanceDataStorage.matrixData??this.source?._thinInstanceDataStorage.matrixData;t<=(e?e.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=t)},enumerable:!0,configurable:!0}),a.Mesh.prototype._thinInstanceCreateMatrixBuffer=function(t,e,n=!0){let r=new s.Buffer(this.getEngine(),e,!n,16,!1,!0);for(let e=0;e<4;e++)this.setVerticesBuffer(r.createVertexBuffer(t+e,4*e,4));return r},a.Mesh.prototype.thinInstanceSetBuffer=function(t,e,n=0,r=!0){if(n=n||16,"matrix"===t)this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=e?e.length:32*n,this._thinInstanceDataStorage.matrixData=e,this._thinInstanceDataStorage.worldMatrices=null,null!==e?(this._thinInstanceDataStorage.instancesCount=e.length/n,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",e,r),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo());else if("previousMatrix"===t)this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=e,null!==e&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",e,r));else if("splatIndex"===t&&e){this._thinInstanceInitializeUserStorage(),this._thinInstanceDataStorage.instancesCount=e.length/n,this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=n,this._userThinInstanceBuffersStorage.sizes[t]=e.length;let r=new s.Buffer(this.getEngine(),e,!0,16,!1,!0);this._thinInstanceDataStorage.matrixBuffer=r;for(let e=0;e<4;e++)this.setVerticesBuffer(r.createVertexBuffer(t+e,4*e,4))}else t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),null===e?this._userThinInstanceBuffersStorage?.data[t]&&(this.removeVerticesData(t),delete this._userThinInstanceBuffersStorage.data[t],delete this._userThinInstanceBuffersStorage.strides[t],delete this._userThinInstanceBuffersStorage.sizes[t],delete this._userThinInstanceBuffersStorage.vertexBuffers[t]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[t]=e,this._userThinInstanceBuffersStorage.strides[t]=n,this._userThinInstanceBuffersStorage.sizes[t]=e.length,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),e,t,!r,!1,n,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},a.Mesh.prototype.thinInstanceBufferUpdated=function(t){"matrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.matrixBuffer&&!this._thinInstanceDataStorage.matrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount)):"previousMatrix"===t?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.previousMatrixBuffer&&!this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount)):"splatIndex"===t?this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._userThinInstanceBuffersStorage.data[t],0,this._thinInstanceDataStorage.instancesCount):(t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]&&(this.thinInstanceAllowAutomaticStaticBufferRecreation&&!this._userThinInstanceBuffersStorage.vertexBuffers[t].isUpdatable()&&this._thinInstanceRecreateBuffer(t),this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(this._userThinInstanceBuffersStorage.data[t],0)))},a.Mesh.prototype.thinInstancePartialBufferUpdate=function(t,e,n){if("matrix"===t)this._thinInstanceDataStorage.matrixBuffer&&("number"==typeof e?this._thinInstanceDataStorage.matrixBuffer.updateDirectly(new Float32Array(this._thinInstanceDataStorage.matrixData.buffer,this._thinInstanceDataStorage.matrixData.byteOffset+16*n*Float32Array.BYTES_PER_ELEMENT,16*e),16*n):this._thinInstanceDataStorage.matrixBuffer.updateDirectly(e,n));else if(t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[t]){let r=this._userThinInstanceBuffersStorage.vertexBuffers[t];if("number"==typeof e){let r=new Float32Array(this._userThinInstanceBuffersStorage.data[t].buffer,this._userThinInstanceBuffersStorage.data[t].byteOffset+n*this._userThinInstanceBuffersStorage.strides[t]*Float32Array.BYTES_PER_ELEMENT,e*this._userThinInstanceBuffersStorage.strides[t]);this._userThinInstanceBuffersStorage.vertexBuffers[t].updateDirectly(r,n*this._userThinInstanceBuffersStorage.strides[t])}else r.updateDirectly(e,n)}},a.Mesh.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];let t=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(let n=0;n<this._thinInstanceDataStorage.instancesCount;++n)this._thinInstanceDataStorage.worldMatrices[n]=e.Matrix.FromArray(t,16*n)}return this._thinInstanceDataStorage.worldMatrices},a.Mesh.prototype.thinInstanceRefreshBoundingInfo=function(t=!1,n=!1,a=!1,h=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;let f=this._thinInstanceDataStorage.boundingVectors;if(t||!this.rawBoundingInfo){if(f.length=0,h&&function(t,n,a){let h=t._userThinInstanceBuffersStorage,f=h?.data[i],u=h?.strides[i];if(!f||!u||u<4||!o(t))return!1;let c=t._thinInstanceDataStorage.matrixData;if(!c)return!1;let I={},g=e.TmpVectors.Vector4[0],S=e.TmpVectors.Vector3[1],l=e.TmpVectors.Vector3[2],B=e.TmpVectors.Vector3[3],d=e.TmpVectors.Vector3[4],_=e.TmpVectors.Vector3[5],x=e.TmpVectors.Vector3[6],p=e.TmpVectors.Matrix[2],m=t.geometry?t.geometry.boundingBias:null,D=t.getTotalVertices();S.setAll(1/0),l.setAll(-1/0),B.setAll(1/0),d.setAll(-1/0);for(let n=0;n<t._thinInstanceDataStorage.instancesCount;++n){let r=n*u;g.set(f[r],f[r+1],f[r+2],f[r+3]);let i=t._getData({applyMorph:a,applyBakedVertexAnimation:!0,bakedVertexAnimationSettings:g,updatePositionsArray:!1,cache:I},null,s.VertexBuffer.PositionKind);if(!i)return!1;_.setAll(1/0),x.setAll(-1/0);for(let t=0;t<3*D;t+=3){let e=i[t],n=i[t+1],r=i[t+2];e<_.x&&(_.x=e),n<_.y&&(_.y=n),r<_.z&&(_.z=r),e>x.x&&(x.x=e),n>x.y&&(x.y=n),r>x.z&&(x.z=r)}m&&(_.x-=_.x*m.x+m.y,_.y-=_.y*m.x+m.y,_.z-=_.z*m.x+m.y,x.x+=x.x*m.x+m.y,x.y+=x.y*m.x+m.y,x.z+=x.z*m.x+m.y),S.minimizeInPlace(_),l.maximizeInPlace(x),e.Matrix.FromArrayToRef(c,16*n,p),m?function(t,n,r,a,s){let i=e.TmpVectors.Vector3[7],o=e.TmpVectors.Vector3[8];for(let h=0;h<2;++h)for(let f=0;f<2;++f)for(let u=0;u<2;++u)i.set(h?n.x:t.x,f?n.y:t.y,u?n.z:t.z),e.Vector3.TransformCoordinatesToRef(i,r,o),a.minimizeInPlace(o),s.maximizeInPlace(o)}(_,x,p,B,d):function(t,n,r,a,s){let i=e.TmpVectors.Vector3[7];for(let o=0;o<3*n;o+=3)e.Vector3.TransformCoordinatesFromFloatsToRef(t[o],t[o+1],t[o+2],r,i),a.minimizeInPlace(i),s.maximizeInPlace(i)}(i,D,p,B,d)}if(!isFinite(S.x)||!isFinite(B.x))return!1;t.getBoundingInfo().reConstruct(B,d),t.rawBoundingInfo=new r.BoundingInfo(S,l);var T=t.rawBoundingInfo;n.length=0;for(let t=0;t<T.boundingBox.vectors.length;++t)n.push(T.boundingBox.vectors[t].clone());return t._updateBoundingInfo(),!0}(this,f,a))return;h&&this.bakedVertexAnimationManager?.isEnabled&&o(this)?this.refreshBoundingInfo({applySkeleton:n,applyMorph:a,applyBakedVertexAnimation:!0,updatePositionsArray:!1}):this.refreshBoundingInfo(n,a);let t=this.getBoundingInfo();this.rawBoundingInfo=new r.BoundingInfo(t.minimum,t.maximum)}let u=this.getBoundingInfo(),c=this._thinInstanceDataStorage.matrixData;if(0===f.length)for(let t=0;t<u.boundingBox.vectors.length;++t)f.push(u.boundingBox.vectors[t].clone());e.TmpVectors.Vector3[0].setAll(1/0),e.TmpVectors.Vector3[1].setAll(-1/0);for(let t=0;t<this._thinInstanceDataStorage.instancesCount;++t){e.Matrix.FromArrayToRef(c,16*t,e.TmpVectors.Matrix[0]);for(let t=0;t<f.length;++t)e.Vector3.TransformCoordinatesToRef(f[t],e.TmpVectors.Matrix[0],e.TmpVectors.Vector3[2]),e.TmpVectors.Vector3[0].minimizeInPlace(e.TmpVectors.Vector3[2]),e.TmpVectors.Vector3[1].maximizeInPlace(e.TmpVectors.Vector3[2])}u.reConstruct(e.TmpVectors.Vector3[0],e.TmpVectors.Vector3[1]),this._updateBoundingInfo()},a.Mesh.prototype._thinInstanceRecreateBuffer=function(t,e=!0){"matrix"===t?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",this._thinInstanceDataStorage.matrixData,e)):"previousMatrix"===t?this._scene.needsPreviousWorldMatrices&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",this._thinInstanceDataStorage.previousMatrixData??this._thinInstanceDataStorage.matrixData,e)):(t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[t],t,!e,!1,this._userThinInstanceBuffersStorage.strides[t],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))},a.Mesh.prototype._thinInstanceUpdateBufferSize=function(t,e=1){t===s.VertexBuffer.ColorKind&&(t=s.VertexBuffer.ColorInstanceKind);let n="matrix"===t;if(!n&&(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.strides[t]))return;let r=n?16:this._userThinInstanceBuffersStorage.strides[t],a=n?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[t],i=n?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[t],o=(this._thinInstanceDataStorage.instancesCount+e)*r,h=a;for(;h<o;)h*=2;if(!i||a!=h){if(i){let t=new Float32Array(h);t.set(i,0),i=t}else i=new Float32Array(h);n?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",i,!1),this._thinInstanceDataStorage.matrixData=i,this._thinInstanceDataStorage.matrixBufferSize=h,this._scene.needsPreviousWorldMatrices&&!this._thinInstanceDataStorage.previousMatrixData&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",i,!1))):(this._userThinInstanceBuffersStorage.vertexBuffers[t]?.dispose(),this._userThinInstanceBuffersStorage.data[t]=i,this._userThinInstanceBuffersStorage.sizes[t]=h,this._userThinInstanceBuffersStorage.vertexBuffers[t]=new s.VertexBuffer(this.getEngine(),i,t,!0,!1,r,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[t]))}},a.Mesh.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},a.Mesh.prototype._disposeThinInstanceSpecificData=function(){this._thinInstanceDataStorage?.matrixBuffer&&(this._thinInstanceDataStorage.matrixBuffer.dispose(),this._thinInstanceDataStorage.matrixBuffer=null),this._thinInstanceDataStorage?.previousMatrixBuffer&&(this._thinInstanceDataStorage.previousMatrixBuffer.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null)})}t.s(["RegisterThinInstanceMesh",0,f],68056),f(),t.s([],21758)},27870,t=>{"use strict";t.i(21758),t.i(27480);var e=t.i(68056);t.s(["RegisterThinInstanceMesh",()=>e.RegisterThinInstanceMesh])},5742,t=>{t.v(e=>Promise.all(["static/chunks/0rykrf_vofbad.js"].map(e=>t.l(e))).then(()=>e(12838)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62750,r=>{"use strict";var e=r.i(17884),o=r.i(75105);let a="cachedOperationValue",t="cachedExecutionId";class l extends e.FlowGraphBlock{constructor(r,e){super(e),this.value=this.registerDataOutput("value",r),this.isValid=this.registerDataOutput("isValid",o.RichTypeBoolean)}_updateOutputs(r){let e=r._getExecutionVariable(this,t,-1),o=r._getExecutionVariable(this,a,null);if(null!=o&&e===r.executionId)this.isValid.setValue(!0,r),this.value.setValue(o,r);else try{let e=this._doOperation(r);if(null==e)return void this.isValid.setValue(!1,r);r._setExecutionVariable(this,a,e),r._setExecutionVariable(this,t,r.executionId),this.value.setValue(e,r),this.isValid.setValue(!0,r)}catch(e){this.isValid.setValue(!1,r)}}}r.s(["FlowGraphCachedOperationBlock",0,l])},8871,r=>{"use strict";var e=r.i(62750);class o extends e.FlowGraphCachedOperationBlock{constructor(r,e,o,a,t){super(e,t),this._operation=o,this._className=a,this.a=this.registerDataInput("a",r)}_doOperation(r){return this._operation(this.a.getValue(r))}getClassName(){return this._className}}r.s(["FlowGraphUnaryOperationBlock",0,o])},72192,r=>{"use strict";var e=r.i(62750);class o extends e.FlowGraphCachedOperationBlock{constructor(r,e,o,a,t,l){super(o,l),this._operation=a,this._className=t,this.a=this.registerDataInput("a",r),this.b=this.registerDataInput("b",e)}_doOperation(r){let e=this.a.getValue(r),o=this.b.getValue(r);return this._operation(e,o)}getClassName(){return this._className}}r.s(["FlowGraphBinaryOperationBlock",0,o])},10515,r=>{"use strict";var e=r.i(75105),o=r.i(72192),a=r.i(62750);class t extends a.FlowGraphCachedOperationBlock{constructor(r,e,o,a){super(r,a),this._operation=e,this._className=o}_doOperation(r){return this._operation(r)}getClassName(){return this._className}}var l=r.i(69400),p=r.i(8871),c=a;class s extends c.FlowGraphCachedOperationBlock{constructor(r,e,o,a,t,l,p){super(a,p),this._operation=t,this._className=l,this.a=this.registerDataInput("a",r),this.b=this.registerDataInput("b",e),this.c=this.registerDataInput("c",o)}_doOperation(r){return this._operation(this.a.getValue(r),this.b.getValue(r),this.c.getValue(r))}getClassName(){return this._className}}var i=r.i(32304),h=r.i(15356),n=r.i(79105),u=r.i(44520);class y extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(r,e)=>this._polymorphicAdd(r,e),"FlowGraphAddBlock",r)}_polymorphicAdd(r,e){let o=(0,n._GetClassNameOf)(r),a=(0,n._GetClassNameOf)(e);if((0,n._AreSameVectorOrQuaternionClass)(o,a)||(0,n._AreSameMatrixClass)(o,a)||(0,n._AreSameIntegerClass)(o,a))return r.add(e);if("Quaternion"===o||"Vector4"===a)return new l.Vector4(r.x,r.y,r.z,r.w).addInPlace(e);if("Vector4"===o||"Quaternion"===a)return r.add(e);if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof e)throw Error("Cannot add different types of numbers.");return(0,n.getNumericValue)(r)+(0,n.getNumericValue)(e)}}class w extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(r,e)=>this._polymorphicSubtract(r,e),"FlowGraphSubtractBlock",r)}_polymorphicSubtract(r,e){let o=(0,n._GetClassNameOf)(r),a=(0,n._GetClassNameOf)(e);if((0,n._AreSameVectorOrQuaternionClass)(o,a)||(0,n._AreSameIntegerClass)(o,a)||(0,n._AreSameMatrixClass)(o,a))return r.subtract(e);if("Quaternion"===o||"Vector4"===a)return new l.Vector4(r.x,r.y,r.z,r.w).subtractInPlace(e);if("Vector4"===o||"Quaternion"===a)return r.subtract(e);if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof e)throw Error("Cannot add different types of numbers.");return(0,n.getNumericValue)(r)-(0,n.getNumericValue)(e)}}class G extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(r,e)=>this._polymorphicMultiply(r,e),"FlowGraphMultiplyBlock",r)}_polymorphicMultiply(r,e){let o=(0,n._GetClassNameOf)(r),a=(0,n._GetClassNameOf)(e);if((0,n._AreSameVectorOrQuaternionClass)(o,a)||(0,n._AreSameIntegerClass)(o,a))return r.multiply(e);if("Quaternion"===o||"Vector4"===a)return new l.Vector4(r.x,r.y,r.z,r.w).multiplyInPlace(e);if("Vector4"===o||"Quaternion"===a)return r.multiply(e);if((0,n._AreSameMatrixClass)(o,a))if(!this.config?.useMatrixPerComponent)return e.multiply(r);else{let a=r.m;for(let r=0;r<a.length;r++)a[r]*=e.m[r];return"Matrix2D"===o?new h.FlowGraphMatrix2D(a):"Matrix3D"===o?new h.FlowGraphMatrix3D(a):l.Matrix.FromArray(a)}if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof e)throw Error("Cannot add different types of numbers.");return(0,n.getNumericValue)(r)*(0,n.getNumericValue)(e)}}class F extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(0,e.getRichTypeByFlowGraphType)(r?.type),(r,e)=>this._polymorphicDivide(r,e),"FlowGraphDivideBlock",r)}_polymorphicDivide(r,e){let o=(0,n._GetClassNameOf)(r),a=(0,n._GetClassNameOf)(e);if((0,n._AreSameVectorOrQuaternionClass)(o,a)||(0,n._AreSameIntegerClass)(o,a))return r.divide(e);if("Quaternion"===o||"Quaternion"===a){let o=r.clone();return o.x/=e.x,o.y/=e.y,o.z/=e.z,o.w/=e.w,o}if("Quaternion"===o||"Vector4"===a)return new l.Vector4(r.x,r.y,r.z,r.w).divideInPlace(e);if("Vector4"===o||"Quaternion"===a)return r.divide(e);if((0,n._AreSameMatrixClass)(o,a))if(!this.config?.useMatrixPerComponent)return r.divide(e);else{let a=r.m;for(let r=0;r<a.length;r++)a[r]/=e.m[r];return"Matrix2D"===o?new h.FlowGraphMatrix2D(a):"Matrix3D"===o?new h.FlowGraphMatrix3D(a):l.Matrix.FromArray(a)}else{if(this.config?.preventIntegerFloatArithmetic&&typeof r!=typeof e)throw Error("Cannot add different types of numbers.");return(0,n.getNumericValue)(r)/(0,n.getNumericValue)(e)}}}class B extends t{constructor(r){super(e.RichTypeNumber,r=>this._random(r),"FlowGraphRandomBlock",r),this.min=this.registerDataInput("min",e.RichTypeNumber,r?.min??0),this.max=this.registerDataInput("max",e.RichTypeNumber,r?.max??1),r?.seed&&(this._seed=r.seed)}_isSeed(r=this._seed){return void 0!==r}_getRandomValue(){if(this._isSeed(this._seed)){let r=1e4*Math.sin(this._seed++);return r-Math.floor(r)}return Math.random()}_random(r){let e=this.min.getValue(r),o=this.max.getValue(r);return this._getRandomValue()*(o-e)+e}}class k extends t{constructor(r){super(e.RichTypeNumber,()=>Math.E,"FlowGraphEBlock",r)}}class m extends t{constructor(r){super(e.RichTypeNumber,()=>Math.PI,"FlowGraphPIBlock",r)}}class g extends t{constructor(r){super(e.RichTypeNumber,()=>1/0,"FlowGraphInfBlock",r)}}class R extends t{constructor(r){super(e.RichTypeNumber,()=>NaN,"FlowGraphNaNBlock",r)}}function T(r,e){switch((0,n._GetClassNameOf)(r)){case"FlowGraphInteger":return new i.FlowGraphInteger(e(r.value));case"Vector2":return new l.Vector2(e(r.x),e(r.y));case"Vector3":return new l.Vector3(e(r.x),e(r.y),e(r.z));case"Vector4":return new l.Vector4(e(r.x),e(r.y),e(r.z),e(r.w));case"Quaternion":return new l.Quaternion(e(r.x),e(r.y),e(r.z),e(r.w));case"Matrix":return l.Matrix.FromArray(r.m.map(e));case"Matrix2D":return new h.FlowGraphMatrix2D(r.m.map(e));case"Matrix3D":return new h.FlowGraphMatrix3D(r.m.map(e));default:return e(r)}}class d extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicAbs(r),"FlowGraphAbsBlock",r)}_polymorphicAbs(r){return T(r,Math.abs)}}class _ extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicSign(r),"FlowGraphSignBlock",r)}_polymorphicSign(r){return T(r,Math.sign)}}class x extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicTrunc(r),"FlowGraphTruncBlock",r)}_polymorphicTrunc(r){return T(r,Math.trunc)}}class A extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicFloor(r),"FlowGraphFloorBlock",r)}_polymorphicFloor(r){return T(r,Math.floor)}}class f extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicCeiling(r),"FlowGraphCeilBlock",r)}_polymorphicCeiling(r){return T(r,Math.ceil)}}class C extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicRound(r),"FlowGraphRoundBlock",r)}_polymorphicRound(r){return T(r,r=>r<0&&this.config?.roundHalfAwayFromZero?-Math.round(-r):Math.round(r))}}class N extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicFraction(r),"FlowGraphFractBlock",r)}_polymorphicFraction(r){return T(r,r=>r-Math.floor(r))}}class O extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicNeg(r),"FlowGraphNegationBlock",r)}_polymorphicNeg(r){return T(r,r=>-r)}}function M(r,e,o){switch((0,n._GetClassNameOf)(r)){case"FlowGraphInteger":return new i.FlowGraphInteger(o(r.value,e.value));case"Vector2":return new l.Vector2(o(r.x,e.x),o(r.y,e.y));case"Vector3":return new l.Vector3(o(r.x,e.x),o(r.y,e.y),o(r.z,e.z));case"Vector4":return new l.Vector4(o(r.x,e.x),o(r.y,e.y),o(r.z,e.z),o(r.w,e.w));case"Quaternion":return new l.Quaternion(o(r.x,e.x),o(r.y,e.y),o(r.z,e.z),o(r.w,e.w));case"Matrix":return l.Matrix.FromArray(r.m.map((r,a)=>o(r,e.m[a])));case"Matrix2D":return new h.FlowGraphMatrix2D(r.m.map((r,a)=>o(r,e.m[a])));case"Matrix3D":return new h.FlowGraphMatrix3D(r.m.map((r,a)=>o(r,e.m[a])));default:return o((0,n.getNumericValue)(r),(0,n.getNumericValue)(e))}}class b extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e)=>this._polymorphicRemainder(r,e),"FlowGraphModuloBlock",r)}_polymorphicRemainder(r,e){return M(r,e,(r,e)=>r%e)}}class I extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e)=>this._polymorphicMin(r,e),"FlowGraphMinBlock",r)}_polymorphicMin(r,e){return M(r,e,Math.min)}}class V extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e)=>this._polymorphicMax(r,e),"FlowGraphMaxBlock",r)}_polymorphicMax(r,e){return M(r,e,Math.max)}}function S(r,e,o){return Math.min(Math.max(r,Math.min(e,o)),Math.max(e,o))}function v(r,e,o,a){switch((0,n._GetClassNameOf)(r)){case"FlowGraphInteger":return new i.FlowGraphInteger(a(r.value,e.value,o.value));case"Vector2":return new l.Vector2(a(r.x,e.x,o.x),a(r.y,e.y,o.y));case"Vector3":return new l.Vector3(a(r.x,e.x,o.x),a(r.y,e.y,o.y),a(r.z,e.z,o.z));case"Vector4":return new l.Vector4(a(r.x,e.x,o.x),a(r.y,e.y,o.y),a(r.z,e.z,o.z),a(r.w,e.w,o.w));case"Quaternion":return new l.Quaternion(a(r.x,e.x,o.x),a(r.y,e.y,o.y),a(r.z,e.z,o.z),a(r.w,e.w,o.w));case"Matrix":return l.Matrix.FromArray(r.m.map((r,t)=>a(r,e.m[t],o.m[t])));case"Matrix2D":return new h.FlowGraphMatrix2D(r.m.map((r,t)=>a(r,e.m[t],o.m[t])));case"Matrix3D":return new h.FlowGraphMatrix3D(r.m.map((r,t)=>a(r,e.m[t],o.m[t])));default:return a((0,n.getNumericValue)(r),(0,n.getNumericValue)(e),(0,n.getNumericValue)(o))}}class D extends s{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e,o)=>this._polymorphicClamp(r,e,o),"FlowGraphClampBlock",r)}_polymorphicClamp(r,e,o){return v(r,e,o,S)}}function E(r){return Math.min(Math.max(r,0),1)}class L extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicSaturate(r),"FlowGraphSaturateBlock",r)}_polymorphicSaturate(r){return T(r,E)}}function U(r,e,o){return(1-o)*r+o*e}class q extends s{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e,o)=>this._polymorphicInterpolate(r,e,o),"FlowGraphMathInterpolationBlock",r)}_polymorphicInterpolate(r,e,o){return v(r,e,o,U)}}class z extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeBoolean,(r,e)=>this._polymorphicEq(r,e),"FlowGraphEqualityBlock",r)}_polymorphicEq(r,e){let o=(0,n._GetClassNameOf)(r),a=(0,n._GetClassNameOf)(e);return typeof r==typeof e&&((0,n._AreSameVectorOrQuaternionClass)(o,a)||(0,n._AreSameMatrixClass)(o,a)||(0,n._AreSameIntegerClass)(o,a)?r.equals(e):r===e)}}function P(r,e,o){if((0,n.isNumeric)(r)&&(0,n.isNumeric)(e))return o((0,n.getNumericValue)(r),(0,n.getNumericValue)(e));throw Error(`Cannot compare ${r} and ${e}`)}class Q extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeBoolean,(r,e)=>this._polymorphicLessThan(r,e),"FlowGraphLessThanBlock",r)}_polymorphicLessThan(r,e){return P(r,e,(r,e)=>r<e)}}class $ extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeBoolean,(r,e)=>this._polymorphicLessThanOrEqual(r,e),"FlowGraphLessThanOrEqualBlock",r)}_polymorphicLessThanOrEqual(r,e){return P(r,e,(r,e)=>r<=e)}}class Z extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeBoolean,(r,e)=>this._polymorphicGreaterThan(r,e),"FlowGraphGreaterThanBlock",r)}_polymorphicGreaterThan(r,e){return P(r,e,(r,e)=>r>e)}}class j extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeBoolean,(r,e)=>this._polymorphicGreaterThanOrEqual(r,e),"FlowGraphGreaterThanOrEqualBlock",r)}_polymorphicGreaterThanOrEqual(r,e){return P(r,e,(r,e)=>r>=e)}}class X extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeBoolean,r=>this._polymorphicIsNan(r),"FlowGraphIsNaNBlock",r)}_polymorphicIsNan(r){if((0,n.isNumeric)(r,!0))return isNaN((0,n.getNumericValue)(r));throw Error(`Cannot get NaN of ${r}`)}}class K extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeBoolean,r=>this._polymorphicIsInf(r),"FlowGraphIsInfBlock",r)}_polymorphicIsInf(r){if((0,n.isNumeric)(r))return!isFinite((0,n.getNumericValue)(r));throw Error(`Cannot get isInf of ${r}`)}}class H extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicDegToRad(r),"FlowGraphDegToRadBlock",r)}_degToRad(r){return r*Math.PI/180}_polymorphicDegToRad(r){return T(r,this._degToRad)}}class J extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicRadToDeg(r),"FlowGraphRadToDegBlock",r)}_radToDeg(r){return 180*r/Math.PI}_polymorphicRadToDeg(r){return T(r,this._radToDeg)}}class W extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicSin(r),"FlowGraphSinBlock",r)}_polymorphicSin(r){return T(r,Math.sin)}}class Y extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicCos(r),"FlowGraphCosBlock",r)}_polymorphicCos(r){return T(r,Math.cos)}}class rr extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicTan(r),"FlowGraphTanBlock",r)}_polymorphicTan(r){return T(r,Math.tan)}}class re extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicAsin(r),"FlowGraphASinBlock",r)}_polymorphicAsin(r){return T(r,Math.asin)}}class ro extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicAcos(r),"FlowGraphACosBlock",r)}_polymorphicAcos(r){return T(r,Math.acos)}}class ra extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeNumber,e.RichTypeNumber,r=>this._polymorphicAtan(r),"FlowGraphATanBlock",r)}_polymorphicAtan(r){return T(r,Math.atan)}}class rt extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,e.RichTypeAny,(r,e)=>this._polymorphicAtan2(r,e),"FlowGraphATan2Block",r)}_polymorphicAtan2(r,e){return M(r,e,Math.atan2)}}class rl extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicSinh(r),"FlowGraphSinhBlock",r)}_polymorphicSinh(r){return T(r,Math.sinh)}}class rp extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicCosh(r),"FlowGraphCoshBlock",r)}_polymorphicCosh(r){return T(r,Math.cosh)}}class rc extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeAny,r=>this._polymorphicTanh(r),"FlowGraphTanhBlock",r)}_polymorphicTanh(r){return T(r,Math.tanh)}}class rs extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicAsinh(r),"FlowGraphASinhBlock",r)}_polymorphicAsinh(r){return T(r,Math.asinh)}}class ri extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicAcosh(r),"FlowGraphACoshBlock",r)}_polymorphicAcosh(r){return T(r,Math.acosh)}}class rh extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicAtanh(r),"FlowGraphATanhBlock",r)}_polymorphicAtanh(r){return T(r,Math.atanh)}}class rn extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicExp(r),"FlowGraphExponentialBlock",r)}_polymorphicExp(r){return T(r,Math.exp)}}class ru extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicLog(r),"FlowGraphLogBlock",r)}_polymorphicLog(r){return T(r,Math.log)}}class ry extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicLog2(r),"FlowGraphLog2Block",r)}_polymorphicLog2(r){return T(r,Math.log2)}}class rw extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicLog10(r),"FlowGraphLog10Block",r)}_polymorphicLog10(r){return T(r,Math.log10)}}class rG extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicSqrt(r),"FlowGraphSquareRootBlock",r)}_polymorphicSqrt(r){return T(r,Math.sqrt)}}class rF extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,r=>this._polymorphicCubeRoot(r),"FlowGraphCubeRootBlock",r)}_polymorphicCubeRoot(r){return T(r,Math.cbrt)}}class rB extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeAny,e.RichTypeNumber,e.RichTypeNumber,(r,e)=>this._polymorphicPow(r,e),"FlowGraphPowerBlock",r)}_polymorphicPow(r,e){return M(r,e,Math.pow)}}class rk extends p.FlowGraphUnaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),r=>"boolean"==typeof r?!r:"number"==typeof r?~r:new i.FlowGraphInteger(~r.value),"FlowGraphBitwiseNotBlock",r)}}class rm extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(r,e)=>{if("boolean"==typeof r&&"boolean"==typeof e)return r&&e;if("number"==typeof r&&"number"==typeof e)return r&e;if("object"==typeof r&&"object"==typeof e)return new i.FlowGraphInteger(r.value&e.value);throw Error(`Cannot perform bitwise AND on ${r} and ${e}`)},"FlowGraphBitwiseAndBlock",r)}}class rg extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(r,e)=>{if("boolean"==typeof r&&"boolean"==typeof e)return r||e;if("number"==typeof r&&"number"==typeof e)return r|e;if("object"==typeof r&&"object"==typeof e)return new i.FlowGraphInteger(r.value|e.value);throw Error(`Cannot perform bitwise OR on ${r} and ${e}`)},"FlowGraphBitwiseOrBlock",r)}}class rR extends o.FlowGraphBinaryOperationBlock{constructor(r){super((0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(0,e.getRichTypeByFlowGraphType)(r?.valueType||"FlowGraphInteger"),(r,e)=>{if("boolean"==typeof r&&"boolean"==typeof e)return r!==e;if("number"==typeof r&&"number"==typeof e)return r^e;if("object"==typeof r&&"object"==typeof e)return new i.FlowGraphInteger(r.value^e.value);throw Error(`Cannot perform bitwise XOR on ${r} and ${e}`)},"FlowGraphBitwiseXorBlock",r)}}class rT extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,(r,e)=>new i.FlowGraphInteger(r.value<<e.value),"FlowGraphBitwiseLeftShiftBlock",r)}}class rd extends o.FlowGraphBinaryOperationBlock{constructor(r){super(e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,(r,e)=>new i.FlowGraphInteger(r.value>>e.value),"FlowGraphBitwiseRightShiftBlock",r)}}class r_ extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,r=>new i.FlowGraphInteger(Math.clz32(r.value)),"FlowGraphLeadingZerosBlock",r)}}class rx extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,r=>new i.FlowGraphInteger(r.value?31-Math.clz32(r.value&-r.value):32),"FlowGraphTrailingZerosBlock",r)}}class rA extends p.FlowGraphUnaryOperationBlock{constructor(r){super(e.RichTypeFlowGraphInteger,e.RichTypeFlowGraphInteger,r=>new i.FlowGraphInteger(function(r){let e=0;for(;r;)e+=1&r,r>>=1;return e}(r.value)),"FlowGraphOneBitsCounterBlock",r)}}let rf=!1;function rC(){rf||(rf=!0,(0,u.RegisterClass)("FlowGraphAddBlock",y),(0,u.RegisterClass)("FlowGraphSubtractBlock",w),(0,u.RegisterClass)("FlowGraphMultiplyBlock",G),(0,u.RegisterClass)("FlowGraphDivideBlock",F),(0,u.RegisterClass)("FlowGraphRandomBlock",B),(0,u.RegisterClass)("FlowGraphEBlock",k),(0,u.RegisterClass)("FlowGraphPIBlock",m),(0,u.RegisterClass)("FlowGraphInfBlock",g),(0,u.RegisterClass)("FlowGraphNaNBlock",R),(0,u.RegisterClass)("FlowGraphAbsBlock",d),(0,u.RegisterClass)("FlowGraphSignBlock",_),(0,u.RegisterClass)("FlowGraphTruncBlock",x),(0,u.RegisterClass)("FlowGraphFloorBlock",A),(0,u.RegisterClass)("FlowGraphCeilBlock",f),(0,u.RegisterClass)("FlowGraphRoundBlock",C),(0,u.RegisterClass)("FlowGraphFractBlock",N),(0,u.RegisterClass)("FlowGraphNegationBlock",O),(0,u.RegisterClass)("FlowGraphModuloBlock",b),(0,u.RegisterClass)("FlowGraphMinBlock",I),(0,u.RegisterClass)("FlowGraphMaxBlock",V),(0,u.RegisterClass)("FlowGraphClampBlock",D),(0,u.RegisterClass)("FlowGraphSaturateBlock",L),(0,u.RegisterClass)("FlowGraphMathInterpolationBlock",q),(0,u.RegisterClass)("FlowGraphEqualityBlock",z),(0,u.RegisterClass)("FlowGraphLessThanBlock",Q),(0,u.RegisterClass)("FlowGraphLessThanOrEqualBlock",$),(0,u.RegisterClass)("FlowGraphGreaterThanBlock",Z),(0,u.RegisterClass)("FlowGraphGreaterThanOrEqualBlock",j),(0,u.RegisterClass)("FlowGraphIsNaNBlock",X),(0,u.RegisterClass)("FlowGraphIsInfBlock",K),(0,u.RegisterClass)("FlowGraphDegToRadBlock",H),(0,u.RegisterClass)("FlowGraphRadToDegBlock",J),(0,u.RegisterClass)("FlowGraphASinBlock",re),(0,u.RegisterClass)("FlowGraphACosBlock",ro),(0,u.RegisterClass)("FlowGraphATanBlock",ra),(0,u.RegisterClass)("FlowGraphATan2Block",rt),(0,u.RegisterClass)("FlowGraphSinhBlock",rl),(0,u.RegisterClass)("FlowGraphCoshBlock",rp),(0,u.RegisterClass)("FlowGraphTanhBlock",rc),(0,u.RegisterClass)("FlowGraphASinhBlock",rs),(0,u.RegisterClass)("FlowGraphACoshBlock",ri),(0,u.RegisterClass)("FlowGraphATanhBlock",rh),(0,u.RegisterClass)("FlowGraphExponentialBlock",rn),(0,u.RegisterClass)("FlowGraphLogBlock",ru),(0,u.RegisterClass)("FlowGraphLog2Block",ry),(0,u.RegisterClass)("FlowGraphLog10Block",rw),(0,u.RegisterClass)("FlowGraphSquareRootBlock",rG),(0,u.RegisterClass)("FlowGraphCubeRootBlock",rF),(0,u.RegisterClass)("FlowGraphPowerBlock",rB),(0,u.RegisterClass)("FlowGraphBitwiseNotBlock",rk),(0,u.RegisterClass)("FlowGraphBitwiseAndBlock",rm),(0,u.RegisterClass)("FlowGraphBitwiseOrBlock",rg),(0,u.RegisterClass)("FlowGraphBitwiseXorBlock",rR),(0,u.RegisterClass)("FlowGraphBitwiseLeftShiftBlock",rT),(0,u.RegisterClass)("FlowGraphBitwiseRightShiftBlock",rd),(0,u.RegisterClass)("FlowGraphLeadingZerosBlock",r_),(0,u.RegisterClass)("FlowGraphTrailingZerosBlock",rx),(0,u.RegisterClass)("FlowGraphOneBitsCounterBlock",rA))}r.s(["FlowGraphAbsBlock",0,d,"FlowGraphAcosBlock",0,ro,"FlowGraphAcoshBlock",0,ri,"FlowGraphAddBlock",0,y,"FlowGraphAsinBlock",0,re,"FlowGraphAsinhBlock",0,rs,"FlowGraphAtan2Block",0,rt,"FlowGraphAtanBlock",0,ra,"FlowGraphAtanhBlock",0,rh,"FlowGraphBitwiseAndBlock",0,rm,"FlowGraphBitwiseLeftShiftBlock",0,rT,"FlowGraphBitwiseNotBlock",0,rk,"FlowGraphBitwiseOrBlock",0,rg,"FlowGraphBitwiseRightShiftBlock",0,rd,"FlowGraphBitwiseXorBlock",0,rR,"FlowGraphCeilBlock",0,f,"FlowGraphClampBlock",0,D,"FlowGraphCosBlock",0,Y,"FlowGraphCoshBlock",0,rp,"FlowGraphCubeRootBlock",0,rF,"FlowGraphDegToRadBlock",0,H,"FlowGraphDivideBlock",0,F,"FlowGraphEBlock",0,k,"FlowGraphEqualityBlock",0,z,"FlowGraphExpBlock",0,rn,"FlowGraphFloorBlock",0,A,"FlowGraphFractionBlock",0,N,"FlowGraphGreaterThanBlock",0,Z,"FlowGraphGreaterThanOrEqualBlock",0,j,"FlowGraphInfBlock",0,g,"FlowGraphIsInfinityBlock",0,K,"FlowGraphIsNanBlock",0,X,"FlowGraphLeadingZerosBlock",0,r_,"FlowGraphLessThanBlock",0,Q,"FlowGraphLessThanOrEqualBlock",0,$,"FlowGraphLog10Block",0,rw,"FlowGraphLog2Block",0,ry,"FlowGraphLogBlock",0,ru,"FlowGraphMathInterpolationBlock",0,q,"FlowGraphMaxBlock",0,V,"FlowGraphMinBlock",0,I,"FlowGraphModuloBlock",0,b,"FlowGraphMultiplyBlock",0,G,"FlowGraphNaNBlock",0,R,"FlowGraphNegationBlock",0,O,"FlowGraphOneBitsCounterBlock",0,rA,"FlowGraphPiBlock",0,m,"FlowGraphPowerBlock",0,rB,"FlowGraphRadToDegBlock",0,J,"FlowGraphRandomBlock",0,B,"FlowGraphRoundBlock",0,C,"FlowGraphSaturateBlock",0,L,"FlowGraphSignBlock",0,_,"FlowGraphSinBlock",0,W,"FlowGraphSinhBlock",0,rl,"FlowGraphSquareRootBlock",0,rG,"FlowGraphSubtractBlock",0,w,"FlowGraphTanBlock",0,rr,"FlowGraphTanhBlock",0,rc,"FlowGraphTrailingZerosBlock",0,rx,"FlowGraphTruncBlock",0,x,"RegisterFlowGraphMathBlocks",0,rC],54457),rC(),r.s([],63561),r.i(63561),r.i(54457),r.s(["FlowGraphAbsBlock",0,d,"FlowGraphAcosBlock",0,ro,"FlowGraphAcoshBlock",0,ri,"FlowGraphAddBlock",0,y,"FlowGraphAsinBlock",0,re,"FlowGraphAsinhBlock",0,rs,"FlowGraphAtan2Block",0,rt,"FlowGraphAtanBlock",0,ra,"FlowGraphAtanhBlock",0,rh,"FlowGraphBitwiseAndBlock",0,rm,"FlowGraphBitwiseLeftShiftBlock",0,rT,"FlowGraphBitwiseNotBlock",0,rk,"FlowGraphBitwiseOrBlock",0,rg,"FlowGraphBitwiseRightShiftBlock",0,rd,"FlowGraphBitwiseXorBlock",0,rR,"FlowGraphCeilBlock",0,f,"FlowGraphClampBlock",0,D,"FlowGraphCosBlock",0,Y,"FlowGraphCoshBlock",0,rp,"FlowGraphCubeRootBlock",0,rF,"FlowGraphDegToRadBlock",0,H,"FlowGraphDivideBlock",0,F,"FlowGraphEBlock",0,k,"FlowGraphEqualityBlock",0,z,"FlowGraphExpBlock",0,rn,"FlowGraphFloorBlock",0,A,"FlowGraphFractionBlock",0,N,"FlowGraphGreaterThanBlock",0,Z,"FlowGraphGreaterThanOrEqualBlock",0,j,"FlowGraphInfBlock",0,g,"FlowGraphIsInfinityBlock",0,K,"FlowGraphIsNanBlock",0,X,"FlowGraphLeadingZerosBlock",0,r_,"FlowGraphLessThanBlock",0,Q,"FlowGraphLessThanOrEqualBlock",0,$,"FlowGraphLog10Block",0,rw,"FlowGraphLog2Block",0,ry,"FlowGraphLogBlock",0,ru,"FlowGraphMathInterpolationBlock",0,q,"FlowGraphMaxBlock",0,V,"FlowGraphMinBlock",0,I,"FlowGraphModuloBlock",0,b,"FlowGraphMultiplyBlock",0,G,"FlowGraphNaNBlock",0,R,"FlowGraphNegationBlock",0,O,"FlowGraphOneBitsCounterBlock",0,rA,"FlowGraphPiBlock",0,m,"FlowGraphPowerBlock",0,rB,"FlowGraphRadToDegBlock",0,J,"FlowGraphRandomBlock",0,B,"FlowGraphRoundBlock",0,C,"FlowGraphSaturateBlock",0,L,"FlowGraphSignBlock",0,_,"FlowGraphSinBlock",0,W,"FlowGraphSinhBlock",0,rl,"FlowGraphSquareRootBlock",0,rG,"FlowGraphSubtractBlock",0,w,"FlowGraphTanBlock",0,rr,"FlowGraphTanhBlock",0,rc,"FlowGraphTrailingZerosBlock",0,rx,"FlowGraphTruncBlock",0,x],10515)}]);