@uptimizr/dashboard 0.4.5 → 0.4.7
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.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +19 -5
- package/out/__next._full.txt +11 -11
- package/out/__next._tree.txt +2 -2
- package/out/_next/static/chunks/{3kalvwsf11-ss.js → 0-_j1khfoib6l.js} +119 -115
- package/out/_next/static/chunks/{0-tzsd_n-ywom.js → 005bbq_px7lke.js} +2 -2
- package/out/_next/static/chunks/00fbhtmui-yxg.js +1 -0
- package/out/_next/static/chunks/017pn-pen381_.js +1 -0
- package/out/_next/static/chunks/01vov6inx1zzt.js +1 -0
- package/out/_next/static/chunks/{3d76e_yd8l_0x.js → 02qk_wmkf9at-.js} +211 -211
- package/out/_next/static/chunks/03bd5plut08tg.js +1 -0
- package/out/_next/static/chunks/03dwfqmo73w_z.js +1 -0
- package/out/_next/static/chunks/03sn4419dam-h.js +5 -0
- package/out/_next/static/chunks/05ere0-228syf.js +1 -0
- package/out/_next/static/chunks/{2g_1ov-0j2kwd.js → 05h8u5lrypn5m.js} +1 -1
- package/out/_next/static/chunks/05s0t-besbvu1.css +3 -0
- package/out/_next/static/chunks/{3go-mst7n3udd.js → 05v-nubi896jg.js} +1 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +1 -0
- package/out/_next/static/chunks/{1t2exh89lnazc.js → 060iult6f68_e.js} +504 -571
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +1 -0
- package/out/_next/static/chunks/0_v2luu_qmeid.js +1 -0
- package/out/_next/static/chunks/0ai0zgbgjqb92.js +1 -0
- package/out/_next/static/chunks/0boov9mwycanf.js +1 -0
- package/out/_next/static/chunks/{0av6n_6q6kzo3.js → 0btmk0wmekl02.js} +2 -2
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +1 -0
- package/out/_next/static/chunks/0dmrdrwtd093b.js +1 -0
- package/out/_next/static/chunks/0e1jfrmioeuws.js +1 -0
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +1 -0
- package/out/_next/static/chunks/0es97pusfxupl.js +1 -0
- package/out/_next/static/chunks/{05uqfgf-hh-p5.js → 0fd-0i1yt23kz.js} +1 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +1 -0
- package/out/_next/static/chunks/0fxhc24djjcgq.js +1 -0
- package/out/_next/static/chunks/0gf-ztg86zd80.js +1 -0
- package/out/_next/static/chunks/{380ivzcfb4o_3.js → 0grasqqf5dw7r.js} +2 -2
- package/out/_next/static/chunks/{0okbyggxe6mx5.js → 0hajwk2yd-rwr.js} +1 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +1 -0
- package/out/_next/static/chunks/{1vmpltnr0cyos.js → 0j74ipw4fps-n.js} +1 -1
- package/out/_next/static/chunks/{03zip1uidm6x9.js → 0kj-vckdn7t5p.js} +1 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +1 -0
- package/out/_next/static/chunks/0lep3_bqwfuin.js +1 -0
- package/out/_next/static/chunks/0mp0jh1gj7290.js +1 -0
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +1 -0
- package/out/_next/static/chunks/0nhljhguceh66.js +1 -0
- package/out/_next/static/chunks/0p6z73afb9dj2.js +1 -0
- package/out/_next/static/chunks/0p9zfmidzqkps.js +1 -0
- package/out/_next/static/chunks/0q75860p8u_ii.js +1 -0
- package/out/_next/static/chunks/{0-0hui1_v3h8b.js → 0rracz73p38mo.js} +26 -23
- package/out/_next/static/chunks/{3z4suna4kq4j5.js → 0sw-8gxbg4x0l.js} +568 -569
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +1 -0
- package/out/_next/static/chunks/0thw099xk3_0p.js +3 -0
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +1 -0
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +31 -0
- package/out/_next/static/chunks/0ulufxnsrou61.js +1 -0
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +2 -0
- package/out/_next/static/chunks/0xvrfvur0p534.js +1 -0
- package/out/_next/static/chunks/{35aagg46wp139.js → 0ybs1u66q26su.js} +1 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +1 -0
- package/out/_next/static/chunks/{29gv2swsp7tzu.js → 0z004fn14pbcu.js} +1 -1
- package/out/_next/static/chunks/{2z9mdtudj8crz.js → 0z9erbl3llr_b.js} +226 -224
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +1 -0
- package/out/_next/static/chunks/0zqgq0lwtz9tn.js +1 -0
- package/out/_next/static/chunks/1-ogak5u00kwa.js +1 -0
- package/out/_next/static/chunks/{1ng-fqh2_n984.js → 10_5p5-xf2aoo.js} +1 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +1 -0
- package/out/_next/static/chunks/11km5p4gd0ut4.js +1 -0
- package/out/_next/static/chunks/120rl4l29q9xs.js +1 -0
- package/out/_next/static/chunks/{1ho02fc091nj2.js → 129m5i93ltoym.js} +1 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +1 -0
- package/out/_next/static/chunks/{3n-7bcmfbh299.js → 13zcn4lv0qj76.js} +11 -11
- package/out/_next/static/chunks/15jlgfcaeaki9.js +1 -0
- package/out/_next/static/chunks/{1ux1rpe-n1mai.js → 15o4_2t-l3rj5.js} +1 -1
- package/out/_next/static/chunks/{00o9hr_3hd0r8.js → 175st2ogkg_1o.js} +1 -1
- package/out/_next/static/chunks/19rsodtu91ja_.js +1 -0
- package/out/_next/static/chunks/1a2ouhup611bz.js +1 -0
- package/out/_next/static/chunks/{1solqr18og2ot.js → 1by60_b14x-3o.js} +1 -1
- package/out/_next/static/chunks/1cyq7i39885sl.js +1 -0
- package/out/_next/static/chunks/1d9it6yocgt54.js +1 -0
- package/out/_next/static/chunks/1dp1s1t-y7gal.js +1 -0
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +1 -0
- package/out/_next/static/chunks/{32vaw89wdwv5_.js → 1dt30s_sp8415.js} +1 -1
- package/out/_next/static/chunks/{1t7nl8rx7mabd.js → 1e8_jl2cxd3rp.js} +576 -576
- package/out/_next/static/chunks/1f1rek_fxk3of.js +1 -0
- package/out/_next/static/chunks/1f2mna0k5efeq.js +1 -0
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +1 -0
- package/out/_next/static/chunks/1gr35qeguuws0.js +1 -0
- package/out/_next/static/chunks/{0g2wngc6oe7fd.js → 1gttu-n9am66k.js} +255 -253
- package/out/_next/static/chunks/1imi0xwi9hd99.js +1 -0
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +1 -0
- package/out/_next/static/chunks/{17aahvhpls1l7.js → 1l_3oidssbhns.js} +298 -231
- package/out/_next/static/chunks/1m9zc5gm-327d.js +112 -0
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +3 -0
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +1 -0
- package/out/_next/static/chunks/1nix_lulkpklo.js +1 -0
- package/out/_next/static/chunks/{141tngxsk32hq.js → 1ntqovuz2c217.js} +1 -1
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +1 -0
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +1 -0
- package/out/_next/static/chunks/{2zpn7010iqgsy.js → 1q4lkgxfnqnew.js} +1 -1
- package/out/_next/static/chunks/{2khh_pmm224k5.js → 1qg1l7t00nyib.js} +97 -300
- package/out/_next/static/chunks/{1qxhgauuomthl.js → 1rcdimhu0qhlu.js} +407 -407
- package/out/_next/static/chunks/1rlfg62jxqj3z.js +1 -0
- package/out/_next/static/chunks/1ses023uud001.js +1 -0
- package/out/_next/static/chunks/1t5oynmttpfsw.js +1 -0
- package/out/_next/static/chunks/{25gf6xn9u1c57.js → 1t9i20i5-f8ze.js} +1 -1
- package/out/_next/static/chunks/{2h5nvlgky7fpa.js → 1tgj55b305g4h.js} +1 -1
- package/out/_next/static/chunks/{255knovck7pv2.js → 1u8snlm6a7uhi.js} +4 -4
- package/out/_next/static/chunks/{04_3ri5emyfcu.js → 1ug4k-1zhr63a.js} +1 -1
- package/out/_next/static/chunks/{3-_08i4_7yhno.js → 1uh9zgsy69g92.js} +1 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +1 -0
- package/out/_next/static/chunks/1vurgl6oz2qey.js +17 -0
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +1 -0
- package/out/_next/static/chunks/1ycqxcht6x54p.js +1 -0
- package/out/_next/static/chunks/{2zyjw8g4tiu51.js → 1zj4307ugq0qz.js} +1 -1
- package/out/_next/static/chunks/{425epvuw3yy-n.js → 1zkd8v-qka--j.js} +169 -174
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +1 -0
- package/out/_next/static/chunks/{267q_eg-c6f6m.js → 1zm6eo861i3c8.js} +1 -1
- package/out/_next/static/chunks/{1e_-_7biavwmb.js → 1zp9363yfhpom.js} +1 -1
- package/out/_next/static/chunks/1zt1xxovnjhkm.js +1 -0
- package/out/_next/static/chunks/2-3hk_db5fpok.js +1 -0
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +1 -0
- package/out/_next/static/chunks/209sxygecny37.js +1 -0
- package/out/_next/static/chunks/{1ccn725by19i1.js → 216uiih3_vdfd.js} +1 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +1 -0
- package/out/_next/static/chunks/22yqh0zlo_vwr.js +1 -0
- package/out/_next/static/chunks/24ecas0m9tao7.js +3 -0
- package/out/_next/static/chunks/24pq9210rng3f.js +1 -0
- package/out/_next/static/chunks/{0zf26k6juhlzo.js → 267prao6fyt22.js} +23 -20
- package/out/_next/static/chunks/26skkagvj1z96.js +1 -0
- package/out/_next/static/chunks/26y9sv8_-ykxf.js +1 -0
- package/out/_next/static/chunks/2701xfv_07wz_.js +1 -0
- package/out/_next/static/chunks/{1x99m91nt1m3b.js → 271333m8y3k0e.js} +1 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +1 -0
- package/out/_next/static/chunks/{077eo-0dhbxz-.js → 2a07so920b6aa.js} +1 -1
- package/out/_next/static/chunks/2a2oy8ryz2tsk.js +1 -0
- package/out/_next/static/chunks/2ao-3jzz7yw3p.js +532 -0
- package/out/_next/static/chunks/2apihn9ra2ufp.js +1 -0
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +1 -0
- package/out/_next/static/chunks/2b481pitl4k85.js +1 -0
- package/out/_next/static/chunks/2bettxaqt3d2p.js +1 -0
- package/out/_next/static/chunks/{1fyh50hjt7hi_.js → 2c721vfva711t.js} +1 -1
- package/out/_next/static/chunks/{442e2l3jzxd-_.js → 2d2kl_m64j9cb.js} +1 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +1 -0
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +1 -0
- package/out/_next/static/chunks/2eqbsut829r5l.js +1 -0
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +1 -0
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +1 -0
- package/out/_next/static/chunks/2h249uvhh2sij.js +114 -0
- package/out/_next/static/chunks/{1gvdmbr65lpud.js → 2izok2otbk8-2.js} +505 -505
- package/out/_next/static/chunks/{0yvevihll7sz-.js → 2j120dkh7q3uf.js} +1 -1
- package/out/_next/static/chunks/2j2ynchpqh34-.js +1 -0
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +1 -0
- package/out/_next/static/chunks/{2-p206i_ihx09.js → 2kok6zedeeltw.js} +1 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +1 -0
- package/out/_next/static/chunks/{41yy4p3-rtyz1.js → 2lsvk7xcfkarc.js} +1 -1
- package/out/_next/static/chunks/2n-pveub8b_5t.js +1 -0
- package/out/_next/static/chunks/{00xc-0pj7on2s.js → 2n3xu_wbvtj7h.js} +29 -29
- package/out/_next/static/chunks/{1oljzgz5jistn.js → 2of8q0kaeqpf0.js} +1 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +1 -0
- package/out/_next/static/chunks/2phl5ta4iim7l.js +12 -0
- package/out/_next/static/chunks/2q6l-xdqzgmpf.js +1 -0
- package/out/_next/static/chunks/2q8yg63br2jc9.js +1 -0
- package/out/_next/static/chunks/2r5qgieqldcd9.js +1 -0
- package/out/_next/static/chunks/2r7y401cvjc1s.js +1 -0
- package/out/_next/static/chunks/{22ja7c3gk0_ko.js → 2r96kyeehsji9.js} +1 -1
- package/out/_next/static/chunks/{3gyyjsot8mdav.js → 2rmc6ru7mc-kg.js} +1 -1
- package/out/_next/static/chunks/{1ephzzweysylq.js → 2s6kpclh6ie7o.js} +901 -973
- package/out/_next/static/chunks/{0vso09vdz38sr.js → 2sys9nj8lo3uk.js} +1 -1
- package/out/_next/static/chunks/{0w-hm7g7trtjg.js → 2tc3e-iqv71y_.js} +1 -1
- package/out/_next/static/chunks/2uo6vm7mfgrbf.js +1 -0
- package/out/_next/static/chunks/2urx6fow8c8c9.js +505 -0
- package/out/_next/static/chunks/2w2k1gveljyb7.js +1 -0
- package/out/_next/static/chunks/{22rl_arnzs-ve.js → 2w99knknr5i8c.js} +1 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +4 -0
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +1 -0
- package/out/_next/static/chunks/2x7enks3ydgai.js +1 -0
- package/out/_next/static/chunks/{2e46-2ubc90do.js → 2y8i7_nxm4r05.js} +5 -5
- package/out/_next/static/chunks/2ydub0t01728d.js +1 -0
- package/out/_next/static/chunks/{309f81l5ucsb_.js → 2z_iab7ozohhq.js} +60 -60
- package/out/_next/static/chunks/3-m_vzabs1uez.js +1 -0
- package/out/_next/static/chunks/{0t89-lfct-7m6.js → 302qk2fjdrthp.js} +5 -5
- package/out/_next/static/chunks/30bhz7czzs4mf.js +1 -0
- package/out/_next/static/chunks/{0tn-9w46cwydp.js → 30n4y_uu8chbh.js} +515 -514
- package/out/_next/static/chunks/{2-hdejef-mpka.js → 32_c4mbb6j1l6.js} +372 -169
- package/out/_next/static/chunks/33hp-khdfohdq.js +1 -0
- package/out/_next/static/chunks/{28ndw4nsw2t_4.js → 33i36o_l69sm5.js} +1 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +1 -0
- package/out/_next/static/chunks/355dg8yaa94hr.js +1 -0
- package/out/_next/static/chunks/{11p92pnn5el0v.js → 35ntbr_c-yx44.js} +1 -1
- package/out/_next/static/chunks/{2rjfrjhp4kjev.js → 35sne1llxnc-m.js} +57 -57
- package/out/_next/static/chunks/36enkx1skkv2-.js +4 -0
- package/out/_next/static/chunks/{3-x7522okdy-7.js → 3772oce1n3t_g.js} +1 -1
- package/out/_next/static/chunks/{1rb8wewjbdisv.js → 37cnbm5ft1mqf.js} +1 -1
- package/out/_next/static/chunks/38xdo3cifphut.js +1 -0
- package/out/_next/static/chunks/{1tt1bbry-4f-6.js → 3_dgblylldcgb.js} +1 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +1 -0
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +1 -0
- package/out/_next/static/chunks/3d-i_skta_wes.js +1 -0
- package/out/_next/static/chunks/3df_l2we755bb.js +1 -0
- package/out/_next/static/chunks/{43hwl25uke0l_.js → 3eve5y7fpzx2h.js} +1 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +1 -0
- package/out/_next/static/chunks/3f3789eh18_oy.js +1 -0
- package/out/_next/static/chunks/{1n_gxvu31aofy.js → 3f8qelpscqfym.js} +2 -2
- package/out/_next/static/chunks/3g3-e9m1en45q.js +1 -0
- package/out/_next/static/chunks/{0uxdbfa8gv6tk.js → 3h6akt2uu05ku.js} +29 -29
- package/out/_next/static/chunks/{3w4qettzp7khe.js → 3huu0tqmxwowu.js} +523 -522
- package/out/_next/static/chunks/3i239y-1hbkm-.js +1 -0
- package/out/_next/static/chunks/{1qsut_e3msg0l.js → 3ipx7xbxchsq9.js} +1 -1
- package/out/_next/static/chunks/{2ftp5xmq_w23j.js → 3j9xvdz55bi4p.js} +345 -345
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +1 -0
- package/out/_next/static/chunks/3ksq69yq-40_r.js +1 -0
- package/out/_next/static/chunks/{2x83vs8ns4pww.js → 3njwfothmmg7u.js} +3 -3
- package/out/_next/static/chunks/{0bj_310rugcn1.js → 3oqxl46ukaojj.js} +11 -11
- package/out/_next/static/chunks/{1upkv4ltuh3s5.js → 3qn6r8-0u6dij.js} +352 -352
- package/out/_next/static/chunks/3qye1lytea2i8.js +1 -0
- package/out/_next/static/chunks/3rlp9yr75liz7.js +1 -0
- package/out/_next/static/chunks/{2i82rmjta9ijs.js → 3sa_hlx3konc7.js} +1 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +1 -0
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +1 -0
- package/out/_next/static/chunks/{2pbgsq7vvtk8_.js → 3utpc-fc6_y0f.js} +1 -1
- package/out/_next/static/chunks/3v-0c2aj6c0on.js +1 -0
- package/out/_next/static/chunks/3v6nxa28rxngq.js +1 -0
- package/out/_next/static/chunks/{1og49_atcksim.js → 3vbamaoiuk9yj.js} +1 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +1 -0
- package/out/_next/static/chunks/{1nqojcig-0m3c.js → 3w59kt5ztyvoq.js} +1 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +1 -0
- package/out/_next/static/chunks/3xl-op0hwxytg.js +272 -0
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +1 -0
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +1 -0
- package/out/_next/static/chunks/{1-4v8oivkgnyl.js → 3zdtteq-r2fs5.js} +3 -3
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +1 -0
- package/out/_next/static/chunks/{0wq_9f98weoe3.js → 3zs7l4362msjd.js} +1 -1
- package/out/_next/static/chunks/40etabvml_71y.js +1 -0
- package/out/_next/static/chunks/417jkzz0slv9m.js +1 -0
- package/out/_next/static/chunks/41b5gpyqbj58m.js +338 -0
- package/out/_next/static/chunks/41u2-5jayyajf.js +22 -0
- package/out/_next/static/chunks/42gcpy51w7lk1.js +1 -0
- package/out/_next/static/chunks/{1ph0tfo-4hl-f.js → 42ymanq326mo7.js} +1 -1
- package/out/_next/static/chunks/{3w_umk1xtj6to.js → 43fp64xnfy646.js} +1 -1
- package/out/_next/static/chunks/43v4y2gu5z9_h.js +1 -0
- package/out/_next/static/chunks/44cer242u-f8v.js +1 -0
- package/out/_next/static/chunks/{1ozi46t8jajqh.js → 44zi0gl0a6a8w.js} +1 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +1 -0
- package/out/_not-found/__next._full.txt +12 -12
- package/out/_not-found/__next._not-found.__PAGE__.txt +19 -2
- package/out/_not-found/__next._tree.txt +2 -2
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +12 -12
- package/out/index.html +1 -1
- package/out/index.txt +11 -11
- package/package.json +15 -15
- package/out/__next._head.txt +0 -6
- package/out/__next._index.txt +0 -5
- package/out/_next/static/chunks/00g5suuoa-_wn.js +0 -1
- package/out/_next/static/chunks/01fh3_bncbe5u.js +0 -1
- package/out/_next/static/chunks/01urdkl1j8o6l.js +0 -1
- package/out/_next/static/chunks/026vw95s88gsy.js +0 -1
- package/out/_next/static/chunks/02eui3ctddbd2.js +0 -1
- package/out/_next/static/chunks/04c4nksb5y9r-.js +0 -1
- package/out/_next/static/chunks/04g-l-_b4payc.js +0 -1
- package/out/_next/static/chunks/04j9pexbmysdy.js +0 -1
- package/out/_next/static/chunks/055baac5e-c2o.js +0 -1
- package/out/_next/static/chunks/05bdni_jrobq1.js +0 -1
- package/out/_next/static/chunks/05o0tb8l_htmw.js +0 -1
- package/out/_next/static/chunks/07z6p262h5hgl.js +0 -1
- package/out/_next/static/chunks/08m_4cihfmik8.js +0 -1
- package/out/_next/static/chunks/08obqw64faj8j.js +0 -1
- package/out/_next/static/chunks/099ilz3dmm1jw.js +0 -1
- package/out/_next/static/chunks/09ppu_k464q-n.js +0 -1
- package/out/_next/static/chunks/0bgcaf2x51kms.js +0 -1
- package/out/_next/static/chunks/0c5d3qn2mb3ew.js +0 -1
- package/out/_next/static/chunks/0dck67in84de0.js +0 -1
- package/out/_next/static/chunks/0dg4wxz-6u5lo.js +0 -1
- package/out/_next/static/chunks/0dva036n8ab62.js +0 -1
- package/out/_next/static/chunks/0erga_bzezbza.js +0 -1
- package/out/_next/static/chunks/0f0-i105odxqd.js +0 -1
- package/out/_next/static/chunks/0gyeqz9pagssf.js +0 -1
- package/out/_next/static/chunks/0i82k-t0fbn8f.js +0 -1
- package/out/_next/static/chunks/0kzw45f61wm3j.js +0 -1
- package/out/_next/static/chunks/0l8bfa2xewq69.js +0 -1
- package/out/_next/static/chunks/0n-zml1gn0o1u.js +0 -1
- package/out/_next/static/chunks/0n92hec_jb_-_.js +0 -1
- package/out/_next/static/chunks/0pv2wirx45e1m.js +0 -1
- package/out/_next/static/chunks/0qxd_8t3nca36.js +0 -1
- package/out/_next/static/chunks/0s1jghzw8jufz.js +0 -1
- package/out/_next/static/chunks/0s84ekz_f9ngx.js +0 -1
- package/out/_next/static/chunks/0ti58h622yo-_.js +0 -2
- package/out/_next/static/chunks/0u8yr4k1y6m2t.js +0 -1
- package/out/_next/static/chunks/0ubxyut5rr600.js +0 -1
- package/out/_next/static/chunks/0wbw9h7rsis2r.js +0 -1
- package/out/_next/static/chunks/0y4e49hpuucdi.js +0 -1
- package/out/_next/static/chunks/1-b44873bjsdw.js +0 -1
- package/out/_next/static/chunks/1-c3a1vnl8v1q.js +0 -1
- package/out/_next/static/chunks/1-xf86jgea22y.js +0 -1
- package/out/_next/static/chunks/10b0qqdnb_nox.js +0 -1
- package/out/_next/static/chunks/12kdmh0h_mboy.js +0 -1
- package/out/_next/static/chunks/14ijcpo72av4r.js +0 -1
- package/out/_next/static/chunks/16hdip1drt8o-.js +0 -1
- package/out/_next/static/chunks/18txc1wwwu9f9.js +0 -1
- package/out/_next/static/chunks/18wa83g0qfh-b.js +0 -1
- package/out/_next/static/chunks/19dp8nr4uygg2.js +0 -5
- package/out/_next/static/chunks/1_8acnu6_-qe-.js +0 -1
- package/out/_next/static/chunks/1__nujzr9e352.js +0 -3
- package/out/_next/static/chunks/1bmyq1b0by7ug.js +0 -1
- package/out/_next/static/chunks/1d1tpj9nm1nhf.js +0 -1
- package/out/_next/static/chunks/1dfwa563iciz3.js +0 -1
- package/out/_next/static/chunks/1di5enkavl9vx.js +0 -4
- package/out/_next/static/chunks/1fwsjnd1y-lx_.js +0 -1
- package/out/_next/static/chunks/1gaexq_suxai0.js +0 -1
- package/out/_next/static/chunks/1gnggc6370ji-.js +0 -1
- package/out/_next/static/chunks/1gtj_l5ame5mw.js +0 -1
- package/out/_next/static/chunks/1hsvckd0sgdgr.js +0 -1
- package/out/_next/static/chunks/1i4f3n_2_3ery.js +0 -1
- package/out/_next/static/chunks/1j7e3qpjuj89a.js +0 -1
- package/out/_next/static/chunks/1mrvp94tietcv.js +0 -1
- package/out/_next/static/chunks/1mvadj46owrck.js +0 -1
- package/out/_next/static/chunks/1nasz7q3tvb53.js +0 -1
- package/out/_next/static/chunks/1o3ggu95lfu6i.js +0 -1
- package/out/_next/static/chunks/1qjsgebn9m-0l.js +0 -1
- package/out/_next/static/chunks/1rr74xxjtckyv.js +0 -1
- package/out/_next/static/chunks/1uu55ejvi7q5u.js +0 -1
- package/out/_next/static/chunks/1xbzxfeq9789f.js +0 -1
- package/out/_next/static/chunks/1ybiu-rkt50_1.js +0 -1
- package/out/_next/static/chunks/20qelrstvz9_n.js +0 -1
- package/out/_next/static/chunks/21at65obnoo8z.js +0 -1
- package/out/_next/static/chunks/21ko5mxfderw0.js +0 -1
- package/out/_next/static/chunks/21muzwu43o8xg.js +0 -1
- package/out/_next/static/chunks/23d-hvrwpixpm.js +0 -1
- package/out/_next/static/chunks/2569rrrffvm2w.js +0 -31
- package/out/_next/static/chunks/29o74k0d6hkdf.js +0 -1
- package/out/_next/static/chunks/2bm95r0011asw.js +0 -1
- package/out/_next/static/chunks/2btabnibkm0db.js +0 -1
- package/out/_next/static/chunks/2c--awgkdcikq.js +0 -1
- package/out/_next/static/chunks/2c2dspoukng-5.js +0 -1
- package/out/_next/static/chunks/2ep7mjbaoeou0.js +0 -1
- package/out/_next/static/chunks/2ezgqm7atphi6.js +0 -1
- package/out/_next/static/chunks/2gfjzq_vjea4w.js +0 -1
- package/out/_next/static/chunks/2h5hase6ewoyc.js +0 -1
- package/out/_next/static/chunks/2hghi41nhdww2.css +0 -3
- package/out/_next/static/chunks/2ies66gmou203.js +0 -1
- package/out/_next/static/chunks/2jenu2eek9viz.js +0 -1
- package/out/_next/static/chunks/2luaj_cf5f19-.js +0 -1
- package/out/_next/static/chunks/2mgmvz66gh5ub.js +0 -1
- package/out/_next/static/chunks/2nwlqtv3vrzcv.js +0 -1
- package/out/_next/static/chunks/2o8k8x5zcepfy.js +0 -1
- package/out/_next/static/chunks/2pcdnd4nzcw4c.js +0 -1
- package/out/_next/static/chunks/2q0rz76kj6h5z.js +0 -1
- package/out/_next/static/chunks/2si5cg3hl5dtf.js +0 -4
- package/out/_next/static/chunks/2uhrhq35bki6u.js +0 -1
- package/out/_next/static/chunks/2wi7y3sfqyqdo.js +0 -3
- package/out/_next/static/chunks/2ymtumj-hfrjo.js +0 -1
- package/out/_next/static/chunks/2zdzgmacaoor9.js +0 -1
- package/out/_next/static/chunks/3-irhmtm1q5qw.js +0 -1
- package/out/_next/static/chunks/3-k74vn9exnb6.js +0 -1
- package/out/_next/static/chunks/31ei992g8gqz9.js +0 -1
- package/out/_next/static/chunks/34845aqksy1dl.js +0 -3
- package/out/_next/static/chunks/34y7nx6qmat06.js +0 -1
- package/out/_next/static/chunks/36rqw8h6ildpl.js +0 -1
- package/out/_next/static/chunks/3a_khw6q6pyh1.js +0 -1
- package/out/_next/static/chunks/3c_31f20z4jrl.js +0 -1
- package/out/_next/static/chunks/3ckp70rgr63u9.js +0 -1
- package/out/_next/static/chunks/3ed24zmt8qfys.js +0 -1
- package/out/_next/static/chunks/3ez20hi1mxw0w.js +0 -1
- package/out/_next/static/chunks/3fdx-rnos5ft-.js +0 -1
- package/out/_next/static/chunks/3fgfbxxb-j_bn.js +0 -4
- package/out/_next/static/chunks/3k-gz8qf-mj-p.js +0 -1
- package/out/_next/static/chunks/3lehc5pujwhsz.js +0 -1
- package/out/_next/static/chunks/3m0ytnc241yfz.js +0 -1
- package/out/_next/static/chunks/3mpe7c3iyxn5h.js +0 -1
- package/out/_next/static/chunks/3mvaub8qjdyuc.js +0 -1
- package/out/_next/static/chunks/3nw7u4bie0-g6.js +0 -1
- package/out/_next/static/chunks/3qatb38-tk_gd.js +0 -1
- package/out/_next/static/chunks/3tdcdi_utmoy_.js +0 -1
- package/out/_next/static/chunks/3tdzweqszru4y.js +0 -1
- package/out/_next/static/chunks/3tt_ir_va6262.js +0 -1
- package/out/_next/static/chunks/3y_51bmdnc0ey.js +0 -1
- package/out/_next/static/chunks/3yr66ufoli71t.js +0 -1
- package/out/_next/static/chunks/41qxc142snm22.js +0 -1
- package/out/_next/static/chunks/43qmngblcab8f.js +0 -1
- package/out/_next/static/chunks/turbopack-3r8yn0j92tqw_.js +0 -1
- package/out/_not-found/__next._head.txt +0 -6
- package/out/_not-found/__next._index.txt +0 -5
- package/out/_not-found/__next._not-found.txt +0 -5
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_buildManifest.js +0 -0
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{BvOGdrl2Cfw-jVV73WY6a → A1hxMz783bIWo0Q9qqV3L}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,44744,e=>{"use strict";class t{get underlyingResource(){return null}constructor(){this.references=0,this.capacity=0,this.is32Bits=!1,this.uniqueId=t._Counter++}}t._Counter=0,e.s(["DataBuffer",0,t])},76256,23733,33016,1205,e=>{"use strict";var t=e.i(80592),r=e.i(6302),s=e.i(99429),i=e.i(67501),a=e.i(85789),n=e.i(7484),_=e.i(82015),l=e.i(18799),h=e.i(44744);class u extends h.DataBuffer{constructor(e){super(),this._buffer=e}get underlyingResource(){return this._buffer}}e.s(["WebGLDataBuffer",0,u],23733);var o=e.i(92929);class c{get underlyingResource(){return this._webGLTexture}constructor(e=null,t){if(this._MSAARenderBuffers=null,this._context=t,!e&&!(e=t.createTexture()))throw Error("Unable to create webGL texture");this.set(e)}setUsage(){}set(e){this._webGLTexture=e}reset(){this._webGLTexture=null,this._MSAARenderBuffers=null}addMSAARenderBuffer(e){this._MSAARenderBuffers||(this._MSAARenderBuffers=[]),this._MSAARenderBuffers.push(e)}releaseMSAARenderBuffers(){if(this._MSAARenderBuffers){for(let e of this._MSAARenderBuffers)this._context.deleteRenderbuffer(e);this._MSAARenderBuffers=null}}getMSAARenderBuffer(e=0){return this._MSAARenderBuffers?.[e]??null}release(){this.releaseMSAARenderBuffers(),this._webGLTexture&&this._context.deleteTexture(this._webGLTexture),this.reset()}}e.s(["WebGLHardwareTexture",0,c],33016);var g=e.i(55080),f=e.i(4385),d=e.i(67863);function E(e){return 13===e||14===e||15===e||16===e||17===e||18===e||19===e}function T(e){return 13===e||17===e||18===e||19===e}e.s(["HasStencilAspect",0,T,"IsDepthTexture",0,E],1205);var R=e.i(48404);class A{}class p extends s.AbstractEngine{get name(){return this._name}set name(e){this._name=e}get version(){return this._webGLVersion}static get ShadersRepository(){return t.Effect.ShadersRepository}static set ShadersRepository(e){t.Effect.ShadersRepository=e}get supportsUniformBuffers(){return this.webGLVersion>1&&!this.disableUniformBuffers}get needPOTTextures(){return this._webGLVersion<2||this.forcePOTTextures}get _supportsHardwareTextureRescaling(){return!1}snapshotRenderingReset(){this.snapshotRendering=!1}constructor(e,t,s,i){let n;if(s=s||{},super(t??s.antialias,s,i),this._name="WebGL",this.forcePOTTextures=!1,this.validateShaderPrograms=!1,this.disableUniformBuffers=!1,this._webGLVersion=1,this._vertexAttribArraysEnabled=[],this._uintIndicesCurrentlySet=!1,this._currentBoundBuffer=[],this._currentFramebuffer=null,this._dummyFramebuffer=null,this._currentBufferPointers=[],this._currentInstanceLocations=[],this._currentInstanceBuffers=[],this._vaoRecordInProgress=!1,this._mustWipeVertexAttributes=!1,this._nextFreeTextureSlots=[],this._maxSimultaneousTextures=0,this._maxMSAASamplesOverride=null,this._unpackFlipYCached=null,this.enableUnpackFlipYCached=!0,this._boundUniforms={},!e)return;if(e.getContext){if(n=e,void 0===s.preserveDrawingBuffer&&(s.preserveDrawingBuffer=!1),void 0===s.xrCompatible&&(s.xrCompatible=!1),navigator&&navigator.userAgent){this._setupMobileChecks();const e=navigator.userAgent;for(const t of p.ExceptionList){const r=t.key,i=t.targets;if(new RegExp(r).test(e)){if(t.capture&&t.captureConstraint){const r=t.capture,s=t.captureConstraint,i=new RegExp(r).exec(e);if(i&&i.length>0&&parseInt(i[i.length-1])>=s)continue}for(const e of i)switch(e){case"uniformBuffer":this.disableUniformBuffers=!0;break;case"vao":this.disableVertexArrayObjects=!0;break;case"antialias":s.antialias=!1;break;case"maxMSAASamples":this._maxMSAASamplesOverride=1}}}}if(this._doNotHandleContextLost?this._onContextLost=()=>{(0,r.deleteStateObject)(this._gl)}:(this._onContextLost=e=>{e.preventDefault(),this._contextWasLost=!0,(0,r.deleteStateObject)(this._gl),a.Logger.Warn("WebGL context lost."),this.onContextLostObservable.notifyObservers(this)},this._onContextRestored=()=>{this._restoreEngineAfterContextLost(()=>this._initGLContext())},n.addEventListener("webglcontextrestored",this._onContextRestored,!1),s.powerPreference=s.powerPreference||"high-performance"),n.addEventListener("webglcontextlost",this._onContextLost,!1),this._badDesktopOS&&(s.xrCompatible=!1),!s.disableWebGL2Support)try{this._gl=n.getContext("webgl2",s)||n.getContext("experimental-webgl2",s),this._gl&&(this._webGLVersion=2,this._shaderPlatformName="WEBGL2",this._gl.deleteQuery||(this._webGLVersion=1,this._shaderPlatformName="WEBGL1"))}catch(e){}if(!this._gl){if(!n)throw Error("The provided canvas is null or undefined.");try{this._gl=n.getContext("webgl",s)||n.getContext("experimental-webgl",s)}catch(e){throw Error("WebGL not supported",{cause:e})}}if(!this._gl)throw Error("WebGL not supported")}else{this._gl=e,n=this._gl.canvas,this._gl.renderbufferStorageMultisample?(this._webGLVersion=2,this._shaderPlatformName="WEBGL2"):this._shaderPlatformName="WEBGL1";const t=this._gl.getContextAttributes();t&&(s.stencil=t.stencil)}this._sharedInit(n),this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),void 0!==s.useHighPrecisionFloats&&(this._highPrecisionShadersAllowed=s.useHighPrecisionFloats),this.resize(),this._initGLContext(),this._initFeatures();for(let e=0;e<this._caps.maxVertexAttribs;e++)this._currentBufferPointers[e]=new A;this._shaderProcessor=this.webGLVersion>1?new l.WebGL2ShaderProcessor:new _.WebGLShaderProcessor;const h=`Babylon.js v${p.Version}`;a.Logger.Log(h+` - ${this.description}`),this._renderingCanvas&&this._renderingCanvas.setAttribute&&this._renderingCanvas.setAttribute("data-engine",h);const u=(0,r.getStateObject)(this._gl);u.validateShaderPrograms=this.validateShaderPrograms,u.parallelShaderCompile=this._caps.parallelShaderCompile}_clearEmptyResources(){this._dummyFramebuffer=null,super._clearEmptyResources()}_getShaderProcessingContext(e){return null}areAllEffectsReady(){for(let e in this._compiledEffects)if(!this._compiledEffects[e].isReady())return!1;return!0}_initGLContext(){this._caps={maxTexturesImageUnits:this._gl.getParameter(this._gl.MAX_TEXTURE_IMAGE_UNITS),maxCombinedTexturesImageUnits:this._gl.getParameter(this._gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),maxVertexTextureImageUnits:this._gl.getParameter(this._gl.MAX_VERTEX_TEXTURE_IMAGE_UNITS),maxTextureSize:this._gl.getParameter(this._gl.MAX_TEXTURE_SIZE),maxSamples:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_SAMPLES):1,maxCubemapTextureSize:this._gl.getParameter(this._gl.MAX_CUBE_MAP_TEXTURE_SIZE),maxRenderTextureSize:this._gl.getParameter(this._gl.MAX_RENDERBUFFER_SIZE),maxVertexAttribs:this._gl.getParameter(this._gl.MAX_VERTEX_ATTRIBS),maxVaryingVectors:this._gl.getParameter(this._gl.MAX_VARYING_VECTORS),maxFragmentUniformVectors:this._gl.getParameter(this._gl.MAX_FRAGMENT_UNIFORM_VECTORS),maxVertexUniformVectors:this._gl.getParameter(this._gl.MAX_VERTEX_UNIFORM_VECTORS),shaderFloatPrecision:0,parallelShaderCompile:this._gl.getExtension("KHR_parallel_shader_compile")||void 0,standardDerivatives:this._webGLVersion>1||null!==this._gl.getExtension("OES_standard_derivatives"),maxAnisotropy:1,astc:this._gl.getExtension("WEBGL_compressed_texture_astc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_astc"),bptc:this._gl.getExtension("EXT_texture_compression_bptc")||this._gl.getExtension("WEBKIT_EXT_texture_compression_bptc"),s3tc:this._gl.getExtension("WEBGL_compressed_texture_s3tc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc"),s3tc_srgb:this._gl.getExtension("WEBGL_compressed_texture_s3tc_srgb")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc_srgb"),pvrtc:this._gl.getExtension("WEBGL_compressed_texture_pvrtc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),etc1:this._gl.getExtension("WEBGL_compressed_texture_etc1")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc1"),etc2:this._gl.getExtension("WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBKIT_WEBGL_compressed_texture_etc")||this._gl.getExtension("WEBGL_compressed_texture_es3_0"),textureAnisotropicFilterExtension:this._gl.getExtension("EXT_texture_filter_anisotropic")||this._gl.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||this._gl.getExtension("MOZ_EXT_texture_filter_anisotropic"),uintIndices:this._webGLVersion>1||null!==this._gl.getExtension("OES_element_index_uint"),fragmentDepthSupported:this._webGLVersion>1||null!==this._gl.getExtension("EXT_frag_depth"),highPrecisionShaderSupported:!1,timerQuery:this._gl.getExtension("EXT_disjoint_timer_query_webgl2")||this._gl.getExtension("EXT_disjoint_timer_query"),supportOcclusionQuery:this._webGLVersion>1,canUseTimestampForTimerQuery:!1,drawBuffersExtension:!1,maxMSAASamples:1,colorBufferFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_float")),blendFloat:null!==this._gl.getExtension("EXT_float_blend"),supportFloatTexturesResolve:!1,rg11b10ufColorRenderable:!1,colorBufferHalfFloat:!!(this._webGLVersion>1&&this._gl.getExtension("EXT_color_buffer_half_float")),textureFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_float")),textureHalfFloat:!!(this._webGLVersion>1||this._gl.getExtension("OES_texture_half_float")),textureHalfFloatRender:!1,textureFloatLinearFiltering:!1,textureFloatRender:!1,textureHalfFloatLinearFiltering:!1,vertexArrayObject:!1,instancedArrays:!1,textureLOD:!!(this._webGLVersion>1||this._gl.getExtension("EXT_shader_texture_lod")),texelFetch:1!==this._webGLVersion,blendMinMax:!1,multiview:this._gl.getExtension("OVR_multiview2"),oculusMultiview:this._gl.getExtension("OCULUS_multiview"),depthTextureExtension:!1,canUseGLInstanceID:this._webGLVersion>1,canUseGLVertexID:this._webGLVersion>1,supportComputeShaders:!1,supportSRGBBuffers:!1,supportTransformFeedbacks:this._webGLVersion>1,textureMaxLevel:this._webGLVersion>1,texture2DArrayMaxLayerCount:this._webGLVersion>1?this._gl.getParameter(this._gl.MAX_ARRAY_TEXTURE_LAYERS):128,disableMorphTargetTexture:!1,textureNorm16:!!this._gl.getExtension("EXT_texture_norm16"),blendParametersPerTarget:!1,dualSourceBlending:!1,supportReadWriteStorageTextures:!1},this._caps.supportFloatTexturesResolve=this._caps.colorBufferFloat,this._caps.rg11b10ufColorRenderable=this._caps.colorBufferFloat,this._glVersion=this._gl.getParameter(this._gl.VERSION);let e=this._gl.getExtension("WEBGL_debug_renderer_info");null!=e&&(this._glRenderer=this._gl.getParameter(e.UNMASKED_RENDERER_WEBGL),this._glVendor=this._gl.getParameter(e.UNMASKED_VENDOR_WEBGL)),this._glVendor||(this._glVendor=this._gl.getParameter(this._gl.VENDOR)||"Unknown vendor"),this._glRenderer||(this._glRenderer=this._gl.getParameter(this._gl.RENDERER)||"Unknown renderer"),36193!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=36193),34842!==this._gl.RGBA16F&&(this._gl.RGBA16F=34842),34836!==this._gl.RGBA32F&&(this._gl.RGBA32F=34836),35056!==this._gl.DEPTH24_STENCIL8&&(this._gl.DEPTH24_STENCIL8=35056),this._caps.timerQuery&&(1===this._webGLVersion&&(this._gl.getQuery=this._caps.timerQuery.getQueryEXT.bind(this._caps.timerQuery)),this._caps.canUseTimestampForTimerQuery=(this._gl.getQuery(this._caps.timerQuery.TIMESTAMP_EXT,this._caps.timerQuery.QUERY_COUNTER_BITS_EXT)??0)>0),this._caps.maxAnisotropy=this._caps.textureAnisotropicFilterExtension?this._gl.getParameter(this._caps.textureAnisotropicFilterExtension.MAX_TEXTURE_MAX_ANISOTROPY_EXT):0,this._caps.textureFloatLinearFiltering=!!(this._caps.textureFloat&&this._gl.getExtension("OES_texture_float_linear")),this._caps.textureFloatRender=!!(this._caps.textureFloat&&this._canRenderToFloatFramebuffer()),this._caps.textureHalfFloatLinearFiltering=!!(this._webGLVersion>1||this._caps.textureHalfFloat&&this._gl.getExtension("OES_texture_half_float_linear")),this._caps.textureNorm16&&(this._gl.R16_EXT=33322,this._gl.RG16_EXT=33324,this._gl.RGB16_EXT=32852,this._gl.RGBA16_EXT=32859,this._gl.R16_SNORM_EXT=36760,this._gl.RG16_SNORM_EXT=36761,this._gl.RGB16_SNORM_EXT=36762,this._gl.RGBA16_SNORM_EXT=36763);let t=this._gl.getExtension("OES_draw_buffers_indexed");if(this._caps.blendParametersPerTarget=!!t,this._alphaState=new R.AlphaState(this._caps.blendParametersPerTarget),t&&(this._gl.blendEquationSeparateIndexed=t.blendEquationSeparateiOES.bind(t),this._gl.blendEquationIndexed=t.blendEquationiOES.bind(t),this._gl.blendFuncSeparateIndexed=t.blendFuncSeparateiOES.bind(t),this._gl.blendFuncIndexed=t.blendFunciOES.bind(t),this._gl.colorMaskIndexed=t.colorMaskiOES.bind(t),this._gl.disableIndexed=t.disableiOES.bind(t),this._gl.enableIndexed=t.enableiOES.bind(t)),this._caps.dualSourceBlending=!!this._gl.getExtension("WEBGL_blend_func_extended"),this._caps.astc&&(this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR,this._gl.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR=this._caps.astc.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR),this._caps.bptc&&(this._gl.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT=this._caps.bptc.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT),this._caps.s3tc_srgb&&(this._gl.COMPRESSED_SRGB_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,this._gl.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=this._caps.s3tc_srgb.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT),this._caps.etc2&&(this._gl.COMPRESSED_SRGB8_ETC2=this._caps.etc2.COMPRESSED_SRGB8_ETC2,this._gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=this._caps.etc2.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC),this._webGLVersion>1&&5131!==this._gl.HALF_FLOAT_OES&&(this._gl.HALF_FLOAT_OES=5131),this._caps.textureHalfFloatRender=this._caps.textureHalfFloat&&this._canRenderToHalfFloatFramebuffer(),this._webGLVersion>1)this._caps.drawBuffersExtension=!0,this._caps.maxMSAASamples=null!==this._maxMSAASamplesOverride?this._maxMSAASamplesOverride:this._gl.getParameter(this._gl.MAX_SAMPLES),this._caps.maxDrawBuffers=this._gl.getParameter(this._gl.MAX_DRAW_BUFFERS);else{let e=this._gl.getExtension("WEBGL_draw_buffers");if(null!==e){this._caps.drawBuffersExtension=!0,this._gl.drawBuffers=e.drawBuffersWEBGL.bind(e),this._caps.maxDrawBuffers=this._gl.getParameter(e.MAX_DRAW_BUFFERS_WEBGL),this._gl.DRAW_FRAMEBUFFER=this._gl.FRAMEBUFFER;for(let t=0;t<16;t++)this._gl["COLOR_ATTACHMENT"+t+"_WEBGL"]=e["COLOR_ATTACHMENT"+t+"_WEBGL"]}}if(this._webGLVersion>1)this._caps.depthTextureExtension=!0;else{let e=this._gl.getExtension("WEBGL_depth_texture");null!=e&&(this._caps.depthTextureExtension=!0,this._gl.UNSIGNED_INT_24_8=e.UNSIGNED_INT_24_8_WEBGL)}if(this.disableVertexArrayObjects)this._caps.vertexArrayObject=!1;else if(this._webGLVersion>1)this._caps.vertexArrayObject=!0;else{let e=this._gl.getExtension("OES_vertex_array_object");null!=e&&(this._caps.vertexArrayObject=!0,this._gl.createVertexArray=e.createVertexArrayOES.bind(e),this._gl.bindVertexArray=e.bindVertexArrayOES.bind(e),this._gl.deleteVertexArray=e.deleteVertexArrayOES.bind(e))}if(this._webGLVersion>1)this._caps.instancedArrays=!0;else{let e=this._gl.getExtension("ANGLE_instanced_arrays");null!=e?(this._caps.instancedArrays=!0,this._gl.drawArraysInstanced=e.drawArraysInstancedANGLE.bind(e),this._gl.drawElementsInstanced=e.drawElementsInstancedANGLE.bind(e),this._gl.vertexAttribDivisor=e.vertexAttribDivisorANGLE.bind(e)):this._caps.instancedArrays=!1}if(this._gl.getShaderPrecisionFormat){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.HIGH_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.HIGH_FLOAT);if(e&&t&&(this._caps.highPrecisionShaderSupported=0!==e.precision&&0!==t.precision,this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision)),!this._shouldUseHighPrecisionShader){let e=this._gl.getShaderPrecisionFormat(this._gl.VERTEX_SHADER,this._gl.MEDIUM_FLOAT),t=this._gl.getShaderPrecisionFormat(this._gl.FRAGMENT_SHADER,this._gl.MEDIUM_FLOAT);e&&t&&(this._caps.shaderFloatPrecision=Math.min(e.precision,t.precision))}this._caps.shaderFloatPrecision<10&&(this._caps.shaderFloatPrecision=10)}if(this._webGLVersion>1)this._caps.blendMinMax=!0;else{let e=this._gl.getExtension("EXT_blend_minmax");null!=e&&(this._caps.blendMinMax=!0,this._gl.MAX=e.MAX_EXT,this._gl.MIN=e.MIN_EXT)}if(!this._caps.supportSRGBBuffers){if(this._webGLVersion>1)this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:WebGL2RenderingContext.SRGB,SRGB8:WebGL2RenderingContext.SRGB8,SRGB8_ALPHA8:WebGL2RenderingContext.SRGB8_ALPHA8};else{let e=this._gl.getExtension("EXT_sRGB");null!=e&&(this._caps.supportSRGBBuffers=!0,this._glSRGBExtensionValues={SRGB:e.SRGB_EXT,SRGB8:e.SRGB_ALPHA_EXT,SRGB8_ALPHA8:e.SRGB_ALPHA_EXT})}if(this._creationOptions){let e=this._creationOptions.forceSRGBBufferSupportState;void 0!==e&&(this._caps.supportSRGBBuffers=this._caps.supportSRGBBuffers&&e)}}this._depthCullingState.depthTest=!0,this._depthCullingState.depthFunc=this._gl.LEQUAL,this._depthCullingState.depthMask=!0,this._maxSimultaneousTextures=this._caps.maxCombinedTexturesImageUnits;for(let e=0;e<this._maxSimultaneousTextures;e++)this._nextFreeTextureSlots.push(e);"Mali-G72"===this._glRenderer&&(this._caps.disableMorphTargetTexture=!0)}_initFeatures(){this._features={forceBitmapOverHTMLImageElement:"u"<typeof HTMLImageElement,supportRenderAndCopyToLodForFloatTextures:1!==this._webGLVersion,supportDepthStencilTexture:1!==this._webGLVersion,supportShadowSamplers:1!==this._webGLVersion,uniformBufferHardCheckMatrix:!1,allowTexturePrefiltering:1!==this._webGLVersion,trackUbosInFrame:!1,checkUbosContentBeforeUpload:!1,supportCSM:1!==this._webGLVersion,basisNeedsPOT:1===this._webGLVersion,support3DTextures:1!==this._webGLVersion,needTypeSuffixInShaderConstants:1!==this._webGLVersion,supportMSAA:1!==this._webGLVersion,supportSSAO2:1!==this._webGLVersion,supportIBLShadows:1!==this._webGLVersion,supportExtendedTextureFormats:1!==this._webGLVersion,supportSwitchCaseInShader:1!==this._webGLVersion,supportSyncTextureRead:!0,needsInvertingBitmap:!0,useUBOBindingCache:!0,needShaderCodeInlining:!1,needToAlwaysBindUniformBuffers:!1,supportRenderPasses:!1,supportSpriteInstancing:!0,forceVertexBufferStrideAndOffsetMultiple4Bytes:!1,_checkNonFloatVertexBuffersDontRecreatePipelineContext:!1}}get webGLVersion(){return this._webGLVersion}getClassName(){return"ThinEngine"}_prepareWorkingCanvas(){if(this._workingCanvas)return;this._workingCanvas=this.createCanvas(1,1);let e=this._workingCanvas.getContext("2d");e&&(this._workingContext=e)}getInfo(){return this.getGlInfo()}getGlInfo(){return{vendor:this._glVendor,renderer:this._glRenderer,version:this._glVersion}}extractDriverInfo(){let e=this.getGlInfo();return e&&e.renderer?e.renderer:""}getRenderWidth(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.width:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferWidth:this._gl.drawingBufferWidth}getRenderHeight(e=!1){return!e&&this._currentRenderTarget?this._currentRenderTarget.height:this._framebufferDimensionsObject?this._framebufferDimensionsObject.framebufferHeight:this._gl.drawingBufferHeight}clear(e,t,r,s=!1,i=0){let a=this.stencilStateComposer.useStencilGlobalOnly;this.stencilStateComposer.useStencilGlobalOnly=!0,this.applyStates(),this.stencilStateComposer.useStencilGlobalOnly=a;let n=0;if(t&&e){let t=!0;if(this._currentRenderTarget){let r=this._currentRenderTarget.texture?.format;if(8===r||9===r||10===r||11===r){let r=this._currentRenderTarget.texture?.type;7===r||5===r?(p._TempClearColorUint32[0]=255*e.r,p._TempClearColorUint32[1]=255*e.g,p._TempClearColorUint32[2]=255*e.b,p._TempClearColorUint32[3]=255*e.a,this._gl.clearBufferuiv(this._gl.COLOR,0,p._TempClearColorUint32)):(p._TempClearColorInt32[0]=255*e.r,p._TempClearColorInt32[1]=255*e.g,p._TempClearColorInt32[2]=255*e.b,p._TempClearColorInt32[3]=255*e.a,this._gl.clearBufferiv(this._gl.COLOR,0,p._TempClearColorInt32)),t=!1}}t&&(this._gl.clearColor(e.r,e.g,e.b,void 0!==e.a?e.a:1),n|=this._gl.COLOR_BUFFER_BIT)}r&&(this.useReverseDepthBuffer?(this._depthCullingState.depthFunc=this._gl.GEQUAL,this._gl.clearDepth(0)):this._gl.clearDepth(1),n|=this._gl.DEPTH_BUFFER_BIT),s&&(this._gl.clearStencil(i),n|=this._gl.STENCIL_BUFFER_BIT),this._gl.clear(n)}_viewport(e,t,r,s){(e!==this._viewportCached.x||t!==this._viewportCached.y||r!==this._viewportCached.z||s!==this._viewportCached.w)&&(this._viewportCached.x=e,this._viewportCached.y=t,this._viewportCached.z=r,this._viewportCached.w=s,this._gl.viewport(e,t,r,s))}endFrame(){super.endFrame(),this._badOS&&this.flushFramebuffer()}get performanceMonitor(){throw Error("Not Supported by ThinEngine")}bindFramebuffer(e,t=0,r,s,i,n=0,_=0){this._currentRenderTarget&&this._resolveAndGenerateMipMapsFramebuffer(this._currentRenderTarget),this._currentRenderTarget=e,this._bindUnboundFramebuffer(e._framebuffer);let l=this._gl;e.isMulti||(e.is2DArray||e.is3D?(l.framebufferTextureLayer(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,e.texture._hardwareTexture?.underlyingResource,n,_),e._currentLOD=n):e.isCube?l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_CUBE_MAP_POSITIVE_X+t,e.texture._hardwareTexture?.underlyingResource,n):e._currentLOD!==n&&(l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,e.texture._hardwareTexture?.underlyingResource,n),e._currentLOD=n));let h=e._depthStencilTexture;if(h){e.is3D&&(e.texture.width!==h.width||e.texture.height!==h.height||e.texture.depth!==h.depth)&&a.Logger.Warn("Depth/Stencil attachment for 3D target must have same dimensions as color attachment");let r=e._depthStencilTextureWithStencil?l.DEPTH_STENCIL_ATTACHMENT:l.DEPTH_ATTACHMENT;e.is2DArray||e.is3D?l.framebufferTextureLayer(l.FRAMEBUFFER,r,h._hardwareTexture?.underlyingResource,n,_):e.isCube?l.framebufferTexture2D(l.FRAMEBUFFER,r,l.TEXTURE_CUBE_MAP_POSITIVE_X+t,h._hardwareTexture?.underlyingResource,n):l.framebufferTexture2D(l.FRAMEBUFFER,r,l.TEXTURE_2D,h._hardwareTexture?.underlyingResource,n)}e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._MSAAFramebuffer),this._cachedViewport&&!i?this.setViewport(this._cachedViewport,r,s):(!r&&(r=e.width,n&&(r/=Math.pow(2,n))),!s&&(s=e.height,n&&(s/=Math.pow(2,n))),this._viewport(0,0,r,s)),this.wipeCaches()}setStateCullFaceType(e,t){let r=this.cullBackFaces??e??!0?this._gl.BACK:this._gl.FRONT;(this._depthCullingState.cullFace!==r||t)&&(this._depthCullingState.cullFace=r)}setState(e,t=0,r,s=!1,i,a,n=0){(this._depthCullingState.cull!==e||r)&&(this._depthCullingState.cull=e),this.setStateCullFaceType(i,r),this.setZOffset(t),this.setZOffsetUnits(n);let _=s?this._gl.CW:this._gl.CCW;(this._depthCullingState.frontFace!==_||r)&&(this._depthCullingState.frontFace=_),this._stencilStateComposer.stencilMaterial=a}_resolveAndGenerateMipMapsFramebuffer(e,t=!1){e.disableAutomaticMSAAResolve||(e.isMulti?this.resolveMultiFramebuffer(e):this.resolveFramebuffer(e)),t||(e.isMulti?this.generateMipMapsMultiFramebuffer(e):this.generateMipMapsFramebuffer(e))}_bindUnboundFramebuffer(e){this._currentFramebuffer!==e&&(this._gl.bindFramebuffer(this._gl.FRAMEBUFFER,e),this._currentFramebuffer=e)}_currentFrameBufferIsDefaultFrameBuffer(){return null===this._currentFramebuffer}generateMipmaps(e){let t=this._getTextureTarget(e);this._bindTextureDirectly(t,e,!0),this._gl.generateMipmap(t),this._bindTextureDirectly(t,null)}unBindFramebuffer(e,t,r){this._currentRenderTarget=null,this._resolveAndGenerateMipMapsFramebuffer(e,t),r&&(e._MSAAFramebuffer&&this._bindUnboundFramebuffer(e._framebuffer),r()),this._bindUnboundFramebuffer(null)}generateMipMapsFramebuffer(e){!e.isMulti&&e.texture?.generateMipMaps&&!e.isCube&&this.generateMipmaps(e.texture)}resolveFramebuffer(e){let t=this._gl;if(!e._MSAAFramebuffer||e.isMulti)return;let r=e.resolveMSAAColors?t.COLOR_BUFFER_BIT:0;r|=e._generateDepthBuffer&&e.resolveMSAADepth?t.DEPTH_BUFFER_BIT:0,r|=e._generateStencilBuffer&&e.resolveMSAAStencil?t.STENCIL_BUFFER_BIT:0,t.bindFramebuffer(t.READ_FRAMEBUFFER,e._MSAAFramebuffer),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,e._framebuffer),t.blitFramebuffer(0,0,e.width,e.height,0,0,e.width,e.height,r,t.NEAREST)}flushFramebuffer(){this._gl.flush()}restoreDefaultFramebuffer(){this._currentRenderTarget?this.unBindFramebuffer(this._currentRenderTarget):this._bindUnboundFramebuffer(null),this._cachedViewport&&this.setViewport(this._cachedViewport),this.wipeCaches()}_resetVertexBufferBinding(){this.bindArrayBuffer(null),this._cachedVertexBuffers=null}createVertexBuffer(e,t,r){return this._createVertexBuffer(e,this._gl.STATIC_DRAW)}_createVertexBuffer(e,t){let r=this._gl.createBuffer();if(!r)throw Error("Unable to create vertex buffer");let s=new u(r);return this.bindArrayBuffer(s),"number"!=typeof e?e instanceof Array?(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Float32Array(e),t),s.capacity=4*e.length):(this._gl.bufferData(this._gl.ARRAY_BUFFER,e,t),s.capacity=e.byteLength):(this._gl.bufferData(this._gl.ARRAY_BUFFER,new Uint8Array(e),t),s.capacity=e),this._resetVertexBufferBinding(),s.references=1,s}createDynamicVertexBuffer(e,t){return this._createVertexBuffer(e,this._gl.DYNAMIC_DRAW)}_resetIndexBufferBinding(){this.bindIndexBuffer(null),this._cachedIndexBuffer=null}createIndexBuffer(e,t,r){let s=this._gl.createBuffer(),i=new u(s);if(!s)throw Error("Unable to create index buffer");this.bindIndexBuffer(i);let a=this._normalizeIndexData(e);return this._gl.bufferData(this._gl.ELEMENT_ARRAY_BUFFER,a,t?this._gl.DYNAMIC_DRAW:this._gl.STATIC_DRAW),this._resetIndexBufferBinding(),i.references=1,i.is32Bits=4===a.BYTES_PER_ELEMENT,i}_normalizeIndexData(e){if(2===e.BYTES_PER_ELEMENT)return e;if(this._caps.uintIndices){if(e instanceof Uint32Array)return e;else for(let t=0;t<e.length;t++)if(e[t]>=65535)return new Uint32Array(e)}return new Uint16Array(e)}bindArrayBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ARRAY_BUFFER)}bindUniformBlock(e,t,r){let s=e.program,i=this._gl.getUniformBlockIndex(s,t);this._gl.uniformBlockBinding(s,i,r)}bindIndexBuffer(e){this._vaoRecordInProgress||this._unbindVertexArrayObject(),this._bindBuffer(e,this._gl.ELEMENT_ARRAY_BUFFER)}_bindBuffer(e,t){(this._vaoRecordInProgress||this._currentBoundBuffer[t]!==e)&&(this._gl.bindBuffer(t,e?e.underlyingResource:null),this._currentBoundBuffer[t]=e)}updateArrayBuffer(e){this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,e)}_vertexAttribPointer(e,t,r,s,i,a,n){let _=this._currentBufferPointers[t];if(!_)return;let l=!1;_.active?(_.buffer!==e&&(_.buffer=e,l=!0),_.size!==r&&(_.size=r,l=!0),_.type!==s&&(_.type=s,l=!0),_.normalized!==i&&(_.normalized=i,l=!0),_.stride!==a&&(_.stride=a,l=!0),_.offset!==n&&(_.offset=n,l=!0)):(l=!0,_.active=!0,_.index=t,_.size=r,_.type=s,_.normalized=i,_.stride=a,_.offset=n,_.buffer=e),(l||this._vaoRecordInProgress)&&(this.bindArrayBuffer(e),s===this._gl.UNSIGNED_INT||s===this._gl.INT?this._gl.vertexAttribIPointer(t,r,s,a,n):this._gl.vertexAttribPointer(t,r,s,i,a,n))}_bindIndexBufferWithCache(e){null!=e&&this._cachedIndexBuffer!==e&&(this._cachedIndexBuffer=e,this.bindIndexBuffer(e),this._uintIndicesCurrentlySet=e.is32Bits)}_bindVertexBuffersAttributes(e,t,r){let s=t.getAttributesNames();this._vaoRecordInProgress||this._unbindVertexArrayObject(),this.unbindAllAttributes();for(let i=0;i<s.length;i++){let a=t.getAttributeLocation(i);if(a>=0){let t=s[i],n=null;if(r&&(n=r[t]),n||(n=e[t]),!n)continue;this._gl.enableVertexAttribArray(a),this._vaoRecordInProgress||(this._vertexAttribArraysEnabled[a]=!0);let _=n.getBuffer();_&&(this._vertexAttribPointer(_,a,n.getSize(),n.type,n.normalized,n.byteStride,n.byteOffset),n.getIsInstanced()&&(this._gl.vertexAttribDivisor(a,n.getInstanceDivisor()),this._vaoRecordInProgress||(this._currentInstanceLocations.push(a),this._currentInstanceBuffers.push(_))))}}}recordVertexArrayObject(e,t,r,s){let i=this._gl.createVertexArray();if(!i)throw Error("Unable to create VAO");return this._vaoRecordInProgress=!0,this._gl.bindVertexArray(i),this._mustWipeVertexAttributes=!0,this._bindVertexBuffersAttributes(e,r,s),this.bindIndexBuffer(t),this._vaoRecordInProgress=!1,this._gl.bindVertexArray(null),i}bindVertexArrayObject(e,t){this._cachedVertexArrayObject!==e&&(this._cachedVertexArrayObject=e,this._gl.bindVertexArray(e),this._cachedVertexBuffers=null,this._cachedIndexBuffer=null,this._uintIndicesCurrentlySet=null!=t&&t.is32Bits,this._mustWipeVertexAttributes=!0)}bindBuffersDirectly(e,t,r,s,i){if(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==i){this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=i;let t=i.getAttributesCount();this._unbindVertexArrayObject(),this.unbindAllAttributes();let a=0;for(let n=0;n<t;n++)if(n<r.length){let t=i.getAttributeLocation(n);t>=0&&(this._gl.enableVertexAttribArray(t),this._vertexAttribArraysEnabled[t]=!0,this._vertexAttribPointer(e,t,r[n],this._gl.FLOAT,!1,s,a)),a+=4*r[n]}}this._bindIndexBufferWithCache(t)}_unbindVertexArrayObject(){this._cachedVertexArrayObject&&(this._cachedVertexArrayObject=null,this._gl.bindVertexArray(null))}bindBuffers(e,t,r,s){(this._cachedVertexBuffers!==e||this._cachedEffectForVertexBuffers!==r)&&(this._cachedVertexBuffers=e,this._cachedEffectForVertexBuffers=r,this._bindVertexBuffersAttributes(e,r,s)),this._bindIndexBufferWithCache(t)}unbindInstanceAttributes(){let e;for(let t=0,r=this._currentInstanceLocations.length;t<r;t++){let r=this._currentInstanceBuffers[t];e!=r&&r.references&&(e=r,this.bindArrayBuffer(r));let s=this._currentInstanceLocations[t];this._gl.vertexAttribDivisor(s,0)}this._currentInstanceBuffers.length=0,this._currentInstanceLocations.length=0}releaseVertexArrayObject(e){this._gl.deleteVertexArray(e)}_releaseBuffer(e){return e.references--,0===e.references&&(this._deleteBuffer(e),!0)}_deleteBuffer(e){this._gl.deleteBuffer(e.underlyingResource)}updateAndBindInstancesBuffer(e,t,r){if(this.bindArrayBuffer(e),t&&this._gl.bufferSubData(this._gl.ARRAY_BUFFER,0,t),void 0!==r[0].index)this.bindInstancesBuffer(e,r,!0);else for(let t=0;t<4;t++){let s=r[t];this._vertexAttribArraysEnabled[s]||(this._gl.enableVertexAttribArray(s),this._vertexAttribArraysEnabled[s]=!0),this._vertexAttribPointer(e,s,4,this._gl.FLOAT,!1,64,16*t),this._gl.vertexAttribDivisor(s,1),this._currentInstanceLocations.push(s),this._currentInstanceBuffers.push(e)}}bindInstancesBuffer(e,t,r=!0){this.bindArrayBuffer(e);let s=0;if(r)for(let e=0;e<t.length;e++)s+=4*t[e].attributeSize;for(let r=0;r<t.length;r++){let i=t[r];void 0===i.index&&(i.index=this._currentEffect.getAttributeLocationByName(i.attributeName)),i.index<0||(this._vertexAttribArraysEnabled[i.index]||(this._gl.enableVertexAttribArray(i.index),this._vertexAttribArraysEnabled[i.index]=!0),this._vertexAttribPointer(e,i.index,i.attributeSize,i.attributeType||this._gl.FLOAT,i.normalized||!1,s,i.offset),this._gl.vertexAttribDivisor(i.index,void 0===i.divisor?1:i.divisor),this._currentInstanceLocations.push(i.index),this._currentInstanceBuffers.push(e))}}disableInstanceAttributeByName(e){if(!this._currentEffect)return;let t=this._currentEffect.getAttributeLocationByName(e);this.disableInstanceAttribute(t)}disableInstanceAttribute(e){let t,r=!1;for(;-1!==(t=this._currentInstanceLocations.indexOf(e));)this._currentInstanceLocations.splice(t,1),this._currentInstanceBuffers.splice(t,1),r=!0;r&&(this._gl.vertexAttribDivisor(e,0),this.disableAttributeByIndex(e))}disableAttributeByIndex(e){this._gl.disableVertexAttribArray(e),this._vertexAttribArraysEnabled[e]=!1,this._currentBufferPointers[e].active=!1}draw(e,t,r,s){this.drawElementsType(+!e,t,r,s)}drawPointClouds(e,t,r){this.drawArraysType(2,e,t,r)}drawUnIndexed(e,t,r,s){this.drawArraysType(+!e,t,r,s)}drawElementsType(e,t,r,s){this.applyStates(),this._reportDrawCall();let i=this._drawMode(e),a=this._uintIndicesCurrentlySet?this._gl.UNSIGNED_INT:this._gl.UNSIGNED_SHORT,n=this._uintIndicesCurrentlySet?4:2;s?this._gl.drawElementsInstanced(i,r,a,t*n,s):this._gl.drawElements(i,r,a,t*n)}drawArraysType(e,t,r,s){this.applyStates(),this._reportDrawCall();let i=this._drawMode(e);s?this._gl.drawArraysInstanced(i,t,r,s):this._gl.drawArrays(i,t,r)}_drawMode(e){switch(e){case 0:default:return this._gl.TRIANGLES;case 2:case 3:return this._gl.POINTS;case 1:case 4:return this._gl.LINES;case 5:return this._gl.LINE_LOOP;case 6:return this._gl.LINE_STRIP;case 7:return this._gl.TRIANGLE_STRIP;case 8:return this._gl.TRIANGLE_FAN}}_releaseEffect(e){this._compiledEffects[e._key]&&delete this._compiledEffects[e._key];let t=e.getPipelineContext();t&&this._deletePipelineContext(t)}_deletePipelineContext(e){e&&e.program&&(e.program.__SPECTOR_rebuildProgram=null,(0,d.resetCachedPipeline)(e),this._gl&&(this._currentProgram===e.program&&this._setProgram(null),this._gl.deleteProgram(e.program)))}_getGlobalDefines(e){return(0,f._GetGlobalDefines)(e,this.isNDCHalfZRange,this.useReverseDepthBuffer,this.useExactSrgbConversions)}createEffect(e,s,i,a,n,_,l,h,u,o=0,c){let g="string"==typeof e?e:e.vertexToken||e.vertexSource||e.vertexElement||e.vertex,f="string"==typeof e?e:e.fragmentToken||e.fragmentSource||e.fragmentElement||e.fragment,d=this._getGlobalDefines(),E=void 0!==s.attributes,T=n??s.defines??"";d&&(T+=d);let R=g+"+"+f+"@"+T;if(this._compiledEffects[R]){let e=this._compiledEffects[R];return l&&e.isReady()&&l(e),e._refCount++,e}this._gl&&(0,r.getStateObject)(this._gl);let A=new t.Effect(e,s,E?this:i,a,this,n,_,l,h,u,R,s.shaderLanguage??o,s.extraInitializationsAsync??c);return this._compiledEffects[R]=A,A}_getShaderSource(e){return this._gl.getShaderSource(e)}createRawShaderProgram(e,t,s,i,a=null){let n=(0,r.getStateObject)(this._gl);return n._contextWasLost=this._contextWasLost,n.validateShaderPrograms=this.validateShaderPrograms,(0,r.createRawShaderProgram)(e,t,s,i||this._gl,a)}createShaderProgram(e,t,s,i,a,n=null){let _=(0,r.getStateObject)(this._gl);return _._contextWasLost=this._contextWasLost,_.validateShaderPrograms=this.validateShaderPrograms,(0,r.createShaderProgram)(e,t,s,i,a||this._gl,n)}inlineShaderCode(e){return e}createPipelineContext(e){this._gl&&((0,r.getStateObject)(this._gl).parallelShaderCompile=this._caps.parallelShaderCompile);let t=(0,r.createPipelineContext)(this._gl,e);return t.engine=this,t}createMaterialContext(){}createDrawContext(){}_finalizePipelineContext(e){return(0,r._finalizePipelineContext)(e,this._gl,this.validateShaderPrograms)}_preparePipelineContextAsync(e,t,s,i,a,n,_,l,h,u,o){let c=(0,r.getStateObject)(this._gl);return c._contextWasLost=this._contextWasLost,c.validateShaderPrograms=this.validateShaderPrograms,c._createShaderProgramInjection=this._createShaderProgram.bind(this),c.createRawShaderProgramInjection=this.createRawShaderProgram.bind(this),c.createShaderProgramInjection=this.createShaderProgram.bind(this),c.loadFileInjection=this._loadFile.bind(this),(0,r._preparePipelineContext)(e,t,s,i,a,n,_,l,h,u,o)}_createShaderProgram(e,t,s,i,a=null){return(0,r._createShaderProgram)(e,t,s,i,a)}_isRenderingStateCompiled(e){return!this._isDisposed&&(0,r._isRenderingStateCompiled)(e,this._gl,this.validateShaderPrograms)}_executeWhenRenderingStateIsCompiled(e,t){(0,r._executeWhenRenderingStateIsCompiled)(e,t)}getUniforms(e,t){let r=[];for(let s=0;s<t.length;s++)r.push(this._gl.getUniformLocation(e.program,t[s]));return r}getAttributes(e,t){let r=[];for(let s=0;s<t.length;s++)try{r.push(this._gl.getAttribLocation(e.program,t[s]))}catch(e){r.push(-1)}return r}enableEffect(e){(e=null!==e&&(0,i.IsWrapper)(e)?e.effect:e)&&e!==this._currentEffect&&(this._stencilStateComposer.stencilMaterial=void 0,this.bindSamplers(e),this._currentEffect=e,e.onBind&&e.onBind(e),e._onBindObservable&&e._onBindObservable.notifyObservers(e))}setInt(e,t){return!!e&&(this._gl.uniform1i(e,t),!0)}setInt2(e,t,r){return!!e&&(this._gl.uniform2i(e,t,r),!0)}setInt3(e,t,r,s){return!!e&&(this._gl.uniform3i(e,t,r,s),!0)}setInt4(e,t,r,s,i){return!!e&&(this._gl.uniform4i(e,t,r,s,i),!0)}setIntArray(e,t){return!!e&&(this._gl.uniform1iv(e,t),!0)}setIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2iv(e,t),!0)}setIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3iv(e,t),!0)}setIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4iv(e,t),!0)}setUInt(e,t){return!!e&&(this._gl.uniform1ui(e,t),!0)}setUInt2(e,t,r){return!!e&&(this._gl.uniform2ui(e,t,r),!0)}setUInt3(e,t,r,s){return!!e&&(this._gl.uniform3ui(e,t,r,s),!0)}setUInt4(e,t,r,s,i){return!!e&&(this._gl.uniform4ui(e,t,r,s,i),!0)}setUIntArray(e,t){return!!e&&(this._gl.uniform1uiv(e,t),!0)}setUIntArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2uiv(e,t),!0)}setUIntArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3uiv(e,t),!0)}setUIntArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4uiv(e,t),!0)}setArray(e,t){return!!e&&!(t.length<1)&&(this._gl.uniform1fv(e,t),!0)}setArray2(e,t){return!!e&&t.length%2==0&&(this._gl.uniform2fv(e,t),!0)}setArray3(e,t){return!!e&&t.length%3==0&&(this._gl.uniform3fv(e,t),!0)}setArray4(e,t){return!!e&&t.length%4==0&&(this._gl.uniform4fv(e,t),!0)}setMatrices(e,t){return!!e&&(this._gl.uniformMatrix4fv(e,!1,t),!0)}setMatrix3x3(e,t){return!!e&&(this._gl.uniformMatrix3fv(e,!1,t),!0)}setMatrix2x2(e,t){return!!e&&(this._gl.uniformMatrix2fv(e,!1,t),!0)}setFloat(e,t){return!!e&&(this._gl.uniform1f(e,t),!0)}setFloat2(e,t,r){return!!e&&(this._gl.uniform2f(e,t,r),!0)}setFloat3(e,t,r,s){return!!e&&(this._gl.uniform3f(e,t,r,s),!0)}setFloat4(e,t,r,s,i){return!!e&&(this._gl.uniform4f(e,t,r,s,i),!0)}applyStates(){if(this._depthCullingState.apply(this._gl),this._stencilStateComposer.apply(this._gl),this._alphaState.apply(this._gl,this._currentRenderTarget&&this._currentRenderTarget.textures?this._currentRenderTarget.textures.length:1),this._colorWriteChanged){this._colorWriteChanged=!1;let e=this._colorWrite;this._gl.colorMask(e,e,e,e)}}wipeCaches(e){(!this.preventCacheWipeBetweenFrames||e)&&(this._currentEffect=null,this._viewportCached.x=0,this._viewportCached.y=0,this._viewportCached.z=0,this._viewportCached.w=0,this._unbindVertexArrayObject(),e&&(this._currentProgram=null,this.resetTextureCache(),this._stencilStateComposer.reset(),this._depthCullingState.reset(),this._depthCullingState.depthFunc=this._gl.LEQUAL,this._alphaState.reset(),this._resetAlphaMode(),this._colorWrite=!0,this._colorWriteChanged=!0,this._unpackFlipYCached=null,this._gl.pixelStorei(this._gl.UNPACK_COLORSPACE_CONVERSION_WEBGL,this._gl.NONE),this._gl.pixelStorei(this._gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL,0),this._mustWipeVertexAttributes=!0,this.unbindAllAttributes()),this._resetVertexBufferBinding(),this._cachedIndexBuffer=null,this._cachedEffectForVertexBuffers=null,this.bindIndexBuffer(null))}_getSamplingParameters(e,t){let r=this._gl,s=r.NEAREST,i=r.NEAREST,a=!1;switch(e){case 11:s=r.LINEAR,i=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 3:s=r.LINEAR,a=!0,i=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 8:a=!0,s=r.NEAREST,i=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 4:s=r.NEAREST,i=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 5:s=r.NEAREST,i=t?r.LINEAR_MIPMAP_NEAREST:r.LINEAR;break;case 6:a=!0,s=r.NEAREST,i=t?r.LINEAR_MIPMAP_LINEAR:r.LINEAR;break;case 7:s=r.NEAREST,i=r.LINEAR;break;case 1:s=r.NEAREST,i=r.NEAREST;break;case 9:s=r.LINEAR,i=t?r.NEAREST_MIPMAP_NEAREST:r.NEAREST;break;case 10:a=!0,s=r.LINEAR,i=t?r.NEAREST_MIPMAP_LINEAR:r.NEAREST;break;case 2:s=r.LINEAR,i=r.LINEAR;break;case 12:s=r.LINEAR,i=r.NEAREST}return{min:i,mag:s,hasMipMaps:a}}_createTexture(){let e=this._gl.createTexture();if(!e)throw Error("Unable to create texture");return e}_createHardwareTexture(){return new c(this._createTexture(),this._gl)}_createInternalTexture(e,t,r=!0,s=0){let i,n,_=!1,l=0,h=3,u=5,o=!1,c=1,f=!1,d=0,R=!1;void 0!==t&&"object"==typeof t?(i=!!t.generateMipMaps,_=!!t.createMipMaps,l=void 0===t.type?0:t.type,h=void 0===t.samplingMode?3:t.samplingMode,u=void 0===t.format?5:t.format,o=void 0!==t.useSRGBBuffer&&t.useSRGBBuffer,c=t.samples??1,n=t.label,f=!!t.createMSAATexture,d=t.comparisonFunction||0,R=!!t.isCube):i=!!t,o&&(o=this._caps.supportSRGBBuffers&&(this.webGLVersion>1||this.isWebGPU)),(1!==l||this._caps.textureFloatLinearFiltering)&&(2!==l||this._caps.textureHalfFloatLinearFiltering)||(h=1),1!==l||this._caps.textureFloat||(l=0,a.Logger.Warn("Float textures are not supported. Type forced to TEXTURETYPE_UNSIGNED_BYTE"));let A=E(u),p=T(u),x=this._gl,S=new g.InternalTexture(this,s),b=e.width||e,m=e.height||e,C=e.depth||0,B=e.layers||0,P=this._getSamplingParameters(h,(i||_)&&!A),L=0!==B?x.TEXTURE_2D_ARRAY:0!==C?x.TEXTURE_3D:R?x.TEXTURE_CUBE_MAP:x.TEXTURE_2D,G=A?this._getInternalFormatFromDepthTextureFormat(u,!0,p):this._getRGBABufferInternalSizedFormat(l,u,o),I=A?p?x.DEPTH_STENCIL:x.DEPTH_COMPONENT:this._getInternalFormat(u),M=A?this._getWebGLTextureTypeFromDepthTextureFormat(u):this._getWebGLTextureType(l);if(this._bindTextureDirectly(L,S),0!==B)S.is2DArray=!0,x.texImage3D(L,0,G,b,m,B,0,I,M,null);else if(0!==C)S.is3D=!0,x.texImage3D(L,0,G,b,m,C,0,I,M,null);else if(R){S.isCube=!0;for(let e=0;e<6;e++)x.texImage2D(x.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,G,b,m,0,I,M,null)}else x.texImage2D(L,0,G,b,m,0,I,M,null);if(x.texParameteri(L,x.TEXTURE_MAG_FILTER,P.mag),x.texParameteri(L,x.TEXTURE_MIN_FILTER,P.min),x.texParameteri(L,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(L,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),A&&this.webGLVersion>1&&(0===d?(x.texParameteri(L,x.TEXTURE_COMPARE_FUNC,515),x.texParameteri(L,x.TEXTURE_COMPARE_MODE,x.NONE)):(x.texParameteri(L,x.TEXTURE_COMPARE_FUNC,d),x.texParameteri(L,x.TEXTURE_COMPARE_MODE,x.COMPARE_REF_TO_TEXTURE))),(i||_)&&this._gl.generateMipmap(L),this._bindTextureDirectly(L,null),S._useSRGBBuffer=o,S.baseWidth=b,S.baseHeight=m,S.width=b,S.height=m,S.depth=B||C,S.isReady=!0,S.samples=c,S.generateMipMaps=i,S.samplingMode=h,S.type=l,S.format=u,S.label=n,S.comparisonFunction=d,this._internalTexturesCache.push(S),f){let e;if(!(e=E(S.format)?this._setupFramebufferDepthAttachments(T(S.format),19!==S.format,S.width,S.height,c,S.format,!0):this._createRenderBuffer(S.width,S.height,c,-1,this._getRGBABufferInternalSizedFormat(S.type,S.format,S._useSRGBBuffer),-1)))throw Error("Unable to create render buffer");S._autoMSAAManagement=!0;let t=S._hardwareTexture;t||(t=S._hardwareTexture=this._createHardwareTexture()),t.addMSAARenderBuffer(e)}return S}_getUseSRGBBuffer(e,t){return e&&this._caps.supportSRGBBuffers&&(this.webGLVersion>1||t)}createTexture(e,t,r,s,i=3,a=null,n=null,_=null,l=null,h=null,u=null,o,c,f,d){return this._createTextureBase(e,t,r,s,i,a,n,(...e)=>this._prepareWebGLTexture(...e,h),(e,t,r,i,a,n)=>{let _=this._gl,l=r.width===e&&r.height===t;a._creationFlags=f??0;let h=this._getTexImageParametersForCreateTexture(a.format,a._useSRGBBuffer);if(l)return _.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),!1;let u=this._caps.maxTextureSize;if(r.width>u||r.height>u||!this._supportsHardwareTextureRescaling)return this._prepareWorkingCanvas(),!!this._workingCanvas&&!!this._workingContext&&(this._workingCanvas.width=e,this._workingCanvas.height=t,this._workingContext.drawImage(r,0,0,r.width,r.height,0,0,e,t),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,this._workingCanvas),a.width=e,a.height=t,!1);{let e=new g.InternalTexture(this,2);this._bindTextureDirectly(_.TEXTURE_2D,e,!0),_.texImage2D(_.TEXTURE_2D,0,h.internalFormat,h.format,h.type,r),this._rescaleTexture(e,a,s,h.format,()=>{this._releaseTexture(e),this._bindTextureDirectly(_.TEXTURE_2D,a,!0),n()})}return!0},_,l,h,u,o,c,d)}_getTexImageParametersForCreateTexture(e,t){let r,s;return 1===this.webGLVersion?s=r=this._getInternalFormat(e,t):(r=this._getInternalFormat(e,!1),s=this._getRGBABufferInternalSizedFormat(0,e,t)),{internalFormat:s,format:r,type:this._gl.UNSIGNED_BYTE}}_rescaleTexture(e,t,r,s,i){}_unpackFlipY(e){this._unpackFlipYCached!==e&&(this._gl.pixelStorei(this._gl.UNPACK_FLIP_Y_WEBGL,+!!e),this.enableUnpackFlipYCached&&(this._unpackFlipYCached=e))}_getUnpackAlignement(){return this._gl.getParameter(this._gl.UNPACK_ALIGNMENT)}_getTextureTarget(e){return e.isCube?this._gl.TEXTURE_CUBE_MAP:e.is3D?this._gl.TEXTURE_3D:e.is2DArray||e.isMultiview?this._gl.TEXTURE_2D_ARRAY:this._gl.TEXTURE_2D}updateTextureSamplingMode(e,t,r=!1){let s=this._getTextureTarget(t),i=this._getSamplingParameters(e,t.useMipMaps||r);this._setTextureParameterInteger(s,this._gl.TEXTURE_MAG_FILTER,i.mag,t),this._setTextureParameterInteger(s,this._gl.TEXTURE_MIN_FILTER,i.min),r&&i.hasMipMaps&&(t.generateMipMaps=!0,this._gl.generateMipmap(s)),this._bindTextureDirectly(s,null),t.samplingMode=e}updateTextureDimensions(e,t,r,s=1){}updateTextureWrappingMode(e,t,r=null,s=null){let i=this._getTextureTarget(e);null!==t&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t),e),e._cachedWrapU=t),null!==r&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(r),e),e._cachedWrapV=r),(e.is2DArray||e.is3D)&&null!==s&&(this._setTextureParameterInteger(i,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(s),e),e._cachedWrapR=s),this._bindTextureDirectly(i,null)}_uploadCompressedDataToTextureDirectly(e,t,r,s,i,a=0,n=0){let _=this._gl,l=_.TEXTURE_2D;if(e.isCube&&(l=_.TEXTURE_CUBE_MAP_POSITIVE_X+a),e._useSRGBBuffer)switch(t){case 37492:case 36196:this._caps.etc2?t=_.COMPRESSED_SRGB8_ETC2:e._useSRGBBuffer=!1;break;case 37496:this._caps.etc2?t=_.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:e._useSRGBBuffer=!1;break;case 36492:t=_.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT;break;case 37808:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR;break;case 37809:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR;break;case 37810:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR;break;case 37811:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR;break;case 37812:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR;break;case 37813:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR;break;case 37814:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR;break;case 37815:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR;break;case 37816:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR;break;case 37817:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR;break;case 37818:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR;break;case 37819:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR;break;case 37820:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR;break;case 37821:t=_.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR;break;case 33776:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33777:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT:e._useSRGBBuffer=!1;break;case 33779:this._caps.s3tc_srgb?t=_.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT:e._useSRGBBuffer=!1;break;default:e._useSRGBBuffer=!1}if(e.generateMipMaps){let a=e._hardwareTexture;a.memoryAllocated||(_.texStorage2D(e.isCube?_.TEXTURE_CUBE_MAP:_.TEXTURE_2D,Math.floor(Math.log2(Math.max(r,s)))+1,t,e.width,e.height),a.memoryAllocated=!0),this._gl.compressedTexSubImage2D(l,n,0,0,r,s,t,i)}else this._gl.compressedTexImage2D(l,n,t,r,s,0,i)}_uploadDataToTextureDirectly(e,t,r=0,s=0,i,a=!1){let n=this._gl,_=this._getWebGLTextureType(e.type),l=this._getInternalFormat(e.format),h=void 0===i?this._getRGBABufferInternalSizedFormat(e.type,e.format,e._useSRGBBuffer):this._getInternalFormat(i,e._useSRGBBuffer);this._unpackFlipY(e.invertY);let u=n.TEXTURE_2D;e.isCube&&(u=n.TEXTURE_CUBE_MAP_POSITIVE_X+r);let o=Math.round(Math.log(e.width)*Math.LOG2E),c=Math.round(Math.log(e.height)*Math.LOG2E),g=a?e.width:Math.pow(2,Math.max(o-s,0)),f=a?e.height:Math.pow(2,Math.max(c-s,0));n.texImage2D(u,s,h,g,f,0,l,_,t)}updateTextureData(e,t,r,s,i,a,n=0,_=0,l=!1){let h=this._gl,u=this._getWebGLTextureType(e.type),o=this._getInternalFormat(e.format);this._unpackFlipY(e.invertY);let c=h.TEXTURE_2D,g=h.TEXTURE_2D;e.isCube&&(g=h.TEXTURE_CUBE_MAP_POSITIVE_X+n,c=h.TEXTURE_CUBE_MAP),this._bindTextureDirectly(c,e,!0),h.texSubImage2D(g,_,r,s,i,a,o,u,t),l&&this._gl.generateMipmap(g),this._bindTextureDirectly(c,null)}_uploadArrayBufferViewToTexture(e,t,r=0,s=0){let i=this._gl,a=e.isCube?i.TEXTURE_CUBE_MAP:i.TEXTURE_2D;this._bindTextureDirectly(a,e,!0),this._uploadDataToTextureDirectly(e,t,r,s),this._bindTextureDirectly(a,null,!0)}_prepareWebGLTextureContinuation(e,t,r,s,i){let a=this._gl;if(!a)return;let n=this._getSamplingParameters(i,!r);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,n.mag),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,n.min),r||s||a.generateMipmap(a.TEXTURE_2D),this._bindTextureDirectly(a.TEXTURE_2D,null),t&&t.removePendingData(e),e.onLoadedObservable.notifyObservers(e),e.onLoadedObservable.clear()}_prepareWebGLTexture(e,t,r,s,i,a,n,_,l,h){let u=this.getCaps().maxTextureSize,c=Math.min(u,this.needPOTTextures?(0,o.GetExponentOfTwo)(s.width,u):s.width),g=Math.min(u,this.needPOTTextures?(0,o.GetExponentOfTwo)(s.height,u):s.height),f=this._gl;if(f){if(!e._hardwareTexture){r&&r.removePendingData(e);return}this._bindTextureDirectly(f.TEXTURE_2D,e,!0),this._unpackFlipY(void 0===i||!!i),e.baseWidth=s.width,e.baseHeight=s.height,e.width=c,e.height=g,e.isReady=!0,e.type=-1!==e.type?e.type:0,e.format=-1!==e.format?e.format:h??(".jpg"!==t||e._useSRGBBuffer?5:4),_(c,g,s,t,e,()=>{this._prepareWebGLTextureContinuation(e,r,a,n,l)})||this._prepareWebGLTextureContinuation(e,r,a,n,l)}}_getInternalFormatFromDepthTextureFormat(e,t,r){let s=this._gl;if(!t)return s.STENCIL_INDEX8;let i=r?s.DEPTH_STENCIL:s.DEPTH_COMPONENT;return this.webGLVersion>1?15===e?i=s.DEPTH_COMPONENT16:16===e?i=s.DEPTH_COMPONENT24:17===e||13===e?i=r?s.DEPTH24_STENCIL8:s.DEPTH_COMPONENT24:14===e?i=s.DEPTH_COMPONENT32F:18===e&&(i=r?s.DEPTH32F_STENCIL8:s.DEPTH_COMPONENT32F):i=s.DEPTH_COMPONENT16,i}_getWebGLTextureTypeFromDepthTextureFormat(e){let t=this._gl,r=t.UNSIGNED_INT;return 15===e?r=t.UNSIGNED_SHORT:17===e||13===e?r=t.UNSIGNED_INT_24_8:14===e?r=t.FLOAT:18===e?r=t.FLOAT_32_UNSIGNED_INT_24_8_REV:19===e&&(r=t.UNSIGNED_BYTE),r}_setupFramebufferDepthAttachments(e,t,r,s,i=1,a,n=!1){let _=this._gl;a=a??(e?13:14);let l=this._getInternalFormatFromDepthTextureFormat(a,t,e);return e&&t?this._createRenderBuffer(r,s,i,_.DEPTH_STENCIL,l,n?-1:_.DEPTH_STENCIL_ATTACHMENT):t?this._createRenderBuffer(r,s,i,l,l,n?-1:_.DEPTH_ATTACHMENT):e?this._createRenderBuffer(r,s,i,l,l,n?-1:_.STENCIL_ATTACHMENT):null}_createRenderBuffer(e,t,r,s,i,a,n=!0){let _=this._gl.createRenderbuffer();return this._updateRenderBuffer(_,e,t,r,s,i,a,n)}_updateRenderBuffer(e,t,r,s,i,a,n,_=!0){let l=this._gl;return l.bindRenderbuffer(l.RENDERBUFFER,e),s>1&&l.renderbufferStorageMultisample?l.renderbufferStorageMultisample(l.RENDERBUFFER,s,a,t,r):l.renderbufferStorage(l.RENDERBUFFER,i,t,r),-1!==n&&l.framebufferRenderbuffer(l.FRAMEBUFFER,n,l.RENDERBUFFER,e),_&&l.bindRenderbuffer(l.RENDERBUFFER,null),e}_releaseTexture(e){this._deleteTexture(e._hardwareTexture),this.unbindAllTextures();let t=this._internalTexturesCache.indexOf(e);-1!==t&&this._internalTexturesCache.splice(t,1),e._lodTextureHigh&&e._lodTextureHigh.dispose(),e._lodTextureMid&&e._lodTextureMid.dispose(),e._lodTextureLow&&e._lodTextureLow.dispose(),e._irradianceTexture&&e._irradianceTexture.dispose()}_deleteTexture(e){e?.release()}_setProgram(e){this._currentProgram!==e&&((0,r._setProgram)(e,this._gl),this._currentProgram=e)}bindSamplers(e){let t=e.getPipelineContext();this._setProgram(t.program);let r=e.getSamplers();for(let t=0;t<r.length;t++){let s=e.getUniform(r[t]);s&&(this._boundUniforms[t]=s)}this._currentEffect=null}_activateCurrentTexture(){this._currentTextureChannel!==this._activeChannel&&(this._gl.activeTexture(this._gl.TEXTURE0+this._activeChannel),this._currentTextureChannel=this._activeChannel)}_bindTextureDirectly(e,t,r=!1,s=!1){let i=!1,n=t&&t._associatedChannel>-1;if(r&&n&&(this._activeChannel=t._associatedChannel),this._boundTexturesCache[this._activeChannel]!==t||s){if(this._activateCurrentTexture(),t&&t.isMultiview)throw a.Logger.Error(["_bindTextureDirectly called with a multiview texture!",e,t]),"_bindTextureDirectly called with a multiview texture!";this._gl.bindTexture(e,t?._hardwareTexture?.underlyingResource??null),this._boundTexturesCache[this._activeChannel]=t,t&&(t._associatedChannel=this._activeChannel)}else r&&(i=!0,this._activateCurrentTexture());return n&&!r&&this._bindSamplerUniformToChannel(t._associatedChannel,this._activeChannel),i}_bindTexture(e,t,r){if(void 0===e)return;t&&(t._associatedChannel=e),this._activeChannel=e;let s=t?this._getTextureTarget(t):this._gl.TEXTURE_2D;this._bindTextureDirectly(s,t)}unbindAllTextures(){for(let e=0;e<this._maxSimultaneousTextures;e++)this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))}setTexture(e,t,r,s){void 0!==e&&(t&&(this._boundUniforms[e]=t),this._setTexture(e,r))}_bindSamplerUniformToChannel(e,t){let r=this._boundUniforms[e];r&&r._currentState!==t&&(this._gl.uniform1i(r,t),r._currentState=t)}_getTextureWrapMode(e){switch(e){case 1:break;case 0:return this._gl.CLAMP_TO_EDGE;case 2:return this._gl.MIRRORED_REPEAT}return this._gl.REPEAT}_setTexture(e,t,r=!1,s=!1,i=""){let a;if(!t)return null!=this._boundTexturesCache[e]&&(this._activeChannel=e,this._bindTextureDirectly(this._gl.TEXTURE_2D,null),this._bindTextureDirectly(this._gl.TEXTURE_CUBE_MAP,null),this.webGLVersion>1&&(this._bindTextureDirectly(this._gl.TEXTURE_3D,null),this._bindTextureDirectly(this._gl.TEXTURE_2D_ARRAY,null))),!1;if(t.video){this._activeChannel=e;let r=t.getInternalTexture();r&&(r._associatedChannel=e),t.update()}else if(4===t.delayLoadState)return t.delayLoad(),!1;a=s?t.depthStencilTexture:t.isReady()?t.getInternalTexture():t.isCube?this.emptyCubeTexture:t.is3D?this.emptyTexture3D:t.is2DArray?this.emptyTexture2DArray:this.emptyTexture,!r&&a&&(a._associatedChannel=e);let n=!0;this._boundTexturesCache[e]===a&&(r||this._bindSamplerUniformToChannel(a._associatedChannel,e),n=!1),this._activeChannel=e;let _=this._getTextureTarget(a);if(n&&this._bindTextureDirectly(_,a,r),a&&!a.isMultiview){if(a.isCube&&a._cachedCoordinatesMode!==t.coordinatesMode){a._cachedCoordinatesMode=t.coordinatesMode;let e=+(3!==t.coordinatesMode&&5!==t.coordinatesMode);t.wrapU=e,t.wrapV=e}a._cachedWrapU!==t.wrapU&&(a._cachedWrapU=t.wrapU,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_S,this._getTextureWrapMode(t.wrapU),a)),a._cachedWrapV!==t.wrapV&&(a._cachedWrapV=t.wrapV,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_T,this._getTextureWrapMode(t.wrapV),a)),a.is3D&&a._cachedWrapR!==t.wrapR&&(a._cachedWrapR=t.wrapR,this._setTextureParameterInteger(_,this._gl.TEXTURE_WRAP_R,this._getTextureWrapMode(t.wrapR),a)),this._setAnisotropicLevel(_,a,t.anisotropicFilteringLevel)}return!0}setTextureArray(e,t,r,s){if(void 0!==e&&t){this._textureUnits&&this._textureUnits.length===r.length||(this._textureUnits=new Int32Array(r.length));for(let t=0;t<r.length;t++){let s=r[t].getInternalTexture();s?(this._textureUnits[t]=e+t,s._associatedChannel=e+t):this._textureUnits[t]=-1}this._gl.uniform1iv(t,this._textureUnits);for(let e=0;e<r.length;e++)this._setTexture(this._textureUnits[e],r[e],!0)}}_setAnisotropicLevel(e,t,r){let s=this._caps.textureAnisotropicFilterExtension;11!==t.samplingMode&&3!==t.samplingMode&&2!==t.samplingMode&&(r=1),s&&t._cachedAnisotropicFilteringLevel!==r&&(this._setTextureParameterFloat(e,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(r,this._caps.maxAnisotropy),t),t._cachedAnisotropicFilteringLevel=r)}_setTextureParameterFloat(e,t,r,s){this._bindTextureDirectly(e,s,!0,!0),this._gl.texParameterf(e,t,r)}_setTextureParameterInteger(e,t,r,s){s&&this._bindTextureDirectly(e,s,!0,!0),this._gl.texParameteri(e,t,r)}unbindAllAttributes(){if(this._mustWipeVertexAttributes){this._mustWipeVertexAttributes=!1;for(let e=0;e<this._caps.maxVertexAttribs;e++)this.disableAttributeByIndex(e);return}for(let e=0,t=this._vertexAttribArraysEnabled.length;e<t;e++)!(e>=this._caps.maxVertexAttribs)&&this._vertexAttribArraysEnabled[e]&&this.disableAttributeByIndex(e)}releaseEffects(){this._compiledEffects={},this.onReleaseEffectsObservable.notifyObservers(this)}dispose(){(0,n.IsWindowObjectExist)()&&this._renderingCanvas&&(this._renderingCanvas.removeEventListener("webglcontextlost",this._onContextLost),this._onContextRestored&&this._renderingCanvas.removeEventListener("webglcontextrestored",this._onContextRestored)),super.dispose(),this._dummyFramebuffer&&this._gl.deleteFramebuffer(this._dummyFramebuffer),this.unbindAllAttributes(),this._boundUniforms={},this._workingCanvas=null,this._workingContext=null,this._currentBufferPointers.length=0,this._currentProgram=null,this._creationOptions.loseContextOnDispose&&this._gl.getExtension("WEBGL_lose_context")?.loseContext(),(0,r.deleteStateObject)(this._gl)}attachContextLostEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextlost",e,!1)}attachContextRestoredEvent(e){this._renderingCanvas&&this._renderingCanvas.addEventListener("webglcontextrestored",e,!1)}getError(){return this._gl.getError()}_canRenderToFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(1)}_canRenderToHalfFloatFramebuffer(){return this._webGLVersion>1?this._caps.colorBufferFloat:this._canRenderToFramebuffer(2)}_canRenderToFramebuffer(e){let t=this._gl;for(;t.getError()!==t.NO_ERROR;);let r=!0,s=t.createTexture();t.bindTexture(t.TEXTURE_2D,s),t.texImage2D(t.TEXTURE_2D,0,this._getRGBABufferInternalSizedFormat(e),1,1,0,t.RGBA,this._getWebGLTextureType(e),null),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST);let i=t.createFramebuffer();t.bindFramebuffer(t.FRAMEBUFFER,i),t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,s,0);let a=t.checkFramebufferStatus(t.FRAMEBUFFER);if((r=(r=r&&a===t.FRAMEBUFFER_COMPLETE)&&t.getError()===t.NO_ERROR)&&(t.clear(t.COLOR_BUFFER_BIT),r=r&&t.getError()===t.NO_ERROR),r){t.bindFramebuffer(t.FRAMEBUFFER,null);let e=t.RGBA,s=t.UNSIGNED_BYTE,i=new Uint8Array(4);t.readPixels(0,0,1,1,e,s,i),r=r&&t.getError()===t.NO_ERROR}for(t.deleteTexture(s),t.deleteFramebuffer(i),t.bindFramebuffer(t.FRAMEBUFFER,null);!r&&t.getError()!==t.NO_ERROR;);return r}_getWebGLTextureType(e){if(1===this._webGLVersion){switch(e){case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT_OES;case 0:break;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5}return this._gl.UNSIGNED_BYTE}switch(e){case 3:return this._gl.BYTE;case 0:break;case 4:return this._gl.SHORT;case 5:return this._gl.UNSIGNED_SHORT;case 6:return this._gl.INT;case 7:return this._gl.UNSIGNED_INT;case 1:return this._gl.FLOAT;case 2:return this._gl.HALF_FLOAT;case 8:return this._gl.UNSIGNED_SHORT_4_4_4_4;case 9:return this._gl.UNSIGNED_SHORT_5_5_5_1;case 10:return this._gl.UNSIGNED_SHORT_5_6_5;case 11:return this._gl.UNSIGNED_INT_2_10_10_10_REV;case 12:return this._gl.UNSIGNED_INT_24_8;case 13:return this._gl.UNSIGNED_INT_10F_11F_11F_REV;case 14:return this._gl.UNSIGNED_INT_5_9_9_9_REV;case 15:return this._gl.FLOAT_32_UNSIGNED_INT_24_8_REV}return this._gl.UNSIGNED_BYTE}_getInternalFormat(e,t=!1){let r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA;switch(e){case 0:r=this._gl.ALPHA;break;case 1:r=this._gl.LUMINANCE;break;case 2:r=this._gl.LUMINANCE_ALPHA;break;case 6:case 33322:case 36760:r=this._gl.RED;break;case 7:case 33324:case 36761:r=this._gl.RG;break;case 4:case 32852:case 36762:r=t?this._glSRGBExtensionValues.SRGB:this._gl.RGB;break;case 5:case 32859:case 36763:r=t?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA}if(this._webGLVersion>1)switch(e){case 8:r=this._gl.RED_INTEGER;break;case 9:r=this._gl.RG_INTEGER;break;case 10:r=this._gl.RGB_INTEGER;break;case 11:r=this._gl.RGBA_INTEGER}return r}_getRGBABufferInternalSizedFormat(e,t,r=!1){if(1===this._webGLVersion){if(void 0!==t)switch(t){case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;case 4:return r?this._glSRGBExtensionValues.SRGB:this._gl.RGB}return this._gl.RGBA}switch(e){case 3:switch(t){case 6:return this._gl.R8_SNORM;case 7:return this._gl.RG8_SNORM;case 4:return this._gl.RGB8_SNORM;case 8:return this._gl.R8I;case 9:return this._gl.RG8I;case 10:return this._gl.RGB8I;case 11:return this._gl.RGBA8I;default:return this._gl.RGBA8_SNORM}case 0:switch(t){case 6:return this._gl.R8;case 7:return this._gl.RG8;case 4:return r?this._glSRGBExtensionValues.SRGB8:this._gl.RGB8;case 5:return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8;case 8:return this._gl.R8UI;case 9:return this._gl.RG8UI;case 10:return this._gl.RGB8UI;case 11:return this._gl.RGBA8UI;case 0:return this._gl.ALPHA;case 1:return this._gl.LUMINANCE;case 2:return this._gl.LUMINANCE_ALPHA;default:return this._gl.RGBA8}case 4:switch(t){case 8:return this._gl.R16I;case 36760:return this._gl.R16_SNORM_EXT;case 36761:return this._gl.RG16_SNORM_EXT;case 36762:return this._gl.RGB16_SNORM_EXT;case 36763:return this._gl.RGBA16_SNORM_EXT;case 9:return this._gl.RG16I;case 10:return this._gl.RGB16I;default:return this._gl.RGBA16I}case 5:switch(t){case 8:return this._gl.R16UI;case 33322:return this._gl.R16_EXT;case 33324:return this._gl.RG16_EXT;case 32852:return this._gl.RGB16_EXT;case 32859:return this._gl.RGBA16_EXT;case 9:return this._gl.RG16UI;case 10:return this._gl.RGB16UI;default:return this._gl.RGBA16UI}case 6:switch(t){case 8:return this._gl.R32I;case 9:return this._gl.RG32I;case 10:return this._gl.RGB32I;default:return this._gl.RGBA32I}case 7:switch(t){case 8:return this._gl.R32UI;case 9:return this._gl.RG32UI;case 10:return this._gl.RGB32UI;default:return this._gl.RGBA32UI}case 1:switch(t){case 6:return this._gl.R32F;case 7:return this._gl.RG32F;case 4:return this._gl.RGB32F;default:return this._gl.RGBA32F}case 2:switch(t){case 6:return this._gl.R16F;case 7:return this._gl.RG16F;case 4:return this._gl.RGB16F;default:return this._gl.RGBA16F}case 10:return this._gl.RGB565;case 13:return this._gl.R11F_G11F_B10F;case 14:return this._gl.RGB9_E5;case 8:return this._gl.RGBA4;case 9:return this._gl.RGB5_A1;case 11:switch(t){case 5:default:return this._gl.RGB10_A2;case 11:return this._gl.RGB10_A2UI}}return r?this._glSRGBExtensionValues.SRGB8_ALPHA8:this._gl.RGBA8}readPixels(e,t,r,s,i=!0,n=!0,_=null){let l=i?this._gl.RGBA:this._gl.RGB,h=r*s*(i?4:3);if(_){if(_.length<h)return a.Logger.Error(`Data buffer is too small to store the read pixels (${_.length} should be more than ${h})`),Promise.resolve(_)}else _=new Uint8Array(h);return n&&this.flushFramebuffer(),this._gl.readPixels(e,t,r,s,l,this._gl.UNSIGNED_BYTE,_),Promise.resolve(_)}static get IsSupportedAsync(){return Promise.resolve(this.isSupported())}static get IsSupported(){return this.isSupported()}static isSupported(){if(null!==this._HasMajorPerformanceCaveat)return!this._HasMajorPerformanceCaveat;if(null===this._IsSupported)try{let e=s.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl")||e.getContext("experimental-webgl");this._IsSupported=null!=t&&!!globalThis.WebGLRenderingContext}catch(e){this._IsSupported=!1}return this._IsSupported}static get HasMajorPerformanceCaveat(){if(null===this._HasMajorPerformanceCaveat)try{let e=s.AbstractEngine._CreateCanvas(1,1),t=e.getContext("webgl",{failIfMajorPerformanceCaveat:!0})||e.getContext("experimental-webgl",{failIfMajorPerformanceCaveat:!0});this._HasMajorPerformanceCaveat=!t}catch(e){this._HasMajorPerformanceCaveat=!1}return this._HasMajorPerformanceCaveat}}p._TempClearColorUint32=new Uint32Array(4),p._TempClearColorInt32=new Int32Array(4),p.ExceptionList=[{key:"Chrome/63.0",capture:"63\\.0\\.3239\\.(\\d+)",captureConstraint:108,targets:["uniformBuffer"]},{key:"Firefox/58",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Firefox/59",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/72.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/73.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Chrome/74.+?Mobile",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/71",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome/72",capture:null,captureConstraint:null,targets:["vao"]},{key:"Mac OS.+Chrome",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:"Chrome/12\\d\\..+?Mobile",capture:null,captureConstraint:null,targets:["uniformBuffer"]},{key:".*AppleWebKit.*(15.4).*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]},{key:".*(15.4).*AppleWebKit.*Safari",capture:null,captureConstraint:null,targets:["antialias","maxMSAASamples"]}],p._ConcatenateShader=f._ConcatenateShader,p._IsSupported=null,p._HasMajorPerformanceCaveat=null,e.s(["ThinEngine",0,p],76256)},67501,82015,18799,e=>{"use strict";e.s(["IsWrapper",0,function(e){return void 0===e.getPipelineContext}],67501),e.s(["WebGLShaderProcessor",0,class{constructor(){this.shaderLanguage=0}postProcessor(e,t,r,s,i){return i.drawBuffersExtensionDisabled&&(e=e.replace(/#extension.+GL_EXT_draw_buffers.+(enable|require)/g,"")),e}}],82015);let t=/(flat\s)?\s*varying\s*.*/;e.s(["WebGL2ShaderProcessor",0,class{constructor(){this.shaderLanguage=0}attributeProcessor(e){return e.replace("attribute","in")}varyingCheck(e,r){return t.test(e)}varyingProcessor(e,t){return e.replace("varying",t?"in":"out")}postProcessor(e,t,r){let s=-1!==e.search(/#extension.+GL_EXT_draw_buffers.+require/);if(e=(e=e.replace(/#extension.+(GL_OVR_multiview2|GL_OES_standard_derivatives|GL_EXT_shader_texture_lod|GL_EXT_frag_depth|GL_EXT_draw_buffers).+(enable|require)/g,"")).replace(/texture2D\s*\(/g,"texture("),r){let r=-1!==e.search(/layout *\(location *= *0\) *out/g),i=-1!==t.indexOf("#define DUAL_SOURCE_BLENDING");i&&(e="#extension GL_EXT_blend_func_extended : require\n"+e),e=(e=(e=(e=(e=(e=(e=e.replace(/texture2DLodEXT\s*\(/g,"textureLod(")).replace(/textureCubeLodEXT\s*\(/g,"textureLod(")).replace(/textureCube\s*\(/g,"texture(")).replace(/gl_FragDepthEXT/g,"gl_FragDepth")).replace(/gl_FragColor/g,"glFragColor")).replace(/gl_FragData/g,"glFragData")).replace(/void\s+?main\s*\(/g,(s||r?"":i?"layout(location = 0, index = 0) out vec4 glFragColor;\nlayout(location = 0, index = 1) out vec4 glFragColor2;\n":"layout(location = 0) out vec4 glFragColor;\n")+"void main(")}else if(t.indexOf("#define VERTEXOUTPUT_INVARIANT")>=0&&(e="invariant gl_Position;\n"+e),-1!==t.indexOf("#define MULTIVIEW"))return"#extension GL_OVR_multiview2 : require\nlayout (num_views = 2) in;\n"+e;return e}}],18799)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,96192,e=>{"use strict";var t,a,i=e.i(60219),s=e.i(97009),r=e.i(42704);(t=a||(a={}))[t.INIT=0]="INIT",t[t.STARTED=1]="STARTED",t[t.ENDED=2]="ENDED";class n{constructor(e){this.onEachCountObservable=new r.Observable,this.onTimerAbortedObservable=new r.Observable,this.onTimerEndedObservable=new r.Observable,this.onStateChangedObservable=new r.Observable,this._observer=null,this._breakOnNextTick=!1,this._tick=e=>{let t=Date.now();this._timer=t-this._startTime;let a={startTime:this._startTime,currentTime:t,deltaTime:this._timer,completeRate:this._timer/this._timeToEnd,payload:e},i=this._breakOnNextTick||this._breakCondition(a);i||this._timer>=this._timeToEnd?this._stop(a,i):this.onEachCountObservable.notifyObservers(a)},this._setState(0),this._contextObservable=e.contextObservable,this._observableParameters=e.observableParameters??{},this._breakCondition=e.breakCondition??(()=>!1),this._timeToEnd=e.timeout,e.onEnded&&this.onTimerEndedObservable.add(e.onEnded),e.onTick&&this.onEachCountObservable.add(e.onTick),e.onAborted&&this.onTimerAbortedObservable.add(e.onAborted)}set breakCondition(e){this._breakCondition=e}clearObservables(){this.onEachCountObservable.clear(),this.onTimerAbortedObservable.clear(),this.onTimerEndedObservable.clear(),this.onStateChangedObservable.clear()}start(e=this._timeToEnd){if(1===this._state)throw Error("Timer already started. Please stop it before starting again");this._timeToEnd=e,this._startTime=Date.now(),this._timer=0,this._observer=this._contextObservable.add(this._tick,this._observableParameters.mask,this._observableParameters.insertFirst,this._observableParameters.scope),this._setState(1)}stop(){1===this._state&&(this._breakOnNextTick=!0)}dispose(){this._observer&&this._contextObservable.remove(this._observer),this.clearObservables()}_setState(e){this._state=e,this.onStateChangedObservable.notifyObservers(this._state)}_stop(e,t=!1){this._contextObservable.remove(this._observer),this._setState(2),t?this.onTimerAbortedObservable.notifyObservers(e):this.onTimerEndedObservable.notifyObservers(e)}}var l=e.i(85789),o=e.i(59012),b=e.i(12752),h=e.i(99493);class d extends i.FlowGraphAsyncExecutionBlock{constructor(e){super(e),this.cancel=this._registerSignalInput("cancel"),this.duration=this.registerDataInput("duration",s.RichTypeNumber),this.lastDelayIndex=this.registerDataOutput("lastDelayIndex",s.RichTypeFlowGraphInteger,new o.FlowGraphInteger(-1))}_preparePendingTasks(e){let t=this.duration.getValue(e);if(t<0||isNaN(t)||!isFinite(t))return this._reportError(e,"Invalid duration in SetDelay block");if(e._getGlobalContextVariable("activeDelays",0)>=d.MaxParallelDelayCount)return this._reportError(e,"Max parallel delays reached");let a=e._getGlobalContextVariable("lastDelayIndex",-1),i=e._getExecutionVariable(this,"pendingDelays",[]),s=new n({timeout:1e3*t,contextObservable:e.configuration.scene.onBeforeRenderObservable,onEnded:()=>this._onEnded(s,e)});s.start();let r=a+1;this.lastDelayIndex.setValue(new o.FlowGraphInteger(r),e),e._setGlobalContextVariable("lastDelayIndex",r),(0,b.MarkDelayActive)(e,r),i[r]=s,e._setExecutionVariable(this,"pendingDelays",i),this._updateGlobalTimers(e)}_cancelPendingTasks(e){let t=e._getExecutionVariable(this,"pendingDelays",[]),a=e._getGlobalContextVariable("pendingDelays",[]);for(let i=0;i<t.length;i++){let s=t[i];s&&(s.dispose(),(0,b.MarkDelayInactive)(e,i),delete a[i])}e._setGlobalContextVariable("pendingDelays",a),e._deleteExecutionVariable(this,"pendingDelays"),this.lastDelayIndex.setValue(new o.FlowGraphInteger(-1),e),this._updateGlobalTimers(e)}_execute(e,t){t===this.cancel?this._cancelPendingTasks(e):(this._preparePendingTasks(e),this.out._activateSignal(e))}getClassName(){return"FlowGraphSetDelayBlock"}_onEnded(e,t){let a=t._getExecutionVariable(this,"pendingDelays",[]),i=a.indexOf(e);if(-1!==i){delete a[i];let e=t._getGlobalContextVariable("pendingDelays",[]);delete e[i],t._setGlobalContextVariable("pendingDelays",e),(0,b.MarkDelayInactive)(t,i)}else l.Logger.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list");t._removePendingBlock(this),this.done._activateSignal(t),this._updateGlobalTimers(t)}_updateGlobalTimers(e){let t=e._getExecutionVariable(this,"pendingDelays",[]),a=e._getGlobalContextVariable("pendingDelays",[]);for(let i=0;i<t.length;i++){if(!t[i]||!(0,b.IsDelayActive)(e,i))continue;let s=t[i];a[i]&&a[i]!==s?l.Logger.Warn("FlowGraphTimerBlock: Timer ended but was not found in the running timers list"):a[i]=s}e._setGlobalContextVariable("pendingDelays",a)}}d.MaxParallelDelayCount=100;let c=!1;function _(){c||(c=!0,(0,h.RegisterClass)("FlowGraphSetDelayBlock",d))}e.s(["FlowGraphSetDelayBlock",0,d,"RegisterFlowGraphSetDelayBlock",0,_],56210),_(),e.s([],67431),e.i(67431),e.i(56210),e.s(["FlowGraphSetDelayBlock",0,d],96192)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,20880,e=>{"use strict";class t extends Error{status;constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function n(e,t,n){let s=e.getReader(),r=new TextDecoder,i="";for(t.addEventListener("abort",()=>void s.cancel().catch(()=>{}));;){let{done:e,value:t}=await s.read();if(e)return;let a=(i+=r.decode(t,{stream:!0})).indexOf("\n\n");for(;a>=0;){let e=i.slice(0,a);i=i.slice(a+2);let t="message",s=[];for(let n of e.split("\n"))!n.startsWith(":")&&(n.startsWith("event:")?t=n.slice(6).trim():n.startsWith("data:")&&s.push(n.slice(5).replace(/^ /,"")));"event"===t&&s.length>0&&n(s.join("\n")),a=i.indexOf("\n\n")}}}function s(e){return e.endsWith("/")?e:`${e}/`}e.s(["ApiError",0,t,"CollectorApi",0,class{baseUrl;apiKey;constructor(e,t){this.baseUrl=e,this.apiKey=t}async get(e,n={}){let r=new URL(e,s(this.baseUrl));for(let[e,t]of Object.entries(n))null!=t&&r.searchParams.set(e,String(t));let i=await fetch(r,{headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!i.ok)throw new t(await i.text().catch(()=>"")||i.statusText,i.status);return await i.json()}read(e,t){return this.get(e,t)}sessions(e){return this.get("api/v1/sessions",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}pointerHeatmap(e){return this.get("api/v1/heatmaps/pointer",e)}meshUvHeatmap(e){return this.get("api/v1/heatmaps/mesh-uv",e)}cameraHeatmap(e){return this.get("api/v1/heatmaps/camera",e)}viewCoverageHistogram(e){return this.get("api/v1/coverage/view-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}topMeshes(e){return this.get("api/v1/meshes/top",e).then(e=>e.map(e=>({...e,count:Number(e.count)})))}meshBlindSpots(e){return this.get("api/v1/meshes/blind-spots",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),visible_ms:Number(e.visible_ms??0),vis_samples:Number(e.vis_samples??0),interactions:Number(e.interactions??0),hover_ms:Number(e.hover_ms??0),hover_episodes:Number(e.hover_episodes??0)})))}meshKinds(e){return this.get("api/v1/meshes/kinds",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),kind:String(e.kind??""),count:Number(e.count??0)})))}reachability(e){return this.get("api/v1/meshes/reachability",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0),avg_distance:Number(e.avg_distance??0)})))}topMeshesBySource(e){return this.get("api/v1/meshes/sources",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),source:String(e.source??""),count:Number(e.count??0)})))}topMeshesTrend(e){return this.get("api/v1/meshes/trend",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0)})))}topInputActions(e){return this.get("api/v1/input-actions/top",e).then(e=>e.map(e=>({action:String(e.action??""),source:String(e.source??""),count:Number(e.count??0)})))}perf(e){return this.get("api/v1/perf",e).then(e=>({samples:Number(e.samples??0),avg_fps:Number(e.avg_fps??0),min_fps:Number(e.min_fps??0),p50_fps:Number(e.p50_fps??0)}))}renderScale(e){return this.get("api/v1/perf/render-scale",e).then(e=>{let t=e[0]??{},n=Number(t.downscaled_samples??0),s=Number(t.scale_samples??0);return{samples:Number(t.samples??0),avg_fps:Number(t.avg_fps??0),p50_fps:Number(t.p50_fps??0),avg_render_scale:Number(t.avg_render_scale??0),p50_render_scale:Number(t.p50_render_scale??0),downscaled_samples:n,scale_samples:s,downscaled_share:s>0?n/s:0}})}perfDistribution(e){return this.get("api/v1/perf/distribution",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p05_fps:Number(t.p05_fps??0),p50_fps:Number(t.p50_fps??0),p95_fps:Number(t.p95_fps??0)}})}fpsHistogram(e){return this.get("api/v1/perf/fps-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}arPlacementTimeToPlace(e){return this.get("api/v1/ar/placement/time-to-place",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),placements:Number(e.placements??0)})))}arPlacementAttempts(e){return this.get("api/v1/ar/placement/attempts",e).then(e=>e.map(e=>({attempts:Number(e.attempts??0),placements:Number(e.placements??0)})))}arPlacementSurfaces(e){return this.get("api/v1/ar/placement/surfaces",e).then(e=>e.map(e=>({surface:String(e.surface??"unknown"),placements:Number(e.placements??0),avg_scale:Number(e.avg_scale??0)})))}frameTimePercentiles(e){return this.get("api/v1/perf/frame-time",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_ms:Number(t.p50_ms??0),p95_ms:Number(t.p95_ms??0)}})}jankRate(e){return this.get("api/v1/perf/jank",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),total_long_frames:Number(t.total_long_frames??0),median_rate:Number(t.median_rate??0),worst_decile_rate:Number(t.worst_decile_rate??0)}})}perfChurn(e){return this.get("api/v1/perf/churn",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),churn_sessions:Number(t.churn_sessions??0),fps_churn_sessions:Number(t.fps_churn_sessions??0),stall_churn_sessions:Number(t.stall_churn_sessions??0)}})}perfByDevice(e){return this.get("api/v1/perf/by-device",e).then(e=>e.map(e=>({engine:String(e.engine??""),is_mobile:String(e.is_mobile??""),renderer:String(e.renderer??""),browser:String(e.browser??""),os:String(e.os??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}perfByScene(e){return this.get("api/v1/perf/by-scene",e).then(e=>e.map(e=>({scene_id:String(e.scene_id??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}resourcePercentiles(e){return this.get("api/v1/perf/resource-percentiles",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_js_heap_bytes:Number(t.p50_js_heap_bytes??0),p95_js_heap_bytes:Number(t.p95_js_heap_bytes??0),p50_texture_bytes:Number(t.p50_texture_bytes??0),p95_texture_bytes:Number(t.p95_texture_bytes??0),p50_triangles:Number(t.p50_triangles??0),p95_triangles:Number(t.p95_triangles??0)}})}stabilityCounts(e){return this.get("api/v1/perf/stability",e).then(e=>{let t=e[0]??{};return{context_losses:Number(t.context_losses??0),compile_stalls:Number(t.compile_stalls??0),incidents:Number(t.incidents??0)}})}graphicsDiagnosticCounts(e){return this.get("api/v1/graphics-diagnostics",e).then(e=>e.map(e=>({severity:String(e.severity??""),category:String(e.category??""),backend:String(e.backend??""),incidents:Number(e.incidents??0)})))}renderingTechnology(e){return this.get("api/v1/rendering-technology",e).then(e=>e.map(e=>({api:String(e.api??""),backend:String(e.backend??""),apiVersion:String(e.api_version??""),shadingLanguage:String(e.shading_language??""),sessions:Number(e.sessions??0)})))}worldHeatmap(e){return this.get("api/v1/heatmaps/world",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}gazeHeatmap(e){return this.get("api/v1/heatmaps/gaze",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}errorHeatmap(e){return this.get("api/v1/heatmaps/errors",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmap(e){return this.get("api/v1/heatmaps/boundary",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}boundaryHeatmapStats(e){return this.get("api/v1/heatmaps/boundary/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}worldHeatmapStats(e){return this.get("api/v1/heatmaps/world/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}gazeHeatmapStats(e){return this.get("api/v1/heatmaps/gaze/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}cameraPositionHeatmap(e){return this.get("api/v1/heatmaps/position",e).then(e=>e.map(e=>({gx:Number(e.gx),gz:Number(e.gz),avg_y:Number(e.avg_y??0),count:Number(e.count??0)})))}sessionTrajectory(e,t){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/trajectory`,t).then(e=>e.map(e=>({ts:Number(e.ts),x:Number(e.x),y:Number(e.y),z:Number(e.z)})))}aggregatePaths(e){return this.get("api/v1/paths",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),ts:Number(e.ts),gx:Number(e.gx),gz:Number(e.gz)})))}clickRays(e){return this.get("api/v1/heatmaps/click-rays",e).then(e=>e.map(e=>({camVoxel:[Number(e.cam_vx),Number(e.cam_vy),Number(e.cam_vz)],origin:[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)],hitVoxel:[Number(e.hit_vx),Number(e.hit_vy),Number(e.hit_vz)],hit:[Number(e.hit_x),Number(e.hit_y),Number(e.hit_z)],mesh:String(e.mesh??""),count:Number(e.count)})))}flowHeatmap(e){return this.get("api/v1/heatmaps/flow",e).then(e=>e.map(e=>{let t={azimuth_bin:Number(e.azimuth_bin),elevation_bin:Number(e.elevation_bin),mesh:String(e.mesh??""),count:Number(e.count)};return null!=e.origin_vx&&(t.originVoxel=[Number(e.origin_vx),Number(e.origin_vy),Number(e.origin_vz)],t.origin=[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)]),t}))}scenes(e){return this.get("api/v1/scenes",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}timeseries(e){return this.get("api/v1/timeseries",e).then(e=>e.map(e=>({bucket:Number(e.bucket),events:Number(e.events??0),avg_fps:Number(e.avg_fps??0)})))}eventCounts(e){return this.get("api/v1/event-counts",e).then(e=>e.map(e=>({event_type:String(e.event_type),count:Number(e.count??0)})))}funnel(e,t){return this.get("api/v1/funnel",{...t,steps:JSON.stringify(e)}).then(e=>e.map(e=>({step:Number(e.step),sessions:Number(e.sessions??0)})))}sceneRetention(e){return this.get("api/v1/scene-retention",e).then(e=>e.map(e=>({from:String(e.from_scene??""),to:String(e.to_scene??""),sessions:Number(e.sessions??0)})))}loadBounce(e){let{bands:t,...n}=e??{};return this.get("api/v1/load-bounce",{...n,...null!=t&&t.length>0?{bands:t.join(",")}:{}}).then(e=>e.map(e=>({band:Number(e.band??0),sessions:Number(e.sessions??0),bounced:Number(e.bounced??0)})))}variantLeaderboard(e={},t){return this.get("api/v1/variant-leaderboard",{...t,variant:e.variant?JSON.stringify(e.variant):void 0,conversion:e.conversion?JSON.stringify(e.conversion):void 0}).then(e=>e.map(e=>{let t=Number(e.sessions??0),n=Number(e.conversions??0);return{variant:String(e.variant),views:Number(e.views??0),sessions:t,conversions:n,avgDwellMs:Number(e.avg_dwell_ms??0),conversionRate:t>0?n/t:0}}))}coverage(e){return this.get("api/v1/coverage",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count??0)})))}perfHeatmap(e){return this.get("api/v1/heatmaps/perf",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),samples:Number(e.samples??0),avgFps:Number(e.avg_fps??0),minFps:Number(e.min_fps??0)})))}cameraDistance(e){return this.get("api/v1/camera/distance",e).then(e=>e.map(e=>({bucket:Number(e.bucket),count:Number(e.count??0)})))}navigation(e){return this.get("api/v1/navigation",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),segments:Number(e.segments??0),total_distance:Number(e.total_distance??0),active_segments:Number(e.active_segments??0),active_distance:Number(e.active_distance??0)})))}backtrackRatio(e){return this.get("api/v1/backtrack",e).then(e=>e.map(e=>({scene:String(e.scene??""),sessions:Number(e.sessions??0),entries:Number(e.entries??0),revisits:Number(e.revisits??0),backtrack_ratio:Number(e.backtrack_ratio??0)})))}cameraGestures(e){return this.get("api/v1/camera-gestures",e).then(e=>e.map(e=>({kind:String(e.kind??""),gestures:Number(e.gestures??0),total_ms:Number(e.total_ms??0),avg_ms:Number(e.avg_ms??0),max_ms:Number(e.max_ms??0)})))}interactionsBySource(e){return this.get("api/v1/interactions/sources",e).then(e=>e.map(e=>({event_type:String(e.event_type??""),source:String(e.source??""),count:Number(e.count??0),sessions:Number(e.sessions??0)})))}xrLocomotion(e){return this.get("api/v1/xr/locomotion",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),fly_gestures:Number(e.fly_gestures??0),navigate_gestures:Number(e.navigate_gestures??0),teleports:Number(e.teleports??0),locomotion_ms:Number(e.locomotion_ms??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}boundaryContacts(e){return this.get("api/v1/xr/boundary-contacts",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),contacts:Number(e.contacts??0),near_ms:Number(e.near_ms??0)})))}trackingQuality(e){return this.get("api/v1/xr/tracking",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),degraded_ms:Number(e.degraded_ms??0),hand_degraded_ms:Number(e.hand_degraded_ms??0),controller_degraded_ms:Number(e.controller_degraded_ms??0),degraded_episodes:Number(e.degraded_episodes??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}sessionMeta(e){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/meta`)}async sceneRepresentation(e){try{return await this.get(`api/v1/scenes/${encodeURIComponent(e)}/representation`)}catch(e){if(e instanceof t&&404===e.status)return null;throw e}}async liveToken(){let e=new URL("api/v1/live/token",s(this.baseUrl)),n=await fetch(e,{method:"POST",headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!n.ok)throw new t(await n.text().catch(()=>"")||n.statusText,n.status);return await n.json()}livePresenceUrl(e){let t=new URL("api/v1/live/presence",s(this.baseUrl));return t.searchParams.set("token",e),t.toString()}liveStreamUrl(e,t){let n=new URL("api/v1/live/stream",s(this.baseUrl));return n.searchParams.set("token",e),t&&t.length>0&&n.searchParams.set("types",t.join(",")),n.toString()}liveSessionUrl(e,t){let n=new URL(`api/v1/live/sessions/${encodeURIComponent(t)}`,s(this.baseUrl));return n.searchParams.set("token",e),n.toString()}async sessionEvents(t){let{fetchSessionEvents:n}=await e.A(85461);return n({endpoint:this.baseUrl,apiKey:this.apiKey,sessionId:t})}liveSession(e,t,s){if(!this.apiKey||!this.baseUrl||!e)return s?.onState?.({status:"idle",gated:!1,count:0}),()=>{};let r=!1,i=0,a=null,o=null,m=0,u="idle",l=!1,p=()=>s?.onState?.({status:u,gated:l,count:m}),c=e=>{u=e,p()},h=()=>{if(r)return;c("reconnecting");let e=Math.min(1e3*2**i,15e3);i+=1,o=setTimeout(()=>void b(),e)},b=async()=>{let o;if(!r){c(0===i?"connecting":"reconnecting"),s?.onReset?.(),m=0,p();try{({token:o}=await this.liveToken())}catch{h();return}if(!r){a=new AbortController;try{let s=await fetch(this.liveSessionUrl(o,e),{headers:{accept:"text/event-stream"},cache:"no-store",signal:a.signal});if(403===s.status){l=!0,c("idle");return}if(!s.ok||!s.body)return void h();i=0,c("open"),await n(s.body,a.signal,e=>{try{t(JSON.parse(e)),m+=1,p()}catch{}}),r||h()}catch{r||h()}}}};return b(),()=>{r=!0,o&&clearTimeout(o),a?.abort()}}}])},60614,e=>{"use strict";async function t(e,t){let n=await e.scenes(t).catch(()=>[]);if(0===n.length)return[];let s=await Promise.all(n.map(t=>e.sceneRepresentation(t.scene_id).catch(()=>null))),r=new Set,i=[];for(let e of s)for(let t of e?.proxy?.meshes??[])r.has(t.name)||(r.add(t.name),i.push(t));return i}e.s(["mergeSceneProxies",0,t])},18637,e=>{"use strict";var t=e.i(61284),n=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:s="low",highLabel:r="high",note:i}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:n.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:s}),(0,t.jsx)("span",{children:r})]}),i?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:i}):null]})}])},37215,e=>{"use strict";var t=e.i(61284);let n=(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each ",(0,t.jsx)("strong",{children:"target"})," is a"," ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports ",(0,t.jsx)("em",{children:"standpoints"}),' (where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," ","for a three-column ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),' flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']});e.s(["BOUNDARY_HEATMAP_SUBTITLE",0,"Where headsets neared their play-space boundary, voxel-binned in world space — computed on-device, no room geometry captured. Drag to orbit, double-click to focus","BOUNDARY_HEATMAP_TITLE",0,"Guardian boundary heatmap (3D)","CAMERA_DOME_SUBTITLE",0,"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom, double-click to focus","CAMERA_DOME_TITLE",0,"View-direction dome (3D)","CLICK_RAYS_SUBTITLE",0,"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter","CLICK_RAYS_TITLE",0,"Click rays (3D)","ERROR_HEATMAP_SUBTITLE",0,"Where errors & engine diagnostics fired, voxel-binned by the camera position at the moment they hit — drag to orbit, double-click to focus","ERROR_HEATMAP_TITLE",0,"Error heatmap (3D)","FLOW_SANKEY_HELP",0,n,"FLOW_SANKEY_SUBTITLE",0,"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage) — double-click to focus","FLOW_SANKEY_TITLE",0,"Flow Sankey (3D)","GAZE_CLICK_SUBTITLE",0,"Where viewers look (gaze) vs. where they act (clicks), voxel-binned in world space — double-click to focus","GAZE_CLICK_TITLE",0,"Gaze vs. click divergence","PERF_HEATMAP_SUBTITLE",0,"Where FPS is bad in your scene — frame_perf samples voxel-binned by camera position; hot = slow. Drag to orbit, +/- to zoom, double-click to focus","PERF_HEATMAP_TITLE",0,"Performance heatmap (3D)","SESSION_REPLAY_TITLE",0,"Session replay","WORLD_HEATMAP_SUBTITLE",0,"Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom, double-click to focus","WORLD_HEATMAP_TITLE",0,"World heatmap (3D)","sessionReplaySubtitle",0,function(e){return e?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek)."},"sessionReplayTitle",0,function(e){return e?"Session replay · live":"Session replay (birdview timeline)"}])},56054,e=>{"use strict";e.s(["HEAT_GRADIENT",0,"linear-gradient(to right, rgb(178,47,38), rgb(224,123,57), rgb(244,200,75))","heatRgb",0,function(e){let t=Math.max(0,Math.min(1,e)),n=[.878,.482,.224],s=(e,t,n)=>[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n,e[2]+(t[2]-e[2])*n];return t<.5?s([.698,.184,.149],n,t/.5):s(n,[.957,.784,.294],(t-.5)/.5)},"percentileMax",0,function(e,t=.95){if(0===e.length)return 1;let n=[...e].sort((e,t)=>e-t),s=Math.max(0,Math.min(1,t))*(n.length-1),r=Math.floor(s),i=Math.ceil(s);return Math.max(1,r===i?n[r]:n[r]+(n[i]-n[r])*(s-r))}])},19761,e=>{"use strict";var t=e.i(17422);let n=t.z.tuple([t.z.number(),t.z.number(),t.z.number()]),s=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number()]),r=t.z.tuple([t.z.number(),t.z.number()]),i=t.z.tuple([t.z.number().min(0).max(1),t.z.number().min(0).max(1)]),a=t.z.number().int().nonnegative(),o=t.z.string().regex(/^[A-Za-z0-9._:-]{1,64}$/,"sceneId must be 1-64 chars of [A-Za-z0-9._:-]");function m(e,n){return t.z.record(t.z.string(),e).refine(e=>Object.keys(e).length<=n,{message:`must have at most ${n} entries`})}let u=t.z.object({title:t.z.string().max(512).optional(),referrer:t.z.string().max(2048).optional(),viewport:t.z.tuple([t.z.number(),t.z.number()]).optional(),devicePixelRatio:t.z.number().positive().optional(),language:t.z.string().max(35).optional()}).passthrough(),l={projectId:t.z.string().min(1).max(128),visitorId:t.z.string().optional(),sessionId:t.z.string().min(1).max(128),ts:a,sdkVersion:t.z.string().min(1).max(64),url:t.z.string().max(2048).optional(),sceneId:o.optional(),pageMeta:u.optional()};function p(e,n){return t.z.object({type:t.z.literal(e),...l,...n})}t.z.object(l);let c=t.z.enum(["left","right"]),h=t.z.enum(["y","z"]),b=t.z.object({handedness:c,upAxis:h.default("y"),unitScale:t.z.number().positive().default(1)}).passthrough(),g=t.z.object({engine:t.z.enum(["webgl2","webgpu","webgl","unknown"]).optional(),vendor:t.z.string().optional(),renderer:t.z.string().optional(),maxTextureSize:t.z.number().optional(),hardwareConcurrency:t.z.number().optional(),deviceMemoryGb:t.z.number().optional(),isMobile:t.z.boolean().optional(),browser:t.z.string().optional(),os:t.z.string().optional()}).passthrough(),d=t.z.enum(["arc-rotate","free","follow","static","other"]),v=t.z.object({description:t.z.string().max(256).optional(),cameraType:d.optional(),cameraName:t.z.string().max(128).optional(),meshCount:t.z.number().int().nonnegative().optional()}).passthrough(),_=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),z=t.z.object({id:t.z.string().max(128).optional(),traits:m(_,64).optional()}).passthrough(),N=t.z.object({name:t.z.string(),version:t.z.string().optional(),coordinateSystem:b.optional()}).passthrough(),f=t.z.enum(["webgl","webgl2","webgpu","opengl","opengles","d3d11","d3d12","vulkan","metal","unknown"]),y=t.z.enum(["metal","d3d11","d3d12","vulkan","opengl","opengles","unknown"]),x=t.z.enum(["glsl","glsl-es","wgsl","hlsl","msl","spirv","unknown"]),w=t.z.object({api:f.optional(),backend:y.optional(),apiVersion:t.z.string().optional(),shadingLanguage:x.optional()}).passthrough(),k=p("session_start",{device:g.optional(),graphics:w.optional(),scene:v.optional(),user:z.optional(),connector:N.optional()}),S=p("session_end",{durationMs:t.z.number().nonnegative().optional(),reason:t.z.enum(["unload","hidden","manual","timeout"]).optional()}),T=p("frame_perf",{fps:t.z.number().nonnegative(),frameTimeMs:t.z.number().nonnegative().optional(),frameTimeP95Ms:t.z.number().nonnegative().optional(),frameTimeP99Ms:t.z.number().nonnegative().optional(),longFrames:t.z.number().int().nonnegative().optional(),drawCalls:t.z.number().nonnegative().optional(),dpr:t.z.number().positive().optional(),renderScale:t.z.number().positive().optional(),position:n.optional()}),E=p("camera_sample",{position:n,direction:n,target:n.optional(),fov:t.z.number().optional(),aspect:t.z.number().positive().optional(),near:t.z.number().positive().optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional()}),j=p("node_transform",{nodeId:t.z.string().min(1).max(128),boneId:t.z.string().min(1).max(128).optional(),childPath:t.z.string().min(1).max(512).optional(),position:n,rotation:s,scale:n.optional()}),A=t.z.enum(["mouse","touch","stylus","pen","keyboard","gamepad","xr-controller","hand","gaze","transient","other"]),M=t.z.enum(["left","right","none"]),R=t.z.object({origin:n,direction:n}),P={source:A.optional(),handedness:M.optional(),sourceId:t.z.string().min(1).max(64).optional(),ray:R.optional()},I=p("pointer_move",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),...P}),L=p("pointer_click",{screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),uv:r.optional(),button:t.z.number().int().min(0).optional(),...P}),U={screen:i.optional(),hitPoint:n.optional(),hitMesh:t.z.string().optional(),button:t.z.number().int().min(0).optional(),...P},C=p("pointer_down",U),H=p("pointer_up",U),D=p("camera_gesture",{kind:t.z.enum(["orbit","pan","dolly","zoom","roll","fly","navigate"]),durationMs:t.z.number().nonnegative(),orbitDeg:t.z.number().nonnegative().optional(),rollDeg:t.z.number().nonnegative().optional(),zoomRatio:t.z.number().positive().optional(),panDist:t.z.number().nonnegative().optional(),...P}),O=t.z.enum(["hover","pick","click","drag","select","squeeze","grab","release","teleport"]),B=p("mesh_interaction",{mesh:t.z.string().min(1).max(256),kind:O,point:n.optional(),uv:r.optional(),...P}),K=t.z.tuple([t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number(),t.z.number()]),W=t.z.literal("aabb"),$=t.z.object({position:n,rotation:s,scale:n}),F=t.z.object({name:t.z.string().max(256),aabb:K,triangles:t.z.number().int().nonnegative().optional(),path:t.z.string().min(1).max(512).optional(),world:$.optional()});t.z.object({version:t.z.literal(1),sceneId:o,kind:W,bounds:K,upAxis:h,handedness:c.optional(),unitScale:t.z.number().positive(),meshes:t.z.array(F).max(1e4),meshCount:t.z.number().int().nonnegative(),contentHash:t.z.string().min(1),capturedAt:a,sdkVersion:t.z.string().min(1)});let V=p("mesh_visibility",{mesh:t.z.string().min(1).max(256),visibleMs:t.z.number().nonnegative(),centeredMs:t.z.number().nonnegative().optional(),maxScreenFraction:t.z.number().min(0).max(1).optional(),bounds:K.optional()}),G=p("hover_dwell",{mesh:t.z.string().min(1),dwellMs:t.z.number().nonnegative(),uv:r.optional(),...P}),Y=t.z.enum(["shader","pipeline","material","other"]),J=p("compile_stall",{durationMs:t.z.number().nonnegative(),phase:Y.optional()}),Z=p("resource_sample",{textureBytes:t.z.number().nonnegative().optional(),geometryBytes:t.z.number().nonnegative().optional(),triangles:t.z.number().int().nonnegative().optional(),vertices:t.z.number().int().nonnegative().optional(),jsHeapBytes:t.z.number().nonnegative().optional()}),q=p("capability_change",{kind:t.z.enum(["graphics-backend","quality","device-recovery","tracking","feature","other"]),from:t.z.string().max(64).optional(),to:t.z.string().max(64).optional(),reason:t.z.string().max(120).optional(),durationMs:t.z.number().nonnegative().optional(),...P}),Q=p("asset_load",{name:t.z.string().max(1024),bytes:t.z.number().nonnegative().optional(),loadMs:t.z.number().nonnegative(),ttffMs:t.z.number().nonnegative().optional(),ttiMs:t.z.number().nonnegative().optional()}),X=p("scene_change",{}),ee=p("viewport_resize",{width:t.z.number().positive(),height:t.z.number().positive(),dpr:t.z.number().positive().optional()}),et=p("visibility_change",{state:t.z.enum(["visible","hidden"])}),en=p("focus_change",{focused:t.z.boolean()}),es=p("context_lost",{reason:t.z.string().max(512).optional()}),er=p("context_restored",{}),ei=p("graphics_diagnostic",{severity:t.z.enum(["info","warning","error","fatal"]),category:t.z.enum(["context-loss","validation","out-of-memory","shader-compile","device-lost","fallback"]),backend:f.optional(),message:t.z.string().max(1024).optional(),code:t.z.string().max(64).optional(),count:t.z.number().int().positive().optional(),position:n.optional()}),ea=p("runtime_error",{kind:t.z.enum(["error","unhandledrejection"]),message:t.z.string().max(1024),source:t.z.string().max(1024).optional(),lineno:t.z.number().int().nonnegative().optional(),colno:t.z.number().int().nonnegative().optional(),stack:t.z.string().max(4096).optional(),position:n.optional()}),eo=p("input_action",{action:t.z.string().min(1).max(64),code:t.z.string().min(1).max(64).optional(),button:t.z.number().int().nonnegative().optional(),pressed:t.z.boolean().optional(),...P}),em=p("xr_boundary_proximity",{position:n,durationMs:t.z.number().nonnegative()}),eu=t.z.enum(["floor","wall","table","ceiling","unknown"]),el=p("ar_placement",{mesh:t.z.string().min(1).max(256),position:n,surface:eu.optional(),attempts:t.z.number().int().positive(),timeToPlaceMs:t.z.number().nonnegative(),scale:t.z.number().positive(),final:t.z.boolean()}),ep=t.z.union([t.z.string().max(1024),t.z.number(),t.z.boolean(),t.z.null()]),ec=p("custom",{name:t.z.string().min(1).max(128),props:m(ep,64).optional()}),eh=t.z.discriminatedUnion("type",[k,S,T,E,j,I,L,C,H,D,B,V,G,J,Z,q,Q,X,ee,et,en,es,er,ei,ea,eo,em,el,ec]),eb=t.z.array(eh);async function eg(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(n,{headers:{"x-api-key":e.apiKey}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);let r=eb.safeParse(await s.json());if(!r.success)throw Error("replay fetch returned an invalid session payload");return r.data.sort((e,t)=>e.ts-t.ts)}async function*ed(e){let t=e.fetchImpl??fetch,n=`${e.endpoint}/api/v1/sessions/${encodeURIComponent(e.sessionId)}/events`,s=await t(`${n}?format=ndjson`,{headers:{"x-api-key":e.apiKey,accept:"application/x-ndjson"}});if(!s.ok)throw Error(`replay fetch failed: ${s.status}`);if(!(s.headers.get("content-type")??"").includes("application/x-ndjson")){let e=eb.safeParse(await s.json());if(!e.success)throw Error("replay fetch returned an invalid session payload");for(let t of e.data.sort((e,t)=>e.ts-t.ts))yield t;return}if(!s.body)throw Error("replay stream returned no body");let r=0,i=()=>e.onMalformedLine?.(++r),a=s.body.getReader(),o=new TextDecoder,m="",u=function*(e){let t,n=e.trim();if(0===n.length)return;try{t=JSON.parse(n)}catch{i();return}let s=eh.safeParse(t);s.success?yield s.data:i()};for(;;){let{done:e,value:t}=await a.read();if(e)break;let n=(m+=o.decode(t,{stream:!0})).indexOf("\n");for(;n>=0;){let e=m.slice(0,n);m=m.slice(n+1),yield*u(e),n=m.indexOf("\n")}}yield*u(m)}e.s(["fetchSessionEvents",0,eg,"fetchSessionEventsStream",0,ed],19761)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,11822,98651,22427,2262,e=>{"use strict";let t,i,r,s,n,a,o,h,l,c,u,d,f,p;var _,m=e.i(4112),g=e.i(91679),I=e.i(51509),y=e.i(72003),x=e.i(26747),T=e.i(92356);class M{constructor(e,t,i){this._cameraPosition=t,this._behavior=i,this.activeInput=!1,this.speed=1,this.zoomSpeed=1,this.panSpeed=1,this.rotationXSpeed=1,this.rotationYSpeed=1,this._zoomSpeedMultiplier=1,this._panSpeedMultiplier=1,this.zoomInertia=.9,this.panInertia=.9,this.rotationInertia=.9,this.zoomAccumulatedPixels=0,this.panAccumulatedPixels=new y.Vector3,this.rotationAccumulatedPixels=new y.Vector3,this.zoomDeltaCurrentFrame=0,this.panDeltaCurrentFrame=y.Vector3.Zero(),this.rotationDeltaCurrentFrame=y.Vector3.Zero(),this._zoomVelocity=0,this._panVelocity=new y.Vector3,this.referenceFrameRate=60,this._rotationVelocity=new y.Vector3,this._prevFrameTimeMs=0,this._scene=e}computeCurrentFrameDeltas(){let e=this._scene.getEngine().getDeltaTime(),t=this._getEffectiveDeltaMs(e);if(0===this._zoomVelocity&&0===this.zoomAccumulatedPixels&&0===this._panVelocity.x&&0===this._panVelocity.y&&0===this._panVelocity.z&&0===this.panAccumulatedPixels.x&&0===this.panAccumulatedPixels.y&&0===this.panAccumulatedPixels.z&&0===this._rotationVelocity.x&&0===this._rotationVelocity.y&&0===this._rotationVelocity.z&&0===this.rotationAccumulatedPixels.x&&0===this.rotationAccumulatedPixels.y&&0===this.rotationAccumulatedPixels.z&&!this.activeInput){this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,e>0&&(this._prevFrameTimeMs=e);return}this.panDeltaCurrentFrame.setAll(0),this.rotationDeltaCurrentFrame.setAll(0),this.zoomDeltaCurrentFrame=0,(this.panAccumulatedPixels.lengthSquared()>0||this.rotationAccumulatedPixels.lengthSquared()>0||0!==this.zoomAccumulatedPixels)&&this._behavior?.isInterpolating&&this._behavior.stopAllAnimations(),this._panVelocity.copyFromFloats(this._calculateCurrentVelocity(this._panVelocity.x,this.panAccumulatedPixels.x,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.y,this.panAccumulatedPixels.y,this.panInertia),this._calculateCurrentVelocity(this._panVelocity.z,this.panAccumulatedPixels.z,this.panInertia)),this._panVelocity.scaleToRef(this.speed*this.panSpeed*this._panSpeedMultiplier*t,this.panDeltaCurrentFrame),this._rotationVelocity.copyFromFloats(this._calculateCurrentVelocity(this._rotationVelocity.x,this.rotationAccumulatedPixels.x,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.y,this.rotationAccumulatedPixels.y,this.rotationInertia),this._calculateCurrentVelocity(this._rotationVelocity.z,this.rotationAccumulatedPixels.z,this.rotationInertia)),this.rotationDeltaCurrentFrame.copyFromFloats(this._rotationVelocity.x*this.speed*this.rotationXSpeed*t,this._rotationVelocity.y*this.speed*this.rotationYSpeed*t,0),this._zoomVelocity=this._calculateCurrentVelocity(this._zoomVelocity,this.zoomAccumulatedPixels,this.zoomInertia),this.zoomDeltaCurrentFrame=this._zoomVelocity*(this.speed*this.zoomSpeed*this._zoomSpeedMultiplier)*t,e>0&&(this._prevFrameTimeMs=e),this.zoomAccumulatedPixels=0,this.panAccumulatedPixels.setAll(0),this.rotationAccumulatedPixels.setAll(0),this.activeInput=!1}resetRotationVelocity(){this._rotationVelocity.setAll(0),this.rotationAccumulatedPixels.setAll(0)}resetPanVelocity(){this._panVelocity.setAll(0),this.panAccumulatedPixels.setAll(0)}resetZoomVelocity(){this._zoomVelocity=0,this.zoomAccumulatedPixels=0}get isInterpolating(){return!!this._behavior?.isInterpolating}getFrameIndependentDecay(e){let t=this._scene.getEngine().getDeltaTime();return Math.pow(e,this._getEffectiveDeltaMs(t)/(1e3/this.referenceFrameRate))}getFrameIndependentInputScale(e){let t=1-e;return t<=0?1:(1-this.getFrameIndependentDecay(e))/t}_getEffectiveDeltaMs(e){return e>0?e:this._prevFrameTimeMs>0?this._prevFrameTimeMs:1e3/this.referenceFrameRate}_calculateCurrentVelocity(e,t,i){let r=e,s=this._scene.getEngine().getDeltaTime(),n=this._getEffectiveDeltaMs(s);if(0===n)return r;let a=this.getFrameIndependentDecay(i);if(r*=a,0!==t||this.activeInput){let e=1-i;r+=t/n*(e>0?(1-a)/e:1)}else 1e-6>Math.abs(r)&&(r=0);return r}}e.s(["CameraMovement",0,M],98651);class S{constructor(e,t){this.inputMap=[],this.handlers=e,this._createDefaultEntries=t,this.resetInputMap()}resolveInteraction(e,t){for(let i of this.inputMap)if(i.source===e&&this._entryMatches(i,t))return i;return null}resetInputMap(){this.inputMap=this._createDefaultEntries?.()??[]}getEntry(e,t,i){let r=this.inputMap;for(let s=0;s<r.length;s++){let n=r[s];if(n.source===e&&n.interaction===t&&this._entryConditionsMatch(n,i))return n}}getEntries(e,t,i){let r=[],s=this.inputMap;for(let n=0;n<s.length;n++){let a=s[n];a.source===e&&a.interaction===t&&this._entryConditionsMatch(a,i)&&r.push(a)}return r}addEntry(e){let t=this._entrySpecificity(e),i=this.inputMap.length;for(let e=0;e<this.inputMap.length;e++)if(this._entrySpecificity(this.inputMap[e])<t){i=e;break}this.inputMap.splice(i,0,e)}setInteraction(e,t,i){let r=this.resolveInteraction(e,t);return r&&this._entryCoversAllConditionsOf(r,t)?r.interaction=i:this.addEntry({source:e,...t??{},interaction:i}),!0}_entryCoversAllConditionsOf(e,t){if(!t)return!0;for(let i of Object.keys(t)){let r=t[i];if(void 0!==r){if("modifiers"===i){let t=e.modifiers??{};for(let e of Object.keys(r))if(void 0!==r[e]&&void 0===t[e])return!1}else if(void 0===e[i])return!1}}return!0}setInteractions(e,t,i){let r=0,s=this.inputMap;for(let n=0;n<s.length;n++){let a=s[n];a.source===e&&this._entryMatches(a,t)&&(a.interaction=i,r++)}return r}_entryMatches(e,t){switch(e.source){case"pointer":if(void 0!==e.button&&e.button!==t?.button)return!1;return this._matchModifiers(e.modifiers,t?.modifiers);case"wheel":return this._matchModifiers(e.modifiers,t?.modifiers);case"touch":if(void 0!==e.touchCount&&e.touchCount!==t?.touchCount)return!1;return!0;case"keyboard":if(void 0!==e.key&&(Array.isArray(e.key)?-1===e.key.indexOf(t?.key??-1):e.key!==t?.key))return!1;return this._matchModifiers(e.modifiers,t?.modifiers)}}_entryConditionsMatch(e,t){if(!t)return!0;switch(e.source){case"pointer":if("button"in t&&e.button!==t.button)return!1;return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers);case"wheel":return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers);case"touch":return!("touchCount"in t)||e.touchCount===t.touchCount;case"keyboard":if("key"in t){if(void 0===e.key)return void 0===t.key;if(void 0===t.key||(Array.isArray(e.key)?-1===e.key.indexOf(t.key):e.key!==t.key))return!1}return!("modifiers"in t)||this._entryModifiersMatch(e.modifiers,t.modifiers)}}_entrySpecificity(e){let t=0;return"button"in e&&void 0!==e.button&&t++,"key"in e&&void 0!==e.key&&t++,"touchCount"in e&&void 0!==e.touchCount&&t++,"modifiers"in e&&e.modifiers&&t++,t}_matchModifiers(e,t){return!e||(void 0===e.ctrl||e.ctrl===(t?.ctrl??!1))&&(void 0===e.shift||e.shift===(t?.shift??!1))&&(void 0===e.alt||e.alt===(t?.alt??!1))}_entryModifiersMatch(e,t){return t?void 0===t.ctrl&&void 0===t.shift&&void 0===t.alt?!e||void 0===e.ctrl&&void 0===e.shift&&void 0===e.alt:(void 0===t.ctrl||e?.ctrl===t.ctrl)&&(void 0===t.shift||e?.shift===t.shift)&&(void 0===t.alt||e?.alt===t.alt):!e}}e.s(["InputMapper",0,S],22427);class v extends M{constructor(e,t,i){super(e,t,i),this.input=new S({translate:(e,t,i)=>{this.panAccumulatedPixels.x+=e,this.panAccumulatedPixels.y+=t,this.panAccumulatedPixels.z+=i},rotate:(e,t)=>{this.rotationAccumulatedPixels.x+=e,this.rotationAccumulatedPixels.y+=t}},()=>this._createDefaultInputMap())}_createDefaultInputMap(){return[{source:"pointer",interaction:"rotate"},{source:"keyboard",interaction:"translate"},{source:"keyboard",interaction:"rotate"},{source:"touch",interaction:"rotate"},{source:"touch",interaction:"translate"}]}}let b=y.Matrix.Zero(),D=y.Quaternion.Identity(),A=(n=I.Camera,a=[],o=[],h=[],l=[],c=[],u=[],d=[],f=[],_=class extends n{get inertia(){return this._targetInertia}set inertia(e){this._targetInertia=e,this.movement&&(this.movement.panInertia=e,this.movement.rotationInertia=e)}constructor(e,t,i,r=!0){super(e,t,i,r),this.cameraDirection=new y.Vector3(0,0,0),this.cameraRotation=new y.Vector2(0,0),this._targetInertia=.9,this.updateUpVectorFromRotation=(0,m.__runInitializers)(this,a,!1),this.rotation=((0,m.__runInitializers)(this,o),(0,m.__runInitializers)(this,h,void 0)),this.rotationQuaternion=(0,m.__runInitializers)(this,l),this.speed=(0,m.__runInitializers)(this,c,2),this.noRotationConstraint=((0,m.__runInitializers)(this,u),!1),this.invertRotation=!1,this.inverseRotationSpeed=.2,this._panningEpsilon=x.Epsilon,this._rotationEpsilon=x.Epsilon,this.lockedTarget=(0,m.__runInitializers)(this,d,null),this._currentTarget=((0,m.__runInitializers)(this,f),y.Vector3.Zero()),this._initialFocalDistance=1,this._viewMatrix=y.Matrix.Zero(),this._cameraTransformMatrix=y.Matrix.Zero(),this._cameraRotationMatrix=y.Matrix.Zero(),this._transformedReferencePoint=y.Vector3.Zero(),this._deferredPositionUpdate=new y.Vector3,this._deferredRotationQuaternionUpdate=new y.Quaternion,this._deferredRotationUpdate=new y.Vector3,this._deferredUpdated=!1,this._deferOnly=!1,this._cachedRotationZ=0,this._cachedQuaternionRotationZ=0,this._referencePoint=y.Vector3.Forward(this.getScene().useRightHandedSystem),this.rotation=new y.Vector3(0,this.getScene().useRightHandedSystem?Math.PI:0,0),this.movement=new v(this.getScene(),this.position),this.movement.panInertia=this.inertia,this.movement.rotationInertia=this.inertia}getFrontPosition(e){this.getWorldMatrix();let t=y.TmpVectors.Vector3[0],i=y.TmpVectors.Vector3[1];return i.set(0,0,this._scene.useRightHandedSystem?-1:1),this.getDirectionToRef(i,t),t.scaleInPlace(e),this.globalPosition.add(t)}_getLockedTargetPosition(){if(!this.lockedTarget)return null;if(this.lockedTarget.absolutePosition){let e=this.lockedTarget;e.computeWorldMatrix().getTranslationToRef(e.absolutePosition)}return this.lockedTarget.absolutePosition||this.lockedTarget}storeState(){return this._storedPosition=this.position.clone(),this._storedRotation=this.rotation.clone(),this.rotationQuaternion&&(this._storedRotationQuaternion=this.rotationQuaternion.clone()),super.storeState()}_restoreStateValues(){return!!super._restoreStateValues()&&(this.position=this._storedPosition.clone(),this.rotation=this._storedRotation.clone(),this.rotationQuaternion&&this._storedRotationQuaternion&&(this.rotationQuaternion=this._storedRotationQuaternion.clone()),this.cameraDirection.copyFromFloats(0,0,0),this.cameraRotation.copyFromFloats(0,0),!0)}_initCache(){super._initCache(),this._cache.lockedTarget=new y.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotation=new y.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),this._cache.rotationQuaternion=new y.Quaternion(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE)}_updateCache(e){e||super._updateCache();let t=this._getLockedTargetPosition();t?this._cache.lockedTarget?this._cache.lockedTarget.copyFrom(t):this._cache.lockedTarget=t.clone():this._cache.lockedTarget=null,this._cache.rotation.copyFrom(this.rotation),this.rotationQuaternion&&this._cache.rotationQuaternion.copyFrom(this.rotationQuaternion)}_isSynchronizedViewMatrix(){if(!super._isSynchronizedViewMatrix())return!1;let e=this._getLockedTargetPosition();return(this._cache.lockedTarget?this._cache.lockedTarget.equals(e):!e)&&(this.rotationQuaternion?this.rotationQuaternion.equals(this._cache.rotationQuaternion):this._cache.rotation.equals(this.rotation))}_computeLocalCameraSpeed(){let e=this.getEngine();return this.speed*Math.sqrt(e.getDeltaTime()/(100*e.getFps()))}setTarget(e){this.upVector.normalize(),this._initialFocalDistance=e.subtract(this.position).length(),this.position.z===e.z&&(this.position.z+=x.Epsilon),this._referencePoint.normalize().scaleInPlace(this._initialFocalDistance),this.getScene().useRightHandedSystem?y.Matrix.LookAtRHToRef(this.position,e,y.Vector3.UpReadOnly,b):y.Matrix.LookAtLHToRef(this.position,e,y.Vector3.UpReadOnly,b),b.invert();let t=this.rotationQuaternion||D;y.Quaternion.FromRotationMatrixToRef(b,t),t.toEulerAnglesToRef(this.rotation),this.rotation.z=0}get target(){return this.getTarget()}set target(e){this.setTarget(e)}getTarget(){return this._currentTarget}_decideIfNeedsToMove(){return Math.abs(this.cameraDirection.x)>0||Math.abs(this.cameraDirection.y)>0||Math.abs(this.cameraDirection.z)>0}_updatePosition(){if(this.parent){this.parent.getWorldMatrix().invertToRef(y.TmpVectors.Matrix[0]),y.Vector3.TransformNormalToRef(this.cameraDirection,y.TmpVectors.Matrix[0],y.TmpVectors.Vector3[0]),this._deferredPositionUpdate.addInPlace(y.TmpVectors.Vector3[0]),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate);return}this._deferredPositionUpdate.addInPlace(this.cameraDirection),this._deferOnly?this._deferredUpdated=!0:this.position.copyFrom(this._deferredPositionUpdate)}_checkInputs(){let e=this.movement,t=0!==this.cameraDirection.x||0!==this.cameraDirection.y||0!==this.cameraDirection.z;e.panAccumulatedPixels.addInPlace(this.cameraDirection),e.rotationAccumulatedPixels.x+=this.cameraRotation.x,e.rotationAccumulatedPixels.y+=this.cameraRotation.y,e.computeCurrentFrameDeltas(),this.cameraDirection.copyFrom(e.panDeltaCurrentFrame),this.cameraRotation.set(e.rotationDeltaCurrentFrame.x,e.rotationDeltaCurrentFrame.y);let i=this.speed*this._panningEpsilon;!t&&Math.abs(this.cameraDirection.x)<i&&Math.abs(this.cameraDirection.y)<i&&Math.abs(this.cameraDirection.z)<i&&(this.cameraDirection.setAll(0),e.resetPanVelocity());let r=this.invertRotation?-this.inverseRotationSpeed:1,s=this._decideIfNeedsToMove(),n=!!(this.cameraRotation.x||this.cameraRotation.y);this._deferredUpdated=!1,this._deferredRotationUpdate.copyFrom(this.rotation),this._deferredPositionUpdate.copyFrom(this.position),this.rotationQuaternion&&this._deferredRotationQuaternionUpdate.copyFrom(this.rotationQuaternion),s&&this._updatePosition(),n&&(this.rotationQuaternion&&this.rotationQuaternion.toEulerAnglesToRef(this._deferredRotationUpdate),this._deferredRotationUpdate.x+=this.cameraRotation.x*r,this._deferredRotationUpdate.y+=this.cameraRotation.y*r,!this.noRotationConstraint&&(this._deferredRotationUpdate.x>1.570796&&(this._deferredRotationUpdate.x=1.570796),this._deferredRotationUpdate.x<-1.570796&&(this._deferredRotationUpdate.x=-1.570796)),this._deferOnly?this._deferredUpdated=!0:this.rotation.copyFrom(this._deferredRotationUpdate),this.rotationQuaternion&&this._deferredRotationUpdate.lengthSquared()&&(y.Quaternion.RotationYawPitchRollToRef(this._deferredRotationUpdate.y,this._deferredRotationUpdate.x,this._deferredRotationUpdate.z,this._deferredRotationQuaternionUpdate),this._deferOnly?this._deferredUpdated=!0:this.rotationQuaternion.copyFrom(this._deferredRotationQuaternionUpdate))),this.cameraDirection.setAll(0),this.cameraRotation.set(0,0),super._checkInputs()}_updateCameraRotationMatrix(){this.rotationQuaternion?this.rotationQuaternion.toRotationMatrix(this._cameraRotationMatrix):y.Matrix.RotationYawPitchRollToRef(this.rotation.y,this.rotation.x,this.rotation.z,this._cameraRotationMatrix)}_rotateUpVectorWithCameraRotationMatrix(){return y.Vector3.TransformNormalToRef(y.Vector3.UpReadOnly,this._cameraRotationMatrix,this.upVector),this}_getViewMatrix(){return this.lockedTarget&&this.setTarget(this._getLockedTargetPosition()),this._updateCameraRotationMatrix(),this.rotationQuaternion&&this._cachedQuaternionRotationZ!=this.rotationQuaternion.z?(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedQuaternionRotationZ=this.rotationQuaternion.z):this._cachedRotationZ!==this.rotation.z&&(this._rotateUpVectorWithCameraRotationMatrix(),this._cachedRotationZ=this.rotation.z),y.Vector3.TransformCoordinatesToRef(this._referencePoint,this._cameraRotationMatrix,this._transformedReferencePoint),this.position.addToRef(this._transformedReferencePoint,this._currentTarget),this.updateUpVectorFromRotation&&(this.rotationQuaternion?T.Axis.Y.rotateByQuaternionToRef(this.rotationQuaternion,this.upVector):(y.Quaternion.FromEulerVectorToRef(this.rotation,D),T.Axis.Y.rotateByQuaternionToRef(D,this.upVector))),this._computeViewMatrix(this.position,this._currentTarget,this.upVector),this._viewMatrix}_computeViewMatrix(e,t,i){if(this.getScene().useRightHandedSystem?y.Matrix.LookAtRHToRef(e,t,i,this._viewMatrix):y.Matrix.LookAtLHToRef(e,t,i,this._viewMatrix),this.parent){let e=this.parent.getWorldMatrix();this._viewMatrix.invert(),this._viewMatrix.multiplyToRef(e,this._viewMatrix),this._viewMatrix.invert(),this._markSyncedWithParent()}}createRigCamera(e,t){if(this.cameraRigMode!==I.Camera.RIG_MODE_NONE){let t=new _(e,this.position.clone(),this.getScene());return t.isRigCamera=!0,t.rigParent=this,this.cameraRigMode===I.Camera.RIG_MODE_VR&&(this.rotationQuaternion||(this.rotationQuaternion=new y.Quaternion),t._cameraRigParams={},t.rotationQuaternion=new y.Quaternion),t.mode=this.mode,t.orthoLeft=this.orthoLeft,t.orthoRight=this.orthoRight,t.orthoTop=this.orthoTop,t.orthoBottom=this.orthoBottom,t}return null}_updateRigCameras(){let e=this._rigCameras[0],t=this._rigCameras[1];switch(this.computeWorldMatrix(),this.cameraRigMode){case I.Camera.RIG_MODE_STEREOSCOPIC_ANAGLYPH:case I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_PARALLEL:case I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED:case I.Camera.RIG_MODE_STEREOSCOPIC_OVERUNDER:case I.Camera.RIG_MODE_STEREOSCOPIC_INTERLACED:{let i=this.cameraRigMode===I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?1:-1,r=this.cameraRigMode===I.Camera.RIG_MODE_STEREOSCOPIC_SIDEBYSIDE_CROSSEYED?-1:1;this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*i,e),this._getRigCamPositionAndTarget(this._cameraRigParams.stereoHalfAngle*r,t);break}case I.Camera.RIG_MODE_VR:e.rotationQuaternion&&t.rotationQuaternion&&this.rotationQuaternion?(e.rotationQuaternion.copyFrom(this.rotationQuaternion),t.rotationQuaternion.copyFrom(this.rotationQuaternion)):(e.rotation.copyFrom(this.rotation),t.rotation.copyFrom(this.rotation)),e.position.copyFrom(this.position),t.position.copyFrom(this.position)}super._updateRigCameras()}_getRigCamPositionAndTarget(e,t){this.getTarget().subtractToRef(this.position,_._TargetFocalPoint),_._TargetFocalPoint.normalize().scaleInPlace(this._initialFocalDistance);let i=_._TargetFocalPoint.addInPlace(this.position);y.Matrix.TranslationToRef(-i.x,-i.y,-i.z,_._TargetTransformMatrix),_._TargetTransformMatrix.multiplyToRef(y.Matrix.RotationAxis(t.upVector,e),_._RigCamTransformMatrix),y.Matrix.TranslationToRef(i.x,i.y,i.z,_._TargetTransformMatrix),_._RigCamTransformMatrix.multiplyToRef(_._TargetTransformMatrix,_._RigCamTransformMatrix),y.Vector3.TransformCoordinatesToRef(this.position,_._RigCamTransformMatrix,t.position),t.setTarget(i)}getClassName(){return"TargetCamera"}},p="function"==typeof Symbol&&Symbol.metadata?Object.create(n[Symbol.metadata]??null):void 0,t=[(0,g.serialize)()],i=[(0,g.serializeAsVector3)()],r=[(0,g.serialize)()],s=[(0,g.serializeAsMeshReference)("lockedTargetId")],(0,m.__esDecorate)(null,null,t,{kind:"field",name:"updateUpVectorFromRotation",static:!1,private:!1,access:{has:e=>"updateUpVectorFromRotation"in e,get:e=>e.updateUpVectorFromRotation,set:(e,t)=>{e.updateUpVectorFromRotation=t}},metadata:p},a,o),(0,m.__esDecorate)(null,null,i,{kind:"field",name:"rotation",static:!1,private:!1,access:{has:e=>"rotation"in e,get:e=>e.rotation,set:(e,t)=>{e.rotation=t}},metadata:p},h,l),(0,m.__esDecorate)(null,null,r,{kind:"field",name:"speed",static:!1,private:!1,access:{has:e=>"speed"in e,get:e=>e.speed,set:(e,t)=>{e.speed=t}},metadata:p},c,u),(0,m.__esDecorate)(null,null,s,{kind:"field",name:"lockedTarget",static:!1,private:!1,access:{has:e=>"lockedTarget"in e,get:e=>e.lockedTarget,set:(e,t)=>{e.lockedTarget=t}},metadata:p},d,f),p&&Object.defineProperty(_,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:p}),_._RigCamTransformMatrix=new y.Matrix,_._TargetTransformMatrix=new y.Matrix,_._TargetFocalPoint=new y.Vector3,_);e.s(["TargetCamera",0,A],11822);var C=e.i(85789),P=e.i(22832),V={};e.s(["CameraInputTypes",0,V,"CameraInputsManager",0,class{constructor(e){this.attachedToElement=!1,this.attached={},this.camera=e,this.checkInputs=()=>{}}add(e){let t=e.getSimpleName();this.attached[t]?C.Logger.Warn("camera input of type "+t+" already exists on camera"):(this.attached[t]=e,e.camera=this.camera,e.checkInputs&&(this.checkInputs=this._addCheckInputs(e.checkInputs.bind(e))),this.attachedToElement&&e.attachControl(this.noPreventDefault))}remove(e){for(let t in this.attached){let i=this.attached[t];if(i===e){i.detachControl(),i.camera=null,delete this.attached[t],this.rebuildInputCheck();return}}}removeByType(e){for(let t in this.attached){let i=this.attached[t];i.getClassName()===e&&(i.detachControl(),i.camera=null,delete this.attached[t],this.rebuildInputCheck())}}_addCheckInputs(e){let t=this.checkInputs;return()=>{t(),e()}}attachInput(e){this.attachedToElement&&e.attachControl(this.noPreventDefault)}attachElement(e=!1){if(!this.attachedToElement)for(let t in e=!I.Camera.ForceAttachControlToAlwaysPreventDefault&&e,this.attachedToElement=!0,this.noPreventDefault=e,this.attached)this.attached[t].attachControl(e)}detachElement(e=!1){for(let t in this.attached)this.attached[t].detachControl(),e&&(this.attached[t].camera=null);this.attachedToElement=!1}rebuildInputCheck(){for(let e in this.checkInputs=()=>{},this.attached){let t=this.attached[e];t.checkInputs&&(this.checkInputs=this._addCheckInputs(t.checkInputs.bind(t)))}}clear(){this.attachedToElement&&this.detachElement(!0),this.attached={},this.attachedToElement=!1,this.checkInputs=()=>{}}serialize(e){let t={};for(let e in this.attached){let i=this.attached[e],r=P.SerializationHelper.Serialize(i);t[i.getClassName()]=r}e.inputsmgr=t}parse(e){let t=e.inputsmgr;if(t)for(let e in this.clear(),t){let i=V[e];if(i){let r=t[e],s=P.SerializationHelper.Parse(()=>new i,r,null);this.add(s)}}else for(let t in this.attached){let i=V[this.attached[t].getClassName()];if(i){let r=P.SerializationHelper.Parse(()=>new i,e,null);this.remove(this.attached[t]),this.add(r)}}}}],2262)},57494,e=>{"use strict";var t=e.i(55080),i=e.i(85789),r=e.i(33169),s=e.i(6939),n=e.i(2596),a=e.i(99429);let o=!1;e.s(["RegisterAbstractEngineCubeTexture",0,function(){o||(o=!0,a.AbstractEngine.prototype._partialLoadFile=function(e,t,i,r,s=null){this._loadFile(e,e=>{i[t]=e,i._internalCount++,6===i._internalCount&&r(i)},void 0,void 0,!0,(e,t)=>{s&&e&&s(e.status+" "+e.statusText,t)})},a.AbstractEngine.prototype._cascadeLoadFiles=function(e,t,i,r=null){let s=[];s._internalCount=0;for(let e=0;e<6;e++)this._partialLoadFile(i[e],e,s,t,r)},a.AbstractEngine.prototype._cascadeLoadImgs=function(e,t,i,r,s=null,n){let a=[];a._internalCount=0;for(let o=0;o<6;o++)this._partialLoadImg(r[o],o,a,e,t,i,s,n)},a.AbstractEngine.prototype._partialLoadImg=function(e,t,i,n,a,o,h=null,l){let c=(0,s.RandomGUID)();(0,r.LoadImage)(e,e=>{i[t]=e,i._internalCount++,n&&n.removePendingData(c),6===i._internalCount&&o&&o(a,i)},(e,t)=>{n&&n.removePendingData(c),h&&h(e,t)},n?n.offlineProvider:null,l),n&&n.addPendingData(c)},a.AbstractEngine.prototype.createCubeTextureBase=function(e,r,s,a,o=null,h=null,l,c=null,u=!1,d=0,f=0,p=null,_=null,m=null,g=!1,I=null){let y,x,T=p||new t.InternalTexture(this,7);T.isCube=!0,T.url=e,T.generateMipMaps=!a,T._lodGenerationScale=d,T._lodGenerationOffset=f,T._useSRGBBuffer=!!g&&this._caps.supportSRGBBuffers&&(this.version>1||this.isWebGPU||!!a),T!==p&&(T.label=e.substring(0,60)),this._doNotHandleContextLost||(T._extension=c,T._files=s,T._buffer=I);let M=e;this._transformTextureUrl&&!p&&(e=this._transformTextureUrl(e));let S=c??((x=(y=e.split("?")[0]).lastIndexOf("."))>-1?y.substring(x).toLowerCase():""),v=(0,n._GetCompatibleTextureLoader)(S),b=(e,t)=>{T.dispose(),h?h(e,t):e&&i.Logger.Warn(e)},D=(t,n)=>{e===M?t&&b(t.status+" "+t.statusText,n):(i.Logger.Warn(`Failed to load ${e}, falling back to the ${M}`),this.createCubeTextureBase(M,r,s,!!a,o,b,l,c,u,d,f,T,_,m,g,I))};if(v)v.then(t=>{let i=e=>{_&&_(T,e),t.loadCubeData(e,T,u,o,(e,t)=>{b(e,t)})};I?i(I):s&&6===s.length?t.supportCascades?this._cascadeLoadFiles(r,e=>i(e.map(e=>new Uint8Array(e))),s,b):b("Textures type does not support cascades."):this._loadFile(e,e=>i(new Uint8Array(e)),void 0,r?r.offlineProvider||null:void 0,!0,D)});else{if(!s||0===s.length)throw Error("Cannot load cubemap because files were not defined, or the correct loader was not found.");this._cascadeLoadImgs(r,T,(e,t)=>{m&&m(e,t)},s,b)}return this._internalTexturesCache.push(T),T})}],57494)},42192,e=>{"use strict";var t=e.i(99429);let i=!1;e.s(["RegisterAbstractEngineTexture",0,function(){i||(i=!0,t.AbstractEngine.prototype.createDepthStencilTexture=function(e,t,i){if(!t.isCube)return this._createDepthStencilTexture(e,t,i);{let i=e.width||e;return this._createDepthStencilCubeTexture(i,t)}})}])},59012,e=>{"use strict";var t=e.i(99493);class i{constructor(e){this.value=this._toInt(e)}_toInt(e){return 0|e}add(e){return new i(this.value+e.value)}subtract(e){return new i(this.value-e.value)}multiply(e){return new i(Math.imul(this.value,e.value))}divide(e){return new i(this.value/e.value)}getClassName(){return i.ClassName}equals(e){return this.value===e.value}static FromValue(e){return new i(e)}toString(){return this.value.toString()}}i.ClassName="FlowGraphInteger";let r=!1;e.s(["FlowGraphInteger",0,i,"RegisterFlowGraphInteger",0,function(){r||(r=!0,(0,t.RegisterClass)("FlowGraphInteger",i))}])},40871,e=>{"use strict";var t,i;(i=t||(t={})).Animation="Animation",i.AnimationGroup="AnimationGroup",i.Mesh="Mesh",i.Material="Material",i.Camera="Camera",i.Light="Light",e.s(["GetFlowGraphAssetWithType",0,function(e,t,i,r){switch(t){case"Animation":return r?e.animations.find(e=>e.uniqueId===i)??null:e.animations[i]??null;case"AnimationGroup":return r?e.animationGroups.find(e=>e.uniqueId===i)??null:e.animationGroups[i]??null;case"Mesh":return r?e.meshes.find(e=>e.uniqueId===i)??null:e.meshes[i]??null;case"Material":return r?e.materials.find(e=>e.uniqueId===i)??null:e.materials[i]??null;case"Camera":return r?e.cameras.find(e=>e.uniqueId===i)??null:e.cameras[i]??null;case"Light":return r?e.lights.find(e=>e.uniqueId===i)??null:e.lights[i]??null;default:return null}}])},60219,e=>{"use strict";var t=e.i(20552);class i extends t.FlowGraphExecutionBlockWithOutSignal{constructor(e,t){if(super(e),this._eventsSignalOutputs={},this.done=this._registerSignalOutput("done"),t)for(const e of t)this._eventsSignalOutputs[e]=this._registerSignalOutput(e+"Event")}_executeOnTick(e){}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),this.out._activateSignal(e),e._setExecutionVariable(this,"_initialized",!0)}_resetAfterCanceled(e){e._deleteExecutionVariable(this,"_initialized"),e._removePendingBlock(this)}}e.s(["FlowGraphAsyncExecutionBlock",0,i])},37096,e=>{"use strict";var t=e.i(6939),i=e.i(43328),r=e.i(42704),s=e.i(50137);class n extends i.FlowGraphConnection{constructor(e,t,i,s,n=s.defaultValue,a=!1){super(e,t,i),this.richType=s,this._defaultValue=n,this._optional=a,this._isDisabled=!1,this._lastValue=null,this.dataTransformer=null,this.onValueChangedObservable=new r.Observable}get optional(){return this._optional}get isDisabled(){return this._isDisabled}set isDisabled(e){this._isDisabled!==e&&(this._isDisabled=e,this._isDisabled&&this.disconnectFromAll())}_isSingularConnection(){return 0===this.connectionType}setValue(e,t){t._getConnectionValue(this)!==e&&(t._setConnectionValue(this,e),this.onValueChangedObservable.notifyObservers(e))}resetToDefaultValue(e){e._setConnectionValue(this,this._defaultValue)}_reresolveDefaultValueForScene(e){let t,i=this._defaultValue;if(!i||"object"!=typeof i)return;if("function"==typeof i.getClassName&&"function"==typeof i.getScene){if(i.getScene()===e)return;t={id:i.id,name:i.name,className:i.getClassName(),uniqueId:i.uniqueId}}else{if("string"!=typeof i.className||!i.id&&!i.name||void 0!==i.value)return;t=i}let r=(0,s.GetSceneNodeFromSerializedReference)(t,e);r&&(this._defaultValue=r)}connectTo(e){this._isDisabled||super.connectTo(e)}_getValueOrDefault(e){let t=e._getConnectionValue(this)??this._defaultValue;return this.dataTransformer?this.dataTransformer(t):t}getValue(e){if(1===this.connectionType){e._notifyExecuteNode(this._ownerBlock),this._ownerBlock._updateOutputs(e);let t=this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}let t=this.isConnected()?this._connectedPoint[0].getValue(e):this._getValueOrDefault(e);return this._lastValue=t,this.richType.typeTransformer?this.richType.typeTransformer(t):t}_getLastValue(){return this._lastValue}getClassName(){return"FlowGraphDataConnection"}serialize(e={}){super.serialize(e),e.richType={},this.richType.serialize(e.richType),e.optional=this._optional,(0,s.defaultValueSerializationFunction)("defaultValue",this._defaultValue,e)}}e.s(["FlowGraphBlock",0,class{constructor(e){this.config=e,this.uniqueId=(0,t.RandomGUID)(),this.name=this.config?.name??this.getClassName(),this.dataInputs=[],this.dataOutputs=[]}_updateOutputs(e){}registerDataInput(e,t,i){let r=new n(e,0,this,t,i);return this.dataInputs.push(r),r}registerDataOutput(e,t,i){let r=new n(e,1,this,t,i);return this.dataOutputs.push(r),r}getDataInput(e){return this.dataInputs.find(t=>t.name===e)}getDataOutput(e){return this.dataOutputs.find(t=>t.name===e)}serialize(e={},t=s.defaultValueSerializationFunction){if(e.uniqueId=this.uniqueId,e.config={},this.config){let i=this.config;for(let r of Object.keys(i))t(r,i[r],e.config)}for(let t of(e.dataInputs=[],e.dataOutputs=[],e.className=this.getClassName(),this.dataInputs)){let i={};t.serialize(i),e.dataInputs.push(i)}for(let t of this.dataOutputs){let i={};t.serialize(i),e.dataOutputs.push(i)}}deserialize(e){}_log(e,t,i){e.logger?.addLogItem({action:t,payload:i,className:this.getClassName(),uniqueId:this.uniqueId})}getClassName(){return"FlowGraphBlock"}}],37096)},43328,e=>{"use strict";var t,i,r=e.i(6939);(t=i||(i={}))[t.Input=0]="Input",t[t.Output=1]="Output",e.s(["FlowGraphConnection",0,class{constructor(e,t,i){this._ownerBlock=i,this._connectedPoint=[],this.uniqueId=(0,r.RandomGUID)(),this.connectedPointIds=[],this.name=e,this._connectionType=t}get connectionType(){return this._connectionType}_isSingularConnection(){return!0}isConnected(){return this._connectedPoint.length>0}connectTo(e){if(this._connectionType===e._connectionType)throw Error(`Cannot connect two points of type ${this.connectionType}`);if(this._isSingularConnection()&&this._connectedPoint.length>0||e._isSingularConnection()&&e._connectedPoint.length>0)throw Error("Max number of connections for point reached");this._connectedPoint.push(e),e._connectedPoint.push(this)}disconnectFrom(e,t=!0){let i=this._connectedPoint.indexOf(e),r=e._connectedPoint.indexOf(this);-1!==i&&-1!==r&&(t&&this._connectedPoint.splice(i,1),e._connectedPoint.splice(r,1))}disconnectFromAll(){for(let e of this._connectedPoint)this.disconnectFrom(e,!1);this._connectedPoint.length=0}dispose(){for(let e of this._connectedPoint)this.disconnectFrom(e)}serialize(e={}){for(let t of(e.uniqueId=this.uniqueId,e.name=this.name,e._connectionType=this._connectionType,e.connectedPointIds=[],e.className=this.getClassName(),this._connectedPoint))e.connectedPointIds.push(t.uniqueId)}getClassName(){return"FGConnection"}deserialize(e){this.uniqueId=e.uniqueId,this.name=e.name,this._connectionType=e._connectionType,this.connectedPointIds=e.connectedPointIds}}])},12752,e=>{"use strict";let t="activeDelayIndices";e.s(["IsDelayActive",0,function(e,i){return e._getGlobalContextVariable(t,null)?.has(i)??!1},"MarkDelayActive",0,function(e,i){let r;(!(r=e._getGlobalContextVariable(t,null))&&(r=new Set,e._setGlobalContextVariable(t,r)),r).add(i)},"MarkDelayInactive",0,function(e,i){e._getGlobalContextVariable(t,null)?.delete(i)}])},57011,e=>{"use strict";var t=e.i(60219);class i extends t.FlowGraphAsyncExecutionBlock{constructor(e){super(e),this.initPriority=0,this.type="NoTrigger",this._unregisterSignalInput("in")}deserialize(e){let t={...e};t.signalInputs=(e.signalInputs??[]).filter(e=>"in"!==e.name),super.deserialize(t)}_execute(e){e._notifyExecuteNode(this),this.done._activateSignal(e),this.out._activateSignal(e)}_startPendingTasks(e){e._getExecutionVariable(this,"_initialized",!1)&&(this._cancelPendingTasks(e),this._resetAfterCanceled(e)),this._preparePendingTasks(e),e._addPendingBlock(this),e._setExecutionVariable(this,"_initialized",!0)}}e.s(["FlowGraphEventBlock",0,i])},95754,e=>{"use strict";var t=e.i(37096),i=e.i(43328);class r extends i.FlowGraphConnection{constructor(){super(...arguments),this.priority=0,this._lastActivationTime=-1}_isSingularConnection(){return!1}connectTo(e){super.connectTo(e),this._connectedPoint.sort((e,t)=>t.priority-e.priority)}_activateSignal(e){if(this._lastActivationTime=performance.now(),e.logger?.addLogItem({action:"ActivateSignal",className:this._ownerBlock.getClassName(),uniqueId:this._ownerBlock.uniqueId,payload:{connectionType:this.connectionType,name:this.name}}),0===this.connectionType){if(e._shouldBreak(this._ownerBlock,this))return;e._increaseExecutionId(),e._notifyExecuteNode(this._ownerBlock);let t=performance.now();this._ownerBlock._execute(e,this),this._ownerBlock._lastExecutionTime=performance.now()-t}else for(let t of this._connectedPoint)t._activateSignal(e)}}class s extends t.FlowGraphBlock{constructor(e){super(e),this.priority=0,this._lastExecutionTime=-1,this.signalInputs=[],this.signalOutputs=[],this.in=this._registerSignalInput("in"),this.error=this._registerSignalOutput("error")}_registerSignalInput(e){let t=new r(e,0,this);return this.signalInputs.push(t),t}_registerSignalOutput(e){let t=new r(e,1,this);return this.signalOutputs.push(t),t}_unregisterSignalInput(e){let t=this.signalInputs.findIndex(t=>t.name===e);-1!==t&&(this.signalInputs[t].dispose(),this.signalInputs.splice(t,1))}_unregisterSignalOutput(e){let t=this.signalOutputs.findIndex(t=>t.name===e);-1!==t&&(this.signalOutputs[t].dispose(),this.signalOutputs.splice(t,1))}_reportError(e,t){this.error.payload="string"==typeof t?Error(t):t,this.error._activateSignal(e)}getSignalInput(e){return this.signalInputs.find(t=>t.name===e)}getSignalOutput(e){return this.signalOutputs.find(t=>t.name===e)}serialize(e={}){for(let t of(super.serialize(e),e.signalInputs=[],e.signalOutputs=[],this.signalInputs)){let i={};t.serialize(i),e.signalInputs.push(i)}for(let t of this.signalOutputs){let i={};t.serialize(i),e.signalOutputs.push(i)}}deserialize(e){for(let t=0;t<e.signalInputs.length;t++){let i=this.getSignalInput(e.signalInputs[t].name);if(i)i.deserialize(e.signalInputs[t]);else throw Error("Could not find signal input with name "+e.signalInputs[t].name+" in block "+e.className)}for(let t=0;t<e.signalOutputs.length;t++){let i=this.getSignalOutput(e.signalOutputs[t].name);if(i)i.deserialize(e.signalOutputs[t]);else throw Error("Could not find signal output with name "+e.signalOutputs[t].name+" in block "+e.className)}}getClassName(){return"FlowGraphExecutionBlock"}}e.s(["FlowGraphExecutionBlock",0,s],95754)},20552,e=>{"use strict";var t=e.i(95754);class i extends t.FlowGraphExecutionBlock{constructor(e){super(e),this.out=this._registerSignalOutput("out")}}e.s(["FlowGraphExecutionBlockWithOutSignal",0,i])},13870,e=>{"use strict";(0,e.i(97009).RegisterFlowGraphRichTypes)(),e.s([])},97009,47487,e=>{"use strict";var t,i,r=e.i(72003),s=e.i(64073),n=e.i(59012);class a{constructor(e=[1,0,0,1]){this._m=e}get m(){return this._m}transformVector(e){return this.transformVectorToRef(e,new r.Vector2)}transformVectorToRef(e,t){return t.x=e.x*this._m[0]+e.y*this._m[2],t.y=e.x*this._m[1]+e.y*this._m[3],t}asArray(){return this.toArray()}toArray(e=[]){for(let t=0;t<4;t++)e[t]=this._m[t];return e}fromArray(e){for(let t=0;t<4;t++)this._m[t]=e[t];return this}multiplyToRef(e,t){let i=e._m,r=this._m,s=t._m;return s[0]=r[0]*i[0]+r[1]*i[2],s[1]=r[0]*i[1]+r[1]*i[3],s[2]=r[2]*i[0]+r[3]*i[2],s[3]=r[2]*i[1]+r[3]*i[3],t}multiply(e){return this.multiplyToRef(e,new a)}divideToRef(e,t){let i=this._m,r=e._m,s=t._m;return s[0]=i[0]/r[0],s[1]=i[1]/r[1],s[2]=i[2]/r[2],s[3]=i[3]/r[3],t}divide(e){return this.divideToRef(e,new a)}addToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]+r[0],s[1]=i[1]+r[1],s[2]=i[2]+r[2],s[3]=i[3]+r[3],t}add(e){return this.addToRef(e,new a)}subtractToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]-r[0],s[1]=i[1]-r[1],s[2]=i[2]-r[2],s[3]=i[3]-r[3],t}subtract(e){return this.subtractToRef(e,new a)}transpose(){let e=this._m;return new a([e[0],e[2],e[1],e[3]])}determinant(){let e=this._m;return e[0]*e[3]-e[1]*e[2]}inverse(){let e=this.determinant();if(0===e)throw Error("Matrix is not invertible");let t=this._m,i=1/e;return new a([t[3]*i,-t[1]*i,-t[2]*i,t[0]*i])}equals(e,t=0){let i=this._m,r=e.m;return 0===t?i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]&&i[3]===r[3]:Math.abs(i[0]-r[0])<t&&Math.abs(i[1]-r[1])<t&&Math.abs(i[2]-r[2])<t&&Math.abs(i[3]-r[3])<t}getClassName(){return"FlowGraphMatrix2D"}toString(){return`FlowGraphMatrix2D(${this._m.join(", ")})`}}class o{constructor(e=[1,0,0,0,1,0,0,0,1]){this._m=e}get m(){return this._m}transformVector(e){return this.transformVectorToRef(e,new r.Vector3)}transformVectorToRef(e,t){let i=this._m;return t.x=e.x*i[0]+e.y*i[3]+e.z*i[6],t.y=e.x*i[1]+e.y*i[4]+e.z*i[7],t.z=e.x*i[2]+e.y*i[5]+e.z*i[8],t}multiplyToRef(e,t){let i=e._m,r=this._m,s=t.m;return s[0]=r[0]*i[0]+r[1]*i[3]+r[2]*i[6],s[1]=r[0]*i[1]+r[1]*i[4]+r[2]*i[7],s[2]=r[0]*i[2]+r[1]*i[5]+r[2]*i[8],s[3]=r[3]*i[0]+r[4]*i[3]+r[5]*i[6],s[4]=r[3]*i[1]+r[4]*i[4]+r[5]*i[7],s[5]=r[3]*i[2]+r[4]*i[5]+r[5]*i[8],s[6]=r[6]*i[0]+r[7]*i[3]+r[8]*i[6],s[7]=r[6]*i[1]+r[7]*i[4]+r[8]*i[7],s[8]=r[6]*i[2]+r[7]*i[5]+r[8]*i[8],t}multiply(e){return this.multiplyToRef(e,new o)}divideToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]/r[0],s[1]=i[1]/r[1],s[2]=i[2]/r[2],s[3]=i[3]/r[3],s[4]=i[4]/r[4],s[5]=i[5]/r[5],s[6]=i[6]/r[6],s[7]=i[7]/r[7],s[8]=i[8]/r[8],t}divide(e){return this.divideToRef(e,new o)}addToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]+r[0],s[1]=i[1]+r[1],s[2]=i[2]+r[2],s[3]=i[3]+r[3],s[4]=i[4]+r[4],s[5]=i[5]+r[5],s[6]=i[6]+r[6],s[7]=i[7]+r[7],s[8]=i[8]+r[8],t}add(e){return this.addToRef(e,new o)}subtractToRef(e,t){let i=this._m,r=e.m,s=t.m;return s[0]=i[0]-r[0],s[1]=i[1]-r[1],s[2]=i[2]-r[2],s[3]=i[3]-r[3],s[4]=i[4]-r[4],s[5]=i[5]-r[5],s[6]=i[6]-r[6],s[7]=i[7]-r[7],s[8]=i[8]-r[8],t}subtract(e){return this.subtractToRef(e,new o)}toArray(e=[]){for(let t=0;t<9;t++)e[t]=this._m[t];return e}asArray(){return this.toArray()}fromArray(e){for(let t=0;t<9;t++)this._m[t]=e[t];return this}transpose(){let e=this._m;return new o([e[0],e[3],e[6],e[1],e[4],e[7],e[2],e[5],e[8]])}determinant(){let e=this._m;return e[0]*(e[4]*e[8]-e[5]*e[7])-e[1]*(e[3]*e[8]-e[5]*e[6])+e[2]*(e[3]*e[7]-e[4]*e[6])}inverse(){let e=this.determinant();if(0===e)throw Error("Matrix is not invertible");let t=this._m,i=1/e;return new o([(t[4]*t[8]-t[5]*t[7])*i,(t[2]*t[7]-t[1]*t[8])*i,(t[1]*t[5]-t[2]*t[4])*i,(t[5]*t[6]-t[3]*t[8])*i,(t[0]*t[8]-t[2]*t[6])*i,(t[2]*t[3]-t[0]*t[5])*i,(t[3]*t[7]-t[4]*t[6])*i,(t[1]*t[6]-t[0]*t[7])*i,(t[0]*t[4]-t[1]*t[3])*i])}equals(e,t=0){let i=this._m,r=e.m;return 0===t?i[0]===r[0]&&i[1]===r[1]&&i[2]===r[2]&&i[3]===r[3]&&i[4]===r[4]&&i[5]===r[5]&&i[6]===r[6]&&i[7]===r[7]&&i[8]===r[8]:Math.abs(i[0]-r[0])<t&&Math.abs(i[1]-r[1])<t&&Math.abs(i[2]-r[2])<t&&Math.abs(i[3]-r[3])<t&&Math.abs(i[4]-r[4])<t&&Math.abs(i[5]-r[5])<t&&Math.abs(i[6]-r[6])<t&&Math.abs(i[7]-r[7])<t&&Math.abs(i[8]-r[8])<t}getClassName(){return"FlowGraphMatrix3D"}toString(){return`FlowGraphMatrix3D(${this._m.join(", ")})`}}e.s(["FlowGraphMatrix2D",0,a,"FlowGraphMatrix3D",0,o],47487),(t=i||(i={})).Any="any",t.String="string",t.Number="number",t.Boolean="boolean",t.Object="object",t.Integer="FlowGraphInteger",t.Vector2="Vector2",t.Vector3="Vector3",t.Vector4="Vector4",t.Quaternion="Quaternion",t.Matrix="Matrix",t.Matrix2D="Matrix2D",t.Matrix3D="Matrix3D",t.Color3="Color3",t.Color4="Color4";class h{constructor(e,t,i=-1){this.typeName=e,this.defaultValue=t,this.animationType=i}serialize(e){e.typeName=this.typeName,e.defaultValue=this.defaultValue}}let l=new h("any",void 0),c=new h("string",""),u=new h("number",0,0),d=new h("boolean",!1),f=new h("Vector2",r.Vector2.Zero(),5),p=new h("Vector3",r.Vector3.Zero(),1),_=new h("Vector4",r.Vector4.Zero()),m=new h("Matrix",r.Matrix.Identity(),3),g=new h("Matrix2D",new a),I=new h("Matrix3D",new o),y=new h("Color3",s.Color3.Black(),4),x=new h("Color4",new s.Color4(0,0,0,0),7),T=new h("Quaternion",r.Quaternion.Identity(),2),M=new h("FlowGraphInteger",new n.FlowGraphInteger(0),0),S=!1;e.s(["RegisterFlowGraphRichTypes",0,function(){S||(S=!0,T.typeTransformer=e=>{if(e.getClassName){if("Vector4"===e.getClassName())return r.Quaternion.FromArray(e.asArray());else if("Vector3"===e.getClassName())return r.Quaternion.FromEulerVector(e);else if("Matrix"===e.getClassName())return r.Quaternion.FromRotationMatrix(e)}return e})},"RichTypeAny",0,l,"RichTypeBoolean",0,d,"RichTypeFlowGraphInteger",0,M,"RichTypeMatrix",0,m,"RichTypeMatrix2D",0,g,"RichTypeMatrix3D",0,I,"RichTypeNumber",0,u,"RichTypeQuaternion",0,T,"RichTypeString",0,c,"RichTypeVector2",0,f,"RichTypeVector3",0,p,"RichTypeVector4",0,_,"getAnimationTypeByFlowGraphType",0,function(e){switch(e){case"number":default:return 0;case"Vector2":return 5;case"Vector3":return 1;case"Matrix":return 3;case"Color3":return 4;case"Color4":return 7;case"Quaternion":return 2}},"getRichTypeByAnimationType",0,function(e){switch(e){case 0:return u;case 5:return f;case 1:return p;case 3:return m;case 4:return y;case 7:return x;case 2:return T;default:return l}},"getRichTypeByFlowGraphType",0,function(e){switch(e){case"string":return c;case"number":return u;case"boolean":return d;case"Vector2":return f;case"Vector3":return p;case"Vector4":return _;case"Matrix":return m;case"Color3":return y;case"Color4":return x;case"Quaternion":return T;case"FlowGraphInteger":return M;case"Matrix2D":return g;case"Matrix3D":return I;default:return l}},"getRichTypeFromValue",0,function(e){switch(typeof e){case"string":return c;case"number":return u;case"boolean":return d;case"object":if(e.getClassName)switch(e.getClassName()){case"Vector2":return f;case"Vector3":return p;case"Vector4":return _;case"Matrix":return m;case"Color3":return y;case"Color4":return x;case"Quaternion":return T;case"FlowGraphInteger":return M;case"Matrix2D":return g;case"Matrix3D":return I}return l;default:return l}}],97009)},50137,e=>{"use strict";var t=e.i(85789),i=e.i(64073),r=e.i(72003),s=e.i(59012),n=e.i(97009),a=e.i(47487);function o(e){return"Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e||"Color3"===e||"Color4"===e}function h(e,t){if(!e||!e.id&&!e.name)return;let i=t.getNodes().filter(t=>e.id?t.id===e.id:t.name===e.name);if(0===i.length)return;let r=e.type??e.className,s=r?i.filter(e=>e.getClassName()===r):[],n=s.length>0?s:i;return(e.uniqueId?n.find(t=>t.uniqueId===e.uniqueId):void 0)??n[0]}e.s(["GetSceneNodeFromSerializedReference",0,h,"defaultValueParseFunction",0,function e(t,l,c,u){let d,f=l[t],p=f?.type??f?.className,_=h(f,u);if(_)d=_;else if(o(p))d=function(e,t,s=!1){if("Vector2"===e)return r.Vector2.FromArray(t);if("Vector3"===e)return s&&(t[2]*=-1),r.Vector3.FromArray(t);if("Vector4"===e)return r.Vector4.FromArray(t);if("Quaternion"===e)return s&&(t[2]*=-1,t[3]*=-1),r.Quaternion.FromArray(t);if("Color3"===e)return new i.Color3(t[0],t[1],t[2]);else if("Color4"===e)return new i.Color4(t[0],t[1],t[2],t[3]);else throw Error(`Unknown vector class name ${e}`)}(p,f.value);else if("AnimationGroup"===p){let e=u.animationGroups.filter(e=>e.name===f.name);d=1===e.length?e[0]:e.find(e=>e.uniqueId===f.uniqueId)}else d="Matrix"===p?r.Matrix.FromArray(f.value):"Matrix2D"===p?new a.FlowGraphMatrix2D(f.value):"Matrix3D"===p?new a.FlowGraphMatrix3D(f.value):"FlowGraphInteger"===p?s.FlowGraphInteger.FromValue(f.value):"number"===p||"string"===p||"boolean"===p?f.value[0]:f&&void 0!==f.value?f.value:Array.isArray(f)&&f.length>0&&"object"==typeof f[0]&&null!==f[0]&&"eventData"in f[0]?f.reduce((t,i)=>(i.eventData&&(t[i.id]={type:(0,n.getRichTypeByFlowGraphType)(i.type)},void 0!==i.value&&(t[i.id].value=e("value",i,c,u))),t),{}):f;return d},"defaultValueSerializationFunction",0,function(e,i,r){var s;let n=i?.getClassName?.()??"";if(o(n)||"Matrix"===(s=n)||"Matrix2D"===s||"Matrix3D"===s)r[e]={value:i.asArray(),className:n};else if("FlowGraphInteger"===n)r[e]={value:i.value,className:n};else if(n&&(i.id||i.name))r[e]={id:i.id,name:i.name,className:n,uniqueId:i.uniqueId};else if("object"!=typeof i||null===i)r[e]=i;else{if("pathConverter"===e||Object.values(i).some(e=>"function"==typeof e))return;try{r[e]=JSON.parse(JSON.stringify(i))}catch{t.Logger.Warn(`FlowGraph serialization: value for key "${e}" is not JSON-serializable and was skipped.`)}}},"needsPathConverter",0,function(e){return"FlowGraphJsonPointerParserBlock"===e}])},5573,e=>{"use strict";let t=(0,e.i(7484).IsNavigatorAvailable)()&&/(Mac|iPhone|iPod|iPad)/i.test(navigator.platform);function i(e){return"number"==typeof e?e:e.value}e.s(["_AreSameIntegerClass",0,function(e,t){return"FlowGraphInteger"===e&&"FlowGraphInteger"===t},"_AreSameMatrixClass",0,function(e,t){return e===t&&("Matrix"===e||"Matrix2D"===e||"Matrix3D"===e)},"_AreSameVectorOrQuaternionClass",0,function(e,t){return e===t&&("Vector2"===e||"Vector3"===e||"Vector4"===e||"Quaternion"===e)},"_GetClassNameOf",0,function(e){if(e.getClassName)return e.getClassName()},"_IsDescendantOf",0,function e(t,i){return!!(t.parent&&(t.parent===i||e(t.parent,i)))},"_IsMacPlatform",0,t,"getNumericValue",0,i,"isNumeric",0,function(e,t){let r="number"==typeof e||"number"==typeof e?.value;return r&&!t?!isNaN(i(e)):r}])},63147,27240,e=>{"use strict";let t,i,r,s,n,a,o,h;var l,c=e.i(4112),u=e.i(91679),d=e.i(72003),f=e.i(64073),p=e.i(89170),_=e.i(75481),m=e.i(99493);let g=(r=p.Light,s=[],n=[],a=[],o=[],l=class extends r{constructor(e,t,i,r){super(e,i,r),this.groundColor=(0,c.__runInitializers)(this,s,new f.Color3(0,0,0)),this.direction=((0,c.__runInitializers)(this,n),(0,c.__runInitializers)(this,a,void 0)),(0,c.__runInitializers)(this,o),this.direction=t||d.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=d.Vector3.Normalize(e.subtract(d.Vector3.Zero())),this.direction}getShadowGenerator(){return null}transferToEffect(e,t){let i=d.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=d.Vector3.Normalize(this.direction);return e.setFloat3(t,i.x,i.y,i.z),this}computeWorldMatrix(){return this._worldMatrix||(this._worldMatrix=d.Matrix.Identity()),this._worldMatrix}getTypeID(){return p.Light.LIGHTTYPEID_HEMISPHERICLIGHT}prepareLightSpecificDefines(e,t){e["HEMILIGHT"+t]=!0}},h="function"==typeof Symbol&&Symbol.metadata?Object.create(r[Symbol.metadata]??null):void 0,t=[(0,u.serializeAsColor3)()],i=[(0,u.serializeAsVector3)()],(0,c.__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},s,n),(0,c.__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},a,o),h&&Object.defineProperty(l,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:h}),l),I=!1;function y(){I||(I=!0,_.Node.AddNodeConstructor("Light_Type_3",(e,t)=>()=>new g(e,d.Vector3.Zero(),t)),(0,m.RegisterClass)("BABYLON.HemisphericLight",g))}e.s(["HemisphericLight",0,g,"RegisterHemisphericLight",0,y],27240),y(),e.s([],63147)},89170,e=>{"use strict";let t,i,r,s,n,a,o,h,l,c,u,d,f,p,_,m,g,I,y,x,T,M,S,v,b,D,A,C,P,V,w,B,R,L,E,F;var O,z,k=e.i(4112),N=e.i(91679),G=e.i(72003),U=e.i(64073),W=e.i(75481),H=e.i(81127),Q=e.i(99493),Y=e.i(26801),q=e.i(22832);let j=(p=W.Node,_=[],m=[],g=[],I=[],y=[],x=[],T=[],M=[],S=[],v=[],b=[],D=[],A=[],C=[],P=[],V=[],w=[],B=[],R=[],L=[],E=[],O=class extends p{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,z,"f")}set renderPriority(e){(0,k.__classPrivateFieldSet)(this,z,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,_),(0,k.__runInitializers)(this,m,new U.Color3(1,1,1))),this.specular=((0,k.__runInitializers)(this,g),(0,k.__runInitializers)(this,I,new U.Color3(1,1,1))),this.falloffType=((0,k.__runInitializers)(this,y),(0,k.__runInitializers)(this,x,O.FALLOFF_DEFAULT)),this.intensity=((0,k.__runInitializers)(this,T),(0,k.__runInitializers)(this,M,1)),this._range=((0,k.__runInitializers)(this,S),Number.MAX_VALUE),this._inverseSquaredRange=0,this._photometricScale=1,this._intensityMode=O.INTENSITYMODE_AUTOMATIC,this._radius=1e-5,this._renderPriority=(0,k.__runInitializers)(this,v,void 0),z.set(this,((0,k.__runInitializers)(this,b),(0,k.__runInitializers)(this,D,0))),this._shadowEnabled=((0,k.__runInitializers)(this,A),(0,k.__runInitializers)(this,C,!0)),this._includedOnlyMeshes=(0,k.__runInitializers)(this,P),this._excludeWithLayerMask=(0,k.__runInitializers)(this,V,0),this._includeOnlyWithLayerMask=((0,k.__runInitializers)(this,w),(0,k.__runInitializers)(this,B,0)),this._lightmapMode=((0,k.__runInitializers)(this,R),(0,k.__runInitializers)(this,L,0)),this._shadowGenerators=((0,k.__runInitializers)(this,E),null),this._excludedMeshesIds=[],this._includedOnlyMeshesIds=[],this._currentViewDepth=0,this._clusteredContainer=null,this._isLight=!0,i||this.getScene().addLight(this),this._uniformBuffer=new H.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,r,s=!0){let n=e.toString(),a=!1;if(this._uniformBuffer.bindToEffect(i,"Light"+n),this._renderId!==t.getRenderId()||this._lastUseSpecular!==r||!this._uniformBuffer.useUbo){this._renderId=t.getRenderId(),this._lastUseSpecular=r;let e=this.getScaledIntensity();this.transferToEffect(i,n),this.diffuse.scaleToRef(e,U.TmpColors.Color3[0]),this._uniformBuffer.updateColor4("vLightDiffuse",U.TmpColors.Color3[0],this.range,n),r&&(this.specular.scaleToRef(e,U.TmpColors.Color3[1]),this._uniformBuffer.updateColor4("vLightSpecular",U.TmpColors.Color3[1],this.radius,n)),a=!0}if(this.transferTexturesToEffect(i,n),t.shadowsEnabled&&this.shadowEnabled&&s){let e=this.getShadowGenerator(t.activeCamera)??this.getShadowGenerator();e&&(e.bindShadowLight(n,i),a=!0)}a?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 G.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=O.GetConstructorFromName(this.getTypeID(),e,this.getScene());if(!i)return null;let r=q.SerializationHelper.Clone(i,this);return e&&(r.name=e),t&&(r.parent=t),r.setEnabled(this.isEnabled()),this.onClonedObservable.notifyObservers(r),r}serialize(){let e=q.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 q.SerializationHelper.AppendSerializedAnimations(this,e),e.ranges=this.serializeAnimationRanges(),e.isEnabled=this.isEnabled(),e}static GetConstructorFromName(e,t,i){let r=W.Node.Construct("Light_Type_"+e,t,i);return r||null}static Parse(e,t,i=""){let r=O.GetConstructorFromName(e.type,e.name,t);if(!r)return null;let s=q.SerializationHelper.Parse(r,e,t,i);if(e.excludedMeshesIds&&(s._excludedMeshesIds=e.excludedMeshesIds),e.includedOnlyMeshesIds&&(s._includedOnlyMeshesIds=e.includedOnlyMeshesIds),void 0!==e.parentId&&(s._waitingParentId=e.parentId),void 0!==e.parentInstanceIndex&&(s._waitingParentInstanceIndex=e.parentInstanceIndex),void 0!==e.falloffType&&(s.falloffType=e.falloffType),void 0!==e.lightmapMode&&(s.lightmapMode=e.lightmapMode),e.animations){for(let t=0;t<e.animations.length;t++){let i=e.animations[t],r=(0,Q.GetClass)("BABYLON.Animation");r&&s.animations.push(r.Parse(i))}W.Node.ParseAnimationRanges(s,e,t)}return e.autoAnimate&&t.beginAnimation(s,e.autoAnimateFrom,e.autoAnimateTo,e.autoAnimateLoop,e.autoAnimateSpeed||1),void 0!==e.isEnabled&&s.setEnabled(e.isEnabled),s._onParsed(e,t,i),s}_onParsed(e,t,i=""){}_hookArrayForExcluded(e){let t=e.push;e.push=(...i)=>{let r=t.apply(e,i);if(this._clusteredContainer)return r;for(let e of i)e._resyncLightSource(this);return r};let i=e.splice;if(e.splice=(t,r)=>{let s=i.call(e,t,r??e.length);if(this._clusteredContainer)return s;for(let e of s)e._resyncLightSource(this);return s},!this._clusteredContainer)for(let t of e)t._resyncLightSource(this)}_hookArrayForIncludedOnly(e){let t=e.push;e.push=(...i)=>{let r=t.apply(e,i);return this._resyncMeshes(),r};let i=e.splice;e.splice=(t,r)=>{let s=i.call(e,t,r??e.length);return this._resyncMeshes(),s},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===O.INTENSITYMODE_AUTOMATIC&&(i=t===O.LIGHTTYPEID_DIRECTIONALLIGHT?O.INTENSITYMODE_ILLUMINANCE:O.INTENSITYMODE_LUMINOUSINTENSITY),t){case O.LIGHTTYPEID_POINTLIGHT:case O.LIGHTTYPEID_SPOTLIGHT:switch(i){case O.INTENSITYMODE_LUMINOUSPOWER:e=1/(4*Math.PI);break;case O.INTENSITYMODE_LUMINOUSINTENSITY:e=1;break;case O.INTENSITYMODE_LUMINANCE:e=this.radius*this.radius}break;case O.LIGHTTYPEID_DIRECTIONALLIGHT:switch(i){case O.INTENSITYMODE_ILLUMINANCE:e=1;break;case O.INTENSITYMODE_LUMINANCE:{let t=this.radius;e=2*Math.PI*(1-Math.cos(t=Math.max(t,.001)))}}break;case O.LIGHTTYPEID_HEMISPHERICLIGHT:case O.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}},z=new WeakMap,F="function"==typeof Symbol&&Symbol.metadata?Object.create(p[Symbol.metadata]??null):void 0,t=[(0,N.serializeAsColor3)()],i=[(0,N.serializeAsColor3)()],r=[(0,N.serialize)()],s=[(0,N.serialize)()],n=[(0,N.serialize)()],a=[(0,N.serialize)()],o=[(0,N.serialize)()],h=[(0,N.serialize)()],l=[(0,N.expandToProperty)("_reorderLightsInScene")],c=[(0,N.serialize)("shadowEnabled")],u=[(0,N.serialize)("excludeWithLayerMask")],d=[(0,N.serialize)("includeOnlyWithLayerMask")],f=[(0,N.serialize)("lightmapMode")],(0,k.__esDecorate)(O,null,n,{kind:"getter",name:"range",static:!1,private:!1,access:{has:e=>"range"in e,get:e=>e.range},metadata:F},null,_),(0,k.__esDecorate)(O,null,a,{kind:"getter",name:"intensityMode",static:!1,private:!1,access:{has:e=>"intensityMode"in e,get:e=>e.intensityMode},metadata:F},null,_),(0,k.__esDecorate)(O,null,o,{kind:"getter",name:"radius",static:!1,private:!1,access:{has:e=>"radius"in e,get:e=>e.radius},metadata:F},null,_),(0,k.__esDecorate)(O,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:F},D,A),(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:F},m,g),(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:F},I,y),(0,k.__esDecorate)(null,null,r,{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:F},x,T),(0,k.__esDecorate)(null,null,s,{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:F},M,S),(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:F},v,b),(0,k.__esDecorate)(null,null,c,{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:F},C,P),(0,k.__esDecorate)(null,null,u,{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:F},V,w),(0,k.__esDecorate)(null,null,d,{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:F},B,R),(0,k.__esDecorate)(null,null,f,{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:F},L,E),F&&Object.defineProperty(O,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:F}),O.FALLOFF_DEFAULT=Y.LightConstants.FALLOFF_DEFAULT,O.FALLOFF_PHYSICAL=Y.LightConstants.FALLOFF_PHYSICAL,O.FALLOFF_GLTF=Y.LightConstants.FALLOFF_GLTF,O.FALLOFF_STANDARD=Y.LightConstants.FALLOFF_STANDARD,O.LIGHTMAP_DEFAULT=Y.LightConstants.LIGHTMAP_DEFAULT,O.LIGHTMAP_SPECULAR=Y.LightConstants.LIGHTMAP_SPECULAR,O.LIGHTMAP_SHADOWSONLY=Y.LightConstants.LIGHTMAP_SHADOWSONLY,O.INTENSITYMODE_AUTOMATIC=Y.LightConstants.INTENSITYMODE_AUTOMATIC,O.INTENSITYMODE_LUMINOUSPOWER=Y.LightConstants.INTENSITYMODE_LUMINOUSPOWER,O.INTENSITYMODE_LUMINOUSINTENSITY=Y.LightConstants.INTENSITYMODE_LUMINOUSINTENSITY,O.INTENSITYMODE_ILLUMINANCE=Y.LightConstants.INTENSITYMODE_ILLUMINANCE,O.INTENSITYMODE_LUMINANCE=Y.LightConstants.INTENSITYMODE_LUMINANCE,O.LIGHTTYPEID_POINTLIGHT=Y.LightConstants.LIGHTTYPEID_POINTLIGHT,O.LIGHTTYPEID_DIRECTIONALLIGHT=Y.LightConstants.LIGHTTYPEID_DIRECTIONALLIGHT,O.LIGHTTYPEID_SPOTLIGHT=Y.LightConstants.LIGHTTYPEID_SPOTLIGHT,O.LIGHTTYPEID_HEMISPHERICLIGHT=Y.LightConstants.LIGHTTYPEID_HEMISPHERICLIGHT,O.LIGHTTYPEID_RECT_AREALIGHT=Y.LightConstants.LIGHTTYPEID_RECT_AREALIGHT,O);e.s(["Light",0,j])},2596,e=>{"use strict";var t=e.i(85789);let i=new Map;function r(e,r){var s;s=e,i.delete(s)&&t.Logger.Warn(`Extension with the name '${e}' already exists`),i.set(e,r)}e.s(["_GetCompatibleTextureLoader",0,function(t,s){("image/ktx"===s||"image/ktx2"===s)&&(t=".ktx"),!i.has(t)&&(t.endsWith(".ies")&&r(".ies",async()=>await e.A(17247).then(e=>new e._IESTextureLoader)),t.endsWith(".dds")&&r(".dds",async()=>await e.A(80539).then(e=>new e._DDSTextureLoader)),t.endsWith(".basis")&&r(".basis",async()=>await e.A(3994).then(e=>new e._BasisTextureLoader)),t.endsWith(".env")&&r(".env",async()=>await e.A(40215).then(e=>new e._ENVTextureLoader)),t.endsWith(".hdr")&&r(".hdr",async()=>await e.A(35808).then(e=>new e._HDRTextureLoader)),(t.endsWith(".ktx")||t.endsWith(".ktx2"))&&(r(".ktx",async()=>await e.A(10289).then(e=>new e._KTXTextureLoader)),r(".ktx2",async()=>await e.A(10289).then(e=>new e._KTXTextureLoader))),t.endsWith(".tga")&&r(".tga",async()=>await e.A(79329).then(e=>new e._TGATextureLoader)),t.endsWith(".exr")&&r(".exr",async()=>await e.A(97437).then(e=>new e._ExrTextureLoader)));let n=i.get(t);return n?Promise.resolve(n(s)):null}])},94810,e=>{"use strict";var t=e.i(56145),i=e.i(11296),r=e.i(42704),s=e.i(80592),n=e.i(9977);let a={positions:[1,1,-1,1,-1,-1,1,-1],indices:[0,1,2,0,2,3]};class o{static RegisterShaderCodeProcessing(e,t){t?o._CustomShaderCodeProcessing[e??""]=t:delete o._CustomShaderCodeProcessing[e??""]}static _GetShaderCodeProcessing(e){return o._CustomShaderCodeProcessing[e]??o._CustomShaderCodeProcessing[""]}get name(){return this.options.name}set name(e){this.options.name=e}isReady(){return this._drawWrapper.effect?.isReady()??!1}get drawWrapper(){return this._drawWrapper}get effect(){return this._drawWrapper.effect}set effect(e){this._drawWrapper.effect=e}constructor(e){this.alphaMode=0,this.onEffectCreatedObservable=new r.Observable(void 0,!0),this.onApplyObservable=new r.Observable,this._shadersLoaded=!1,this._webGPUReady=!1,this._importPromises=[],this.options={...e,name:e.name||"effectWrapper",engine:e.engine,uniforms:e.uniforms||e.uniformNames||[],uniformNames:void 0,samplers:e.samplers||e.samplerNames||[],samplerNames:void 0,attributeNames:e.attributeNames||["position"],uniformBuffers:e.uniformBuffers||[],defines:e.defines||"",useShaderStore:e.useShaderStore||!1,vertexUrl:e.vertexUrl||e.vertexShader||"postprocess",vertexShader:void 0,fragmentShader:e.fragmentShader||"pass",indexParameters:e.indexParameters,blockCompilation:e.blockCompilation||!1,shaderLanguage:e.shaderLanguage||0,onCompiled:e.onCompiled||void 0,extraInitializations:e.extraInitializations||void 0,extraInitializationsAsync:e.extraInitializationsAsync||void 0,useAsPostProcess:e.useAsPostProcess??!1,allowEmptySourceTexture:e.allowEmptySourceTexture??!1},this.options.uniformNames=this.options.uniforms,this.options.samplerNames=this.options.samplers,this.options.vertexShader=this.options.vertexUrl,this.options.useAsPostProcess&&(this.options.allowEmptySourceTexture||-1!==this.options.samplers.indexOf("textureSampler")||this.options.samplers.push("textureSampler"),-1===this.options.uniforms.indexOf("scale")&&this.options.uniforms.push("scale")),e.vertexUrl||e.vertexShader?this._shaderPath={vertexSource:this.options.vertexShader}:(this.options.useAsPostProcess||(this.options.uniforms.push("scale"),this.onApplyObservable.add(()=>{this.effect.setFloat2("scale",1,1)})),this._shaderPath={vertex:this.options.vertexShader}),this._shaderPath.fragmentSource=this.options.fragmentShader,this._shaderPath.spectorName=this.options.name,this.options.useShaderStore&&(this._shaderPath.fragment=this._shaderPath.fragmentSource,this._shaderPath.vertex||(this._shaderPath.vertex=this._shaderPath.vertexSource),delete this._shaderPath.fragmentSource,delete this._shaderPath.vertexSource),this.onApplyObservable.add(()=>{this.bind()}),this.options.useShaderStore||(this._onContextRestoredObserver=this.options.engine.onContextRestoredObservable.add(()=>{this.effect._pipelineContext=null,this.effect._prepareEffect()})),this._drawWrapper=new n.DrawWrapper(this.options.engine),this._webGPUReady=1===this.options.shaderLanguage;const t=Array.isArray(this.options.defines)?this.options.defines.join("\n"):this.options.defines;this._postConstructor(this.options.blockCompilation,t,this.options.extraInitializations)}_gatherImports(e=!1,t){}_postConstructor(t,i=null,r,s){this._importPromises.length=0,s&&this._importPromises.push(...s);let n=this.options.engine.isWebGPU&&!o.ForceGLSL;this._gatherImports(n,this._importPromises),this.options.useShaderStore&&"postprocess"===this._shaderPath.vertex&&this._importPromises.push(n&&this._webGPUReady?e.A(83572):e.A(19011)),void 0!==r&&r(n,this._importPromises),n&&this._webGPUReady&&(this.options.shaderLanguage=1),t||this.updateEffect(i)}updateEffect(e=null,t=null,i=null,r,n,a,h,l){let c,u=o._GetShaderCodeProcessing(this.name);if(u?.defineCustomBindings){let r=t?.slice()??[];r.push(...this.options.uniforms);let s=i?.slice()??[];s.push(...this.options.samplers),e=u.defineCustomBindings(this.name,e,r,s),t=r,i=s}this.options.defines=e||"";let d=this._shadersLoaded||0===this._importPromises.length?void 0:async()=>{await Promise.all(this._importPromises),this._shadersLoaded=!0};c=this.options.extraInitializationsAsync?async()=>{await d?.(),await this.options.extraInitializationsAsync()}:d,this.options.useShaderStore?this._drawWrapper.effect=this.options.engine.createEffect({vertex:h??this._shaderPath.vertex,fragment:l??this._shaderPath.fragment},{attributes:this.options.attributeNames,uniformsNames:t||this.options.uniforms,uniformBuffersNames:this.options.uniformBuffers,samplers:i||this.options.samplers,defines:null!==e?e:"",fallbacks:null,onCompiled:n??this.options.onCompiled,onError:a??null,indexParameters:r||this.options.indexParameters,processCodeAfterIncludes:u?.processCodeAfterIncludes?(e,t)=>u.processCodeAfterIncludes(this.name,e,t):null,processFinalCode:u?.processFinalCode?(e,t)=>u.processFinalCode(this.name,e,t):null,shaderLanguage:this.options.shaderLanguage,extraInitializationsAsync:c},this.options.engine):this._drawWrapper.effect=new s.Effect(this._shaderPath,this.options.attributeNames,t||this.options.uniforms,i||this.options.samplerNames,this.options.engine,e,void 0,n||this.options.onCompiled,void 0,void 0,void 0,this.options.shaderLanguage,c),this.onEffectCreatedObservable.notifyObservers(this._drawWrapper.effect)}bind(e=!1){this.options.useAsPostProcess&&!e&&(this.options.engine.setAlphaMode(this.alphaMode),this.drawWrapper.effect.setFloat2("scale",1,1)),o._GetShaderCodeProcessing(this.name)?.bindCustomBindings?.(this.name,this._drawWrapper.effect)}dispose(e=!1){this._onContextRestoredObserver&&(this.effect.getEngine().onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null),this.onEffectCreatedObservable.clear(),this._drawWrapper.dispose(!0)}}o.ForceGLSL=!1,o._CustomShaderCodeProcessing={},e.s(["EffectRenderer",0,class{constructor(e,r=a){this._fullscreenViewport=new i.Viewport(0,0,1,1);const s=r.positions??a.positions,n=r.indices??a.indices;this.engine=e,this._vertexBuffers={[t.VertexBuffer.PositionKind]:new t.VertexBuffer(e,s,t.VertexBuffer.PositionKind,!1,!1,2)},this._indexBuffer=e.createIndexBuffer(n),this._indexBufferLength=n.length,this._onContextRestoredObserver=e.onContextRestoredObservable.add(()=>{for(let t in this._indexBuffer=e.createIndexBuffer(n),this._vertexBuffers)this._vertexBuffers[t]._rebuild()})}setViewport(e=this._fullscreenViewport){this.engine.setViewport(e)}bindBuffers(e){this.engine.bindBuffers(this._vertexBuffers,this._indexBuffer,e)}applyEffectWrapper(e,t=!1,i=!1){this.engine.setState(!0),this.engine.depthCullingState.depthTest=t,this.engine.stencilState.stencilTest=i,this.engine.enableEffect(e.drawWrapper),this.bindBuffers(e.effect),e.onApplyObservable.notifyObservers({})}saveStates(){this._savedStateDepthTest=this.engine.depthCullingState.depthTest,this._savedStateStencilTest=this.engine.stencilState.stencilTest}restoreStates(){this.engine.depthCullingState.depthTest=this._savedStateDepthTest,this.engine.stencilState.stencilTest=this._savedStateStencilTest}draw(){this.engine.drawElementsType(0,0,this._indexBufferLength)}_isRenderTargetTexture(e){return void 0!==e.renderTarget}render(e,t=null){if(!e.effect.isReady())return;this.saveStates(),this.setViewport();let i=null===t?null:this._isRenderTargetTexture(t)?t.renderTarget:t;i&&this.engine.bindFramebuffer(i),this.applyEffectWrapper(e),this.draw(),i&&this.engine.unBindFramebuffer(i),this.restoreStates()}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),delete this._vertexBuffers[t.VertexBuffer.PositionKind]),this._indexBuffer&&this.engine._releaseBuffer(this._indexBuffer),this._onContextRestoredObserver&&(this.engine.onContextRestoredObservable.remove(this._onContextRestoredObserver),this._onContextRestoredObserver=null)}},"EffectWrapper",0,o])},76608,e=>{"use strict";(0,e.i(72003).RegisterMathVector)(),e.s([])},27952,e=>{"use strict";var t=e.i(72003);let i=[Math.sqrt(1/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(3/(4*Math.PI)),-Math.sqrt(3/(4*Math.PI)),Math.sqrt(15/(4*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(5/(16*Math.PI)),-Math.sqrt(15/(4*Math.PI)),Math.sqrt(15/(16*Math.PI))],r=[()=>1,e=>e.y,e=>e.z,e=>e.x,e=>e.x*e.y,e=>e.y*e.z,e=>3*e.z*e.z-1,e=>e.x*e.z,e=>e.x*e.x-e.y*e.y],s=(e,t)=>i[e]*r[e](t),n=[Math.PI,2*Math.PI/3,2*Math.PI/3,2*Math.PI/3,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4,Math.PI/4];class a{constructor(){this.preScaled=!1,this.l00=t.Vector3.Zero(),this.l1_1=t.Vector3.Zero(),this.l10=t.Vector3.Zero(),this.l11=t.Vector3.Zero(),this.l2_2=t.Vector3.Zero(),this.l2_1=t.Vector3.Zero(),this.l20=t.Vector3.Zero(),this.l21=t.Vector3.Zero(),this.l22=t.Vector3.Zero()}addLight(e,i,r){t.TmpVectors.Vector3[0].set(i.r,i.g,i.b);let n=t.TmpVectors.Vector3[0],a=t.TmpVectors.Vector3[1];n.scaleToRef(r,a),a.scaleToRef(s(0,e),t.TmpVectors.Vector3[2]),this.l00.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(1,e),t.TmpVectors.Vector3[2]),this.l1_1.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(2,e),t.TmpVectors.Vector3[2]),this.l10.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(3,e),t.TmpVectors.Vector3[2]),this.l11.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(4,e),t.TmpVectors.Vector3[2]),this.l2_2.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(5,e),t.TmpVectors.Vector3[2]),this.l2_1.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(6,e),t.TmpVectors.Vector3[2]),this.l20.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(7,e),t.TmpVectors.Vector3[2]),this.l21.addInPlace(t.TmpVectors.Vector3[2]),a.scaleToRef(s(8,e),t.TmpVectors.Vector3[2]),this.l22.addInPlace(t.TmpVectors.Vector3[2])}scaleInPlace(e){this.l00.scaleInPlace(e),this.l1_1.scaleInPlace(e),this.l10.scaleInPlace(e),this.l11.scaleInPlace(e),this.l2_2.scaleInPlace(e),this.l2_1.scaleInPlace(e),this.l20.scaleInPlace(e),this.l21.scaleInPlace(e),this.l22.scaleInPlace(e)}convertIncidentRadianceToIrradiance(){this.l00.scaleInPlace(n[0]),this.l1_1.scaleInPlace(n[1]),this.l10.scaleInPlace(n[2]),this.l11.scaleInPlace(n[3]),this.l2_2.scaleInPlace(n[4]),this.l2_1.scaleInPlace(n[5]),this.l20.scaleInPlace(n[6]),this.l21.scaleInPlace(n[7]),this.l22.scaleInPlace(n[8])}convertIrradianceToLambertianRadiance(){this.scaleInPlace(1/Math.PI)}preScaleForRendering(){this.preScaled=!0,this.l00.scaleInPlace(i[0]),this.l1_1.scaleInPlace(i[1]),this.l10.scaleInPlace(i[2]),this.l11.scaleInPlace(i[3]),this.l2_2.scaleInPlace(i[4]),this.l2_1.scaleInPlace(i[5]),this.l20.scaleInPlace(i[6]),this.l21.scaleInPlace(i[7]),this.l22.scaleInPlace(i[8])}updateFromArray(e){return t.Vector3.FromArrayToRef(e[0],0,this.l00),t.Vector3.FromArrayToRef(e[1],0,this.l1_1),t.Vector3.FromArrayToRef(e[2],0,this.l10),t.Vector3.FromArrayToRef(e[3],0,this.l11),t.Vector3.FromArrayToRef(e[4],0,this.l2_2),t.Vector3.FromArrayToRef(e[5],0,this.l2_1),t.Vector3.FromArrayToRef(e[6],0,this.l20),t.Vector3.FromArrayToRef(e[7],0,this.l21),t.Vector3.FromArrayToRef(e[8],0,this.l22),this}updateFromFloatsArray(e){return t.Vector3.FromFloatsToRef(e[0],e[1],e[2],this.l00),t.Vector3.FromFloatsToRef(e[3],e[4],e[5],this.l1_1),t.Vector3.FromFloatsToRef(e[6],e[7],e[8],this.l10),t.Vector3.FromFloatsToRef(e[9],e[10],e[11],this.l11),t.Vector3.FromFloatsToRef(e[12],e[13],e[14],this.l2_2),t.Vector3.FromFloatsToRef(e[15],e[16],e[17],this.l2_1),t.Vector3.FromFloatsToRef(e[18],e[19],e[20],this.l20),t.Vector3.FromFloatsToRef(e[21],e[22],e[23],this.l21),t.Vector3.FromFloatsToRef(e[24],e[25],e[26],this.l22),this}static FromArray(e){return new a().updateFromArray(e)}static FromPolynomial(e){let t=new a;return t.l00=e.xx.scale(.376127).add(e.yy.scale(.376127)).add(e.zz.scale(.376126)),t.l1_1=e.y.scale(.977204),t.l10=e.z.scale(.977204),t.l11=e.x.scale(.977204),t.l2_2=e.xy.scale(1.16538),t.l2_1=e.yz.scale(1.16538),t.l20=e.zz.scale(1.34567).subtract(e.xx.scale(.672834)).subtract(e.yy.scale(.672834)),t.l21=e.zx.scale(1.16538),t.l22=e.xx.scale(1.16538).subtract(e.yy.scale(1.16538)),t.l1_1.scaleInPlace(-1),t.l11.scaleInPlace(-1),t.l2_1.scaleInPlace(-1),t.l21.scaleInPlace(-1),t.scaleInPlace(Math.PI),t}}e.s(["SphericalHarmonics",0,a,"SphericalPolynomial",0,class e{constructor(){this.x=t.Vector3.Zero(),this.y=t.Vector3.Zero(),this.z=t.Vector3.Zero(),this.xx=t.Vector3.Zero(),this.yy=t.Vector3.Zero(),this.zz=t.Vector3.Zero(),this.xy=t.Vector3.Zero(),this.yz=t.Vector3.Zero(),this.zx=t.Vector3.Zero()}get preScaledHarmonics(){return this._harmonics||(this._harmonics=a.FromPolynomial(this)),this._harmonics.preScaled||this._harmonics.preScaleForRendering(),this._harmonics}addAmbient(e){t.TmpVectors.Vector3[0].copyFromFloats(e.r,e.g,e.b);let i=t.TmpVectors.Vector3[0];this.xx.addInPlace(i),this.yy.addInPlace(i),this.zz.addInPlace(i)}scaleInPlace(e){this.x.scaleInPlace(e),this.y.scaleInPlace(e),this.z.scaleInPlace(e),this.xx.scaleInPlace(e),this.yy.scaleInPlace(e),this.zz.scaleInPlace(e),this.yz.scaleInPlace(e),this.zx.scaleInPlace(e),this.xy.scaleInPlace(e)}updateFromHarmonics(e){return this._harmonics=e,this.x.copyFrom(e.l11),this.x.scaleInPlace(1.02333).scaleInPlace(-1),this.y.copyFrom(e.l1_1),this.y.scaleInPlace(1.02333).scaleInPlace(-1),this.z.copyFrom(e.l10),this.z.scaleInPlace(1.02333),this.xx.copyFrom(e.l00),t.TmpVectors.Vector3[0].copyFrom(e.l20).scaleInPlace(.247708),t.TmpVectors.Vector3[1].copyFrom(e.l22).scaleInPlace(.429043),this.xx.scaleInPlace(.886277).subtractInPlace(t.TmpVectors.Vector3[0]).addInPlace(t.TmpVectors.Vector3[1]),this.yy.copyFrom(e.l00),this.yy.scaleInPlace(.886277).subtractInPlace(t.TmpVectors.Vector3[0]).subtractInPlace(t.TmpVectors.Vector3[1]),this.zz.copyFrom(e.l00),t.TmpVectors.Vector3[0].copyFrom(e.l20).scaleInPlace(.495417),this.zz.scaleInPlace(.886277).addInPlace(t.TmpVectors.Vector3[0]),this.yz.copyFrom(e.l2_1),this.yz.scaleInPlace(.858086).scaleInPlace(-1),this.zx.copyFrom(e.l21),this.zx.scaleInPlace(.858086).scaleInPlace(-1),this.xy.copyFrom(e.l2_2),this.xy.scaleInPlace(.858086),this.scaleInPlace(1/Math.PI),this}static FromHarmonics(t){return new e().updateFromHarmonics(t)}static FromArray(i){let r=new e;return t.Vector3.FromArrayToRef(i[0],0,r.x),t.Vector3.FromArrayToRef(i[1],0,r.y),t.Vector3.FromArrayToRef(i[2],0,r.z),t.Vector3.FromArrayToRef(i[3],0,r.xx),t.Vector3.FromArrayToRef(i[4],0,r.yy),t.Vector3.FromArrayToRef(i[5],0,r.zz),t.Vector3.FromArrayToRef(i[6],0,r.yz),t.Vector3.FromArrayToRef(i[7],0,r.zx),t.Vector3.FromArrayToRef(i[8],0,r.xy),r}}])},45930,e=>{"use strict";var t=e.i(72003),i=e.i(85789),r=e.i(87659),s=e.i(55206),n=e.i(13645),a=e.i(17462),o=e.i(56145),h=e.i(99493);class l extends r.AbstractMesh{constructor(e,t){for(const i of(super(e,t.getScene()),this._indexInSourceMeshInstanceArray=-1,this._distanceToCamera=0,t.addInstance(this),this._sourceMesh=t,this._unIndexed=t._unIndexed,this.position.copyFrom(t.position),this.rotation.copyFrom(t.rotation),this.scaling.copyFrom(t.scaling),t.rotationQuaternion&&(this.rotationQuaternion=t.rotationQuaternion.clone()),this.animations=t.animations.slice(),t.getAnimationRanges()))null!=i&&this.createAnimationRange(i.name,i.from,i.to);if(this.infiniteDistance=t.infiniteDistance,this.setPivotMatrix(t.getPivotMatrix()),t.skeleton||t.morphTargetManager||!t.hasBoundingInfo)this.refreshBoundingInfo(!0,!0);else{const e=t.getBoundingInfo();this.buildBoundingInfo(e.minimum,e.maximum)}this._syncSubMeshes()}getClassName(){return"InstancedMesh"}get lightSources(){return this._sourceMesh._lightSources}_resyncLightSources(){}_resyncLightSource(){}_removeLightSource(){}get receiveShadows(){return this._sourceMesh.receiveShadows}set receiveShadows(e){this._sourceMesh?.receiveShadows!==e&&i.Logger.Warn("Setting receiveShadows on an instanced mesh has no effect")}get material(){return this._sourceMesh.material}set material(e){this._sourceMesh?.material!==e&&i.Logger.Warn("Setting material on an instanced mesh has no effect")}get visibility(){return this._sourceMesh.visibility}set visibility(e){this._sourceMesh?.visibility!==e&&i.Logger.Warn("Setting visibility on an instanced mesh has no effect")}get skeleton(){return this._sourceMesh.skeleton}set skeleton(e){this._sourceMesh?.skeleton!==e&&i.Logger.Warn("Setting skeleton on an instanced mesh has no effect")}get renderingGroupId(){return this._sourceMesh.renderingGroupId}set renderingGroupId(e){this._sourceMesh&&e!==this._sourceMesh.renderingGroupId&&i.Logger.Warn("Note - setting renderingGroupId of an instanced mesh has no effect on the scene")}getTotalVertices(){return this._sourceMesh?this._sourceMesh.getTotalVertices():0}getTotalIndices(){return this._sourceMesh.getTotalIndices()}get sourceMesh(){return this._sourceMesh}get geometry(){return this._sourceMesh._geometry}createInstance(e){return this._sourceMesh.createInstance(e)}isReady(e=!1){return this._sourceMesh.isReady(e,!0)}getVerticesData(e,t,i){return this._sourceMesh.getVerticesData(e,t,i)}copyVerticesData(e,t){this._sourceMesh.copyVerticesData(e,t)}getVertexBuffer(e,t){return this._sourceMesh.getVertexBuffer(e,t)}setVerticesData(e,t,i,r){return this.sourceMesh&&this.sourceMesh.setVerticesData(e,t,i,r),this.sourceMesh}updateVerticesData(e,t,i,r){return this.sourceMesh&&this.sourceMesh.updateVerticesData(e,t,i,r),this.sourceMesh}setIndices(e,t=null){return this.sourceMesh&&this.sourceMesh.setIndices(e,t),this.sourceMesh}isVerticesDataPresent(e){return this._sourceMesh.isVerticesDataPresent(e)}getIndices(){return this._sourceMesh.getIndices()}get _positions(){return this._sourceMesh._positions}refreshBoundingInfo(e=!1,t=!1){if(this.hasBoundingInfo&&this.getBoundingInfo().isLocked)return this;let i=this._sourceMesh.geometry?this._sourceMesh.geometry.boundingBias:null;return this._refreshBoundingInfo(this._sourceMesh._getData("object"==typeof e?e:{applySkeleton:e,applyMorph:t},null,o.VertexBuffer.PositionKind),i),this}_preActivate(){return this._currentLOD&&this._currentLOD._preActivate(),this}_activate(e,t){if(super._activate(e,t),this._sourceMesh.subMeshes||i.Logger.Warn("Instances should only be created for meshes with geometry."),this._currentLOD){if(this._currentLOD._getWorldMatrixDeterminant()>=0!=this._getWorldMatrixDeterminant()>=0)return this._internalAbstractMeshDataInfo._actAsRegularMesh=!0,!0;if(this._internalAbstractMeshDataInfo._actAsRegularMesh=!1,this._currentLOD._registerInstanceForRenderId(this,e),t){if(!this._currentLOD._internalAbstractMeshDataInfo._isActiveIntermediate)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstancesIntermediate=!0,!0}else if(!this._currentLOD._internalAbstractMeshDataInfo._isActive)return this._currentLOD._internalAbstractMeshDataInfo._onlyForInstances=!0,!0}return!1}_postActivate(){this._sourceMesh.edgesShareWithInstances&&this._sourceMesh._edgesRenderer&&this._sourceMesh._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup?(this._sourceMesh._renderingGroup._edgesRenderers.pushNoDuplicate(this._sourceMesh._edgesRenderer),this._sourceMesh._edgesRenderer.customInstances.push(this.getWorldMatrix())):this._edgesRenderer&&this._edgesRenderer.isEnabled&&this._sourceMesh._renderingGroup&&this._sourceMesh._renderingGroup._edgesRenderers.push(this._edgesRenderer)}getWorldMatrix(){if(this._currentLOD&&this._currentLOD!==this._sourceMesh&&this._currentLOD.billboardMode!==a.TransformNode.BILLBOARDMODE_NONE&&this._currentLOD._masterMesh!==this){this._billboardWorldMatrix||(this._billboardWorldMatrix=new t.Matrix);let e=this._currentLOD._masterMesh;return this._currentLOD._masterMesh=this,t.TmpVectors.Vector3[7].copyFrom(this._currentLOD.position),this._currentLOD.position.set(0,0,0),this._billboardWorldMatrix.copyFrom(this._currentLOD.computeWorldMatrix(!0)),this._currentLOD.position.copyFrom(t.TmpVectors.Vector3[7]),this._currentLOD._masterMesh=e,this._billboardWorldMatrix}return super.getWorldMatrix()}get isAnInstance(){return!0}getLOD(e){if(!e)return this;let t=this.sourceMesh.getLODLevels();if(t&&0!==t.length){let t=this.getBoundingInfo();this._currentLOD=this.sourceMesh.getLOD(e,t.boundingSphere)}else this._currentLOD=this.sourceMesh;return this._currentLOD}_preActivateForIntermediateRendering(e){return this.sourceMesh._preActivateForIntermediateRendering(e)}_syncSubMeshes(){if(this.releaseSubMeshes(),this._sourceMesh.subMeshes)for(let e=0;e<this._sourceMesh.subMeshes.length;e++)this._sourceMesh.subMeshes[e].clone(this,this._sourceMesh);return this}_generatePointsArray(){return this._sourceMesh._generatePointsArray()}_updateBoundingInfo(){return this.hasBoundingInfo?this.getBoundingInfo().update(this.worldMatrixFromCache):this.buildBoundingInfo(this.absolutePosition,this.absolutePosition,this.worldMatrixFromCache),this._updateSubMeshesBoundingInfo(this.worldMatrixFromCache),this}clone(e,t=null,i,r){let s=(r||this._sourceMesh).createInstance(e);if(n.DeepCopier.DeepCopy(this,s,["name","subMeshes","uniqueId","parent","lightSources","receiveShadows","material","visibility","skeleton","sourceMesh","isAnInstance","facetNb","isFacetDataEnabled","isBlocked","useBones","hasInstances","collider","edgesRenderer","forward","up","right","absolutePosition","absoluteScaling","absoluteRotationQuaternion","isWorldMatrixFrozen","nonUniformScaling","behaviors","worldMatrixFromCache","hasThinInstances","hasBoundingInfo","geometry"],[]),t&&(s.parent=t),!i)for(let e=0;e<this.getScene().meshes.length;e++){let t=this.getScene().meshes[e];t.parent===this&&t.clone(t.name,s)}return s.computeWorldMatrix(!0),this.onClonedObservable.notifyObservers(s),s}dispose(e,t=!1){this._sourceMesh.removeInstance(this),super.dispose(e,t)}_serializeAsParent(e){super._serializeAsParent(e),e.parentId=this._sourceMesh.uniqueId,e.parentInstanceIndex=this._indexInSourceMeshInstanceArray}instantiateHierarchy(e=null,t,i){let r=this.clone("Clone of "+(this.name||this.id),e||this.parent,!0,t&&t.newSourcedMesh);for(let e of(r&&i&&i(this,r),this.getChildTransformNodes(!0)))e.instantiateHierarchy(r,t,i);return r}}let c=!1;e.s(["InstancedMesh",0,l,"RegisterInstancedMesh",0,function(){c||(c=!0,s.Mesh._instancedMeshFactory=(e,t)=>{let i=new l(e,t);if(t.instancedBuffers)for(let e in i.instancedBuffers={},t.instancedBuffers)i.instancedBuffers[e]=t.instancedBuffers[e];return i},s.Mesh.prototype.registerInstancedBuffer=function(e,t){if(this._userInstancedBuffersStorage?.vertexBuffers[e]?.dispose(),this._userInstancedBuffersStorage?.renderPasses)for(let t in this._userInstancedBuffersStorage.renderPasses){let i=this._userInstancedBuffersStorage.renderPasses[t];i[e]?.dispose(),delete i[e]}if(!this.instancedBuffers)for(let e of(this.instancedBuffers={},this.instances))e.instancedBuffers={};for(let i of(this._userInstancedBuffersStorage||(this._userInstancedBuffersStorage={data:{},vertexBuffers:{},strides:{},sizes:{},vertexArrayObjects:this.getEngine().getCaps().vertexArrayObject?{}:void 0}),this.instancedBuffers[e]=null,this._userInstancedBuffersStorage.strides[e]=t,this._userInstancedBuffersStorage.sizes[e]=32*t,this._userInstancedBuffersStorage.data[e]=new Float32Array(this._userInstancedBuffersStorage.sizes[e]),this._userInstancedBuffersStorage.vertexBuffers[e]=this._instanceDataStorage.useMonoDataStorageRenderPass?new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[e],e,!0,!1,t,!0):null,this.instances))i.instancedBuffers[e]=null;this._invalidateInstanceVertexArrayObject(),this._markSubMeshesAsAttributesDirty()},s.Mesh.prototype._processInstancedBuffers=function(e,t){let i,r=e?e.length:0,s=!this._instanceDataStorage.useMonoDataStorageRenderPass;if(s){let e=this._instanceDataStorage.engine.currentRenderPassId;this._userInstancedBuffersStorage.renderPasses||(this._userInstancedBuffersStorage.renderPasses={}),this._userInstancedBuffersStorage.renderPasses[e]||(this._userInstancedBuffersStorage.renderPasses[e]={}),i=this._userInstancedBuffersStorage.renderPasses[e]}for(let n in this.instancedBuffers){let a=this._userInstancedBuffersStorage.sizes[n],h=this._userInstancedBuffersStorage.strides[n],l=(r+1)*h;for(;a<l;)a*=2;this._userInstancedBuffersStorage.data[n].length!=a&&(this._userInstancedBuffersStorage.data[n]=new Float32Array(a),this._userInstancedBuffersStorage.sizes[n]=a,s?i[n]&&(i[n].dispose(),i[n]=null):this._userInstancedBuffersStorage.vertexBuffers[n]&&(this._userInstancedBuffersStorage.vertexBuffers[n].dispose(),this._userInstancedBuffersStorage.vertexBuffers[n]=null));let c=this._userInstancedBuffersStorage.data[n],u=0;if(t){let e=this.instancedBuffers[n]??0;e.toArray?e.toArray(c,u):e.copyToArray?e.copyToArray(c,u):c[u]=e,u+=h}for(let t=0;t<r;t++){let i=e[t].instancedBuffers[n]??0;i.toArray?i.toArray(c,u):i.copyToArray?i.copyToArray(c,u):c[u]=i,u+=h}s?i[n]?i[n].updateDirectly(c,0):(i[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject()):this._userInstancedBuffersStorage.vertexBuffers[n]?this._userInstancedBuffersStorage.vertexBuffers[n].updateDirectly(c,0):(this._userInstancedBuffersStorage.vertexBuffers[n]=new o.VertexBuffer(this.getEngine(),this._userInstancedBuffersStorage.data[n],n,!0,!1,h,!0),this._invalidateInstanceVertexArrayObject())}},s.Mesh.prototype._invalidateInstanceVertexArrayObject=function(){if(this._userInstancedBuffersStorage&&void 0!==this._userInstancedBuffersStorage.vertexArrayObjects){for(let e in this._userInstancedBuffersStorage.vertexArrayObjects)this.getEngine().releaseVertexArrayObject(this._userInstancedBuffersStorage.vertexArrayObjects[e]);this._userInstancedBuffersStorage.vertexArrayObjects={}}},s.Mesh.prototype._disposeInstanceSpecificData=function(){for(let e in this._instanceDataStorage.renderPasses)this._instanceDataStorage.renderPasses[e].instancesBuffer?.dispose();for(this._instanceDataStorage.renderPasses={},this._instanceDataStorage.dataStorageRenderPass?.instancesBuffer?.dispose();this.instances.length;)this.instances[0].dispose();for(let e in this.instancedBuffers)this._userInstancedBuffersStorage.vertexBuffers[e]&&this._userInstancedBuffersStorage.vertexBuffers[e].dispose();this._invalidateInstanceVertexArrayObject(),this.instancedBuffers={}},(0,h.RegisterClass)("BABYLON.InstancedMesh",l))}])},22889,e=>{"use strict";(0,e.i(55206).RegisterMesh)(),e.s([])},90753,73458,5761,e=>{"use strict";e.s([],73458);var t=e.i(72003),i=e.i(85789),r=e.i(97363),s=e.i(55206),n=e.i(56145);let a="bakedVertexAnimationSettingsInstanced";function o(e){let t=e.bakedVertexAnimationManager?.texture?.getInternalTexture()?._bufferView;return t instanceof Float32Array||t instanceof Uint16Array}let h=!1;function l(){h||(h=!0,s.Mesh.prototype.thinInstanceAdd=function(e,t=!0){if(!this.getScene().getEngine().getCaps().instancedArrays)return i.Logger.Error("Thin Instances are not supported on this device as Instanced Array extension not supported"),-1;this._thinInstanceUpdateBufferSize("matrix",Array.isArray(e)?e.length:1);let r=this._thinInstanceDataStorage.instancesCount;if(Array.isArray(e))for(let i=0;i<e.length;++i)this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,e[i],i===e.length-1&&t);else this.thinInstanceSetMatrixAt(this._thinInstanceDataStorage.instancesCount++,e,t);return r},s.Mesh.prototype.thinInstanceAddSelf=function(e=!0){return this.thinInstanceAdd(t.Matrix.IdentityReadOnly,e)},s.Mesh.prototype.thinInstanceRegisterAttribute=function(e,t){e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this.removeVerticesData(e),this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.strides[e]=t,this._userThinInstanceBuffersStorage.sizes[e]=t*Math.max(32,this._thinInstanceDataStorage.instancesCount),this._userThinInstanceBuffersStorage.data[e]=new Float32Array(this._userThinInstanceBuffersStorage.sizes[e]),this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[e],e,!0,!1,t,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e])},s.Mesh.prototype.thinInstanceSetMatrixAt=function(e,t,i=!0){if(!this._thinInstanceDataStorage.matrixData||e>=this._thinInstanceDataStorage.instancesCount)return!1;let r=this._thinInstanceDataStorage.matrixData;return t.copyToArray(r,16*e),this._thinInstanceDataStorage.worldMatrices&&(this._thinInstanceDataStorage.worldMatrices[e]=t),i&&(this.thinInstanceBufferUpdated("matrix"),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)),!0},s.Mesh.prototype.thinInstanceSetAttributeAt=function(e,t,i,r=!0){return e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),!!this._userThinInstanceBuffersStorage&&!!this._userThinInstanceBuffersStorage.data[e]&&!(t>=this._thinInstanceDataStorage.instancesCount)&&(this._thinInstanceUpdateBufferSize(e,0),this._userThinInstanceBuffersStorage.data[e].set(i,t*this._userThinInstanceBuffersStorage.strides[e]),r&&this.thinInstanceBufferUpdated(e),!0)},Object.defineProperty(s.Mesh.prototype,"thinInstanceCount",{get:function(){return this._thinInstanceDataStorage.instancesCount},set:function(e){let t=this._thinInstanceDataStorage.matrixData??this.source?._thinInstanceDataStorage.matrixData;e<=(t?t.length/16:0)&&(this._thinInstanceDataStorage.instancesCount=e)},enumerable:!0,configurable:!0}),s.Mesh.prototype._thinInstanceCreateMatrixBuffer=function(e,t,i=!0){let r=new n.Buffer(this.getEngine(),t,!i,16,!1,!0);for(let t=0;t<4;t++)this.setVerticesBuffer(r.createVertexBuffer(e+t,4*t,4));return r},s.Mesh.prototype.thinInstanceSetBuffer=function(e,t,i=0,r=!0){if(i=i||16,"matrix"===e)this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=null,this._thinInstanceDataStorage.matrixBufferSize=t?t.length:32*i,this._thinInstanceDataStorage.matrixData=t,this._thinInstanceDataStorage.worldMatrices=null,null!==t?(this._thinInstanceDataStorage.instancesCount=t.length/i,this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",t,r),this.doNotSyncBoundingInfo||this.thinInstanceRefreshBoundingInfo(!1)):(this._thinInstanceDataStorage.instancesCount=0,this.doNotSyncBoundingInfo||this.refreshBoundingInfo());else if("previousMatrix"===e)this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=null,this._thinInstanceDataStorage.previousMatrixData=t,null!==t&&(this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",t,r));else if("splatIndex"===e&&t){this._thinInstanceInitializeUserStorage(),this._thinInstanceDataStorage.instancesCount=t.length/i,this._userThinInstanceBuffersStorage.data[e]=t,this._userThinInstanceBuffersStorage.strides[e]=i,this._userThinInstanceBuffersStorage.sizes[e]=t.length;let r=new n.Buffer(this.getEngine(),t,!0,16,!1,!0);this._thinInstanceDataStorage.matrixBuffer=r;for(let t=0;t<4;t++)this.setVerticesBuffer(r.createVertexBuffer(e+t,4*t,4))}else e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),null===t?this._userThinInstanceBuffersStorage?.data[e]&&(this.removeVerticesData(e),delete this._userThinInstanceBuffersStorage.data[e],delete this._userThinInstanceBuffersStorage.strides[e],delete this._userThinInstanceBuffersStorage.sizes[e],delete this._userThinInstanceBuffersStorage.vertexBuffers[e]):(this._thinInstanceInitializeUserStorage(),this._userThinInstanceBuffersStorage.data[e]=t,this._userThinInstanceBuffersStorage.strides[e]=i,this._userThinInstanceBuffersStorage.sizes[e]=t.length,this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),t,e,!r,!1,i,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))},s.Mesh.prototype.thinInstanceBufferUpdated=function(e){"matrix"===e?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.matrixBuffer&&!this._thinInstanceDataStorage.matrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._thinInstanceDataStorage.matrixData,0,this._thinInstanceDataStorage.instancesCount)):"previousMatrix"===e?(this.thinInstanceAllowAutomaticStaticBufferRecreation&&this._thinInstanceDataStorage.previousMatrixBuffer&&!this._thinInstanceDataStorage.previousMatrixBuffer.isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._thinInstanceDataStorage.previousMatrixBuffer?.updateDirectly(this._thinInstanceDataStorage.previousMatrixData,0,this._thinInstanceDataStorage.instancesCount)):"splatIndex"===e?this._thinInstanceDataStorage.matrixBuffer?.updateDirectly(this._userThinInstanceBuffersStorage.data[e],0,this._thinInstanceDataStorage.instancesCount):(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[e]&&(this.thinInstanceAllowAutomaticStaticBufferRecreation&&!this._userThinInstanceBuffersStorage.vertexBuffers[e].isUpdatable()&&this._thinInstanceRecreateBuffer(e),this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(this._userThinInstanceBuffersStorage.data[e],0)))},s.Mesh.prototype.thinInstancePartialBufferUpdate=function(e,t,i){if("matrix"===e)this._thinInstanceDataStorage.matrixBuffer&&("number"==typeof t?this._thinInstanceDataStorage.matrixBuffer.updateDirectly(new Float32Array(this._thinInstanceDataStorage.matrixData.buffer,this._thinInstanceDataStorage.matrixData.byteOffset+16*i*Float32Array.BYTES_PER_ELEMENT,16*t),16*i):this._thinInstanceDataStorage.matrixBuffer.updateDirectly(t,i));else if(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage?.vertexBuffers[e]){let r=this._userThinInstanceBuffersStorage.vertexBuffers[e];if("number"==typeof t){let r=new Float32Array(this._userThinInstanceBuffersStorage.data[e].buffer,this._userThinInstanceBuffersStorage.data[e].byteOffset+i*this._userThinInstanceBuffersStorage.strides[e]*Float32Array.BYTES_PER_ELEMENT,t*this._userThinInstanceBuffersStorage.strides[e]);this._userThinInstanceBuffersStorage.vertexBuffers[e].updateDirectly(r,i*this._userThinInstanceBuffersStorage.strides[e])}else r.updateDirectly(t,i)}},s.Mesh.prototype.thinInstanceGetWorldMatrices=function(){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return[];let e=this._thinInstanceDataStorage.matrixData;if(!this._thinInstanceDataStorage.worldMatrices){this._thinInstanceDataStorage.worldMatrices=[];for(let i=0;i<this._thinInstanceDataStorage.instancesCount;++i)this._thinInstanceDataStorage.worldMatrices[i]=t.Matrix.FromArray(e,16*i)}return this._thinInstanceDataStorage.worldMatrices},s.Mesh.prototype.thinInstanceRefreshBoundingInfo=function(e=!1,i=!1,s=!1,h=!1){if(!this._thinInstanceDataStorage.matrixData||!this._thinInstanceDataStorage.matrixBuffer)return;let l=this._thinInstanceDataStorage.boundingVectors;if(e||!this.rawBoundingInfo){if(l.length=0,h&&function(e,i,s){let h=e._userThinInstanceBuffersStorage,l=h?.data[a],c=h?.strides[a];if(!l||!c||c<4||!o(e))return!1;let u=e._thinInstanceDataStorage.matrixData;if(!u)return!1;let d={},f=t.TmpVectors.Vector4[0],p=t.TmpVectors.Vector3[1],_=t.TmpVectors.Vector3[2],m=t.TmpVectors.Vector3[3],g=t.TmpVectors.Vector3[4],I=t.TmpVectors.Vector3[5],y=t.TmpVectors.Vector3[6],x=t.TmpVectors.Matrix[2],T=e.geometry?e.geometry.boundingBias:null,M=e.getTotalVertices();p.setAll(1/0),_.setAll(-1/0),m.setAll(1/0),g.setAll(-1/0);for(let i=0;i<e._thinInstanceDataStorage.instancesCount;++i){let r=i*c;f.set(l[r],l[r+1],l[r+2],l[r+3]);let a=e._getData({applyMorph:s,applyBakedVertexAnimation:!0,bakedVertexAnimationSettings:f,updatePositionsArray:!1,cache:d},null,n.VertexBuffer.PositionKind);if(!a)return!1;I.setAll(1/0),y.setAll(-1/0);for(let e=0;e<3*M;e+=3){let t=a[e],i=a[e+1],r=a[e+2];t<I.x&&(I.x=t),i<I.y&&(I.y=i),r<I.z&&(I.z=r),t>y.x&&(y.x=t),i>y.y&&(y.y=i),r>y.z&&(y.z=r)}T&&(I.x-=I.x*T.x+T.y,I.y-=I.y*T.x+T.y,I.z-=I.z*T.x+T.y,y.x+=y.x*T.x+T.y,y.y+=y.y*T.x+T.y,y.z+=y.z*T.x+T.y),p.minimizeInPlace(I),_.maximizeInPlace(y),t.Matrix.FromArrayToRef(u,16*i,x),T?function(e,i,r,s,n){let a=t.TmpVectors.Vector3[7],o=t.TmpVectors.Vector3[8];for(let h=0;h<2;++h)for(let l=0;l<2;++l)for(let c=0;c<2;++c)a.set(h?i.x:e.x,l?i.y:e.y,c?i.z:e.z),t.Vector3.TransformCoordinatesToRef(a,r,o),s.minimizeInPlace(o),n.maximizeInPlace(o)}(I,y,x,m,g):function(e,i,r,s,n){let a=t.TmpVectors.Vector3[7];for(let o=0;o<3*i;o+=3)t.Vector3.TransformCoordinatesFromFloatsToRef(e[o],e[o+1],e[o+2],r,a),s.minimizeInPlace(a),n.maximizeInPlace(a)}(a,M,x,m,g)}if(!isFinite(p.x)||!isFinite(m.x))return!1;e.getBoundingInfo().reConstruct(m,g),e.rawBoundingInfo=new r.BoundingInfo(p,_);var S=e.rawBoundingInfo;i.length=0;for(let e=0;e<S.boundingBox.vectors.length;++e)i.push(S.boundingBox.vectors[e].clone());return e._updateBoundingInfo(),!0}(this,l,s))return;h&&this.bakedVertexAnimationManager?.isEnabled&&o(this)?this.refreshBoundingInfo({applySkeleton:i,applyMorph:s,applyBakedVertexAnimation:!0,updatePositionsArray:!1}):this.refreshBoundingInfo(i,s);let e=this.getBoundingInfo();this.rawBoundingInfo=new r.BoundingInfo(e.minimum,e.maximum)}let c=this.getBoundingInfo(),u=this._thinInstanceDataStorage.matrixData;if(0===l.length)for(let e=0;e<c.boundingBox.vectors.length;++e)l.push(c.boundingBox.vectors[e].clone());t.TmpVectors.Vector3[0].setAll(1/0),t.TmpVectors.Vector3[1].setAll(-1/0);for(let e=0;e<this._thinInstanceDataStorage.instancesCount;++e){t.Matrix.FromArrayToRef(u,16*e,t.TmpVectors.Matrix[0]);for(let e=0;e<l.length;++e)t.Vector3.TransformCoordinatesToRef(l[e],t.TmpVectors.Matrix[0],t.TmpVectors.Vector3[2]),t.TmpVectors.Vector3[0].minimizeInPlace(t.TmpVectors.Vector3[2]),t.TmpVectors.Vector3[1].maximizeInPlace(t.TmpVectors.Vector3[2])}c.reConstruct(t.TmpVectors.Vector3[0],t.TmpVectors.Vector3[1]),this._updateBoundingInfo()},s.Mesh.prototype._thinInstanceRecreateBuffer=function(e,t=!0){"matrix"===e?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",this._thinInstanceDataStorage.matrixData,t)):"previousMatrix"===e?this._scene.needsPreviousWorldMatrices&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",this._thinInstanceDataStorage.previousMatrixData??this._thinInstanceDataStorage.matrixData,t)):(e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind),this._userThinInstanceBuffersStorage.vertexBuffers[e]?.dispose(),this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),this._userThinInstanceBuffersStorage.data[e],e,!t,!1,this._userThinInstanceBuffersStorage.strides[e],!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))},s.Mesh.prototype._thinInstanceUpdateBufferSize=function(e,t=1){e===n.VertexBuffer.ColorKind&&(e=n.VertexBuffer.ColorInstanceKind);let i="matrix"===e;if(!i&&(!this._userThinInstanceBuffersStorage||!this._userThinInstanceBuffersStorage.strides[e]))return;let r=i?16:this._userThinInstanceBuffersStorage.strides[e],s=i?this._thinInstanceDataStorage.matrixBufferSize:this._userThinInstanceBuffersStorage.sizes[e],a=i?this._thinInstanceDataStorage.matrixData:this._userThinInstanceBuffersStorage.data[e],o=(this._thinInstanceDataStorage.instancesCount+t)*r,h=s;for(;h<o;)h*=2;if(!a||s!=h){if(a){let e=new Float32Array(h);e.set(a,0),a=e}else a=new Float32Array(h);i?(this._thinInstanceDataStorage.matrixBuffer?.dispose(),this._thinInstanceDataStorage.matrixBuffer=this._thinInstanceCreateMatrixBuffer("world",a,!1),this._thinInstanceDataStorage.matrixData=a,this._thinInstanceDataStorage.matrixBufferSize=h,this._scene.needsPreviousWorldMatrices&&!this._thinInstanceDataStorage.previousMatrixData&&(this._thinInstanceDataStorage.previousMatrixBuffer?.dispose(),this._thinInstanceDataStorage.previousMatrixBuffer=this._thinInstanceCreateMatrixBuffer("previousWorld",a,!1))):(this._userThinInstanceBuffersStorage.vertexBuffers[e]?.dispose(),this._userThinInstanceBuffersStorage.data[e]=a,this._userThinInstanceBuffersStorage.sizes[e]=h,this._userThinInstanceBuffersStorage.vertexBuffers[e]=new n.VertexBuffer(this.getEngine(),a,e,!0,!1,r,!0),this.setVerticesBuffer(this._userThinInstanceBuffersStorage.vertexBuffers[e]))}},s.Mesh.prototype._thinInstanceInitializeUserStorage=function(){this._userThinInstanceBuffersStorage||(this._userThinInstanceBuffersStorage={data:{},sizes:{},vertexBuffers:{},strides:{}})},s.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)})}e.s(["RegisterThinInstanceMesh",0,l],5761),l(),e.s([],90753)},3739,e=>{"use strict";let t,i,r;var s,n=e.i(4112),a=e.i(94810),o=e.i(40379),h=e.i(46202),l=e.i(72986),c=e.i(85789),u=e.i(95708),d=e.i(91679);let f=null;async function p(){let t=l.EngineStore.LastCreatedEngine?.createCanvas(100,100)??new OffscreenCanvas(100,100);t instanceof OffscreenCanvas&&c.Logger.Warn("DumpData: OffscreenCanvas will be used for dumping data. This may result in lossy alpha values.");let{ThinEngine:i}=await e.A(46040);if(!i.IsSupported)throw Error("DumpData: No WebGL context available. Cannot dump data.");let r=new i(t,!1,{preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1});l.EngineStore.Instances.pop(),l.EngineStore.OnEnginesDisposedObservable.add(e=>{r&&e!==r&&!r.isDisposed&&0===l.EngineStore.Instances.length&&T()}),r.getCaps().parallelShaderCompile=void 0;let s=new a.EffectRenderer(r),{passPixelShader:n}=await e.A(78757),o=new a.EffectWrapper({engine:r,name:n.name,fragmentShader:n.shader,samplerNames:["textureSampler"]});return{canvas:t,dumpEngine:{engine:r,renderer:s,wrapper:o}}}async function _(){return f||(f=p()),await f}let m=(i=[],s=class{static async EncodeImageAsync(e,t,i,r,s,n){let a=await _(),h=a.dumpEngine;h.engine.setSize(t,i,!0);let l=h.engine.createRawTexture(e,t,i,5,!1,!s,1);return h.renderer.setViewport(),h.renderer.applyEffectWrapper(h.wrapper),h.wrapper.effect._bindTexture("textureSampler",l),h.renderer.draw(),l.dispose(),await new Promise((e,t)=>{o.Tools.ToBlob(a.canvas,i=>{i?e(i):t(Error("EncodeImageAsync: Failed to convert canvas to blob."))},r,n)})}},r="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[d.nativeOverride],(0,n.__esDecorate)(s,null,t,{kind:"method",name:"EncodeImageAsync",static:!0,private:!1,access:{has:e=>"EncodeImageAsync"in e,get:e=>e.EncodeImageAsync},metadata:r},null,i),r&&Object.defineProperty(s,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r}),(0,n.__runInitializers)(s,i),s),g=m.EncodeImageAsync;async function I(e,t,i,r,s="image/png",n,a){let o=new Uint8Array((await i.readPixels(0,0,e,t)).buffer);x(e,t,o,r,s,n,!0,void 0,a)}async function y(e,t,i,r="image/png",s,n=!1,a=!1,l){if(i instanceof Float32Array){let e=new Uint8Array(i.length),t=i.length;for(;t--;){let r=i[t];e[t]=Math.round(255*(0,h.Clamp)(r))}i=e}let d=await m.EncodeImageAsync(i,e,t,r,n,l);void 0!==s&&o.Tools.DownloadBlob(d,s),d.type!==r&&c.Logger.Warn(`DumpData: The requested mimeType '${r}' is not supported. The result has mimeType '${d.type}' instead.`);let f=await d.arrayBuffer();return a?f:`data:${r};base64,${(0,u.EncodeArrayBufferToBase64)(f)}`}function x(e,t,i,r,s="image/png",n,a=!1,o=!1,h){void 0!==n||r||(n=""),y(e,t,i,s,n,a,o,h).then(e=>{r&&r(e)})}function T(){f&&(f?.then(e=>{e.canvas instanceof HTMLCanvasElement&&e.canvas.remove(),e.dumpEngine&&(e.dumpEngine.engine.dispose(),e.dumpEngine.renderer.dispose(),e.dumpEngine.wrapper.dispose())}),f=null)}let M=!1;e.s(["Dispose",0,T,"DumpData",0,x,"DumpDataAsync",0,y,"DumpFramebuffer",0,I,"DumpTools",0,{DumpData:x,DumpDataAsync:y,DumpFramebuffer:I,Dispose:T},"EncodeImageAsync",0,g,"RegisterDumpTools",0,function(){M||(M=!0,o.Tools.DumpData=x,o.Tools.DumpDataAsync=y,o.Tools.DumpFramebuffer=I)}])},95358,e=>{"use strict";var t=e.i(92929),i=e.i(72003),r=e.i(46202),s=e.i(27952),n=e.i(55080),a=e.i(79452),o=(e.i(87710),e.i(33760)),h=e.i(85789),l=e.i(41339),c=e.i(3739),u=e.i(63615);let d="image/png",f=[134,22,135,150,246,214,150,54];function p(e){if(e.version>2)throw Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "2".`);return 2===e.version?e:e={...e,version:2,imageType:d}}async function _(e,t,i,r,s,n,a,o,h,l,c){return await new Promise((u,d)=>{if(i){let i=t.createTexture(null,!0,!0,null,1,null,e=>{d(e)},e);r?.onEffectCreatedObservable.addOnce(o=>{o.executeWhenCompiled(()=>{r.externalTextureSamplerBinding=!0,r.onApply=r=>{r._bindTexture("textureSampler",i),r.setFloat2("scale",1,t._features.needsInvertingBitmap&&e instanceof ImageBitmap?-1:1)},t.scenes.length&&(t.scenes[0].postProcessManager.directRender([r],l,!0,n,a),t.restoreDefaultFramebuffer(),i.dispose(),URL.revokeObjectURL(s),u())})})}else{if(t._uploadImageToTexture(c,e,n,a),o){let i=h[a];i&&t._uploadImageToTexture(i._texture,e,n,0)}u()}})}async function m(e,t,i=d){let r=e.getEngine();e.format=5,e.type=0,e.generateMipMaps=!0,e._cachedAnisotropicFilteringLevel=null,r.updateTextureSamplingMode(3,e),await I(e,t,!0,i),e.isReady=!0}async function g(e,t,i,r=d,s=null){let o=e.getEngine(),h=new n.InternalTexture(o,5),l=new a.BaseTexture(o,h);e._irradianceTexture=l,l._dominantDirection=s,h.isCube=!0,h.format=5,h.type=0,h.generateMipMaps=!0,h._cachedAnisotropicFilteringLevel=null,h.generateMipMaps=!0,h.width=i,h.height=i,o.updateTextureSamplingMode(3,h),await I(h,[t],!1,r),o.generateMipMapsForCubemap(h),h.isReady=!0}async function I(i,s,h,l=d){if(!(0,t.IsExponentOfTwo)(i.width))throw Error("Texture size must be a power of two");let c=(0,r.ILog2)(i.width)+1,f=i.getEngine(),p=!1,m=!1,g=null,y=null,x=null,T=f.getCaps();T.textureLOD?f._features.supportRenderAndCopyToLodForFloatTextures?T.textureHalfFloatRender&&T.textureHalfFloatLinearFiltering?(p=!0,i.type=2):T.textureFloatRender&&T.textureFloatLinearFiltering&&(p=!0,i.type=1):p=!1:(p=!1,m=h);let M=0;if(p)f.isWebGPU?(M=1,await e.A(1084)):await e.A(42032),g=new o.PostProcess("rgbdDecode","rgbdDecode",null,null,1,null,3,f,!1,void 0,i.type,void 0,null,!1,void 0,M),i._isRGBD=!1,i.invertY=!1,y=f.createRenderTargetCubeTexture(i.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:3,type:i.type,format:5});else if(i._isRGBD=!0,i.invertY=!0,m){x={};let e=i._lodGenerationScale,t=i._lodGenerationOffset;for(let r=0;r<3;r++){let s=(c-1)*e+t,o=Math.round(Math.min(Math.max(t+(s-t)*(1-r/2),0),s)),h=new n.InternalTexture(f,2);h.isCube=!0,h.invertY=!0,h.generateMipMaps=!1,f.updateTextureSamplingMode(2,h);let l=new a.BaseTexture(null);switch(l._isCube=!0,l._texture=h,x[o]=l,r){case 0:i._lodTextureLow=l;break;case 1:i._lodTextureMid=l;break;case 2:i._lodTextureHigh=l}}}let S=[];for(let e=0;e<s.length;e++)for(let t=0;t<6;t++){let r,n=s[e][t],a=new Blob([(0,u.GetBlobBufferSource)(n)],{type:l}),o=URL.createObjectURL(a);if(f._features.forceBitmapOverHTMLImageElement)r=f.createImageBitmap(a,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(async r=>await _(r,f,p,g,o,t,e,m,x,y,i));else{let s=new Image;s.src=o,r=new Promise((r,n)=>{s.onload=()=>{_(s,f,p,g,o,t,e,m,x,y,i).then(()=>r()).catch(e=>{n(e)})},s.onerror=e=>{n(e)}})}S.push(r)}if(await Promise.all(S),s.length<c){let e,t=Math.pow(2,c-1-s.length),r=t*t*4;switch(i.type){case 0:e=new Uint8Array(r);break;case 2:e=new Uint16Array(r);break;case 1:e=new Float32Array(r)}for(let t=s.length;t<c;t++)for(let r=0;r<6;r++)f._uploadArrayBufferViewToTexture(y?.texture||i,e,r,t)}if(y){let e=i._irradianceTexture;i._irradianceTexture=null,f._releaseTexture(i),y._swapAndDie(i),i._irradianceTexture=e}g&&g.dispose(),m&&(i._lodTextureHigh&&i._lodTextureHigh._texture&&(i._lodTextureHigh._texture.isReady=!0),i._lodTextureMid&&i._lodTextureMid._texture&&(i._lodTextureMid._texture.isReady=!0),i._lodTextureLow&&i._lodTextureLow._texture&&(i._lodTextureLow._texture.isReady=!0))}e.s(["GetEnvInfo",0,function(e){let t,i=new DataView(e.buffer,e.byteOffset,e.byteLength),r=0;for(let e=0;e<f.length;e++)if(i.getUint8(r++)!==f[e])return h.Logger.Error("Not a babylon environment map"),null;let s="";for(;t=i.getUint8(r++);)s+=String.fromCharCode(t);let n=JSON.parse(s);return(n=p(n)).binaryDataPosition=r,n.specular&&(n.specular.lodGenerationScale=n.specular.lodGenerationScale||.8),n},"UploadEnvLevelsAsync",0,function(e,t,r){let s=(r=p(r)).specular;if(!s)return Promise.resolve([]);e._lodGenerationScale=s.lodGenerationScale;let n=[],a=function(e,t){let i=(t=p(t)).specular,r=Math.log2(t.width);if(r=Math.round(r)+1,i.mipmaps.length!==6*r)throw Error(`Unsupported specular mipmaps number "${i.mipmaps.length}"`);let s=Array(r);for(let n=0;n<r;n++){s[n]=Array(6);for(let r=0;r<6;r++){let a=i.mipmaps[6*n+r];s[n][r]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+a.position,a.length)}}return s}(t,r);n.push(m(e,a,r.imageType));let o=r.irradiance?.irradianceTexture;if(o){let s=function(e,t){t=p(t);let i=Array(6),r=t.irradiance?.irradianceTexture;if(r){if(6!==r.faces.length)throw Error(`Incorrect irradiance texture faces number "${r.faces.length}"`);for(let s=0;s<6;s++){let n=r.faces[s];i[s]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+n.position,n.length)}}return i}(t,r),a=null;r.irradiance?.irradianceTexture?.dominantDirection&&(a=i.Vector3.FromArray(r.irradiance.irradianceTexture.dominantDirection)),n.push(g(e,s,o.size,r.imageType,a))}return Promise.all(n)},"UploadEnvSpherical",0,function(e,t){let r=(t=p(t)).irradiance;if(!r)return;let n=new s.SphericalPolynomial;i.Vector3.FromArrayToRef(r.x,0,n.x),i.Vector3.FromArrayToRef(r.y,0,n.y),i.Vector3.FromArrayToRef(r.z,0,n.z),i.Vector3.FromArrayToRef(r.xx,0,n.xx),i.Vector3.FromArrayToRef(r.yy,0,n.yy),i.Vector3.FromArrayToRef(r.zz,0,n.zz),i.Vector3.FromArrayToRef(r.yz,0,n.yz),i.Vector3.FromArrayToRef(r.zx,0,n.zx),i.Vector3.FromArrayToRef(r.xy,0,n.xy),e._sphericalPolynomial=n},"_UpdateRGBDAsync",0,function(e,t,i,r,s){let n=m(e.getEngine().createRawCubeTexture(null,e.width,e.format,e.type,e.generateMipMaps,e.invertY,e.samplingMode,e._compression),t).then(()=>e);return e.onRebuildCallback=e=>({proxy:n,isReady:!0,isAsync:!0}),e._source=13,e._bufferViewArrayArray=t,e._lodGenerationScale=r,e._lodGenerationOffset=s,e._sphericalPolynomial=i,m(e,t).then(()=>(e.isReady=!0,e))}])},6939,e=>{"use strict";e.s(["RandomGUID",0,function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}])},85789,e=>{"use strict";class t{static _CheckLimit(e,i){let r=t._LogLimitOutputs[e];return r?r.current++:(r={limit:i,current:1},t._LogLimitOutputs[e]=r),r.current<=r.limit}static _GenerateLimitMessage(e,i=1){let r=t._LogLimitOutputs[e];if(!r||!t.MessageLimitReached)return;let s=this._Levels[i];r.current===r.limit&&t[s.name](t.MessageLimitReached.replace(/%LIMIT%/g,""+r.limit).replace(/%TYPE%/g,s.name??""))}static _AddLogEntry(e){t._LogCache=e+t._LogCache,t.OnNewCacheEntry&&t.OnNewCacheEntry(e)}static _FormatMessage(e){let t=e=>e<10?"0"+e:""+e,i=new Date;return"["+t(i.getHours())+":"+t(i.getMinutes())+":"+t(i.getSeconds())+"]: "+e}static _LogDisabled(e,t){}static _LogEnabled(e=1,i,r){let s=Array.isArray(i)?i[0]:i;if(void 0!==r&&!t._CheckLimit(s,r))return;let n=t._FormatMessage(s),a=this._Levels[e],o=Array.isArray(i)?i.slice(1):[];a.logFunc&&a.logFunc("BJS - "+n,...o);let h=`<div style='color:${a.color}'>${n}</div><br>`;t._AddLogEntry(h),t._GenerateLimitMessage(s,e)}static get LogCache(){return t._LogCache}static ClearLogCache(){t._LogCache="",t._LogLimitOutputs={},t.errorsCount=0}static set LogLevels(e){for(let i of(t.Log=t._LogDisabled,t.Warn=t._LogDisabled,t.Error=t._LogDisabled,[t.MessageLogLevel,t.WarningLogLevel,t.ErrorLogLevel]))(e&i)===i&&(t[this._Levels[i].name]=t._LogEnabled.bind(t,i))}}t.NoneLogLevel=0,t.MessageLogLevel=1,t.WarningLogLevel=2,t.ErrorLogLevel=4,t.AllLogLevel=7,t.MessageLimitReached="Too many %TYPE%s (%LIMIT%), no more %TYPE%s will be reported for this message.",t._LogCache="",t._LogLimitOutputs={},t._Levels=[{},{color:"white",logFunc:console.log,name:"Log"},{color:"orange",logFunc:console.warn,name:"Warn"},{},{color:"red",logFunc:console.error,name:"Error"}],t.errorsCount=0,t.Log=t._LogEnabled.bind(t,t.MessageLogLevel),t.Warn=t._LogEnabled.bind(t,t.WarningLogLevel),t.Error=t._LogEnabled.bind(t,t.ErrorLogLevel),e.s(["Logger",0,t])},69874,e=>{"use strict";class t{constructor(e){this._pendingActions=[],this._workerInfos=e.map(e=>({workerPromise:Promise.resolve(e),idle:!0}))}dispose(){for(let e of this._workerInfos)e.workerPromise.then(e=>{e.terminate()});this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(let t of this._workerInfos)if(t.idle)return this._execute(t,e),!0;return!1}_execute(e,t){e.idle=!1,e.workerPromise.then(i=>{t(i,()=>{let t=this._pendingActions.shift();t?this._execute(e,t):e.idle=!0})})}}class i extends t{constructor(e,t,r=i.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=r}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){let t={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(t),this._execute(t,e)}else this._pendingActions.push(e)}_execute(e,t){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,(i,r)=>{t(i,()=>{r(),e.idle&&(e.timeoutId=setTimeout(()=>{e.workerPromise.then(e=>{e.terminate()});let t=this._workerInfos.indexOf(e);-1!==t&&this._workerInfos.splice(t,1)},this._options.idleTimeElapsedBeforeRelease))})})}}i.DefaultOptions={idleTimeElapsedBeforeRelease:1e3},e.s(["AutoReleaseWorkerPool",0,i])},76723,e=>{"use strict";var t=e.i(37096);e.i(13870);var i=e.i(97009);class r extends t.FlowGraphBlock{constructor(e){super(e);const t=e.glTF,r=t?.animations?.map(e=>e._babylonAnimationGroup)||[];this.animationGroups=this.registerDataOutput("animationGroups",i.RichTypeAny,r);const s=t?.nodes?.map(e=>e._babylonTransformNode)||[];this.nodes=this.registerDataOutput("nodes",i.RichTypeAny,s)}getClassName(){return"FlowGraphGLTFDataProvider"}}e.s(["FlowGraphGLTFDataProvider",0,r])}]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,62308,e=>{"use strict";var r=e.i(2342);let o="helperFunctions",a=`const float PI=3.1415926535897932384626433832795;const float TWO_PI=6.283185307179586;const float HALF_PI=1.5707963267948966;const float RECIPROCAL_PI=0.3183098861837907;const float RECIPROCAL_PI2=0.15915494309189535;const float RECIPROCAL_PI4=0.07957747154594767;const float HALF_MIN=5.96046448e-08;
|
|
2
2
|
const float LinearEncodePowerApprox=2.2;const float GammaEncodePowerApprox=1.0/LinearEncodePowerApprox;const vec3 LuminanceEncodeApprox=vec3(0.2126,0.7152,0.0722);const float Epsilon=0.0000001;
|
|
3
3
|
#define saturate(x) clamp(x,0.0,1.0)
|
|
4
4
|
#define absEps(x) abs(x)+Epsilon
|
|
@@ -116,7 +116,7 @@ float uint2float(uint i) {return uintBitsToFloat(0x3F800000u | (i>>9u))-1.0;}
|
|
|
116
116
|
vec2 plasticSequence(const uint rstate) {return vec2(uint2float(rstate*3242174889u),
|
|
117
117
|
uint2float(rstate*2447445414u));}
|
|
118
118
|
#endif
|
|
119
|
-
`;r.ShaderStore.IncludesShadersStore[o]||(r.ShaderStore.IncludesShadersStore[o]=a),e.s(["helperFunctions",0,{name:o,shader:a}])},
|
|
119
|
+
`;r.ShaderStore.IncludesShadersStore[o]||(r.ShaderStore.IncludesShadersStore[o]=a),e.s(["helperFunctions",0,{name:o,shader:a}])},66169,e=>{"use strict";var r=e.i(2342),o=e.i(62308);let a="rgbdEncodePixelShader",t=`varying vec2 vUV;uniform sampler2D textureSampler;
|
|
120
120
|
#include<helperFunctions>
|
|
121
121
|
#define CUSTOM_FRAGMENT_DEFINITIONS
|
|
122
122
|
void main(void)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,33015,s=>{s.v(t=>Promise.all(["static/chunks/3qye1lytea2i8.js","static/chunks/0thw099xk3_0p.js"].map(t=>s.l(t))).then(()=>t(55810)))},78573,s=>{s.v(t=>Promise.all(["static/chunks/11km5p4gd0ut4.js"].map(t=>s.l(t))).then(()=>t(48939)))},70162,s=>{s.v(t=>Promise.all(["static/chunks/2ws1s9d52ayv8.js"].map(t=>s.l(t))).then(()=>t(19399)))},21269,s=>{s.v(t=>Promise.all(["static/chunks/24pq9210rng3f.js"].map(t=>s.l(t))).then(()=>t(39592)))},44113,s=>{s.v(t=>Promise.all(["static/chunks/2x7enks3ydgai.js","static/chunks/3beawo-qwuk8k.js"].map(t=>s.l(t))).then(()=>t(76421)))},47410,s=>{s.v(t=>Promise.all(["static/chunks/0dmrdrwtd093b.js"].map(t=>s.l(t))).then(()=>t(53993)))},19723,s=>{s.v(t=>Promise.all(["static/chunks/3g3-e9m1en45q.js","static/chunks/3-m_vzabs1uez.js"].map(t=>s.l(t))).then(()=>t(94452)))},85461,s=>{s.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>s.l(t))).then(()=>t(57092)))}]);
|