@uptimizr/dashboard 0.4.7 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/404.html +1 -1
- package/out/__next.__PAGE__.txt +9 -9
- package/out/__next._full.txt +10 -10
- package/out/__next._tree.txt +1 -1
- package/out/_next/static/chunks/{209sxygecny37.js → 0-6mdj5wxsfid.js} +1 -1
- package/out/_next/static/chunks/{0ybs1u66q26su.js → 0-qthfqvm1jyj.js} +1 -1
- package/out/_next/static/chunks/01viyuclp2gm9.js +1 -0
- package/out/_next/static/chunks/02aym4t2hgo5c.js +1 -0
- package/out/_next/static/chunks/02ic9b5ejugow.js +1 -0
- package/out/_next/static/chunks/03p70i4c7qt0v.js +1 -0
- package/out/_next/static/chunks/{33i36o_l69sm5.js → 03pjr-ivdicng.js} +1 -1
- package/out/_next/static/chunks/041a06-lxipy5.js +1 -0
- package/out/_next/static/chunks/{1zm6eo861i3c8.js → 06dzkwetqis-5.js} +1 -1
- package/out/_next/static/chunks/{3ipx7xbxchsq9.js → 06kvanz5-fo52.js} +1 -1
- package/out/_next/static/chunks/07y8ke_iy59dn.js +1 -0
- package/out/_next/static/chunks/09jukc-4jl735.js +1 -0
- package/out/_next/static/chunks/{35sne1llxnc-m.js → 09khmdgez3t0a.js} +18 -18
- package/out/_next/static/chunks/{02qk_wmkf9at-.js → 0_dca4876jshu.js} +38 -38
- package/out/_next/static/chunks/0axcgnl5qzr6e.js +1 -0
- package/out/_next/static/chunks/0ay4fjomijs3n.js +1 -0
- package/out/_next/static/chunks/0c7fy79wlccat.js +1 -0
- package/out/_next/static/chunks/0cqe4-l3imct3.js +1 -0
- package/out/_next/static/chunks/0cssvelju788j.js +1 -0
- package/out/_next/static/chunks/{0-_j1khfoib6l.js → 0ctain5xq2wsd.js} +12 -12
- package/out/_next/static/chunks/{22yqh0zlo_vwr.js → 0df-dr3otg_4w.js} +1 -1
- package/out/_next/static/chunks/{26y9sv8_-ykxf.js → 0endw997j7ao9.js} +1 -1
- package/out/_next/static/chunks/0ev_pbit1v_qg.js +1 -0
- package/out/_next/static/chunks/0eyw9oiwipywb.js +1 -0
- package/out/_next/static/chunks/0fkzbuo1tex4u.js +1 -0
- package/out/_next/static/chunks/0govas0u0t4w3.js +1 -0
- package/out/_next/static/chunks/{0grasqqf5dw7r.js → 0guzhnususp3-.js} +2 -2
- package/out/_next/static/chunks/0h7bq_ysu17q7.js +3 -0
- package/out/_next/static/chunks/0hneh_3xzlo28.js +1 -0
- package/out/_next/static/chunks/0iaqwme19z_0s.js +1 -0
- package/out/_next/static/chunks/0ibmar10xndpn.js +1 -0
- package/out/_next/static/chunks/0ii8mqoteppgh.js +11 -0
- package/out/_next/static/chunks/{1uh9zgsy69g92.js → 0ip6v64di_l6x.js} +1 -1
- package/out/_next/static/chunks/{267prao6fyt22.js → 0ixymgjgz3grn.js} +10 -10
- package/out/_next/static/chunks/0kuah8g7lt5ox.js +1 -0
- package/out/_next/static/chunks/0l3k4j19vxm17.js +1 -0
- package/out/_next/static/chunks/0l6hg0ohwh9-m.js +1 -0
- package/out/_next/static/chunks/0m4um4ylhlfan.js +1 -0
- package/out/_next/static/chunks/0mj837d4h0ddq.js +1 -0
- package/out/_next/static/chunks/0nyn-f4905o91.js +1 -0
- package/out/_next/static/chunks/0og6i9rsgkuif.js +1 -0
- package/out/_next/static/chunks/0os1x-fxzgnxs.js +1 -0
- package/out/_next/static/chunks/0otnra7mp0hog.js +1 -0
- package/out/_next/static/chunks/{1gttu-n9am66k.js → 0oyf2xzv8ofkk.js} +21 -21
- package/out/_next/static/chunks/0qvsy3gcqjm12.js +1 -0
- package/out/_next/static/chunks/{1qg1l7t00nyib.js → 0rl4ddh2vgxyl.js} +14 -14
- package/out/_next/static/chunks/0rwpttmsmqvn_.js +1 -0
- package/out/_next/static/chunks/0so3wjp9ch93y.js +1 -0
- package/out/_next/static/chunks/{43fp64xnfy646.js → 0te4g160_rb5d.js} +1 -1
- package/out/_next/static/chunks/0uby-zvu799ef.js +1 -0
- package/out/_next/static/chunks/{3h6akt2uu05ku.js → 0uvn0op2mlr2u.js} +12 -12
- package/out/_next/static/chunks/0vwj4hxjm0igv.js +1 -0
- package/out/_next/static/chunks/{1m9zc5gm-327d.js → 0w7c30w07uct2.js} +10 -10
- package/out/_next/static/chunks/0wm38z3u2133a.js +1 -0
- package/out/_next/static/chunks/0y7yk5al7_p8q.js +4 -0
- package/out/_next/static/chunks/0ycr0gi6fn6bt.js +1 -0
- package/out/_next/static/chunks/0ywvahq9t0tki.js +1 -0
- package/out/_next/static/chunks/0zh6nslagkby-.js +1 -0
- package/out/_next/static/chunks/{3vbamaoiuk9yj.js → 0zo8xa0nej3ex.js} +1 -1
- package/out/_next/static/chunks/{2of8q0kaeqpf0.js → 0zsir95gpf3xw.js} +1 -1
- package/out/_next/static/chunks/0zu6ryyj0ig-j.js +3 -0
- package/out/_next/static/chunks/{2c721vfva711t.js → 1-jv8k10q_1uw.js} +1 -1
- package/out/_next/static/chunks/1-s5ioie9a94e.js +1 -0
- package/out/_next/static/chunks/{13zcn4lv0qj76.js → 1-yos1h0qws5e.js} +11 -11
- package/out/_next/static/chunks/10o7brc3x027r.js +1 -0
- package/out/_next/static/chunks/{060iult6f68_e.js → 10pae4gb9i929.js} +29 -29
- package/out/_next/static/chunks/13p93itm8a3ym.js +1 -0
- package/out/_next/static/chunks/{0btmk0wmekl02.js → 147s8i_lktp4_.js} +2 -2
- package/out/_next/static/chunks/{3njwfothmmg7u.js → 14tgo5xt_3j4w.js} +1 -1
- package/out/_next/static/chunks/1699hx-vlak0n.js +22 -0
- package/out/_next/static/chunks/16d6n9e77rqti.js +1 -0
- package/out/_next/static/chunks/{3zs7l4362msjd.js → 16f3d5dv83rsr.js} +1 -1
- package/out/_next/static/chunks/16i_tpwn_cmr-.js +1 -0
- package/out/_next/static/chunks/{1by60_b14x-3o.js → 16rfr165nbha0.js} +1 -1
- package/out/_next/static/chunks/{0zqgq0lwtz9tn.js → 16sl51pvzo4tf.js} +1 -1
- package/out/_next/static/chunks/{2n-pveub8b_5t.js → 1760s-32qpwgg.js} +1 -1
- package/out/_next/static/chunks/{1u8snlm6a7uhi.js → 18kq07c5xy_4g.js} +4 -4
- package/out/_next/static/chunks/{1rcdimhu0qhlu.js → 190tbzt861ao3.js} +39 -39
- package/out/_next/static/chunks/19bhv6cupnnyj.js +1 -0
- package/out/_next/static/chunks/1_14pn2wwebxy.js +1 -0
- package/out/_next/static/chunks/{3huu0tqmxwowu.js → 1_kikmeubh0wq.js} +30 -30
- package/out/_next/static/chunks/1ay3z6agelsvz.js +1 -0
- package/out/_next/static/chunks/1b-fi3bfmpe31.js +1 -0
- package/out/_next/static/chunks/1bae3tqv53x9_.js +1 -0
- package/out/_next/static/chunks/1bf421g4peccx.js +2 -0
- package/out/_next/static/chunks/1bfony5qsc5tp.js +1 -0
- package/out/_next/static/chunks/{1e8_jl2cxd3rp.js → 1ddt0ot7kl8vq.js} +40 -40
- package/out/_next/static/chunks/1emz2vjkgck4z.js +1 -0
- package/out/_next/static/chunks/1eogzzw8i1wsg.js +1 -0
- package/out/_next/static/chunks/{2apihn9ra2ufp.js → 1g9p2h1-31q8o.js} +1 -1
- package/out/_next/static/chunks/1gcz1k1v1woca.js +1 -0
- package/out/_next/static/chunks/{3v-0c2aj6c0on.js → 1h8lyicgqhpxa.js} +1 -1
- package/out/_next/static/chunks/{3772oce1n3t_g.js → 1hot663akaepl.js} +1 -1
- package/out/_next/static/chunks/1i7pgl3ks5ye0.js +1 -0
- package/out/_next/static/chunks/{2sys9nj8lo3uk.js → 1i8sk_qgpdjhs.js} +1 -1
- package/out/_next/static/chunks/{30bhz7czzs4mf.js → 1kk3ct7pkpf3b.js} +1 -1
- package/out/_next/static/chunks/{33hp-khdfohdq.js → 1kq9o8del67le.js} +1 -1
- package/out/_next/static/chunks/{3d-i_skta_wes.js → 1l7tzyx2mumlq.js} +1 -1
- package/out/_next/static/chunks/1n_uwed9o--go.js +1 -0
- package/out/_next/static/chunks/1o351eldttogn.js +1 -0
- package/out/_next/static/chunks/1ogs4_aj84bfn.js +1 -0
- package/out/_next/static/chunks/{0sw-8gxbg4x0l.js → 1p206txlluipi.js} +18 -18
- package/out/_next/static/chunks/1p2bt1w845v6c.js +1 -0
- package/out/_next/static/chunks/1p3rgz4aef1gk.js +1 -0
- package/out/_next/static/chunks/{41b5gpyqbj58m.js → 1qcgdx9yl0gfx.js} +4 -4
- package/out/_next/static/chunks/1ql3mm2w5r-m8.js +1 -0
- package/out/_next/static/chunks/1qvcyuyshi3ll.js +53 -0
- package/out/_next/static/chunks/1r0yyg5a_0knc.js +1 -0
- package/out/_next/static/chunks/{15o4_2t-l3rj5.js → 1sa6qiidtcyk2.js} +1 -1
- package/out/_next/static/chunks/1t-9vrdrsi8le.js +1 -0
- package/out/_next/static/chunks/{1rlfg62jxqj3z.js → 1t97zo0tlpbnz.js} +1 -1
- package/out/_next/static/chunks/1te2tinzqnwck.js +1 -0
- package/out/_next/static/chunks/{3sa_hlx3konc7.js → 1trt-m2nrck0v.js} +1 -1
- package/out/_next/static/chunks/1ty9jpwr3o_st.js +1 -0
- package/out/_next/static/chunks/1u6w6veke8rze.js +1 -0
- package/out/_next/static/chunks/1u900urmrbv73.js +1 -0
- package/out/_next/static/chunks/{3_dgblylldcgb.js → 1vz2gd8k74lpi.js} +1 -1
- package/out/_next/static/chunks/1wkpl9bfb0wn7.js +1 -0
- package/out/_next/static/chunks/1wrly9a9c3teq.js +1 -0
- package/out/_next/static/chunks/1x0m05155yy4e.js +1 -0
- package/out/_next/static/chunks/{3xl-op0hwxytg.js → 1xf1wfow43ekc.js} +5 -5
- package/out/_next/static/chunks/1y10o40v9odam.js +1 -0
- package/out/_next/static/chunks/{2s6kpclh6ie7o.js → 1y_zykt3fpen4.js} +29 -29
- package/out/_next/static/chunks/1ye6xtbm16pg4.js +1 -0
- package/out/_next/static/chunks/{1t5oynmttpfsw.js → 1z6_57k5h31u7.js} +1 -1
- package/out/_next/static/chunks/{0lep3_bqwfuin.js → 1zboqft0h6mop.js} +1 -1
- package/out/_next/static/chunks/{43v4y2gu5z9_h.js → 1zr3c351x0ri5.js} +1 -1
- package/out/_next/static/chunks/2-5p2lcedvrli.js +1 -0
- package/out/_next/static/chunks/206hxrq60f1_e.js +1 -0
- package/out/_next/static/chunks/20r05k3-studj.js +1 -0
- package/out/_next/static/chunks/22gs24kj2du56.js +1 -0
- package/out/_next/static/chunks/22x5pd1gyp7sf.js +1 -0
- package/out/_next/static/chunks/{2a07so920b6aa.js → 22z-2t_yp1jzs.js} +1 -1
- package/out/_next/static/chunks/{30n4y_uu8chbh.js → 23hmfdw6z5zfy.js} +30 -30
- package/out/_next/static/chunks/23y1krqnc-8sm.js +1 -0
- package/out/_next/static/chunks/{3f8qelpscqfym.js → 24tbkj1qkux88.js} +2 -2
- package/out/_next/static/chunks/{2ao-3jzz7yw3p.js → 26cmri51v7497.js} +11 -11
- package/out/_next/static/chunks/27jalbk9zu-2b.js +1 -0
- package/out/_next/static/chunks/285d2s9096ryc.js +1 -0
- package/out/_next/static/chunks/296ykep2nvppv.js +1 -0
- package/out/_next/static/chunks/29nehg5cal-ug.js +1 -0
- package/out/_next/static/chunks/2_a56_k3x7to6.js +1 -0
- package/out/_next/static/chunks/2a-0l6eb1blh3.js +4 -0
- package/out/_next/static/chunks/{3qn6r8-0u6dij.js → 2a31-txop1jzg.js} +38 -38
- package/out/_next/static/chunks/2bse5vll1o-x0.js +1 -0
- package/out/_next/static/chunks/2ct40spu9wfj7.js +1 -0
- package/out/_next/static/chunks/{2kok6zedeeltw.js → 2ept01b7t-e03.js} +1 -1
- package/out/_next/static/chunks/{3w59kt5ztyvoq.js → 2ey5dqelco_g5.js} +1 -1
- package/out/_next/static/chunks/2fd_009hw7y0m.js +1 -0
- package/out/_next/static/chunks/{0fd-0i1yt23kz.js → 2ftz9kaxrsgxh.js} +1 -1
- package/out/_next/static/chunks/2gefdnozflr7p.js +1 -0
- package/out/_next/static/chunks/{2izok2otbk8-2.js → 2gs-u1n5uv7iz.js} +37 -37
- package/out/_next/static/chunks/{2r96kyeehsji9.js → 2hizqql79u-54.js} +1 -1
- package/out/_next/static/chunks/2iqf2dpdg_vfl.js +1 -0
- package/out/_next/static/chunks/2j7z127s_ycjd.js +1 -0
- package/out/_next/static/chunks/2kax7uslfxdnx.js +31 -0
- package/out/_next/static/chunks/2lh_w9rzy3vek.js +1 -0
- package/out/_next/static/chunks/{0rracz73p38mo.js → 2ln1na26qwp-3.js} +9 -9
- package/out/_next/static/chunks/2n08l1q5o_27e.js +1 -0
- package/out/_next/static/chunks/2n7268gyd9z-6.js +1 -0
- package/out/_next/static/chunks/2nq9cgjmtqwvp.js +1 -0
- package/out/_next/static/chunks/{005bbq_px7lke.js → 2oj8qc_pv14nk.js} +2 -2
- package/out/_next/static/chunks/2q24e72-olbe8.js +1 -0
- package/out/_next/static/chunks/2qc4hscs26cro.js +1 -0
- package/out/_next/static/chunks/{0gf-ztg86zd80.js → 2qe46redkqhfg.js} +1 -1
- package/out/_next/static/chunks/2qmfe0mqw150h.js +1 -0
- package/out/_next/static/chunks/2qtc0nbl_521e.js +1 -0
- package/out/_next/static/chunks/{0e1jfrmioeuws.js → 2rofu6gu1xzuq.js} +1 -1
- package/out/_next/static/chunks/2tdi94rkq739i.js +1 -0
- package/out/_next/static/chunks/2u_2sacqa9xa7.js +1 -0
- package/out/_next/static/chunks/2ujqz6088shm5.js +1 -0
- package/out/_next/static/chunks/{1l_3oidssbhns.js → 2urh9qafp3fiw.js} +17 -17
- package/out/_next/static/chunks/{05v-nubi896jg.js → 2v06n4z8wsmn9.js} +1 -1
- package/out/_next/static/chunks/2vp-5skbk1nfu.js +1 -0
- package/out/_next/static/chunks/2vu973j_n6cpx.js +1 -0
- package/out/_next/static/chunks/{37cnbm5ft1mqf.js → 2wwra56rehfcj.js} +1 -1
- package/out/_next/static/chunks/2xpwr97h2asal.js +1 -0
- package/out/_next/static/chunks/3000-0b8n9t_2.js +1 -0
- package/out/_next/static/chunks/30t3203d7p2da.js +1 -0
- package/out/_next/static/chunks/31kto7-dxkt3z.js +1 -0
- package/out/_next/static/chunks/{2lsvk7xcfkarc.js → 32oflcl79d8mu.js} +1 -1
- package/out/_next/static/chunks/32ovg81ae0l03.js +1 -0
- package/out/_next/static/chunks/{0z9erbl3llr_b.js → 331kthnvoma7n.js} +16 -16
- package/out/_next/static/chunks/{0q75860p8u_ii.js → 337kn1mn34rc6.js} +1 -1
- package/out/_next/static/chunks/{2tc3e-iqv71y_.js → 33xug8kf0-a1o.js} +1 -1
- package/out/_next/static/chunks/{1-ogak5u00kwa.js → 34dcb7_flbrvo.js} +1 -1
- package/out/_next/static/chunks/34zotyeqrz_nq.js +1 -0
- package/out/_next/static/chunks/351wsmi75l8db.js +1 -0
- package/out/_next/static/chunks/{15jlgfcaeaki9.js → 36yv-ialtpx98.js} +1 -1
- package/out/_next/static/chunks/37hwasxtee5e0.js +1 -0
- package/out/_next/static/chunks/37t0iclgxes05.js +1 -0
- package/out/_next/static/chunks/{1q4lkgxfnqnew.js → 37xnvnx1jxfaf.js} +1 -1
- package/out/_next/static/chunks/{2z_iab7ozohhq.js → 38w74ixqt-9co.js} +16 -16
- package/out/_next/static/chunks/{2h249uvhh2sij.js → 39t2x_9zd2rst.js} +10 -10
- package/out/_next/static/chunks/{0thw099xk3_0p.js → 39v73timmzwny.js} +2 -2
- package/out/_next/static/chunks/{2n3xu_wbvtj7h.js → 3_xqc3658d8sw.js} +12 -12
- package/out/_next/static/chunks/3ba8eudvlczwe.js +1 -0
- package/out/_next/static/chunks/{2q6l-xdqzgmpf.js → 3buezhxqc8n6n.js} +1 -1
- package/out/_next/static/chunks/{1zt1xxovnjhkm.js → 3c5iwwj-fhbue.js} +1 -1
- package/out/_next/static/chunks/{2urx6fow8c8c9.js → 3d8ot2tw6yqfq.js} +12 -12
- package/out/_next/static/chunks/3dc057ffe7ij-.js +1 -0
- package/out/_next/static/chunks/3djnlzwj9869o.js +1 -0
- package/out/_next/static/chunks/{2y8i7_nxm4r05.js → 3fuqxjjf8o1v9.js} +5 -5
- package/out/_next/static/chunks/{0z004fn14pbcu.js → 3gt6rzg9qw-an.js} +1 -1
- package/out/_next/static/chunks/{1tgj55b305g4h.js → 3h_05w5j8x538.js} +1 -1
- package/out/_next/static/chunks/{3j9xvdz55bi4p.js → 3hkhd1_k8xohv.js} +33 -33
- package/out/_next/static/chunks/{42ymanq326mo7.js → 3ijcc5tfisfnj.js} +1 -1
- package/out/_next/static/chunks/3j0dbpd9zop3p.js +1 -0
- package/out/_next/static/chunks/{1zkd8v-qka--j.js → 3ju83xk-ca7ma.js} +21 -21
- package/out/_next/static/chunks/3jxhl4apmhbm1.js +13 -0
- package/out/_next/static/chunks/{302qk2fjdrthp.js → 3la99oz_0p0r6.js} +5 -5
- package/out/_next/static/chunks/3n1b34fd5fdrh.js +1 -0
- package/out/_next/static/chunks/{2j120dkh7q3uf.js → 3nq_hq4x3rn3r.js} +1 -1
- package/out/_next/static/chunks/3pgb1kkqrdl9t.js +1 -0
- package/out/_next/static/chunks/3pik_-jj-zkfl.js +1 -0
- package/out/_next/static/chunks/{2w99knknr5i8c.js → 3q38kdbzd2nbd.js} +1 -1
- package/out/_next/static/chunks/3q5zl4ks17au2.js +1 -0
- package/out/_next/static/chunks/{2uo6vm7mfgrbf.js → 3qr10445lte-n.js} +1 -1
- package/out/_next/static/chunks/3r-8bnguvxsyo.js +1 -0
- package/out/_next/static/chunks/3sg56j8boe-3o.js +1 -0
- package/out/_next/static/chunks/{2q8yg63br2jc9.js → 3u7zj1-jdg781.js} +1 -1
- package/out/_next/static/chunks/{32_c4mbb6j1l6.js → 3wj5dmf6cywz8.js} +22 -22
- package/out/_next/static/chunks/{3oqxl46ukaojj.js → 3wr_oijfsq8lr.js} +11 -11
- package/out/_next/static/chunks/3xu0dh1ikzwj2.js +1 -0
- package/out/_next/static/chunks/3y5tpixt23-fl.js +1 -0
- package/out/_next/static/chunks/40gjf-_jt8upu.js +5 -0
- package/out/_next/static/chunks/41f12o_5lf-i9.js +1 -0
- package/out/_next/static/chunks/42ma8lqduohlc.js +1 -0
- package/out/_next/static/chunks/{0ai0zgbgjqb92.js → 43usshq2nc125.js} +1 -1
- package/out/_next/static/chunks/{0hajwk2yd-rwr.js → 44bl4ufopbmyh.js} +1 -1
- package/out/_next/static/chunks/44iutzkw9r21x.js +1 -0
- package/out/_next/static/chunks/turbopack-1xrxa3noq196-.js +1 -0
- package/out/_not-found/__next._full.txt +8 -8
- package/out/_not-found/__next._not-found.__PAGE__.txt +7 -7
- package/out/_not-found/__next._tree.txt +1 -1
- package/out/_not-found.html +1 -1
- package/out/_not-found.txt +8 -8
- package/out/index.html +1 -1
- package/out/index.txt +10 -10
- package/package.json +9 -9
- package/out/_next/static/chunks/00fbhtmui-yxg.js +0 -1
- package/out/_next/static/chunks/017pn-pen381_.js +0 -1
- package/out/_next/static/chunks/01vov6inx1zzt.js +0 -1
- package/out/_next/static/chunks/03bd5plut08tg.js +0 -1
- package/out/_next/static/chunks/03dwfqmo73w_z.js +0 -1
- package/out/_next/static/chunks/03sn4419dam-h.js +0 -5
- package/out/_next/static/chunks/05ere0-228syf.js +0 -1
- package/out/_next/static/chunks/05h8u5lrypn5m.js +0 -1
- package/out/_next/static/chunks/05z79zh625ezu.js +0 -1
- package/out/_next/static/chunks/08lvtnv7b1cxp.js +0 -1
- package/out/_next/static/chunks/0_v2luu_qmeid.js +0 -1
- package/out/_next/static/chunks/0boov9mwycanf.js +0 -1
- package/out/_next/static/chunks/0d8x8m2x6ca_m.js +0 -1
- package/out/_next/static/chunks/0dmrdrwtd093b.js +0 -1
- package/out/_next/static/chunks/0e7nlxmneb2j_.js +0 -1
- package/out/_next/static/chunks/0es97pusfxupl.js +0 -1
- package/out/_next/static/chunks/0fxdyvb1w23d1.js +0 -1
- package/out/_next/static/chunks/0fxhc24djjcgq.js +0 -1
- package/out/_next/static/chunks/0hk1wg7h4araz.js +0 -1
- package/out/_next/static/chunks/0j74ipw4fps-n.js +0 -1
- package/out/_next/static/chunks/0kj-vckdn7t5p.js +0 -1
- package/out/_next/static/chunks/0lbs5xdyjuzuo.js +0 -1
- package/out/_next/static/chunks/0mp0jh1gj7290.js +0 -1
- package/out/_next/static/chunks/0ngpoj2g5i4kz.js +0 -1
- package/out/_next/static/chunks/0nhljhguceh66.js +0 -1
- package/out/_next/static/chunks/0p6z73afb9dj2.js +0 -1
- package/out/_next/static/chunks/0p9zfmidzqkps.js +0 -1
- package/out/_next/static/chunks/0sx-6rf3eteqn.js +0 -1
- package/out/_next/static/chunks/0u85f0dhb4i8e.js +0 -1
- package/out/_next/static/chunks/0uk7kigzm4vi2.js +0 -31
- package/out/_next/static/chunks/0ulufxnsrou61.js +0 -1
- package/out/_next/static/chunks/0xa9dyg6ezzyd.js +0 -2
- package/out/_next/static/chunks/0xvrfvur0p534.js +0 -1
- package/out/_next/static/chunks/0ydfhk-p6zvm0.js +0 -1
- package/out/_next/static/chunks/0zcsxvcvog9ue.js +0 -1
- package/out/_next/static/chunks/10_5p5-xf2aoo.js +0 -1
- package/out/_next/static/chunks/118qlrzdwpfmo.js +0 -1
- package/out/_next/static/chunks/11km5p4gd0ut4.js +0 -1
- package/out/_next/static/chunks/120rl4l29q9xs.js +0 -1
- package/out/_next/static/chunks/129m5i93ltoym.js +0 -1
- package/out/_next/static/chunks/12n73o884lyyl.js +0 -1
- package/out/_next/static/chunks/175st2ogkg_1o.js +0 -1
- package/out/_next/static/chunks/19rsodtu91ja_.js +0 -1
- package/out/_next/static/chunks/1a2ouhup611bz.js +0 -1
- package/out/_next/static/chunks/1cyq7i39885sl.js +0 -1
- package/out/_next/static/chunks/1d9it6yocgt54.js +0 -1
- package/out/_next/static/chunks/1dp1s1t-y7gal.js +0 -1
- package/out/_next/static/chunks/1dr7gh6xgypl8.js +0 -1
- package/out/_next/static/chunks/1dt30s_sp8415.js +0 -1
- package/out/_next/static/chunks/1f1rek_fxk3of.js +0 -1
- package/out/_next/static/chunks/1f2mna0k5efeq.js +0 -1
- package/out/_next/static/chunks/1gfz3sxwkkg3d.js +0 -1
- package/out/_next/static/chunks/1gr35qeguuws0.js +0 -1
- package/out/_next/static/chunks/1imi0xwi9hd99.js +0 -1
- package/out/_next/static/chunks/1ka5v5zu0cstt.js +0 -1
- package/out/_next/static/chunks/1n9nhz-6azcp3.js +0 -3
- package/out/_next/static/chunks/1ncqwe81t_9_x.js +0 -1
- package/out/_next/static/chunks/1nix_lulkpklo.js +0 -1
- package/out/_next/static/chunks/1ntqovuz2c217.js +0 -1
- package/out/_next/static/chunks/1pgs-98tfkq9_.js +0 -1
- package/out/_next/static/chunks/1q2z0aeopo8t8.js +0 -1
- package/out/_next/static/chunks/1ses023uud001.js +0 -1
- package/out/_next/static/chunks/1t9i20i5-f8ze.js +0 -1
- package/out/_next/static/chunks/1ug4k-1zhr63a.js +0 -1
- package/out/_next/static/chunks/1vrpzlif-z_p0.js +0 -1
- package/out/_next/static/chunks/1vurgl6oz2qey.js +0 -17
- package/out/_next/static/chunks/1w-qc09n9ijtq.js +0 -1
- package/out/_next/static/chunks/1ycqxcht6x54p.js +0 -1
- package/out/_next/static/chunks/1zj4307ugq0qz.js +0 -1
- package/out/_next/static/chunks/1zm52cjrfrq7c.js +0 -1
- package/out/_next/static/chunks/1zp9363yfhpom.js +0 -1
- package/out/_next/static/chunks/2-3hk_db5fpok.js +0 -1
- package/out/_next/static/chunks/2-bv9a_0zgw1f.js +0 -1
- package/out/_next/static/chunks/216uiih3_vdfd.js +0 -1
- package/out/_next/static/chunks/21kfpd_bityxt.js +0 -1
- package/out/_next/static/chunks/24ecas0m9tao7.js +0 -3
- package/out/_next/static/chunks/24pq9210rng3f.js +0 -1
- package/out/_next/static/chunks/26skkagvj1z96.js +0 -1
- package/out/_next/static/chunks/2701xfv_07wz_.js +0 -1
- package/out/_next/static/chunks/271333m8y3k0e.js +0 -1
- package/out/_next/static/chunks/29rkmguzky-bp.js +0 -1
- package/out/_next/static/chunks/2a2oy8ryz2tsk.js +0 -1
- package/out/_next/static/chunks/2apnpj0-fs9ks.js +0 -1
- package/out/_next/static/chunks/2b481pitl4k85.js +0 -1
- package/out/_next/static/chunks/2bettxaqt3d2p.js +0 -1
- package/out/_next/static/chunks/2d2kl_m64j9cb.js +0 -1
- package/out/_next/static/chunks/2droqjmvmgj13.js +0 -1
- package/out/_next/static/chunks/2dxbvwbbgpzoq.js +0 -1
- package/out/_next/static/chunks/2eqbsut829r5l.js +0 -1
- package/out/_next/static/chunks/2f3_mzxjh3gso.js +0 -1
- package/out/_next/static/chunks/2fsde0jwi5qtt.js +0 -1
- package/out/_next/static/chunks/2j2ynchpqh34-.js +0 -1
- package/out/_next/static/chunks/2kj6pzs_wap1v.js +0 -1
- package/out/_next/static/chunks/2lnj9jruy4nrv.js +0 -1
- package/out/_next/static/chunks/2ofwtw6p08sfz.js +0 -1
- package/out/_next/static/chunks/2phl5ta4iim7l.js +0 -12
- package/out/_next/static/chunks/2r5qgieqldcd9.js +0 -1
- package/out/_next/static/chunks/2r7y401cvjc1s.js +0 -1
- package/out/_next/static/chunks/2rmc6ru7mc-kg.js +0 -1
- package/out/_next/static/chunks/2w2k1gveljyb7.js +0 -1
- package/out/_next/static/chunks/2w_ptlw-ad8-9.js +0 -4
- package/out/_next/static/chunks/2ws1s9d52ayv8.js +0 -1
- package/out/_next/static/chunks/2x7enks3ydgai.js +0 -1
- package/out/_next/static/chunks/2ydub0t01728d.js +0 -1
- package/out/_next/static/chunks/3-m_vzabs1uez.js +0 -1
- package/out/_next/static/chunks/3527r3jo5fj3i.js +0 -1
- package/out/_next/static/chunks/355dg8yaa94hr.js +0 -1
- package/out/_next/static/chunks/35ntbr_c-yx44.js +0 -1
- package/out/_next/static/chunks/36enkx1skkv2-.js +0 -4
- package/out/_next/static/chunks/38xdo3cifphut.js +0 -1
- package/out/_next/static/chunks/3beawo-qwuk8k.js +0 -1
- package/out/_next/static/chunks/3cj_6sl9kr3e9.js +0 -1
- package/out/_next/static/chunks/3df_l2we755bb.js +0 -1
- package/out/_next/static/chunks/3eve5y7fpzx2h.js +0 -1
- package/out/_next/static/chunks/3ewgyb4y19w-3.js +0 -1
- package/out/_next/static/chunks/3f3789eh18_oy.js +0 -1
- package/out/_next/static/chunks/3g3-e9m1en45q.js +0 -1
- package/out/_next/static/chunks/3i239y-1hbkm-.js +0 -1
- package/out/_next/static/chunks/3kp8qmhoi24oz.js +0 -1
- package/out/_next/static/chunks/3ksq69yq-40_r.js +0 -1
- package/out/_next/static/chunks/3qye1lytea2i8.js +0 -1
- package/out/_next/static/chunks/3rlp9yr75liz7.js +0 -1
- package/out/_next/static/chunks/3tyo643l62h3m.js +0 -1
- package/out/_next/static/chunks/3tz2tpqa9uvwm.js +0 -1
- package/out/_next/static/chunks/3utpc-fc6_y0f.js +0 -1
- package/out/_next/static/chunks/3v6nxa28rxngq.js +0 -1
- package/out/_next/static/chunks/3vv99btjc-mky.js +0 -1
- package/out/_next/static/chunks/3x02lxdo28u9i.js +0 -1
- package/out/_next/static/chunks/3ydnxyc4rvad_.js +0 -1
- package/out/_next/static/chunks/3ylg4gfetwgxw.js +0 -1
- package/out/_next/static/chunks/3zdtteq-r2fs5.js +0 -62
- package/out/_next/static/chunks/3zkwt0gybqtgm.js +0 -1
- package/out/_next/static/chunks/40etabvml_71y.js +0 -1
- package/out/_next/static/chunks/417jkzz0slv9m.js +0 -1
- package/out/_next/static/chunks/41u2-5jayyajf.js +0 -22
- package/out/_next/static/chunks/42gcpy51w7lk1.js +0 -1
- package/out/_next/static/chunks/44cer242u-f8v.js +0 -1
- package/out/_next/static/chunks/44zi0gl0a6a8w.js +0 -1
- package/out/_next/static/chunks/turbopack-0n2o5_bkskckx.js +0 -1
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_buildManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → 4r0L0ZMJeBwOJCVDsvvZ4}/_ssgManifest.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,25860,e=>{e.v(t=>Promise.all(["static/chunks/31kto7-dxkt3z.js","static/chunks/2qtc0nbl_521e.js","static/chunks/01viyuclp2gm9.js"].map(t=>e.l(t))).then(()=>t(32586)))},87682,e=>{e.v(t=>Promise.all(["static/chunks/1-s5ioie9a94e.js"].map(t=>e.l(t))).then(()=>t(49038)))},48820,e=>{e.v(t=>Promise.all(["static/chunks/37hwasxtee5e0.js","static/chunks/01viyuclp2gm9.js","static/chunks/0govas0u0t4w3.js","static/chunks/0otnra7mp0hog.js","static/chunks/22x5pd1gyp7sf.js","static/chunks/2q24e72-olbe8.js","static/chunks/3r-8bnguvxsyo.js","static/chunks/02ic9b5ejugow.js"].map(t=>e.l(t))).then(()=>t(98391)))},356,e=>{e.v(t=>Promise.all(["static/chunks/3y5tpixt23-fl.js","static/chunks/01viyuclp2gm9.js"].map(t=>e.l(t))).then(()=>t(55571)))},35218,e=>{e.v(t=>Promise.all(["static/chunks/0endw997j7ao9.js"].map(t=>e.l(t))).then(()=>t(92783)))},22035,e=>{e.v(t=>Promise.all(["static/chunks/2fd_009hw7y0m.js"].map(t=>e.l(t))).then(()=>t(96493)))},30928,e=>{e.v(t=>Promise.all(["static/chunks/0cqe4-l3imct3.js","static/chunks/01viyuclp2gm9.js"].map(t=>e.l(t))).then(()=>t(58536)))},30523,e=>{"use strict";var t=e.i(8697);let s=new Map;function a(e,a){var c;c=e,s.delete(c)&&t.Logger.Warn(`Extension with the name '${e}' already exists`),s.set(e,a)}e.s(["_GetCompatibleTextureLoader",0,function(t,c){("image/ktx"===c||"image/ktx2"===c)&&(t=".ktx"),!s.has(t)&&(t.endsWith(".ies")&&a(".ies",async()=>await e.A(22035).then(e=>new e._IESTextureLoader)),t.endsWith(".dds")&&a(".dds",async()=>await e.A(87682).then(e=>new e._DDSTextureLoader)),t.endsWith(".basis")&&a(".basis",async()=>await e.A(25860).then(e=>new e._BasisTextureLoader)),t.endsWith(".env")&&a(".env",async()=>await e.A(48820).then(e=>new e._ENVTextureLoader)),t.endsWith(".hdr")&&a(".hdr",async()=>await e.A(35218).then(e=>new e._HDRTextureLoader)),(t.endsWith(".ktx")||t.endsWith(".ktx2"))&&(a(".ktx",async()=>await e.A(30928).then(e=>new e._KTXTextureLoader)),a(".ktx2",async()=>await e.A(30928).then(e=>new e._KTXTextureLoader))),t.endsWith(".tga")&&a(".tga",async()=>await e.A(58959).then(e=>new e._TGATextureLoader)),t.endsWith(".exr")&&a(".exr",async()=>await e.A(356).then(e=>new e._ExrTextureLoader)));let r=s.get(t);return r?Promise.resolve(r(c)):null}])},58959,e=>{e.v(t=>Promise.all(["static/chunks/1o351eldttogn.js"].map(t=>e.l(t))).then(()=>t(35386)))},81705,e=>{"use strict";var t=e.i(56173);let s=[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))],a=[()=>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],c=(e,t)=>s[e]*a[e](t),r=[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 l{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,s,a){t.TmpVectors.Vector3[0].set(s.r,s.g,s.b);let r=t.TmpVectors.Vector3[0],l=t.TmpVectors.Vector3[1];r.scaleToRef(a,l),l.scaleToRef(c(0,e),t.TmpVectors.Vector3[2]),this.l00.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(1,e),t.TmpVectors.Vector3[2]),this.l1_1.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(2,e),t.TmpVectors.Vector3[2]),this.l10.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(3,e),t.TmpVectors.Vector3[2]),this.l11.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(4,e),t.TmpVectors.Vector3[2]),this.l2_2.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(5,e),t.TmpVectors.Vector3[2]),this.l2_1.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(6,e),t.TmpVectors.Vector3[2]),this.l20.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(7,e),t.TmpVectors.Vector3[2]),this.l21.addInPlace(t.TmpVectors.Vector3[2]),l.scaleToRef(c(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(r[0]),this.l1_1.scaleInPlace(r[1]),this.l10.scaleInPlace(r[2]),this.l11.scaleInPlace(r[3]),this.l2_2.scaleInPlace(r[4]),this.l2_1.scaleInPlace(r[5]),this.l20.scaleInPlace(r[6]),this.l21.scaleInPlace(r[7]),this.l22.scaleInPlace(r[8])}convertIrradianceToLambertianRadiance(){this.scaleInPlace(1/Math.PI)}preScaleForRendering(){this.preScaled=!0,this.l00.scaleInPlace(s[0]),this.l1_1.scaleInPlace(s[1]),this.l10.scaleInPlace(s[2]),this.l11.scaleInPlace(s[3]),this.l2_2.scaleInPlace(s[4]),this.l2_1.scaleInPlace(s[5]),this.l20.scaleInPlace(s[6]),this.l21.scaleInPlace(s[7]),this.l22.scaleInPlace(s[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 l().updateFromArray(e)}static FromPolynomial(e){let t=new l;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,l,"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=l.FromPolynomial(this)),this._harmonics.preScaled||this._harmonics.preScaleForRendering(),this._harmonics}addAmbient(e){t.TmpVectors.Vector3[0].copyFromFloats(e.r,e.g,e.b);let s=t.TmpVectors.Vector3[0];this.xx.addInPlace(s),this.yy.addInPlace(s),this.zz.addInPlace(s)}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(s){let a=new e;return t.Vector3.FromArrayToRef(s[0],0,a.x),t.Vector3.FromArrayToRef(s[1],0,a.y),t.Vector3.FromArrayToRef(s[2],0,a.z),t.Vector3.FromArrayToRef(s[3],0,a.xx),t.Vector3.FromArrayToRef(s[4],0,a.yy),t.Vector3.FromArrayToRef(s[5],0,a.zz),t.Vector3.FromArrayToRef(s[6],0,a.yz),t.Vector3.FromArrayToRef(s[7],0,a.zx),t.Vector3.FromArrayToRef(s[8],0,a.xy),a}}])},61785,e=>{e.v(t=>Promise.all(["static/chunks/0l6hg0ohwh9-m.js"].map(t=>e.l(t))).then(()=>t(45389)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76900,t=>{"use strict";var e=t.i(62399);class s{constructor(){this._easingMode=s.EASINGMODE_EASEIN}setEasingMode(t){let e=Math.min(Math.max(t,0),2);this._easingMode=e}getEasingMode(){return this._easingMode}easeInCore(t){throw Error("You must implement this method")}ease(t){switch(this._easingMode){case s.EASINGMODE_EASEIN:return this.easeInCore(t);case s.EASINGMODE_EASEOUT:return 1-this.easeInCore(1-t)}return t>=.5?(1-this.easeInCore((1-t)*2))*.5+.5:.5*this.easeInCore(2*t)}}s.EASINGMODE_EASEIN=0,s.EASINGMODE_EASEOUT=1,s.EASINGMODE_EASEINOUT=2,t.s(["BackEase",0,class extends s{constructor(t=1){super(),this.amplitude=t}easeInCore(t){return Math.pow(t,3)-t*Math.max(0,this.amplitude)*Math.sin(3.141592653589793*t)}},"BezierCurveEase",0,class extends s{constructor(t=0,e=0,s=1,i=1){super(),this.x1=t,this.y1=e,this.x2=s,this.y2=i}easeInCore(t){return e.BezierCurve.Interpolate(t,this.x1,this.y1,this.x2,this.y2)}},"BounceEase",0,class extends s{constructor(t=3,e=2){super(),this.bounces=t,this.bounciness=e}easeInCore(t){let e=Math.max(0,this.bounces),s=this.bounciness;s<=1&&(s=1.001);let i=Math.pow(s,e),n=1-s,r=(1-i)/n+.5*i,a=Math.floor(Math.log(-(t*r)*(1-s)+1)/Math.log(s)),o=(1-Math.pow(s,a))/(n*r),h=(o+(1-Math.pow(s,a+1))/(n*r))*.5,l=t-h,u=h-o;return-Math.pow(1/s,e-a)/(u*u)*(l-u)*(l+u)}},"CircleEase",0,class extends s{easeInCore(t){return 1-Math.sqrt(1-(t=Math.max(0,Math.min(1,t)))*t)}},"CubicEase",0,class extends s{easeInCore(t){return t*t*t}},"EasingFunction",0,s,"ElasticEase",0,class extends s{constructor(t=3,e=3){super(),this.oscillations=t,this.springiness=e}easeInCore(t){let e=Math.max(0,this.oscillations),s=Math.max(0,this.springiness);return(0===s?t:(Math.exp(s*t)-1)/(Math.exp(s)-1))*Math.sin((6.283185307179586*e+1.5707963267948966)*t)}},"ExponentialEase",0,class extends s{constructor(t=2){super(),this.exponent=t}easeInCore(t){return this.exponent<=0?t:(Math.exp(this.exponent*t)-1)/(Math.exp(this.exponent)-1)}}])},48669,t=>{"use strict";var e,s,i=t.i(76900),n=t.i(60699),r=t.i(65678),a=t.i(68282);(e=s||(s={}))[e.CircleEase=0]="CircleEase",e[e.BackEase=1]="BackEase",e[e.BounceEase=2]="BounceEase",e[e.CubicEase=3]="CubicEase",e[e.ElasticEase=4]="ElasticEase",e[e.ExponentialEase=5]="ExponentialEase",e[e.PowerEase=6]="PowerEase",e[e.QuadraticEase=7]="QuadraticEase",e[e.QuarticEase=8]="QuarticEase",e[e.QuinticEase=9]="QuinticEase",e[e.SineEase=10]="SineEase",e[e.BezierCurveEase=11]="BezierCurveEase";class o extends n.FlowGraphBlock{constructor(t){super(t),this.config=t,this._easingFunctions={},this.type=this.registerDataInput("type",r.RichTypeAny,11),this.mode=this.registerDataInput("mode",r.RichTypeNumber,0),this.parameters=this.registerDataInput("parameters",r.RichTypeAny,[1,0,0,1]),this.easingFunction=this.registerDataOutput("easingFunction",r.RichTypeAny)}_updateOutputs(t){let e=this.type.getValue(t),s=this.mode.getValue(t),n=this.parameters.getValue(t);if(void 0===e||void 0===s)return;let r=`${e}-${s}-${n.join("-")}`;if(!this._easingFunctions[r]){let t=function(t,...e){switch(t){case 11:return new i.BezierCurveEase(...e);case 0:return new i.CircleEase;case 1:return new i.BackEase(...e);case 2:return new i.BounceEase(...e);case 3:return new i.CubicEase;case 4:return new i.ElasticEase(...e);case 5:return new i.ExponentialEase(...e);default:throw Error("Easing type not yet implemented")}}(e,...n);t.setEasingMode(s),this._easingFunctions[r]=t}this.easingFunction.setValue(this._easingFunctions[r],t)}getClassName(){return"FlowGraphEasingBlock"}}let h=!1;t.s(["EasingFunctionType",0,s,"FlowGraphEasingBlock",0,o,"RegisterFlowGraphEasingBlock",0,function(){h||(h=!0,(0,a.RegisterClass)("FlowGraphEasingBlock",o))}])},62399,t=>{"use strict";var e,s,i=t.i(76197),n=t.i(56173),r=t.i(33491);(e=s||(s={}))[e.CW=0]="CW",e[e.CCW=1]="CCW";class a{constructor(t){this._radians=t,this._radians<0&&(this._radians+=2*Math.PI)}degrees(){return 180*this._radians/Math.PI}radians(){return this._radians}static BetweenTwoPoints(t,e){let s=e.subtract(t);return new a(Math.atan2(s.y,s.x))}static BetweenTwoVectors(t,e){let s=t.lengthSquared()*e.lengthSquared();if(0===s)return new a(Math.PI/2);s=Math.sqrt(s);let n=t.dot(e)/s;return new a(Math.acos(n=(0,i.Clamp)(n,-1,1)))}static FromRadians(t){return new a(t)}static FromDegrees(t){return new a(t*Math.PI/180)}}class o{constructor(t,e,s){this.startPoint=t,this.midPoint=e,this.endPoint=s;const i=Math.pow(e.x,2)+Math.pow(e.y,2),r=(Math.pow(t.x,2)+Math.pow(t.y,2)-i)/2,o=(i-Math.pow(s.x,2)-Math.pow(s.y,2))/2,h=(t.x-e.x)*(e.y-s.y)-(e.x-s.x)*(t.y-e.y);this.centerPoint=new n.Vector2((r*(e.y-s.y)-o*(t.y-e.y))/h,((t.x-e.x)*o-(e.x-s.x)*r)/h),this.radius=this.centerPoint.subtract(this.startPoint).length(),this.startAngle=a.BetweenTwoPoints(this.centerPoint,this.startPoint);const l=this.startAngle.degrees();let u=a.BetweenTwoPoints(this.centerPoint,this.midPoint).degrees(),c=a.BetweenTwoPoints(this.centerPoint,this.endPoint).degrees();u-l>180&&(u-=360),u-l<-180&&(u+=360),c-u>180&&(c-=360),c-u<-180&&(c+=360),this.orientation=u-l<0?0:1,this.angle=a.FromDegrees(0===this.orientation?l-c:c-l)}}t.s(["Angle",0,a,"Arc2",0,o,"BezierCurve",0,class{static Interpolate(t,e,s,i,n){if(0===t)return 0;let r=1-3*i+3*e,a=3*i-6*e,o=3*e,h=t;for(let e=0;e<5;e++){let e=h*h,s=e*h*r+a*e+o*h,i=1/(3*r*e+2*a*h+o);h-=(s-t)*i,h=Math.min(1,Math.max(0,h))}return 3*Math.pow(1-h,2)*h*s+3*(1-h)*Math.pow(h,2)*n+Math.pow(h,3)}},"Curve3",0,class t{static CreateQuadraticBezier(e,s,i,r){r=r>2?r:3;let a=[],o=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i;for(let t=0;t<=r;t++)a.push(new n.Vector3(o(t/r,e.x,s.x,i.x),o(t/r,e.y,s.y,i.y),o(t/r,e.z,s.z,i.z)));return new t(a)}static CreateCubicBezier(e,s,i,r,a){a=a>3?a:4;let o=[],h=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n;for(let t=0;t<=a;t++)o.push(new n.Vector3(h(t/a,e.x,s.x,i.x,r.x),h(t/a,e.y,s.y,i.y,r.y),h(t/a,e.z,s.z,i.z,r.z)));return new t(o)}static CreateHermiteSpline(e,s,i,r,a){let o=[],h=1/a;for(let t=0;t<=a;t++)o.push(n.Vector3.Hermite(e,s,i,r,t*h));return new t(o)}static CreateCatmullRomSpline(e,s,i){let r=[],a=1/s,o=0;if(i){let t=e.length;for(let i=0;i<t;i++){o=0;for(let h=0;h<s;h++)r.push(n.Vector3.CatmullRom(e[i%t],e[(i+1)%t],e[(i+2)%t],e[(i+3)%t],o)),o+=a}r.push(r[0])}else{let t=[];t.push(e[0].clone()),t.push(...e),t.push(e[e.length-1].clone());let i=0;for(;i<t.length-3;i++){o=0;for(let e=0;e<s;e++)r.push(n.Vector3.CatmullRom(t[i],t[i+1],t[i+2],t[i+3],o)),o+=a}i--,r.push(n.Vector3.CatmullRom(t[i],t[i+1],t[i+2],t[i+3],o))}return new t(r)}static ArcThru3Points(e,s,i,r=32,a=!1,o=!1){let h=[],l=s.subtract(e),u=i.subtract(s),c=e.subtract(i),p=n.Vector3.Cross(l,u),_=p.length();if(_<1e-8)return new t(h);let g=l.lengthSquared(),d=u.lengthSquared(),m=c.lengthSquared(),x=p.lengthSquared(),E=.5*l.length()*u.length()*c.length()/_,A=n.Vector3.Dot(l,c),M=n.Vector3.Dot(l,u),w=n.Vector3.Dot(u,c),P=e.scale(-.5*d*A/x).add(s.scale(-.5*m*M/x)).add(i.scale(-.5*g*w/x)),y=e.subtract(P).normalize(),f=n.Vector3.Cross(p,y).normalize();if(o){let t=2*Math.PI/r;for(let e=0;e<=2*Math.PI;e+=t)h.push(P.add(y.scale(E*Math.cos(e)).add(f.scale(E*Math.sin(e)))));h.push(e)}else{let t,s=1/r,n=0;do t=P.add(y.scale(E*Math.cos(n)).add(f.scale(E*Math.sin(n)))),h.push(t),n+=s;while(!t.equalsWithEpsilon(i,E*s*1.1))h.push(i),a&&h.push(e)}return new t(h)}constructor(t){this._length=0,this._points=t,this._length=this._computeLength(t)}getPoints(){return this._points}length(){return this._length}continue(e){let s=this._points[this._points.length-1],i=this._points.slice(),n=e.getPoints();for(let t=1;t<n.length;t++)i.push(n[t].subtract(n[0]).add(s));return new t(i)}_computeLength(t){let e=0;for(let s=1;s<t.length;s++)e+=t[s].subtract(t[s-1]).length();return e}},"Orientation",0,s,"Path2",0,class t{constructor(t,e){this._points=[],this._length=0,this.closed=!1,this._points.push(new n.Vector2(t,e))}addLineTo(t,e){if(this.closed)return this;let s=new n.Vector2(t,e),i=this._points[this._points.length-1];return this._points.push(s),this._length+=s.subtract(i).length(),this}addArcTo(t,e,s,i,r=36){if(this.closed)return this;let a=new o(this._points[this._points.length-1],new n.Vector2(t,e),new n.Vector2(s,i)),h=a.angle.radians()/r;0===a.orientation&&(h*=-1);let l=a.startAngle.radians()+h;for(let t=0;t<r;t++){let t=Math.cos(l)*a.radius+a.centerPoint.x,e=Math.sin(l)*a.radius+a.centerPoint.y;this.addLineTo(t,e),l+=h}return this}addQuadraticCurveTo(t,e,s,i,n=36){if(this.closed)return this;let r=(t,e,s,i)=>(1-t)*(1-t)*e+2*t*(1-t)*s+t*t*i,a=this._points[this._points.length-1];for(let o=0;o<=n;o++){let h=o/n,l=r(h,a.x,t,s),u=r(h,a.y,e,i);this.addLineTo(l,u)}return this}addBezierCurveTo(t,e,s,i,n,r,a=36){if(this.closed)return this;let o=(t,e,s,i,n)=>(1-t)*(1-t)*(1-t)*e+3*t*(1-t)*(1-t)*s+3*t*t*(1-t)*i+t*t*t*n,h=this._points[this._points.length-1];for(let l=0;l<=a;l++){let u=l/a,c=o(u,h.x,t,s,n),p=o(u,h.y,e,i,r);this.addLineTo(c,p)}return this}isPointInside(t){let e=!1,s=this._points.length;for(let i=s-1,n=0;n<s;i=n++){let s=this._points[i],r=this._points[n],a=r.x-s.x,o=r.y-s.y;if(Math.abs(o)>Number.EPSILON){if(o<0&&(s=this._points[n],a=-a,r=this._points[i],o=-o),t.y<s.y||t.y>r.y)continue;if(t.y===s.y&&t.x===s.x)return!0;{let i=o*(t.x-s.x)-a*(t.y-s.y);if(0===i)return!0;if(i<0)continue;e=!e}}else{if(t.y!==s.y)continue;if(r.x<=t.x&&t.x<=s.x||s.x<=t.x&&t.x<=r.x)return!0}}return e}close(){return this.closed=!0,this}length(){let t=this._length;if(this.closed){let e=this._points[this._points.length-1];t+=this._points[0].subtract(e).length()}return t}area(){let t=this._points.length,e=0;for(let s=t-1,i=0;i<t;s=i++)e+=this._points[s].x*this._points[i].y-this._points[i].x*this._points[s].y;return .5*e}getPoints(){return this._points}getPointAtLengthPosition(t){if(t<0||t>1)return n.Vector2.Zero();let e=t*this.length(),s=0;for(let t=0;t<this._points.length;t++){let i=(t+1)%this._points.length,r=this._points[t],a=this._points[i].subtract(r),o=a.length()+s;if(e>=s&&e<=o){let t=a.normalize(),i=e-s;return new n.Vector2(r.x+t.x*i,r.y+t.y*i)}s=o}return n.Vector2.Zero()}static StartingAt(e,s){return new t(e,s)}},"Path3D",0,class t{constructor(t,e=null,s,i=!1){this.path=t,this._curve=[],this._distances=[],this._tangents=[],this._normals=[],this._binormals=[],this._pointAtData={id:0,point:n.Vector3.Zero(),previousPointArrayIndex:0,position:0,subPosition:0,interpolateReady:!1,interpolationMatrix:n.Matrix.Identity()};for(let e=0;e<t.length;e++)this._curve[e]=t[e].clone();this._raw=s||!1,this._alignTangentsWithPath=i,this._compute(e,i)}getCurve(){return this._curve}getPoints(){return this._curve}length(){return this._distances[this._distances.length-1]}getTangents(){return this._tangents}getNormals(){return this._normals}getBinormals(){return this._binormals}getDistances(){return this._distances}getPointAt(t){return this._updatePointAtData(t).point}getTangentAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Forward(),this._pointAtData.interpolationMatrix):this._tangents[this._pointAtData.previousPointArrayIndex]}getNormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.Right(),this._pointAtData.interpolationMatrix):this._normals[this._pointAtData.previousPointArrayIndex]}getBinormalAt(t,e=!1){return this._updatePointAtData(t,e),e?n.Vector3.TransformCoordinates(n.Vector3.UpReadOnly,this._pointAtData.interpolationMatrix):this._binormals[this._pointAtData.previousPointArrayIndex]}getDistanceAt(t){return this.length()*t}getPreviousPointIndexAt(t){return this._updatePointAtData(t),this._pointAtData.previousPointArrayIndex}getSubPositionAt(t){return this._updatePointAtData(t),this._pointAtData.subPosition}getClosestPositionTo(t){let e=Number.MAX_VALUE,s=0;for(let i=0;i<this._curve.length-1;i++){let r=this._curve[i+0],a=this._curve[i+1].subtract(r).normalize(),o=this._distances[i+1]-this._distances[i+0],h=Math.min(Math.max(n.Vector3.Dot(a,t.subtract(r).normalize()),0)*n.Vector3.Distance(r,t)/o,1),l=n.Vector3.Distance(r.add(a.scale(h*o)),t);l<e&&(e=l,s=(this._distances[i+0]+o*h)/this.length())}return s}slice(e=0,s=1){if(e<0&&(e=1- -1*e%1),s<0&&(s=1- -1*s%1),e>s){let t=e;e=s,s=t}let i=this.getCurve(),n=this.getPointAt(e),r=this.getPreviousPointIndexAt(e),a=this.getPointAt(s),o=this.getPreviousPointIndexAt(s)+1,h=[];return 0!==e&&(r++,h.push(n)),h.push(...i.slice(r,o)),(1!==s||1===e)&&h.push(a),new t(h,this.getNormalAt(e),this._raw,this._alignTangentsWithPath)}update(t,e=null,s=!1){for(let e=0;e<t.length;e++)this._curve[e].x=t[e].x,this._curve[e].y=t[e].y,this._curve[e].z=t[e].z;return this._compute(e,s),this}_compute(t,e=!1){let s,i,r,a,o,h=this._curve.length;if(h<2)return;this._tangents[0]=this._getFirstNonNullVector(0),this._raw||this._tangents[0].normalize(),this._tangents[h-1]=this._curve[h-1].subtract(this._curve[h-2]),this._raw||this._tangents[h-1].normalize();let l=this._tangents[0],u=this._normalVector(l,t);this._normals[0]=u,this._raw||this._normals[0].normalize(),this._binormals[0]=n.Vector3.Cross(l,this._normals[0]),this._raw||this._binormals[0].normalize(),this._distances[0]=0;for(let t=1;t<h;t++)s=this._getLastNonNullVector(t),t<h-1&&(i=this._getFirstNonNullVector(t),this._tangents[t]=e?i:s.add(i),this._tangents[t].normalize()),this._distances[t]=this._distances[t-1]+this._curve[t].subtract(this._curve[t-1]).length(),r=this._tangents[t],o=this._binormals[t-1],this._normals[t]=n.Vector3.Cross(o,r),this._raw||(0===this._normals[t].length()?(a=this._normals[t-1],this._normals[t]=a.clone()):this._normals[t].normalize()),this._binormals[t]=n.Vector3.Cross(r,this._normals[t]),this._raw||this._binormals[t].normalize();this._pointAtData.id=NaN}_getFirstNonNullVector(t){let e=1,s=this._curve[t+e].subtract(this._curve[t]);for(;0===s.length()&&t+e+1<this._curve.length;)e++,s=this._curve[t+e].subtract(this._curve[t]);return s}_getLastNonNullVector(t){let e=1,s=this._curve[t].subtract(this._curve[t-e]);for(;0===s.length()&&t>e;)e++,s=this._curve[t].subtract(this._curve[t-e]);return s}_normalVector(t,e){let s,a=t.length();if(0===a&&(a=1),null==e){let e;e=(0,i.WithinEpsilon)(Math.abs(t.y)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.x)/a,1,r.Epsilon)?(0,i.WithinEpsilon)(Math.abs(t.z)/a,1,r.Epsilon)?n.Vector3.Zero():new n.Vector3(0,0,1):new n.Vector3(1,0,0):new n.Vector3(0,-1,0),s=n.Vector3.Cross(t,e)}else s=n.Vector3.Cross(t,e),n.Vector3.CrossToRef(s,t,s);return s.normalize(),s}_updatePointAtData(t,e=!1){let s;if(this._pointAtData.id===t)return this._pointAtData.interpolateReady||this._updateInterpolationMatrix(),this._pointAtData;this._pointAtData.id=t;let i=this.getPoints();if(t<=0)return this._setPointAtData(0,0,i[0],0,e);if(t>=1)return this._setPointAtData(1,1,i[i.length-1],i.length-1,e);let r=i[0],a=0,o=t*this.length();for(let h=1;h<i.length;h++){s=i[h];let l=n.Vector3.Distance(r,s);if((a+=l)===o)return this._setPointAtData(t,1,s,h,e);if(a>o){let i=(a-o)/l,n=r.subtract(s),u=s.add(n.scaleInPlace(i));return this._setPointAtData(t,1-i,u,h-1,e)}r=s}return this._pointAtData}_setPointAtData(t,e,s,i,n){return this._pointAtData.point=s,this._pointAtData.position=t,this._pointAtData.subPosition=e,this._pointAtData.previousPointArrayIndex=i,this._pointAtData.interpolateReady=n,n&&this._updateInterpolationMatrix(),this._pointAtData}_updateInterpolationMatrix(){this._pointAtData.interpolationMatrix=n.Matrix.Identity();let t=this._pointAtData.previousPointArrayIndex;if(t!==this._tangents.length-1){let e=t+1,s=this._tangents[t].clone(),i=this._normals[t].clone(),r=this._binormals[t].clone(),a=this._tangents[e].clone(),o=this._normals[e].clone(),h=this._binormals[e].clone(),l=n.Quaternion.RotationQuaternionFromAxis(i,r,s),u=n.Quaternion.RotationQuaternionFromAxis(o,h,a);n.Quaternion.Slerp(l,u,this._pointAtData.subPosition).toRotationMatrix(this._pointAtData.interpolationMatrix)}}}])}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,13279,72716,79638,81210,21796,93373,26053,e=>{"use strict";let t,i,r,s,a,n,l,o,c,h,u,d,_,p,E,m,f,g,A,T,S,M,b,I,P,R,D,x,C,O,L,y,F,v,N,k,B,U,H,W,V,z,w,G,X,Z,Y,j,q,Q,$,K,J,ee,et,ei,er,es,ea,en,el,eo,ec,eh,eu,ed,e_,ep,eE,em,ef,eg,eA,eT,eS,eM,eb,eI,eP,eR,eD,ex,eC,eO,eL,ey,eF,ev,eN,ek,eB,eU,eH,eW,eV,ez,ew,eG,eX;var eZ,eY,ej,eq,eQ=e.i(73403),e$=e.i(5207),eK=e.i(17814),eJ=e.i(97991),e0=e.i(71829),e1=e.i(10977),e3=e.i(87851),e2=e.i(81978),e6=e.i(56173),e5=e.i(33491);class e4{constructor(e,t,i){this.vectors=(0,e2.BuildArray)(8,e6.Vector3.Zero),this.center=e6.Vector3.Zero(),this.centerWorld=e6.Vector3.Zero(),this.extendSize=e6.Vector3.Zero(),this.extendSizeWorld=e6.Vector3.Zero(),this.directions=(0,e2.BuildArray)(3,e6.Vector3.Zero),this.vectorsWorld=(0,e2.BuildArray)(8,e6.Vector3.Zero),this.minimumWorld=e6.Vector3.Zero(),this.maximumWorld=e6.Vector3.Zero(),this.minimum=e6.Vector3.Zero(),this.maximum=e6.Vector3.Zero(),this._drawWrapperFront=null,this._drawWrapperBack=null,this.reConstruct(e,t,i)}reConstruct(e,t,i){let r=e.x,s=e.y,a=e.z,n=t.x,l=t.y,o=t.z,c=this.vectors;this.minimum.copyFromFloats(r,s,a),this.maximum.copyFromFloats(n,l,o),c[0].copyFromFloats(r,s,a),c[1].copyFromFloats(n,l,o),c[2].copyFromFloats(n,s,a),c[3].copyFromFloats(r,l,a),c[4].copyFromFloats(r,s,o),c[5].copyFromFloats(n,l,a),c[6].copyFromFloats(r,l,o),c[7].copyFromFloats(n,s,o),t.addToRef(e,this.center).scaleInPlace(.5),t.subtractToRef(e,this.extendSize).scaleInPlace(.5),this._worldMatrix=i||e6.Matrix.IdentityReadOnly,this._update(this._worldMatrix)}scale(e){let t=e4._TmpVector3,i=this.maximum.subtractToRef(this.minimum,t[0]),r=i.length();i.normalizeFromLength(r);let s=r*e,a=i.scaleInPlace(.5*s),n=this.center.subtractToRef(a,t[1]),l=this.center.addToRef(a,t[2]);return this.reConstruct(n,l,this._worldMatrix),this}getWorldMatrix(){return this._worldMatrix}_update(e){let t=this.minimumWorld,i=this.maximumWorld,r=this.directions,s=this.vectorsWorld,a=this.vectors;if(e.isIdentity()){t.copyFrom(this.minimum),i.copyFrom(this.maximum);for(let e=0;e<8;++e)s[e].copyFrom(a[e]);this.extendSizeWorld.copyFrom(this.extendSize),this.centerWorld.copyFrom(this.center)}else{t.setAll(Number.MAX_VALUE),i.setAll(-Number.MAX_VALUE);for(let r=0;r<8;++r){let n=s[r];e6.Vector3.TransformCoordinatesToRef(a[r],e,n),t.minimizeInPlace(n),i.maximizeInPlace(n)}i.subtractToRef(t,this.extendSizeWorld).scaleInPlace(.5),i.addToRef(t,this.centerWorld).scaleInPlace(.5)}e6.Vector3.FromArrayToRef(e.m,0,r[0]),e6.Vector3.FromArrayToRef(e.m,4,r[1]),e6.Vector3.FromArrayToRef(e.m,8,r[2]),this._worldMatrix=e}isInFrustum(e){return e4.IsInFrustum(this.vectorsWorld,e)}isCompletelyInFrustum(e){return e4.IsCompletelyInFrustum(this.vectorsWorld,e)}intersectsPoint(e){let t=this.minimumWorld,i=this.maximumWorld,r=t.x,s=t.y,a=t.z,n=i.x,l=i.y,o=i.z,c=e.x,h=e.y,u=e.z,d=-e5.Epsilon;return!(n-c<d)&&!(d>c-r)&&!(l-h<d)&&!(d>h-s)&&!(o-u<d)&&!(d>u-a)}intersectsSphere(e){return e4.IntersectsSphere(this.minimumWorld,this.maximumWorld,e.centerWorld,e.radiusWorld)}intersectsMinMax(e,t){let i=this.minimumWorld,r=this.maximumWorld,s=i.x,a=i.y,n=i.z,l=r.x,o=r.y,c=r.z,h=e.x,u=e.y,d=e.z,_=t.x,p=t.y,E=t.z;return!(l<h)&&!(s>_)&&!(o<u)&&!(a>p)&&!(c<d)&&!(n>E)}dispose(){this._drawWrapperFront?.dispose(),this._drawWrapperBack?.dispose()}static Intersects(e,t){return e.intersectsMinMax(t.minimumWorld,t.maximumWorld)}static IntersectsSphere(e,t,i,r){let s=e4._TmpVector3[0];return e6.Vector3.ClampToRef(i,e,t,s),e6.Vector3.DistanceSquared(i,s)<=r*r}static IsCompletelyInFrustum(e,t){for(let i=0;i<6;++i){let r=t[i];for(let t=0;t<8;++t)if(0>r.dotCoordinate(e[t]))return!1}return!0}static IsInFrustum(e,t){for(let i=0;i<6;++i){let r=!0,s=t[i];for(let t=0;t<8;++t)if(s.dotCoordinate(e[t])>=0){r=!1;break}if(r)return!1}return!0}}e4._TmpVector3=(0,e2.BuildArray)(3,e6.Vector3.Zero);class e7{constructor(e,t,i){this.center=e6.Vector3.Zero(),this.centerWorld=e6.Vector3.Zero(),this.minimum=e6.Vector3.Zero(),this.maximum=e6.Vector3.Zero(),this.reConstruct(e,t,i)}reConstruct(e,t,i){this.minimum.copyFrom(e),this.maximum.copyFrom(t);let r=e6.Vector3.Distance(e,t);t.addToRef(e,this.center).scaleInPlace(.5),this.radius=.5*r,this._update(i||e6.Matrix.IdentityReadOnly)}scale(e){let t=e7._TmpVector3,i=this.maximum.subtractToRef(this.minimum,t[0]),r=i.length();i.normalizeFromLength(r);let s=r*e,a=i.scaleInPlace(.5*s),n=this.center.subtractToRef(a,t[1]),l=this.center.addToRef(a,t[2]);return this.reConstruct(n,l,this._worldMatrix),this}getWorldMatrix(){return this._worldMatrix}_update(e){if(e.isIdentity())this.centerWorld.copyFrom(this.center),this.radiusWorld=this.radius;else{e6.Vector3.TransformCoordinatesToRef(this.center,e,this.centerWorld);let t=e7._TmpVector3[0];e6.Vector3.TransformNormalFromFloatsToRef(1,1,1,e,t),this.radiusWorld=Math.max(Math.abs(t.x),Math.abs(t.y),Math.abs(t.z))*this.radius}}isInFrustum(e){let t=this.centerWorld,i=this.radiusWorld;for(let r=0;r<6;r++)if(e[r].dotCoordinate(t)<=-i)return!1;return!0}isCenterInFrustum(e){let t=this.centerWorld;for(let i=0;i<6;i++)if(0>e[i].dotCoordinate(t))return!1;return!0}intersectsPoint(e){let t=e6.Vector3.DistanceSquared(this.centerWorld,e);return!(this.radiusWorld*this.radiusWorld<t)}static Intersects(e,t){let i=e6.Vector3.DistanceSquared(e.centerWorld,t.centerWorld),r=e.radiusWorld+t.radiusWorld;return!(r*r<i)}static CreateFromCenterAndRadius(e,t,i){this._TmpVector3[0].copyFrom(e),this._TmpVector3[1].copyFromFloats(0,0,t),this._TmpVector3[2].copyFrom(e),this._TmpVector3[0].addInPlace(this._TmpVector3[1]),this._TmpVector3[2].subtractInPlace(this._TmpVector3[1]);let r=new e7(this._TmpVector3[0],this._TmpVector3[2]);return i?r._worldMatrix=i:r._worldMatrix=e6.Matrix.Identity(),r}}e7._TmpVector3=(0,e2.BuildArray)(3,e6.Vector3.Zero);let e8={min:0,max:0},e9={min:0,max:0},te=(e,t,i)=>{let r=e6.Vector3.Dot(t.centerWorld,e),s=Math.abs(e6.Vector3.Dot(t.directions[0],e))*t.extendSize.x+Math.abs(e6.Vector3.Dot(t.directions[1],e))*t.extendSize.y+Math.abs(e6.Vector3.Dot(t.directions[2],e))*t.extendSize.z;i.min=r-s,i.max=r+s},tt=(e,t,i)=>(te(e,t,e8),te(e,i,e9),!(e8.min>e9.max||e9.min>e8.max));class ti{constructor(e,t,i){this._isLocked=!1,this.boundingBox=new e4(e,t,i),this.boundingSphere=new e7(e,t,i)}reConstruct(e,t,i){this.boundingBox.reConstruct(e,t,i),this.boundingSphere.reConstruct(e,t,i)}get minimum(){return this.boundingBox.minimum}get maximum(){return this.boundingBox.maximum}get isLocked(){return this._isLocked}set isLocked(e){this._isLocked=e}update(e){this._isLocked||(this.boundingBox._update(e),this.boundingSphere._update(e))}centerOn(e,t){let i=ti._TmpVector3[0].copyFrom(e).subtractInPlace(t),r=ti._TmpVector3[1].copyFrom(e).addInPlace(t);return this.boundingBox.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this.boundingSphere.reConstruct(i,r,this.boundingBox.getWorldMatrix()),this}encapsulate(e){let t=e6.Vector3.Minimize(this.minimum,e),i=e6.Vector3.Maximize(this.maximum,e);return this.reConstruct(t,i,this.boundingBox.getWorldMatrix()),this}encapsulateBoundingInfo(e){let t=e6.TmpVectors.Matrix[0];this.boundingBox.getWorldMatrix().invertToRef(t);let i=e6.TmpVectors.Vector3[0];return e6.Vector3.TransformCoordinatesToRef(e.boundingBox.minimumWorld,t,i),this.encapsulate(i),e6.Vector3.TransformCoordinatesToRef(e.boundingBox.maximumWorld,t,i),this.encapsulate(i),this}scale(e){return this.boundingBox.scale(e),this.boundingSphere.scale(e),this}isInFrustum(e,t=0){return!!((2===t||3===t)&&this.boundingSphere.isCenterInFrustum(e))||!!this.boundingSphere.isInFrustum(e)&&(1===t||3===t||this.boundingBox.isInFrustum(e))}get diagonalLength(){let e=this.boundingBox;return e.maximumWorld.subtractToRef(e.minimumWorld,ti._TmpVector3[0]).length()}isCompletelyInFrustum(e){return this.boundingBox.isCompletelyInFrustum(e)}_checkCollision(e){return e._canDoCollision(this.boundingSphere.centerWorld,this.boundingSphere.radiusWorld,this.boundingBox.minimumWorld,this.boundingBox.maximumWorld)}intersectsPoint(e){return!!this.boundingSphere.centerWorld&&!!this.boundingSphere.intersectsPoint(e)&&!!this.boundingBox.intersectsPoint(e)}intersects(e,t){if(!e7.Intersects(this.boundingSphere,e.boundingSphere)||!e4.Intersects(this.boundingBox,e.boundingBox))return!1;if(!t)return!0;let i=this.boundingBox,r=e.boundingBox;return!!tt(i.directions[0],i,r)&&!!tt(i.directions[1],i,r)&&!!tt(i.directions[2],i,r)&&!!tt(r.directions[0],i,r)&&!!tt(r.directions[1],i,r)&&!!tt(r.directions[2],i,r)&&!!tt(e6.Vector3.Cross(i.directions[0],r.directions[0]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[0],r.directions[1]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[0],r.directions[2]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[1],r.directions[0]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[1],r.directions[1]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[1],r.directions[2]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[2],r.directions[0]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[2],r.directions[1]),i,r)&&!!tt(e6.Vector3.Cross(i.directions[2],r.directions[2]),i,r)&&!0}}ti._TmpVector3=(0,e2.BuildArray)(2,e6.Vector3.Zero),e.s(["BoundingInfo",0,ti],72716);let tr=(r=[],eZ=class{static extractMinAndMaxIndexed(e,t,i,r,s,a){for(let n=i;n<i+r;n++){let i=3*t[n],r=e[i],l=e[i+1],o=e[i+2];s.minimizeInPlaceFromFloats(r,l,o),a.maximizeInPlaceFromFloats(r,l,o)}}static extractMinAndMax(e,t,i,r,s,a){for(let n=t,l=t*r;n<t+i;n++,l+=r){let t=e[l],i=e[l+1],r=e[l+2];s.minimizeInPlaceFromFloats(t,i,r),a.maximizeInPlaceFromFloats(t,i,r)}}},s="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,t=[e$.nativeOverride.filter((...e)=>!Array.isArray(e[0])&&!Array.isArray(e[1]))],i=[e$.nativeOverride.filter((...e)=>!Array.isArray(e[0]))],(0,eQ.__esDecorate)(eZ,null,t,{kind:"method",name:"extractMinAndMaxIndexed",static:!0,private:!1,access:{has:e=>"extractMinAndMaxIndexed"in e,get:e=>e.extractMinAndMaxIndexed},metadata:s},null,r),(0,eQ.__esDecorate)(eZ,null,i,{kind:"method",name:"extractMinAndMax",static:!0,private:!1,access:{has:e=>"extractMinAndMax"in e,get:e=>e.extractMinAndMax},metadata:s},null,r),s&&Object.defineProperty(eZ,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:s}),(0,eQ.__runInitializers)(eZ,r),eZ);function ts(e,t,i,r,s=null){let a=new e6.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),n=new e6.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return tr.extractMinAndMaxIndexed(e,t,i,r,a,n),s&&(a.x-=a.x*s.x+s.y,a.y-=a.y*s.x+s.y,a.z-=a.z*s.x+s.y,n.x+=n.x*s.x+s.y,n.y+=n.y*s.x+s.y,n.z+=n.z*s.x+s.y),{minimum:a,maximum:n}}e.s(["extractMinAndMax",0,function(e,t,i,r=null,s){let a=new e6.Vector3(Number.MAX_VALUE,Number.MAX_VALUE,Number.MAX_VALUE),n=new e6.Vector3(-Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE);return s||(s=3),tr.extractMinAndMax(e,t,i,s,a,n),r&&(a.x-=a.x*r.x+r.y,a.y-=a.y*r.x+r.y,a.z-=a.z*r.x+r.y,n.x+=n.x*r.x+r.y,n.y+=n.y*r.x+r.y,n.z+=n.z*r.x+r.y),{minimum:a,maximum:n}},"extractMinAndMaxIndexed",0,ts],79638);var ta=e.i(61133),tn=e.i(49399);class tl{get materialDefines(){let e=this._mainDrawWrapperOverride?this._mainDrawWrapperOverride.defines:this._getDrawWrapper()?.defines;return"string"==typeof e?null:e}set materialDefines(e){(this._mainDrawWrapperOverride??this._getDrawWrapper(void 0,!0)).defines=e}_getDrawWrapper(e,t=!1){e=e??this._engine.currentRenderPassId;let i=this._drawWrappers[e];return!i&&t&&(this._drawWrappers[e]=i=new ta.DrawWrapper(this._mesh.getScene().getEngine())),i}_removeDrawWrapper(e,t=!0,i=!1){t&&this._drawWrappers[e]?.dispose(i),this._drawWrappers[e]=void 0}get effect(){return this._mainDrawWrapperOverride?this._mainDrawWrapperOverride.effect:this._getDrawWrapper()?.effect??null}get _drawWrapper(){return this._mainDrawWrapperOverride??this._getDrawWrapper(void 0,!0)}get _drawWrapperOverride(){return this._mainDrawWrapperOverride}_setMainDrawWrapperOverride(e){this._mainDrawWrapperOverride=e}setEffect(e,t=null,i,r=!0){let s=this._drawWrapper;s.setEffect(e,t,r),void 0!==i&&(s.materialContext=i),e||(s.defines=null,s.materialContext=void 0)}resetDrawCache(e,t=!1){if(this._drawWrappers)if(void 0!==e)return void this._removeDrawWrapper(e,!0,t);else for(let e of this._drawWrappers)e?.dispose(t);this._drawWrappers=[]}static AddToMesh(e,t,i,r,s,a,n,l=!0){return new tl(e,t,i,r,s,a,n,l)}constructor(e,t,i,r,s,a,n,l=!0,o=!0){this.materialIndex=e,this.verticesStart=t,this.verticesCount=i,this.indexStart=r,this.indexCount=s,this._mainDrawWrapperOverride=null,this._linesIndexCount=0,this._linesIndexBuffer=null,this._lastColliderWorldVertices=null,this._lastColliderTransformMatrix=null,this._wasDispatched=!1,this._renderId=0,this._alphaIndex=0,this._distanceToCamera=0,this._currentMaterial=null,this._mesh=a,this._renderingMesh=n||a,o&&a.subMeshes.push(this),this._engine=this._mesh.getScene().getEngine(),this.resetDrawCache(),this._trianglePlanes=[],this._id=a.subMeshes.length-1,l&&(this.refreshBoundingInfo(),a.computeWorldMatrix(!0))}get IsGlobal(){return 0===this.verticesStart&&this.verticesCount===this._mesh.getTotalVertices()&&0===this.indexStart&&this.indexCount===this._mesh.getTotalIndices()}getBoundingInfo(){return this.IsGlobal||this._mesh.hasThinInstances?this._mesh.getBoundingInfo():this._boundingInfo}setBoundingInfo(e){return this._boundingInfo=e,this}getMesh(){return this._mesh}getRenderingMesh(){return this._renderingMesh}getReplacementMesh(){return this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null}getEffectiveMesh(){return(this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:null)||this._renderingMesh}getMaterial(e=!0){let t=this._renderingMesh.getMaterialForRenderPass(this._engine.currentRenderPassId)??this._renderingMesh.material;if(!t)return e&&this._mesh.getScene()._hasDefaultMaterial?this._mesh.getScene().defaultMaterial:null;if(this._isMultiMaterial(t)){let e=t.getSubMaterial(this.materialIndex);return this._currentMaterial!==e&&(this._currentMaterial=e,this.resetDrawCache()),e}return t}_isMultiMaterial(e){return void 0!==e.getSubMaterial}refreshBoundingInfo(e=null){let t;if(this._lastColliderWorldVertices=null,this.IsGlobal||!this._renderingMesh||!this._renderingMesh.geometry)return this;if(e||(e=this._renderingMesh.getVerticesData(e1.VertexBuffer.PositionKind)),!e)return this._boundingInfo=this._mesh.getBoundingInfo(),this;let i=this._renderingMesh.getIndices();if(0===this.indexStart&&this.indexCount===i.length){let e=this._renderingMesh.getBoundingInfo();t={minimum:e.minimum.clone(),maximum:e.maximum.clone()}}else t=ts(e,i,this.indexStart,this.indexCount,this._renderingMesh.geometry.boundingBias);return this._boundingInfo?this._boundingInfo.reConstruct(t.minimum,t.maximum):this._boundingInfo=new ti(t.minimum,t.maximum),this}_checkCollision(e){return this.getBoundingInfo()._checkCollision(e)}updateBoundingInfo(e){let t=this.getBoundingInfo();return t||(this.refreshBoundingInfo(),t=this.getBoundingInfo()),t&&t.update(e),this}isInFrustum(e){let t=this.getBoundingInfo();return!!t&&t.isInFrustum(e,this._mesh.cullingStrategy)}isCompletelyInFrustum(e){let t=this.getBoundingInfo();return!!t&&t.isCompletelyInFrustum(e)}render(e){return this._renderingMesh.render(this,e,this._mesh._internalAbstractMeshDataInfo._actAsRegularMesh?this._mesh:void 0),this}_getLinesIndexBuffer(e,t){if(!this._linesIndexBuffer){let i=6*Math.floor(this.indexCount/3),r=this.verticesStart+this.verticesCount>65535?new Uint32Array(i):new Uint16Array(i),s=0;if(0===e.length)for(let e=this.indexStart;e<this.indexStart+this.indexCount;e+=3)r[s++]=e,r[s++]=e+1,r[s++]=e+1,r[s++]=e+2,r[s++]=e+2,r[s++]=e;else for(let t=this.indexStart;t<this.indexStart+this.indexCount;t+=3)r[s++]=e[t],r[s++]=e[t+1],r[s++]=e[t+1],r[s++]=e[t+2],r[s++]=e[t+2],r[s++]=e[t];this._linesIndexBuffer=t.createIndexBuffer(r),this._linesIndexCount=r.length}return this._linesIndexBuffer}canIntersects(e){let t=this.getBoundingInfo();return!!t&&e.intersectsBox(t.boundingBox)}intersects(e,t,i,r,s){let a=this.getMaterial();if(!a)return null;let n=3,l=!1;switch(a.fillMode){case 3:case 5:case 6:case 8:return null;case 7:n=1,l=!0}return 4===a.fillMode?i.length?this._intersectLines(e,t,i,this._mesh.intersectionThreshold,r):this._intersectUnIndexedLines(e,t,i,this._mesh.intersectionThreshold,r):!i.length&&this._mesh._unIndexed?this._intersectUnIndexedTriangles(e,t,i,r,s):this._intersectTriangles(e,t,i,n,l,r,s)}_intersectLines(e,t,i,r,s){let a=null;for(let n=this.indexStart;n<this.indexStart+this.indexCount;n+=2){let l=t[i[n]],o=t[i[n+1]],c=e.intersectionSegment(l,o,r);if(!(c<0)&&(s||!a||c<a.distance)&&((a=new e3.IntersectionInfo(null,null,c)).faceId=n/2,s))break}return a}_intersectUnIndexedLines(e,t,i,r,s){let a=null;for(let i=this.verticesStart;i<this.verticesStart+this.verticesCount;i+=2){let n=t[i],l=t[i+1],o=e.intersectionSegment(n,l,r);if(!(o<0)&&(s||!a||o<a.distance)&&((a=new e3.IntersectionInfo(null,null,o)).faceId=i/2,s))break}return a}_intersectTriangles(e,t,i,r,s,a,n){let l=null,o=-1;for(let c=this.indexStart;c<this.indexStart+this.indexCount-(3-r);c+=r){o++;let r=i[c],h=i[c+1],u=i[c+2];if(s&&0xffffffff===u){c+=2;continue}let d=t[r],_=t[h],p=t[u];if(!d||!_||!p||n&&!n(d,_,p,e,r,h,u))continue;let E=e.intersectsTriangle(d,_,p);if(E){if(E.distance<0)continue;if((a||!l||E.distance<l.distance)&&((l=E).faceId=o,a))break}}return l}_intersectUnIndexedTriangles(e,t,i,r,s){let a=null;for(let i=this.verticesStart;i<this.verticesStart+this.verticesCount;i+=3){let n=t[i],l=t[i+1],o=t[i+2];if(s&&!s(n,l,o,e,-1,-1,-1))continue;let c=e.intersectsTriangle(n,l,o);if(c){if(c.distance<0)continue;if((r||!a||c.distance<a.distance)&&((a=c).faceId=i/3,r))break}}return a}_rebuild(){this._linesIndexBuffer&&(this._linesIndexBuffer=null)}clone(e,t){let i=new tl(this.materialIndex,this.verticesStart,this.verticesCount,this.indexStart,this.indexCount,e,t,!1);if(!this.IsGlobal){let e=this.getBoundingInfo();if(!e)return i;i._boundingInfo=new ti(e.minimum,e.maximum)}return i}dispose(e=!1){this._linesIndexBuffer&&(this._mesh.getScene().getEngine()._releaseBuffer(this._linesIndexBuffer),this._linesIndexBuffer=null);let t=this._mesh.subMeshes.indexOf(this);this._mesh.subMeshes.splice(t,1),this.resetDrawCache(void 0,e)}getClassName(){return"SubMesh"}static CreateFromIndices(e,t,i,r,s,a=!0){let n=Number.MAX_VALUE,l=-Number.MAX_VALUE,o=(s||r).getIndices();for(let e=t;e<t+i;e++){let t=o[e];t<n&&(n=t),t>l&&(l=t)}return new tl(e,n,l-n+1,t,i,r,s,a)}}(eq=tl.prototype).projectToRef??(eq.projectToRef=(0,tn._MissingSideEffect)("SubMesh","projectToRef")),e.s(["SubMesh",0,tl],81210);var to=e.i(58607),tc=e.i(8697),th=e.i(38450),tu=e.i(69552);let td=(f=[],eY=class{constructor(){this._func=(0,eQ.__runInitializers)(this,f),this.reset()}reset(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.func=519,this.opStencilFail=7680,this.opDepthFail=7680,this.opStencilDepthPass=7681,this.backFunc=519,this.backOpStencilFail=7680,this.backOpDepthFail=7680,this.backOpStencilDepthPass=7681}get func(){return this._func}set func(e){this._func=e}get backFunc(){return this._backFunc}set backFunc(e){this._backFunc=e}get funcRef(){return this._funcRef}set funcRef(e){this._funcRef=e}get funcMask(){return this._funcMask}set funcMask(e){this._funcMask=e}get opStencilFail(){return this._opStencilFail}set opStencilFail(e){this._opStencilFail=e}get opDepthFail(){return this._opDepthFail}set opDepthFail(e){this._opDepthFail=e}get opStencilDepthPass(){return this._opStencilDepthPass}set opStencilDepthPass(e){this._opStencilDepthPass=e}get backOpStencilFail(){return this._backOpStencilFail}set backOpStencilFail(e){this._backOpStencilFail=e}get backOpDepthFail(){return this._backOpDepthFail}set backOpDepthFail(e){this._backOpDepthFail=e}get backOpStencilDepthPass(){return this._backOpStencilDepthPass}set backOpStencilDepthPass(e){this._backOpStencilDepthPass=e}get mask(){return this._mask}set mask(e){this._mask=e}get enabled(){return this._enabled}set enabled(e){this._enabled=e}getClassName(){return"MaterialStencilState"}copyTo(e){tu.SerializationHelper.Clone(()=>e,this)}serialize(){return tu.SerializationHelper.Serialize(this)}parse(e,t,i){tu.SerializationHelper.Parse(()=>this,e,t,i)}},g="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,a=[(0,e$.serialize)()],n=[(0,e$.serialize)()],l=[(0,e$.serialize)()],o=[(0,e$.serialize)()],c=[(0,e$.serialize)()],h=[(0,e$.serialize)()],u=[(0,e$.serialize)()],d=[(0,e$.serialize)()],_=[(0,e$.serialize)()],p=[(0,e$.serialize)()],E=[(0,e$.serialize)()],m=[(0,e$.serialize)()],(0,eQ.__esDecorate)(eY,null,a,{kind:"getter",name:"func",static:!1,private:!1,access:{has:e=>"func"in e,get:e=>e.func},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,n,{kind:"getter",name:"backFunc",static:!1,private:!1,access:{has:e=>"backFunc"in e,get:e=>e.backFunc},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,l,{kind:"getter",name:"funcRef",static:!1,private:!1,access:{has:e=>"funcRef"in e,get:e=>e.funcRef},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,o,{kind:"getter",name:"funcMask",static:!1,private:!1,access:{has:e=>"funcMask"in e,get:e=>e.funcMask},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,c,{kind:"getter",name:"opStencilFail",static:!1,private:!1,access:{has:e=>"opStencilFail"in e,get:e=>e.opStencilFail},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,h,{kind:"getter",name:"opDepthFail",static:!1,private:!1,access:{has:e=>"opDepthFail"in e,get:e=>e.opDepthFail},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,u,{kind:"getter",name:"opStencilDepthPass",static:!1,private:!1,access:{has:e=>"opStencilDepthPass"in e,get:e=>e.opStencilDepthPass},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,d,{kind:"getter",name:"backOpStencilFail",static:!1,private:!1,access:{has:e=>"backOpStencilFail"in e,get:e=>e.backOpStencilFail},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,_,{kind:"getter",name:"backOpDepthFail",static:!1,private:!1,access:{has:e=>"backOpDepthFail"in e,get:e=>e.backOpDepthFail},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,p,{kind:"getter",name:"backOpStencilDepthPass",static:!1,private:!1,access:{has:e=>"backOpStencilDepthPass"in e,get:e=>e.backOpStencilDepthPass},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,E,{kind:"getter",name:"mask",static:!1,private:!1,access:{has:e=>"mask"in e,get:e=>e.mask},metadata:g},null,f),(0,eQ.__esDecorate)(eY,null,m,{kind:"getter",name:"enabled",static:!1,private:!1,access:{has:e=>"enabled"in e,get:e=>e.enabled},metadata:g},null,f),g&&Object.defineProperty(eY,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:g}),eY);var t_=e.i(76972),tp=e.i(88732);function tE(e,t,i){let r=!1,s=!!(e.clipPlane??t.clipPlane),a=!!(e.clipPlane2??t.clipPlane2),n=!!(e.clipPlane3??t.clipPlane3),l=!!(e.clipPlane4??t.clipPlane4),o=!!(e.clipPlane5??t.clipPlane5),c=!!(e.clipPlane6??t.clipPlane6);return i.CLIPPLANE!==s&&(i.CLIPPLANE=s,r=!0),i.CLIPPLANE2!==a&&(i.CLIPPLANE2=a,r=!0),i.CLIPPLANE3!==n&&(i.CLIPPLANE3=n,r=!0),i.CLIPPLANE4!==l&&(i.CLIPPLANE4=l,r=!0),i.CLIPPLANE5!==o&&(i.CLIPPLANE5=o,r=!0),i.CLIPPLANE6!==c&&(i.CLIPPLANE6=c,r=!0),r}function tm(e,t,i){if(i){let r=tp.FloatingOriginCurrentScene.getScene()?.floatingOriginOffset||e6.Vector3.ZeroReadOnly;e.setFloat4(t,i.normal.x,i.normal.y,i.normal.z,i.d+e6.Vector3.Dot(i.normal,r))}}e.s(["AddClipPlaneUniforms",0,function(e){-1===e.indexOf("vClipPlane")&&e.push("vClipPlane"),-1===e.indexOf("vClipPlane2")&&e.push("vClipPlane2"),-1===e.indexOf("vClipPlane3")&&e.push("vClipPlane3"),-1===e.indexOf("vClipPlane4")&&e.push("vClipPlane4"),-1===e.indexOf("vClipPlane5")&&e.push("vClipPlane5"),-1===e.indexOf("vClipPlane6")&&e.push("vClipPlane6")},"BindClipPlane",0,function(e,t,i){let r=t.clipPlane??i.clipPlane;tm(e,"vClipPlane",r),tm(e,"vClipPlane2",r=t.clipPlane2??i.clipPlane2),tm(e,"vClipPlane3",r=t.clipPlane3??i.clipPlane3),tm(e,"vClipPlane4",r=t.clipPlane4??i.clipPlane4),tm(e,"vClipPlane5",r=t.clipPlane5??i.clipPlane5),tm(e,"vClipPlane6",r=t.clipPlane6??i.clipPlane6)},"PrepareDefinesForClipPlanes",0,tE,"PrepareStringDefinesForClipPlanes",0,function(e,t,i){let r=!!(e.clipPlane??t.clipPlane),s=!!(e.clipPlane2??t.clipPlane2),a=!!(e.clipPlane3??t.clipPlane3),n=!!(e.clipPlane4??t.clipPlane4),l=!!(e.clipPlane5??t.clipPlane5),o=!!(e.clipPlane6??t.clipPlane6);r&&i.push("#define CLIPPLANE"),s&&i.push("#define CLIPPLANE2"),a&&i.push("#define CLIPPLANE3"),n&&i.push("#define CLIPPLANE4"),l&&i.push("#define CLIPPLANE5"),o&&i.push("#define CLIPPLANE6")}],21796);var tf=e.i(18405);class tg{static get DiffuseTextureEnabled(){return this._DiffuseTextureEnabled}static set DiffuseTextureEnabled(e){this._DiffuseTextureEnabled!==e&&(this._DiffuseTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BaseWeightTextureEnabled(){return this._BaseWeightTextureEnabled}static set BaseWeightTextureEnabled(e){this._BaseWeightTextureEnabled!==e&&(this._BaseWeightTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BaseDiffuseRoughnessTextureEnabled(){return this._BaseDiffuseRoughnessTextureEnabled}static set BaseDiffuseRoughnessTextureEnabled(e){this._BaseDiffuseRoughnessTextureEnabled!==e&&(this._BaseDiffuseRoughnessTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get DetailTextureEnabled(){return this._DetailTextureEnabled}static set DetailTextureEnabled(e){this._DetailTextureEnabled!==e&&(this._DetailTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get DecalMapEnabled(){return this._DecalMapEnabled}static set DecalMapEnabled(e){this._DecalMapEnabled!==e&&(this._DecalMapEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get AmbientTextureEnabled(){return this._AmbientTextureEnabled}static set AmbientTextureEnabled(e){this._AmbientTextureEnabled!==e&&(this._AmbientTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get OpacityTextureEnabled(){return this._OpacityTextureEnabled}static set OpacityTextureEnabled(e){this._OpacityTextureEnabled!==e&&(this._OpacityTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ReflectionTextureEnabled(){return this._ReflectionTextureEnabled}static set ReflectionTextureEnabled(e){this._ReflectionTextureEnabled!==e&&(this._ReflectionTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get EmissiveTextureEnabled(){return this._EmissiveTextureEnabled}static set EmissiveTextureEnabled(e){this._EmissiveTextureEnabled!==e&&(this._EmissiveTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get SpecularTextureEnabled(){return this._SpecularTextureEnabled}static set SpecularTextureEnabled(e){this._SpecularTextureEnabled!==e&&(this._SpecularTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get BumpTextureEnabled(){return this._BumpTextureEnabled}static set BumpTextureEnabled(e){this._BumpTextureEnabled!==e&&(this._BumpTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get LightmapTextureEnabled(){return this._LightmapTextureEnabled}static set LightmapTextureEnabled(e){this._LightmapTextureEnabled!==e&&(this._LightmapTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get RefractionTextureEnabled(){return this._RefractionTextureEnabled}static set RefractionTextureEnabled(e){this._RefractionTextureEnabled!==e&&(this._RefractionTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ColorGradingTextureEnabled(){return this._ColorGradingTextureEnabled}static set ColorGradingTextureEnabled(e){this._ColorGradingTextureEnabled!==e&&(this._ColorGradingTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get FresnelEnabled(){return this._FresnelEnabled}static set FresnelEnabled(e){this._FresnelEnabled!==e&&(this._FresnelEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(4))}static get ClearCoatTextureEnabled(){return this._ClearCoatTextureEnabled}static set ClearCoatTextureEnabled(e){this._ClearCoatTextureEnabled!==e&&(this._ClearCoatTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ClearCoatBumpTextureEnabled(){return this._ClearCoatBumpTextureEnabled}static set ClearCoatBumpTextureEnabled(e){this._ClearCoatBumpTextureEnabled!==e&&(this._ClearCoatBumpTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ClearCoatTintTextureEnabled(){return this._ClearCoatTintTextureEnabled}static set ClearCoatTintTextureEnabled(e){this._ClearCoatTintTextureEnabled!==e&&(this._ClearCoatTintTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get SheenTextureEnabled(){return this._SheenTextureEnabled}static set SheenTextureEnabled(e){this._SheenTextureEnabled!==e&&(this._SheenTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get AnisotropicTextureEnabled(){return this._AnisotropicTextureEnabled}static set AnisotropicTextureEnabled(e){this._AnisotropicTextureEnabled!==e&&(this._AnisotropicTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get ThicknessTextureEnabled(){return this._ThicknessTextureEnabled}static set ThicknessTextureEnabled(e){this._ThicknessTextureEnabled!==e&&(this._ThicknessTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get RefractionIntensityTextureEnabled(){return this._ThicknessTextureEnabled}static set RefractionIntensityTextureEnabled(e){this._RefractionIntensityTextureEnabled!==e&&(this._RefractionIntensityTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get TranslucencyIntensityTextureEnabled(){return this._TranslucencyIntensityTextureEnabled}static set TranslucencyIntensityTextureEnabled(e){this._TranslucencyIntensityTextureEnabled!==e&&(this._TranslucencyIntensityTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get TranslucencyColorTextureEnabled(){return this._TranslucencyColorTextureEnabled}static set TranslucencyColorTextureEnabled(e){this._TranslucencyColorTextureEnabled!==e&&(this._TranslucencyColorTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}static get IridescenceTextureEnabled(){return this._IridescenceTextureEnabled}static set IridescenceTextureEnabled(e){this._IridescenceTextureEnabled!==e&&(this._IridescenceTextureEnabled=e,tf.AbstractEngine.MarkAllMaterialsAsDirty(1))}}tg._DiffuseTextureEnabled=!0,tg._BaseWeightTextureEnabled=!0,tg._BaseDiffuseRoughnessTextureEnabled=!0,tg._DetailTextureEnabled=!0,tg._DecalMapEnabled=!0,tg._AmbientTextureEnabled=!0,tg._OpacityTextureEnabled=!0,tg._ReflectionTextureEnabled=!0,tg._EmissiveTextureEnabled=!0,tg._SpecularTextureEnabled=!0,tg._BumpTextureEnabled=!0,tg._LightmapTextureEnabled=!0,tg._RefractionTextureEnabled=!0,tg._ColorGradingTextureEnabled=!0,tg._FresnelEnabled=!0,tg._ClearCoatTextureEnabled=!0,tg._ClearCoatBumpTextureEnabled=!0,tg._ClearCoatTintTextureEnabled=!0,tg._SheenTextureEnabled=!0,tg._AnisotropicTextureEnabled=!0,tg._ThicknessTextureEnabled=!0,tg._RefractionIntensityTextureEnabled=!0,tg._TranslucencyIntensityTextureEnabled=!0,tg._TranslucencyColorTextureEnabled=!0,tg._IridescenceTextureEnabled=!0,e.s(["MaterialFlags",0,tg],93373);let tA={r:0,g:0,b:0},tT={NUM_MORPH_INFLUENCERS:0,NORMAL:!1,TANGENT:!1,UV:!1,UV2:!1,COLOR:!1};function tS(e,t,i,r=!0){let s=i.NUM_MORPH_INFLUENCERS;if(s>0&&e0.EngineStore.LastCreatedEngine){let a=e0.EngineStore.LastCreatedEngine.getCaps().maxVertexAttribs,n=t.morphTargetManager;if(n?.isUsingTextureForTargets)return;let l=n&&n.supportsPositions&&r,o=n&&n.supportsNormals&&i.NORMAL,c=n&&n.supportsTangents&&i.TANGENT,h=n&&n.supportsUVs&&i.UV1,u=n&&n.supportsUV2s&&i.UV2,d=n&&n.supportsColors&&i.VERTEXCOLOR;for(let i=0;i<s;i++)l&&e.push("position"+i),o&&e.push("normal"+i),c&&e.push("tangent"+i),h&&e.push("uv_"+i),u&&e.push("uv2_"+i),d&&e.push("color"+i),e.length>a&&tc.Logger.Error("Cannot add more vertex attributes for mesh "+t.name)}}function tM(e,t=!1){e.push("world0"),e.push("world1"),e.push("world2"),e.push("world3"),t&&(e.push("previousWorld0"),e.push("previousWorld1"),e.push("previousWorld2"),e.push("previousWorld3"))}function tb(e,t){t.bindToEffect(e,"Scene")}let tI=new WeakMap,tP=new WeakMap,tR=new WeakSet;e.s(["AreLightsTexturesReady",0,function(e,t,i,r=!1){if(!e.lightsEnabled||r)return!0;let s=t.lightSources,a=Math.min(s.length,i);for(let e=0;e<a;e++)if(!s[e].areLightTexturesReady())return!1;return!0},"BindBonesParameters",0,function(e,t,i){if(t&&e&&(e.computeBonesUsingShaders&&t._bonesComputationForcedToCPU&&(e.computeBonesUsingShaders=!1),e.useBones&&e.computeBonesUsingShaders&&e.skeleton)){let r=e.skeleton;if(r.isUsingTextureForMatrices&&t.getUniformIndex("boneTextureInfo")>-1){let i=r.getTransformMatrixTexture(e);t.setTexture("boneSampler",i),t.setFloat2("boneTextureInfo",r._textureWidth,r._textureHeight)}else{let s=r.getTransformMatrices(e);s&&(t.setMatrices("mBones",s),i&&e.getScene().prePassRenderer&&e.getScene().prePassRenderer.getIndex(2))&&(i.previousBones[e.uniqueId]||(i.previousBones[e.uniqueId]=s.slice()),t.setMatrices("mPreviousBones",i.previousBones[e.uniqueId]),i.previousBones[e.uniqueId].set(s))}}},"BindFogParameters",0,function(e,t,i,r=!1){i&&e.fogEnabled&&(!t||t.applyFog)&&0!==e.fogMode&&(i.setFloat4("vFogInfos",e.fogMode,e.fogStart,e.fogEnd,e.fogDensity),r?(e.fogColor.toLinearSpaceToRef(tA,e.getEngine().useExactSrgbConversions),i.setColor3("vFogColor",tA)):i.setColor3("vFogColor",e.fogColor))},"BindIBLParameters",0,function(e,t,i,r,s=null,a=!1,n=!1,l=!1,o=!1,c=!1,h=!1,u=0){if(e.texturesEnabled&&s&&tg.ReflectionTextureEnabled){if(i.updateMatrix("reflectionMatrix",s.getReflectionTextureMatrix()),i.updateFloat2("vReflectionInfos",s.level*e.iblIntensity,u),l&&s.boundingBoxSize&&(i.updateVector3("vReflectionPosition",s.boundingBoxPosition),i.updateVector3("vReflectionSize",s.boundingBoxSize)),a){let e=s.getSize().width;i.updateFloat2("vReflectionFilteringInfo",e,Math.log2(e))}if(c&&!t.USEIRRADIANCEMAP){let e=s.sphericalPolynomial;if(t.USESPHERICALFROMREFLECTIONMAP&&e)if(t.SPHERICAL_HARMONICS){let t=e.preScaledHarmonics;i.updateVector3("vSphericalL00",t.l00),i.updateVector3("vSphericalL1_1",t.l1_1),i.updateVector3("vSphericalL10",t.l10),i.updateVector3("vSphericalL11",t.l11),i.updateVector3("vSphericalL2_2",t.l2_2),i.updateVector3("vSphericalL2_1",t.l2_1),i.updateVector3("vSphericalL20",t.l20),i.updateVector3("vSphericalL21",t.l21),i.updateVector3("vSphericalL22",t.l22)}else i.updateFloat3("vSphericalX",e.x.x,e.x.y,e.x.z),i.updateFloat3("vSphericalY",e.y.x,e.y.y,e.y.z),i.updateFloat3("vSphericalZ",e.z.x,e.z.y,e.z.z),i.updateFloat3("vSphericalXX_ZZ",e.xx.x-e.zz.x,e.xx.y-e.zz.y,e.xx.z-e.zz.z),i.updateFloat3("vSphericalYY_ZZ",e.yy.x-e.zz.x,e.yy.y-e.zz.y,e.yy.z-e.zz.z),i.updateFloat3("vSphericalZZ",e.zz.x,e.zz.y,e.zz.z),i.updateFloat3("vSphericalXY",e.xy.x,e.xy.y,e.xy.z),i.updateFloat3("vSphericalYZ",e.yz.x,e.yz.y,e.yz.z),i.updateFloat3("vSphericalZX",e.zx.x,e.zx.y,e.zx.z)}else o&&t.USEIRRADIANCEMAP&&t.USE_IRRADIANCE_DOMINANT_DIRECTION&&s.irradianceTexture&&i.updateVector3("vReflectionDominantDirection",s.irradianceTexture._dominantDirection);n&&i.updateFloat3("vReflectionMicrosurfaceInfos",s.getSize().width,s.lodGenerationScale,s.lodGenerationOffset)}h&&i.updateColor3("vReflectionColor",r)},"BindIBLSamplers",0,function(e,t,i,r=null,s=!1){if(r&&tg.ReflectionTextureEnabled){t.LODBASEDMICROSFURACE?i.setTexture("reflectionSampler",r):(i.setTexture("reflectionSampler",r._lodTextureMid||r),i.setTexture("reflectionSamplerLow",r._lodTextureLow||r),i.setTexture("reflectionSamplerHigh",r._lodTextureHigh||r)),t.USEIRRADIANCEMAP&&i.setTexture("irradianceSampler",r.irradianceTexture);let a=e.iblCdfGenerator;s&&a&&i.setTexture("icdfSampler",a.getIcdfTexture())}},"BindLights",0,function(e,t,i,r,s=4){let a=Math.min(t.lightSources.length,s);for(let s=0;s<a;s++)!function(e,t,i,r,s,a=!0){e._bindLight(t,i,r,s,a)}(t.lightSources[s],s,e,i,"boolean"==typeof r?r:r.SPECULARTERM,t.receiveShadows)},"BindLogDepth",0,function(e,t,i){if(!e||e.LOGARITHMICDEPTH||e.indexOf&&e.indexOf("LOGARITHMICDEPTH")>=0){let e=i.activeCamera;1===e.mode&&tc.Logger.Error("Logarithmic depth is not compatible with orthographic cameras!",20),t.setFloat("logarithmicDepthConstant",2/(Math.log(e.maxZ+1)/Math.LN2))}},"BindMorphTargetParameters",0,function(e,t){let i=e.morphTargetManager;e&&i&&t.setFloatArray("morphTargetInfluences",i.influences)},"BindSceneUniformBuffer",0,tb,"BindTextureMatrix",0,function(e,t,i){let r=e.getTextureMatrix();t.updateMatrix(i+"Matrix",r)},"HandleFallbacksForShadows",0,function(e,t,i=4,r=0){let s=0;for(let a=0;a<i&&e["LIGHT"+a];a++)a>0&&(s=r+a,t.addFallback(s,"LIGHT"+a)),!e.SHADOWS&&(e["SHADOW"+a]&&t.addFallback(r,"SHADOW"+a),e["SHADOWPCF"+a]&&t.addFallback(r,"SHADOWPCF"+a),e["SHADOWPCSS"+a]&&t.addFallback(r,"SHADOWPCSS"+a),e["SHADOWPOISSON"+a]&&t.addFallback(r,"SHADOWPOISSON"+a),e["SHADOWESM"+a]&&t.addFallback(r,"SHADOWESM"+a),e["SHADOWCLOSEESM"+a]&&t.addFallback(r,"SHADOWCLOSEESM"+a));return s},"PrepareAttributesForBakedVertexAnimation",0,function(e,t,i){i.BAKED_VERTEX_ANIMATION_TEXTURE&&i.INSTANCES&&e.push("bakedVertexAnimationSettingsInstanced")},"PrepareAttributesForBones",0,function(e,t,i,r){i.NUM_BONE_INFLUENCERS>0&&(r.addCPUSkinningFallback(0,t),e.push("matricesIndices"),e.push("matricesWeights"),i.NUM_BONE_INFLUENCERS>4&&(e.push("matricesIndicesExtra"),e.push("matricesWeightsExtra")))},"PrepareAttributesForInstances",0,function(e,t){(t.INSTANCES||t.THIN_INSTANCES)&&tM(e,!!t.PREPASS_VELOCITY),t.INSTANCESCOLOR&&e.push("instanceColor")},"PrepareAttributesForMorphTargets",0,tS,"PrepareDefinesAndAttributesForMorphTargets",0,function(e,t,i,r,s,a,n,l,o,c){let h=e.numMaxInfluencers||e.numInfluencers;return h<=0?0:(t.push("#define MORPHTARGETS"),e.hasPositions&&t.push("#define MORPHTARGETTEXTURE_HASPOSITIONS"),e.hasNormals&&t.push("#define MORPHTARGETTEXTURE_HASNORMALS"),e.hasTangents&&t.push("#define MORPHTARGETTEXTURE_HASTANGENTS"),e.hasUVs&&t.push("#define MORPHTARGETTEXTURE_HASUVS"),e.hasUV2s&&t.push("#define MORPHTARGETTEXTURE_HASUV2S"),e.hasColors&&t.push("#define MORPHTARGETTEXTURE_HASCOLORS"),e.supportsPositions&&s&&t.push("#define MORPHTARGETS_POSITION"),e.supportsNormals&&a&&t.push("#define MORPHTARGETS_NORMAL"),e.supportsTangents&&n&&t.push("#define MORPHTARGETS_TANGENT"),e.supportsUVs&&l&&t.push("#define MORPHTARGETS_UV"),e.supportsUV2s&&o&&t.push("#define MORPHTARGETS_UV2"),e.supportsColors&&c&&t.push("#define MORPHTARGETS_COLOR"),t.push("#define NUM_MORPH_INFLUENCERS "+h),e.isUsingTextureForTargets&&t.push("#define MORPHTARGETS_TEXTURE"),tT.NUM_MORPH_INFLUENCERS=h,tT.NORMAL=a,tT.TANGENT=n,tT.UV=l,tT.UV2=o,tT.COLOR=c,tS(i,r,tT,s),h)},"PrepareDefinesForAttributes",0,function(e,t,i,r,s=!1,a=!0,n=!0){let l,o;if(!t._areAttributesDirty&&t._needNormals===t._normals&&t._needUVs===t._uvs)return!1;t._normals=t._needNormals,t._uvs=t._needUVs,t.NORMAL=t._needNormals&&e.isVerticesDataPresent("normal"),t._needNormals&&e.isVerticesDataPresent("tangent")&&(t.TANGENT=!0);for(let i=1;i<=6;++i)t["UV"+i]=!!t._needUVs&&e.isVerticesDataPresent(`uv${1===i?"":i}`);if(i){let i=e.useVertexColors&&e.isVerticesDataPresent("color");t.VERTEXCOLOR=i,t.VERTEXALPHA=e.hasVertexAlpha&&i&&a}return e.isVerticesDataPresent("instanceColor")&&(e.hasInstances||e.hasThinInstances)&&(t.INSTANCESCOLOR=!0),r&&function(e,t){if(e.useBones&&e.computeBonesUsingShaders&&e.skeleton){t.NUM_BONE_INFLUENCERS=e.numBoneInfluencers;let i=void 0!==t.BONETEXTURE;if(e.skeleton.isUsingTextureForMatrices&&i)t.BONETEXTURE=!0;else{t.BonesPerMesh=e.skeleton.bones.length+1,t.BONETEXTURE=!i&&void 0;let r=e.getScene(),s=r.prePassRenderer;s&&s.enabled&&(t.BONES_VELOCITY_ENABLED=-1===s.excludedSkinnedMesh.indexOf(e));let a=!0===t.MULTIVIEW,n=2*t.BonesPerMesh+ +!!a;if(tP.get(e.skeleton)!==n){tP.set(e.skeleton,n);let i=r.getEngine().getCaps().maxVertexUniformVectors;if(i&&!tR.has(e.skeleton)){let r=4*t.BonesPerMesh,s=Math.max(i-(a?64:40),0);(r>s||a&&3*r>i)&&(tR.add(e.skeleton),tc.Logger.Warn(`Skeleton "${e.skeleton.name}": ${e.skeleton.bones.length} bones stored as vertex uniforms use ${r} of ~${s} usable uniform vectors${a?" (multiview)":""} on a device reporting ${i}. This can exceed the GPU vertex-uniform limit and make the mesh silently fail to render. Set skeleton.useTextureToStoreBoneMatrices = true to store bone matrices in a texture.`))}}}}else t.NUM_BONE_INFLUENCERS=0,t.BonesPerMesh=0,void 0!==t.BONETEXTURE&&(t.BONETEXTURE=!1)}(e,t),s&&((l=e.morphTargetManager)?(t.MORPHTARGETS_UV=l.supportsUVs&&t.UV1,t.MORPHTARGETS_UV2=l.supportsUV2s&&t.UV2,t.MORPHTARGETS_TANGENT=l.supportsTangents&&t.TANGENT,t.MORPHTARGETS_NORMAL=l.supportsNormals&&t.NORMAL,t.MORPHTARGETS_POSITION=l.supportsPositions,t.MORPHTARGETS_COLOR=l.supportsColors,t.MORPHTARGETTEXTURE_HASUVS=l.hasUVs,t.MORPHTARGETTEXTURE_HASUV2S=l.hasUV2s,t.MORPHTARGETTEXTURE_HASTANGENTS=l.hasTangents,t.MORPHTARGETTEXTURE_HASNORMALS=l.hasNormals,t.MORPHTARGETTEXTURE_HASPOSITIONS=l.hasPositions,t.MORPHTARGETTEXTURE_HASCOLORS=l.hasColors,t.NUM_MORPH_INFLUENCERS=l.numMaxInfluencers||l.numInfluencers,t.MORPHTARGETS=t.NUM_MORPH_INFLUENCERS>0,t.MORPHTARGETS_TEXTURE=l.isUsingTextureForTargets):(t.MORPHTARGETS_UV=!1,t.MORPHTARGETS_UV2=!1,t.MORPHTARGETS_TANGENT=!1,t.MORPHTARGETS_NORMAL=!1,t.MORPHTARGETS_POSITION=!1,t.MORPHTARGETS_COLOR=!1,t.MORPHTARGETTEXTURE_HASUVS=!1,t.MORPHTARGETTEXTURE_HASUV2S=!1,t.MORPHTARGETTEXTURE_HASTANGENTS=!1,t.MORPHTARGETTEXTURE_HASNORMALS=!1,t.MORPHTARGETTEXTURE_HASPOSITIONS=!1,t.MORPHTARGETTEXTURE_HAS_COLORS=!1,t.MORPHTARGETS=!1,t.NUM_MORPH_INFLUENCERS=0)),n&&(t.BAKED_VERTEX_ANIMATION_TEXTURE=!!(o=e.bakedVertexAnimationManager)&&!!o.isEnabled),!0},"PrepareDefinesForFrameBoundValues",0,function(e,t,i,r,s,a=null,n=!1){let l=function(e,t){let i=!1;if(e.activeCamera){let r=+!!t.CAMERA_ORTHOGRAPHIC,s=+!!t.CAMERA_PERSPECTIVE,a=+(1===e.activeCamera.mode),n=+(0===e.activeCamera.mode);(r^a||s^n)&&(t.CAMERA_ORTHOGRAPHIC=1===a,t.CAMERA_PERSPECTIVE=1===n,i=!0)}return i}(e,r);!1!==a&&(l=tE(i,e,r)),!t.getColorWrite()!==r.DEPTHPREPASS&&(r.DEPTHPREPASS=!r.DEPTHPREPASS,l=!0),r.INSTANCES!==s&&(r.INSTANCES=s,l=!0),r.THIN_INSTANCES!==n&&(r.THIN_INSTANCES=n,l=!0),l&&r.markAsUnprocessed()},"PrepareDefinesForIBL",0,function(e,t,i,r=!1,s=8,a=!1){if(t&&tg.ReflectionTextureEnabled){if(!t.isReadyOrNotBlocking())return!1;i._needNormals=!0,i.REFLECTION=!0,i.GAMMAREFLECTION=t.gammaSpace,i.RGBDREFLECTION=t.isRGBD,i.LODINREFLECTIONALPHA=t.lodLevelInAlpha,i.LINEARSPECULARREFLECTION=t.linearSpecularLOD,i.USEIRRADIANCEMAP=!1,i.LODBASEDMICROSFURACE=e.getEngine().getCaps().textureLOD;let n=e.getEngine();switch(r&&s>0?(i.NUM_SAMPLES=""+s,n._features.needTypeSuffixInShaderConstants&&(i.NUM_SAMPLES=i.NUM_SAMPLES+"u"),i.REALTIME_FILTERING=!0,e.iblCdfGenerator&&(i.IBL_CDF_FILTERING=!0)):i.REALTIME_FILTERING=!1,i.INVERTCUBICMAP=6===t.coordinatesMode,i.REFLECTIONMAP_3D=t.isCube,i.REFLECTIONMAP_OPPOSITEZ=i.REFLECTIONMAP_3D&&e.useRightHandedSystem?!t.invertZ:t.invertZ,i.REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,t.coordinatesMode){case 0:i.REFLECTIONMAP_EXPLICIT=!0;break;case 2:i.REFLECTIONMAP_PLANAR=!0;break;case 4:i.REFLECTIONMAP_PROJECTION=!0;break;case 5:i.REFLECTIONMAP_SKYBOX=!0;break;case 1:i.REFLECTIONMAP_SPHERICAL=!0;break;case 7:i.REFLECTIONMAP_EQUIRECTANGULAR=!0;break;case 8:i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!0;break;case 9:i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!0;break;default:i.REFLECTIONMAP_CUBIC=!0,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!!t.boundingBoxSize}5!==t.coordinatesMode&&(t.irradianceTexture?(i.USEIRRADIANCEMAP=!0,i.USESPHERICALFROMREFLECTIONMAP=!1,i.USESPHERICALINVERTEX=!1,t.irradianceTexture._dominantDirection?i.USE_IRRADIANCE_DOMINANT_DIRECTION=!0:i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1):t.isCube&&(i.USESPHERICALFROMREFLECTIONMAP=!0,i.USEIRRADIANCEMAP=!1,i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,i.USESPHERICALINVERTEX=a))}else i.REFLECTION=!1,i.REFLECTIONMAP_3D=!1,i.REFLECTIONMAP_SPHERICAL=!1,i.REFLECTIONMAP_PLANAR=!1,i.REFLECTIONMAP_CUBIC=!1,i.USE_LOCAL_REFLECTIONMAP_CUBIC=!1,i.REFLECTIONMAP_PROJECTION=!1,i.REFLECTIONMAP_SKYBOX=!1,i.REFLECTIONMAP_EXPLICIT=!1,i.REFLECTIONMAP_EQUIRECTANGULAR=!1,i.REFLECTIONMAP_EQUIRECTANGULAR_FIXED=!1,i.REFLECTIONMAP_MIRROREDEQUIRECTANGULAR_FIXED=!1,i.INVERTCUBICMAP=!1,i.USESPHERICALFROMREFLECTIONMAP=!1,i.USEIRRADIANCEMAP=!1,i.USE_IRRADIANCE_DOMINANT_DIRECTION=!1,i.USESPHERICALINVERTEX=!1,i.REFLECTIONMAP_OPPOSITEZ=!1,i.LODINREFLECTIONALPHA=!1,i.GAMMAREFLECTION=!1,i.RGBDREFLECTION=!1,i.LINEARSPECULARREFLECTION=!1;return!0},"PrepareDefinesForLights",0,function(e,t,i,r,s=4,a=!1){var n,l,o,c;let h;if(!i._areLightsDirty)return i._needNormals;let u=s;n=s,s=null==(h=e.getEngine().getCaps().maxUniformBuffersPerShaderStage)?n:Math.min(n,Math.max(h-4,1));let d=0,_={needNormals:i._needNormals,needRebuild:!1,lightmapMode:!1,shadowEnabled:!1,specularEnabled:!1};if(e.lightsEnabled&&!a){let a;for(let n of(t.lightSources.length>s&&s<u&&(l=e.getEngine(),o=s,c=Math.min(t.lightSources.length,u),(a=tI.get(l))||(a=new Set,tI.set(l,a)),a.has(c)||(a.add(c),tc.Logger.Warn(`maxSimultaneousLights is ${u} but this engine supports at most ${o} simultaneous lights. Each light declares its own uniform buffer in the vertex shader, so the ${c} lights affecting this mesh plus the scene, mesh, material and leftover buffers would need ${c+4} uniform buffers, over the device limit of ${l.getCaps().maxUniformBuffersPerShaderStage} per shader stage. The light count has been clamped to ${o}, so the extra lights will not contribute to the render. Set maxSimultaneousLights to ${o} or less to silence this warning.`))),t.lightSources))if(function(e,t,i,r,s,a,n){switch(n.needNormals=!0,void 0===s["LIGHT"+r]&&(n.needRebuild=!0),s["LIGHT"+r]=!0,s["SPOTLIGHT"+r]=!1,s["HEMILIGHT"+r]=!1,s["POINTLIGHT"+r]=!1,s["DIRLIGHT"+r]=!1,s["AREALIGHT"+r]=!1,s["CLUSTLIGHT"+r]=!1,i.prepareLightSpecificDefines(s,r),s["LIGHT_FALLOFF_PHYSICAL"+r]=!1,s["LIGHT_FALLOFF_GLTF"+r]=!1,s["LIGHT_FALLOFF_STANDARD"+r]=!1,i.falloffType){case t_.LightConstants.FALLOFF_GLTF:s["LIGHT_FALLOFF_GLTF"+r]=!0;break;case t_.LightConstants.FALLOFF_PHYSICAL:s["LIGHT_FALLOFF_PHYSICAL"+r]=!0;break;case t_.LightConstants.FALLOFF_STANDARD:s["LIGHT_FALLOFF_STANDARD"+r]=!0}if(a&&!i.specular.equalsFloats(0,0,0)&&(n.specularEnabled=!0),s["SHADOW"+r]=!1,s["SHADOWCSM"+r]=!1,s["SHADOWCSMDEBUG"+r]=!1,s["SHADOWCSMNUM_CASCADES"+r]=!1,s["SHADOWCSMUSESHADOWMAXZ"+r]=!1,s["SHADOWCSMNOBLEND"+r]=!1,s["SHADOWCSM_RIGHTHANDED"+r]=!1,s["SHADOWPCF"+r]=!1,s["SHADOWPCSS"+r]=!1,s["SHADOWPOISSON"+r]=!1,s["SHADOWESM"+r]=!1,s["SHADOWCLOSEESM"+r]=!1,s["SHADOWCUBE"+r]=!1,s["SHADOWLOWQUALITY"+r]=!1,s["SHADOWMEDIUMQUALITY"+r]=!1,t&&t.receiveShadows&&e.shadowsEnabled&&i.shadowEnabled){let t=i.getShadowGenerator(e.activeCamera)??i.getShadowGenerator();if(t){let e=t.getShadowMap();e&&e.renderList&&e.renderList.length>0&&(n.shadowEnabled=!0,t.prepareDefines(s,r))}}i.lightmapMode!=t_.LightConstants.LIGHTMAP_DEFAULT?(n.lightmapMode=!0,s["LIGHTMAPEXCLUDED"+r]=!0,s["LIGHTMAPNOSPECULAR"+r]=i.lightmapMode==t_.LightConstants.LIGHTMAP_SHADOWSONLY):(s["LIGHTMAPEXCLUDED"+r]=!1,s["LIGHTMAPNOSPECULAR"+r]=!1)}(e,t,n,d,i,r,_),++d===s)break}i.SPECULARTERM=_.specularEnabled,i.SHADOWS=_.shadowEnabled;let p=Math.max(s,i.MAXLIGHTCOUNT||0);for(let e=d;e<p;e++)void 0!==i["LIGHT"+e]&&(i["LIGHT"+e]=!1,i["HEMILIGHT"+e]=!1,i["POINTLIGHT"+e]=!1,i["DIRLIGHT"+e]=!1,i["SPOTLIGHT"+e]=!1,i["AREALIGHT"+e]=!1,i["CLUSTLIGHT"+e]=!1,i["SHADOW"+e]=!1,i["SHADOWCSM"+e]=!1,i["SHADOWCSMDEBUG"+e]=!1,i["SHADOWCSMNUM_CASCADES"+e]=!1,i["SHADOWCSMUSESHADOWMAXZ"+e]=!1,i["SHADOWCSMNOBLEND"+e]=!1,i["SHADOWCSM_RIGHTHANDED"+e]=!1,i["SHADOWPCF"+e]=!1,i["SHADOWPCSS"+e]=!1,i["SHADOWPOISSON"+e]=!1,i["SHADOWESM"+e]=!1,i["SHADOWCLOSEESM"+e]=!1,i["SHADOWCUBE"+e]=!1,i["SHADOWLOWQUALITY"+e]=!1,i["SHADOWMEDIUMQUALITY"+e]=!1);i.LIGHTCOUNT=d,i.MAXLIGHTCOUNT=s;let E=e.getEngine().getCaps();return void 0===i.SHADOWFLOAT&&(_.needRebuild=!0),i.SHADOWFLOAT=_.shadowEnabled&&(E.textureFloatRender&&E.textureFloatLinearFiltering||E.textureHalfFloatRender&&E.textureHalfFloatLinearFiltering),i.LIGHTMAPEXCLUDED=_.lightmapMode,_.needRebuild&&i.rebuild(),_.needNormals},"PrepareDefinesForMergedUV",0,function(e,t,i){t._needUVs=!0,t[i]=!0,e.optimizeUVAllocation&&e.getTextureMatrix().isIdentityAs3x2()?(t[i+"DIRECTUV"]=e.coordinatesIndex+1,t["MAINUV"+(e.coordinatesIndex+1)]=!0):t[i+"DIRECTUV"]=0},"PrepareDefinesForMisc",0,function(e,t,i,r,s,a,n,l=!1,o=!1,c,h){if(n._areMiscDirty){n.LOGARITHMICDEPTH=i,n.POINTSIZE=r,n.FOG=s&&t.fogEnabled&&e.applyFog&&0!==t.fogMode,n.NONUNIFORMSCALING=e.nonUniformScaling,n.ALPHATEST=a,n.DECAL_AFTER_DETAIL=l,n.USE_VERTEX_PULLING=o,n.RIGHT_HANDED=t.useRightHandedSystem;let u=c?.geometry?.getIndexBuffer(),d=!!c&&c.isUnIndexed;n.VERTEX_PULLING_USE_INDEX_BUFFER=!!u&&!d,n.VERTEX_PULLING_INDEX_BUFFER_32BITS=!!u&&!d&&u.is32Bits,n.VERTEXOUTPUT_INVARIANT=!!h}},"PrepareDefinesForMultiview",0,function(e,t){if(e.activeCamera){let i=t.MULTIVIEW;t.MULTIVIEW=null!==e.activeCamera.outputRenderTarget&&e.activeCamera.outputRenderTarget.getViewCount()>1,t.MULTIVIEW!=i&&t.markAsUnprocessed()}},"PrepareDefinesForOIT",0,function(e,t,i){let r=t.ORDER_INDEPENDENT_TRANSPARENCY,s=t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS;t.ORDER_INDEPENDENT_TRANSPARENCY=e.useOrderIndependentTransparency&&i,t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS=!e.getEngine().getCaps().textureFloatLinearFiltering,(r!==t.ORDER_INDEPENDENT_TRANSPARENCY||s!==t.ORDER_INDEPENDENT_TRANSPARENCY_16BITS)&&t.markAsUnprocessed()},"PrepareDefinesForPrePass",0,function(e,t,i){let r=t.PREPASS;if(!t._arePrePassDirty)return;let s=[{type:1,define:"PREPASS_POSITION",index:"PREPASS_POSITION_INDEX"},{type:9,define:"PREPASS_LOCAL_POSITION",index:"PREPASS_LOCAL_POSITION_INDEX"},{type:2,define:"PREPASS_VELOCITY",index:"PREPASS_VELOCITY_INDEX"},{type:11,define:"PREPASS_VELOCITY_LINEAR",index:"PREPASS_VELOCITY_LINEAR_INDEX"},{type:3,define:"PREPASS_REFLECTIVITY",index:"PREPASS_REFLECTIVITY_INDEX"},{type:0,define:"PREPASS_IRRADIANCE_LEGACY",index:"PREPASS_IRRADIANCE_LEGACY_INDEX"},{type:7,define:"PREPASS_ALBEDO_SQRT",index:"PREPASS_ALBEDO_SQRT_INDEX"},{type:5,define:"PREPASS_DEPTH",index:"PREPASS_DEPTH_INDEX"},{type:10,define:"PREPASS_SCREENSPACE_DEPTH",index:"PREPASS_SCREENSPACE_DEPTH_INDEX"},{type:6,define:"PREPASS_NORMAL",index:"PREPASS_NORMAL_INDEX"},{type:8,define:"PREPASS_WORLD_NORMAL",index:"PREPASS_WORLD_NORMAL_INDEX"},{type:14,define:"PREPASS_IRRADIANCE",index:"PREPASS_IRRADIANCE_INDEX"}];if(e.prePassRenderer&&e.prePassRenderer.enabled&&i){t.PREPASS=!0,t.SCENE_MRT_COUNT=e.prePassRenderer.mrtCount,t.PREPASS_NORMAL_WORLDSPACE=e.prePassRenderer.generateNormalsInWorldSpace,t.PREPASS_COLOR=!0,t.PREPASS_COLOR_INDEX=0;for(let i=0;i<s.length;i++){let r=e.prePassRenderer.getIndex(s[i].type);-1!==r?(t[s[i].define]=!0,t[s[i].index]=r):t[s[i].define]=!1}}else{t.PREPASS=!1;for(let e=0;e<s.length;e++)t[s[e].define]=!1}t.PREPASS!=r&&(t.markAsUnprocessed(),t.markAsImageProcessingDirty())},"PrepareUniformLayoutForIBL",0,function(e,t=!1,i=!1,r=!1,s=!1,a=!1){e.addUniform("vReflectionInfos",2),e.addUniform("reflectionMatrix",16),t&&e.addUniform("vReflectionMicrosurfaceInfos",3),i&&(e.addUniform("vReflectionPosition",3),e.addUniform("vReflectionSize",3)),r&&(e.addUniform("vReflectionFilteringInfo",2),e.addUniform("vReflectionDominantDirection",3)),a&&e.addUniform("vReflectionColor",3),s&&(e.addUniform("vSphericalL00",3),e.addUniform("vSphericalL1_1",3),e.addUniform("vSphericalL10",3),e.addUniform("vSphericalL11",3),e.addUniform("vSphericalL2_2",3),e.addUniform("vSphericalL2_1",3),e.addUniform("vSphericalL20",3),e.addUniform("vSphericalL21",3),e.addUniform("vSphericalL22",3),e.addUniform("vSphericalX",3),e.addUniform("vSphericalY",3),e.addUniform("vSphericalZ",3),e.addUniform("vSphericalXX_ZZ",3),e.addUniform("vSphericalYY_ZZ",3),e.addUniform("vSphericalZZ",3),e.addUniform("vSphericalXY",3),e.addUniform("vSphericalYZ",3),e.addUniform("vSphericalZX",3))},"PrepareUniformsAndSamplersForIBL",0,function(e,t,i){let r=["vReflectionMicrosurfaceInfos","vReflectionDominantDirection","reflectionMatrix","vReflectionInfos","vReflectionPosition","vReflectionSize","vReflectionColor","vReflectionFilteringInfo"];i&&r.push("vSphericalX","vSphericalY","vSphericalZ","vSphericalXX_ZZ","vSphericalYY_ZZ","vSphericalZZ","vSphericalXY","vSphericalYZ","vSphericalZX","vSphericalL00","vSphericalL1_1","vSphericalL10","vSphericalL11","vSphericalL2_2","vSphericalL2_1","vSphericalL20","vSphericalL21","vSphericalL22"),e.push(...r),t.push("reflectionSampler","reflectionSamplerLow","reflectionSamplerHigh","irradianceSampler","icdfSampler")},"PrepareUniformsAndSamplersList",0,function(e,t,i,r=4){let s,a,n=null;e.uniformsNames?(s=e.uniformsNames,a=e.uniformBuffersNames,t=e.samplers,i=e.defines,r=e.maxSimultaneousLights||0,n=e.shaderLanguage??null):(s=e,t||(t=[]));for(let e=0;e<r&&i["LIGHT"+e];e++)!function(e,t,i,r,s=null,a=!1,n=!1,l=!1,o=!1,c=!1){s&&s.push("Light"+e),!a&&(t.push("vLightData"+e,"vLightDiffuse"+e,"vLightSpecular"+e,"vLightDirection"+e,"vLightWidth"+e,"vLightHeight"+e,"vLightFalloff"+e,"vLightGround"+e,"vSliceData"+e,"vSliceRanges"+e,"lightMatrix"+e,"shadowsInfo"+e,"depthValues"+e),i.push("shadowTexture"+e),i.push("depthTexture"+e),t.push("viewFrustumZ"+e,"cascadeBlendFactor"+e,"lightSizeUVCorrection"+e,"depthCorrection"+e,"penumbraDarkness"+e,"frustumLengths"+e),r&&(i.push("projectionLightTexture"+e),t.push("textureProjectionMatrix"+e)),n&&i.push("iesLightTexture"+e),o&&i.push("rectAreaLightEmissionTexture"+e),l&&(i.push("lightDataTexture"+e),c||i.push("tileMaskTexture"+e)))}(e,s,t,i["PROJECTEDLIGHTTEXTURE"+e],a,!1,i["IESLIGHTTEXTURE"+e],i["CLUSTLIGHT"+e],i["RECTAREALIGHTEMISSIONTEXTURE"+e],1===n);i.NUM_MORPH_INFLUENCERS&&(s.push("morphTargetInfluences"),s.push("morphTargetCount")),i.BAKED_VERTEX_ANIMATION_TEXTURE&&(s.push("bakedVertexAnimationSettings"),s.push("bakedVertexAnimationTextureSizeInverted"),s.push("bakedVertexAnimationTime"),t.push("bakedVertexAnimationTexture"))},"PushAttributesForInstances",0,tM],26053);var tD=e.i(97830);let tx=(j=[],q=[],Q=[],$=[],K=[],J=[],ee=[],et=[],ei=[],er=[],es=[],ea=[],en=[],el=[],eo=[],ec=[],eh=[],eu=[],ed=[],e_=[],ep=[],eE=[],em=[],ef=[],eg=[],eA=[],eT=[],eS=[],eM=[],eb=[],eI=[],eP=[],eR=[],eD=[],ex=[],eC=[],eO=[],eL=[],ey=[],eF=[],ev=[],eN=[],ek=[],eB=[],eU=[],eH=[],eW=[],eV=[],ez=[],ew=[],eG=[],ej=class{get useVertexPulling(){return this._useVertexPulling}set useVertexPulling(e){this._useVertexPulling!==e&&(this._useVertexPulling=e,this.markAsDirty(ej.MiscDirtyFlag))}get _supportGlowLayer(){return!1}set _glowModeEnabled(e){}get shaderLanguage(){return this._shaderLanguage}get canRenderToMRT(){return!1}set alpha(e){if(this._alpha===e)return;let t=this._alpha;this._alpha=e,(1===t||1===e)&&this.markAsDirty(ej.MiscDirtyFlag+ej.PrePassDirtyFlag)}get alpha(){return this._alpha}set backFaceCulling(e){this._backFaceCulling!==e&&(this._backFaceCulling=e,this.markAsDirty(ej.TextureDirtyFlag))}get backFaceCulling(){return this._backFaceCulling}set textureRepetitionMode(e){let t=Math.max(0,Math.min(0|e,4));this._textureRepetitionMode!==t&&(this._textureRepetitionMode=t,this.markAsDirty(ej.TextureDirtyFlag))}get textureRepetitionMode(){return this._textureRepetitionMode}set cullBackFaces(e){this._cullBackFaces!==e&&(this._cullBackFaces=e,this.markAsDirty(ej.TextureDirtyFlag))}get cullBackFaces(){return this._cullBackFaces}get blockDirtyMechanism(){return this._blockDirtyMechanism}set blockDirtyMechanism(e){this._blockDirtyMechanism!==e&&(this._blockDirtyMechanism=e,e||this.markDirty())}atomicMaterialsUpdate(e){this.blockDirtyMechanism=!0;try{e(this)}finally{this.blockDirtyMechanism=!1}}get hasRenderTargetTextures(){return this._eventInfo.hasRenderTargetTextures=!1,this._callbackPluginEventHasRenderTargetTextures(this._eventInfo),this._eventInfo.hasRenderTargetTextures}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get onBindObservable(){return this._onBindObservable||(this._onBindObservable=new eJ.Observable),this._onBindObservable}set onBind(e){this._onBindObserver&&this.onBindObservable.remove(this._onBindObserver),this._onBindObserver=this.onBindObservable.add(e)}get onUnBindObservable(){return this._onUnBindObservable||(this._onUnBindObservable=new eJ.Observable),this._onUnBindObservable}get onEffectCreatedObservable(){return this._onEffectCreatedObservable||(this._onEffectCreatedObservable=new eJ.Observable),this._onEffectCreatedObservable}set alphaMode(e){this._alphaMode[0]!==e&&(this._alphaMode[0]=e,this.markAsDirty(ej.TextureDirtyFlag))}get alphaMode(){return this._alphaMode[0]}get alphaModes(){return this._alphaMode}setAlphaMode(e,t=0){this._alphaMode[t]!==e&&(this._alphaMode[t]=e,this.markAsDirty(ej.TextureDirtyFlag))}set needDepthPrePass(e){this._needDepthPrePass!==e&&(this._needDepthPrePass=e,this._needDepthPrePass&&(this.checkReadyOnEveryCall=!0))}get needDepthPrePass(){return this._needDepthPrePass}get isPrePassCapable(){return!1}set fogEnabled(e){this._fogEnabled!==e&&(this._fogEnabled=e,this.markAsDirty(ej.MiscDirtyFlag))}get fogEnabled(){return this._fogEnabled}get wireframe(){switch(this._fillMode){case ej.WireFrameFillMode:case ej.LineListDrawMode:case ej.LineLoopDrawMode:case ej.LineStripDrawMode:return!0}return this._scene.forceWireframe}set wireframe(e){this.fillMode=e?ej.WireFrameFillMode:ej.TriangleFillMode}get pointsCloud(){switch(this._fillMode){case ej.PointFillMode:case ej.PointListDrawMode:return!0}return this._scene.forcePointsCloud}set pointsCloud(e){this.fillMode=e?ej.PointFillMode:ej.TriangleFillMode}get fillMode(){return this._fillMode}set fillMode(e){this._fillMode!==e&&(this._fillMode=e,this.markAsDirty(ej.MiscDirtyFlag))}get useLogarithmicDepth(){return this._useLogarithmicDepth}set useLogarithmicDepth(e){let t=this.getScene().getEngine().getCaps().fragmentDepthSupported;e&&!t&&tc.Logger.Warn("Logarithmic depth has been requested for a material on a device that doesn't support it."),this._useLogarithmicDepth=e&&t,this._markAllSubMeshesAsMiscDirty()}get isVertexOutputInvariant(){return this._isVertexOutputInvariant}set isVertexOutputInvariant(e){this._isVertexOutputInvariant!==e&&(this._isVertexOutputInvariant=e,this._markAllSubMeshesAsMiscDirty())}_getDrawWrapper(){return this._drawWrapper}_setDrawWrapper(e){this._drawWrapper=e}constructor(e,t,i,r=!1){this.customShaderNameResolve=(0,eQ.__runInitializers)(this,j),this.shadowDepthWrapper=null,this.allowShaderHotSwapping=!0,this._shaderLanguage=0,this._forceGLSL=!1,this._useVertexPulling=!1,this.id=(0,eQ.__runInitializers)(this,q,void 0),this.uniqueId=((0,eQ.__runInitializers)(this,Q),(0,eQ.__runInitializers)(this,$,void 0)),this._loadedUniqueId=(0,eQ.__runInitializers)(this,K),this.name=(0,eQ.__runInitializers)(this,J,void 0),this.metadata=((0,eQ.__runInitializers)(this,ee),(0,eQ.__runInitializers)(this,et,null)),this._internalMetadata=(0,eQ.__runInitializers)(this,ei),this.reservedDataStore=null,this.checkReadyOnEveryCall=(0,eQ.__runInitializers)(this,er,!1),this.checkReadyOnlyOnce=((0,eQ.__runInitializers)(this,es),(0,eQ.__runInitializers)(this,ea,!1)),this.state=((0,eQ.__runInitializers)(this,en),(0,eQ.__runInitializers)(this,el,"")),this._alpha=((0,eQ.__runInitializers)(this,eo),(0,eQ.__runInitializers)(this,ec,1)),this.inspectableCustomProperties=(0,eQ.__runInitializers)(this,eh),this._backFaceCulling=(0,eQ.__runInitializers)(this,eu,!0),this._textureRepetitionMode=((0,eQ.__runInitializers)(this,ed),(0,eQ.__runInitializers)(this,e_,0)),this.textureRepetitionHexTilingParams=((0,eQ.__runInitializers)(this,ep),(0,eQ.__runInitializers)(this,eE,[1,.6,7,.5])),this._cullBackFaces=((0,eQ.__runInitializers)(this,em),(0,eQ.__runInitializers)(this,ef,!0)),this._blockDirtyMechanism=((0,eQ.__runInitializers)(this,eg),!1),this.sideOrientation=(0,eQ.__runInitializers)(this,eA,null),this.onCompiled=((0,eQ.__runInitializers)(this,eT),null),this.onError=null,this.getRenderTargetTextures=null,this.doNotSerialize=!1,this._storeEffectOnSubMeshes=!1,this.animations=null,this.onDisposeObservable=new eJ.Observable,this._onDisposeObserver=null,this._onUnBindObservable=null,this._onBindObserver=null,this._alphaMode=(0,eQ.__runInitializers)(this,eS,[2]),this._needDepthPrePass=((0,eQ.__runInitializers)(this,eM),(0,eQ.__runInitializers)(this,eb,!1)),this.disableDepthWrite=((0,eQ.__runInitializers)(this,eI),(0,eQ.__runInitializers)(this,eP,!1)),this.disableColorWrite=((0,eQ.__runInitializers)(this,eR),(0,eQ.__runInitializers)(this,eD,!1)),this.forceDepthWrite=((0,eQ.__runInitializers)(this,ex),(0,eQ.__runInitializers)(this,eC,!1)),this.depthFunction=((0,eQ.__runInitializers)(this,eO),(0,eQ.__runInitializers)(this,eL,0)),this.separateCullingPass=((0,eQ.__runInitializers)(this,ey),(0,eQ.__runInitializers)(this,eF,!1)),this._fogEnabled=((0,eQ.__runInitializers)(this,ev),(0,eQ.__runInitializers)(this,eN,!0)),this.pointSize=((0,eQ.__runInitializers)(this,ek),(0,eQ.__runInitializers)(this,eB,1)),this.zOffset=((0,eQ.__runInitializers)(this,eU),(0,eQ.__runInitializers)(this,eH,0)),this.zOffsetUnits=((0,eQ.__runInitializers)(this,eW),(0,eQ.__runInitializers)(this,eV,0)),this.clipPlane=(0,eQ.__runInitializers)(this,ez),this.stencil=new td,this._isVertexOutputInvariant=(0,eQ.__runInitializers)(this,ew,ej.ForceVertexOutputInvariant),this._materialContext=(0,eQ.__runInitializers)(this,eG),this._useUBO=!1,this._fillMode=ej.TriangleFillMode,this._cachedDepthWriteState=!1,this._cachedColorWriteState=!1,this._cachedDepthFunctionState=0,this._indexInSceneMaterialArray=-1,this.meshMap=null,this._parentContainer=null,this._uniformBufferLayoutBuilt=!1,this._eventInfo={},this._callbackPluginEventGeneric=()=>void 0,this._callbackPluginEventIsReadyForSubMesh=()=>void 0,this._callbackPluginEventPrepareDefines=()=>void 0,this._callbackPluginEventPrepareDefinesBeforeAttributes=()=>void 0,this._callbackPluginEventHardBindForSubMesh=()=>void 0,this._callbackPluginEventBindForSubMesh=()=>void 0,this._callbackPluginEventHasRenderTargetTextures=()=>void 0,this._callbackPluginEventFillRenderTargetTextures=()=>void 0,this._transparencyMode=null,this.name=e;const s=t||e0.EngineStore.LastCreatedScene;if(!s)return;this._scene=s,this._dirtyCallbacks={},this._forceGLSL=r,this._dirtyCallbacks[1]=this._markAllSubMeshesAsTexturesDirty.bind(this),this._dirtyCallbacks[2]=this._markAllSubMeshesAsLightsDirty.bind(this),this._dirtyCallbacks[4]=this._markAllSubMeshesAsFresnelDirty.bind(this),this._dirtyCallbacks[8]=this._markAllSubMeshesAsAttributesDirty.bind(this),this._dirtyCallbacks[16]=this._markAllSubMeshesAsMiscDirty.bind(this),this._dirtyCallbacks[32]=this._markAllSubMeshesAsPrePassDirty.bind(this),this._dirtyCallbacks[127]=this._markAllSubMeshesAsAllDirty.bind(this),this.id=e||eK.Tools.RandomId(),this.uniqueId=this._scene.getUniqueId(),this._materialContext=this._scene.getEngine().createMaterialContext(),this._drawWrapper=new ta.DrawWrapper(this._scene.getEngine(),!1),this._drawWrapper.materialContext=this._materialContext,this._uniformBuffer=new to.UniformBuffer(this._scene.getEngine(),void 0,void 0,e),this._useUBO=this.getScene().getEngine().supportsUniformBuffers,this._createUniformBuffer(),i||this._scene.addMaterial(this),this._scene.useMaterialMeshMap&&(this.meshMap={}),ej.OnEventObservable.notifyObservers(this,1)}_createUniformBuffer(){let e=this.getScene().getEngine();this._uniformBuffer?.dispose(),e.isWebGPU&&!this._forceGLSL?(this._uniformBuffer=new to.UniformBuffer(e,void 0,void 0,this.name,!0),this._shaderLanguage=1):this._uniformBuffer=new to.UniformBuffer(this._scene.getEngine(),void 0,void 0,this.name),this._uniformBufferLayoutBuilt=!1}toString(e){return"Name: "+this.name}getClassName(){return"Material"}get _isMaterial(){return!0}get isFrozen(){return this.checkReadyOnlyOnce}freeze(){this.markDirty(),this.checkReadyOnlyOnce=!0}unfreeze(){this.markDirty(),this.checkReadyOnlyOnce=!1}isReady(e,t){return!0}isReadyForSubMesh(e,t,i){let r=t.materialDefines;return!!r&&(this._eventInfo.isReadyForSubMesh=!0,this._eventInfo.defines=r,this._callbackPluginEventIsReadyForSubMesh(this._eventInfo),this._eventInfo.isReadyForSubMesh)}getEffect(){return this._drawWrapper.effect}getScene(){return this._scene}_getEffectiveOrientation(e){return null!==this.sideOrientation?this.sideOrientation:e.sideOrientation}get transparencyMode(){return this._transparencyMode}set transparencyMode(e){this._transparencyMode!==e&&(this._transparencyMode=e,this._markAllSubMeshesAsTexturesAndMiscDirty())}get _hasTransparencyMode(){return null!=this._transparencyMode}get _transparencyModeIsBlend(){return this._transparencyMode===ej.MATERIAL_ALPHABLEND||this._transparencyMode===ej.MATERIAL_ALPHATESTANDBLEND}get _transparencyModeIsTest(){return this._transparencyMode===ej.MATERIAL_ALPHATEST||this._transparencyMode===ej.MATERIAL_ALPHATESTANDBLEND}get _disableAlphaBlending(){return this._transparencyMode===ej.MATERIAL_OPAQUE||this._transparencyMode===ej.MATERIAL_ALPHATEST}needAlphaBlending(){return this._hasTransparencyMode?this._transparencyModeIsBlend:!this._disableAlphaBlending&&this.alpha<1}needAlphaBlendingForMesh(e){return this._hasTransparencyMode?this._transparencyModeIsBlend:e.visibility<1||!this._disableAlphaBlending&&(e.hasVertexAlpha||this.needAlphaBlending())}needAlphaTesting(){return!!this._hasTransparencyMode&&this._transparencyModeIsTest}needAlphaTestingForMesh(e){return this._hasTransparencyMode?this._transparencyModeIsTest:!this.needAlphaBlendingForMesh(e)&&this.needAlphaTesting()}getAlphaTestTexture(){return null}markDirty(e=!1){for(let t of this.getScene().meshes)if(t.subMeshes){for(let i of t.subMeshes)if(i.getMaterial()===this)for(let t of i._drawWrappers)t&&this._materialContext===t.materialContext&&(t._wasPreviouslyReady=!1,t._wasPreviouslyUsingInstances=null,t._forceRebindOnNextCall=e)}e&&this.markAsDirty(ej.AllDirtyFlag)}_preBind(e,t=null){let i=this._scene.getEngine(),r=(null==t?this.sideOrientation:t)===ej.ClockWiseSideOrientation,s=e||this._getDrawWrapper();return(0,tD.IsWrapper)(s)&&s.materialContext&&(s.materialContext.useVertexPulling=this.useVertexPulling),i.enableEffect(s),i.setState(this.backFaceCulling,this.zOffset,!1,r,this._scene._mirroredCameraPosition?!this.cullBackFaces:this.cullBackFaces,this.stencil,this.zOffsetUnits),r}bind(e,t){}buildUniformLayout(){let e=this._uniformBuffer;this._eventInfo.ubo=e,this._callbackPluginEventGeneric(8,this._eventInfo),e.create(),this._uniformBufferLayoutBuilt=!0}bindForSubMesh(e,t,i){let r=i._drawWrapper;this._eventInfo.subMesh=i,this._callbackPluginEventBindForSubMesh(this._eventInfo),r._forceRebindOnNextCall=!1}bindOnlyWorldMatrix(e){}bindView(e){this._useUBO?this._needToBindSceneUbo=!0:e.setMatrix("view",this.getScene().getViewMatrix())}bindViewProjection(e){this._useUBO?this._needToBindSceneUbo=!0:(e.setMatrix("viewProjection",this.getScene().getTransformMatrix()),e.setMatrix("projection",this.getScene().getProjectionMatrix()),e.setMatrix("inverseProjection",this.getScene().getInverseProjectionMatrix()))}bindEyePosition(e,t){this._useUBO?this._needToBindSceneUbo=!0:this._scene.bindEyePosition(e,t)}_afterBind(e,t=null,i){if(this._scene._cachedMaterial=this,this._needToBindSceneUbo&&t&&(this._needToBindSceneUbo=!1,tb(t,this.getScene().getSceneUniformBuffer()),this._scene.finalizeSceneUbo()),e?this._scene._cachedVisibility=e.visibility:this._scene._cachedVisibility=1,this._onBindObservable&&e&&this._onBindObservable.notifyObservers(e),this.disableDepthWrite){let e=this._scene.getEngine();this._cachedDepthWriteState=e.getDepthWrite(),e.setDepthWrite(!1)}if(this.disableColorWrite){let e=this._scene.getEngine();this._cachedColorWriteState=e.getColorWrite(),e.setColorWrite(!1)}if(0!==this.depthFunction){let e=this._scene.getEngine();this._cachedDepthFunctionState=e.getDepthFunction()||0,e.setDepthFunction(this.depthFunction)}}unbind(){this._scene.getSceneUniformBuffer().unbindEffect(),this._onUnBindObservable&&this._onUnBindObservable.notifyObservers(this),0!==this.depthFunction&&this._scene.getEngine().setDepthFunction(this._cachedDepthFunctionState),this.disableDepthWrite&&this._scene.getEngine().setDepthWrite(this._cachedDepthWriteState),this.disableColorWrite&&this._scene.getEngine().setColorWrite(this._cachedColorWriteState)}getAnimatables(){return this._eventInfo.animatables=[],this._callbackPluginEventGeneric(256,this._eventInfo),this._eventInfo.animatables}getActiveTextures(){return this._eventInfo.activeTextures=[],this._callbackPluginEventGeneric(512,this._eventInfo),this._eventInfo.activeTextures}hasTexture(e){return this._eventInfo.hasTexture=!1,this._eventInfo.texture=e,this._callbackPluginEventGeneric(1024,this._eventInfo),this._eventInfo.hasTexture}clone(e){return null}_clonePlugins(e,t){let i={};if(this._serializePlugins(i),ej._ParsePlugins(i,e,this._scene,t),this.pluginManager)for(let t of this.pluginManager._plugins){let i=e.pluginManager.getPlugin(t.name);i&&t.copyTo(i)}}getBindedMeshes(){if(!this.meshMap)return this._scene.meshes.filter(e=>e.material===this);{let e=[];for(let t in this.meshMap){let i=this.meshMap[t];i&&e.push(i)}return e}}forceCompilation(e,t,i,r){let s={clipPlane:!1,useInstances:!1,...i},a=this.getScene(),n=this.allowShaderHotSwapping;this.allowShaderHotSwapping=!1;let l=()=>{if(!this._scene||!this._scene.getEngine())return;let i=a.clipPlane;if(s.clipPlane&&(a.clipPlane=new th.Plane(0,0,0,1)),this._storeEffectOnSubMeshes){let i=!0,a=null;if(e.subMeshes){let t=new tl(0,0,0,0,0,e,void 0,!1,!1);t.materialDefines&&(t.materialDefines._renderId=-1),this.isReadyForSubMesh(e,t,s.useInstances)||(t.effect&&t.effect.getCompilationError()&&t.effect.allFallbacksProcessed()?a=t.effect.getCompilationError():(i=!1,setTimeout(l,16)))}i&&(this.allowShaderHotSwapping=n,a&&r&&r(a),t&&t(this))}else this.isReady()?(this.allowShaderHotSwapping=n,t&&t(this)):setTimeout(l,16);s.clipPlane&&(a.clipPlane=i)};l()}async forceCompilationAsync(e,t){return await new Promise((i,r)=>{this.forceCompilation(e,()=>{i()},t,e=>{r(e)})})}markAsDirty(e){this.getScene().blockMaterialDirtyMechanism||this._blockDirtyMechanism||(ej._DirtyCallbackArray.length=0,e&ej.ImageProcessingDirtyFlag&&ej._DirtyCallbackArray.push(ej._ImageProcessingDirtyCallBack),e&ej.TextureDirtyFlag&&ej._DirtyCallbackArray.push(ej._TextureDirtyCallBack),e&ej.LightDirtyFlag&&ej._DirtyCallbackArray.push(ej._LightsDirtyCallBack),e&ej.FresnelDirtyFlag&&ej._DirtyCallbackArray.push(ej._FresnelDirtyCallBack),e&ej.AttributesDirtyFlag&&ej._DirtyCallbackArray.push(ej._AttributeDirtyCallBack),e&ej.MiscDirtyFlag&&ej._DirtyCallbackArray.push(ej._MiscDirtyCallBack),e&ej.PrePassDirtyFlag&&ej._DirtyCallbackArray.push(ej._PrePassDirtyCallBack),ej._DirtyCallbackArray.length&&this._markAllSubMeshesAsDirty(ej._RunDirtyCallBacks),this.getScene().resetCachedMaterial())}resetDrawCache(){for(let e of this.getScene().meshes)if(e.subMeshes)for(let t of e.subMeshes)t.getMaterial()===this&&t.resetDrawCache()}_markAllSubMeshesAsDirty(e){let t=this.getScene();if(!t.blockMaterialDirtyMechanism&&!this._blockDirtyMechanism){for(let i of t.meshes)if(i.subMeshes){for(let r of i.subMeshes)if((r.getMaterial()||(t._hasDefaultMaterial?t.defaultMaterial:null))===this)for(let t of r._drawWrappers)t&&t.defines&&t.defines.markAllAsDirty&&this._materialContext===t.materialContext&&e(t.defines)}}}_markScenePrePassDirty(){if(this.getScene().blockMaterialDirtyMechanism||this._blockDirtyMechanism)return;let e=this.getScene().enablePrePassRenderer();e&&e.markAsDirty()}_markAllSubMeshesAsAllDirty(){this._markAllSubMeshesAsDirty(ej._AllDirtyCallBack)}_markAllSubMeshesAsImageProcessingDirty(){this._markAllSubMeshesAsDirty(ej._ImageProcessingDirtyCallBack)}_markAllSubMeshesAsTexturesDirty(){this._markAllSubMeshesAsDirty(ej._TextureDirtyCallBack)}_markAllSubMeshesAsFresnelDirty(){this._markAllSubMeshesAsDirty(ej._FresnelDirtyCallBack)}_markAllSubMeshesAsFresnelAndMiscDirty(){this._markAllSubMeshesAsDirty(ej._FresnelAndMiscDirtyCallBack)}_markAllSubMeshesAsLightsDirty(){this._markAllSubMeshesAsDirty(ej._LightsDirtyCallBack)}_markAllSubMeshesAsAttributesDirty(){this._markAllSubMeshesAsDirty(ej._AttributeDirtyCallBack)}_markAllSubMeshesAsMiscDirty(){this._markAllSubMeshesAsDirty(ej._MiscDirtyCallBack)}_markAllSubMeshesAsPrePassDirty(){this._markAllSubMeshesAsDirty(ej._PrePassDirtyCallBack)}_markAllSubMeshesAsTexturesAndMiscDirty(){this._markAllSubMeshesAsDirty(ej._TextureAndMiscDirtyCallBack)}_checkScenePerformancePriority(){if(0!==this._scene.performancePriority){this.checkReadyOnlyOnce=!0;let e=this._scene.onScenePerformancePriorityChangedObservable.addOnce(()=>{this.checkReadyOnlyOnce=!1});this.onDisposeObservable.add(()=>{this._scene.onScenePerformancePriorityChangedObservable.remove(e)})}}setPrePassRenderer(e){return!1}dispose(e,t,i){let r=this.getScene();if(r.stopAnimation(this),r.freeProcessedMaterials(),r.removeMaterial(this),this._eventInfo.forceDisposeTextures=t,this._callbackPluginEventGeneric(2,this._eventInfo),this._parentContainer){let e=this._parentContainer.materials.indexOf(this);e>-1&&this._parentContainer.materials.splice(e,1),this._parentContainer=null}if(!0!==i)if(this.meshMap)for(let e in this.meshMap){let t=this.meshMap[e];this._disposeMeshResources(t)}else for(let e of r.meshes)this._disposeMeshResources(e);this._uniformBuffer.dispose(),this._drawWrapper.effect&&(this._storeEffectOnSubMeshes||this._drawWrapper.effect.dispose(),this._drawWrapper.effect=null),this.metadata=null,this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this._onBindObservable&&this._onBindObservable.clear(),this._onUnBindObservable&&this._onUnBindObservable.clear(),this._onEffectCreatedObservable&&this._onEffectCreatedObservable.clear(),this._eventInfo&&(this._eventInfo={})}_disposeMeshResources(e){if(!e)return;let t=e.geometry,i=e._internalAbstractMeshDataInfo._materialForRenderPass;if(this._storeEffectOnSubMeshes){if(e.subMeshes&&i)for(let r of e.subMeshes){let e=r._drawWrappers;for(let s=0;s<e.length;s++){let a=e[s]?.effect;a&&i[s]===this&&(t?._releaseVertexArrayObject(a),r._removeDrawWrapper(s,!0,!0))}}}else t?._releaseVertexArrayObject(this._drawWrapper.effect);e.material!==this||e.sourceMesh||(e.material=null)}serialize(){let e=tu.SerializationHelper.Serialize(this);return e.stencil=this.stencil.serialize(),e.uniqueId=this.uniqueId,this._serializePlugins(e),e}_serializePlugins(e){if(e.plugins={},this.pluginManager)for(let t of this.pluginManager._plugins)t.doNotSerialize||(e.plugins[t.getClassName()]=t.serialize())}static ParseAlphaMode(e,t){void 0!==e._alphaMode?t._alphaMode=Array.isArray(e._alphaMode)?[...e._alphaMode]:[e._alphaMode]:void 0!==e.alphaMode?t._alphaMode=Array.isArray(e.alphaMode)?[...e.alphaMode]:[e.alphaMode]:t._alphaMode=[2]}static Parse(e,t,i){if(e.customType){if("BABYLON.PBRMaterial"===e.customType&&e.overloadedAlbedo&&(e.customType="BABYLON.LegacyPBRMaterial",!BABYLON.LegacyPBRMaterial))return tc.Logger.Error("Your scene is trying to load a legacy version of the PBRMaterial, please, include it from the materials library."),null}else e.customType="BABYLON.StandardMaterial";let r=eK.Tools.Instantiate(e.customType).Parse(e,t,i);return r._loadedUniqueId=e.uniqueId,ej.ParseAlphaMode(e,r),r}static _ParsePlugins(e,t,i,r){if(e.plugins)for(let s in e.plugins){let a=e.plugins[s],n=t.pluginManager?.getPlugin(a.name);if(!n){let e=eK.Tools.Instantiate("BABYLON."+s);e&&(n=new e(t))}n?.parse(a,i,r)}}},eX="function"==typeof Symbol&&Symbol.metadata?Object.create(null):void 0,A=[(0,e$.serialize)()],T=[(0,e$.serialize)()],S=[(0,e$.serialize)()],M=[(0,e$.serialize)()],b=[(0,e$.serialize)()],I=[(0,e$.serialize)()],P=[(0,e$.serialize)()],R=[(0,e$.serialize)("alpha")],D=[(0,e$.serialize)("backFaceCulling")],x=[(0,e$.serialize)("textureRepetitionMode")],C=[(0,e$.serialize)("textureRepetitionHexTilingParams")],O=[(0,e$.serialize)("cullBackFaces")],L=[(0,e$.serialize)()],y=[(0,e$.serialize)()],F=[(0,e$.serialize)()],v=[(0,e$.serialize)()],N=[(0,e$.serialize)()],k=[(0,e$.serialize)()],B=[(0,e$.serialize)()],U=[(0,e$.serialize)()],H=[(0,e$.serialize)("fogEnabled")],W=[(0,e$.serialize)()],V=[(0,e$.serialize)()],z=[(0,e$.serialize)()],w=[(0,e$.serialize)()],G=[(0,e$.serialize)()],X=[(0,e$.serialize)()],Z=[(0,e$.serialize)()],Y=[(0,e$.serialize)()],(0,eQ.__esDecorate)(ej,null,w,{kind:"getter",name:"pointsCloud",static:!1,private:!1,access:{has:e=>"pointsCloud"in e,get:e=>e.pointsCloud},metadata:eX},null,j),(0,eQ.__esDecorate)(ej,null,G,{kind:"getter",name:"fillMode",static:!1,private:!1,access:{has:e=>"fillMode"in e,get:e=>e.fillMode},metadata:eX},null,j),(0,eQ.__esDecorate)(ej,null,X,{kind:"getter",name:"useLogarithmicDepth",static:!1,private:!1,access:{has:e=>"useLogarithmicDepth"in e,get:e=>e.useLogarithmicDepth},metadata:eX},null,j),(0,eQ.__esDecorate)(ej,null,Y,{kind:"getter",name:"transparencyMode",static:!1,private:!1,access:{has:e=>"transparencyMode"in e,get:e=>e.transparencyMode},metadata:eX},null,j),(0,eQ.__esDecorate)(null,null,A,{kind:"field",name:"id",static:!1,private:!1,access:{has:e=>"id"in e,get:e=>e.id,set:(e,t)=>{e.id=t}},metadata:eX},q,Q),(0,eQ.__esDecorate)(null,null,T,{kind:"field",name:"uniqueId",static:!1,private:!1,access:{has:e=>"uniqueId"in e,get:e=>e.uniqueId,set:(e,t)=>{e.uniqueId=t}},metadata:eX},$,K),(0,eQ.__esDecorate)(null,null,S,{kind:"field",name:"name",static:!1,private:!1,access:{has:e=>"name"in e,get:e=>e.name,set:(e,t)=>{e.name=t}},metadata:eX},J,ee),(0,eQ.__esDecorate)(null,null,M,{kind:"field",name:"metadata",static:!1,private:!1,access:{has:e=>"metadata"in e,get:e=>e.metadata,set:(e,t)=>{e.metadata=t}},metadata:eX},et,ei),(0,eQ.__esDecorate)(null,null,b,{kind:"field",name:"checkReadyOnEveryCall",static:!1,private:!1,access:{has:e=>"checkReadyOnEveryCall"in e,get:e=>e.checkReadyOnEveryCall,set:(e,t)=>{e.checkReadyOnEveryCall=t}},metadata:eX},er,es),(0,eQ.__esDecorate)(null,null,I,{kind:"field",name:"checkReadyOnlyOnce",static:!1,private:!1,access:{has:e=>"checkReadyOnlyOnce"in e,get:e=>e.checkReadyOnlyOnce,set:(e,t)=>{e.checkReadyOnlyOnce=t}},metadata:eX},ea,en),(0,eQ.__esDecorate)(null,null,P,{kind:"field",name:"state",static:!1,private:!1,access:{has:e=>"state"in e,get:e=>e.state,set:(e,t)=>{e.state=t}},metadata:eX},el,eo),(0,eQ.__esDecorate)(null,null,R,{kind:"field",name:"_alpha",static:!1,private:!1,access:{has:e=>"_alpha"in e,get:e=>e._alpha,set:(e,t)=>{e._alpha=t}},metadata:eX},ec,eh),(0,eQ.__esDecorate)(null,null,D,{kind:"field",name:"_backFaceCulling",static:!1,private:!1,access:{has:e=>"_backFaceCulling"in e,get:e=>e._backFaceCulling,set:(e,t)=>{e._backFaceCulling=t}},metadata:eX},eu,ed),(0,eQ.__esDecorate)(null,null,x,{kind:"field",name:"_textureRepetitionMode",static:!1,private:!1,access:{has:e=>"_textureRepetitionMode"in e,get:e=>e._textureRepetitionMode,set:(e,t)=>{e._textureRepetitionMode=t}},metadata:eX},e_,ep),(0,eQ.__esDecorate)(null,null,C,{kind:"field",name:"textureRepetitionHexTilingParams",static:!1,private:!1,access:{has:e=>"textureRepetitionHexTilingParams"in e,get:e=>e.textureRepetitionHexTilingParams,set:(e,t)=>{e.textureRepetitionHexTilingParams=t}},metadata:eX},eE,em),(0,eQ.__esDecorate)(null,null,O,{kind:"field",name:"_cullBackFaces",static:!1,private:!1,access:{has:e=>"_cullBackFaces"in e,get:e=>e._cullBackFaces,set:(e,t)=>{e._cullBackFaces=t}},metadata:eX},ef,eg),(0,eQ.__esDecorate)(null,null,L,{kind:"field",name:"sideOrientation",static:!1,private:!1,access:{has:e=>"sideOrientation"in e,get:e=>e.sideOrientation,set:(e,t)=>{e.sideOrientation=t}},metadata:eX},eA,eT),(0,eQ.__esDecorate)(null,null,y,{kind:"field",name:"_alphaMode",static:!1,private:!1,access:{has:e=>"_alphaMode"in e,get:e=>e._alphaMode,set:(e,t)=>{e._alphaMode=t}},metadata:eX},eS,eM),(0,eQ.__esDecorate)(null,null,F,{kind:"field",name:"_needDepthPrePass",static:!1,private:!1,access:{has:e=>"_needDepthPrePass"in e,get:e=>e._needDepthPrePass,set:(e,t)=>{e._needDepthPrePass=t}},metadata:eX},eb,eI),(0,eQ.__esDecorate)(null,null,v,{kind:"field",name:"disableDepthWrite",static:!1,private:!1,access:{has:e=>"disableDepthWrite"in e,get:e=>e.disableDepthWrite,set:(e,t)=>{e.disableDepthWrite=t}},metadata:eX},eP,eR),(0,eQ.__esDecorate)(null,null,N,{kind:"field",name:"disableColorWrite",static:!1,private:!1,access:{has:e=>"disableColorWrite"in e,get:e=>e.disableColorWrite,set:(e,t)=>{e.disableColorWrite=t}},metadata:eX},eD,ex),(0,eQ.__esDecorate)(null,null,k,{kind:"field",name:"forceDepthWrite",static:!1,private:!1,access:{has:e=>"forceDepthWrite"in e,get:e=>e.forceDepthWrite,set:(e,t)=>{e.forceDepthWrite=t}},metadata:eX},eC,eO),(0,eQ.__esDecorate)(null,null,B,{kind:"field",name:"depthFunction",static:!1,private:!1,access:{has:e=>"depthFunction"in e,get:e=>e.depthFunction,set:(e,t)=>{e.depthFunction=t}},metadata:eX},eL,ey),(0,eQ.__esDecorate)(null,null,U,{kind:"field",name:"separateCullingPass",static:!1,private:!1,access:{has:e=>"separateCullingPass"in e,get:e=>e.separateCullingPass,set:(e,t)=>{e.separateCullingPass=t}},metadata:eX},eF,ev),(0,eQ.__esDecorate)(null,null,H,{kind:"field",name:"_fogEnabled",static:!1,private:!1,access:{has:e=>"_fogEnabled"in e,get:e=>e._fogEnabled,set:(e,t)=>{e._fogEnabled=t}},metadata:eX},eN,ek),(0,eQ.__esDecorate)(null,null,W,{kind:"field",name:"pointSize",static:!1,private:!1,access:{has:e=>"pointSize"in e,get:e=>e.pointSize,set:(e,t)=>{e.pointSize=t}},metadata:eX},eB,eU),(0,eQ.__esDecorate)(null,null,V,{kind:"field",name:"zOffset",static:!1,private:!1,access:{has:e=>"zOffset"in e,get:e=>e.zOffset,set:(e,t)=>{e.zOffset=t}},metadata:eX},eH,eW),(0,eQ.__esDecorate)(null,null,z,{kind:"field",name:"zOffsetUnits",static:!1,private:!1,access:{has:e=>"zOffsetUnits"in e,get:e=>e.zOffsetUnits,set:(e,t)=>{e.zOffsetUnits=t}},metadata:eX},eV,ez),(0,eQ.__esDecorate)(null,null,Z,{kind:"field",name:"_isVertexOutputInvariant",static:!1,private:!1,access:{has:e=>"_isVertexOutputInvariant"in e,get:e=>e._isVertexOutputInvariant,set:(e,t)=>{e._isVertexOutputInvariant=t}},metadata:eX},ew,eG),eX&&Object.defineProperty(ej,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:eX}),ej.TriangleFillMode=0,ej.WireFrameFillMode=1,ej.PointFillMode=2,ej.PointListDrawMode=3,ej.LineListDrawMode=4,ej.LineLoopDrawMode=5,ej.LineStripDrawMode=6,ej.TriangleStripDrawMode=7,ej.TriangleFanDrawMode=8,ej.ClockWiseSideOrientation=0,ej.CounterClockWiseSideOrientation=1,ej.ImageProcessingDirtyFlag=64,ej.TextureDirtyFlag=1,ej.LightDirtyFlag=2,ej.FresnelDirtyFlag=4,ej.AttributesDirtyFlag=8,ej.MiscDirtyFlag=16,ej.PrePassDirtyFlag=32,ej.AllDirtyFlag=127,ej.MATERIAL_OPAQUE=0,ej.MATERIAL_ALPHATEST=1,ej.MATERIAL_ALPHABLEND=2,ej.MATERIAL_ALPHATESTANDBLEND=3,ej.MATERIAL_NORMALBLENDMETHOD_WHITEOUT=0,ej.MATERIAL_NORMALBLENDMETHOD_RNM=1,ej.LIGHTFALLOFF_PHYSICAL=0,ej.LIGHTFALLOFF_GLTF=1,ej.LIGHTFALLOFF_STANDARD=2,ej.OnEventObservable=new eJ.Observable,ej.ForceVertexOutputInvariant=!1,ej._AllDirtyCallBack=e=>e.markAllAsDirty(),ej._ImageProcessingDirtyCallBack=e=>e.markAsImageProcessingDirty(),ej._TextureDirtyCallBack=e=>e.markAsTexturesDirty(),ej._FresnelDirtyCallBack=e=>e.markAsFresnelDirty(),ej._MiscDirtyCallBack=e=>e.markAsMiscDirty(),ej._PrePassDirtyCallBack=e=>e.markAsPrePassDirty(),ej._LightsDirtyCallBack=e=>e.markAsLightDirty(),ej._AttributeDirtyCallBack=e=>e.markAsAttributesDirty(),ej._FresnelAndMiscDirtyCallBack=e=>{ej._FresnelDirtyCallBack(e),ej._MiscDirtyCallBack(e)},ej._TextureAndMiscDirtyCallBack=e=>{ej._TextureDirtyCallBack(e),ej._MiscDirtyCallBack(e)},ej._DirtyCallbackArray=[],ej._RunDirtyCallBacks=e=>{for(let t of ej._DirtyCallbackArray)t(e)},ej);Object.getOwnPropertyDescriptor(tx.prototype,"pluginManager")||Object.defineProperty(tx.prototype,"pluginManager",(0,tn._MissingSideEffectProperty)("Material","pluginManager")),e.s(["Material",0,tx],13279)}]);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,18405,22324,12458,30820,43766,e=>{"use strict";var t=e.i(97991),i=e.i(8697),s=e.i(25044),r=e.i(45735);class n{constructor(){this._valueCache={},this.vertexCompilationError=null,this.fragmentCompilationError=null,this.programLinkError=null,this.programValidationError=null,this._isDisposed=!1}get isAsync(){return this.isParallelCompiled}get isReady(){return!!this.program&&(!this.isParallelCompiled||this.engine._isRenderingStateCompiled(this))}_handlesSpectorRebuildCallback(e){e&&this.program&&e(this.program)}setEngine(e){this.engine=e}_fillEffectInformation(e,t,i,s,r,n,a,h){let l,o=this.engine;if(o.supportsUniformBuffers)for(let i in t)e.bindUniformBlock(i,t[i]);for(this.engine.getUniforms(this,i).forEach((e,t)=>{s[i[t]]=e}),this._uniforms=s,l=0;l<r.length;l++)null==e.getUniform(r[l])&&(r.splice(l,1),l--);for(let e of(r.forEach((e,t)=>{n[e]=t}),o.getAttributes(this,a)))h.push(e)}dispose(){this._uniforms={},this._isDisposed=!0}_cacheMatrix(e,t){let i=this._valueCache[e],s=t.updateFlag;return(void 0===i||i!==s)&&(this._valueCache[e]=s,!0)}_cacheFloat2(e,t,i){let s=this._valueCache[e];if(!s||2!==s.length)return s=[t,i],this._valueCache[e]=s,!0;let r=!1;return s[0]!==t&&(s[0]=t,r=!0),s[1]!==i&&(s[1]=i,r=!0),r}_cacheFloat3(e,t,i,s){let r=this._valueCache[e];if(!r||3!==r.length)return r=[t,i,s],this._valueCache[e]=r,!0;let n=!1;return r[0]!==t&&(r[0]=t,n=!0),r[1]!==i&&(r[1]=i,n=!0),r[2]!==s&&(r[2]=s,n=!0),n}_cacheFloat4(e,t,i,s,r){let n=this._valueCache[e];if(!n||4!==n.length)return n=[t,i,s,r],this._valueCache[e]=n,!0;let a=!1;return n[0]!==t&&(n[0]=t,a=!0),n[1]!==i&&(n[1]=i,a=!0),n[2]!==s&&(n[2]=s,a=!0),n[3]!==r&&(n[3]=r,a=!0),a}setInt(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setInt(this._uniforms[e],t)&&(this._valueCache[e]=t)}setInt2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setInt2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setInt3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setInt3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setInt4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setInt4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setIntArray(e,t){this._valueCache[e]=null,this.engine.setIntArray(this._uniforms[e],t)}setIntArray2(e,t){this._valueCache[e]=null,this.engine.setIntArray2(this._uniforms[e],t)}setIntArray3(e,t){this._valueCache[e]=null,this.engine.setIntArray3(this._uniforms[e],t)}setIntArray4(e,t){this._valueCache[e]=null,this.engine.setIntArray4(this._uniforms[e],t)}setUInt(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setUInt(this._uniforms[e],t)&&(this._valueCache[e]=t)}setUInt2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setUInt2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setUInt3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setUInt3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setUInt4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setUInt4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setUIntArray(e,t){this._valueCache[e]=null,this.engine.setUIntArray(this._uniforms[e],t)}setUIntArray2(e,t){this._valueCache[e]=null,this.engine.setUIntArray2(this._uniforms[e],t)}setUIntArray3(e,t){this._valueCache[e]=null,this.engine.setUIntArray3(this._uniforms[e],t)}setUIntArray4(e,t){this._valueCache[e]=null,this.engine.setUIntArray4(this._uniforms[e],t)}setArray(e,t){this._valueCache[e]=null,this.engine.setArray(this._uniforms[e],t)}setArray2(e,t){this._valueCache[e]=null,this.engine.setArray2(this._uniforms[e],t)}setArray3(e,t){this._valueCache[e]=null,this.engine.setArray3(this._uniforms[e],t)}setArray4(e,t){this._valueCache[e]=null,this.engine.setArray4(this._uniforms[e],t)}setMatrices(e,t){t&&(this._valueCache[e]=null,this.engine.setMatrices(this._uniforms[e],t))}setMatrix(e,t){this._cacheMatrix(e,t)&&!this.engine.setMatrices(this._uniforms[e],t.asArray())&&(this._valueCache[e]=null)}setMatrix3x3(e,t){this._valueCache[e]=null,this.engine.setMatrix3x3(this._uniforms[e],t)}setMatrix2x2(e,t){this._valueCache[e]=null,this.engine.setMatrix2x2(this._uniforms[e],t)}setFloat(e,t){let i=this._valueCache[e];(void 0===i||i!==t)&&this.engine.setFloat(this._uniforms[e],t)&&(this._valueCache[e]=t)}setVector2(e,t){this._cacheFloat2(e,t.x,t.y)&&!this.engine.setFloat2(this._uniforms[e],t.x,t.y)&&(this._valueCache[e]=null)}setFloat2(e,t,i){this._cacheFloat2(e,t,i)&&!this.engine.setFloat2(this._uniforms[e],t,i)&&(this._valueCache[e]=null)}setVector3(e,t){this._cacheFloat3(e,t.x,t.y,t.z)&&!this.engine.setFloat3(this._uniforms[e],t.x,t.y,t.z)&&(this._valueCache[e]=null)}setFloat3(e,t,i,s){this._cacheFloat3(e,t,i,s)&&!this.engine.setFloat3(this._uniforms[e],t,i,s)&&(this._valueCache[e]=null)}setVector4(e,t){this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&!this.engine.setFloat4(this._uniforms[e],t.x,t.y,t.z,t.w)&&(this._valueCache[e]=null)}setQuaternion(e,t){this._cacheFloat4(e,t.x,t.y,t.z,t.w)&&!this.engine.setFloat4(this._uniforms[e],t.x,t.y,t.z,t.w)&&(this._valueCache[e]=null)}setFloat4(e,t,i,s,r){this._cacheFloat4(e,t,i,s,r)&&!this.engine.setFloat4(this._uniforms[e],t,i,s,r)&&(this._valueCache[e]=null)}setColor3(e,t){this._cacheFloat3(e,t.r,t.g,t.b)&&!this.engine.setFloat3(this._uniforms[e],t.r,t.g,t.b)&&(this._valueCache[e]=null)}setColor4(e,t,i){this._cacheFloat4(e,t.r,t.g,t.b,i)&&!this.engine.setFloat4(this._uniforms[e],t.r,t.g,t.b,i)&&(this._valueCache[e]=null)}setDirectColor4(e,t){this._cacheFloat4(e,t.r,t.g,t.b,t.a)&&!this.engine.setFloat4(this._uniforms[e],t.r,t.g,t.b,t.a)&&(this._valueCache[e]=null)}_getVertexShaderCode(){return this.vertexShader?this.engine._getShaderSource(this.vertexShader):null}_getFragmentShaderCode(){return this.fragmentShader?this.engine._getShaderSource(this.fragmentShader):null}}var a=e.i(20969);let h=new WeakMap,l={_webGLVersion:2,cachedPipelines:{}};function o(e){let t=h.get(e);if(!t){if(!e)return l;t={_webGLVersion:e.TEXTURE_BINDING_3D?2:1,_context:e,parallelShaderCompile:e.getExtension("KHR_parallel_shader_compile")||void 0,cachedPipelines:{}},h.set(e,t)}return t}function c(e,t,i,s,r,n){let a=o(s);return n||(n=a._createShaderProgramInjection??_),n(e,f(t,"vertex",s,a._contextWasLost),f(i,"fragment",s,a._contextWasLost),s,r,a.validateShaderPrograms)}function u(e,t,i,s,r,n=null,a){let h=o(r);a||(a=h._createShaderProgramInjection??_);let l=h._webGLVersion>1?"#version 300 es\n#define WEBGL2 \n":"";return a(e,p(t,"vertex",s,l,r,h._contextWasLost),p(i,"fragment",s,l,r,h._contextWasLost),r,n,h.validateShaderPrograms)}function _(e,t,i,s,r=null,n){let a=s.createProgram();if(e.program=a,!a)throw Error("Unable to create program");return s.attachShader(a,t),s.attachShader(a,i),s.linkProgram(a),e.context=s,e.vertexShader=t,e.fragmentShader=i,e.isParallelCompiled||d(e,s,n),a}function d(e,t,i){let s=e.context,r=e.vertexShader,n=e.fragmentShader,a=e.program;if(!s.getProgramParameter(a,s.LINK_STATUS)){if(!t.getShaderParameter(r,t.COMPILE_STATUS)){let i=t.getShaderInfoLog(r);if(i)throw e.vertexCompilationError=i,Error("VERTEX SHADER "+i)}if(!t.getShaderParameter(n,t.COMPILE_STATUS)){let i=t.getShaderInfoLog(n);if(i)throw e.fragmentCompilationError=i,Error("FRAGMENT SHADER "+i)}let i=s.getProgramInfoLog(a);if(i)throw e.programLinkError=i,Error(i)}if(i&&(s.validateProgram(a),!s.getProgramParameter(a,s.VALIDATE_STATUS))){let t=s.getProgramInfoLog(a);if(t)throw e.programValidationError=t,Error(t)}s.deleteShader(r),s.deleteShader(n),e.vertexShader=void 0,e.fragmentShader=void 0,e.onCompiled&&(e.onCompiled(),e.onCompiled=void 0)}function p(e,t,i,s,r,n){return f((0,a._ConcatenateShader)(e,i,s),t,r,n)}function f(e,t,i,s){let r=i.createShader("vertex"===t?i.VERTEX_SHADER:i.FRAGMENT_SHADER);if(!r){let e,r=i.NO_ERROR;for(;(e=i.getError())!==i.NO_ERROR;)r=e;throw Error(`Something went wrong while creating a gl ${t} shader object. gl error=${r}, gl isContextLost=${i.isContextLost()}, _contextWasLost=${s}`)}return i.shaderSource(r,e),i.compileShader(r),r}e.s(["_createShaderProgram",0,_,"_executeWhenRenderingStateIsCompiled",0,function(e,t){if(!e.isParallelCompiled)return void t(e);let i=e.onCompiled;e.onCompiled=()=>{i?.(),t(e)}},"_finalizePipelineContext",0,d,"_isRenderingStateCompiled",0,function(e,t,i){if(e._isDisposed)return!1;let s=o(t);return!!(s&&s.parallelShaderCompile&&s.parallelShaderCompile.COMPLETION_STATUS_KHR&&e.program&&t.getProgramParameter(e.program,s.parallelShaderCompile.COMPLETION_STATUS_KHR))&&(d(e,t,i),!0)},"_preparePipelineContext",0,function(e,t,i,s,r,n,a,h,l,_="",d,p,f){let m=o(e.context);p||(p=m.createRawShaderProgramInjection??c),f||(f=m.createShaderProgramInjection??u),s?e.program=p(e,t,i,e.context,l):e.program=f(e,t,i,h,e.context,l),e.program.__SPECTOR_rebuildProgram=a,d()},"_setProgram",0,function(e,t){t.useProgram(e)},"createPipelineContext",0,function(e,t){let i=new n,s=o(e);return s.parallelShaderCompile&&!s.disableParallelShaderCompile&&(i.isParallelCompiled=!0),i.context=s._context,i},"createRawShaderProgram",0,c,"createShaderProgram",0,u,"deleteStateObject",0,function(e){h.delete(e)},"getStateObject",0,o],22324);var m=e.i(48685);function g(e,t){return o(t).cachedPipelines[e]}function b(e){let t=e._name,i=e.context;if(t&&i){let e=o(i),s=e.cachedPipelines[t];s?.dispose(),delete e.cachedPipelines[t]}}function C(e,t,i,s,n,a,h){let l,o,c=(0,r.IsWindowObjectExist)()?a?.getHostDocument():null;l="string"==typeof t?t:"string"==typeof t.vertexSource?"source:"+t.vertexSource:"string"==typeof t.vertexElement?c?.getElementById(t.vertexElement)||t.vertexElement:t.vertex||t,o="string"==typeof t?t:"string"==typeof t.fragmentSource?"source:"+t.fragmentSource:"string"==typeof t.fragmentElement?c?.getElementById(t.fragmentElement)||t.fragmentElement:t.fragment||t;let u=[void 0,void 0],_=()=>{if(u[0]&&u[1]){let[r,l]=u;(0,m.Initialize)(e),(0,m.Process)(r,e,(r,o)=>{h&&(h._vertexSourceCodeBeforeMigration=o),i&&(r=i("vertex",r)),e.isFragment=!0,(0,m.Process)(l,e,(a,l)=>{var o,c,u,_;h&&(h._fragmentSourceCodeBeforeMigration=l),i&&(a=i("fragment",a));let d=(0,m.Finalize)(r,a,e);e=null;let p=(o=d.vertexCode,c=d.fragmentCode,u=t,_=n,u?{vertexSourceCode:(1===_?"//":"")+"#define SHADER_NAME vertex:"+(u.vertexElement||u.vertex||u.spectorName||u)+"\n"+o,fragmentSourceCode:(1===_?"//":"")+"#define SHADER_NAME fragment:"+(u.fragmentElement||u.fragment||u.spectorName||u)+"\n"+c}:{vertexSourceCode:o,fragmentSourceCode:c});s?.(p.vertexSourceCode,p.fragmentSourceCode)},a)},a)}};S(l,"Vertex","",e=>{h&&(h._rawVertexSourceCode=e),u[0]=e,_()},n),S(o,"Fragment","Pixel",e=>{h&&(h._rawFragmentSourceCode=e),u[1]=e,_()},n)}function S(e,t,i,n,h,l){let o;if("u">typeof HTMLElement&&e instanceof HTMLElement)return void n((0,r.GetDOMTextContent)(e));if("source:"===e.substring(0,7))return void n(e.substring(7));if("base64:"===e.substring(0,7))return void n(window.atob(e.substring(7)));let c=s.ShaderStore.GetShadersStore(h);if(c[e+t+"Shader"])return void n(c[e+t+"Shader"]);if(i&&c[e+i+"Shader"])return void n(c[e+i+"Shader"]);if(o="."===e[0]||"/"===e[0]||e.indexOf("http")>-1?e:s.ShaderStore.GetShadersRepository(h)+e,!(l=l||a._LoadFile))throw Error("loadFileInjection is not defined");l(o+"."+t.toLowerCase()+".fx",n)}let F=(e,t,s,r)=>{try{let i=e.context?o(e.context):null;i&&(i.disableParallelShaderCompile=e.disableParallelCompilation);let n=e.existingPipelineContext||t(e.shaderProcessingContext);return n._name=e.name,e.name&&i&&(i.cachedPipelines[e.name]=n),s(n,e.vertex,e.fragment,!!e.createAsRaw,"","",e.rebuildRebind,e.defines,e.transformFeedbackVaryings,"",()=>{r(n,()=>{e.onRenderingStateCompiled?.(n)})}),n}catch(e){throw i.Logger.Error("Error compiling effect"),e}};e.s(["_ProcessShaderCode",0,C,"createAndPreparePipelineContext",0,F,"getCachedPipeline",0,g,"resetCachedPipeline",0,b],12458);var x=e.i(89435);class v{static get ShadersRepository(){return s.ShaderStore.ShadersRepository}static set ShadersRepository(e){s.ShaderStore.ShadersRepository=e}get isDisposed(){return this._isDisposed}get onBindObservable(){return this._onBindObservable||(this._onBindObservable=new t.Observable),this._onBindObservable}get shaderLanguage(){return this._shaderLanguage}constructor(e,i,s,r=null,n,a=null,h=null,l=null,o=null,c,u="",_=0,d){let p;this.defines="",this.onCompiled=null,this.onError=null,this.onBind=null,this.uniqueId=0,this.onCompileObservable=new t.Observable,this.onErrorObservable=new t.Observable,this._onBindObservable=null,this._isDisposed=!1,this._refCount=1,this._bonesComputationForcedToCPU=!1,this._uniformBuffersNames={},this._multiTarget=!1,this._samplers={},this._isReady=!1,this._compilationError="",this._allFallbacksProcessed=!1,this._uniforms={},this._key="",this._fallbacks=null,this._vertexSourceCodeOverride="",this._fragmentSourceCodeOverride="",this._transformFeedbackVaryings=null,this._disableParallelShaderCompilation=!1,this._pipelineContext=null,this._vertexSourceCode="",this._fragmentSourceCode="",this._vertexSourceCodeBeforeMigration="",this._fragmentSourceCodeBeforeMigration="",this._rawVertexSourceCode="",this._rawFragmentSourceCode="",this._processCodeAfterIncludes=void 0,this._processFinalCode=null,this._onReleaseEffectsObserver=null,this.name=e,this._key=u;const f=this._key.replace(/\r/g,"").replace(/\n/g,"|");if(i.attributes){if(this._engine=s,this._attributesNames=i.attributes,this._uniformsNames=i.uniformsNames.concat(i.samplers),this._samplerList=i.samplers.slice(),this.defines=i.defines,this.onError=i.onError,this.onCompiled=i.onCompiled,this._fallbacks=i.fallbacks,this._indexParameters=i.indexParameters,this._transformFeedbackVaryings=i.transformFeedbackVaryings||null,this._multiTarget=!!i.multiTarget,this._shaderLanguage=i.shaderLanguage??0,this._disableParallelShaderCompilation=!!i.disableParallelShaderCompilation,i.uniformBuffersNames){this._uniformBuffersNamesList=i.uniformBuffersNames.slice();for(let e=0;e<i.uniformBuffersNames.length;e++)this._uniformBuffersNames[i.uniformBuffersNames[e]]=e}this._processFinalCode=i.processFinalCode??null,this._processCodeAfterIncludes=i.processCodeAfterIncludes??void 0,d=i.extraInitializationsAsync,p=i.existingPipelineContext}else this._engine=n,this.defines=null==a?"":a,this._uniformsNames=s.concat(r),this._samplerList=r?r.slice():[],this._attributesNames=i,this._uniformBuffersNamesList=[],this._shaderLanguage=_,this.onError=o,this.onCompiled=l,this._indexParameters=c,this._fallbacks=h;"WEBGL2"===this._engine.shaderPlatformName&&(p=g(f,this._engine._gl)??p),this._attributeLocationByName={},this.uniqueId=v._UniqueIdSeed++,p?(this._pipelineContext=p,this._pipelineContext.setEngine(this._engine),this._onRenderingStateCompiled(this._pipelineContext),this._pipelineContext.program&&(this._pipelineContext.program.__SPECTOR_rebuildProgram=this._rebuildProgram.bind(this))):this._processShaderCodeAsync(null,!1,null,d).catch(e=>{let t=e?.message??String(e),i=Error(`Effect async shader preparation failed for "${String(this.name)}": ${t}`);e&&"string"==typeof e.stack&&(i.stack=`${i.message}
|
|
2
|
+
Caused by: ${e.stack}`),this._processCompilationErrors(i)}),this._onReleaseEffectsObserver=this._engine.onReleaseEffectsObservable.addOnce(()=>{this._onReleaseEffectsObserver=null,this.isDisposed||this.dispose(!0)})}async _processShaderCodeAsync(e=null,t=!1,i=null,r){r&&await r(),this._processingContext=i||this._engine._getShaderProcessingContext(this._shaderLanguage,!1),C({defines:this.defines.split("\n"),indexParameters:this._indexParameters,isFragment:!1,shouldUseHighPrecisionShader:this._engine._shouldUseHighPrecisionShader,processor:e??this._engine._getShaderProcessor(this._shaderLanguage),supportsUniformBuffers:this._engine.supportsUniformBuffers,shadersRepository:s.ShaderStore.GetShadersRepository(this._shaderLanguage),includesShadersStore:s.ShaderStore.GetIncludesShadersStore(this._shaderLanguage),version:(100*this._engine.version).toString(),platformName:this._engine.shaderPlatformName,processingContext:this._processingContext,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,processCodeAfterIncludes:this._processCodeAfterIncludes},this.name,this._processFinalCode,(e,i)=>{this._vertexSourceCode=e,this._fragmentSourceCode=i,this._prepareEffect(t)},this._shaderLanguage,this._engine,this)}get key(){return this._key}isReady(){try{return this._isReadyInternal()}catch{return!1}}_isReadyInternal(){return!!this._engine.isDisposed||!!this._isReady||!!this._pipelineContext&&this._pipelineContext.isReady}getEngine(){return this._engine}getPipelineContext(){return this._pipelineContext}getAttributesNames(){return this._attributesNames}getAttributeLocation(e){return this._attributes[e]}getAttributeLocationByName(e){return this._attributeLocationByName[e]}getAttributesCount(){return this._attributes.length}getUniformIndex(e){return this._uniformsNames.indexOf(e)}getUniform(e){return this._uniforms[e]}getSamplers(){return this._samplerList}getUniformNames(){return this._uniformsNames}getUniformBuffersNames(){return this._uniformBuffersNamesList}getIndexParameters(){return this._indexParameters}getCompilationError(){return this._compilationError}allFallbacksProcessed(){return this._allFallbacksProcessed}async whenCompiledAsync(){return await new Promise(e=>{this.executeWhenCompiled(e)})}executeWhenCompiled(e){this.isReady()?e(this):(this.onCompileObservable.add(t=>{e(t)}),(!this._pipelineContext||this._pipelineContext.isAsync)&&this._checkIsReady(null))}_checkIsReady(e){(0,x._RetryWithInterval)(()=>this._isReadyInternal()||this._isDisposed,()=>{},t=>{this._processCompilationErrors(t,e)},16,12e4,!0,` - Effect: ${"string"==typeof this.name?this.name:this.key}`)}get vertexSourceCode(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._vertexSourceCodeOverride:this._pipelineContext?._getVertexShaderCode()??this._vertexSourceCode}get fragmentSourceCode(){return this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride?this._fragmentSourceCodeOverride:this._pipelineContext?._getFragmentShaderCode()??this._fragmentSourceCode}get vertexSourceCodeBeforeMigration(){return this._vertexSourceCodeBeforeMigration}get fragmentSourceCodeBeforeMigration(){return this._fragmentSourceCodeBeforeMigration}get rawVertexSourceCode(){return this._rawVertexSourceCode}get rawFragmentSourceCode(){return this._rawFragmentSourceCode}getPipelineGenerationOptions(){return{platformName:this._engine.shaderPlatformName,shaderLanguage:this._shaderLanguage,shaderNameOrContent:this.name,key:this._key,defines:this.defines.split("\n"),addGlobalDefines:!1,extendedProcessingOptions:{indexParameters:this._indexParameters,isNDCHalfZRange:this._engine.isNDCHalfZRange,useReverseDepthBuffer:this._engine.useReverseDepthBuffer,supportsUniformBuffers:this._engine.supportsUniformBuffers},extendedCreatePipelineOptions:{transformFeedbackVaryings:this._transformFeedbackVaryings,createAsRaw:!!(this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride)}}}_rebuildProgram(e,t,i,s){this._isReady=!1,this._vertexSourceCodeOverride=e,this._fragmentSourceCodeOverride=t,this.onError=(e,t)=>{s&&s(t)},this.onCompiled=()=>{let e=this.getEngine().scenes;if(e)for(let t=0;t<e.length;t++)e[t].markAllMaterialsAsDirty(127);this._pipelineContext._handlesSpectorRebuildCallback?.(i)},this._fallbacks=null,this._prepareEffect()}_onRenderingStateCompiled(e){if(this._pipelineContext=e,this._pipelineContext.setEngine(this._engine),this._attributes=[],this._pipelineContext._fillEffectInformation(this,this._uniformBuffersNames,this._uniformsNames,this._uniforms,this._samplerList,this._samplers,this._attributesNames,this._attributes),this._attributesNames)for(let e=0;e<this._attributesNames.length;e++){let t=this._attributesNames[e];this._attributeLocationByName[t]=this._attributes[e]}this._engine.bindSamplers(this),this._compilationError="",this._isReady=!0,this.onCompiled&&this.onCompiled(this),this.onCompileObservable.notifyObservers(this),this.onCompileObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh(),v.AutomaticallyClearCodeCache&&this.clearCodeCache()}_prepareEffect(e=!1){let t=this._pipelineContext;this._isReady=!1;try{let i=!!(this._vertexSourceCodeOverride&&this._fragmentSourceCodeOverride),s=i?null:this.defines,r=i?this._vertexSourceCodeOverride:this._vertexSourceCode,n=i?this._fragmentSourceCodeOverride:this._fragmentSourceCode,a=this._engine;this._pipelineContext=F({existingPipelineContext:e?t:null,vertex:r,fragment:n,context:"WEBGL2"===a.shaderPlatformName||"WEBGL1"===a.shaderPlatformName?a._gl:void 0,rebuildRebind:(e,t,i,s)=>this._rebuildProgram(e,t,i,s),defines:s,transformFeedbackVaryings:this._transformFeedbackVaryings,name:this._key.replace(/\r/g,"").replace(/\n/g,"|"),createAsRaw:i,disableParallelCompilation:this._disableParallelShaderCompilation,shaderProcessingContext:this._processingContext,onRenderingStateCompiled:i=>{t&&!e&&this._engine._deletePipelineContext(t),i&&this._onRenderingStateCompiled(i)}},this._engine.createPipelineContext.bind(this._engine),this._engine._preparePipelineContextAsync.bind(this._engine),this._engine._executeWhenRenderingStateIsCompiled.bind(this._engine)),this._pipelineContext.isAsync&&this._checkIsReady(t)}catch(e){this._processCompilationErrors(e,t)}}_getShaderCodeAndErrorLine(e,t,i){let s=null;if(t&&e){let r=t.match(i?/FRAGMENT SHADER ERROR: 0:(\d+?):/:/VERTEX SHADER ERROR: 0:(\d+?):/);if(r&&2===r.length){let t=parseInt(r[1]),n=e.split("\n",-1);n.length>=t&&(s=`Offending line [${t}] in ${i?"fragment":"vertex"} code: ${n[t-1]}`)}}return[e,s]}_processCompilationErrors(e,t=null){this._compilationError="string"==typeof e?.stack?e.stack:e?.message??String(e);let s=this._attributesNames,r=this._fallbacks;if(i.Logger.Error("Unable to compile effect:"),i.Logger.Error(`Uniforms: ${this._uniformsNames.join(" ")}`),i.Logger.Error(`Attributes: ${s.join(" ")}`),i.Logger.Error("Defines:\n"+this.defines),v.LogShaderCodeOnCompilationError){let e,t=null,s=null;this._pipelineContext?._getVertexShaderCode()&&([e,t]=this._getShaderCodeAndErrorLine(this._pipelineContext._getVertexShaderCode(),this._compilationError,!1),e&&(i.Logger.Error("Vertex code:"),i.Logger.Error(e))),this._pipelineContext?._getFragmentShaderCode()&&([e,s]=this._getShaderCodeAndErrorLine(this._pipelineContext?._getFragmentShaderCode(),this._compilationError,!0),e&&(i.Logger.Error("Fragment code:"),i.Logger.Error(e))),t&&i.Logger.Error(t),s&&i.Logger.Error(s)}i.Logger.Error("Error: "+this._compilationError);let n=()=>{this.onError&&this.onError(this,this._compilationError),this.onErrorObservable.notifyObservers(this),this._engine.onEffectErrorObservable.notifyObservers({effect:this,errors:this._compilationError})};t&&(this._pipelineContext=t,this._isReady=!0,n()),r?(this._pipelineContext=null,r.hasMoreFallbacks?(this._allFallbacksProcessed=!1,i.Logger.Error("Trying next fallback."),this.defines=r.reduce(this.defines,this),this._prepareEffect()):(this._allFallbacksProcessed=!0,n(),this.onErrorObservable.clear(),this._fallbacks&&this._fallbacks.unBindMesh())):(this._allFallbacksProcessed=!0,t||n())}get isSupported(){return""===this._compilationError}_bindTexture(e,t){this._engine._bindTexture(this._samplers[e],t,e)}setTexture(e,t){this._engine.setTexture(this._samplers[e],this._uniforms[e],t,e)}setTextureArray(e,t){let i=e+"Ex";if(-1===this._samplerList.indexOf(i+"0")){let s=this._samplerList.indexOf(e);for(let e=1;e<t.length;e++){let t=i+(e-1).toString();this._samplerList.splice(s+e,0,t)}let r=0;for(let e of this._samplerList)this._samplers[e]=r,r+=1}this._engine.setTextureArray(this._samplers[e],this._uniforms[e],t,e)}bindUniformBuffer(e,t){let i=this._uniformBuffersNames[t];void 0===i||v._BaseCache[i]===e&&this._engine._features.useUBOBindingCache||(v._BaseCache[i]=e,this._engine.bindUniformBufferBase(e,i,t))}bindUniformBlock(e,t){this._engine.bindUniformBlock(this._pipelineContext,e,t)}setInt(e,t){return this._pipelineContext.setInt(e,t),this}setInt2(e,t,i){return this._pipelineContext.setInt2(e,t,i),this}setInt3(e,t,i,s){return this._pipelineContext.setInt3(e,t,i,s),this}setInt4(e,t,i,s,r){return this._pipelineContext.setInt4(e,t,i,s,r),this}setIntArray(e,t){return this._pipelineContext.setIntArray(e,t),this}setIntArray2(e,t){return this._pipelineContext.setIntArray2(e,t),this}setIntArray3(e,t){return this._pipelineContext.setIntArray3(e,t),this}setIntArray4(e,t){return this._pipelineContext.setIntArray4(e,t),this}setUInt(e,t){return this._pipelineContext.setUInt(e,t),this}setUInt2(e,t,i){return this._pipelineContext.setUInt2(e,t,i),this}setUInt3(e,t,i,s){return this._pipelineContext.setUInt3(e,t,i,s),this}setUInt4(e,t,i,s,r){return this._pipelineContext.setUInt4(e,t,i,s,r),this}setUIntArray(e,t){return this._pipelineContext.setUIntArray(e,t),this}setUIntArray2(e,t){return this._pipelineContext.setUIntArray2(e,t),this}setUIntArray3(e,t){return this._pipelineContext.setUIntArray3(e,t),this}setUIntArray4(e,t){return this._pipelineContext.setUIntArray4(e,t),this}setFloatArray(e,t){return this._pipelineContext.setArray(e,t),this}setFloatArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setFloatArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setFloatArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setArray(e,t){return this._pipelineContext.setArray(e,t),this}setArray2(e,t){return this._pipelineContext.setArray2(e,t),this}setArray3(e,t){return this._pipelineContext.setArray3(e,t),this}setArray4(e,t){return this._pipelineContext.setArray4(e,t),this}setMatrices(e,t){return this._pipelineContext.setMatrices(e,t),this}setMatrix(e,t){return this._pipelineContext.setMatrix(e,t),this}setMatrix3x3(e,t){return this._pipelineContext.setMatrix3x3(e,t),this}setMatrix2x2(e,t){return this._pipelineContext.setMatrix2x2(e,t),this}setFloat(e,t){return this._pipelineContext.setFloat(e,t),this}setBool(e,t){return this._pipelineContext.setInt(e,+!!t),this}setVector2(e,t){return this._pipelineContext.setVector2(e,t),this}setFloat2(e,t,i){return this._pipelineContext.setFloat2(e,t,i),this}setVector3(e,t){return this._pipelineContext.setVector3(e,t),this}setFloat3(e,t,i,s){return this._pipelineContext.setFloat3(e,t,i,s),this}setVector4(e,t){return this._pipelineContext.setVector4(e,t),this}setQuaternion(e,t){return this._pipelineContext.setQuaternion(e,t),this}setFloat4(e,t,i,s,r){return this._pipelineContext.setFloat4(e,t,i,s,r),this}setColor3(e,t){return this._pipelineContext.setColor3(e,t),this}setColor4(e,t,i){return this._pipelineContext.setColor4(e,t,i),this}setDirectColor4(e,t){return this._pipelineContext.setDirectColor4(e,t),this}clearCodeCache(){this._vertexSourceCode="",this._fragmentSourceCode="",this._fragmentSourceCodeBeforeMigration="",this._vertexSourceCodeBeforeMigration=""}dispose(e=!1){if(e)this._refCount=0;else{if(v.PersistentMode)return;this._refCount--}this._refCount>0||this._isDisposed||(this._onReleaseEffectsObserver&&(this._engine.onReleaseEffectsObservable.remove(this._onReleaseEffectsObserver),this._onReleaseEffectsObserver=null),this._pipelineContext&&b(this._pipelineContext),this._engine._releaseEffect(this),this.clearCodeCache(),this._isDisposed=!0)}static RegisterShader(e,t,i,r=0){t&&(s.ShaderStore.GetShadersStore(r)[`${e}PixelShader`]=t),i&&(s.ShaderStore.GetShadersStore(r)[`${e}VertexShader`]=i)}static ResetCache(){v._BaseCache={}}}v.LogShaderCodeOnCompilationError=!0,v.PersistentMode=!1,v.AutomaticallyClearCodeCache=!1,v._UniqueIdSeed=0,v._BaseCache={},v.ShadersStore=s.ShaderStore.ShadersStore,v.IncludesShadersStore=s.ShaderStore.IncludesShadersStore,e.s(["Effect",0,v],30820);var y=e.i(71829),D=e.i(78083),E=e.i(2103);class O{constructor(e=!0){this._isDepthTestDirty=!1,this._isDepthMaskDirty=!1,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!1,this._isFrontFaceDirty=!1,e&&this.reset()}get isDirty(){return this._isDepthFuncDirty||this._isDepthTestDirty||this._isDepthMaskDirty||this._isCullFaceDirty||this._isCullDirty||this._isZOffsetDirty||this._isFrontFaceDirty}get zOffset(){return this._zOffset}set zOffset(e){this._zOffset!==e&&(this._zOffset=e,this._isZOffsetDirty=!0)}get zOffsetUnits(){return this._zOffsetUnits}set zOffsetUnits(e){this._zOffsetUnits!==e&&(this._zOffsetUnits=e,this._isZOffsetDirty=!0)}get cullFace(){return this._cullFace}set cullFace(e){this._cullFace!==e&&(this._cullFace=e,this._isCullFaceDirty=!0)}get cull(){return this._cull}set cull(e){this._cull!==e&&(this._cull=e,this._isCullDirty=!0)}get depthFunc(){return this._depthFunc}set depthFunc(e){this._depthFunc!==e&&(this._depthFunc=e,this._isDepthFuncDirty=!0)}get depthMask(){return this._depthMask}set depthMask(e){this._depthMask!==e&&(this._depthMask=e,this._isDepthMaskDirty=!0)}get depthTest(){return this._depthTest}set depthTest(e){this._depthTest!==e&&(this._depthTest=e,this._isDepthTestDirty=!0)}get frontFace(){return this._frontFace}set frontFace(e){this._frontFace!==e&&(this._frontFace=e,this._isFrontFaceDirty=!0)}reset(){this._depthMask=!0,this._depthTest=!0,this._depthFunc=null,this._cullFace=null,this._cull=null,this._zOffset=0,this._zOffsetUnits=0,this._frontFace=null,this._isDepthTestDirty=!0,this._isDepthMaskDirty=!0,this._isDepthFuncDirty=!1,this._isCullFaceDirty=!1,this._isCullDirty=!1,this._isZOffsetDirty=!0,this._isFrontFaceDirty=!1}apply(e){this.isDirty&&(this._isCullDirty&&(this.cull?e.enable(e.CULL_FACE):e.disable(e.CULL_FACE),this._isCullDirty=!1),this._isCullFaceDirty&&(e.cullFace(this.cullFace),this._isCullFaceDirty=!1),this._isDepthMaskDirty&&(e.depthMask(this.depthMask),this._isDepthMaskDirty=!1),this._isDepthTestDirty&&(this.depthTest?e.enable(e.DEPTH_TEST):e.disable(e.DEPTH_TEST),this._isDepthTestDirty=!1),this._isDepthFuncDirty&&(e.depthFunc(this.depthFunc),this._isDepthFuncDirty=!1),this._isZOffsetDirty&&(this.zOffset||this.zOffsetUnits?(e.enable(e.POLYGON_OFFSET_FILL),e.polygonOffset(this.zOffset,this.zOffsetUnits)):e.disable(e.POLYGON_OFFSET_FILL),this._isZOffsetDirty=!1),this._isFrontFaceDirty&&(e.frontFace(this.frontFace),this._isFrontFaceDirty=!1))}}class P{get isDirty(){return this._isStencilTestDirty||this._isStencilMaskDirty||this._isStencilFuncDirty||this._isStencilOpDirty}get func(){return this._func}set func(e){this._func!==e&&(this._func=e,this._isStencilFuncDirty=!0)}get backFunc(){return this._func}set backFunc(e){this._backFunc!==e&&(this._backFunc=e,this._isStencilFuncDirty=!0)}get funcRef(){return this._funcRef}set funcRef(e){this._funcRef!==e&&(this._funcRef=e,this._isStencilFuncDirty=!0)}get funcMask(){return this._funcMask}set funcMask(e){this._funcMask!==e&&(this._funcMask=e,this._isStencilFuncDirty=!0)}get opStencilFail(){return this._opStencilFail}set opStencilFail(e){this._opStencilFail!==e&&(this._opStencilFail=e,this._isStencilOpDirty=!0)}get opDepthFail(){return this._opDepthFail}set opDepthFail(e){this._opDepthFail!==e&&(this._opDepthFail=e,this._isStencilOpDirty=!0)}get opStencilDepthPass(){return this._opStencilDepthPass}set opStencilDepthPass(e){this._opStencilDepthPass!==e&&(this._opStencilDepthPass=e,this._isStencilOpDirty=!0)}get backOpStencilFail(){return this._backOpStencilFail}set backOpStencilFail(e){this._backOpStencilFail!==e&&(this._backOpStencilFail=e,this._isStencilOpDirty=!0)}get backOpDepthFail(){return this._backOpDepthFail}set backOpDepthFail(e){this._backOpDepthFail!==e&&(this._backOpDepthFail=e,this._isStencilOpDirty=!0)}get backOpStencilDepthPass(){return this._backOpStencilDepthPass}set backOpStencilDepthPass(e){this._backOpStencilDepthPass!==e&&(this._backOpStencilDepthPass=e,this._isStencilOpDirty=!0)}get mask(){return this._mask}set mask(e){this._mask!==e&&(this._mask=e,this._isStencilMaskDirty=!0)}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._isStencilTestDirty=!0)}constructor(e=!0){this._isStencilTestDirty=!1,this._isStencilMaskDirty=!1,this._isStencilFuncDirty=!1,this._isStencilOpDirty=!1,this.useStencilGlobalOnly=!1,e&&this.reset()}reset(){this.stencilMaterial=void 0,this.stencilGlobal?.reset(),this._isStencilTestDirty=!0,this._isStencilMaskDirty=!0,this._isStencilFuncDirty=!0,this._isStencilOpDirty=!0}apply(e){if(!e)return;let t=!this.useStencilGlobalOnly&&!!this.stencilMaterial?.enabled;this.enabled=t?this.stencilMaterial.enabled:this.stencilGlobal.enabled,this.func=t?this.stencilMaterial.func:this.stencilGlobal.func,this.backFunc=t?this.stencilMaterial.backFunc:this.stencilGlobal.backFunc,this.funcRef=t?this.stencilMaterial.funcRef:this.stencilGlobal.funcRef,this.funcMask=t?this.stencilMaterial.funcMask:this.stencilGlobal.funcMask,this.opStencilFail=t?this.stencilMaterial.opStencilFail:this.stencilGlobal.opStencilFail,this.opDepthFail=t?this.stencilMaterial.opDepthFail:this.stencilGlobal.opDepthFail,this.opStencilDepthPass=t?this.stencilMaterial.opStencilDepthPass:this.stencilGlobal.opStencilDepthPass,this.backOpStencilFail=t?this.stencilMaterial.backOpStencilFail:this.stencilGlobal.backOpStencilFail,this.backOpDepthFail=t?this.stencilMaterial.backOpDepthFail:this.stencilGlobal.backOpDepthFail,this.backOpStencilDepthPass=t?this.stencilMaterial.backOpStencilDepthPass:this.stencilGlobal.backOpStencilDepthPass,this.mask=t?this.stencilMaterial.mask:this.stencilGlobal.mask,this.isDirty&&(this._isStencilTestDirty&&(this.enabled?e.enable(e.STENCIL_TEST):e.disable(e.STENCIL_TEST),this._isStencilTestDirty=!1),this._isStencilMaskDirty&&(e.stencilMask(this.mask),this._isStencilMaskDirty=!1),this._isStencilFuncDirty&&(e.stencilFuncSeparate(e.FRONT,this.func,this.funcRef,this.funcMask),e.stencilFuncSeparate(e.BACK,this.backFunc,this.funcRef,this.funcMask),this._isStencilFuncDirty=!1),this._isStencilOpDirty&&(e.stencilOpSeparate(e.FRONT,this.opStencilFail,this.opDepthFail,this.opStencilDepthPass),e.stencilOpSeparate(e.BACK,this.backOpStencilFail,this.backOpDepthFail,this.backOpStencilDepthPass),this._isStencilOpDirty=!1))}}class A{constructor(){this.reset()}reset(){this.enabled=!1,this.mask=255,this.funcRef=1,this.funcMask=255,this.func=A.ALWAYS,this.opStencilFail=A.KEEP,this.opDepthFail=A.KEEP,this.opStencilDepthPass=A.REPLACE,this.backFunc=A.ALWAYS,this.backOpStencilFail=A.KEEP,this.backOpDepthFail=A.KEEP,this.backOpStencilDepthPass=A.REPLACE}get stencilFunc(){return this.func}set stencilFunc(e){this.func=e}get stencilBackFunc(){return this.backFunc}set stencilBackFunc(e){this.backFunc=e}get stencilFuncRef(){return this.funcRef}set stencilFuncRef(e){this.funcRef=e}get stencilFuncMask(){return this.funcMask}set stencilFuncMask(e){this.funcMask=e}get stencilOpStencilFail(){return this.opStencilFail}set stencilOpStencilFail(e){this.opStencilFail=e}get stencilOpDepthFail(){return this.opDepthFail}set stencilOpDepthFail(e){this.opDepthFail=e}get stencilOpStencilDepthPass(){return this.opStencilDepthPass}set stencilOpStencilDepthPass(e){this.opStencilDepthPass=e}get stencilBackOpStencilFail(){return this.backOpStencilFail}set stencilBackOpStencilFail(e){this.backOpStencilFail=e}get stencilBackOpDepthFail(){return this.backOpDepthFail}set stencilBackOpDepthFail(e){this.backOpDepthFail=e}get stencilBackOpStencilDepthPass(){return this.backOpStencilDepthPass}set stencilBackOpStencilDepthPass(e){this.backOpStencilDepthPass=e}get stencilMask(){return this.mask}set stencilMask(e){this.mask=e}get stencilTest(){return this.enabled}set stencilTest(e){this.enabled=e}}A.ALWAYS=519,A.KEEP=7680,A.REPLACE=7681;class R{constructor(e){this._supportBlendParametersPerTarget=e,this._blendFunctionParameters=Array(32),this._blendEquationParameters=Array(16),this._blendConstants=[,,,,],this._isBlendConstantsDirty=!1,this._alphaBlend=Array(8).fill(!1),this._numTargetEnabled=0,this._isAlphaBlendDirty=!1,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this.reset()}get isDirty(){return this._isAlphaBlendDirty||this._isBlendFunctionParametersDirty||this._isBlendEquationParametersDirty}get alphaBlend(){return this._numTargetEnabled>0}set alphaBlend(e){this.setAlphaBlend(e)}setAlphaBlend(e,t=0){this._alphaBlend[t]!==e&&(e?this._numTargetEnabled++:this._numTargetEnabled--,this._alphaBlend[t]=e,this._isAlphaBlendDirty=!0)}setAlphaBlendConstants(e,t,i,s){(this._blendConstants[0]!==e||this._blendConstants[1]!==t||this._blendConstants[2]!==i||this._blendConstants[3]!==s)&&(this._blendConstants[0]=e,this._blendConstants[1]=t,this._blendConstants[2]=i,this._blendConstants[3]=s,this._isBlendConstantsDirty=!0)}setAlphaBlendFunctionParameters(e,t,i,s,r=0){let n=4*r;(this._blendFunctionParameters[n+0]!==e||this._blendFunctionParameters[n+1]!==t||this._blendFunctionParameters[n+2]!==i||this._blendFunctionParameters[n+3]!==s)&&(this._blendFunctionParameters[n+0]=e,this._blendFunctionParameters[n+1]=t,this._blendFunctionParameters[n+2]=i,this._blendFunctionParameters[n+3]=s,this._isBlendFunctionParametersDirty=!0)}setAlphaEquationParameters(e,t,i=0){let s=2*i;(this._blendEquationParameters[s+0]!==e||this._blendEquationParameters[s+1]!==t)&&(this._blendEquationParameters[s+0]=e,this._blendEquationParameters[s+1]=t,this._isBlendEquationParametersDirty=!0)}reset(){this._alphaBlend.fill(!1),this._numTargetEnabled=0,this._blendFunctionParameters.fill(null),this._blendEquationParameters.fill(null),this._blendConstants[0]=null,this._blendConstants[1]=null,this._blendConstants[2]=null,this._blendConstants[3]=null,this._isAlphaBlendDirty=!0,this._isBlendFunctionParametersDirty=!1,this._isBlendEquationParametersDirty=!1,this._isBlendConstantsDirty=!1}apply(e,t=1){if(this.isDirty){if(this._isBlendConstantsDirty&&(e.blendColor(this._blendConstants[0],this._blendConstants[1],this._blendConstants[2],this._blendConstants[3]),this._isBlendConstantsDirty=!1),1===t||!this._supportBlendParametersPerTarget){this._isAlphaBlendDirty&&(this._alphaBlend[0]?e.enable(e.BLEND):e.disable(e.BLEND),this._isAlphaBlendDirty=!1),this._isBlendFunctionParametersDirty&&(e.blendFuncSeparate(this._blendFunctionParameters[0],this._blendFunctionParameters[1],this._blendFunctionParameters[2],this._blendFunctionParameters[3]),this._isBlendFunctionParametersDirty=!1),this._isBlendEquationParametersDirty&&(e.blendEquationSeparate(this._blendEquationParameters[0],this._blendEquationParameters[1]),this._isBlendEquationParametersDirty=!1);return}if(this._isAlphaBlendDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?i:0;this._alphaBlend[t]?e.enableIndexed(e.BLEND,i):e.disableIndexed(e.BLEND,i)}this._isAlphaBlendDirty=!1}if(this._isBlendFunctionParametersDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?4*i:0;e.blendFuncSeparateIndexed(i,this._blendFunctionParameters[t+0],this._blendFunctionParameters[t+1],this._blendFunctionParameters[t+2],this._blendFunctionParameters[t+3])}this._isBlendFunctionParametersDirty=!1}if(this._isBlendEquationParametersDirty){for(let i=0;i<t;i++){let t=i<this._numTargetEnabled?2*i:0;e.blendEquationSeparateIndexed(i,this._blendEquationParameters[t+0],this._blendEquationParameters[t+1])}this._isBlendEquationParametersDirty=!1}}}setAlphaMode(e,t){let i=32774;switch(e){case 0:break;case 7:this.setAlphaBlendFunctionParameters(1,771,1,1,t);break;case 8:case 14:this.setAlphaBlendFunctionParameters(1,771,1,771,t);break;case 2:this.setAlphaBlendFunctionParameters(770,771,1,1,t);break;case 6:this.setAlphaBlendFunctionParameters(1,1,0,1,t);break;case 1:this.setAlphaBlendFunctionParameters(770,1,0,1,t);break;case 3:this.setAlphaBlendFunctionParameters(0,769,1,1,t);break;case 4:this.setAlphaBlendFunctionParameters(774,0,1,1,t);break;case 5:this.setAlphaBlendFunctionParameters(770,769,1,1,t);break;case 9:this.setAlphaBlendFunctionParameters(32769,32770,32771,32772,t);break;case 10:this.setAlphaBlendFunctionParameters(1,769,1,771,t);break;case 11:this.setAlphaBlendFunctionParameters(1,1,1,1,t);break;case 12:this.setAlphaBlendFunctionParameters(772,1,0,0,t);break;case 13:this.setAlphaBlendFunctionParameters(775,769,773,771,t);break;case 15:this.setAlphaBlendFunctionParameters(1,1,1,0,t);break;case 16:this.setAlphaBlendFunctionParameters(775,769,0,1,t);break;case 17:this.setAlphaBlendFunctionParameters(770,771,1,771,t);break;case 18:this.setAlphaBlendFunctionParameters(1,1,1,1,t),i=32775;break;case 19:this.setAlphaBlendFunctionParameters(1,1,1,1,t),i=32776;break;case 20:this.setAlphaBlendFunctionParameters(1,35065,0,1,t);break;case 21:this.setAlphaBlendFunctionParameters(1,0,1,771,t)}this.setAlphaEquationParameters(i,i,t)}}e.s(["AlphaState",0,R],43766);var T=e.i(49399),k=e.i(58724);function B(e,t){if(t){let{requestAnimationFrame:i}=t;if("function"==typeof i)return i(e)}if((0,r.IsWindowObjectExist)()){let{requestAnimationFrame:i}=t||window;if("function"==typeof i)return i(e)}else if("function"==typeof requestAnimationFrame)return requestAnimationFrame(e);return setTimeout(e,16)}class I{get frameId(){return this._frameId}get isWebGPU(){return this._isWebGPU}_getShaderProcessor(e){return this._shaderProcessor}_resetAlphaMode(){this._alphaMode.fill(-1),this._alphaEquation.fill(-1)}get shaderPlatformName(){return this._shaderPlatformName}_clearEmptyResources(){this._emptyTexture=null,this._emptyCubeTexture=null,this._emptyTexture3D=null,this._emptyTexture2DArray=null}get useReverseDepthBuffer(){return this._useReverseDepthBuffer}set useReverseDepthBuffer(e){e!==this._useReverseDepthBuffer&&(this._useReverseDepthBuffer=e,e?this._depthCullingState.depthFunc=518:this._depthCullingState.depthFunc=515)}setColorWrite(e){e!==this._colorWrite&&(this._colorWriteChanged=!0,this._colorWrite=e)}getColorWrite(){return this._colorWrite}get depthCullingState(){return this._depthCullingState}get alphaState(){return this._alphaState}get stencilState(){return this._stencilState}get stencilStateComposer(){return this._stencilStateComposer}_getGlobalDefines(e){if(e){this.isNDCHalfZRange?e.IS_NDC_HALF_ZRANGE="":delete e.IS_NDC_HALF_ZRANGE,this.useReverseDepthBuffer?e.USE_REVERSE_DEPTHBUFFER="":delete e.USE_REVERSE_DEPTHBUFFER,this.useExactSrgbConversions?e.USE_EXACT_SRGB_CONVERSIONS="":delete e.USE_EXACT_SRGB_CONVERSIONS;return}{let e="";return this.isNDCHalfZRange&&(e+="#define IS_NDC_HALF_ZRANGE"),this.useReverseDepthBuffer&&(e&&(e+="\n"),e+="#define USE_REVERSE_DEPTHBUFFER"),this.useExactSrgbConversions&&(e&&(e+="\n"),e+="#define USE_EXACT_SRGB_CONVERSIONS"),e}}_rebuildInternalTextures(){for(let e of this._internalTexturesCache.slice())e._rebuild()}_rebuildRenderTargetWrappers(){for(let e of this._renderTargetWrapperCache.slice())e.textures?.some(e=>15===e.source)||e._rebuild()}_rebuildEffects(){for(let e in this._compiledEffects){let t=this._compiledEffects[e];t._pipelineContext=null,t._prepareEffect()}v.ResetCache()}_rebuildGraphicsResources(){this.wipeCaches(!0),this._rebuildEffects(),this._rebuildComputeEffects?.(),this._rebuildBuffers(),this._rebuildInternalTextures(),this._rebuildTextures(),this._rebuildRenderTargetWrappers(),this.wipeCaches(!0)}_flagContextRestored(){i.Logger.Warn(this.name+" context successfully restored."),this.onContextRestoredObservable.notifyObservers(this),this._contextWasLost=!1}_restoreEngineAfterContextLost(e){setTimeout(()=>{this._clearEmptyResources();let t=this._depthCullingState.depthTest,i=this._depthCullingState.depthFunc,s=this._depthCullingState.depthMask,r=this._stencilState.stencilTest;e(),this._rebuildGraphicsResources(),this._depthCullingState.depthTest=t,this._depthCullingState.depthFunc=i,this._depthCullingState.depthMask=s,this._stencilState.stencilTest=r,this._flagContextRestored()},0)}get isDisposed(){return this._isDisposed}get snapshotRendering(){return!1}set snapshotRendering(e){}get snapshotRenderingMode(){return 0}set snapshotRenderingMode(e){}getClassName(){return"AbstractEngine"}get emptyTexture(){return this._emptyTexture||(this._emptyTexture=this.createRawTexture(new Uint8Array(4),1,1,5,!1,!1,1)),this._emptyTexture}get emptyTexture3D(){return this._emptyTexture3D||(this._emptyTexture3D=this.createRawTexture3D(new Uint8Array(4),1,1,1,5,!1,!1,1)),this._emptyTexture3D}get emptyTexture2DArray(){return this._emptyTexture2DArray||(this._emptyTexture2DArray=this.createRawTexture2DArray(new Uint8Array(4),1,1,1,5,!1,!1,1)),this._emptyTexture2DArray}get emptyCubeTexture(){if(!this._emptyCubeTexture){let e=new Uint8Array(4);this._emptyCubeTexture=this.createRawCubeTexture([e,e,e,e,e,e],1,5,0,!1,!1,1)}return this._emptyCubeTexture}set framebufferDimensionsObject(e){this._framebufferDimensionsObject=e}get activeRenderLoops(){return this._activeRenderLoops}stopRenderLoop(e){if(!e){this._activeRenderLoops.length=0,this._cancelFrame();return}let t=this._activeRenderLoops.indexOf(e);t>=0&&(this._activeRenderLoops.splice(t,1),0==this._activeRenderLoops.length&&this._cancelFrame())}_cancelFrame(){if(this.customAnimationFrameRequester){if(0!==this._frameHandler){this._frameHandler=0;let{cancelAnimationFrame:e}=this.customAnimationFrameRequester;e&&e(this.customAnimationFrameRequester.requestID),delete this.customAnimationFrameRequester.requestID}return}if(0!==this._frameHandler){let e=this._frameHandler;if(this._frameHandler=0,(0,r.IsWindowObjectExist)()){let{cancelAnimationFrame:t}=this.getHostWindow()||window;if("function"==typeof t)return t(e)}else if("function"==typeof cancelAnimationFrame)return cancelAnimationFrame(e);return clearTimeout(e)}}beginFrame(){this.onBeginFrameObservable.notifyObservers(this)}endFrame(){this._frameId++,this.onEndFrameObservable.notifyObservers(this)}get maxFPS(){return this._maxFPS}set maxFPS(e){if(this._maxFPS=e,void 0!==e){if(e<=0){this._minFrameTime=Number.MAX_VALUE;return}this._minFrameTime=1e3/e}}_isOverFrameTime(e){if(!e||void 0===this._maxFPS)return!1;let t=e-this._lastFrameTime;return this._lastFrameTime=e,this._renderAccumulator+=t,this._renderAccumulator<this._minFrameTime||(this._renderAccumulator-=this._minFrameTime,this._renderAccumulator>this._minFrameTime&&(this._renderAccumulator=this._minFrameTime),!1)}_processFrame(e){if(this._frameHandler=0,!this._contextWasLost&&!this._isOverFrameTime(e)){let e=!0;(this.isDisposed||!this.renderEvenInBackground&&this._windowIsBackground)&&(e=!1),e&&(this.beginFrame(),this.skipFrameRender||this._renderViews()||this._renderFrame(),this.endFrame())}}_renderLoop(e){this._processFrame(e),this._activeRenderLoops.length>0&&0===this._frameHandler&&this._queueNewFrameForRenderLoop()}_renderFrame(){for(let e=0;e<this._activeRenderLoops.length;e++)(0,this._activeRenderLoops[e])()}_renderViews(){return!1}_queueNewFrame(e,t){return B(e,t)}_queueNewFrameForRenderLoop(){this.customAnimationFrameRequester?(this.customAnimationFrameRequester.requestID=this._queueNewFrame(this.customAnimationFrameRequester.renderFunction||this._boundRenderFunction,this.customAnimationFrameRequester),this._frameHandler=this.customAnimationFrameRequester.requestID):this._frameHandler=this._queueNewFrame(this._boundRenderFunction,this.getHostWindow())}runRenderLoop(e){-1===this._activeRenderLoops.indexOf(e)&&(this._activeRenderLoops.push(e),1===this._activeRenderLoops.length&&0===this._frameHandler&&this._queueNewFrameForRenderLoop())}getDepthBuffer(){return this._depthCullingState.depthTest}setDepthBuffer(e){this._depthCullingState.depthTest=e}setZOffset(e){this._depthCullingState.zOffset=this.useReverseDepthBuffer?-e:e}getZOffset(){let e=this._depthCullingState.zOffset;return this.useReverseDepthBuffer?-e:e}setZOffsetUnits(e){this._depthCullingState.zOffsetUnits=this.useReverseDepthBuffer?-e:e}getZOffsetUnits(){let e=this._depthCullingState.zOffsetUnits;return this.useReverseDepthBuffer?-e:e}getHostWindow(){return(0,r.IsWindowObjectExist)()?this._renderingCanvas&&this._renderingCanvas.ownerDocument&&this._renderingCanvas.ownerDocument.defaultView?this._renderingCanvas.ownerDocument.defaultView:window:null}get compatibilityMode(){return this._compatibilityMode}set compatibilityMode(e){this._compatibilityMode=!0}_rebuildTextures(){for(let e of this.scenes)e._rebuildTextures();for(let e of this._virtualScenes)e._rebuildTextures()}_releaseRenderTargetWrapper(e){let t=this._renderTargetWrapperCache.indexOf(e);-1!==t&&this._renderTargetWrapperCache.splice(t,1)}get currentViewport(){return this._cachedViewport}setViewport(e,t,i){let s=t||this.getRenderWidth(),r=i||this.getRenderHeight(),n=e.x||0,a=e.y||0;this._cachedViewport=e,this._viewport(n*s,a*r,s*e.width,r*e.height)}createCanvasImage(){return document.createElement("img")}createCanvasPath2D(e){return new Path2D(e)}get description(){let e=this.name+this.version;return this._caps.parallelShaderCompile&&(e+=" - Parallel shader compilation"),e}_createTextureBase(e,t,s,r,n=3,a=null,h=null,l,o,c=null,u=null,_=null,d=null,p,f,m){let g="data:"===(e=e||"").substring(0,5),b="blob:"===e.substring(0,5),C=g&&-1!==e.indexOf(";base64,"),S=u||new k.InternalTexture(this,1);S!==u&&(S.label=e.substring(0,60));let F=e;!this._transformTextureUrl||C||u||c||(e=this._transformTextureUrl(e)),F!==e&&(S._originalUrl=F);let x=e.lastIndexOf("."),v=d||(x>-1?e.substring(x).toLowerCase():"");v.indexOf("?")>-1&&(v=v.split("?")[0]);let D=I.GetCompatibleTextureLoader(v,p);r&&r.addPendingData(S),S.url=e,S.generateMipMaps=!t,S.samplingMode=n,S.invertY=s,S._useSRGBBuffer=this._getUseSRGBBuffer(!!m,t),this._doNotHandleContextLost||(S._buffer=c);let E=null;a&&!u&&(E=S.onLoadedObservable.add(a)),u||this._internalTexturesCache.push(S);let O=(s,u)=>{r&&r.removePendingData(S),e===F?(E&&S.onLoadedObservable.remove(E),y.EngineStore.UseFallbackTexture&&e!==y.EngineStore.FallbackTexture&&this._createTextureBase(y.EngineStore.FallbackTexture,t,S.invertY,r,n,null,h,l,o,c,S),s=(s||"Unknown error")+(y.EngineStore.UseFallbackTexture?" - Fallback texture was used":""),S.onErrorObservable.notifyObservers({message:s,exception:u}),h&&h(s,u)):(i.Logger.Warn(`Failed to load ${e}, falling back to ${F}`),this._createTextureBase(F,t,S.invertY,r,n,a,h,l,o,c,S,_,d,p,f,m))};if(D){let t=async e=>{(await D).loadData(e,S,(e,t,i,s,a,h)=>{h?O("TextureLoader failed to load data"):l(S,v,r,{width:e,height:t},S.invertY,!i,s,()=>(a(),!1),n)},f)};if(c){let e=async e=>{try{await t(e)}catch(e){O("Failed to parse texture data",e)}};c instanceof ArrayBuffer?e(new Uint8Array(c)):ArrayBuffer.isView(c)?e(c):h&&h("Unable to load: only ArrayBuffer or ArrayBufferView is supported",null)}else this._loadFile(e,async e=>{try{await t(new Uint8Array(e))}catch(e){O("Failed to parse texture data",e)}},void 0,r?r.offlineProvider:void 0,!0,(e,t)=>{O("Unable to load "+(e&&e.responseURL,t))})}else{let i=e=>{b&&!this._doNotHandleContextLost&&(S._buffer=e),l(S,v,r,e,S.invertY,t,!1,o,n)};!g||C?c&&("string"==typeof c.decoding||c.close)?i(c):I._FileToolsLoadImage(e||"",i,O,r?r.offlineProvider:null,p,S.invertY&&this._features.needsInvertingBitmap?{imageOrientation:"flipY"}:void 0,this):"string"==typeof c||c instanceof ArrayBuffer||ArrayBuffer.isView(c)||c instanceof Blob?I._FileToolsLoadImage(c,i,O,r?r.offlineProvider:null,p,S.invertY&&this._features.needsInvertingBitmap?{imageOrientation:"flipY"}:void 0,this):c&&i(c)}return S}_rebuildBuffers(){for(let e of this._uniformBuffers)e._rebuildAfterContextLost()}get _shouldUseHighPrecisionShader(){return!!(this._caps.highPrecisionShaderSupported&&this._highPrecisionShadersAllowed)}getHostDocument(){return this._renderingCanvas&&this._renderingCanvas.ownerDocument?this._renderingCanvas.ownerDocument:(0,r.IsDocumentAvailable)()?document:null}getLoadedTexturesCache(){return this._internalTexturesCache}clearInternalTexturesCache(){this._internalTexturesCache.length=0}getCaps(){return this._caps}resetTextureCache(){for(let e in this._boundTexturesCache)Object.prototype.hasOwnProperty.call(this._boundTexturesCache,e)&&(this._boundTexturesCache[e]=null);this._currentTextureChannel=-1}get name(){return this._name}set name(e){this._name=e}static get NpmPackage(){return"babylonjs@9.23.0"}static get Version(){return"9.23.0"}getRenderingCanvas(){return this._renderingCanvas}getAudioContext(){return this._audioContext}getAudioDestination(){return this._audioDestination}setHardwareScalingLevel(e){this._hardwareScalingLevel=e,this.resize()}getHardwareScalingLevel(){return this._hardwareScalingLevel}get doNotHandleContextLost(){return this._doNotHandleContextLost}set doNotHandleContextLost(e){this._doNotHandleContextLost=e}get isStencilEnable(){return this._isStencilEnable}getCreationOptions(){return this._creationOptions}constructor(e,i,s){this._colorWrite=!0,this._colorWriteChanged=!0,this._depthCullingState=new O,this._stencilStateComposer=new P,this._stencilState=new A,this._alphaState=new R(!1),this._alphaMode=Array(8).fill(-1),this._alphaEquation=Array(8).fill(-1),this._activeRequests=[],this._badOS=!1,this._badDesktopOS=!1,this._compatibilityMode=!0,this._internalTexturesCache=[],this._currentRenderTarget=null,this._boundTexturesCache={},this._activeChannel=0,this._currentTextureChannel=-1,this._viewportCached={x:0,y:0,z:0,w:0},this._isWebGPU=!1,this._enableGPUDebugMarkers=!1,this.onCanvasBlurObservable=new t.Observable,this.onCanvasFocusObservable=new t.Observable,this.onNewSceneAddedObservable=new t.Observable,this.onResizeObservable=new t.Observable,this.onCanvasPointerOutObservable=new t.Observable,this.onEffectErrorObservable=new t.Observable,this.disablePerformanceMonitorInBackground=!1,this.disableVertexArrayObjects=!1,this._frameId=0,this.hostInformation={isMobile:!1},this.isFullscreen=!1,this.enableOfflineSupport=!1,this.disableManifestCheck=!1,this.disableContextMenu=!0,this.currentRenderPassId=0,this.isPointerLock=!1,this.postProcesses=[],this.canvasTabIndex=1,this._contextWasLost=!1,this._useReverseDepthBuffer=!1,this.isNDCHalfZRange=!1,this.hasOriginBottomLeft=!0,this._renderTargetWrapperCache=[],this._compiledEffects={},this._isDisposed=!1,this.scenes=[],this._virtualScenes=[],this.onBeforeTextureInitObservable=new t.Observable,this.renderEvenInBackground=!0,this.preventCacheWipeBetweenFrames=!1,this._frameHandler=0,this._activeRenderLoops=[],this.customAnimationFrameRequester=null,this._windowIsBackground=!1,this._boundRenderFunction=e=>this._renderLoop(e),this._lastFrameTime=0,this._renderAccumulator=0,this.skipFrameRender=!1,this.onBeforeShaderCompilationObservable=new t.Observable,this.onAfterShaderCompilationObservable=new t.Observable,this.onBeginFrameObservable=new t.Observable,this.onEndFrameObservable=new t.Observable,this._transformTextureUrl=null,this._uniformBuffers=[],this._storageBuffers=[],this._highPrecisionShadersAllowed=!0,this.onContextLostObservable=new t.Observable,this.onContextRestoredObservable=new t.Observable,this._name="",this.premultipliedAlpha=!0,this.adaptToDeviceRatio=!1,this._lastDevicePixelRatio=1,this._doNotHandleContextLost=!1,this.cullBackFaces=null,this._renderPassNames=["main"],this._fps=60,this._deltaTime=0,this._deterministicLockstep=!1,this._lockstepMaxSteps=4,this._timeStep=1/60,this.onDisposeObservable=new t.Observable,this.onReleaseEffectsObservable=new t.Observable,y.EngineStore.Instances.push(this),this.startTime=E.PrecisionDate.Now,this._stencilStateComposer.stencilGlobal=this._stencilState,D.PerformanceConfigurator.SetMatrixPrecision(!!i.useLargeWorldRendering||!!i.useHighPrecisionMatrix),(0,r.IsNavigatorAvailable)()&&navigator.userAgent&&(this._badOS=/iPad/i.test(navigator.userAgent)||/iPhone/i.test(navigator.userAgent),this._badDesktopOS=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)),i.antialias=e??i.antialias,i.deterministicLockstep=i.deterministicLockstep??!1,i.lockstepMaxSteps=i.lockstepMaxSteps??4,i.timeStep=i.timeStep??1/60,i.stencil=i.stencil??!0,this._audioContext=i.audioEngineOptions?.audioContext??null,this._audioDestination=i.audioEngineOptions?.audioDestination??null,this.premultipliedAlpha=i.premultipliedAlpha??!0,this._doNotHandleContextLost=!!i.doNotHandleContextLost,this._isStencilEnable=!!i.stencil,this.useExactSrgbConversions=i.useExactSrgbConversions??!1,this.canvasTabIndex=i.canvasTabIndex??this.canvasTabIndex;const n=(0,r.IsWindowObjectExist)()&&window.devicePixelRatio||1,a=i.limitDeviceRatio||n;s=s||i.adaptToDeviceRatio||!1,this.adaptToDeviceRatio=s,this._hardwareScalingLevel=s?1/Math.min(a,n):1,this._lastDevicePixelRatio=n,this._creationOptions=i}resize(e=!1){let t,i;if(this.adaptToDeviceRatio){let e=(0,r.IsWindowObjectExist)()&&window.devicePixelRatio||1,t=this._lastDevicePixelRatio/e;this._lastDevicePixelRatio=e,this._hardwareScalingLevel*=t}if((0,r.IsWindowObjectExist)()&&(0,r.IsDocumentAvailable)())if(this._renderingCanvas){let e=this._renderingCanvas.getBoundingClientRect?.();t=this._renderingCanvas.clientWidth||e?.width||this._renderingCanvas.width*this._hardwareScalingLevel||100,i=this._renderingCanvas.clientHeight||e?.height||this._renderingCanvas.height*this._hardwareScalingLevel||100}else t=window.innerWidth,i=window.innerHeight;else t=this._renderingCanvas?this._renderingCanvas.width:100,i=this._renderingCanvas?this._renderingCanvas.height:100;this.setSize(t/this._hardwareScalingLevel,i/this._hardwareScalingLevel,e)}setSize(e,t,i=!1){if(!this._renderingCanvas||(e|=0,t|=0,!i&&this._renderingCanvas.width===e&&this._renderingCanvas.height===t))return!1;if(this._renderingCanvas.width=e,this._renderingCanvas.height=t,this.scenes){for(let e=0;e<this.scenes.length;e++){let t=this.scenes[e];for(let e=0;e<t.cameras.length;e++)t.cameras[e]._currentRenderId=0}this.onResizeObservable.hasObservers()&&this.onResizeObservable.notifyObservers(this)}return!0}createRawTexture(e,t,i,s,r,n,a,h,l,o,c,u){throw(0,T._WarnImport)("engine.rawTexture")}createRawCubeTexture(e,t,i,s,r,n,a,h){throw(0,T._WarnImport)("engine.rawTexture")}createRawTexture3D(e,t,i,s,r,n,a,h,l,o,c){throw(0,T._WarnImport)("engine.rawTexture")}createRawTexture2DArray(e,t,i,s,r,n,a,h,l,o,c,u){throw(0,T._WarnImport)("engine.rawTexture")}_sharedInit(e){this._renderingCanvas=e}_setupMobileChecks(){navigator&&navigator.userAgent&&(this._checkForMobile=()=>{let e=navigator.userAgent;this.hostInformation.isMobile=-1!==e.indexOf("Mobile")||-1!==e.indexOf("Mac")&&(0,r.IsDocumentAvailable)()&&"ontouchend"in document},this._checkForMobile(),(0,r.IsWindowObjectExist)()&&window.addEventListener("resize",this._checkForMobile))}createVideoElement(e){return document.createElement("video")}_reportDrawCall(e=1){this._drawCalls?.addCount(e,!1)}getFps(){return this._fps}getDeltaTime(){return this._deltaTime}isDeterministicLockStep(){return this._deterministicLockstep}getLockstepMaxSteps(){return this._lockstepMaxSteps}getTimeStep(){return 1e3*this._timeStep}_createImageBitmapFromSource(e,t){throw Error("createImageBitmapFromSource is not implemented")}createImageBitmap(e,t){return createImageBitmap(e,t)}resizeImageBitmap(e,t,i){throw Error("resizeImageBitmap is not implemented")}getFontOffset(e){throw Error("getFontOffset is not implemented")}static _CreateCanvas(e,t){if("u"<typeof document)return new OffscreenCanvas(e,t);let i=document.createElement("canvas");return i.width=e,i.height=t,i}createCanvas(e,t){return I._CreateCanvas(e,t)}static _FileToolsLoadImage(e,t,i,s,r,n,h){if(!a.EngineFunctionContext.loadImage)throw(0,T._WarnImport)("FileTools");return a.EngineFunctionContext.loadImage(e,t,i,s,r,n,h)}_loadFile(e,t,i,s,r,n){let h=(0,a._LoadFile)(e,t,i,s,r,n);return this._activeRequests.push(h),h.onCompleteObservable.add(()=>{let e=this._activeRequests.indexOf(h);-1!==e&&this._activeRequests.splice(e,1)}),h}static _FileToolsLoadFile(e,t,i,s,r,n){if(a.EngineFunctionContext.loadFile)return a.EngineFunctionContext.loadFile(e,t,i,s,r,n);throw(0,T._WarnImport)("FileTools")}dispose(){for(this.releaseEffects(),this._isDisposed=!0,this.stopRenderLoop(),this._emptyTexture&&(this._releaseTexture(this._emptyTexture),this._emptyTexture=null),this._emptyCubeTexture&&(this._releaseTexture(this._emptyCubeTexture),this._emptyCubeTexture=null),this._renderingCanvas=null,this.onBeforeTextureInitObservable&&this.onBeforeTextureInitObservable.clear();this.postProcesses.length;)this.postProcesses[0].dispose();for(;this.scenes.length;)this.scenes[0].dispose();for(;this._virtualScenes.length;)this._virtualScenes[0].dispose();for(let e of(this.releaseComputeEffects?.(),v.ResetCache(),this._activeRequests))e.abort();this._boundRenderFunction=null,this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.onResizeObservable.clear(),this.onCanvasBlurObservable.clear(),this.onCanvasFocusObservable.clear(),this.onCanvasPointerOutObservable.clear(),this.onNewSceneAddedObservable.clear(),this.onEffectErrorObservable.clear(),(0,r.IsWindowObjectExist)()&&window.removeEventListener("resize",this._checkForMobile);let e=y.EngineStore.Instances.indexOf(this);e>=0&&y.EngineStore.Instances.splice(e,1),y.EngineStore.Instances.length||(y.EngineStore.OnEnginesDisposedObservable.notifyObservers(this),y.EngineStore.OnEnginesDisposedObservable.clear()),this.onBeginFrameObservable.clear(),this.onEndFrameObservable.clear()}static DefaultLoadingScreenFactory(e){throw(0,T._WarnImport)("LoadingScreen")}static MarkAllMaterialsAsDirty(e,t){for(let i=0;i<y.EngineStore.Instances.length;i++){let s=y.EngineStore.Instances[i];for(let i=0;i<s.scenes.length;i++)s.scenes[i].markAllMaterialsAsDirty(e,t)}}static GetCompatibleTextureLoader(e,t){return null}}I._RenderPassIdCounter=0,I._RescalePostProcessFactory=null,I.CollisionsEpsilon=.001,I.QueueNewFrame=B,e.s(["AbstractEngine",0,I],18405)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,r){let n=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&r.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",n),()=>t.removeEventListener("dblclick",n)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let r=e.lowerRadiusLimit??.01,n=e.upperRadiusLimit??1/0;e.radius=Math.min(n,Math.max(r,e.radius*t))}],2348);var r=e.i(63671);e.s(["ZoomButtons",0,function({onZoom:e,onReset:n}){let i="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,r.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,r.jsx)("button",{type:"button","aria-label":"Zoom in",className:i,onClick:()=>e(t),children:"+"}),(0,r.jsx)("button",{type:"button","aria-label":"Zoom out",className:i,onClick:()=>e(1.2),children:"−"}),n?(0,r.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:i,onClick:n,children:(0,r.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,r.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,r.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},76421,e=>{"use strict";var t=e.i(63671),r=e.i(48093);let n={status:"idle",gated:!1,count:0};var i=e.i(60614),l=e.i(2348),s=e.i(2413);let a=new Set,o=[{key:"interaction",label:"Clicks & picks",color:"#fb923c",types:new Set(["pointer_click","mesh_interaction"])},{key:"actors",label:"Scene actors",color:"#e879f9",types:new Set(["node_transform"])},{key:"custom",label:"Custom",color:"#34d399",types:new Set(["custom"])},{key:"camera",label:"Camera",color:"#38bdf8",types:new Set(["camera_sample"])},{key:"pointer",label:"Pointer",color:"#94a3b8",types:new Set(["pointer_move","pointer_down","pointer_up"])},{key:"perf",label:"Perf",color:"#a78bfa",types:new Set(["frame_perf"])},{key:"lifecycle",label:"Lifecycle",color:"#f472b6",types:new Set(["session_start","session_end","scene_change","focus_change","visibility_change","viewport_resize","context_lost","context_restored","runtime_error","capability_change","input_action","resource_sample","compile_stall","mesh_visibility","hover_dwell"])}];function u(e,t,r){let n=Math.max(1,r),i=new Map;o.forEach((e,t)=>{for(let r of e.types)i.set(r,t)});let l=o.map(()=>new Set);for(let r of e){let e=i.get(r.type);if(void 0===e)continue;let s=Math.min(1,Math.max(0,(r.ts-t)/n));l[e].add(Math.round(600*s))}return o.map((e,t)=>({key:e.key,label:e.label,color:e.color,marks:[...l[t]].sort((e,t)=>e-t).map(e=>e/600)})).filter(e=>e.marks.length>0)}function c(e){let t=Math.max(0,Math.round(e/1e3)),r=Math.floor(t/60);return`${r}:${(t%60).toString().padStart(2,"0")}`}function d(e){let t=e.slice(e.lastIndexOf("/")+1);return t.length>20?`${t.slice(0,19)}\u2026`:t}function p({lanes:e,duration:r,progress:n,onSeek:i,hiddenTypes:l}){let s=e.filter(e=>{let t=o.find(t=>t.key===e.key);if(!t)return!0;for(let e of t.types)if(!l.has(e))return!0;return!1});if(0===s.length)return null;let a=`${Math.min(100,Math.max(0,n/Math.max(1,r)*100))}%`;return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] text-fg-muted",children:s.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:e.color}}),e.label,(0,t.jsxs)("span",{className:"tabular-nums text-fg-muted",children:["(",e.marks.length,")"]})]},e.key))}),(0,t.jsxs)("button",{type:"button","aria-label":"Event timeline — click to seek",className:"relative block w-full cursor-pointer select-none rounded-md border border-edge bg-ink/60 p-1.5 text-left",onClick:e=>{var t;let n;return t=e.clientX,void i(Math.min(1,Math.max(0,(t-(n=e.currentTarget.getBoundingClientRect()).left)/(n.width||1)))*r)},children:[(0,t.jsx)("div",{className:"flex flex-col gap-1",children:s.map(e=>(0,t.jsx)("div",{className:"relative h-2.5 rounded-sm bg-white/5",children:e.marks.map((r,n)=>(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px",style:{left:`${100*r}%`,backgroundColor:e.color,opacity:.85}},n))},e.key))}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-1 w-px bg-saffron",style:{left:a}})]})]})}e.s(["SessionReplayView",0,function({api:o,sessionId:h,hiddenTypes:m,isLive:f=!1}){let b=(0,r.useRef)(null),g=(0,r.useRef)(null),y=(0,r.useRef)(0),x=(0,r.useRef)(m??a),w=(0,r.useRef)(!1),v=(0,r.useRef)(null),k=(0,r.useRef)(!1),M=(0,r.useRef)(!1),C=(0,r.useRef)(null),j=(0,r.useRef)(0),N=(0,r.useRef)([]),S=(0,r.useRef)([]),R=(0,r.useRef)([]),_=(0,r.useRef)(!0),P=(0,r.useRef)("birdview"),$=(0,r.useRef)(null),L=(0,r.useRef)(null),I=(0,r.useRef)([]),V=(0,r.useRef)(null),A=(0,r.useRef)(null),[E,T]=(0,r.useState)("idle"),[z,Z]=(0,r.useState)(null),[F,O]=(0,r.useState)(0),[W,B]=(0,r.useState)(0),[H,K]=(0,r.useState)(!1),[q,U]=(0,r.useState)([]),[X,D]=(0,r.useState)([]),[G,Y]=(0,r.useState)([]),[J,Q]=(0,r.useState)(!0),[ee,et]=(0,r.useState)(!1),[er,en]=(0,r.useState)("birdview"),[ei,el]=(0,r.useState)(null),[es,ea]=(0,r.useState)(!1),[eo,eu]=(0,r.useState)(!1),[ec,ed]=(0,r.useState)(null);(0,r.useEffect)(()=>{_.current=J},[J]),(0,r.useEffect)(()=>{M.current=H},[H]),(0,r.useEffect)(()=>{k.current=ee},[ee]),(0,r.useEffect)(()=>{P.current=er,w.current=!0},[er]),(0,r.useEffect)(()=>{x.current=m??a,w.current=!0},[m]),(0,r.useEffect)(()=>{let t=b.current;if(!t)return;let r=!1,n=null;return T("loading"),Z(null),K(!1),O(0),B(0),U([]),D([]),Y([]),el(null),$.current=null,N.current=[],S.current=[],R.current=[],y.current=0,V.current=null,I.current=[],L.current=null,ea(!1),eu(!1),ed(null),(async()=>{try{let[{Engine:s},{Scene:a},{ArcRotateCamera:c},{UniversalCamera:d},{HemisphericLight:p},{Vector3:m,Color3:b,Color4:A,Matrix:E},{MeshBuilder:z},{StandardMaterial:Z},{ReplayPlayer:F}]=await Promise.all([e.A(69721),e.A(341),e.A(21342),e.A(98211),e.A(72976),e.A(35285),e.A(42598),e.A(97938),e.A(85461),e.A(82926)]),W=await o.sessionEvents(h);if(r)return;if(0===W.length)return void T("empty");let H=W[0].ts,q=W[0].ts;for(let e of W)e.ts<H&&(H=e.ts),e.ts>q&&(q=e.ts);let X=await (0,i.mergeSceneProxies)(o,{since:H-1,until:q+1});if(r)return;let G=[...W].sort((e,t)=>e.ts-t.ts),J=G[0].ts,Q=[],ee=[],er=new Map,en=null;for(let e of G){let t=e.ts-J;if("camera_sample"===e.type){en=[e.position[0],e.position[1],e.position[2]],Q.push({at:t,position:en,direction:[e.direction[0],e.direction[1],e.direction[2]],..."number"==typeof e.fov?{fov:e.fov}:{}});continue}if("node_transform"===e.type){if(e.boneId)continue;let r=e.childPath?`${e.nodeId}/${e.childPath}`:e.nodeId,n=er.get(r);n||(n=[],er.set(r,n)),n.push({at:t,position:[e.position[0],e.position[1],e.position[2]]});continue}if("pointer_click"===e.type&&e.hitPoint){let r=e.ray?.origin??en;if(!r)continue;ee.push({at:t,type:"pointer_click",origin:[r[0],r[1],r[2]],hit:[e.hitPoint[0],e.hitPoint[1],e.hitPoint[2]],...e.hitMesh?{mesh:e.hitMesh}:{}});continue}if("mesh_interaction"===e.type&&e.point){if(!en)continue;ee.push({at:t,type:"mesh_interaction",origin:[en[0],en[1],en[2]],hit:[e.point[0],e.point[1],e.point[2]],...e.mesh?{mesh:e.mesh}:{}})}}if(0===Q.length&&0===ee.length&&0===er.size)return void T("empty");let ei=new s(t,!0,{preserveDrawingBuffer:!1}),es=new a(ei);es.clearColor=new A(.04,.05,.07,1),L.current=es;let ea=new c("birdview-cam",-Math.PI/2,.22,12,m.Zero(),es);ea.attachControl(t,!0),(0,l.disableWheelZoom)(ea),g.current=ea,new p("replay-light",new m(0,1,0),es);let eo=new d("replay-follow-cam",m.Zero(),es);eo.minZ=.05,eo.fov=Math.PI/3,es.activeCamera=ea;let eu="birdview",ec=z.CreateGround("replay-ground",{width:20,height:20,subdivisions:20},es),ed=new Z("replay-ground-mat",es);ed.diffuseColor=new b(.12,.14,.18),ed.wireframe=!0,ec.material=ed;let ep=new Set(er.keys()),eh=new Set(Array.from(ep,e=>e.slice(e.lastIndexOf("/")+1))),em=[],ef=[],eb=new Set,eg=e=>{if(eb.has(e.name)||(e=>{if(e.path){for(let t of ep)if(e.path===t||e.path.endsWith(`/${t}`))return!0}return eh.has(e.name)})(e))return!1;eb.add(e.name);let t=e.aabb,r=Math.max(t[3]-t[0],.001),n=Math.max(t[4]-t[1],.001),i=Math.max(t[5]-t[2],.001),l=z.CreateBox(`replay-proxy-${e.name}`,{width:r,height:n,depth:i},es);l.position=new m((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2);let s=new Z(`replay-proxy-mat-${e.name}`,es);return s.wireframe=!0,s.disableLighting=!0,s.emissiveColor=new b(.32,.4,.52),s.alpha=.35,l.material=s,l.isPickable=!1,V.current&&l.setEnabled(!1),ef.push(l),em.push({name:e.name,center:new m((t[0]+t[3])/2,t[4],(t[2]+t[5])/2)}),!0};for(let e of X)eg(e);N.current=em,S.current=em.map(()=>null),D(em.map(e=>e.name)),I.current=ef;let ey=async()=>{let e=await (0,i.mergeSceneProxies)(o,{since:H-1}).catch(()=>null);if(r||!e)return;let t=!1;for(let r of e)eg(r)&&(t=!0);t&&(N.current=em,S.current=em.map((e,t)=>S.current[t]??null),D(em.map(e=>e.name)),w.current=!0)},ex=[[.91,.47,.98],[.4,.95,.6],[.98,.8,.3],[.45,.85,1]],ew=e=>{let t=e.indexOf("/");return -1===t?e:e.slice(0,t)},ev=[],ek=new Map,eM=0,eC=(e,t,r)=>{let n=z.CreateSphere(`replay-actor-${e}`,{diameter:.5,segments:12},es),i=new Z(`replay-actor-mat-${e}`,es);i.disableLighting=!0;let l=ex[eM%ex.length];i.emissiveColor=new b(l[0],l[1],l[2]),n.material=i,n.isPickable=!1,n.isVisible=!1,eM++;let s={key:e,mesh:n,samples:r,driveKey:t};return ev.push(s),ek.set(e,s),s},ej=new Map,eN=new Map;for(let[e,t]of er){if(0===t.length)continue;let r=ew(e);if(e===r)ej.set(r,t);else{let n=eN.get(r);(!n||t.length>n.samples.length)&&eN.set(r,{key:e,samples:t})}}for(let e of new Set([...ej.keys(),...eN.keys()])){let t=ej.get(e);if(t)eC(e,e,t);else{let t=eN.get(e);eC(e,t.key,t.samples)}}R.current=ev.map(()=>null),Y(ev.map(e=>e.key));let eS=(e,t)=>{if(0===e.length||t<e[0].at)return null;let r=0,n=e.length-1,i=-1;for(;r<=n;){let l=r+n>>1;e[l].at<=t?(i=l,r=l+1):n=l-1}if(i<0)return null;let l=e[i],s=e[i+1];if(!s)return l.position;let a=s.at-l.at;if(a<=0)return l.position;let o=Math.max(0,Math.min(1,(t-l.at)/a));return[l.position[0]+(s.position[0]-l.position[0])*o,l.position[1]+(s.position[1]-l.position[1])*o,l.position[2]+(s.position[2]-l.position[2])*o]},eR=1,e_=1.4,eP=z.CreateSphere("replay-camera-origin",{diameter:.35,segments:12},es),e$=new Z("replay-camera-origin-mat",es);e$.disableLighting=!0,e$.emissiveColor=new b(.6,.9,1),eP.material=e$;let eL=z.CreateLines("replay-camera-frustum",{points:[m.Zero(),new m(0,0,1)]},es);eL.color=new b(.7,.95,1),eL.isPickable=!1;let eI=z.CreateCylinder("replay-camera-cone",{height:1,diameterTop:0,diameterBottom:1,tessellation:24},es);eI.bakeTransformIntoVertices(E.RotationX(-Math.PI/2).multiply(E.Translation(0,0,.5)));let eV=new Z("replay-camera-cone-mat",es);eV.disableLighting=!0,eV.emissiveColor=new b(.4,.78,1),eV.alpha=.16,eV.backFaceCulling=!1,eI.material=eV,eI.isPickable=!1,eI.isVisible=!1;let eA=(e,t,r,n)=>{if(e?.dispose(),0===r.length)return null;let i=z.CreateLineSystem(t,{lines:r,...n?{colors:n,useVertexAlpha:!0}:{}},es);return i.isPickable=!1,i},eE=null,eT=null,ez=null,eZ=()=>{let e=x.current,t=[],r=[];for(let n of ee){if(e.has(n.type))continue;let[i,l,s]=n.hit,a="mesh_interaction"===n.type?new A(.45,.85,1,.32):new A(1,.7,.35,.32);t.push([new m(i-.1,l,s),new m(i+.1,l,s)]),t.push([new m(i,l-.1,s),new m(i,l+.1,s)]),t.push([new m(i,l,s-.1),new m(i,l,s+.1)]),r.push([a,a],[a,a],[a,a])}ez=eA(ez,"replay-persistent-marks",t,r)};eZ();let eF=z.CreateSphere("replay-glow",{diameter:1,segments:12},es),eO=new Z("replay-glow-mat",es);eO.disableLighting=!0,eO.emissiveColor=new b(1,.62,.2),eO.alpha=0,eF.material=eO,eF.isPickable=!1,eF.isVisible=!1;let eW=1/0,eB=1/0,eH=1/0,eK=-1/0,eq=-1/0,eU=-1/0,eX=!1,eD=e=>{eW=Math.min(eW,e[0]),eB=Math.min(eB,e[1]),eH=Math.min(eH,e[2]),eK=Math.max(eK,e[0]),eq=Math.max(eq,e[1]),eU=Math.max(eU,e[2])},eG=()=>{let e;if(eX||!Number.isFinite(eW))return;let t=(eW+eK)/2,r=(eB+eq)/2,n=(eH+eU)/2,i=eK-eW,l=eq-eB,s=eU-eH,a=Math.sqrt(i*i+l*l+s*s);ea.setTarget(new m(t,r,n)),e=1.3*a,ea.radius=Number.isFinite(e)?Math.max(8,e):12,eX=!0};for(let e of Q)eD(e.position);for(let e of ee)eD(e.origin),eD(e.hit);for(let e of er.values())for(let t of e)eD(t.position);for(let e of X)eD(e.aabb.slice(0,3)),eD(e.aabb.slice(3,6));eG();{let e=eK-eW,t=eq-eB,r=eU-eH,n=Number.isFinite(e)?Math.sqrt(e*e+t*t+r*r):0,i=Math.min(Math.max(.035*n,.45),Math.max(.45,.18*n));eR=i/.35,e_=Math.max(.16*n,3.2*i,1.4),eP.scaling.setAll(eR)}let eY=-1,eJ=e=>{var n;let i=w.current;if(!i&&e===eY)return;w.current=!1,eY=e,i&&eZ();let l=x.current;(n=P.current)!==eu&&(eu=n,"follow"===n?(ea.detachControl(),es.activeCamera=eo):(es.activeCamera=ea,ea.attachControl(t,!0)));let s="follow"===P.current,a=l.has("camera_sample")?null:(e=>{if(0===Q.length)return null;let t=0,r=Q.length-1,n=-1;for(;t<=r;){let i=t+r>>1;Q[i].at<=e?(n=i,t=i+1):r=i-1}return n>=0?Q[n]:null})(e);if(a){eP.position.set(a.position[0],a.position[1],a.position[2]);let e=a.direction,t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])||1,r=e_,n=new m(a.position[0]+e[0]/t*r,a.position[1]+e[1]/t*r,a.position[2]+e[2]/t*r);if(s)eP.isVisible=!1,eL.isVisible=!1,eI.isVisible=!1,eo.position.set(a.position[0],a.position[1],a.position[2]),eo.setTarget(n),a.fov&&a.fov>0&&(eo.fov=a.fov);else{eP.isVisible=!0,eL.isVisible=!0,eL=z.CreateLines("replay-camera-frustum",{points:[eP.position.clone(),n],instance:eL},es);let e=(a.fov&&a.fov>0?a.fov:Math.PI/3)/2,t=r*Math.tan(e);eI.isVisible=!0,eI.position.copyFrom(eP.position),eI.lookAt(n),eI.scaling.set(2*t,2*t,r)}}else eP.isVisible=!1,eL.isVisible=!1,eI.isVisible=!1;let o=l.has("node_transform");for(let t of ev){let r=o?null:eS(t.samples,e);if(!r){t.mesh.isVisible=!1;continue}t.mesh.isVisible=!0,t.mesh.position.set(r[0],r[1],r[2])}let u=ee.filter(t=>!l.has(t.type)&&t.at<=e&&t.at>=e-2200),c=[],d=[],p=[],h=[],f=null;for(let t of u){let r=e-t.at,n=Math.max(0,Math.min(1,1-r/2200)),i=new A(1,.62,.2,.18+.72*n),l=new m(t.origin[0],t.origin[1],t.origin[2]),s=new m(t.hit[0],t.hit[1],t.hit[2]);c.push([l,s]),d.push([i,i]);let a=.12+.08*n;p.push([new m(s.x-a,s.y,s.z),new m(s.x+a,s.y,s.z)]),p.push([new m(s.x,s.y-a,s.z),new m(s.x,s.y+a,s.z)]),p.push([new m(s.x,s.y,s.z-a),new m(s.x,s.y,s.z+a)]);let o=new A(1,.78,.42,.22+.72*n);if(h.push([o,o],[o,o],[o,o]),r<=900){let e=1-r/900;(!f||e>f.t)&&(f={hit:t.hit,t:e})}}if(f){let e=.25+.9*f.t;eF.isVisible=!0,eF.scaling.set(e,e,e),eF.position.set(f.hit[0],f.hit[1],f.hit[2]),eO.alpha=.12+.5*f.t}else eF.isVisible=!1;let b=null,g=-1/0;for(let e of u)e.mesh&&e.at>g&&(g=e.at,b=e.mesh);b!==$.current&&($.current=b,r||el(b)),eE=eA(eE,"replay-trail-lines",c,d),eT=eA(eT,"replay-trail-hits",p,h)},eQ=G.length>0?G[G.length-1].ts-J:0,e0=eQ,e1=G.length>0?G[G.length-1].ts:-1/0,e2=G.map(e=>({type:e.type,ts:e.ts})),e3=0,e5=null;if(f)v.current=null,C.current=e=>{if(r)return;let t="number"==typeof e.ts?e.ts:NaN;if(!Number.isFinite(t)||t<=e1)return;e1=t;let n=t-J;if(n>e0&&(e0=n),n>eQ&&(eQ=n),e2.push({type:e.type,ts:t}),"camera_sample"===e.type){let t=e.position,r=e.direction;if(t&&r){let i=[t[0],t[1],t[2]];en=i;let l="number"==typeof e.fov?e.fov:void 0;Q.push({at:n,position:i,direction:[r[0],r[1],r[2]],...void 0!==l?{fov:l}:{}}),eD(i),eG()}}else if("pointer_click"===e.type){let t=e.hitPoint,r=e.ray,i=r?.origin??en;if(t&&i){let r="string"==typeof e.hitMesh?e.hitMesh:void 0;ee.push({at:n,type:"pointer_click",origin:[i[0],i[1],i[2]],hit:[t[0],t[1],t[2]],...r?{mesh:r}:{}}),eD(t),w.current=!0}}else if("mesh_interaction"===e.type){let t=e.point;if(t&&en){let r="string"==typeof e.mesh?e.mesh:void 0;ee.push({at:n,type:"mesh_interaction",origin:[en[0],en[1],en[2]],hit:[t[0],t[1],t[2]],...r?{mesh:r}:{}}),eD(t),w.current=!0}}else if("node_transform"===e.type){let t=e.position;if(e.boneId||"string"!=typeof e.nodeId||!t)return;let r="string"==typeof e.childPath?e.childPath:void 0,i=r?`${e.nodeId}/${r}`:e.nodeId;((e,t)=>{let r=ew(e),n=ek.get(r);if(!n){n=eC(r,e,[]);let t=R.current;R.current=ev.map((e,r)=>t[r]??null),Y(ev.map(e=>e.key))}e===n.driveKey?n.samples.push(t):e===r&&n.driveKey!==r&&(n.driveKey=r,n.samples.length=0,n.samples.push(t))})(i,{at:n,position:[t[0],t[1],t[2]]}),eD(t)}let i=performance.now();i-e3>250&&(e3=i,U(u(e2,J,Math.max(1,eQ)))),k.current&&n>y.current&&(y.current=n)},j.current=eQ,y.current=eQ,k.current=!0,et(!0),K(!1),O(eQ),B(eQ),U(u(e2,J,Math.max(1,eQ))),eJ(eQ),e5=setInterval(()=>void ey(),4e3);else{let e=new F(W,{reset(){},apply(){}},{onProgress:e=>{r||(y.current=e,B(e))},onComplete:()=>{r||K(!1)}});v.current=e,O(e.durationMs),U(u(G,J,e.durationMs)),e.update(0),eJ(0)}let e4=E.Identity(),e8=new Map,e6=e=>{let t=e8.get(e);if(t)return t;let r={w:e.offsetWidth||60,h:e.offsetHeight||16};return e.offsetWidth>0&&e8.set(e,r),r},e9=performance.now(),e7=0;ei.runRenderLoop(()=>{if(f){let e=performance.now(),t=e-e9;if(e9=e,k.current)y.current+=t,y.current>eQ&&(eQ=y.current),j.current=eQ,B(y.current),e-e7>250&&(e7=e,O(eQ));else if(M.current){let e=y.current+t;e>=eQ&&(e=eQ),y.current=e,B(e)}}eJ(y.current),es.render(),(()=>{if(!_.current)return;let e=t.clientWidth||ei.getRenderWidth(),r=t.clientHeight||ei.getRenderHeight(),n=ea.viewport.toGlobal(e,r),i=es.getTransformMatrix(),l=$.current,s=e=>e.slice(e.lastIndexOf("/")+1),a=e=>!!l&&(l===e||s(l)===s(e)||e.endsWith(`/${l}`)||l.endsWith(`/${e}`)),o=[],u=N.current,c=S.current;for(let e=0;e<u.length;e++){let t=c[e];if(!t)continue;let r=m.Project(u[e].center,e4,i,n);if(r.z<0||r.z>1){t.style.opacity="0";continue}o.push({el:t,x:r.x,y:r.y,liftPct:140,highlighted:a(u[e].name)})}let d=R.current;for(let e=0;e<ev.length;e++){let t=d[e];if(!t)continue;let r=ev[e].mesh;if(!r.isVisible){t.style.opacity="0";continue}let l=m.Project(r.position,e4,i,n);if(l.z<0||l.z>1){t.style.opacity="0";continue}o.push({el:t,x:l.x,y:l.y,liftPct:180,highlighted:a(ev[e].key)})}o.sort((e,t)=>e.highlighted!==t.highlighted?e.highlighted?-1:1:e.y-t.y||e.x-t.x);let p=[];for(let e of o){let{w:t,h:r}=e6(e.el),n=e.x-t/2,i=e.x+t/2,l=e.y-e.liftPct/100*r,s=l,a=!0,o=0;for(;a&&o++<256;)for(let e of(a=!1,p))n<e.right&&i>e.left&&s<e.bottom&&s+r>e.top&&(s=e.bottom+1,a=!0);p.push({left:n,right:i,top:s,bottom:s+r});let u=s-l;e.el.style.opacity="1",e.el.style.zIndex=e.highlighted?"10":"",e.el.style.transform=`translate(${e.x}px, ${e.y+u}px) translate(-50%, -${e.liftPct}%)`}})()});let te=()=>ei.resize();window.addEventListener("resize",te),T("ready"),n=()=>{window.removeEventListener("resize",te),e5&&clearInterval(e5),C.current=null,v.current?.pause(),eL.dispose(),eI.dispose(),eE?.dispose(),eT?.dispose(),ez?.dispose(),eF.dispose(),V.current?.dispose(),V.current=null,I.current=[],L.current=null,es.dispose(),ei.dispose(),g.current=null,v.current=null}}catch(e){if(r)return;T("error"),Z(e instanceof Error?e.message:"Failed to load replay.")}})(),()=>{r=!0,n?.()}},[o,h,f]);let ep=(0,r.useCallback)(()=>{if(f){et(!1),k.current=!1,K(e=>{let t=!e;return M.current=t,t});return}let e=v.current;e&&K(t=>(t?e.pause():e.play(),!t))},[f]),eh=(0,r.useCallback)(e=>{if(f){et(!1),k.current=!1,K(!1),M.current=!1,y.current=e,B(e);return}let t=v.current;t&&(t.pause(),t.seek(e),K(!1),y.current=e,B(e))},[f]),em=(0,r.useCallback)(()=>{et(!0),k.current=!0,K(!1),M.current=!1,y.current=j.current,B(j.current)},[]),{gated:ef}=function(e,t,i,l,s){let[a,o]=(0,r.useState)(n),u=(0,r.useRef)(l),c=(0,r.useRef)(s);return u.current=l,c.current=s,(0,r.useEffect)(()=>i?e.liveSession(t,e=>u.current(e),{onReset:()=>c.current(),onState:o}):void o(n),[e,t,i]),a}(o,h,f&&"ready"===E,e=>C.current?.(e),()=>{}),eb=(0,r.useCallback)(e=>{if(!ei)return!1;if(ei===e)return!0;let t=e=>e.slice(e.lastIndexOf("/")+1);return t(ei)===t(e)||e.endsWith(`/${ei}`)||ei.endsWith(`/${e}`)},[ei]),eg=(0,r.useCallback)(async t=>{let r=L.current;if(r){eu(!0),ed(`Loading ${t.name}…`);try{let[{loadSceneBackdrop:n}]=await Promise.all([e.A(3633),e.A(80610)]);if(L.current!==r)return;V.current?.dispose();let i=await n(r,t);if(L.current!==r)return void i.dispose();for(let e of(V.current=i,I.current))e.setEnabled(!1);w.current=!0,ea(!0),ed(`Loaded ${t.name} (${i.meshes.length} meshes).`)}catch(e){ed(e instanceof Error?e.message:"Could not load model.")}finally{eu(!1)}}},[]),ey=(0,r.useCallback)(e=>{let t=e.target.files?.[0];e.target.value="",t&&eg(t)},[eg]),ex=(0,r.useCallback)(()=>{for(let e of(V.current?.dispose(),V.current=null,I.current))e.setEnabled(!0);w.current=!0,ea(!1),ed(null)},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:b,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),(0,t.jsxs)("div",{className:`pointer-events-none absolute inset-0 overflow-hidden ${J?"":"hidden"}`,children:[X.map((e,r)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(S.current[r]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eb(e)?"bg-amber/30 text-white ring-2 ring-amber shadow-lg shadow-amber/30":"bg-ink/80 text-saffron ring-1 ring-amber/30"}`,children:d(e)},e)),G.map((e,r)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(R.current[r]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${eb(e)?"bg-fuchsia-400/30 text-white ring-2 ring-fuchsia-300 shadow-lg shadow-fuchsia-500/30":"bg-ink/80 text-fuchsia-300 ring-1 ring-fuchsia-400/30"}`,children:d(e)},`actor-${e}`))]}),"ready"===E&&(X.length>0||G.length>0)?(0,t.jsx)("button",{type:"button",onClick:()=>Q(e=>!e),className:"absolute left-3 top-3 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs font-medium text-fg transition hover:bg-ink hover:text-white","aria-pressed":J?"true":"false",children:J?"Hide labels":"Show labels"}):null,"ready"===E&&"birdview"===er?(0,t.jsx)(s.ZoomButtons,{onZoom:e=>g.current&&(0,l.stepZoom)(g.current,e)}):null,"ready"!==E?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===E?"Loading replay…":"empty"===E?"No replayable events (raw retention may be disabled).":"error"===E?z??"Replay unavailable.":null}):null]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:ep,disabled:"ready"!==E,className:"rounded-md bg-amber px-3 py-1.5 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-40",children:H?"Pause":"Play"}),f?(0,t.jsxs)("button",{type:"button",onClick:em,disabled:"ready"!==E,"aria-pressed":ee?"true":"false",className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition disabled:opacity-40 ${ee?"bg-rose-500/20 text-rose-300 ring-1 ring-rose-400/40":"border border-edge text-fg hover:bg-ink hover:text-white"}`,children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${ee?"animate-pulse bg-rose-400":"bg-fg-muted"}`}),ee?"LIVE":"Resume live"]}):null,(0,t.jsxs)("div",{role:"group","aria-label":"Camera view",className:"flex items-center rounded-md border border-edge p-0.5 text-xs font-medium",children:[(0,t.jsx)("button",{type:"button",onClick:()=>en("birdview"),disabled:"ready"!==E,"aria-pressed":"birdview"===er?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"birdview"===er?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Birdview"}),(0,t.jsx)("button",{type:"button",onClick:()=>en("follow"),disabled:"ready"!==E,"aria-pressed":"follow"===er?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"follow"===er?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Follow camera"})]}),(0,t.jsx)("span",{className:"w-12 text-right font-mono text-xs tabular-nums text-fg-muted",children:c(W)}),(0,t.jsx)("input",{type:"range",min:0,max:Math.max(1,F),step:50,value:Math.min(W,F),onChange:e=>eh(Number(e.target.value)),disabled:"ready"!==E,className:"flex-1 accent-amber"}),(0,t.jsx)("span",{className:"w-12 font-mono text-xs tabular-nums text-fg-muted",children:c(F)})]}),"ready"===E?(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,t.jsx)("input",{ref:A,type:"file",accept:".glb,.gltf,model/gltf-binary,model/gltf+json",onChange:ey,className:"hidden"}),(0,t.jsx)("button",{type:"button",onClick:()=>A.current?.click(),disabled:eo,className:"rounded-md border border-edge bg-ink/80 px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:eo?"Loading model…":es?"Replace model (.glb)":"Load model (.glb)"}),es?(0,t.jsx)("button",{type:"button",onClick:ex,disabled:eo,className:"rounded-md border border-edge px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:"Remove model"}):null,ec?(0,t.jsx)("span",{className:"text-xs text-fg-muted",role:"status",children:ec}):(0,t.jsx)("span",{className:"text-xs text-fg-muted",children:"Load a glTF model to replace the wireframe boxes with your real scene."})]}):null,"ready"===E?(0,t.jsx)(p,{lanes:q,duration:F,progress:W,onSeek:eh,hiddenTypes:m??a}):null,f&&ef&&"ready"===E?(0,t.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Live follow is unavailable — raw session retention is disabled on the collector."}):null]})}],76421)}]);
|