@uptimizr/dashboard 0.4.7 → 1.0.0
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/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/1k8erl2uygr8g.js +1 -0
- 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/221j_mhvdpitn.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/2aanowvpmkmvj.js +1 -0
- 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/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/34g070edw165e.js +3 -0
- 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/{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 +10 -10
- 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/0thw099xk3_0p.js +0 -3
- 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/133glnfos64oo.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 → ThV8NNsoOCsJ6Q9-7H2dV}/_buildManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → ThV8NNsoOCsJ6Q9-7H2dV}/_clientMiddlewareManifest.js +0 -0
- /package/out/_next/static/{A1hxMz783bIWo0Q9qqV3L → ThV8NNsoOCsJ6Q9-7H2dV}/_ssgManifest.js +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,48329,e=>{"use strict";var t,r,s,o,a,i,n=e.i(85789);class c{constructor(e,t){if(this.data=e,this.isInvalid=!1,!c.IsValid(e)){this.isInvalid=!0,n.Logger.Error("texture missing KTX identifier");return}const r=Uint32Array.BYTES_PER_ELEMENT,s=new DataView(this.data.buffer,this.data.byteOffset+12,13*r),o=0x4030201===s.getUint32(0,!0);if(this.glType=s.getUint32(+r,o),this.glTypeSize=s.getUint32(2*r,o),this.glFormat=s.getUint32(3*r,o),this.glInternalFormat=s.getUint32(4*r,o),this.glBaseInternalFormat=s.getUint32(5*r,o),this.pixelWidth=s.getUint32(6*r,o),this.pixelHeight=s.getUint32(7*r,o),this.pixelDepth=s.getUint32(8*r,o),this.numberOfArrayElements=s.getUint32(9*r,o),this.numberOfFaces=s.getUint32(10*r,o),this.numberOfMipmapLevels=s.getUint32(11*r,o),this.bytesOfKeyValueData=s.getUint32(12*r,o),0!==this.glType){n.Logger.Error("only compressed formats currently supported"),this.isInvalid=!0;return}if(this.numberOfMipmapLevels=Math.max(1,this.numberOfMipmapLevels),0===this.pixelHeight||0!==this.pixelDepth){n.Logger.Error("only 2D textures currently supported"),this.isInvalid=!0;return}if(0!==this.numberOfArrayElements){n.Logger.Error("texture arrays not currently supported"),this.isInvalid=!0;return}if(this.numberOfFaces!==t){n.Logger.Error("number of faces expected"+t+", but found "+this.numberOfFaces),this.isInvalid=!0;return}this.loadType=c.COMPRESSED_2D}uploadLevels(e,t){switch(this.loadType){case c.COMPRESSED_2D:this._upload2DCompressedLevels(e,t);case c.TEX_2D:case c.COMPRESSED_3D:case c.TEX_3D:}}_upload2DCompressedLevels(e,t){let r=c.HEADER_LEN+this.bytesOfKeyValueData,s=this.pixelWidth,o=this.pixelHeight,a=t?this.numberOfMipmapLevels:1;for(let t=0;t<a;t++){let a=new Int32Array(this.data.buffer,this.data.byteOffset+r,1)[0];r+=4;for(let i=0;i<this.numberOfFaces;i++){let n=new Uint8Array(this.data.buffer,this.data.byteOffset+r,a);e.getEngine()._uploadCompressedDataToTextureDirectly(e,e.format,s,o,n,i,t),r+=a,r+=3-(a+3)%4}s=Math.max(1,.5*s),o=Math.max(1,.5*o)}}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&49===t[5]&&49===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}c.HEADER_LEN=64,c.COMPRESSED_2D=0,c.COMPRESSED_3D=1,c.TEX_2D=2,c.TEX_3D=3;var d=e.i(69874),l=e.i(40379);function T(e,t){let r=t?.jsDecoderModule||KTX2DECODER;e&&(e.wasmBaseUrl&&(r.Transcoder.WasmBaseUrl=e.wasmBaseUrl),e.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmModuleURL=e.wasmUASTCToASTC),e.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmModuleURL=e.wasmUASTCToBC7),e.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmModuleURL=e.wasmUASTCToRGBA_UNORM),e.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmModuleURL=e.wasmUASTCToRGBA_SRGB),e.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmModuleURL=e.wasmUASTCToR8_UNORM),e.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmModuleURL=e.wasmUASTCToRG8_UNORM),e.jsMSCTranscoder&&(r.MSCTranscoder.JSModuleURL=e.jsMSCTranscoder),e.wasmMSCTranscoder&&(r.MSCTranscoder.WasmModuleURL=e.wasmMSCTranscoder),e.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmModuleURL=e.wasmZSTDDecoder)),t&&(t.wasmUASTCToASTC&&(r.LiteTranscoder_UASTC_ASTC.WasmBinary=t.wasmUASTCToASTC),t.wasmUASTCToBC7&&(r.LiteTranscoder_UASTC_BC7.WasmBinary=t.wasmUASTCToBC7),t.wasmUASTCToRGBA_UNORM&&(r.LiteTranscoder_UASTC_RGBA_UNORM.WasmBinary=t.wasmUASTCToRGBA_UNORM),t.wasmUASTCToRGBA_SRGB&&(r.LiteTranscoder_UASTC_RGBA_SRGB.WasmBinary=t.wasmUASTCToRGBA_SRGB),t.wasmUASTCToR8_UNORM&&(r.LiteTranscoder_UASTC_R8_UNORM.WasmBinary=t.wasmUASTCToR8_UNORM),t.wasmUASTCToRG8_UNORM&&(r.LiteTranscoder_UASTC_RG8_UNORM.WasmBinary=t.wasmUASTCToRG8_UNORM),t.jsMSCTranscoder&&(r.MSCTranscoder.JSModule=t.jsMSCTranscoder),t.wasmMSCTranscoder&&(r.MSCTranscoder.WasmBinary=t.wasmMSCTranscoder),t.wasmZSTDDecoder&&(r.ZSTDDecoder.WasmBinary=t.wasmZSTDDecoder))}function _(e){let t;void 0===e&&"u">typeof KTX2DECODER&&(e=KTX2DECODER),onmessage=r=>{if(r.data)switch(r.data.action){case"init":{let s=r.data.urls;s&&(s.jsDecoderModule&&void 0===e&&(importScripts(s.jsDecoderModule),e=KTX2DECODER),T(s)),r.data.wasmBinaries&&T(void 0,{...r.data.wasmBinaries,jsDecoderModule:e}),t=new e.KTX2Decoder,postMessage({action:"init"});break}case"setDefaultDecoderOptions":e.KTX2Decoder.DefaultDecoderOptions=r.data.options;break;case"decode":t.decode(r.data.data,r.data.caps,r.data.options).then(e=>{let t=[];for(let r=0;r<e.mipmaps.length;++r){let s=e.mipmaps[r];s&&s.data&&t.push(s.data.buffer)}postMessage({action:"decoded",success:!0,decodedData:e},t)}).catch(e=>{postMessage({action:"decoded",success:!1,msg:e})})}}}async function u(e,t,r){return await new Promise((s,o)=>{let a=t=>{e.removeEventListener("error",a),e.removeEventListener("message",i),o(t)},i=t=>{"init"===t.data.action&&(e.removeEventListener("error",a),e.removeEventListener("message",i),s(e))};e.addEventListener("error",a),e.addEventListener("message",i),e.postMessage({action:"init",urls:r,wasmBinaries:t})})}(t=o||(o={}))[t.ETC1S=0]="ETC1S",t[t.UASTC4x4=1]="UASTC4x4",t[t.RGBA32=2]="RGBA32",(r=a||(a={}))[r.ASTC_4X4_RGBA=0]="ASTC_4X4_RGBA",r[r.ASTC_4x4_RGBA=0]="ASTC_4x4_RGBA",r[r.BC7_RGBA=1]="BC7_RGBA",r[r.BC3_RGBA=2]="BC3_RGBA",r[r.BC1_RGB=3]="BC1_RGB",r[r.PVRTC1_4_RGBA=4]="PVRTC1_4_RGBA",r[r.PVRTC1_4_RGB=5]="PVRTC1_4_RGB",r[r.ETC2_RGBA=6]="ETC2_RGBA",r[r.ETC1_RGB=7]="ETC1_RGB",r[r.RGBA32=8]="RGBA32",r[r.R8=9]="R8",r[r.RG8=10]="RG8",(s=i||(i={}))[s.COMPRESSED_RGBA_BPTC_UNORM_EXT=36492]="COMPRESSED_RGBA_BPTC_UNORM_EXT",s[s.COMPRESSED_RGBA_ASTC_4X4_KHR=37808]="COMPRESSED_RGBA_ASTC_4X4_KHR",s[s.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",s[s.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",s[s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",s[s.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",s[s.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",s[s.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",s[s.RGBA8Format=32856]="RGBA8Format",s[s.R8Format=33321]="R8Format",s[s.RG8Format=33323]="RG8Format";class R{static GetDefaultNumWorkers(){return"object"==typeof navigator&&navigator.hardwareConcurrency?Math.min(Math.floor(.5*navigator.hardwareConcurrency),4):1}static _Initialize(e){if(R._WorkerPoolPromise||R._DecoderModulePromise)return;let t={wasmBaseUrl:l.Tools.ScriptBaseUrl,jsDecoderModule:l.Tools.GetBabylonScriptURL(this.URLConfig.jsDecoderModule,!0),wasmUASTCToASTC:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToASTC,!0),wasmUASTCToBC7:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToBC7,!0),wasmUASTCToRGBA_UNORM:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_UNORM,!0),wasmUASTCToRGBA_SRGB:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRGBA_SRGB,!0),wasmUASTCToR8_UNORM:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToR8_UNORM,!0),wasmUASTCToRG8_UNORM:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmUASTCToRG8_UNORM,!0),jsMSCTranscoder:l.Tools.GetBabylonScriptURL(this.URLConfig.jsMSCTranscoder,!0),wasmMSCTranscoder:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmMSCTranscoder,!0),wasmZSTDDecoder:l.Tools.GetBabylonScriptURL(this.URLConfig.wasmZSTDDecoder,!0)};e&&"function"==typeof Worker&&"u">typeof URL?R._WorkerPoolPromise=new Promise(r=>{let s=`${T}(${_})()`,o=URL.createObjectURL(new Blob([s],{type:"application/javascript"}));r(new d.AutoReleaseWorkerPool(e,async()=>await u(new Worker(o),void 0,t)))}):void 0===R._KTX2DecoderModule?R._DecoderModulePromise=l.Tools.LoadBabylonScriptAsync(t.jsDecoderModule).then(()=>(R._KTX2DecoderModule=KTX2DECODER,R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,T(t,R._KTX2DecoderModule),new R._KTX2DecoderModule.KTX2Decoder)):(R._KTX2DecoderModule.MSCTranscoder.UseFromWorkerThread=!1,R._KTX2DecoderModule.WASMMemoryManager.LoadBinariesFromCurrentThread=!0,R._DecoderModulePromise=Promise.resolve(new R._KTX2DecoderModule.KTX2Decoder))}constructor(e,t=R.DefaultNumWorkers){this._engine=e;const r="object"==typeof t&&t.workerPool||R.WorkerPool;if(r)R._WorkerPoolPromise=Promise.resolve(r);else{"object"==typeof t?R._KTX2DecoderModule=t?.binariesAndModulesContainer?.jsDecoderModule:"u">typeof KTX2DECODER&&(R._KTX2DecoderModule=KTX2DECODER);const e="number"==typeof t?t:t.numWorkers??R.DefaultNumWorkers;R._Initialize(e)}}async _uploadAsync(e,t,r){let s=await this._decodeAsync(e,r);this._createTexture(s,t,r)}async _decodeAsync(e,t){let r=this._engine.getCaps(),s={astc:!!r.astc,bptc:!!r.bptc,s3tc:!!r.s3tc,pvrtc:!!r.pvrtc,etc2:!!r.etc2,etc1:!!r.etc1};if(R._WorkerPoolPromise){let r=await R._WorkerPoolPromise;return await new Promise((o,a)=>{r.push((r,i)=>{let n=e=>{r.removeEventListener("error",n),r.removeEventListener("message",c),a(e),i()},c=e=>{"decoded"===e.data.action&&(r.removeEventListener("error",n),r.removeEventListener("message",c),e.data.success?o(e.data.decodedData):a({message:e.data.msg}),i())};r.addEventListener("error",n),r.addEventListener("message",c),r.postMessage({action:"setDefaultDecoderOptions",options:R.DefaultDecoderOptions._getKTX2DecoderOptions()});let d=new Uint8Array(e.byteLength);d.set(new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),r.postMessage({action:"decode",data:d,caps:s,options:t},[d.buffer])})})}if(R._DecoderModulePromise){let s=await R._DecoderModulePromise;return R.DefaultDecoderOptions.isDirty&&(R._KTX2DecoderModule.KTX2Decoder.DefaultDecoderOptions=R.DefaultDecoderOptions._getKTX2DecoderOptions()),await new Promise((o,a)=>{s.decode(e,r,t).then(e=>{o(e)}).catch(e=>{a({message:e})})})}throw Error("KTX2 decoder module is not available")}_createTexture(e,t,r){if((e.layerCount??1)>1)throw Error("KTX2 container - array textures are not supported by this texture loader.");this._engine._bindTextureDirectly(3553,t),r&&(r.transcodedFormat=e.transcodedFormat,r.isInGammaSpace=e.isInGammaSpace,r.hasAlpha=e.hasAlpha,r.transcoderName=e.transcoderName);let s=!0;switch(e.transcodedFormat){case 32856:t.type=0,t.format=5;break;case 33321:t.type=0,t.format=6;break;case 33323:t.type=0,t.format=7;break;default:t.format=e.transcodedFormat,s=!1}if(t._gammaSpace=e.isInGammaSpace,t.generateMipMaps=e.mipmaps.length>1,t.width=e.mipmaps[0].width,t.height=e.mipmaps[0].height,e.errors)throw Error("KTX2 container - could not transcode the data. "+e.errors);for(let r=0;r<e.mipmaps.length;++r){let o=e.mipmaps[r];if(!o||!o.data)throw Error("KTX2 container - could not transcode one of the image");s?(t.width=o.width,t.height=o.height,this._engine._uploadDataToTextureDirectly(t,o.data,0,r,void 0,!0)):this._engine._uploadCompressedDataToTextureDirectly(t,e.transcodedFormat,o.width,o.height,o.data,0,r)}t._extension=".ktx2",t.isReady=!0,this._engine._bindTextureDirectly(3553,null)}static IsValid(e){if(e.byteLength>=12){let t=new Uint8Array(e.buffer,e.byteOffset,12);if(171===t[0]&&75===t[1]&&84===t[2]&&88===t[3]&&32===t[4]&&50===t[5]&&48===t[6]&&187===t[7]&&13===t[8]&&10===t[9]&&26===t[10]&&10===t[11])return!0}return!1}}function m(e){switch(e){case 35916:return 33776;case 35918:return 33778;case 35919:return 33779;case 37493:return 37492;case 37497:return 37496;case 37495:return 37494;case 37840:return 37808;case 37841:return 37809;case 37842:return 37810;case 37843:return 37811;case 37844:return 37812;case 37845:return 37813;case 37846:return 37814;case 37847:return 37815;case 37848:return 37816;case 37849:return 37817;case 37850:return 37818;case 37851:return 37819;case 37852:return 37820;case 37853:return 37821;case 36493:return 36492}return null}R.URLConfig={jsDecoderModule:"https://cdn.babylonjs.com/babylon.ktx2Decoder.js",wasmUASTCToASTC:null,wasmUASTCToBC7:null,wasmUASTCToRGBA_UNORM:null,wasmUASTCToRGBA_SRGB:null,wasmUASTCToR8_UNORM:null,wasmUASTCToRG8_UNORM:null,jsMSCTranscoder:null,wasmMSCTranscoder:null,wasmZSTDDecoder:null},R.DefaultNumWorkers=R.GetDefaultNumWorkers(),R.DefaultDecoderOptions=new class{constructor(){this._isDirty=!0,this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=!0,this._ktx2DecoderOptions={}}get isDirty(){return this._isDirty}get useRGBAIfASTCBC7NotAvailableWhenUASTC(){return this._useRGBAIfASTCBC7NotAvailableWhenUASTC}set useRGBAIfASTCBC7NotAvailableWhenUASTC(e){this._useRGBAIfASTCBC7NotAvailableWhenUASTC!==e&&(this._useRGBAIfASTCBC7NotAvailableWhenUASTC=e,this._isDirty=!0)}get useRGBAIfOnlyBC1BC3AvailableWhenUASTC(){return this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC}set useRGBAIfOnlyBC1BC3AvailableWhenUASTC(e){this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC!==e&&(this._useRGBAIfOnlyBC1BC3AvailableWhenUASTC=e,this._isDirty=!0)}get forceRGBA(){return this._forceRGBA}set forceRGBA(e){this._forceRGBA!==e&&(this._forceRGBA=e,this._isDirty=!0)}get forceR8(){return this._forceR8}set forceR8(e){this._forceR8!==e&&(this._forceR8=e,this._isDirty=!0)}get forceRG8(){return this._forceRG8}set forceRG8(e){this._forceRG8!==e&&(this._forceRG8=e,this._isDirty=!0)}get bypassTranscoders(){return this._bypassTranscoders}set bypassTranscoders(e){this._bypassTranscoders!==e&&(this._bypassTranscoders=e,this._isDirty=!0)}_getKTX2DecoderOptions(){if(!this._isDirty)return this._ktx2DecoderOptions;this._isDirty=!1;let e={};return void 0!==this._useRGBAIfASTCBC7NotAvailableWhenUASTC&&(e.useRGBAIfASTCBC7NotAvailableWhenUASTC=this._useRGBAIfASTCBC7NotAvailableWhenUASTC),void 0!==this._forceRGBA&&(e.forceRGBA=this._forceRGBA),void 0!==this._forceR8&&(e.forceR8=this._forceR8),void 0!==this._forceRG8&&(e.forceRG8=this._forceRG8),void 0!==this._bypassTranscoders&&(e.bypassTranscoders=this._bypassTranscoders),this.useRGBAIfOnlyBC1BC3AvailableWhenUASTC&&(e.transcodeFormatDecisionTree={UASTC:{transcodeFormat:[a.BC1_RGB,a.BC3_RGBA],yes:{transcodeFormat:a.RGBA32,engineFormat:32856,roundToMultiple4:!1}}}),this._ktx2DecoderOptions=e,e}},e.s(["_KTXTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,t,r,s){if(Array.isArray(e))return;t._invertVScale=!t.invertY;let o=t.getEngine(),a=new c(e,6),i=m(a.glInternalFormat);null!==i?(t.format=i,t._useSRGBBuffer=o._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=a.glInternalFormat;let n=a.numberOfMipmapLevels>1&&t.generateMipMaps;o._unpackFlipY(!0),a.uploadLevels(t,t.generateMipMaps),t.width=a.pixelWidth,t.height=a.pixelHeight,o._setCubeMapTextureParams(t,n,a.numberOfMipmapLevels-1),t.isReady=!0,t.onLoadedObservable.notifyObservers(t),t.onLoadedObservable.clear(),s&&s()}loadData(e,t,r,s){if(c.IsValid(e)){t._invertVScale=!t.invertY;let s=new c(e,1),o=m(s.glInternalFormat);null!==o?(t.format=o,t._useSRGBBuffer=t.getEngine()._getUseSRGBBuffer(!0,!t.generateMipMaps),t._gammaSpace=!0):t.format=s.glInternalFormat,r(s.pixelWidth,s.pixelHeight,t.generateMipMaps,!0,()=>{s.uploadLevels(t,t.generateMipMaps)},s.isInvalid)}else R.IsValid(e)?new R(t.getEngine())._uploadAsync(e,t,s).then(()=>{r(t.width,t.height,t.generateMipMaps,!0,()=>{},!1)},e=>{n.Logger.Warn(`Failed to load KTX2 texture data: ${e.message}`),r(0,0,!1,!1,()=>{},!0)}):(n.Logger.Error("texture missing KTX identifier"),r(0,0,!1,!1,()=>{},!0))}}],48329)},69874,e=>{"use strict";class t{constructor(e){this._pendingActions=[],this._workerInfos=e.map(e=>({workerPromise:Promise.resolve(e),idle:!0}))}dispose(){for(let e of this._workerInfos)e.workerPromise.then(e=>{e.terminate()});this._workerInfos.length=0,this._pendingActions.length=0}push(e){this._executeOnIdleWorker(e)||this._pendingActions.push(e)}_executeOnIdleWorker(e){for(let t of this._workerInfos)if(t.idle)return this._execute(t,e),!0;return!1}_execute(e,t){e.idle=!1,e.workerPromise.then(r=>{t(r,()=>{let t=this._pendingActions.shift();t?this._execute(e,t):e.idle=!0})})}}class r extends t{constructor(e,t,s=r.DefaultOptions){super([]),this._maxWorkers=e,this._createWorkerAsync=t,this._options=s}push(e){if(!this._executeOnIdleWorker(e))if(this._workerInfos.length<this._maxWorkers){let t={workerPromise:this._createWorkerAsync(),idle:!1};this._workerInfos.push(t),this._execute(t,e)}else this._pendingActions.push(e)}_execute(e,t){e.timeoutId&&(clearTimeout(e.timeoutId),delete e.timeoutId),super._execute(e,(r,s)=>{t(r,()=>{s(),e.idle&&(e.timeoutId=setTimeout(()=>{e.workerPromise.then(e=>{e.terminate()});let t=this._workerInfos.indexOf(e);-1!==t&&this._workerInfos.splice(t,1)},this._options.idleTimeElapsedBeforeRelease))})})}}r.DefaultOptions={idleTimeElapsedBeforeRelease:1e3},e.s(["AutoReleaseWorkerPool",0,r])}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,81573,e=>{"use strict";var t=e.i(57011),i=e.i(85789),n=e.i(97009),o=e.i(87090),a=e.i(99493);class s extends t.FlowGraphEventBlock{constructor(e){for(const t in super(e),this.config=e,this.initPriority=1,this.config.eventData){const e=this.config.eventData[t],i="string"==typeof e.type?e.type:e.type?.typeName,o="function"==typeof e.type?.serialize?e.type:(0,n.getRichTypeByFlowGraphType)(i);e.type=o,this.registerDataOutput(t,o,e.value)}this.eventRef=this.config.eventData&&Object.prototype.hasOwnProperty.call(this.config.eventData,"event")?this.getDataOutput("event"):this.registerDataOutput("event",n.RichTypeString)}_updateOutputs(e){this.eventRef.setValue(e.getEventReference(this.config.eventId),e)}_preparePendingTasks(e){let t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t&&t.hasObservers()&&t.observers.length>o.FlowGraphCoordinator.MaxEventsPerType)return void this._reportError(e,`FlowGraphReceiveCustomEventBlock: Too many observers for event ${this.config.eventId}. Max is ${o.FlowGraphCoordinator.MaxEventsPerType}.`);let i=t.add((t,i)=>{e.configuration.coordinator._beginEventDispatch(this.config.eventId,i);try{for(let i in this.config.eventData){let n=this.getDataOutput(i);if(!n)continue;let o=t?.[i];n.setValue(void 0===o?this._getEventDataDefault(i):o,e)}this.eventRef.setValue(e.getEventReference(this.config.eventId),e),this._execute(e)}finally{e.configuration.coordinator._endEventDispatch()}});e._setExecutionVariable(this,"_eventObserver",i)}_getEventDataDefault(e){let t=this.config.eventData?.[e];return t?.value!==void 0?t.value:t?.type?.defaultValue}_cancelPendingTasks(e){let t=e.configuration.coordinator.getCustomEventObservable(this.config.eventId);if(t){let i=e._getExecutionVariable(this,"_eventObserver",null);t.remove(i)}else i.Logger.Warn(`FlowGraphReceiveCustomEventBlock: Missing observable for event ${this.config.eventId}`)}_executeEvent(e,t){return!0}serialize(e={}){super.serialize(e);let t={};for(let e in this.config.eventData)t[e]={type:this.config.eventData[e].type.typeName};e.config.eventData=t}getClassName(){return"FlowGraphReceiveCustomEventBlock"}}let r=!1;function v(){r||(r=!0,(0,a.RegisterClass)("FlowGraphReceiveCustomEventBlock",s))}e.s(["FlowGraphReceiveCustomEventBlock",0,s,"RegisterFlowGraphReceiveCustomEventBlock",0,v],47514),v(),e.s([],32144),e.i(32144),e.i(47514),e.s(["FlowGraphReceiveCustomEventBlock",0,s],81573)}]);
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,97059,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0});var n={bindSnapshot:function(){return c},createAsyncLocalStorage:function(){return o},createSnapshot:function(){return d}};for(var a in n)Object.defineProperty(s,a,{enumerable:!0,get:n[a]});let r=Object.defineProperty(Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available"),"__NEXT_ERROR_CODE",{value:"E504",enumerable:!1,configurable:!0});class l{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}static bind(e){return e}}let i="u">typeof globalThis&&globalThis.AsyncLocalStorage;function o(){return i?new i:new l}function c(e){return i?i.bind(e):l.bind(e)}function d(){return i?i.snapshot():function(e,...t){return e(...t)}}},87171,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorageInstance",{enumerable:!0,get:function(){return n}});let n=(0,e.r(97059).createAsyncLocalStorage)()},87920,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"workAsyncStorage",{enumerable:!0,get:function(){return n.workAsyncStorageInstance}});let n=e.r(87171)},67806,(e,t,s)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return n}})},3492,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return a}});let n=e.r(22613);function a({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},26869,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(61284),a=e.r(46663),r=e.r(87920),l=e.r(67806),i=e.r(3121);function o({moduleIds:e}){if("u">typeof window)return null;let t=r.workAsyncStorage.getStore();if(void 0===t)return null;let s=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;s.push(...e)}}if(0===s.length)return null;let c=(0,i.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,l.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,a.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},88154,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return c}});let n=e.r(61284),a=e.r(60951),r=e.r(3492),l=e.r(26869);function i(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(i(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},s=(0,a.lazy)(()=>t.loader().then(i)),c=t.loading;function d(e){let i=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?a.Suspense:a.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(l.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(s,{...e})]}):(0,n.jsx)(r.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(s,{...e})});return(0,n.jsx)(d,{...o?{fallback:i}:{},children:u})}return d.displayName="LoadableComponent",d}},41152,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return a}});let n=e.r(36437)._(e.r(88154));function a(e,t){let s={};"function"==typeof e&&(s.loader=e);let a={...s,...t};return(0,n.default)({...a,modules:a.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},14936,e=>{"use strict";var t=e.i(54353),s=e.i(61284),n=e.i(41152),a=e.i(60951);let r=!!t.default.env.NEXT_PUBLIC_COLLECTOR_URL,l=t.default.env.NEXT_PUBLIC_COLLECTOR_URL??"http://localhost:4318",i="1"===t.default.env.DASHBOARD_STATIC?"":t.default.env.NEXT_PUBLIC_API_KEY??"",o=t.default.env.NEXT_PUBLIC_PLAYGROUND_URL??"http://localhost:5173";var c=e.i(20880);let d={window:"1h"},u=[{id:"1h",label:"Last hour"},{id:"24h",label:"Last 24h"},{id:"7d",label:"Last 7 days"},{id:"all",label:"All time"}],m={"1h":36e5,"24h":864e5,"7d":6048e5};function x(e,t=Date.now()){return"all"===e.window?{}:"custom"===e.window?{since:e.since,until:e.until}:{since:t-m[e.window],until:t}}function h(e,t=Date.now()){return{...x(e,t),scene:e.scene&&e.scene.length>0?e.scene:void 0,source:e.source,cameraMode:e.cameraMode}}let p=[60,300,900,1800,3600,10800,21600,43200,86400,604800];function f(e,t=80){let s=Math.max(60,Math.round(e/t/1e3));return p.find(e=>e>=s)??604800}function g(e){return"xr-controller"===e?"XR controller":e.charAt(0).toUpperCase()+e.slice(1)}let b=["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"];var v=e.i(56054);function j(e,t=1){let[s,n,a]=(0,v.heatRgb)(e);return`rgba(${Math.round(255*s)}, ${Math.round(255*n)}, ${Math.round(255*a)}, ${t})`}function y(e){return new Date(e.includes("T")?e:e.replace(" ","T")+"Z").getTime()}function w(e,t=0){return Number.isFinite(e)?e.toLocaleString(void 0,{maximumFractionDigits:t}):"—"}var N=e.i(60614);let k="Live now",S="Active sessions and a real-time event feed, updating in place.",_=(0,s.jsx)(s.Fragment,{children:"Sessions seen within the liveness window, streamed over SSE from the collector. The roster is intentionally non-identifying — no geo, user-agent, or visitor id. Click a session to follow it live."});function M(e){return e.length>10?`${e.slice(0,8)}…`:e}function C(e,t){let s=Math.max(0,Math.round((t-e)/1e3));if(s<60)return`${s}s ago`;let n=Math.floor(s/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}let P={active:"bg-emerald-400",recent:"bg-amber-400",idle:"bg-fg-muted"},R={idle:"offline",connecting:"connecting…",open:"live",reconnecting:"reconnecting…"};function T({status:e,sessions:t}){let n="open"===e;return(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 rounded-full border border-edge bg-ink px-3 py-1 text-xs",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[n?(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}):null,(0,s.jsx)("span",{className:`relative inline-flex h-2 w-2 rounded-full ${n?"bg-emerald-400":"idle"===e?"bg-fg-muted":"bg-amber-400"}`})]}),(0,s.jsx)("span",{className:"font-medium text-fg",children:n?`${w(t)} live now`:R[e]})]})}function z({snapshot:e,status:t,feed:n,now:a,onSelectSession:r}){let l=e?.sessions??[],i=e?.activeSessions??0,o=e?.activeVisitors??0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-4",children:[(0,s.jsx)(T,{status:t,sessions:i}),(0,s.jsxs)("span",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"font-semibold text-fg",children:w(o)})," visitor",1===o?"":"s"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:["Sessions (",l.length,")"]}),0===l.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===t?"No active sessions right now.":"Waiting for live data…"}):(0,s.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1",children:l.map(e=>(0,s.jsx)("li",{children:r?(0,s.jsxs)("button",{type:"button",onClick:()=>r(e.sessionId),className:"flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition hover:border-edge hover:bg-ink",children:[(0,s.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${P[e.activity]}`,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"font-mono text-xs text-fg",children:M(e.sessionId)}),(0,s.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,s.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:C(e.lastSeen,a)})]}):(0,s.jsxs)("div",{className:"flex w-full items-center gap-2 px-2 py-1.5",children:[(0,s.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${P[e.activity]}`,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"font-mono text-xs text-fg",children:M(e.sessionId)}),(0,s.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,s.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:C(e.lastSeen,a)})]})},e.sessionId))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:"Event feed"}),0===n.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===t?"Listening for events…":"Waiting for live data…"}):(0,s.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1 font-mono text-xs",children:n.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1",children:[(0,s.jsx)("span",{className:"flex-none rounded bg-amber/15 px-1.5 py-0.5 text-[11px] text-saffron",children:e.type}),(0,s.jsx)("span",{className:"text-fg-muted",children:M(e.sessionId)}),(0,s.jsx)("span",{className:"ml-auto flex-none text-fg-muted",children:C(e.ts,a)})]},`${e.sessionId}-${e.ts}-${t}`))})]})]})]})}function A(e,t,s,n){let a={cancelled:!1,source:null,timer:null},r=0,l=async()=>{let l;if(a.cancelled)return;n(0===r?"connecting":"reconnecting");try{let{token:s}=await e.liveToken();l=t(s)}catch{i();return}if(a.cancelled)return;let o=new EventSource(l);a.source=o,o.onopen=()=>{r=0,n("open")},o.onerror=()=>{o.close(),a.source===o&&(a.source=null),i()},s(o)},i=()=>{if(a.cancelled)return;n("reconnecting");let e=Math.min(1e3*2**r,15e3);r+=1,a.timer=setTimeout(()=>void l(),e)};return l(),()=>{a.cancelled=!0,a.timer&&clearTimeout(a.timer),a.source?.close(),a.source=null}}let E=e=>import(e);async function $(e,t={}){var s;let n,a=t.fetchImpl??fetch;try{let s=await a(e,{signal:t.signal});if(!s.ok)return{source:e,code:"manifest-fetch",message:`HTTP ${s.status}`};n=await s.json()}catch(t){return{source:e,code:"manifest-fetch",message:L(t)}}return"object"==typeof(s=n)&&null!==s&&"number"==typeof s.version&&Array.isArray(s.panels)&&s.panels.every(e=>"object"==typeof e&&null!==e&&"string"==typeof e.url&&e.url.length>0&&"number"==typeof e.contract&&(void 0===e.export||"string"==typeof e.export)&&(void 0===e.id||"string"==typeof e.id))?n:{source:e,code:"manifest-invalid",message:"Manifest shape is invalid"}}async function I(e,t={}){let s=t.importModule??E,n=[],a=[];for(let r of(await Promise.all(e.panels.map(e=>F(e,s,t.allowOrigins)))))"panel"in r?n.push(r.panel):a.push(r.error);return{panels:n,errors:a}}async function F(e,t,s){var n;let a,r,l=e.url;if(1!==e.contract)return{error:{source:l,code:"incompatible",message:`Panel declares contract ${e.contract}; host requires 1`}};if(!function(e,t){let s;if(!t||0===t.length)return!0;try{s=new URL(e).origin}catch{return!1}return t.includes(s)}(e.url,s))return{error:{source:l,code:"origin-blocked",message:"Module origin is not in the allowlist"}};try{a=await t(e.url)}catch(e){return{error:{source:l,code:"import-failed",message:L(e)}}}let i=e.export??"default",o=void 0!==(r=(n=a)[i])?r:"default"===i&&void 0!==n.panel?n.panel:void 0;return void 0===o?{error:{source:l,code:"export-missing",message:`No "${i}" export found`}}:"object"==typeof o&&null!==o&&"string"==typeof o.id&&0!==o.id.length&&"string"==typeof o.title&&"function"==typeof o.render&&(void 0===o.load||"function"==typeof o.load)&&(void 0===o.enabled||"function"==typeof o.enabled)&&(void 0===o.span||1===o.span||2===o.span)&&(void 0===o.surfaces||Array.isArray(o.surfaces))&&1?{panel:o}:{error:{source:l,code:"invalid-panel",message:"Export is not a valid PanelDefinition"}}}function L(e){return e instanceof Error?e.message:String(e)}var D=a;let O={hidden:[],settings:{}},B={load:()=>O,save:()=>{}};function U({children:e,label:t="More information"}){return(0,s.jsxs)("span",{className:"group relative inline-flex",children:[(0,s.jsx)("button",{type:"button","aria-label":t,className:"flex h-4 w-4 items-center justify-center rounded-full border border-edge text-[10px] font-bold leading-none text-fg-muted transition hover:border-amber hover:text-fg-hi focus:outline-none focus:ring-1 focus:ring-amber",children:"?"}),(0,s.jsx)("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-6 z-20 w-64 -translate-x-1/2 rounded-md border border-edge bg-ink/95 p-2.5 text-xs font-normal normal-case leading-relaxed tracking-normal text-fg opacity-0 shadow-lg shadow-black/40 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:e})]})}function H({label:e,onClick:t,active:n=!1,children:a}){return(0,s.jsx)("button",{type:"button","aria-label":e,title:e,onClick:t,"aria-pressed":n,className:`flex h-6 w-6 items-center justify-center rounded-md border text-sm leading-none transition focus:outline-none focus:ring-1 focus:ring-amber ${n?"border-amber text-amber":"border-edge text-fg-muted hover:border-amber hover:text-fg-hi"}`,children:a})}function V({title:e,subtitle:t,help:n,children:r,className:l="",collapsible:i=!1,defaultCollapsed:o=!1,onHide:c,settings:d}){let[u,m]=(0,a.useState)(i&&o),[x,h]=(0,a.useState)(!1),p=(0,s.jsxs)("header",{className:u?"":"mb-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold uppercase tracking-wide text-fg",children:e}),i?(0,s.jsx)("span",{"aria-hidden":"true",className:"text-xs text-fg-muted",children:u?"▸":"▾"}):null,n?(0,s.jsx)(U,{label:`About: ${e}`,children:n}):null]}),t?(0,s.jsx)("p",{className:"mt-0.5 text-xs text-fg-muted",children:t}):null]}),f=!!d||!!c;return(0,s.jsxs)("section",{className:`rounded-xl border border-edge bg-panel p-4 shadow-lg shadow-black/20 ${l}`,children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[i?(0,s.jsx)("button",{type:"button",onClick:()=>m(e=>!e),"aria-expanded":u?"false":"true",className:"min-w-0 flex-1 text-left",children:p}):(0,s.jsx)("div",{className:"min-w-0 flex-1",children:p}),f?(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[d?(0,s.jsx)(H,{label:`${e} settings`,active:x,onClick:()=>h(e=>!e),children:(0,s.jsx)("span",{"aria-hidden":"true",children:"⚙"})}):null,c?(0,s.jsx)(H,{label:`Hide ${e}`,onClick:c,children:(0,s.jsx)("span",{"aria-hidden":"true",children:"×"})}):null]}):null]}),d&&x?(0,s.jsx)("div",{className:"mb-3 rounded-lg border border-edge bg-ink/40 p-3",children:d}):null,u?null:r]})}function G({panelId:e,spec:t,values:n,onChange:r,onReset:l,showReset:i=!0}){let o=(0,a.useId)(),c=Object.keys(t);return 0===c.length?null:(0,s.jsxs)("div",{className:"space-y-3","data-panel-settings":e,children:[c.map(e=>{let a=t[e];if(!a)return null;let l=`${o}-${e}`,i=a.label??e;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("label",{htmlFor:l,className:"text-xs font-medium text-fg",children:i}),"number"===a.type?(0,s.jsxs)("span",{className:"text-xs tabular-nums text-fg-muted",children:[String(n[e]),a.unit?` ${a.unit}`:""]}):null]}),"number"===a.type?(0,s.jsx)("input",{id:l,type:"range",className:"w-full accent-amber",min:a.min,max:a.max,step:a.step??1,value:Number(n[e]),onChange:t=>r(e,Number(t.target.value))}):null,"boolean"===a.type?(0,s.jsxs)("label",{htmlFor:l,className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,s.jsx)("input",{id:l,type:"checkbox",className:"accent-amber",checked:!!n[e],onChange:t=>r(e,t.target.checked)}),a.help??"Enabled"]}):null,"select"===a.type?(0,s.jsx)("select",{id:l,className:"w-full rounded-md border border-edge bg-ink px-2 py-1 text-xs text-fg",value:String(n[e]),onChange:t=>r(e,t.target.value),children:a.options.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label??e.value},e.value))}):null,"boolean"!==a.type&&a.help?(0,s.jsx)("p",{className:"text-[11px] leading-tight text-fg-muted",children:a.help}):null]},e)}),i?(0,s.jsx)("button",{type:"button",onClick:l,className:"text-[11px] text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Reset to defaults"}):null]})}function W({panels:e,ctx:t,surface:n,revision:r=0,exclude:l}){let i=function(e,t){let s=(0,a.useMemo)(()=>{var t;let s;return(void 0)??(t=`uptimizr:dashboard:panels:${e}`,(s=window.localStorage?window.localStorage:null)?{load(){try{let e=s.getItem(t);return e?function(e){if(!e||"object"!=typeof e)return O;let t=Array.isArray(e.hidden)?e.hidden.filter(e=>"string"==typeof e):[],s={};if(e.settings&&"object"==typeof e.settings)for(let[t,n]of Object.entries(e.settings)){if(!n||"object"!=typeof n)continue;let e={};for(let[t,s]of Object.entries(n))("number"==typeof s||"boolean"==typeof s||"string"==typeof s)&&(e[t]=s);Object.keys(e).length>0&&(s[t]=e)}return{hidden:t,settings:s}}(JSON.parse(e)):O}catch{return O}},save(e){try{0===e.hidden.length&&0===Object.keys(e.settings).length?s.removeItem(t):s.setItem(t,JSON.stringify(e))}catch{}}}:B)},[void 0,e]),[n,r]=(0,a.useState)(O),[l,i]=(0,a.useState)(!1),o=(0,a.useRef)(t);o.current=t,(0,a.useEffect)(()=>{r(s.load()),i(!0)},[s]);let c=(0,a.useCallback)(e=>{r(e),s.save(e)},[s]),d=(0,a.useCallback)(e=>{r(t=>{if(t.hidden.includes(e))return t;let n={...t,hidden:[...t.hidden,e]};return s.save(n),n})},[s]),u=(0,a.useCallback)(e=>{r(t=>{if(!t.hidden.includes(e))return t;let n={...t,hidden:t.hidden.filter(t=>t!==e)};return s.save(n),n})},[s]),m=(0,a.useCallback)(()=>{r(e=>{if(0===e.hidden.length)return e;let t={...e,hidden:[]};return s.save(t),t})},[s]),x=(0,a.useCallback)((e,t,n)=>{r(a=>{let r={...a.settings[e]??{},[t]:n},l=function(e,t){let s={};if(!e)return s;for(let n of Object.keys(t)){let a=e[n];a&&t[n]!==a.default&&(s[n]=t[n])}return s}(o.current(e),r),i={...a.settings};Object.keys(l).length>0?i[e]=l:delete i[e];let c={...a,settings:i};return s.save(c),c})},[s]),h=(0,a.useCallback)(e=>{r(t=>{if(!t.settings[e])return t;let n={...t.settings};delete n[e];let a={...t,settings:n};return s.save(a),a})},[s]),p=(0,a.useCallback)(e=>n.settings[e]??{},[n]),f=(0,a.useCallback)(e=>n.hidden.includes(e),[n]);return{hydrated:l,hidden:n.hidden,isHidden:f,hide:d,show:u,showAll:m,overridesFor:p,setSetting:x,resetSettings:h,replace:c}}(n,(0,D.useCallback)(t=>e.find(e=>e.id===t)?.settings,[e])),o=(0,D.useMemo)(()=>e.filter(e=>(e.surfaces??["overview"]).includes(n)).filter(e=>!l?.includes(e.id)).map(e=>{let s=function(e,t){let s={};if(!e)return s;for(let n of Object.keys(e))s[n]=function(e,t){switch(e.type){case"number":var s,n;let a;if("number"!=typeof t||!Number.isFinite(t))return e.default;return s=e.min,n=e.max,a=t,"number"==typeof s&&a<s&&(a=s),"number"==typeof n&&a>n&&(a=n),a;case"boolean":return"boolean"==typeof t?t:e.default;case"select":if("string"!=typeof t)return e.default;return e.options.some(e=>e.value===t)?t:e.default}}(e[n],t?.[n]);return s}(e.settings,i.overridesFor(e.id));return{panel:e,panelCtx:{...t,settings:s}}}).filter(({panel:e,panelCtx:t})=>{if(!e.enabled)return!0;try{return e.enabled(t)}catch(t){return console.error(`Panel "${e.id}" enabled() threw; hiding it`,t),!1}}),[e,n,t,i,l]),c=i.hydrated?o.filter(({panel:e})=>!i.isHidden(e.id)):o,d=i.hydrated?o.filter(({panel:e})=>i.isHidden(e.id)):[];return(0,s.jsxs)(s.Fragment,{children:[d.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(K,{hidden:d.map(({panel:e})=>({id:e.id,title:e.title})),onRestore:i.show,onRestoreAll:i.showAll})}):null,c.map(({panel:e,panelCtx:t})=>(0,s.jsx)("div",{className:2===e.span?"lg:col-span-2":void 0,children:(0,s.jsx)(X,{panel:e,ctx:t,revision:r,onHide:()=>i.hide(e.id),settingsForm:e.settings?(0,s.jsx)(G,{panelId:e.id,spec:e.settings,values:t.settings,onChange:(t,s)=>i.setSetting(e.id,t,s),onReset:()=>i.resetSettings(e.id)}):void 0})},e.id))]})}function K({hidden:e,onRestore:t,onRestoreAll:n}){return(0,s.jsxs)("section",{className:"flex flex-wrap items-center gap-2 rounded-xl border border-dashed border-edge bg-panel/60 px-4 py-2.5 text-xs text-fg-muted",children:[(0,s.jsxs)("span",{className:"font-medium uppercase tracking-wide",children:["Hidden panels (",e.length,")"]}),e.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>t(e.id),className:"rounded-md border border-edge px-2 py-1 text-fg transition hover:border-amber hover:text-fg-hi",children:["+ ",e.title]},e.id)),(0,s.jsx)("button",{type:"button",onClick:n,className:"ml-auto text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Show all"})]})}function X({panel:e,ctx:t,revision:n,onHide:r,settingsForm:l}){let{data:i,loading:o,error:c}=function(e,t,s=0){let[n,r]=(0,a.useState)({data:null,loading:!!e.load,error:null}),l=JSON.stringify({params:t.params,settings:t.settings});return(0,a.useEffect)(()=>{if(!e.load)return void r({data:null,loading:!1,error:null});let s=!0,n=new AbortController;return r(e=>({...e,loading:!0,error:null})),e.load({...t,signal:n.signal}).then(e=>{s&&r({data:e,loading:!1,error:null})},e=>{s&&!n.signal.aborted&&r({data:null,loading:!1,error:e instanceof Error?e:Error(String(e))})}),()=>{s=!1,n.abort()}},[e,l,t.surface,t.sessionId,s]),n}(e,t,n),d="function"==typeof e.subtitle?e.subtitle(t):e.subtitle,u=o&&!!e.load&&null==i,m=function(){let[e,t]=(0,D.useState)(!1);return(0,D.useEffect)(()=>t(!0),[]),e}(),x=!e.clientOnly||m;return(0,s.jsx)(V,{title:e.title,subtitle:d,help:e.help,collapsible:e.collapsible,onHide:r,settings:l,children:x?c?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["Could not load: ",c.message]}):u?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Loading…"}):(0,s.jsx)(q,{panelId:e.id,children:e.render({data:i,ctx:t})}):null})}class q extends D.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){console.error(`Panel "${this.props.panelId}" failed to render`,e)}componentDidUpdate(e){e.panelId!==this.props.panelId&&this.state.error&&this.setState({error:null})}render(){return this.state.error?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["Could not render: ",this.state.error.message]}):this.props.children}}var J=e.i(18637);function Y({bins:e,cellSize:t}){let n=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let t=n.current;if(!t)return;let s=t.getContext("2d");if(!s||(s.clearRect(0,0,360,360),s.fillStyle="#0b0e14",s.fillRect(0,0,360,360),0===e.length))return;let a=1/0,r=-1/0,l=1/0,i=-1/0,o=0;for(let t of e)t.gx<a&&(a=t.gx),t.gx>r&&(r=t.gx),t.gz<l&&(l=t.gz),t.gz>i&&(i=t.gz),t.count>o&&(o=t.count);let c=344/Math.max(r-a+1,i-l+1);for(let t of e){s.fillStyle=j(o>0?t.count/o:0,.9);let e=8+(t.gx-a)*c,n=8+(i-t.gz)*c;s.fillRect(e,n,Math.ceil(c),Math.ceil(c))}},[e,t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsxs)("div",{className:"relative inline-block",children:[(0,s.jsx)("canvas",{ref:n,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Floor-plan position heatmap"}),e.length>0?(0,s.jsx)(J.HeatLegend,{title:"Dwell density",lowLabel:"rarely",highLabel:"most",note:`${t} m cells`}):null]})}),0===e.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera-position data in range. Capture a first-person session to populate the plan."}):null]})}function Z({points:e}){let t=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let s=t.current;if(!s)return;let n=s.getContext("2d");if(!n||(n.clearRect(0,0,360,360),n.fillStyle="#0b0e14",n.fillRect(0,0,360,360),0===e.length))return;let a=1/0,r=-1/0,l=1/0,i=-1/0;for(let t of e)t.gx<a&&(a=t.gx),t.gx>r&&(r=t.gx),t.gz<l&&(l=t.gz),t.gz>i&&(i=t.gz);let o=344/Math.max(r-a+1,i-l+1),c=(e,t)=>[8+(e-a+.5)*o,8+(i-t+.5)*o],d=function(e){let t=new Map;for(let s of e){let e=t.get(s.session_id);e||(e=[],t.set(s.session_id,e));let n=e[e.length-1];n&&n.gx===s.gx&&n.gz===s.gz||e.push({gx:s.gx,gz:s.gz})}return[...t.values()].map(e=>({cells:e}))}(e);for(let e of(n.lineWidth=2,n.lineJoin="round",n.lineCap="round",n.globalCompositeOperation="lighter",n.strokeStyle="rgba(251, 191, 36, 0.18)",d)){if(e.cells.length<2)continue;n.beginPath();let[t,s]=c(e.cells[0].gx,e.cells[0].gz);n.moveTo(t,s);for(let t=1;t<e.cells.length;t++){let[s,a]=c(e.cells[t].gx,e.cells[t].gz);n.lineTo(s,a)}n.stroke()}n.globalCompositeOperation="source-over"},[e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("canvas",{ref:t,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Aggregate desire-line paths"})}),0===e.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera-path data in range. Capture first-person sessions to populate the desire lines."}):null]})}let Q={hover:"#60a5fa",pick:"#34d399",click:"#fbbf24",drag:"#f472b6",select:"#a78bfa",squeeze:"#fb7185",grab:"#22d3ee",release:"#94a3b8",teleport:"#f59e0b"};function ee(e){return Q[e]??"#64748b"}function et({rows:e,topN:t=8}){let n=function(e,t){let s=new Map;for(let t of e){let e=s.get(t.mesh);e||(e={mesh:t.mesh,total:0,kinds:[]},s.set(t.mesh,e)),e.kinds.push({kind:t.kind,count:t.count}),e.total+=t.count}let n=[...s.values()].sort((e,t)=>t.total-e.total).slice(0,t);for(let e of n)e.kinds.sort((e,t)=>t.count-e.count);return n}(e,t);if(0===n.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."});let a=[...new Set(e.map(e=>e.kind))];return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("ul",{className:"space-y-2",children:n.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:w(e.total)})]}),(0,s.jsx)("div",{className:"mt-1 flex h-2 w-full overflow-hidden rounded bg-ink/60",children:e.kinds.map(t=>(0,s.jsx)("div",{className:"h-full",style:{width:`${e.total>0?t.count/e.total*100:0}%`,backgroundColor:ee(t.kind)},title:`${t.kind}: ${w(t.count)}`},t.kind))})]},e.mesh))}),(0,s.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1",children:a.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:ee(e)}}),e]},e))})]})}function es({bins:e,bucketSize:t,threshold:n=2,topN:a=12}){let r=function(e,t,s=2){let n=new Map;for(let s of e){let e=n.get(s.mesh);e||(e={count:0,distanceSum:0,maxBand:0},n.set(s.mesh,e)),e.count+=s.count,e.distanceSum+=s.avg_distance*s.count,e.maxBand=Math.max(e.maxBand,s.bucket*t)}let a=[...n.entries()].map(([e,t])=>{let n=t.count>0?t.distanceSum/t.count:0;return{mesh:e,count:t.count,meanDistance:n,maxBandDistance:t.maxBand,far:n>s}});return a.sort((e,t)=>t.meanDistance-e.meanDistance||t.count-e.count),a}(e,t,n);if(0===r.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No measurable interactions in range. Reachability needs mesh_interaction events with a world point plus preceding camera_sample positions in the same session."});let l=r.reduce((e,t)=>Math.max(e,t.meanDistance,t.maxBandDistance),0)||1,i=r.filter(e=>e.far).length,o=r.slice(0,a);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"tabular-nums text-fg",children:w(i)})," of"," ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:w(r.length)})," meshes are reached from beyond ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:w(n,2)})," m on average."]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:o.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.mesh,children:e.mesh}),(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[e.far&&(0,s.jsx)("span",{className:"rounded bg-rose-500/20 px-1.5 text-xs text-rose-300",children:"far"}),(0,s.jsxs)("span",{className:"tabular-nums text-xs text-fg-muted",children:[w(e.meanDistance,2)," m · ",w(e.count)]})]})]}),(0,s.jsxs)("div",{className:"relative mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:[(0,s.jsx)("div",{className:`h-full rounded ${e.far?"bg-rose-500/70":"bg-sky-500/70"}`,style:{width:`${e.meanDistance/l*100}%`}}),(0,s.jsx)("span",{className:"absolute top-0 h-full w-px bg-fg/50",style:{left:`${Math.min(100,n/l*100)}%`},title:`Comfortable-reach threshold: ${w(n,2)} m`})]})]},e.mesh))})]})}let en={mouse:"#60a5fa",touch:"#34d399",stylus:"#a78bfa",pen:"#a78bfa","xr-controller":"#fbbf24",hand:"#f472b6",gaze:"#22d3ee",transient:"#fb7185",keyboard:"#f59e0b",gamepad:"#c084fc",other:"#94a3b8"};function ea(e){return en[e]??"#64748b"}function er({buckets:e}){if(e.length<2)return(0,s.jsx)("span",{className:"text-[10px] text-fg-muted",children:"—"});let t=e.reduce((e,t)=>Math.max(e,t),0)||1;return(0,s.jsx)("div",{className:"flex h-5 items-end gap-px","aria-hidden":!0,children:e.map((e,n)=>(0,s.jsx)("div",{className:"w-1 rounded-sm bg-sky-400/70",style:{height:`${Math.max(8,e/t*100)}%`}},n))})}function el({delta:e}){return e>0?(0,s.jsxs)("span",{className:"tabular-nums text-xs text-emerald-400",children:["▲ ",w(e)]}):e<0?(0,s.jsxs)("span",{className:"tabular-nums text-xs text-rose-400",children:["▼ ",w(-e)]}):(0,s.jsx)("span",{className:"text-xs text-fg-muted",children:"—"})}function ei({sources:e,trend:t,topN:n=8}){let a=function(e,t,s){let n=new Map;for(let t of e){let e=n.get(t.mesh);e||(e={total:0,sources:new Map},n.set(t.mesh,e)),e.total+=t.count,e.sources.set(t.source,(e.sources.get(t.source)??0)+t.count)}let a=new Map;for(let e of t){let t=a.get(e.mesh);t?t.push(e):a.set(e.mesh,[e])}return[...n.entries()].map(([e,t])=>{let s=(a.get(e)??[]).slice().sort((e,t)=>e.bucket-t.bucket).map(e=>e.count),n=Math.floor(s.length/2),r=s.slice(0,n).reduce((e,t)=>e+t,0),l=s.slice(n).reduce((e,t)=>e+t,0);return{mesh:e,total:t.total,sources:[...t.sources.entries()].map(([e,t])=>({source:e,count:t})).sort((e,t)=>t.count-e.count),buckets:s,delta:l-r}}).sort((e,t)=>t.total-e.total).slice(0,s)}(e,t,n);return 0===a.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."}):(0,s.jsx)("ol",{className:"space-y-2",children:a.map((e,t)=>(0,s.jsx)("li",{className:"text-sm",children:(0,s.jsxs)("details",{className:"group",children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-3",children:[(0,s.jsx)("span",{className:"w-5 shrink-0 text-right tabular-nums text-xs text-fg-muted",children:t+1}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)(er,{buckets:e.buckets}),(0,s.jsx)(el,{delta:e.delta}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",children:w(e.total)})]}),(0,s.jsx)("ul",{className:"mt-1.5 space-y-1 pl-8",children:e.sources.map(t=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:ea(t.source)}}),(0,s.jsx)("span",{className:"w-24 shrink-0 truncate text-fg-muted",children:t.source}),(0,s.jsx)("div",{className:"h-1.5 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded",style:{width:`${e.total>0?t.count/e.total*100:0}%`,backgroundColor:ea(t.source)}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 text-right tabular-nums text-fg-muted",children:w(t.count)})]},t.source))})]})},e.mesh))})}function eo(e){return!Number.isFinite(e)||e<=0?"0 ms":e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function ec({meshes:e}){let t=e.reduce((e,t)=>Math.max(e,t.visible_ms),0);return 0===e.length?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No blind spots in range. This needs object-dwell (",(0,s.jsx)("code",{children:"meshVisibility"}),") capture enabled."]}):(0,s.jsx)("ul",{className:"space-y-2",children:e.map(e=>{let n=e.interactions+e.hover_episodes;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsxs)("span",{className:"shrink-0 tabular-nums text-fg-muted",children:[eo(e.visible_ms)," seen"]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${t>0?e.visible_ms/t*100:0}%`}})}),(0,s.jsx)("div",{className:"mt-1 flex items-center gap-2 text-xs text-fg-muted",children:0===n?(0,s.jsx)("span",{className:"rounded bg-rose-500/20 px-1.5 py-0.5 font-medium text-rose-300",children:"never engaged"}):(0,s.jsxs)("span",{className:"tabular-nums",children:[w(e.interactions)," interaction",1===e.interactions?"":"s",e.hover_episodes>0?` \xb7 ${w(e.hover_episodes)} hover${1===e.hover_episodes?"":"s"} (${eo(e.hover_ms)})`:""]})})]},e.mesh)})})}function ed({initialRows:e,api:t,params:n}){let[r,l]=(0,a.useState)(""),[i,o]=(0,a.useState)(e),[c,d]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!1),x=(0,a.useMemo)(()=>e.map(e=>e.variant).sort((e,t)=>e.localeCompare(t)),[e]);(0,a.useEffect)(()=>{o(e),l(""),m(!1)},[e]);let h=JSON.stringify(n);if((0,a.useEffect)(()=>{if(!r){o(e),m(!1);return}let s=!1;return d(!0),m(!1),t.variantLeaderboard({conversion:{type:"custom",name:r}},n).then(e=>{s||o(e)}).catch(()=>{s||m(!0)}).finally(()=>{s||d(!1)}),()=>{s=!0}},[r,h,e,t]),0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No configurator variants in range."});let p=""!==r,f=i.reduce((e,t)=>Math.max(e,t.views),0)||1;return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"shrink-0",children:"Success event"}),(0,s.jsxs)("select",{className:"min-w-0 flex-1 rounded border border-ink/40 bg-ink/40 px-2 py-1 text-xs text-fg",value:r,onChange:e=>l(e.target.value),children:[(0,s.jsx)("option",{value:"",children:"None — views only"}),x.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}),c&&(0,s.jsx)("span",{className:"shrink-0 text-fg-muted",children:"…"})]}),u?(0,s.jsx)("p",{className:"text-sm text-rose-400",children:"Couldn’t load conversion rates."}):(0,s.jsx)("ol",{className:"space-y-2",children:i.map((e,t)=>{var n,a;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"w-5 shrink-0 text-right tabular-nums text-xs text-fg-muted",children:t+1}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.variant}),(0,s.jsx)("span",{className:"w-16 shrink-0 text-right tabular-nums text-xs text-fg-muted",title:"Mean dwell before the next variant switch or conversion",children:(n=e.avgDwellMs)>0?n<1e3?`${Math.round(n)} ms`:n<6e4?`${(n/1e3).toFixed(+(n<1e4))} s`:`${(n/6e4).toFixed(1)} min`:"—"}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-xs",title:p?`${w(e.conversions)} of ${w(e.sessions)} sessions converted`:"Pick a success event to compute conversion",children:(a=e.conversionRate,p?`${(100*a).toFixed(a>=.1||0===a?0:1)}%`:"—")}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",title:`${w(e.sessions)} distinct sessions`,children:w(e.views)})]}),(0,s.jsx)("div",{className:"mt-1 ml-8 h-1.5 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-sky-400/70",style:{width:`${e.views/f*100}%`}})})]},e.variant)})})]})}let eu={mouse:"#60a5fa",touch:"#34d399",stylus:"#a78bfa",pen:"#a78bfa","xr-controller":"#fbbf24",hand:"#f472b6",gaze:"#22d3ee",transient:"#fb7185",keyboard:"#f59e0b",gamepad:"#c084fc",other:"#94a3b8"};function em(e){return eu[e]??"#64748b"}function ex({sources:e,actions:t,topActions:n=8}){let a=function(e){let t=new Map;for(let s of e)t.set(s.source,(t.get(s.source)??0)+s.count);let s=[...t.values()].reduce((e,t)=>e+t,0);return[...t.entries()].map(([e,t])=>({source:e,count:t,share:s>0?t/s:0})).sort((e,t)=>t.count-e.count)}(e),r=t.slice(0,n);return 0===a.length&&0===r.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No input interactions in range."}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted",children:"Modality share"}),0===a.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No source-bearing interactions in range."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex h-3 w-full overflow-hidden rounded bg-ink/60",children:a.map(e=>(0,s.jsx)("div",{className:"h-full",style:{width:`${100*e.share}%`,backgroundColor:em(e.source)},title:`${e.source}: ${w(e.count)}`},e.source))}),(0,s.jsx)("ul",{className:"mt-2 flex flex-wrap gap-x-3 gap-y-1",children:a.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:em(e.source)}}),e.source,(0,s.jsxs)("span",{className:"tabular-nums text-fg",children:[Math.round(100*e.share),"%"]})]},e.source))})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted",children:"Most-used shortcuts"}),0===r.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No input_action events in range."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:r.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:em(e.source)}}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.action}),(0,s.jsx)("span",{className:"shrink-0 text-xs text-fg-muted",children:e.source}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",children:w(e.count)})]},`${e.action}/${e.source}`))})]})]})}function eh({coverage:e,proxyMeshes:t,cellSize:n,topN:a=12}){if(0===t.length)return(0,s.jsxs)("div",{className:"space-y-2 text-sm text-fg-muted",children:[(0,s.jsx)("p",{children:"No scene proxy is registered, so there is no reference geometry to call “dead”."}),(0,s.jsx)("p",{children:"Register proxy geometry (ADR 0014) via the scene representation API to enumerate the regions visitors could approach."})]});if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera-position samples in range — every region reads as dead. Widen the range or check that first-person camera samples are being captured."});let r=function(e,t,s,n=1){let a=s*n,r=t.slice(0,600).map(t=>{let n=0;for(let r of e)(function(e,t,s,n,a,r){let l=(e+.5)*n,i=(t+.5)*n,o=(s+.5)*n,[c,d,u,m,x,h]=a;return l>=c-r&&l<=m+r&&i>=d-r&&i<=x+r&&o>=u-r&&o<=h+r})(r.vx,r.vy,r.vz,s,t.aabb,a)&&(n+=r.count);return{mesh:t.name,path:t.path,nearbySamples:n,dead:0===n}});return r.sort((e,t)=>e.nearbySamples-t.nearbySamples),{rows:r,deadCount:r.filter(e=>e.dead).length,total:r.length}}(e,t,n),l=r.rows.reduce((e,t)=>Math.max(e,t.nearbySamples),0)||1,i=r.rows.slice(0,a);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"tabular-nums text-fg",children:w(r.deadCount)})," of"," ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:w(r.total)})," proxy meshes are dead (no nearby camera samples)."]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:i.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.path??e.mesh,children:e.mesh}),e.dead?(0,s.jsx)("span",{className:"shrink-0 rounded bg-rose-500/20 px-1.5 text-xs text-rose-300",children:"dead"}):(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-xs text-fg-muted",children:w(e.nearbySamples)})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-sky-500/70",style:{width:`${e.nearbySamples/l*100}%`}})})]},e.path??e.mesh))})]})}function ep({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:t})]})}function ef({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No FPS samples in range."});let t=[...e].sort((e,t)=>e.bucket-t.bucket),n=t.reduce((e,t)=>Math.max(e,t.sessions),0)||1,a=t.length>1?t[1].bucket-t[0].bucket:10;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.bucket,"–",e.bucket+a]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})}function eg({distribution:e,histogram:t}){return e&&0!==e.samples?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,s.jsx)(ep,{label:"p05 FPS (worst)",value:w(e.p05_fps,1)}),(0,s.jsx)(ep,{label:"p50 FPS (typical)",value:w(e.p50_fps,1)}),(0,s.jsx)(ep,{label:"p95 FPS (best)",value:w(e.p95_fps,1)}),(0,s.jsx)(ep,{label:"Sessions",value:w(e.sessions)})]}),(0,s.jsx)(ef,{bins:t})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No performance samples in range."})}function eb({label:e,value:t,hint:n}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:t}),n?(0,s.jsx)("div",{className:"mt-0.5 text-xs text-fg-muted",children:n}):null]})}function ev({label:e,count:t,total:n,color:a}){let r=n>0?t/n:0;return(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"w-28 shrink-0 text-right text-fg-muted",children:e}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:`h-full rounded ${a}`,style:{width:`${100*r}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:t})]})}function ej({churn:e}){if(!e||0===e.sessions)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No ended sessions in range."});let t=e.churn_sessions/e.sessions,n=`${Math.round(100*t)}%`;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[(0,s.jsx)(eb,{label:"Perf-correlated churn",value:n,hint:"of ended sessions"}),(0,s.jsx)(eb,{label:"Churned sessions",value:w(e.churn_sessions),hint:`of ${w(e.sessions)} ended`}),(0,s.jsx)(eb,{label:"Ended sessions",value:w(e.sessions)})]}),e.churn_sessions>0?(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Churn by cause"}),(0,s.jsx)(ev,{label:"FPS dip",count:e.fps_churn_sessions,total:e.churn_sessions,color:"bg-amber-500/70"}),(0,s.jsx)(ev,{label:"Compile stall",count:e.stall_churn_sessions,total:e.churn_sessions,color:"bg-rose-500/70"}),(0,s.jsx)("p",{className:"pt-1 text-xs text-fg-muted",children:"A session hit by both a dip and a stall is counted under each cause, so the bars can sum to more than the churned total."})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No ended session followed a perf dip within the window — perf isn't driving churn here."})]})}function ey({children:e}){return(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e})}function ew({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No placements in range."});let t=[...e].sort((e,t)=>e.bucket-t.bucket),n=t.reduce((e,t)=>Math.max(e,t.placements),0)||1,a=t.length>1?t[1].bucket-t[0].bucket:2e3;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[w(e.bucket/1e3,1),"–",w((e.bucket+a)/1e3,1),"s"]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-sky-500/70",style:{width:`${e.placements/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.placements})]},e.bucket))})}function eN({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No placements in range."});let t=[...e].sort((e,t)=>e.attempts-t.attempts),n=t.reduce((e,t)=>Math.max(e,t.placements),0)||1;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.attempts," ",1===e.attempts?"try":"tries"]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-violet-500/70",style:{width:`${e.placements/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.placements})]},e.attempts))})}function ek({rows:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No placements in range."});let t=[...e].sort((e,t)=>t.placements-e.placements),n=t.reduce((e,t)=>Math.max(e,t.placements),0)||1;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"w-16 shrink-0 text-right capitalize text-fg-muted",children:e.surface}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.placements/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.placements}),(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:["×",w(e.avg_scale,2)]})]},e.surface))})}function eS({data:e}){let t=e?.timeToPlace??[],n=e?.attempts??[],a=e?.surfaces??[];return 0===a.reduce((e,t)=>e+t.placements,0)&&0===t.length&&0===n.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No AR placements in range."}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(ey,{children:"Time to place"}),(0,s.jsx)(ew,{bins:t})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(ey,{children:"Re-placement attempts"}),(0,s.jsx)(eN,{bins:n})]}),(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)(ey,{children:"Surface breakdown (× avg scale)"}),(0,s.jsx)(ek,{rows:a})]})]})}function e_(e){return`${Math.round(100*e)}%`}function eM({data:e}){if(!e||0===e.samples)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No frame-perf samples in range."});let t=e.p50_fps>=50&&e.p50_render_scale>0&&e.p50_render_scale<.9,n=[{label:"Median FPS",value:w(Math.round(e.p50_fps))},{label:"Avg FPS",value:w(Math.round(e.avg_fps))},{label:"Median render scale",value:e_(e.p50_render_scale)},{label:"Avg render scale",value:e_(e.avg_render_scale)},{label:"Downscaled frames",value:e_(e.downscaled_share)},{label:"Samples",value:w(e.samples)}];return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-3 sm:grid-cols-3",children:n.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-xs text-fg-muted",children:e.label}),(0,s.jsx)("dd",{className:"tabular-nums text-lg text-fg",children:e.value})]},e.label))}),t?(0,s.jsxs)("p",{className:"rounded-md border border-amber/40 bg-amber/10 px-3 py-2 text-xs text-amber",children:["Good FPS is being bought with resolution — the median frame renders at"," ",e_(e.p50_render_scale)," scale. The headline FPS overstates the device experience."]}):null]})}let eC={orbit:"Orbit",pan:"Pan",dolly:"Dolly",zoom:"Zoom",roll:"Roll",fly:"Fly",navigate:"Navigate"};function eP({stats:e}){let t=[...e].sort((e,t)=>t.gestures-e.gestures),n=t.reduce((e,t)=>e+t.gestures,0),a=t.reduce((e,t)=>Math.max(e,t.gestures),0);return 0===t.length||0===n?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No camera-navigation gestures in range. Enable ",(0,s.jsx)("code",{children:"cameraGesture"})," capture in the SDK (on by default for Babylon) to populate this."]}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>{var t,r;let l=n>0?e.gestures/n*100:0;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:eC[t=e.kind]??t.charAt(0).toUpperCase()+t.slice(1)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[w(e.gestures),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",l.toFixed(0),"%"]}),(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:["avg ",!Number.isFinite(r=e.avg_ms)||r<=0?"0 ms":r<1e3?`${Math.round(r)} ms`:`${(r/1e3).toFixed(r<1e4?2:1)} s`]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${a>0?e.gestures/a*100:0}%`}})})]},e.kind)})})}function eR(e){let t=y(e.started_at),s=y(e.ended_at);return Number.isFinite(t)&&Number.isFinite(s)?Math.max(0,s-t):0}function eT(e,t){let s=e.length;if(0===s)return{sessions:0,earlyExitRate:0,avgDurationMs:0,avgPerMinute:0};let n=0,a=0,r=0;for(let{stat:s,rate:l}of e){let e=eR(s);e<t&&(n+=1),a+=e,r+=l}return{sessions:s,earlyExitRate:n/s,avgDurationMs:a/s,avgPerMinute:r/s}}function ez(e){return`${Math.round(100*e)}%`}let eA=[{key:"teleport",label:"Teleport"},{key:"smooth",label:"Smooth locomotion"},{key:"navigate",label:"Navigate"}];function eE({stats:e}){let t=function(e){let t=0,s=0,n=0;for(let a of e)t+=a.teleports,s+=Math.max(0,a.fly_gestures-a.teleports),n+=a.navigate_gestures;return{teleport:t,smooth:s,navigate:n,total:t+s+n}}(e),n=function(e,t=3e4){if(e.length<2)return null;let s=e.map(e=>({stat:e,rate:(e.fly_gestures+e.navigate_gestures)/(Math.max(eR(e),1e3)/6e4)})).sort((e,t)=>e.rate-t.rate),n=Math.floor(s.length/2),a=s.slice(0,n);return{heavy:eT(s.slice(n),t),light:eT(a,t)}}(e);if(0===e.length||0===t.total)return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No XR locomotion in range. This panel reads ",(0,s.jsx)("code",{children:"camera_gesture"})," (fly / navigate) and"," ",(0,s.jsx)("code",{children:"mesh_interaction"})," teleports from sessions using an XR input source — enter an immersive session to populate it."]});let a=Math.max(t.teleport,t.smooth,t.navigate,1);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("ul",{className:"space-y-3",children:eA.map(e=>{let n=t[e.key],r=t.total>0?n/t.total:0;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:e.label}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[w(n),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",ez(r)]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n/a*100}%`}})})]},e.key)})}),n&&(0,s.jsxs)("div",{className:"border-t border-ink/40 pt-3 text-sm",children:[(0,s.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-fg-muted",children:"Comfort · locomotion vs. early exit"}),(0,s.jsxs)("table",{className:"w-full text-xs tabular-nums",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-fg-muted",children:[(0,s.jsx)("th",{className:"text-left font-normal",children:"Locomotion"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Sessions"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Early exit"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Avg length"})]})}),(0,s.jsx)("tbody",{children:[{label:"Heavy",split:n.heavy},{label:"Light",split:n.light}].map(({label:e,split:t})=>{var n;return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"py-0.5 text-fg",children:e}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:w(t.sessions)}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:ez(t.earlyExitRate)}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:!Number.isFinite(n=t.avgDurationMs)||n<=0?"0 s":n<6e4?`${(n/1e3).toFixed(1)} s`:`${(n/6e4).toFixed(1)} min`})]},e)})})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Heavy-locomotion sessions above the median gesture rate. A higher early-exit rate there than for light-locomotion sessions suggests motion discomfort."})]})]})}function e$({stats:e}){let t=function(e){let t=0,s=0;for(let n of e)t+=n.contacts,s+=n.near_ms;return{sessions:e.length,contacts:t,nearMs:s}}(e);if(0===e.length||0===t.contacts)return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No guardian-boundary approaches in range. This panel reads"," ",(0,s.jsx)("code",{children:"xr_boundary_proximity"})," events, emitted on-device when a headset nears its play-space boundary — enter a room-scale session to populate it. The boundary shape is never captured; only a coarse position and duration per approach."]});let n=[...e].sort((e,t)=>t.contacts-e.contacts).slice(0,8),a=t.contacts/Math.max(t.sessions,1);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("dl",{className:"grid grid-cols-3 gap-3 text-sm",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-xs text-fg-muted",children:"Contacts"}),(0,s.jsx)("dd",{className:"tabular-nums font-medium text-fg",children:w(t.contacts)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-xs text-fg-muted",children:"Sessions"}),(0,s.jsx)("dd",{className:"tabular-nums font-medium text-fg",children:w(t.sessions)})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-xs text-fg-muted",children:"Avg / session"}),(0,s.jsx)("dd",{className:"tabular-nums font-medium text-fg",children:w(a,1)})]})]}),(0,s.jsxs)("table",{className:"w-full text-xs tabular-nums",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-fg-muted",children:[(0,s.jsx)("th",{className:"text-left font-normal",children:"Session"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Contacts"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Near time"})]})}),(0,s.jsx)("tbody",{children:n.map(e=>{var t,n;return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"py-0.5 font-mono text-fg",children:(t=e.session_id).length>8?t.slice(0,8):t}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:w(e.contacts)}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:!Number.isFinite(n=e.near_ms)||n<=0?"0 s":n<6e4?`${(n/1e3).toFixed(1)} s`:`${(n/6e4).toFixed(1)} min`})]},e.session_id)})})]}),(0,s.jsx)("p",{className:"text-xs text-fg-muted",children:"Frequent boundary contact means the physical play space didn't comfortably fit the experience. Only the on-device outcome (position + duration) is sent — never the boundary shape or room size."})]})}function eI(e){return`${Math.round(100*e)}%`}let eF=[{key:"handMs",label:"Hand tracking"},{key:"controllerMs",label:"Controller tracking"}];function eL({stats:e}){let t=function(e){let t=0,s=0,n=0,a=0,r=0;for(let l of e)t+=function(e){let t=y(e.started_at),s=y(e.ended_at);return Number.isFinite(t)&&Number.isFinite(s)?Math.max(0,s-t):0}(l),s+=l.degraded_ms,n+=l.hand_degraded_ms,a+=l.controller_degraded_ms,r+=l.degraded_episodes;let l=t>0?Math.min(1,s/t):0;return{sessions:e.length,spanMs:t,degradedMs:s,handMs:n,controllerMs:a,episodes:r,degradedShare:l}}(e);if(0===t.sessions||0===t.degradedMs)return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No degraded tracking in range. This panel reads"," ",(0,s.jsxs)("code",{children:["capability_change ","{ kind: 'tracking' }"]})," transitions from XR sessions — when hand or controller tracking is lost or degrades, the connector reports the episode. Clean tracking means an empty panel."]});let n=Math.max(t.handMs,t.controllerMs,1);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"text-2xl font-semibold tabular-nums text-fg",children:eI(t.degradedShare)}),(0,s.jsx)("div",{className:"text-xs text-fg-muted",children:"of session time with degraded tracking"})]}),(0,s.jsxs)("div",{className:"text-right text-xs text-fg-muted",children:[(0,s.jsxs)("div",{className:"tabular-nums",children:[w(t.episodes)," episodes"]}),(0,s.jsxs)("div",{className:"tabular-nums",children:[w(t.sessions)," sessions"]})]})]}),(0,s.jsx)("ul",{className:"space-y-3",children:eF.map(e=>{let a=t[e.key],r=t.degradedMs>0?a/t.degradedMs:0;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:e.label}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[!Number.isFinite(a)||a<=0?"0 s":a<6e4?`${(a/1e3).toFixed(1)} s`:`${(a/6e4).toFixed(1)} min`,(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",eI(r)]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${a/n*100}%`}})})]},e.key)})}),(0,s.jsx)("p",{className:"text-xs text-fg-muted",children:"Best-effort: XR connectors report tracking loss when a hand or controller drops out of the input registry mid-session (ADR 0048). Split by the input source that degraded."})]})}function eD({stats:e}){let t=[...e].sort((e,t)=>t.backtrack_ratio-e.backtrack_ratio),n=t.reduce((e,t)=>Math.max(e,t.backtrack_ratio),0);return 0===t.length?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No camera-position samples in range. Enable ",(0,s.jsx)("code",{children:"cameraSample"})," capture in the SDK (on by default for Babylon) to populate this."]}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>{var t;let a=100*e.backtrack_ratio;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:""===(t=e.scene)?"(default scene)":t}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[a.toFixed(0),"%",(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:[w(e.revisits)," / ",w(e.entries)," entries ·"," ",w(e.sessions)," ",1===e.sessions?"session":"sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n>0?e.backtrack_ratio/n*100:0}%`}})})]},e.scene)})})}let eO="#161210",eB={fontSize:13,color:"#a8917c"},eU={padding:"6px 10px",fontSize:13,borderTop:"1px solid #34291f"};function eH({sessions:e,onSelect:t,selectedId:n}){return 0===e.length?(0,s.jsx)("p",{style:eB,children:"No sessions in range."}):(0,s.jsx)("div",{style:{maxHeight:320,overflow:"auto"},children:(0,s.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left"},children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{style:{fontSize:11,textTransform:"uppercase",color:"#a8917c"},children:[(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Session"}),(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Visitor"}),(0,s.jsx)("th",{style:{padding:"6px 10px",textAlign:"right"},children:"Events"}),(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Started"})]})}),(0,s.jsx)("tbody",{children:e.map(e=>{var a;let r,l=e.session_id===n;return(0,s.jsxs)("tr",{onClick:t?()=>t(e.session_id):void 0,style:{cursor:t?"pointer":"default",background:l?"rgba(237,166,62,0.15)":void 0},children:[(0,s.jsx)("td",{style:{...eU,fontFamily:"ui-monospace, monospace",color:"#d8c8b8"},children:e.session_id.slice(0,12)}),(0,s.jsx)("td",{style:{...eU,fontFamily:"ui-monospace, monospace",color:"#a8917c"},children:e.visitor_id.slice(0,8)}),(0,s.jsx)("td",{style:{...eU,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:w(e.events)}),(0,s.jsx)("td",{style:{...eU,fontSize:12,color:"#a8917c"},children:Number.isNaN((r=new Date((a=e.started_at).includes("T")?a:a.replace(" ","T")+"Z")).getTime())?a:r.toLocaleString()})]},e.session_id)})})]})})}function eV({bins:e,gridSize:t,size:n=320,className:r,style:l}){let i=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let s=i.current;if(!s)return;let a=s.getContext("2d");a&&function(e,t,s,n){if(e.clearRect(0,0,n,n),e.fillStyle=eO,e.fillRect(0,0,n,n),0===t.length)return;let a=t.reduce((e,t)=>Math.max(e,t.count),0),r=n/s;for(let s of t)e.fillStyle=j(a>0?s.count/a:0,.85),e.fillRect(s.gx*r,s.gy*r,Math.ceil(r),Math.ceil(r))}(a,e,t,n)},[e,t,n]),(0,s.jsx)("canvas",{ref:i,width:n,height:n,className:r,style:l,"aria-label":"Pointer heatmap"})}function eG({bins:e,gridSize:t,size:n=340,className:r,style:l}){let i=(0,a.useRef)(null);return(0,a.useEffect)(()=>{let s=i.current;if(!s)return;let a=s.getContext("2d");if(!a)return;let r=Math.min(window.devicePixelRatio||1,2);s.width=n*r,s.height=n*r,a.setTransform(r,0,0,r,0,0),function(e,t,s,n){let a=n/2,r=n/2,l=n/2-18;if(e.clearRect(0,0,n,n),e.fillStyle=eO,e.fillRect(0,0,n,n),e.strokeStyle="#34291f",e.lineWidth=1,e.beginPath(),e.arc(a,r,l,0,2*Math.PI),e.stroke(),e.beginPath(),e.arc(a,r,l/2,0,2*Math.PI),e.stroke(),t.length>0){let n=t.reduce((e,t)=>Math.max(e,t.count),0),i=2*Math.PI/s;for(let o of t){let t=n>0?o.count/n:0,c=1-(o.elevation_bin+1)/s,d=1-o.elevation_bin/s,u=Math.max(0,c)*l,m=Math.max(0,d)*l,x=o.azimuth_bin*i,h=x+i;e.beginPath(),e.arc(a,r,m,x,h),e.arc(a,r,u,h,x,!0),e.closePath(),e.fillStyle=j(t,.85),e.fill()}}let i=(t,s,n)=>{e.lineWidth=3,e.strokeStyle="rgba(22,18,16,0.9)",e.strokeText(t,s,n),e.fillStyle="#d8c8b8",e.fillText(t,s,n)};for(let t of(e.font="600 10px ui-sans-serif, system-ui, sans-serif",e.textAlign="left",e.textBaseline="middle",e.strokeStyle="rgba(203,213,225,0.35)",e.lineWidth=1,e.beginPath(),e.moveTo(a,r),e.lineTo(a,r-l),e.stroke(),[0,l/2,l]))e.beginPath(),e.moveTo(a-3,r-t),e.lineTo(a+3,r-t),e.stroke();i("up",a+6,r),i("horizon",a+6,r-l/2),i("down",a+6,r-l+2)}(a,e,t,n)},[e,t,n]),(0,s.jsx)("canvas",{ref:i,className:r,style:{width:n,height:n,...l},"aria-label":"Camera view-direction heatmap: top-down polar plot where the center is looking up, the middle ring is the horizon, and the rim is looking down; color shows how often each direction was viewed."})}let eW={background:"rgba(32,25,19,0.6)",borderRadius:8,padding:12},eK={fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#a8917c"},eX={marginTop:4,fontSize:24,fontWeight:600,color:"#f4eadf",fontVariantNumeric:"tabular-nums"};function eq({label:e,value:t}){return(0,s.jsxs)("div",{style:eW,children:[(0,s.jsx)("div",{style:eK,children:e}),(0,s.jsx)("div",{style:eX,children:t})]})}function eJ({perf:e}){return e&&0!==e.samples?(0,s.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:12},children:[(0,s.jsx)(eq,{label:"Samples",value:w(e.samples)}),(0,s.jsx)(eq,{label:"Avg FPS",value:w(e.avg_fps,1)}),(0,s.jsx)(eq,{label:"p50 FPS",value:w(e.p50_fps,1)}),(0,s.jsx)(eq,{label:"Min FPS",value:w(e.min_fps,1)})]}):(0,s.jsx)("p",{style:eB,children:"No performance samples in range."})}function eY({bins:e,gridSize:t}){return(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(eV,{bins:e,gridSize:t,className:"rounded-lg border border-edge"})})}function eZ({meshes:e,gridSize:t,fetchHeatmap:n}){let r=(0,a.useMemo)(()=>e.filter(e=>e.mesh),[e]),[l,i]=(0,a.useState)(r[0]?.mesh??""),[o,c]=(0,a.useState)([]),[d,u]=(0,a.useState)(!1),[m,x]=(0,a.useState)(null),h=(0,a.useRef)(n);h.current=n;let p=(0,a.useRef)(null);return((0,a.useEffect)(()=>{0===r.length?i(""):r.some(e=>e.mesh===l)||i(r[0].mesh)},[r,l]),(0,a.useEffect)(()=>{if(!l){c([]),u(!1),p.current=null;return}let e=p.current!==l;p.current=l;let t=!1;return e&&u(!0),x(null),h.current(l).then(e=>{t||c(e)}).catch(e=>{t||x(e instanceof Error?e.message:"Failed to load heatmap")}).finally(()=>{t||u(!1)}),()=>{t=!0}},[l,e]),0===r.length)?(0,s.jsx)("p",{className:"text-sm text-muted",children:"No mesh interactions in this range yet."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"text-muted",children:"Mesh"}),(0,s.jsx)("select",{className:"rounded-md border border-edge bg-surface px-2 py-1",value:l,onChange:e=>i(e.target.value),children:r.map(e=>(0,s.jsxs)("option",{value:e.mesh,children:[e.mesh," (",e.count,")"]},e.mesh))})]}),(0,s.jsx)("div",{className:"flex min-h-[8rem] justify-center",children:m?(0,s.jsx)("p",{className:"text-sm text-danger",children:m}):d?(0,s.jsx)("p",{className:"text-sm text-muted",children:"Loading…"}):(0,s.jsx)(eV,{bins:o,gridSize:t,className:"rounded-lg border border-edge"})})]})}function eQ({meshes:e}){let t=e.reduce((e,t)=>Math.max(e,t.count),0);return 0===e.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:w(e.count)})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${t>0?e.count/t*100:0}%`}})})]},e.mesh))})}function e0({links:e}){let t=function(e){let t=new Map;for(let s of e){let e=t.get(s.from);e||(e={from:s.from,outgoing:0,top:0,links:[]},t.set(s.from,e)),e.links.push({to:s.to,sessions:s.sessions}),e.outgoing+=s.sessions,e.top=Math.max(e.top,s.sessions)}let s=[...t.values()].sort((e,t)=>t.outgoing-e.outgoing);for(let e of s)e.links.sort((e,t)=>t.sessions-e.sessions);return s}(e);return 0===t.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted","data-testid":"scene-retention-empty",children:"No scene transitions in range. Sessions need at least two scene_change markers to form a flow."}):(0,s.jsx)("ul",{className:"space-y-4","data-testid":"scene-retention-funnel",children:t.map(e=>(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.from,children:e.from}),(0,s.jsxs)("span",{className:"tabular-nums text-xs text-fg-muted",children:[w(e.outgoing)," leaving"]})]}),(0,s.jsx)("ul",{className:"space-y-1",children:e.links.map(t=>{let n=e.top>0?t.sessions/e.top*100:0;return(0,s.jsxs)("li",{className:"text-sm","data-scene-link":`${e.from}->${t.to}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("span",{className:"truncate font-mono text-xs text-fg-muted",children:["→ ",t.to]}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:w(t.sessions)})]}),(0,s.jsx)("div",{className:"mt-0.5 h-2 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full",style:{width:`${n}%`,backgroundColor:"#34d399"},title:`${e.from} → ${t.to}: ${w(t.sessions)} sessions`})})]},t.to)})})]},e.from))})}let e1=[{bucket:0,label:"0–25%"},{bucket:25,label:"25–50%"},{bucket:50,label:"50–75%"},{bucket:75,label:"75–100%"}];function e2({bins:e}){let t=new Map(e.map(e=>[e.bucket,e.sessions])),n=e1.map(e=>({...e,sessions:t.get(e.bucket)??0})),a=n.reduce((e,t)=>e+t.sessions,0);if(0===a)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No view-direction samples in range."});let r=n.reduce((e,t)=>Math.max(e,t.sessions),0)||1,l=(t.get(0)??0)/a;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Sessions that saw <25% of the object"}),(0,s.jsxs)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:[w(100*l,0),"%"]})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:n.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:e.label}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/r*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})]})}let e5=[1e3,3e3,5e3];function e3(e){if(!Number.isFinite(e)||e<=0)return"0 ms";if(e<1e3)return`${Math.round(e)} ms`;let t=e/1e3;return`${Number.isInteger(t)?t:t.toFixed(1)} s`}function e4({rows:e,boundaries:t=e5}){let n=new Map(e.map(e=>[e.band,e])),a=t.length+1;if(0===e.reduce((e,t)=>e+t.sessions,0))return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No ",(0,s.jsx)("code",{children:"asset_load"})," events in range. Enable asset/scene load capture in the SDK (on by default for Babylon) to see how load time affects bounce rate."]});let r=Array.from({length:a},(e,t)=>{let s=n.get(t),a=s?.sessions??0,r=s?.bounced??0;return{i:t,sessions:a,bounced:r,rate:a>0?r/a:0}});return(0,s.jsx)("ul",{className:"space-y-3",children:r.map(e=>{var n,a;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:(n=e.i,0===n?`< ${e3(t[0]??0)}`:n>=t.length?`≥ ${e3(t[t.length-1]??0)}`:`${e3(t[n-1]??0)} – ${e3(t[n]??0)}`)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[(100*e.rate).toFixed(0),"% bounced",(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:["· ",w(e.bounced),"/",w(e.sessions)," sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:`h-full rounded ${(a=e.rate)>=.4?"bg-red":a>=.15?"bg-amber":"bg-emerald"}`,style:{width:`${e.sessions>0?100*e.rate:0}%`}})})]},e.i)})})}var e6=e.i(37215);let e8=(0,a.lazy)(()=>e.A(78573).then(e=>({default:e.CameraDome3DView}))),e9=(0,a.lazy)(()=>e.A(47410).then(e=>({default:e.WorldHeatmap3DView}))),e7=(0,a.lazy)(()=>e.A(70162).then(e=>({default:e.FlowSankey3DView}))),te=(0,a.lazy)(()=>e.A(21269).then(e=>({default:e.GazeClickDivergence3DView}))),tt=(0,a.lazy)(()=>e.A(44113).then(e=>({default:e.SessionReplayView})));function ts({children:e}){return(0,s.jsx)(a.Suspense,{fallback:(0,s.jsx)("div",{className:"grid min-h-[12rem] place-items-center text-sm text-fg-muted",children:"Loading 3D view…"}),children:e})}function tn(e){return"session"===e.surface&&e.sessionId?{...e.params,session:e.sessionId}:e.params}async function ta(e){let t=e.params.scene;if(t){let s=await e.api.sceneRepresentation(t).catch(()=>null);return s?.proxy?.meshes??[]}return(0,N.mergeSceneProxies)(e.api,e.params)}let tr={id:"camera-dome-3d",title:e6.CAMERA_DOME_TITLE,subtitle:e6.CAMERA_DOME_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Direction resolution",help:"Angular bins for the view-direction dome. More bins resolve finer look-directions; fewer aggregate them.",default:36,min:12,max:72,step:6}},load:e=>e.api.cameraHeatmap({...tn(e),source:void 0,bins:e.settings.bins}),render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(e8,{bins:e??[],gridSize:t.settings.bins})})},tl={id:"world-heatmap-3d",title:e6.WORLD_HEATMAP_TITLE,subtitle:e6.WORLD_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning pointer hits. Larger voxels smooth the heat; smaller ones sharpen spatial detail.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s,n]=await Promise.all([e.api.worldHeatmap({...tn(e),cellSize:e.settings.cellSize}),ta(e),e.api.worldHeatmapStats({...tn(e),cellSize:e.settings.cellSize})]);return{voxels:t,proxyMeshes:s,totals:{cells:n.cells,hits:n.hits}}},render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(e9,{voxels:e.voxels,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,totals:e.totals})})},ti={id:"perf-heatmap-3d",title:e6.PERF_HEATMAP_TITLE,subtitle:e6.PERF_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning frame_perf samples by camera position. Larger voxels smooth the map; smaller ones sharpen where FPS drops.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s]=await Promise.all([e.api.perfHeatmap({...tn(e),cellSize:e.settings.cellSize}),ta(e)]);return{voxels:t,proxyMeshes:s}},render:({data:e,ctx:t})=>{let n=e.voxels.reduce((e,t)=>Math.max(e,t.avgFps),0),a=e.voxels.map(e=>({vx:e.vx,vy:e.vy,vz:e.vz,count:n+1-e.avgFps})),r=e.voxels.map(e=>`${Math.round(e.avgFps)} fps avg \xb7 ${Math.round(e.minFps)} fps min \xb7 ${e.samples} sample${1===e.samples?"":"s"}`);return(0,s.jsx)(ts,{children:(0,s.jsx)(e9,{voxels:a,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,voxelLabels:r,legendTitle:"FPS (slowest = hottest)",legendLow:"smooth",legendHigh:"janky",legendNote:"Each marker is a voxel where frame_perf was sampled, placed at the camera position. Color & size scale with slowness (lower FPS = hotter/bigger), so your worst-performing spots stand out. Hover a cell for its average/min FPS and sample count.",emptyLabel:"No frame_perf samples with position in range. Position capture is opt-in — update your SDK to record where FPS drops."})})}},to={id:"error-heatmap-3d",title:e6.ERROR_HEATMAP_TITLE,subtitle:e6.ERROR_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning error/diagnostic positions. Larger voxels smooth the heat; smaller ones sharpen where things break.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s]=await Promise.all([e.api.errorHeatmap({...tn(e),cellSize:e.settings.cellSize}),ta(e)]);return{voxels:t,proxyMeshes:s}},render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(e9,{voxels:e.voxels,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,legendTitle:"Error density",legendLow:"fewer errors",legendHigh:"most errors",legendNote:"Each marker is a voxel where a runtime error or engine diagnostic fired, binned by the camera position at that moment. Color & size scale with the error count, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:"No positioned errors in range."})})},tc={id:"boundary-heatmap-3d",title:e6.BOUNDARY_HEATMAP_TITLE,subtitle:e6.BOUNDARY_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning guardian-boundary approaches. Larger voxels smooth the heat; smaller ones sharpen where headsets crowd the boundary.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s]=await Promise.all([e.api.boundaryHeatmap({...tn(e),cellSize:e.settings.cellSize}),ta(e)]);return{voxels:t,proxyMeshes:s}},render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(e9,{voxels:e.voxels,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,legendTitle:"Boundary contact density",legendLow:"rare",legendHigh:"most contact",legendNote:"Each marker is a voxel where a headset neared its play-space (guardian) boundary, binned by the HMD position at closest approach. Color & size scale with the approach count. The boundary shape and room size are never captured — only the coarse on-device position of each approach.",emptyLabel:"No guardian-boundary approaches in range. Room-scale sessions that never crowd the boundary leave this empty."})})},td={id:"flow-sankey-3d",title:e6.FLOW_SANKEY_TITLE,subtitle:e6.FLOW_SANKEY_SUBTITLE,help:e6.FLOW_SANKEY_HELP,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{maxLinks:{type:"number",label:"Max links",help:"Maximum aggregate flow links drawn before the panel caps for legibility.",default:80,min:10,max:200,step:10}},load:async e=>{let t={...tn(e),cameraMode:void 0},[s,n]=await Promise.all([e.api.flowHeatmap({...t,bins:36,limit:400,groupByOrigin:!0}),ta(e)]);return{links:s,proxyMeshes:n,flowQuery:t}},render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(e7,{links:e.links,gridSize:36,proxyMeshes:e.proxyMeshes,maxLinks:t.settings.maxLinks,api:t.api,flowQuery:e.flowQuery,hasFirstPerson:t.capabilities.hasFirstPerson})})},tu={id:"gaze-click-divergence-3d",title:e6.GAZE_CLICK_TITLE,subtitle:e6.GAZE_CLICK_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"Shared world-space voxel size for both the gaze and click grids, so the divergence field stays aligned.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s,n]=await Promise.all([e.api.gazeHeatmap({...tn(e),source:void 0,cellSize:e.settings.cellSize}),e.api.worldHeatmap({...tn(e),cellSize:e.settings.cellSize}),ta(e)]);return{gaze:t,click:s,proxyMeshes:n}},render:({data:e,ctx:t})=>(0,s.jsx)(ts,{children:(0,s.jsx)(te,{gazeVoxels:e.gaze,clickVoxels:e.click,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes})})};function tm(e){return!!e.live.enabled&&!!e.sessionId&&(e.live.presence?.sessions.some(t=>t.sessionId===e.sessionId)??!1)}function tx({ctx:e}){let{enabled:t,subscribe:n}=e.live,[r,l]=(0,a.useState)([]),[i,o]=(0,a.useState)(()=>Date.now());return(0,a.useEffect)(()=>t?n(e=>{l(t=>[e,...t].slice(0,40))}):void l([]),[t,n]),(0,a.useEffect)(()=>{if(!t)return;let e=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(e)},[t]),(0,s.jsx)(z,{snapshot:e.live.presence,status:e.live.status,feed:r,now:i,onSelectSession:e.actions.selectSession})}let th=[{id:"session-replay",title:e6.SESSION_REPLAY_TITLE,subtitle:e=>(0,e6.sessionReplaySubtitle)(tm(e)),span:2,surfaces:["session"],clientOnly:!0,render:({ctx:e})=>e.sessionId?(0,s.jsx)(ts,{children:(0,s.jsx)(tt,{api:e.api,sessionId:e.sessionId,isLive:tm(e)})}):null},{id:"live-presence",title:k,subtitle:S,help:_,span:2,surfaces:["overview"],render:({ctx:e})=>(0,s.jsx)(tx,{ctx:e})},{id:"top-meshes",title:"Top meshes",subtitle:"Most-interacted meshes",span:1,surfaces:["overview","session"],settings:{limit:{type:"number",label:"Top N",help:"How many meshes to rank in the list.",default:25,min:5,max:100,step:5}},load:e=>e.api.topMeshes({...tn(e),source:void 0,scene:void 0,limit:e.settings.limit}),render:({data:e})=>(0,s.jsx)(eQ,{meshes:e??[]})},{id:"mesh-leaderboard",title:"Part-popularity leaderboard",subtitle:"Ranked meshes, with trend and input split",help:"The most-interacted meshes ranked by total active interactions (clicks / hovers / picks / drags — passive gaze is excluded), each with a trend sparkline (rising/falling over the range) and an input-source split (mouse / touch / XR / …). Expand a row to see which sources drove it. Unlike the plain Top-meshes list, gaze-only hits don't inflate the ranking.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.topMeshesBySource({...tn(e),source:void 0,limit:400}),e.api.topMeshesTrend({...tn(e),source:void 0,interval:function(e){let{since:t,until:s}=e.params;return null==t||null==s||s<=t?3600:f(s-t,24)}(e),limit:2e3})]);return{sources:t,trend:s}},render:({data:e})=>(0,s.jsx)(ei,{sources:e.sources??[],trend:e.trend??[]})},{id:"blind-spots",title:"Blind spots",subtitle:"Rendered but never noticed",help:"The inverse of the mesh leaderboard (#143): objects with lots of on-screen time (mesh_visibility) but little or no engagement (mesh_interaction + hover_dwell). A retail engraving nobody spots, or a prop/room that renders but nobody investigates. Ranked most-seen-yet-least-touched first. Requires object-dwell capture (mesh_visibility) to be enabled.",span:1,surfaces:["overview","session"],load:e=>e.api.meshBlindSpots({...tn(e),limit:25}),render:({data:e})=>(0,s.jsx)(ec,{meshes:e??[]})},{id:"variant-leaderboard",title:"Variant → conversion leaderboard",subtitle:"Ranked configurator variants, with conversion rate",help:'Ranks product-configurator variants — `custom` events grouped by their name (e.g. a colour, material, or trim swap) — by how often each was viewed, with distinct sessions and the mean dwell before the shopper switched variant or converted. Pick a "success" custom event (e.g. add_to_cart) to reveal the per-variant conversion rate: the share of sessions that fired the success event at or after first viewing that variant. Everything is session-based and read-only; the variant and success events are the ones your scene already emits — no schema changes.',span:1,surfaces:["overview"],load:e=>e.api.variantLeaderboard({},tn(e)),render:({data:e,ctx:t})=>(0,s.jsx)(ed,{initialRows:e??[],api:t.api,params:tn(t)})},{id:"pointer-heatmap",title:"Pointer heatmap",subtitle:"Normalized screen positions",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Grid resolution",help:"Bins per axis for the 2D pointer grid. More bins sharpen detail; fewer smooth the heat.",default:50,min:10,max:120,step:10}},load:e=>e.api.pointerHeatmap({...tn(e),bins:e.settings.bins}),render:({data:e,ctx:t})=>(0,s.jsx)(eY,{bins:e??[],gridSize:t.settings.bins})},{id:"mesh-uv-heatmap",title:"Mesh UV heatmap",subtitle:"Texture-space attention on one mesh",help:"Where on a mesh's surface (its UV/texture space) interactions concentrate. Pick a mesh to see clicks, picks, and hovers binned across its unwrapped texture.",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Grid resolution",help:"Bins per axis for the mesh UV grid. More bins sharpen surface detail; fewer smooth the heat.",default:50,min:10,max:120,step:10}},load:e=>e.api.topMeshes({...tn(e),source:void 0,scene:void 0,limit:100}),render:({data:e,ctx:t})=>(0,s.jsx)(eZ,{meshes:e??[],gridSize:t.settings.bins,fetchHeatmap:e=>t.api.meshUvHeatmap({...tn(t),mesh:e,bins:t.settings.bins})})},tr,{id:"view-coverage",title:"View coverage",subtitle:"How much of the object each session actually saw",help:"The 360° coverage gauge (#146): for each session, its camera view-direction samples are binned into the same azimuth/elevation grid as the view-direction dome, and the fraction of cells it visited is its coverage score (0–100%). Sessions are grouped into four coverage bands, so you can read at a glance how many visitors barely looked around (<25%) versus explored the whole object (75–100%). Derived entirely from existing camera samples — no extra capture.",span:1,surfaces:["overview","session"],load:e=>e.api.viewCoverageHistogram(tn(e)),render:({data:e})=>(0,s.jsx)(e2,{bins:e??[]})},{id:"floor-plan",title:"Floor-plan heatmap",subtitle:"Where visitors stand (top-down, first-person)",help:"Camera positions binned on the ground plane — the first-person counterpart of the pointer heatmap. Filter to the first-person camera mode to isolate walkable sessions.",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Cell size",help:"Ground-plane bin size in world units. Larger cells smooth the dwell heat; smaller cells sharpen spatial resolution.",default:1,min:.25,max:5,step:.25,unit:"m"}},enabled:e=>"viewer"!==e.filters.cameraMode,load:e=>e.api.cameraPositionHeatmap({...tn(e),cellSize:e.settings.cellSize}),render:({data:e,ctx:t})=>(0,s.jsx)(Y,{bins:e??[],cellSize:t.settings.cellSize})},{id:"desire-lines",title:"Desire lines",subtitle:"The routes visitors actually walk",help:"Every session's camera path, binned onto the ground plane and overlaid as a faint poly-line. Where many visitors walk the same way the lines pile up into bright 'desire lines' — the routes people take vs. the ones the scene intended. Filter to the first-person camera mode to isolate walkable sessions.",span:1,surfaces:["overview"],clientOnly:!0,enabled:e=>"viewer"!==e.filters.cameraMode,load:e=>e.api.aggregatePaths({...tn(e),cellSize:1}),render:({data:e})=>(0,s.jsx)(Z,{points:e??[]})},{id:"mesh-interaction-kinds",title:"Interaction kinds",subtitle:"How visitors act on each mesh",help:"Per-mesh breakdown of interaction kinds (hover, pick, click, drag, …) from mesh_interaction events. The dwell ranking says which objects draw attention; this says how people act on them — a hovered-but-never-picked mesh reads very differently from a dragged one.",span:1,surfaces:["overview","session"],load:e=>e.api.meshKinds({...tn(e),limit:200}),render:({data:e})=>(0,s.jsx)(et,{rows:e??[]})},{id:"reachability-report",title:"Reachability report",subtitle:"How far interacted objects sit from the user",help:"Per-mesh distance between where the user stood (the click-time camera position) and the point they interacted with, from mesh_interaction events ASOF-joined to the nearest preceding camera_sample (#151). Objects whose interactions cluster far from the standpoint are consistently reached from an uncomfortable range — actionable feedback for VR UI placement and first-person layout. Meshes past the comfortable-reach threshold are flagged.",span:1,surfaces:["overview","session"],load:e=>e.api.reachability({...tn(e),bucketSize:.5,limit:500}),render:({data:e})=>(0,s.jsx)(es,{bins:e??[],bucketSize:.5,threshold:2})},{id:"input-modality-split",title:"Input-modality split",subtitle:"Keyboard / gamepad / touch / XR — and top shortcuts",help:"How visitors drive the experience: the share of interactions per input source (mouse / touch / keyboard / gamepad / XR), from the input-source breakdown (ADR 0011), paired with the most-used app-level shortcuts/actions from input_action events (ADR 0023).",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.interactionsBySource({...tn(e),source:void 0,limit:100}),e.api.topInputActions({...tn(e),source:void 0,limit:50})]);return{sources:t,actions:s}},render:({data:e})=>(0,s.jsx)(ex,{sources:e.sources??[],actions:e.actions??[]})},{id:"render-scale-truth",title:"Render-scale truth",subtitle:"Is that FPS real, or downscaled?",help:"Adaptive renderers keep frame rate up by quietly dropping resolution. This pairs the FPS headline with the render scale that bought it, and flags the 'good FPS at a low render scale' case where the headline overstates the real device experience.",span:1,surfaces:["overview","session"],load:e=>e.api.renderScale(tn(e)),render:({data:e})=>(0,s.jsx)(eM,{data:e})},{id:"perf-distribution",title:"Performance distribution",subtitle:"p05 / p50 / p95 FPS bands, not just the average",help:"The shape of rendering performance, not a single average: p05 (worst), p50 (typical) and p95 (best) FPS computed per-session then aggregated (ADR 0028 §1), plus a histogram of per-session median FPS. One session contributes one data point, so a few chatty sessions can't skew the curve.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.perfDistribution(tn(e)),e.api.fpsHistogram(tn(e))]);return{distribution:t,histogram:s}},render:({data:e})=>(0,s.jsx)(eg,{distribution:e.distribution,histogram:e.histogram??[]})},{id:"perf-churn",title:"Perf-driven churn",subtitle:"Did the stutter actually cost the session?",help:"Correlates perf dips with early session end (#144). Of the sessions that ended in range, this is the share that ended shortly after an FPS dip (a frame_perf sample below the threshold) or a compile_stall, within the configured window. The cause split attributes each churned session to a low-FPS dip and/or a compile stall — a session hit by both is counted under each cause but only once in the headline rate. No schema change: derived from existing frame_perf, compile_stall and session_end events.",span:1,surfaces:["overview","session"],settings:{windowSec:{type:"number",label:"Window",help:"How long before a session's end a perf dip still counts as correlated.",default:30,min:5,max:300,step:5,unit:"s"},fpsThreshold:{type:"number",label:"FPS dip below",help:"A frame_perf sample below this FPS counts as a dip.",default:30,min:10,max:90,step:5},stallMs:{type:"number",label:"Compile stall ≥",help:"A compile_stall of at least this many milliseconds counts.",default:100,min:0,max:2e3,step:50,unit:"ms"}},load:e=>e.api.perfChurn({...tn(e),windowMs:1e3*e.settings.windowSec,fpsThreshold:e.settings.fpsThreshold,stallMs:e.settings.stallMs}),render:({data:e})=>(0,s.jsx)(ej,{churn:e})},{id:"ar-placement-funnel",title:"AR placement funnel",subtitle:"How hard was it to place the object in the room?",help:'The friction of AR "view in your room" placement (#156, ADR 0048). Time-to-place is how long each object took to settle onto a surface, bucketed; re-placement counts how many tries (attempts) each settle needed — a hesitation signal; the surface breakdown shows which coarse surface class (floor / wall / table / ceiling / unknown) objects landed on and the average final scale (1 = authored real-world size). Signals are coarse and on-device only per ADR 0003 — no room geometry, images, or precise coordinates leave the client. One row per placement settle, not per frame.',span:1,surfaces:["overview","session"],load:async e=>{let[t,s,n]=await Promise.all([e.api.arPlacementTimeToPlace(tn(e)),e.api.arPlacementAttempts(tn(e)),e.api.arPlacementSurfaces(tn(e))]);return{timeToPlace:t,attempts:s,surfaces:n}},render:({data:e})=>(0,s.jsx)(eS,{data:e})},tl,ti,to,tc,{id:"navigation-mix",title:"Navigation-style mix",subtitle:"Orbit / pan / dolly / zoom / roll / fly share + avg gesture duration",span:1,surfaces:["overview","session"],load:e=>e.api.cameraGestures({...tn(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eP,{stats:e??[]})},{id:"xr-locomotion-comfort",title:"VR comfort & locomotion",subtitle:"Teleport / smooth / navigate mix for XR sessions + early-exit correlation",span:1,surfaces:["overview","session"],load:e=>e.api.xrLocomotion({...tn(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eE,{stats:e??[]})},{id:"xr-boundary-contacts",title:"Guardian boundary contacts",subtitle:"Per-session near-boundary approaches + time in the guardian zone — a room-scale comfort signal",span:1,surfaces:["overview","session"],load:e=>e.api.boundaryContacts(tn(e)),render:({data:e})=>(0,s.jsx)(e$,{stats:e??[]})},{id:"tracking-quality",title:"Tracking quality",subtitle:"Share of XR session time with degraded / lost tracking, split by hand vs. controller",span:1,surfaces:["overview","session"],load:e=>e.api.trackingQuality({...tn(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eL,{stats:e??[]})},{id:"scene-retention-funnel",title:"Scene retention funnel",subtitle:"How sessions flow between scenes/levels",help:"Canned level-retention preset (#147): session counts flowing scene → scene in the order they occur, built directly from scene_change markers — no funnel steps to author. Each row is a consecutive transition weighted by the distinct sessions that made it; grouping by the scene left shows where visitors go next and where they drop off. Complements the caller-authored funnel (ADR 0038).",span:1,surfaces:["overview"],load:e=>e.api.sceneRetention({...tn(e),scene:void 0,limit:50}),render:({data:e})=>(0,s.jsx)(e0,{links:e??[]})},{id:"backtrack-ratio",title:"Backtracking hotspots",subtitle:"Scenes ranked by how often visitors re-walk the same area",help:"Path-retrace signal (#153): the same camera-position stream that feeds desire lines, binned onto a coarse grid. Consecutive samples in one cell are collapsed (so standing still doesn't count), then re-entering a cell you already left is a 'backtrack'. The ratio is revisits ÷ cell entries, pooled per scene — a high ratio flags a dead end, a missed cue, or an unclear puzzle, i.e. a candidate for clearer signage / level-design fixes.",span:1,surfaces:["overview","session"],load:e=>e.api.backtrackRatio({...tn(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eD,{stats:e??[]})},{id:"load-bounce-funnel",title:"Load → bounce funnel",subtitle:"Bounce rate by asset-load time band",help:"Sessions bucketed by their initial asset-load time. A session 'bounces' when it produces no interaction (pointer, mesh, or camera gesture) at or after loading. Rising bounce rate in the slower bands is the concrete cost of slow loads.",span:1,surfaces:["overview"],load:e=>e.api.loadBounce({...tn(e),bands:[...e5]}),render:({data:e})=>(0,s.jsx)(e4,{rows:e??[],boundaries:e5})},{id:"dead-zone-report",title:"Dead-zone report",subtitle:"Scene parts visitors never approach",help:"The negative space: registered proxy meshes (ADR 0014) with near-zero camera proximity, computed by subtracting the occupied camera-position voxels (scene coverage) from the scene's proxy geometry. Ranked coldest first. Requires a registered scene proxy to know which regions could be visited.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.coverage({...tn(e),cellSize:1}),ta(e)]);return{coverage:t,proxyMeshes:s}},render:({data:e})=>(0,s.jsx)(eh,{coverage:e.coverage??[],proxyMeshes:e.proxyMeshes??[],cellSize:1})},td,tu];function tp(e){return e?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]}let tf={panels:[],errors:[],loading:!1};function tg({errors:e}){let[t,n]=(0,a.useState)(!1);return 0===e.length||t?null:(0,s.jsxs)("section",{className:"rounded-xl border border-dashed border-amber/60 bg-panel/60 px-4 py-3 text-xs text-fg-muted",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("span",{className:"font-medium uppercase tracking-wide text-fg",children:[e.length," panel",1===e.length?"":"s"," failed to load"]}),(0,s.jsx)("button",{type:"button",onClick:()=>n(!0),className:"text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Dismiss"})]}),(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:e.map((e,t)=>(0,s.jsxs)("li",{className:"font-mono",children:[(0,s.jsx)("span",{className:"text-fg",children:e.source}),(0,s.jsxs)("span",{className:"text-fg-muted",children:[" ","— [",e.code,"] ",e.message]})]},`${e.source}-${t}`))})]})}let tb=(0,n.default)(()=>e.A(33015).then(e=>e.AssistantPanel),{loadableGenerated:{modules:[55810]},ssr:!1,loading:()=>(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Loading assistant…"})});function tv({collectorUrl:e,apiKey:t}){let[n,r]=(0,a.useState)(!1);return(0,s.jsxs)("section",{className:"rounded-xl border border-edge bg-panel p-4","aria-label":"Analytics assistant",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h2",{className:"font-display text-base font-semibold text-fg-hi",children:"Analytics assistant"}),(0,s.jsx)("p",{className:"text-xs text-fg-muted",children:"Ask natural-language questions of this project's analytics. Runs in your browser against a local or bring-your-own model — read-only, aggregate, no data egress by default."})]}),(0,s.jsx)("button",{type:"button",onClick:()=>r(e=>!e),"aria-expanded":n,className:"shrink-0 rounded-md bg-amber px-4 py-2 text-sm font-medium text-ink transition hover:bg-ember",children:n?"Hide assistant":"Ask the assistant"})]}),n?(0,s.jsx)("div",{className:"mt-4 border-t border-edge pt-4",children:(0,s.jsx)(tb,{collectorUrl:e,apiKey:t})}):null]})}function tj({bins:e,gridSize:t}){return(0,s.jsx)(V,{title:"View-direction heatmap",subtitle:"Top-down sphere — center = looking up, rim = looking down",help:(0,s.jsxs)(s.Fragment,{children:["A flattened top-down view of where the camera pointed."," ",(0,s.jsx)("strong",{children:"Distance from the center"})," is the up/down tilt: the ",(0,s.jsx)("strong",{children:"center"})," ","is looking straight up, the ",(0,s.jsx)("strong",{children:"middle ring"})," is the horizon (level), and the"," ",(0,s.jsx)("strong",{children:"outer rim"})," is looking straight down. The"," ",(0,s.jsx)("strong",{children:"angle around the disc"})," is the facing (azimuth) direction. Color shows how often each direction was viewed, normalized to the most-viewed direction in range."]}),children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)(eG,{bins:e,gridSize:t,className:"rounded-lg border border-edge"}),e.length>0?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-fg-muted",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:"View density"}),(0,s.jsx)("span",{children:"rarely"}),(0,s.jsx)("span",{className:"h-2 w-28 rounded-sm",style:{background:v.HEAT_GRADIENT}}),(0,s.jsx)("span",{children:"most-viewed"})]}):null]})})}function ty(e){return null==e?"":new Date(e-6e4*new Date(e).getTimezoneOffset()).toISOString().slice(0,16)}function tw(e){if(!e)return;let t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function tN({filters:e,scenes:t,onChange:n,busy:a}){let r=t=>n({...e,...t});return(0,s.jsxs)("section",{className:"mb-6 flex flex-wrap items-end gap-x-4 gap-y-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-xs text-fg-muted",children:"Time window"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Time window",children:[u.map(t=>{let n=e.window===t.id;return(0,s.jsx)("button",{type:"button",onClick:()=>r({window:t.id}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${n?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:t.label},t.id)}),(0,s.jsx)("button",{type:"button",onClick:()=>r({window:"custom",since:e.since??Date.now()-864e5,until:e.until??Date.now()}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${"custom"===e.window?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:"Custom"})]})]}),"custom"===e.window?(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["From",(0,s.jsx)("input",{type:"datetime-local",value:ty(e.since),onChange:e=>r({since:tw(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["To",(0,s.jsx)("input",{type:"datetime-local",value:ty(e.until),onChange:e=>r({until:tw(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]})]}):null,(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Scene",(0,s.jsxs)("select",{value:e.scene??"",onChange:e=>r({scene:e.target.value||void 0}),className:"min-w-40 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All scenes"}),t.map(e=>(0,s.jsxs)("option",{value:e.scene_id,children:[e.scene_id," (",e.events.toLocaleString(),")"]},e.scene_id))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Input source",(0,s.jsxs)("select",{value:e.source??"",onChange:e=>r({source:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All sources"}),b.map(e=>(0,s.jsx)("option",{value:e,children:g(e)},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Camera mode",(0,s.jsxs)("select",{value:e.cameraMode??"",onChange:e=>r({cameraMode:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All cameras"}),(0,s.jsx)("option",{value:"viewer",children:"Viewer (orbit)"}),(0,s.jsx)("option",{value:"first-person",children:"First-person (walk)"})]})]}),(0,s.jsx)("span",{className:`ml-auto text-xs ${a?"text-saffron":"text-fg-muted"}`,"aria-live":"polite",children:a?"Refreshing…":"Up to date"})]})}function tk({rows:e}){let t=function(e){let t=new Map;for(let s of e){let e=t.get(s.source);e||(e={source:s.source,total:0,sessions:0,byType:[]},t.set(s.source,e)),e.total+=s.count,e.sessions=Math.max(e.sessions,s.sessions),e.byType.push({event_type:s.event_type,count:s.count})}for(let e of t.values())e.byType.sort((e,t)=>t.count-e.count);return[...t.values()].sort((e,t)=>t.total-e.total)}(e),n=t.reduce((e,t)=>Math.max(e,t.total),0);return(0,s.jsx)(V,{title:"Input sources",subtitle:"Interactions by input source",children:0===t.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No source-bearing interactions in range."}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:g(e.source)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[w(e.total),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",w(e.sessions)," ",1===e.sessions?"session":"sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n>0?e.total/n*100:0}%`}})}),(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:e.byType.map(e=>{let t;return(0,s.jsxs)("span",{className:"rounded bg-ink/60 px-1.5 py-0.5 font-mono text-[11px] text-fg-muted",children:[(t=e.event_type.replace(/_/g," ")).charAt(0).toUpperCase()+t.slice(1)," ",w(e.count)]},e.event_type)})})]},e.source))})})}function tS({perf:e}){return(0,s.jsx)(V,{title:"Rendering performance",subtitle:"frame_perf samples",children:(0,s.jsx)(eJ,{perf:e})})}function t_({label:e,value:t,unit:n}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsxs)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:[t,n?(0,s.jsx)("span",{className:"ml-1 text-sm font-normal text-fg-muted",children:n}):null]})]})}function tM(e){return w(e/1048576,1)}function tC({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No FPS samples in range."});let t=[...e].sort((e,t)=>e.bucket-t.bucket),n=t.reduce((e,t)=>Math.max(e,t.sessions),0)||1,a=t.length>1?t[1].bucket-t[0].bucket:10;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.bucket,"–",e.bucket+a]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})}function tP({data:e}){let{distribution:t,histogram:n,frameTime:a,jank:r,byDevice:l,byScene:i,resources:o,stability:c}=e,d=(t?.samples??0)>0;return(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold uppercase tracking-wide text-fg-muted",children:"Performance"}),(0,s.jsx)(V,{title:"FPS distribution",subtitle:"per-session p05 / p50 / p95, summarized across sessions",children:d?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,s.jsx)(t_,{label:"p05 FPS (worst)",value:w(t.p05_fps,1)}),(0,s.jsx)(t_,{label:"p50 FPS (typical)",value:w(t.p50_fps,1)}),(0,s.jsx)(t_,{label:"p95 FPS (best)",value:w(t.p95_fps,1)}),(0,s.jsx)(t_,{label:"Sessions",value:w(t.sessions)})]}),(0,s.jsx)(tC,{bins:n})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No performance samples in range."})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsx)(V,{title:"Frame time",subtitle:"per-session median & worst-window p95",children:a&&0!==a.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(t_,{label:"p50 frame time",value:w(a.p50_ms,1),unit:"ms"}),(0,s.jsx)(t_,{label:"p95 frame time",value:w(a.p95_ms,1),unit:"ms"})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No frame-time samples in range."})}),(0,s.jsx)(V,{title:"Jank",subtitle:"long frames per sample window",children:r&&0!==r.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(t_,{label:"Median session",value:w(r.median_rate,2)}),(0,s.jsx)(t_,{label:"Worst decile",value:w(r.worst_decile_rate,2)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No jank data in range."})})]}),(0,s.jsx)(V,{title:"FPS by device",subtitle:"per-session median FPS, by session_start.device + UA-derived browser/OS",children:0===l.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No device data in range."}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Backend"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Browser"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"OS"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Mobile"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"GPU"}),(0,s.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,s.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,s.jsx)("tbody",{className:"text-fg",children:l.map((e,t)=>(0,s.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,s.jsx)("td",{className:"py-1 pr-4",children:e.engine||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:e.browser||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:e.os||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:"true"===e.is_mobile?"yes":"no"}),(0,s.jsx)("td",{className:"py-1 pr-4 max-w-[16rem] truncate",title:e.renderer,children:e.renderer||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:w(e.sessions)}),(0,s.jsx)("td",{className:"py-1 text-right tabular-nums",children:w(e.p50_fps,1)})]},`${e.engine}|${e.browser}|${e.os}|${e.is_mobile}|${e.renderer}|${t}`))})]})})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsx)(V,{title:"FPS by scene",subtitle:"per-session median FPS per scene",children:0===i.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No scene data in range."}):(0,s.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Scene"}),(0,s.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,s.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,s.jsx)("tbody",{className:"text-fg",children:i.map(e=>(0,s.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,s.jsx)("td",{className:"py-1 pr-4",children:e.scene_id||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:w(e.sessions)}),(0,s.jsx)("td",{className:"py-1 text-right tabular-nums",children:w(e.p50_fps,1)})]},e.scene_id))})]})}),(0,s.jsx)(V,{title:"Stability",subtitle:"hard failures frame_perf can't show",children:c?(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(t_,{label:"Context losses",value:w(c.context_losses)}),(0,s.jsx)(t_,{label:"Compile stalls",value:w(c.compile_stalls)}),(0,s.jsx)(t_,{label:"Incidents",value:w(c.incidents)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No stability data in range."})})]}),(0,s.jsx)(V,{title:"Resource footprint",subtitle:"per-session p50 / p95 of what the scene asked of the device",children:o&&0!==o.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[(0,s.jsx)(t_,{label:"p50 JS heap",value:tM(o.p50_js_heap_bytes),unit:"MB"}),(0,s.jsx)(t_,{label:"p50 texture",value:tM(o.p50_texture_bytes),unit:"MB"}),(0,s.jsx)(t_,{label:"p50 triangles",value:w(o.p50_triangles)}),(0,s.jsx)(t_,{label:"p95 JS heap",value:tM(o.p95_js_heap_bytes),unit:"MB"}),(0,s.jsx)(t_,{label:"p95 texture",value:tM(o.p95_texture_bytes),unit:"MB"}),(0,s.jsx)(t_,{label:"p95 triangles",value:w(o.p95_triangles)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No resource samples in range."})})]})}function tR({label:e,value:t,tone:n="neutral",hint:a}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("p",{className:`mt-0.5 text-lg font-semibold tabular-nums ${"bad"===n?"text-red-300":"warn"===n?"text-amber-300":"good"===n?"text-emerald-300":"text-fg-hi"}`,children:t}),a?(0,s.jsx)("p",{className:"text-[11px] text-fg-muted",children:a}):null]})}function tT({counts:e,perf:t}){let n=new Map(e.map(e=>[e.event_type,e.count])),a=e=>n.get(e)??0,r=a("session_start"),l=a("runtime_error"),i=a("context_lost"),o=a("focus_change"),c=a("visibility_change"),d=a("viewport_resize"),u=e.reduce((e,t)=>e+t.count,0),m=r>0?l/r:0;return(0,s.jsx)(V,{title:"Scene health",subtitle:"Errors, GPU context loss & attention gaps in the selected window",children:u>0?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[(0,s.jsx)(tR,{label:"Errors",value:w(l),tone:l>0?"bad":"good",hint:r>0?`${m.toFixed(2)} / session`:void 0}),(0,s.jsx)(tR,{label:"Context loss",value:w(i),tone:i>0?"warn":"good",hint:"GPU device lost"}),(0,s.jsx)(tR,{label:"Avg FPS",value:t&&t.samples>0?w(t.avg_fps,1):"—",tone:t&&t.samples>0?t.avg_fps>=50?"good":"warn":"neutral",hint:t&&t.samples>0?`min ${w(t.min_fps,0)}`:void 0}),(0,s.jsx)(tR,{label:"Sessions",value:w(r)}),(0,s.jsx)(tR,{label:"Attention",value:w(o+c),hint:"focus + visibility changes"}),(0,s.jsx)(tR,{label:"Resizes",value:w(d),hint:"viewport changes"})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No events in range."})})}let tz=["fatal","error","warning","info"];function tA(e){let t=tz.indexOf(e);return -1===t?tz.length:t}function tE({label:e,value:t,tone:n="neutral"}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"truncate text-xs uppercase tracking-wide text-fg-muted",title:e,children:e}),(0,s.jsx)("p",{className:`mt-0.5 text-lg font-semibold tabular-nums ${"bad"===n?"text-red-300":"warn"===n?"text-amber-300":"text-fg-hi"}`,children:t})]})}function t$({title:e,buckets:t,tones:n}){return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(e=>(0,s.jsx)(tE,{label:e.label,value:w(e.count),tone:n?.(e)},e.key))})]})}function tI({rows:e}){let{bySeverity:t,byCategory:n,byBackend:a,total:r}=function(e){let t=new Map,s=new Map,n=new Map,a=0;for(let r of e){let e=Number(r.incidents)||0;if(e<=0)continue;a+=e,t.set(r.severity,(t.get(r.severity)??0)+e),s.set(r.category,(s.get(r.category)??0)+e);let l=""===r.backend?"unknown":r.backend;n.set(l,(n.get(l)??0)+e)}let r=e=>[...e.entries()].map(([e,t])=>({key:e,label:e,count:t})),l=r(t).sort((e,t)=>tA(e.key)-tA(t.key)||e.key.localeCompare(t.key)),i=(e,t)=>t.count-e.count||e.key.localeCompare(t.key);return{bySeverity:l,byCategory:r(s).sort(i),byBackend:r(n).sort(i),total:a}}(e);return(0,s.jsx)(V,{title:"Engine diagnostics",subtitle:"GPU-health incidents by severity, category & backend in the selected window",children:0===r?(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No engine diagnostics in range."}),(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:["Engine diagnostics (",(0,s.jsx)("code",{className:"text-fg-hi",children:"graphics_diagnostic"}),") are"," ",(0,s.jsx)("span",{className:"text-fg-hi",children:"opt-in and off by default"}),". Enable"," ",(0,s.jsx)("code",{className:"text-fg-hi",children:"captureGraphicsDiagnostics"})," in the SDK to surface GPU errors, device losses, and shader-compile failures here."]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(t$,{title:"By severity",buckets:t,tones:e=>{var t;return"fatal"===(t=e.key)||"error"===t?"bad":"warning"===t?"warn":"neutral"}}),(0,s.jsx)(t$,{title:"By category",buckets:n}),(0,s.jsx)(t$,{title:"By backend",buckets:a})]})})}function tF({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"truncate text-xs uppercase tracking-wide text-fg-muted",title:e,children:e}),(0,s.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-fg-hi",children:t})]})}function tL({title:e,buckets:t}){return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(e=>(0,s.jsx)(tF,{label:e.label,value:w(e.count)},e.key))})]})}function tD({rows:e}){let{byApi:t,byBackend:n,byShadingLanguage:a,total:r}=function(e){let t=new Map,s=new Map,n=new Map,a=0;for(let r of e){let e=Number(r.sessions)||0;if(e<=0)continue;a+=e;let l=(t,s)=>{let n=""===s?"unknown":s;t.set(n,(t.get(n)??0)+e)};l(t,r.api),l(s,r.backend),l(n,r.shadingLanguage)}let r=(e,t)=>t.count-e.count||e.key.localeCompare(t.key),l=e=>[...e.entries()].map(([e,t])=>({key:e,label:e,count:t})).sort(r);return{byApi:l(t),byBackend:l(s),byShadingLanguage:l(n),total:a}}(e);return(0,s.jsx)(V,{title:"Rendering technology",subtitle:"Sessions by graphics API, backend & shading language in the selected window",children:0===r?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No sessions in range."}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(tL,{title:"By API",buckets:t}),(0,s.jsx)(tL,{title:"By backend",buckets:n}),(0,s.jsx)(tL,{title:"By shading language",buckets:a})]})})}function tO({label:e,value:t,hint:n}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-fg-hi",children:t}),n?(0,s.jsx)("p",{className:"text-[11px] text-fg-muted",children:n}):null]})}function tB({buckets:e,bucketSize:t}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."});let n=[...e].sort((e,t)=>e.bucket-t.bucket),a=n.reduce((e,t)=>Math.max(e,t.count),0)||1;return(0,s.jsx)("div",{className:"flex flex-col gap-1",children:n.map(e=>{let n=e.bucket*t;return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"w-24 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:[w(n,1),"–",w(n+t,1)]}),(0,s.jsx)("div",{className:"h-3.5 flex-1 overflow-hidden rounded-sm bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded-sm bg-amber",style:{width:`${e.count/a*100}%`}})}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:w(e.count)})]},e.bucket)})})}function tU({coverage:e,cellSize:t,distance:n,bucketSize:a,navigation:r}){let l=e.length,i=e.reduce((e,t)=>e+t.count,0),o=r.reduce((e,t)=>e+t.total_distance,0),c=r.reduce((e,t)=>e+t.segments,0),d=r.reduce((e,t)=>e+t.active_segments,0),u=r.length,m=l>0||r.length>0;return(0,s.jsx)(V,{title:"Scene traversal",subtitle:"Coverage, camera distance & navigation effort — derived from camera_sample",collapsible:!0,defaultCollapsed:!0,children:m?(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,s.jsx)(tO,{label:"Visited cells",value:w(l),hint:`${w(t,2)} u voxels`}),(0,s.jsx)(tO,{label:"Camera samples",value:w(i)}),(0,s.jsx)(tO,{label:"Avg travel",value:w(u>0?o/u:0,1),hint:u>0?`over ${w(u)} sessions`:void 0}),(0,s.jsx)(tO,{label:"Active movement",value:`${w(100*(c>0?d/c:0),0)}%`,hint:"of camera segments"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs uppercase tracking-wide text-fg-muted",children:"Camera distance distribution"}),(0,s.jsx)(tB,{buckets:n,bucketSize:a})]})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."})})}let tH={babylon:"Babylon.js","babylon-lite":"Babylon (lite)",three:"three.js",playcanvas:"PlayCanvas",r3f:"react-three-fiber",aframe:"A-Frame"};function tV({project:e,playgroundUrl:t,onView:n,onOpenOverlay:r}){var l;let i=e.scene,o=i?.engines.length?i.engines:[],[c,d]=(0,a.useState)(i?.defaultEngine??o[0]??""),u=t.length>0&&c.length>0;return(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-fg-hi",children:i?.label??e.name}),(0,s.jsx)("p",{className:"text-xs text-fg-muted",children:e.name})]}),i?(0,s.jsx)("span",{className:"shrink-0 rounded-full border border-edge bg-ink/50 px-2 py-0.5 text-[11px] text-fg-muted",children:"first-person"===i.cameraMode?"first-person":"viewer"}):null]}),i?.description?(0,s.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:i.description}):(0,s.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:"A project without scene metadata — open its analytics directly."}),o.length>1?(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-[11px] text-fg-muted",children:["Engine",(0,s.jsx)("select",{className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",value:c,onChange:e=>d(e.target.value),children:o.map(e=>(0,s.jsx)("option",{value:e,children:tH[e]??e},e))})]}):1===o.length?(0,s.jsxs)("p",{className:"text-[11px] text-fg-muted",children:["Engine: ",tH[l=o[0]]??l]}):null,(0,s.jsxs)("div",{className:"mt-auto flex flex-wrap gap-2 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:()=>n(e),className:"rounded-md bg-amber px-3 py-1.5 text-xs font-medium text-ink transition hover:bg-ember",children:"View analytics"}),i?(0,s.jsx)("button",{type:"button",disabled:!u,onClick:()=>r(e,c),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi disabled:opacity-40",children:"Open live scene"}):null]})]})}function tG({projects:e,playgroundUrl:t,onView:n}){let[r,l]=(0,a.useState)(null),i=(0,a.useMemo)(()=>{let t=[],s=[],n=[];for(let a of e)a.scene?"first-person"===a.scene.cameraMode?s.push(a):t.push(a):n.push(a);return{viewer:t,firstPerson:s,other:n}},[e]),o=(e,s)=>{let n=e.scene;n&&t&&l({url:`${t.replace(/\/$/,"")}/?scene=${encodeURIComponent(n.id)}&engine=${encodeURIComponent(s)}`,title:`${n.label} \xb7 ${tH[s]??s}`})},c=(e,a)=>a.length>0?(0,s.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:a.map(e=>(0,s.jsx)(tV,{project:e,playgroundUrl:t,onView:n,onOpenOverlay:o},e.id))})]}):null;return(0,s.jsxs)(V,{title:"Scenes",subtitle:"Pick a scene to explore its analytics, or open it live to test capture.",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[c("Viewer",i.viewer),c("First-person",i.firstPerson),c("Other projects",i.other)]}),r?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/70 p-4 sm:p-8",role:"dialog","aria-modal":"true","aria-label":"Live scene overlay",children:(0,s.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col overflow-hidden rounded-xl border border-edge bg-panel",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-edge px-4 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm text-fg",children:r.title}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Open in new tab ↗"}),(0,s.jsx)("button",{type:"button",onClick:()=>l(null),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Close ✕"})]})]}),(0,s.jsx)("iframe",{title:r.title,src:r.url,className:"h-full w-full flex-1 bg-ink"})]})}):null]})}function tW({sessions:e,onSelect:t,selectedId:n}){return(0,s.jsx)(V,{title:"Sessions",subtitle:t?`${e.length} most recent \xb7 select to drill in`:`${e.length} most recent`,children:(0,s.jsx)(eH,{sessions:e,onSelect:t,selectedId:n})})}function tK({baseUrl:e,apiKey:t,sessionId:n,scene:r}){let l=(0,a.useRef)(null),[i,o]=(0,a.useState)([]),[d,u]=(0,a.useState)("loading");return(0,a.useEffect)(()=>{let s=!1;return u("loading"),new c.CollectorApi(e,t).sessionTrajectory(n,{scene:r,limit:5e3}).then(e=>{s||(o(e),u("ready"))}).catch(()=>{s||(o([]),u("error"))}),()=>{s=!0}},[e,t,n,r]),(0,a.useEffect)(()=>{let e=l.current;if(!e)return;let t=e.getContext("2d");if(!t||(t.clearRect(0,0,360,360),t.fillStyle="#0b0e14",t.fillRect(0,0,360,360),0===i.length))return;let s=1/0,n=-1/0,a=1/0,r=-1/0;for(let e of i)e.x<s&&(s=e.x),e.x>n&&(n=e.x),e.z<a&&(a=e.z),e.z>r&&(r=e.z);let o=328/Math.max(n-s,r-a,.001),c=e=>[16+(e.x-s)*o,16+(r-e.z)*o];t.lineWidth=2,t.strokeStyle="#38bdf8",t.beginPath(),i.forEach((e,s)=>{let[n,a]=c(e);0===s?t.moveTo(n,a):t.lineTo(n,a)}),t.stroke();let d=i[0],u=i[i.length-1];if(d){let[e,s]=c(d);t.fillStyle="#22c55e",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}if(u){let[e,s]=c(u);t.fillStyle="#ef4444",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}},[i]),(0,s.jsxs)(V,{title:"Walked path",subtitle:"Camera trajectory (top-down)",help:"The ordered route this session's camera took across the X/Z ground plane — green is the start, red is the end. Meaningful for first-person (walkable) sessions.",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("canvas",{ref:l,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Session camera trajectory"})}),"loading"===d?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"Loading trajectory…"}):"error"===d?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-red-400",children:"Failed to load trajectory."}):0===i.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera movement recorded for this session."}):null]})}function tX(e){return e>=36e5?`${Math.round(e/36e5)}h`:e>=6e4?`${Math.round(e/6e4)}m`:e>=1e3?`${Math.round(e/1e3)}s`:`${e}ms`}function tq({buckets:e,intervalMs:t,onBrush:n,onClear:r,brushed:l}){let i=(0,a.useRef)(null),o=(0,a.useRef)(null),[c,d]=(0,a.useState)(640),u=(0,a.useRef)(null),[m,x]=(0,a.useState)(null);(0,a.useEffect)(()=>{let e=i.current;if(!e)return;let t=()=>d(Math.max(320,e.clientWidth));t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[]);let h={x:40,y:14,w:Math.max(1,c-40-36),h:114},p=e.length>0?{start:e[0].bucket,end:e[e.length-1].bucket+t}:null,f=(0,a.useCallback)(e=>{if(!p)return 0;let t=(e-h.x)/h.w;return Math.round(p.start+Math.max(0,Math.min(1,t))*(p.end-p.start))},[p,h.x,h.w]);(0,a.useEffect)(()=>{let s=o.current;if(!s)return;let n=s.getContext("2d");if(!n)return;if(n.clearRect(0,0,c,150),n.fillStyle="#0b0e14",n.fillRect(0,0,c,150),0===e.length||!p){n.fillStyle="#64748b",n.font="12px system-ui, sans-serif",n.textAlign="center",n.fillText("No events in range",c/2,75);return}let a=e.reduce((e,t)=>Math.max(e,t.events),0)||1,r=p.end-p.start,l=Math.max(1,h.w/e.length*.8);for(let t of e){let e=h.x+(t.bucket-p.start)/r*h.w,s=t.events/a*h.h;n.fillStyle="rgba(56, 189, 248, 0.55)",n.fillRect(e,h.y+h.h-s,l,s)}if(n.font="10px system-ui, sans-serif",n.textBaseline="middle",n.fillStyle="rgba(56, 189, 248, 0.95)",n.textAlign="right",n.fillText(String(a),h.x-5,h.y+4),n.fillText("0",h.x-5,h.y+h.h),n.textBaseline="alphabetic",n.fillStyle="rgba(56, 189, 248, 0.7)",n.textAlign="left",n.fillText(`events / ${tX(t)}`,h.x,144),m){let e=Math.min(m.x0,m.x1),t=Math.max(m.x0,m.x1);n.fillStyle="rgba(56, 189, 248, 0.18)",n.fillRect(e,h.y,t-e,h.h),n.strokeStyle="rgba(56, 189, 248, 0.8)",n.lineWidth=1,n.strokeRect(e,h.y,t-e,h.h)}},[e,c,p,m,t,h.x,h.y,h.w,h.h]);let g=()=>{let e=u.current;if(u.current=null,x(null),!e||4>Math.abs(e.x1-e.x0))return;let t=f(Math.min(e.x0,e.x1)),s=f(Math.max(e.x0,e.x1));s>t&&n(t,s)};return(0,s.jsx)(V,{title:"Event volume over time",subtitle:`Bars: events per ${tX(t)} \xb7 drag to zoom the time window`,children:(0,s.jsxs)("div",{ref:i,className:"relative",children:[(0,s.jsx)("canvas",{ref:o,width:c,height:150,className:"w-full cursor-crosshair rounded-lg border border-edge",onMouseDown:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left;u.current={x0:s,x1:s},x({x0:s,x1:s})},onMouseMove:e=>{if(!u.current)return;let t=e.currentTarget.getBoundingClientRect(),s={...u.current,x1:e.clientX-t.left};u.current=s,x(s)},onMouseUp:g,onMouseLeave:g,"aria-label":"Event volume time series"}),l&&r?(0,s.jsx)("button",{type:"button",onClick:r,className:"absolute right-2 top-2 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Clear zoom"}):null]})})}var tJ=e.i(19761);function tY({label:e,value:t}){return(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-3 py-0.5",children:[(0,s.jsx)("span",{className:"shrink-0 text-xs text-fg-muted",children:e}),(0,s.jsx)("span",{className:"min-w-0 truncate text-right font-mono text-xs text-fg",title:t,children:t})]})}function tZ({title:e,rows:t}){return 0===t.length?null:(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 p-3",children:[(0,s.jsx)("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:e}),t.map(([e,t])=>(0,s.jsx)(tY,{label:e,value:t},e))]})}function tQ(e){let t=[];for(let[s,n]of e){let e=null==n||""===n?null:Array.isArray(n)?n.join(" × "):"boolean"==typeof n?n?"yes":"no":"object"==typeof n?JSON.stringify(n):String(n);null!=e&&t.push([s,e])}return t}function t0({baseUrl:e,apiKey:t,sessionId:n,hiddenTypes:r,onToggleType:l,onSetAllHidden:i}){let o,c,d,[u,m]=(0,a.useState)([]),[x,h]=(0,a.useState)("loading"),[p,f]=(0,a.useState)(null),[g,b]=(0,a.useState)(new Set);(0,a.useEffect)(()=>{let s=!1;return h("loading"),f(null),m([]),b(new Set),(async()=>{try{let a=await (0,tJ.fetchSessionEvents)({endpoint:e,apiKey:t,sessionId:n});if(s)return;m(a),h(0===a.length?"empty":"ready")}catch(e){if(s)return;h("error"),f(e instanceof Error?e.message:"Failed to load session data.")}})(),()=>{s=!0}},[e,t,n]);let{meta:v,byType:j,allTypes:y,sorted:w}=(0,a.useMemo)(()=>{let e=[...u].sort((e,t)=>e.ts-t.ts),t=new Map;for(let s of e)t.set(s.type,(t.get(s.type)??0)+1);let s=[...t.keys()].sort(),n=e[0];return{meta:{start:n,end:e[e.length-1],startEvent:e.find(e=>"session_start"===e.type)},byType:t,allTypes:s,sorted:e}},[u]);if("ready"!==x)return(0,s.jsx)(V,{title:"Session data",subtitle:"Metadata and captured event breakdown",children:(0,s.jsx)("p",{className:"py-6 text-center text-sm text-fg-muted",children:"loading"===x?"Loading session data…":"empty"===x?"No events captured for this session.":p??"Session data unavailable."})});let N=v.start,k=v.end,S=v.startEvent,_=N&&k?k.ts-N.ts:0,M=e=>e?new Date(e).toLocaleString():"—",C=N?.pageMeta,P=tQ([["Project",N?.projectId],["Session",N?.sessionId],["Visitor",N?.visitorId],["SDK",N?.sdkVersion],["Scene ID",N?.sceneId],["URL",N?.url],["Started",M(N?.ts)],["Ended",M(k?.ts)],["Duration",(c=Math.floor((o=Math.round(_/1e3))/60),d=o%60,c>0?`${c}m ${d}s`:`${d}s`)],["Events",String(w.length)]]),R=C?tQ([["Title",C.title],["Language",C.language],["Referrer",C.referrer],["Viewport",C.viewport],["Device pixel ratio",C.devicePixelRatio]]):[],T=S?.type==="session_start"?S.device:void 0,z=S?.type==="session_start"?S.graphics:void 0,A=S?.type==="session_start"?S.scene:void 0,E=S?.type==="session_start"?S.connector:void 0,$=S?.type==="session_start"?S.user:void 0,I=tQ([["Engine",T?.engine],["Graphics API",z?.api],["Backend",z?.backend],["API version",z?.apiVersion],["Shading language",z?.shadingLanguage],["GPU vendor",T?.vendor],["GPU renderer",T?.renderer],["Max texture size",T?.maxTextureSize],["CPU cores",T?.hardwareConcurrency],["Device memory (GB)",T?.deviceMemoryGb],["Mobile",T?.isMobile]]),F=tQ([["Connector",E?[E.name,E.version].filter(Boolean).join(" "):null],["Coordinate system",E?.coordinateSystem],["Description",A?.description],["Camera type",A?.cameraType],["Camera name",A?.cameraName],["Mesh count",A?.meshCount],["User id",$?.id],["User traits",$?.traits]]),L=y.every(e=>r.has(e));return(0,s.jsxs)(V,{title:"Session data",subtitle:"Metadata that was sent and a per-feature breakdown — toggle a type to show/hide it in the replay, expand to inspect raw payloads",help:(0,s.jsxs)(s.Fragment,{children:["Project-level metadata beyond the ",(0,s.jsx)("strong",{children:"Project ID"})," isn't stored in the OSS collector (Phase 1) — everything here is derived from the session's own events. The"," ",(0,s.jsx)("strong",{children:"Device / graphics"})," and ",(0,s.jsx)("strong",{children:"Scene / connector"})," blocks come from the one-time ",(0,s.jsx)("code",{children:"session_start"})," event."]}),children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(tZ,{title:"Identity",rows:P}),(0,s.jsx)(tZ,{title:"Page context",rows:R}),(0,s.jsx)(tZ,{title:"Device / graphics",rows:I}),(0,s.jsx)(tZ,{title:"Scene / connector",rows:F})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:["Captured features (",y.length," event types)"]}),(0,s.jsx)("button",{type:"button",onClick:()=>i(!L,y),className:"rounded-md border border-edge px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:L?"Show all":"Hide all"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:y.map(e=>{let t=!r.has(e),n=g.has(e),a=w.filter(t=>t.type===e).slice(0,3);return(0,s.jsxs)("div",{className:`self-start rounded-lg border border-edge bg-ink/40 ${n?"sm:col-span-2 lg:col-span-3":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[(0,s.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>l(e),className:"accent-amber"}),(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e})]}),(0,s.jsx)("span",{className:"tabular-nums text-xs text-fg-muted",children:j.get(e)}),(0,s.jsx)("button",{type:"button",onClick:()=>b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),"aria-expanded":n?"true":"false",className:"rounded border border-edge px-1.5 py-0.5 text-[10px] text-fg-muted transition hover:border-amber hover:text-fg-hi",children:n?"Hide raw":"Raw"})]}),n?(0,s.jsxs)("pre",{className:"max-h-64 overflow-auto border-t border-edge bg-black/30 px-3 py-2 text-[10px] leading-relaxed text-fg",children:[a.map(e=>JSON.stringify(e,null,2)).join("\n\n"),(j.get(e)??0)>a.length?`
|
|
2
|
-
|
|
3
|
-
… ${(j.get(e)??0)-a.length} more`:""]}):null]},e)})})]})]})}let t1=(0,n.default)(()=>e.A(19723).then(e=>e.SessionReplayView),{loadableGenerated:{modules:[94452]},ssr:!1}),t2=(0,n.default)(()=>e.A(19723).then(e=>e.WorldHeatmap3DView),{loadableGenerated:{modules:[94452]},ssr:!1}),t5=(0,n.default)(()=>e.A(19723).then(e=>e.ClickRays3DView),{loadableGenerated:{modules:[94452]},ssr:!1}),t3={sessions:[],camera:[],perf:null,gaze:[],clickRays:[],hasFirstPerson:!1,proxyMeshes:[],timeseries:[],counts:[],diagnostics:[],renderingTech:[],coverage:[],distance:[],navigation:[],sources:[],floorPlan:[],performance:{distribution:null,histogram:[],frameTime:null,jank:null,byDevice:[],byScene:[],resources:null,stability:null},intervalMs:36e5};e.s(["default",0,function(){let[e,n]=(0,a.useState)(l),[u,m]=(0,a.useState)(i),[p,g]=(0,a.useState)([]),[b,v]=(0,a.useState)(""),[j,w]=(0,a.useState)(d),[M,C]=(0,a.useState)([]),[P,R]=(0,a.useState)(t3),[T,E]=(0,a.useState)("idle"),[F,L]=(0,a.useState)(null),[D,O]=(0,a.useState)(null),[B,U]=(0,a.useState)("idle"),[H,G]=(0,a.useState)(new Set),[K,X]=(0,a.useState)([]),[q,J]=(0,a.useState)(()=>Date.now()),[Y,Z]=(0,a.useState)(0),[Q,ee]=(0,a.useState)(0),[et,es]=(0,a.useState)(void 0),en=(0,a.useRef)(void 0),ea=(0,a.useRef)(new Set),er=(0,a.useRef)(j);er.current=j;let el=(0,a.useRef)(d.window),ei=(0,a.useRef)(b);ei.current=b;let eo=(0,a.useRef)(D);eo.current=D;let ec=(0,a.useRef)(null),ed=(0,a.useRef)(null),eu=(0,a.useRef)(!1),em=(0,a.useCallback)((e,t)=>{let s=`/projects/${encodeURIComponent(e)}`;return t?`${s}/session/${encodeURIComponent(t)}`:s},[]),ex=(0,a.useCallback)(e=>{window.location.pathname!==e&&window.history.pushState({},"",e)},[]);(0,a.useEffect)(()=>{let e=window.location.pathname.match(/^\/projects\/([^/]+)(?:\/session\/([^/]+))?/);e?.[1]&&(ec.current=decodeURIComponent(e[1]),e[2]&&(ed.current=decodeURIComponent(e[2])))},[]),(0,a.useEffect)(()=>{r||n(window.location.origin)},[]),(0,a.useEffect)(()=>{let e=!1;return fetch("/api/projects").then(e=>e.ok?e.json():[]).then(t=>{if(e||!Array.isArray(t)||0===t.length)return;g(t);let[s]=t,n=ec.current,a=(n?t.find(e=>e.id===n):void 0)??t.find(e=>e.apiKey===i)??s;a&&(v(a.id),m(a.apiKey),(n&&a.id===n||1===t.length&&!a.scene)&&(eu.current=!0))}).catch(()=>{}),()=>{e=!0}},[]);let eh=(0,a.useCallback)(async t=>{let s=t??u;if(!s){E("error"),L("An API key is required.");return}E("loading"),L(null),O(null),U("idle");let n=er.current,a=h(n),r=x(n),l=new c.CollectorApi(e,s);try{let e=await l.sessions({...a,source:void 0,limit:100}),t=r.until??Date.now(),s=r.since;if(null==s){let n=e.reduce((e,t)=>{let s=y(t.started_at);return Number.isFinite(s)?Math.min(e,s):e},Date.now());s=Number.isFinite(n)?n:t-864e5}let n=f(Math.max(6e4,t-s)),i=1e3*n,[o,c,d,u,m,x,h,p,g,b,v,j,w,N,k]=await Promise.all([l.cameraHeatmap({...a,source:void 0,bins:36}),l.perf({...a,source:void 0}),l.gazeHeatmap({...a,source:void 0,cellSize:.5}),l.clickRays({...a,cellSize:.5}),l.scenes({since:r.since,until:r.until,limit:200}),l.timeseries({since:r.since,until:r.until,scene:a.scene,interval:n}),l.eventCounts({since:r.since,until:r.until,scene:a.scene}),l.graphicsDiagnosticCounts({...a,source:void 0}),l.renderingTechnology({...a,source:void 0}),l.coverage({...a,source:void 0,cellSize:1}),l.cameraDistance({...a,source:void 0,bucketSize:1}),l.navigation({...a,source:void 0}),l.interactionsBySource(a),l.cameraPositionHeatmap({...a,source:void 0,cameraMode:"first-person",cellSize:1}),(async()=>{let[e,t,s,n,r,i,o,c]=await Promise.all([l.perfDistribution({...a,source:void 0}),l.fpsHistogram({...a,source:void 0}),l.frameTimePercentiles({...a,source:void 0}),l.jankRate({...a,source:void 0}),l.perfByDevice({...a,source:void 0}),l.perfByScene({...a,source:void 0,scene:void 0}),l.resourcePercentiles({...a,source:void 0}),l.stabilityCounts({...a,source:void 0})]);return{distribution:e,histogram:t,frameTime:s,jank:n,byDevice:r,byScene:i,resources:o,stability:c}})()]);C(m),R(t=>({sessions:e,camera:o,perf:c,gaze:d,clickRays:u,hasFirstPerson:N.length>0,proxyMeshes:t.proxyMeshes,timeseries:x,counts:h,diagnostics:p,renderingTech:g,coverage:b,distance:v,navigation:j,sources:w,floorPlan:N,performance:k,intervalMs:i})),E("ready")}catch(e){R(t3),E("error"),L(e instanceof c.ApiError?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[u,e]),ep=(0,a.useCallback)(e=>{v(e.id),m(e.apiKey),es(void 0),en.current=void 0,ex(em(e.id)),eh(e.apiKey)},[eh,em,ex]);(0,a.useEffect)(()=>{if("idle"===T)return;let e=setTimeout(()=>void eh(),300);return()=>clearTimeout(e)},[j]);let ef="idle"!==T&&!!u,eg=(0,a.useRef)(0),eb=(0,a.useRef)(!1);eb.current=null!=D;let ev=(0,a.useCallback)(e=>{X(t=>[e,...t].slice(0,30)),ea.current.forEach(t=>t(e)),!eb.current&&e.sceneId&&e.sceneId!==en.current&&(en.current=e.sceneId,es(e.sceneId),Z(e=>e+1));let t=Date.now();eb.current||t-eg.current<5e3||(eg.current=t,eh(),Z(e=>e+1))},[eh]),{snapshot:ej,status:ey}=function(e,t,s){let[n,r]=(0,a.useState)(null),[l,i]=(0,a.useState)("idle");return(0,a.useEffect)(()=>{if(!s||!t||!e){i("idle"),r(null);return}let n=new c.CollectorApi(e,t);return A(n,e=>n.livePresenceUrl(e),e=>{e.addEventListener("presence",e=>{try{r(JSON.parse(e.data))}catch{}})},i)},[e,t,s]),{snapshot:n,status:l}}(e,u,ef);!function(e,t,s,n){let[r,l]=(0,a.useState)("idle"),i=(0,a.useRef)(n);i.current=n;(0,a.useEffect)(()=>{if(!s||!t||!e)return void l("idle");let n=new c.CollectorApi(e,t),a=void 0;return A(n,e=>n.liveStreamUrl(e,a),e=>{e.addEventListener("event",e=>{try{i.current(JSON.parse(e.data))}catch{}})},l)},[e,t,s,""])}(e,u,ef,ev),(0,a.useEffect)(()=>{if(!ef)return;let e=setInterval(()=>J(Date.now()),1e3);return()=>clearInterval(e)},[ef]),(0,a.useEffect)(()=>{if(!ef)return;let t=new c.CollectorApi(e,u),s=!1,n=async()=>{let e=x(er.current),n=await t.scenes({since:e.since,until:e.until,limit:200}).catch(()=>null);!s&&n&&C(n)},a=setInterval(()=>void n(),5e3);return()=>{s=!0,clearInterval(a)}},[ef,e,u]);let ew=j.scene&&j.scene.length>0?j.scene:void 0;(0,a.useEffect)(()=>{if("idle"===T)return;let t=!1;return(async()=>{let s=new c.CollectorApi(e,u),n=ew?(await s.sceneRepresentation(ew).catch(()=>null))?.proxy?.meshes??[]:await (0,N.mergeSceneProxies)(s,h(er.current));t||R(e=>({...e,proxyMeshes:n}))})(),()=>{t=!0}},[ew,e,u,T,Y]);let eN=(0,a.useCallback)(async t=>{let s=h(er.current),n=new c.CollectorApi(e,u),[a,r,l]=await Promise.all([n.cameraHeatmap({...s,source:void 0,bins:36,session:t}),n.perf({...s,source:void 0,session:t}),n.sessionMeta(t).catch(()=>null)]);return{id:t,meta:l,camera:a,perf:r}},[e,u]),ek=(0,a.useCallback)(async e=>{let t=ei.current;t&&ex(em(t,e)),window.scrollTo({top:0,behavior:"smooth"}),O({id:e,meta:null,camera:[],perf:null}),U("loading"),G(new Set);try{O(await eN(e)),U("ready")}catch(e){U("error"),L(e instanceof c.ApiError?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[eN,em,ex]),eS=(0,a.useCallback)(()=>{let e=ei.current;e&&ex(em(e)),O(null),U("idle"),G(new Set)},[em,ex]),e_=(0,a.useCallback)(e=>{let t=p.find(t=>t.id===e);v(e),t&&m(t.apiKey),R(t3),C([]),E("idle"),L(null),O(null),U("idle"),G(new Set)},[p]),eM=(0,a.useCallback)(e=>{G(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),eC=(0,a.useCallback)((e,t)=>{G(e?new Set(t):new Set)},[]),eP=(0,a.useCallback)((e,t)=>{w(s=>("custom"!==s.window&&(el.current=s.window),{...s,window:"custom",since:e,until:t}))},[]),eR=(0,a.useCallback)(()=>{w(e=>({...e,window:el.current}))},[]);(0,a.useEffect)(()=>{eu.current&&u&&(eu.current=!1,eh())},[p,u,eh]),(0,a.useEffect)(()=>{if("ready"===T&&ed.current){let e=ed.current;ed.current=null,ek(e)}},[T,ek]),(0,a.useEffect)(()=>{let e=()=>{let e=window.location.pathname.match(/^\/projects\/[^/]+(?:\/session\/([^/]+))?/),t=e?.[1]?decodeURIComponent(e[1]):null;t?eo.current?.id!==t&&ek(t):eo.current&&eS()};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[ek,eS]);let eT="loading"===T,ez=(0,a.useMemo)(()=>new c.CollectorApi(e,u),[e,u]),eA=(0,a.useMemo)(()=>h(j),[j,Y]),eE=(0,a.useCallback)(e=>{let t=ea.current;return t.add(e),()=>{t.delete(e)}},[]),e$=(0,a.useMemo)(()=>({selectSession:e=>void ek(e),setTimeRange:(e,t)=>eP(e,t),setFilters:e=>w(t=>({...t,...e}))}),[ek,eP]),eI={api:ez,baseUrl:e,apiKey:u,params:eA,filters:j,capabilities:{hasFirstPerson:P.hasFirstPerson},actions:e$,live:{presence:ej,enabled:ef,subscribe:eE,sceneId:ef?et:void 0,status:ey},settings:{}},eF={...eI,surface:"overview"},eL=D?{...eI,surface:"session",sessionId:D.id}:null,eD=function(){let[e,s]=(0,a.useState)(tf);return(0,a.useEffect)(()=>{let e,n,a=(e=tp(t.default.env.NEXT_PUBLIC_PANELS_MANIFEST_URL),n=tp(t.default.env.NEXT_PUBLIC_PANELS_ALLOWED_ORIGINS),{enabled:e.length>0,manifestUrls:e,allowOrigins:n});if(!a.enabled)return;let r=!1,l=new AbortController;return s({panels:[],errors:[],loading:!0}),(async()=>{let e=[],t=[],n=new Set;for(let s of a.manifestUrls){let r=await $(s,{signal:l.signal});if("code"in r){t.push(r);continue}let i=await I(r,{allowOrigins:a.allowOrigins.length>0?a.allowOrigins:void 0});for(let s of(t.push(...i.errors),i.panels)){if(n.has(s.id)){t.push({source:s.id,code:"invalid-panel",message:`Duplicate panel id "${s.id}" from another manifest — ignored`});continue}n.add(s.id),e.push(s)}}r||s({panels:e,errors:t,loading:!1})})(),()=>{r=!0,l.abort()}},[]),e}(),eO=(0,a.useMemo)(()=>(function(e,t){let s=new Map;for(let t of e)s.set(t.id,t);let n=[...e],a=[];for(let e of t){if(s.has(e.id)){a.push({source:e.id,code:"invalid-panel",message:`Duplicate panel id "${e.id}" — kept the existing panel`});continue}s.set(e.id,e),n.push(e)}return{panels:n,errors:a}})(th,eD.panels),[eD.panels]),eB=eO.panels,eU=(0,a.useMemo)(()=>[...eD.errors,...eO.errors],[eD.errors,eO.errors]),eH=!!(D&&ej?.sessions.some(e=>e.sessionId===D.id)),eV=(0,a.useRef)(eH);return(0,a.useEffect)(()=>{let e=eV.current;if(eV.current=eH,!e||eH)return;let t=eo.current;if(!t||"ready"!==B)return;let s=t.id,n=!1;return(async()=>{try{let e=await eN(s);n||eo.current?.id!==s||O(e)}catch{}})(),()=>{n=!0}},[eH,B,eN]),(0,a.useEffect)(()=>{if(!eH||"ready"!==B)return;let e=eo.current?.id;if(!e)return;let t=!1,s=setInterval(()=>{(async()=>{try{let s=await eN(e);t||eo.current?.id!==e||O(s)}catch{}})(),t||ee(e=>e+1)},1e3);return()=>{t=!0,clearInterval(s)}},[eH,B,eN]),(0,s.jsxs)("main",{className:"mx-auto max-w-6xl px-6 py-8",children:[(0,s.jsxs)("header",{className:"mb-6 flex items-center gap-3",children:[(0,s.jsx)("img",{src:"/logo.svg",alt:"Uptimizr",width:36,height:36,className:"h-9 w-9 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-display text-2xl font-bold text-fg-hi",children:"Uptimizr"}),(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Analytics for 3D scenes — open-source collector."})]})]}),(0,s.jsxs)("form",{className:"mb-6 flex flex-wrap items-end gap-3 rounded-xl border border-edge bg-panel p-4",onSubmit:e=>{e.preventDefault(),b&&ex(em(b)),eh()},children:[p.length>0?(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Project",(0,s.jsx)("select",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:b,onChange:e=>e_(e.target.value),children:p.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})]}):null,(0,s.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Collector URL",(0,s.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:e,onChange:e=>n(e.target.value),placeholder:"http://localhost:4318"})]}),(0,s.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Project API key",(0,s.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:u,onChange:e=>m(e.target.value),type:"password",placeholder:"utk_…"})]}),(0,s.jsx)("button",{type:"submit",disabled:"loading"===T,className:"rounded-md bg-amber px-4 py-2 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-50",children:"loading"===T?"Loading…":"Load"})]}),"idle"!==T?(0,s.jsx)(tN,{filters:j,scenes:M,onChange:w,busy:eT}):null,F?(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-red-900/60 bg-red-950/40 px-4 py-3 text-sm text-red-300",children:F}):null,"idle"===T?p.length>0?(0,s.jsx)(tG,{projects:p,playgroundUrl:o,onView:ep}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Enter your collector URL and a project API key, then load to view analytics."}):D?(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[eU.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tg,{errors:eU})}):null,(0,s.jsxs)("div",{className:"lg:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Session"}),(0,s.jsx)("p",{className:"font-mono text-sm text-fg",children:D.id}),(0,s.jsx)("p",{className:"mt-1 text-xs text-fg-muted",children:"loading"===B?"Loading session…":[D.meta?.scene?.sceneId?`scene: ${D.meta.scene.sceneId}`:null,D.meta?.device?.gpu?`gpu: ${D.meta.device.gpu}`:null,D.meta?.startedAt?`started: ${D.meta.startedAt}`:null].filter(Boolean).join(" · ")||"No session metadata."})]}),(0,s.jsx)("button",{type:"button",onClick:eS,className:"rounded-md border border-edge px-3 py-2 text-sm text-fg transition hover:border-amber hover:text-fg-hi",children:"← All sessions"})]}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(V,{title:eH?"Session replay · live":"Session replay (birdview timeline)",subtitle:eH?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek).",children:(0,s.jsx)(t1,{api:ez,sessionId:D.id,hiddenTypes:H,isLive:eH})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(t0,{baseUrl:e,apiKey:u,sessionId:D.id,hiddenTypes:H,onToggleType:eM,onSetAllHidden:eC})}),(0,s.jsx)(tS,{perf:D.perf}),eL?(0,s.jsx)(W,{panels:eB,ctx:eL,surface:"session",revision:Y+Q,exclude:["session-replay"]}):null,(0,s.jsx)(tj,{bins:D.camera,gridSize:36}),D.meta?.scene?.cameraType==="free"?(0,s.jsx)(tK,{baseUrl:e,apiKey:u,sessionId:D.id,scene:D.meta?.scene?.sceneId??j.scene}):null,(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tW,{sessions:P.sessions,selectedId:D.id,onSelect:ek})})]}):(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[eU.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tg,{errors:eU})}):null,(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tv,{collectorUrl:e,apiKey:u})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(V,{title:k,subtitle:S,help:_,children:(0,s.jsx)(z,{snapshot:ej,status:ey,feed:K,now:q,onSelectSession:ek})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tq,{buckets:P.timeseries,intervalMs:P.intervalMs,onBrush:eP,brushed:"custom"===j.window,onClear:eR})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tT,{counts:P.counts,perf:P.perf})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tI,{rows:P.diagnostics})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tD,{rows:P.renderingTech})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tU,{coverage:P.coverage,cellSize:1,distance:P.distance,bucketSize:1,navigation:P.navigation})}),(0,s.jsx)(tS,{perf:P.perf}),(0,s.jsx)(W,{panels:eB,ctx:eF,surface:"overview",revision:Y,exclude:["live-presence"]}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tP,{data:P.performance})}),(0,s.jsx)(tk,{rows:P.sources}),(0,s.jsx)(tj,{bins:P.camera,gridSize:36}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(V,{title:"Gaze heatmap (3D)",subtitle:"Camera-pose gaze hit-points voxel-binned in world space — what viewers actually look at",children:(0,s.jsx)(t2,{voxels:P.gaze,cellSize:.5,proxyMeshes:P.proxyMeshes,legendTitle:"Gaze density",legendLow:"few looks",legendHigh:"most looks",legendNote:"Each marker is a voxel where the camera-forward (gaze) ray hit your scene. Enable gaze capture in the SDK to populate this.",emptyLabel:"No gaze hit-points in range. Enable gaze capture in the SDK."})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(V,{title:"Click rays (3D)",subtitle:"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter",children:(0,s.jsx)(t5,{rays:P.clickRays,cellSize:.5,proxyMeshes:P.proxyMeshes})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tW,{sessions:P.sessions,onSelect:ek})})]})]})}],14936)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,37719,a=>{"use strict";a.i(66246);var t=a.i(16496);a.s(["RegisterStandardMaterial",()=>t.RegisterStandardMaterial,"StandardMaterial",()=>t.StandardMaterial,"StandardMaterialDefines",()=>t.StandardMaterialDefines])},16464,a=>{a.v(t=>Promise.all(["static/chunks/1qg1l7t00nyib.js","static/chunks/32_c4mbb6j1l6.js"].map(t=>a.l(t))).then(()=>t(41028)))},27737,a=>{a.v(t=>Promise.all(["static/chunks/02qk_wmkf9at-.js"].map(t=>a.l(t))).then(()=>t(3658)))},3524,a=>{a.v(t=>Promise.all(["static/chunks/0-_j1khfoib6l.js","static/chunks/1gttu-n9am66k.js"].map(t=>a.l(t))).then(()=>t(32858)))},13459,a=>{a.v(t=>Promise.all(["static/chunks/1u8snlm6a7uhi.js","static/chunks/3j9xvdz55bi4p.js"].map(t=>a.l(t))).then(()=>t(39038)))}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94975,e=>{"use strict";var t=e.i(57011),i=e.i(5573),s=e.i(97009),n=e.i(99493);class o extends t.FlowGraphEventBlock{constructor(e){super(e),this.type="PointerDown",this.targetMesh=this.registerDataInput("targetMesh",s.RichTypeAny,e?.targetMesh),this.pointerId=this.registerDataOutput("pointerId",s.RichTypeNumber),this.pickedMesh=this.registerDataOutput("pickedMesh",s.RichTypeAny),this.pickedPoint=this.registerDataOutput("pickedPoint",s.RichTypeAny)}_executeEvent(e,t){let s=this.targetMesh.getValue(e),n=t.pickInfo?.pickedMesh;return!(!s||n===s||n&&(0,i._IsDescendantOf)(n,s))||(this.pointerId.setValue(t.event.pointerId,e),this.pickedMesh.setValue(n??null,e),this.pickedPoint.setValue(t.pickInfo?.pickedPoint??null,e),this._execute(e),!this.config?.stopPropagation)}_preparePendingTasks(e){}_cancelPendingTasks(e){}getClassName(){return"FlowGraphPointerDownEventBlock"}}let r=!1;function p(){r||(r=!0,(0,n.RegisterClass)("FlowGraphPointerDownEventBlock",o))}e.s(["FlowGraphPointerDownEventBlock",0,o,"RegisterFlowGraphPointerDownEventBlock",0,p],42630),p(),e.s([],26234),e.i(26234),e.i(42630),e.s(["FlowGraphPointerDownEventBlock",0,o],94975)}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,6826,45737,e=>{"use strict";var t=e.i(72003),i=e.i(64073),n=e.i(46202);class o{constructor(e,t,i){this.name=e,this.from=t,this.to=i}clone(){return new o(this.name,this.from,this.to)}}e.s(["AnimationRange",0,o],45737);var a=e.i(75481),r=e.i(19696),s=e.i(16635),l=e.i(22832),u=e.i(99493);let c=Object.freeze(new t.Quaternion(0,0,0,0)),h=Object.freeze(t.Vector3.Zero()),T=Object.freeze(t.Vector2.Zero()),m=Object.freeze(r.Size.Zero()),A=Object.freeze(i.Color3.Black()),p=Object.freeze(new i.Color4(0,0,0,0)),_={key:0,repeatCount:0,loopMode:2};class d{static _PrepareAnimation(e,n,o,a,s,l,u,c){let h;if(!isNaN(parseFloat(s))&&isFinite(s)?h=d.ANIMATIONTYPE_FLOAT:s instanceof t.Quaternion?h=d.ANIMATIONTYPE_QUATERNION:s instanceof t.Vector3?h=d.ANIMATIONTYPE_VECTOR3:s instanceof t.Vector2?h=d.ANIMATIONTYPE_VECTOR2:s instanceof i.Color3?h=d.ANIMATIONTYPE_COLOR3:s instanceof i.Color4?h=d.ANIMATIONTYPE_COLOR4:s instanceof r.Size&&(h=d.ANIMATIONTYPE_SIZE),void 0==h)return null;let T=new d(e,n,o,h,u);return T.setKeys([{frame:0,value:s},{frame:a,value:l}]),void 0!==c&&T.setEasingFunction(c),T}get runtimeAnimations(){return this._runtimeAnimations}get hasRunningRuntimeAnimations(){for(let e of this._runtimeAnimations)if(!e.isStopped())return!0;return!1}constructor(e,t,i,n,o,a){this.name=e,this.targetProperty=t,this.framePerSecond=i,this.dataType=n,this.loopMode=o,this.enableBlending=a,this._easingFunction=null,this._runtimeAnimations=[],this._events=[],this.blendingSpeed=.01,this._ranges={},this._coreAnimation=null,this.targetPropertyPath=t.split("."),this.dataType=n,this.loopMode=void 0===o?d.ANIMATIONLOOPMODE_CYCLE:o,this.uniqueId=d._UniqueIdGenerator++}toString(e){let t="Name: "+this.name+", property: "+this.targetProperty;if(t+=", datatype: "+["Float","Vector3","Quaternion","Matrix","Color3","Vector2"][this.dataType],t+=", nKeys: "+(this._keys?this._keys.length:"none"),t+=", nRanges: "+(this._ranges?Object.keys(this._ranges).length:"none"),e){t+=", Ranges: {";let e=!0;for(let i in this._ranges)e||(t+=", "),e=!1,t+=i;t+="}"}return t}addEvent(e){this._events.push(e),this._events.sort((e,t)=>e.frame-t.frame)}removeEvents(e){for(let t=0;t<this._events.length;t++)this._events[t].frame===e&&(this._events.splice(t,1),t--)}getEvents(){return this._events}createRange(e,t,i){this._ranges[e]||(this._ranges[e]=new o(e,t,i))}deleteRange(e,t=!0){let i=this._ranges[e];if(i){if(t){let e=i.from,t=i.to;for(let i=this._keys.length-1;i>=0;i--)this._keys[i].frame>=e&&this._keys[i].frame<=t&&this._keys.splice(i,1)}this._ranges[e]=null}}getRange(e){return this._ranges[e]}getKeys(){return this._keys}getHighestFrame(){let e=0;for(let t=0,i=this._keys.length;t<i;t++)e<this._keys[t].frame&&(e=this._keys[t].frame);return e}getEasingFunction(){return this._easingFunction}setEasingFunction(e){this._easingFunction=e}floatInterpolateFunction(e,t,i){return(0,n.Lerp)(e,t,i)}floatInterpolateFunctionWithTangents(e,t,i,o,a){return(0,n.Hermite)(e,t,i,o,a)}quaternionInterpolateFunction(e,i,n){return t.Quaternion.Slerp(e,i,n)}quaternionInterpolateFunctionWithTangents(e,i,n,o,a){return t.Quaternion.Hermite(e,i,n,o,a).normalize()}vector3InterpolateFunction(e,i,n){return t.Vector3.Lerp(e,i,n)}vector3InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector3.Hermite(e,i,n,o,a)}vector2InterpolateFunction(e,i,n){return t.Vector2.Lerp(e,i,n)}vector2InterpolateFunctionWithTangents(e,i,n,o,a){return t.Vector2.Hermite(e,i,n,o,a)}sizeInterpolateFunction(e,t,i){return r.Size.Lerp(e,t,i)}color3InterpolateFunction(e,t,n){return i.Color3.Lerp(e,t,n)}color3InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color3.Hermite(e,t,n,o,a)}color4InterpolateFunction(e,t,n){return i.Color4.Lerp(e,t,n)}color4InterpolateFunctionWithTangents(e,t,n,o,a){return i.Color4.Hermite(e,t,n,o,a)}_getKeyValue(e){return"function"==typeof e?e():e}evaluate(e){return _.key=0,this._interpolate(e,_)}_interpolate(e,t,i=!1){let n;if(t.loopMode===d.ANIMATIONLOOPMODE_CONSTANT&&t.repeatCount>0)return t.highLimitValue.clone?t.highLimitValue.clone():t.highLimitValue;let o=this._keys;if(this._coreAnimation)n=this._coreAnimation._key;else{let a=o.length;for(n=t.key;n>=0&&e<o[n].frame;)--n;for(;n+1<=a-1&&e>=o[n+1].frame;)++n;if(t.key=n,n<0)return i?void 0:this._getKeyValue(o[0].value);if(n+1>a-1)return i?void 0:this._getKeyValue(o[a-1].value);this._key=n}let a=o[n],r=o[n+1];if(i&&(e===a.frame||e===r.frame))return;let s=this._getKeyValue(a.value),l=this._getKeyValue(r.value);if(1===a.interpolation)if(r.frame>e)return s;else return l;let u=void 0!==a.outTangent&&void 0!==r.inTangent,_=r.frame-a.frame,O=(e-a.frame)/_,M=a.easingFunction||this.getEasingFunction();switch(M&&(O=M.ease(O)),this.dataType){case d.ANIMATIONTYPE_FLOAT:{let e=u?this.floatInterpolateFunctionWithTangents(s,a.outTangent*_,l,r.inTangent*_,O):this.floatInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return(t.offsetValue??0)*t.repeatCount+e}break}case d.ANIMATIONTYPE_QUATERNION:{let e=u?this.quaternionInterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.quaternionInterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:break;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.addInPlace((t.offsetValue||c).scale(t.repeatCount))}return e}case d.ANIMATIONTYPE_VECTOR3:{let e=u?this.vector3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||h).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_VECTOR2:{let e=u?this.vector2InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.vector2InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||T).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_SIZE:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return this.sizeInterpolateFunction(s,l,O);case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return this.sizeInterpolateFunction(s,l,O).add((t.offsetValue||m).scale(t.repeatCount))}break;case d.ANIMATIONTYPE_COLOR3:{let e=u?this.color3InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color3InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||A).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_COLOR4:{let e=u?this.color4InterpolateFunctionWithTangents(s,a.outTangent.scale(_),l,r.inTangent.scale(_),O):this.color4InterpolateFunction(s,l,O);switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:return e;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return e.add((t.offsetValue||p).scale(t.repeatCount))}break}case d.ANIMATIONTYPE_MATRIX:switch(t.loopMode){case d.ANIMATIONLOOPMODE_CYCLE:case d.ANIMATIONLOOPMODE_CONSTANT:case d.ANIMATIONLOOPMODE_YOYO:if(d.AllowMatricesInterpolation)return this.matrixInterpolateFunction(s,l,O,t.workValue);return s;case d.ANIMATIONLOOPMODE_RELATIVE:case d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT:return s}}return 0}matrixInterpolateFunction(e,i,n,o){return d.AllowMatrixDecomposeForInterpolation?o?(t.Matrix.DecomposeLerpToRef(e,i,n,o),o):t.Matrix.DecomposeLerp(e,i,n):o?(t.Matrix.LerpToRef(e,i,n,o),o):t.Matrix.Lerp(e,i,n)}clone(e=!1){let t=new d(this.name,this.targetPropertyPath.join("."),this.framePerSecond,this.dataType,this.loopMode);if(t.enableBlending=this.enableBlending,t.blendingSpeed=this.blendingSpeed,this._keys&&t.setKeys(this._keys,!1,e),this._ranges)for(let e in t._ranges={},this._ranges){let i=this._ranges[e];i&&(t._ranges[e]=i.clone())}return t}setKeys(e,t=!1,i=!1){if(t)this._keys=e;else if(this._keys=e.slice(0),i)for(let e=0;e<this._keys.length;e++){let t=this._keys[e];this._keys[e]={frame:t.frame,value:t.value.clone?t.value.clone():t.value,inTangent:t.inTangent&&t.inTangent.clone?t.inTangent.clone():t.inTangent,outTangent:t.outTangent&&t.outTangent.clone?t.outTangent.clone():t.outTangent,interpolation:t.interpolation,lockedTangent:t.lockedTangent,easingFunction:t.easingFunction}}}createKeyForFrame(e){_.key=0;let t=this._interpolate(e,_,!0);if(!t)return this._keys[_.key].frame===e?_.key:_.key+1;let i={frame:e,value:t.clone?t.clone():t};return this._keys.splice(_.key+1,0,i),_.key+1}serialize(){let e={};e.name=this.name,e.property=this.targetProperty,e.framePerSecond=this.framePerSecond,e.dataType=this.dataType,e.loopBehavior=this.loopMode,e.enableBlending=this.enableBlending,e.blendingSpeed=this.blendingSpeed;let t=this.dataType;e.keys=[];let i=this.getKeys();for(let n=0;n<i.length;n++){let o=i[n],a={};switch(a.frame=o.frame,t){case d.ANIMATIONTYPE_FLOAT:a.values=[o.value],void 0!==o.inTangent&&a.values.push(o.inTangent),void 0!==o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent)),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation));break;case d.ANIMATIONTYPE_QUATERNION:case d.ANIMATIONTYPE_MATRIX:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:a.values=o.value.asArray(),void 0!=o.inTangent&&a.values.push(o.inTangent.asArray()),void 0!=o.outTangent&&(void 0===o.inTangent&&a.values.push(void 0),a.values.push(o.outTangent.asArray())),void 0!==o.interpolation&&(void 0===o.inTangent&&a.values.push(void 0),void 0===o.outTangent&&a.values.push(void 0),a.values.push(o.interpolation))}e.keys.push(a)}for(let t in e.ranges=[],this._ranges){let i=this._ranges[t];if(!i)continue;let n={};n.name=t,n.from=i.from,n.to=i.to,e.ranges.push(n)}return e}static _UniversalLerp(e,t,i){let n=e.constructor;return n.Lerp?n.Lerp(e,t,i):n.Slerp?n.Slerp(e,t,i):e.toFixed?e*(1-i)+i*t:t}}function O(e,i,n,o=!1,a){let r,s=e;(r="object"==typeof i?i:{referenceFrame:i??0,range:n,cloneOriginalAnimation:o,clonedAnimationName:a}).cloneOriginalAnimation&&((s=e.clone()).name=r.clonedAnimationName||s.name);let l=s.getKeys();if(!l.length)return s;let u=r.referenceFrame&&r.referenceFrame>=0?r.referenceFrame:0,c=0,h=l[0],T=l.length-1,m=l[T],A={referenceValue:h.value,referencePosition:t.TmpVectors.Vector3[0],referenceQuaternion:t.TmpVectors.Quaternion[0],referenceScaling:t.TmpVectors.Vector3[1],keyPosition:t.TmpVectors.Vector3[2],keyQuaternion:t.TmpVectors.Quaternion[1],keyScaling:t.TmpVectors.Vector3[3]},p=h.frame,M=m.frame;if(r.range){let e=s.getRange(r.range);e&&(p=e.from,M=e.to)}else p=r.fromFrame??p,M=r.toFrame??M;p!==h.frame&&(c=s.createKeyForFrame(p)),M!==m.frame&&(T=s.createKeyForFrame(M));let g=s.getKeys();if(1===g.length){let e=s._getKeyValue(g[0]);A.referenceValue=e.clone?e.clone():e}else if(u<=h.frame){let e=s._getKeyValue(h.value);A.referenceValue=e.clone?e.clone():e}else if(u>=m.frame){let e=s._getKeyValue(m.value);A.referenceValue=e.clone?e.clone():e}else{_.key=0;let e=s._interpolate(u,_);A.referenceValue=e.clone?e.clone():e}s.dataType===d.ANIMATIONTYPE_QUATERNION?A.referenceValue.normalize().conjugateInPlace():s.dataType===d.ANIMATIONTYPE_MATRIX&&(A.referenceValue.decompose(A.referenceScaling,A.referenceQuaternion,A.referencePosition),A.referenceQuaternion.normalize().conjugateInPlace());let f=Number.MAX_VALUE,I=r.clipKeys?[]:null;for(let e=c;e<=T;e++){let i=g[e];if((I||r.cloneOriginalAnimation)&&(i={frame:i.frame,value:i.value.clone?i.value.clone():i.value,inTangent:i.inTangent,outTangent:i.outTangent,interpolation:i.interpolation,lockedTangent:i.lockedTangent,easingFunction:i.easingFunction},I&&(f===Number.MAX_VALUE&&(f=i.frame),i.frame-=f,I.push(i))),!e||s.dataType===d.ANIMATIONTYPE_FLOAT||i.value!==h.value)switch(s.dataType){case d.ANIMATIONTYPE_MATRIX:i.value.decompose(A.keyScaling,A.keyQuaternion,A.keyPosition),A.keyPosition.subtractInPlace(A.referencePosition),A.keyScaling.divideInPlace(A.referenceScaling),A.referenceQuaternion.multiplyToRef(A.keyQuaternion,A.keyQuaternion),t.Matrix.ComposeToRef(A.keyScaling,A.keyQuaternion,A.keyPosition,i.value);break;case d.ANIMATIONTYPE_QUATERNION:A.referenceValue.multiplyToRef(i.value,i.value);break;case d.ANIMATIONTYPE_VECTOR2:case d.ANIMATIONTYPE_VECTOR3:case d.ANIMATIONTYPE_COLOR3:case d.ANIMATIONTYPE_COLOR4:i.value.subtractToRef(A.referenceValue,i.value);break;case d.ANIMATIONTYPE_SIZE:i.value.width-=A.referenceValue.width,i.value.height-=A.referenceValue.height;break;default:i.value-=A.referenceValue}}return I&&s.setKeys(I,!0),s}function M(e,t,i,n){let o=new d(e+"Animation",e,i,t,d.ANIMATIONLOOPMODE_CONSTANT);return o.setEasingFunction(n),o}function g(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,i,n,o,a,r,s,l);return h&&(t.getScene&&(c=t.getScene()),c)?c.beginDirectAnimation(t,[h],0,o,h.loopMode!==d.ANIMATIONLOOPMODE_CONSTANT,1,u):null}function f(e,t,i,n,o,a,r,s,l,u,c){let h=d._PrepareAnimation(e,n,o,a,r,s,l,u);return h?t.getScene().beginDirectHierarchyAnimation(t,i,[h],0,a,1===h.loopMode,1,c):null}function I(e,t,i,n,o,a,r,s,l,u){let c=d._PrepareAnimation(e,i,n,o,a,r,s,l);return c?(t.animations.push(c),t.getScene().beginAnimation(t,0,o,1===c.loopMode,1,u)):null}function N(e,t,i,n,o,a,r,s=null,l=!0,u){if(r<=0)return i[e]=t,s&&s(),null;let c=r/1e3*o;return a.setKeys(u??[{frame:0,value:i[e].clone?i[e].clone():i[e]},{frame:c,value:t}]),i.animations||(i.animations=[]),i.animations.push(a),n.beginAnimation(i,0,c,!1,1,s??void 0,void 0,l)}function y(e,t){l.SerializationHelper.AppendSerializedAnimations(e,t)}function R(e){let n,o,a=new d(e.name,e.property,e.framePerSecond,e.dataType,e.loopBehavior),r=e.dataType,s=[];for(e.enableBlending&&(a.enableBlending=e.enableBlending),e.blendingSpeed&&(a.blendingSpeed=e.blendingSpeed),o=0;o<e.keys.length;o++){let a,l,u,c=e.keys[o];switch(r){case d.ANIMATIONTYPE_FLOAT:n=c.values[0],c.values.length>=2&&(a=c.values[1]),c.values.length>=3&&(l=c.values[2]),c.values.length>=4&&(u=c.values[3]);break;case d.ANIMATIONTYPE_QUATERNION:if(n=t.Quaternion.FromArray(c.values),c.values.length>=8){let e=t.Quaternion.FromArray(c.values.slice(4,8));e.equals(t.Quaternion.Zero())||(a=e)}if(c.values.length>=12){let e=t.Quaternion.FromArray(c.values.slice(8,12));e.equals(t.Quaternion.Zero())||(l=e)}c.values.length>=13&&(u=c.values[12]);break;case d.ANIMATIONTYPE_MATRIX:n=t.Matrix.FromArray(c.values),c.values.length>=17&&(u=c.values[16]);break;case d.ANIMATIONTYPE_COLOR3:n=i.Color3.FromArray(c.values),c.values[3]&&(a=i.Color3.FromArray(c.values[3])),c.values[4]&&(l=i.Color3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5]);break;case d.ANIMATIONTYPE_COLOR4:n=i.Color4.FromArray(c.values),c.values[4]&&(a=i.Color4.FromArray(c.values[4])),c.values[5]&&(l=i.Color4.FromArray(c.values[5])),c.values[6]&&(u=i.Color4.FromArray(c.values[6]));break;case d.ANIMATIONTYPE_VECTOR3:default:n=t.Vector3.FromArray(c.values),c.values[3]&&(a=t.Vector3.FromArray(c.values[3])),c.values[4]&&(l=t.Vector3.FromArray(c.values[4])),c.values[5]&&(u=c.values[5])}let h={};h.frame=c.frame,h.value=n,void 0!=a&&(h.inTangent=a),void 0!=l&&(h.outTangent=l),void 0!=u&&(h.interpolation=u),s.push(h)}if(a.setKeys(s),e.ranges)for(o=0;o<e.ranges.length;o++)n=e.ranges[o],a.createRange(n.name,n.from,n.to);return a}async function E(e,t){return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(o.responseText);if(t.animations&&(t=t.animations),t.length){let e=[];for(let i of t)e.push(R(i));i(e)}else{let n=R(t);e&&(n.name=e),i(n)}}else n("Unable to load the animation")}),o.open("GET",t),o.send()})}async function x(e){let t=this?.SnippetUrl??d.SnippetUrl;return await new Promise((i,n)=>{let o=new s.WebRequest;o.addEventListener("readystatechange",()=>{if(4==o.readyState)if(200==o.status){let t=JSON.parse(JSON.parse(o.responseText).jsonPayload);if(t.animations){let n=JSON.parse(t.animations),o=[];for(let t of n.animations){let i=R(t);i.snippetId=e,o.push(i)}i(o)}else{let n=R(JSON.parse(t.animation));n.snippetId=e,i(n)}}else n("Unable to load the snippet "+e)}),o.open("GET",t+"/"+e.replace(/#/g,"/")),o.send()})}d._UniqueIdGenerator=0,d.AllowMatricesInterpolation=!1,d.AllowMatrixDecomposeForInterpolation=!0,d.InheritOriginalValueFromActiveAnimations=!1,d.SnippetUrl="https://snippet.babylonjs.com",d.ANIMATIONTYPE_FLOAT=0,d.ANIMATIONTYPE_VECTOR3=1,d.ANIMATIONTYPE_QUATERNION=2,d.ANIMATIONTYPE_MATRIX=3,d.ANIMATIONTYPE_COLOR3=4,d.ANIMATIONTYPE_COLOR4=7,d.ANIMATIONTYPE_VECTOR2=5,d.ANIMATIONTYPE_SIZE=6,d.ANIMATIONLOOPMODE_RELATIVE=0,d.ANIMATIONLOOPMODE_CYCLE=1,d.ANIMATIONLOOPMODE_CONSTANT=2,d.ANIMATIONLOOPMODE_YOYO=4,d.ANIMATIONLOOPMODE_RELATIVE_FROM_CURRENT=5;let P=!1;e.s(["Animation",0,d,"AnimationCreateAnimation",0,M,"AnimationMakeAnimationAdditive",0,O,"AnimationParse",0,R,"RegisterAnimation",0,function(){P||(P=!0,d.Parse=R,d.ParseFromFileAsync=E,d.ParseFromSnippetAsync=x,d.CreateFromSnippetAsync=x,d.CreateAnimation=M,d.CreateAndStartAnimation=g,d.CreateAndStartHierarchyAnimation=f,d.CreateMergeAndStartAnimation=I,d.MakeAnimationAdditive=O,d.TransitionTo=N,d.AppendSerializedAnimations=y,(0,u.RegisterClass)("BABYLON.Animation",d),a.Node._AnimationRangeFactory=(e,t,i)=>new o(e,t,i))},"_StaticOffsetValueColor3",0,A,"_StaticOffsetValueColor4",0,p,"_StaticOffsetValueQuaternion",0,c,"_StaticOffsetValueSize",0,m,"_StaticOffsetValueVector2",0,T,"_StaticOffsetValueVector3",0,h],6826)},40092,e=>{"use strict";var t,i=e.i(72003),n=e.i(27111),o=e.i(75481),a=e.i(43880);class r extends o.Node{get _matrix(){return this._compose(),this._localMatrix}set _matrix(e){(e.updateFlag!==this._localMatrix.updateFlag||this._needToCompose)&&(this._needToCompose=!1,this._localMatrix.copyFrom(e),this._markAsDirtyAndDecompose())}constructor(e,t,n=null,o=null,a=null,r=null,s=null){super(e,t.getScene(),!1),this.name=e,this.children=[],this.animations=[],this._index=null,this._scalingDeterminant=1,this._needToDecompose=!0,this._needToCompose=!1,this._linkedTransformNode=null,this._waitingTransformNodeId=null,this._waitingTransformNodeUniqueId=null,this._skeleton=t,this._localMatrix=o?.clone()??i.Matrix.Identity(),this._restMatrix=a??this._localMatrix.clone(),this._bindMatrix=r??this._localMatrix.clone(),this._index=s,this._absoluteMatrix=new i.Matrix,this._absoluteBindMatrix=new i.Matrix,this._absoluteInverseBindMatrix=new i.Matrix,this._finalMatrix=new i.Matrix,t.bones.push(this),this.setParent(n,!1),this._updateAbsoluteBindMatrices()}getClassName(){return"Bone"}getSkeleton(){return this._skeleton}get parent(){return this._parentNode}getParent(){return this.parent}getChildren(){return this.children}getIndex(){return null===this._index?this.getSkeleton().bones.indexOf(this):this._index}set parent(e){this.setParent(e)}setParent(e,t=!0){if(this.parent!==e){if(this.parent){let e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1)}this._parentNode=e,this.parent&&this.parent.children.push(this),t&&this._updateAbsoluteBindMatrices(),this.markAsDirty()}}getLocalMatrix(){return this._compose(),this._localMatrix}getBindMatrix(){return this._bindMatrix}getBaseMatrix(){return this.getBindMatrix()}getRestMatrix(){return this._restMatrix}getRestPose(){return this.getRestMatrix()}setRestMatrix(e){this._restMatrix.copyFrom(e)}setRestPose(e){this.setRestMatrix(e)}getBindPose(){return this.getBindMatrix()}setBindMatrix(e){this.updateMatrix(e)}setBindPose(e){this.setBindMatrix(e)}getFinalMatrix(){return this._finalMatrix}getWorldMatrix(){return this.getFinalMatrix()}returnToRest(){if(this._linkedTransformNode){let e=i.TmpVectors.Vector3[0],t=i.TmpVectors.Quaternion[0],n=i.TmpVectors.Vector3[1];this.getRestMatrix().decompose(e,t,n),this._linkedTransformNode.position.copyFrom(n),this._linkedTransformNode.rotationQuaternion=this._linkedTransformNode.rotationQuaternion??i.Quaternion.Identity(),this._linkedTransformNode.rotationQuaternion.copyFrom(t),this._linkedTransformNode.scaling.copyFrom(e)}else this._matrix=this._restMatrix}getAbsoluteInverseBindMatrix(){return this._absoluteInverseBindMatrix}getInvertedAbsoluteTransform(){return this.getAbsoluteInverseBindMatrix()}getAbsoluteMatrix(){return this._skeleton.computeAbsoluteMatrices(),this._absoluteMatrix}getAbsoluteTransform(){return this.getAbsoluteMatrix()}linkTransformNode(e){this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode--,this._linkedTransformNode=e,this._linkedTransformNode&&this._skeleton._numBonesWithLinkedTransformNode++}getTransformNode(){return this._linkedTransformNode}get position(){return this._decompose(),this._localPosition}set position(e){this._decompose(),this._localPosition.copyFrom(e),this._markAsDirtyAndCompose()}get rotation(){return this.getRotation()}set rotation(e){this.setRotation(e)}get rotationQuaternion(){return this._decompose(),this._localRotation}set rotationQuaternion(e){this.setRotationQuaternion(e)}get scaling(){return this.getScale()}set scaling(e){this.setScale(e)}get animationPropertiesOverride(){return this._skeleton.animationPropertiesOverride}_decompose(){this._needToDecompose&&(this._needToDecompose=!1,this._localScaling||(this._localScaling=i.Vector3.Zero(),this._localRotation=i.Quaternion.Zero(),this._localPosition=i.Vector3.Zero()),this._localMatrix.decompose(this._localScaling,this._localRotation,this._localPosition))}_compose(){if(this._needToCompose){if(!this._localScaling){this._needToCompose=!1;return}this._needToCompose=!1,i.Matrix.ComposeToRef(this._localScaling,this._localRotation,this._localPosition,this._localMatrix)}}updateMatrix(e,t=!0,i=!0){this._bindMatrix.copyFrom(e),t&&this._updateAbsoluteBindMatrices(),i?this._matrix=e:this.markAsDirty()}_updateAbsoluteBindMatrices(e,t=!0){if(e||(e=this._bindMatrix),this.parent?e.multiplyToRef(this.parent._absoluteBindMatrix,this._absoluteBindMatrix):this._absoluteBindMatrix.copyFrom(e),this._absoluteBindMatrix.invertToRef(this._absoluteInverseBindMatrix),t)for(let e=0;e<this.children.length;e++)this.children[e]._updateAbsoluteBindMatrices();this._scalingDeterminant=0>this._absoluteBindMatrix.determinant()?-1:1}markAsDirty(){return this._currentRenderId++,this._childUpdateId++,this._skeleton._markAsDirty(),this}_markAsDirtyAndCompose(){this.markAsDirty(),this._needToCompose=!0}_markAsDirtyAndDecompose(){this.markAsDirty(),this._needToDecompose=!0}_updatePosition(e,t=0,n,o=!0){let a=this.getLocalMatrix();if(0==t)o?(a.addAtIndex(12,e.x),a.addAtIndex(13,e.y),a.addAtIndex(14,e.z)):a.setTranslationFromFloats(e.x,e.y,e.z);else{let t=r._TmpMats[0],s=r._TmpVecs[0];this.parent?(t.copyFrom(this.parent.getAbsoluteMatrix()),n&&t.multiplyToRef(n.getWorldMatrix(),t)):i.Matrix.IdentityToRef(t),o&&t.setTranslationFromFloats(0,0,0),t.invert(),i.Vector3.TransformCoordinatesToRef(e,t,s),o?(a.addAtIndex(12,s.x),a.addAtIndex(13,s.y),a.addAtIndex(14,s.z)):a.setTranslationFromFloats(s.x,s.y,s.z)}this._markAsDirtyAndDecompose()}translate(e,t=0,i){this._updatePosition(e,t,i,!0)}setPosition(e,t=0,i){this._updatePosition(e,t,i,!1)}setAbsolutePosition(e,t){this.setPosition(e,1,t)}scale(e,t,n,o=!1){let a=this.getLocalMatrix(),s=r._TmpMats[0];for(let o of(i.Matrix.ScalingToRef(e,t,n,s),s.multiplyToRef(a,a),s.invert(),this.children)){let i=o.getLocalMatrix();i.multiplyToRef(s,i),i.multiplyAtIndex(12,e),i.multiplyAtIndex(13,t),i.multiplyAtIndex(14,n),o._markAsDirtyAndDecompose()}if(this._markAsDirtyAndDecompose(),o)for(let i of this.children)i.scale(e,t,n,o)}setScale(e){this._decompose(),this._localScaling.copyFrom(e),this._markAsDirtyAndCompose()}getScale(){return this._decompose(),this._localScaling}getScaleToRef(e){this._decompose(),e.copyFrom(this._localScaling)}setYawPitchRoll(e,t,n,o=0,a){if(0===o){let s=r._TmpQuat;i.Quaternion.RotationYawPitchRollToRef(e,t,n,s),this.setRotationQuaternion(s,o,a);return}let s=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(s,a))return;let l=r._TmpMats[1];i.Matrix.RotationYawPitchRollToRef(e,t,n,l),s.multiplyToRef(l,l),this._rotateWithMatrix(l,o,a)}rotate(e,t,n=0,o){let a=r._TmpMats[0];a.setTranslationFromFloats(0,0,0),i.Matrix.RotationAxisToRef(e,t,a),this._rotateWithMatrix(a,n,o)}setAxisAngle(e,t,n=0,o){if(0===n){let a=r._TmpQuat;i.Quaternion.RotationAxisToRef(e,t,a),this.setRotationQuaternion(a,n,o);return}let a=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(a,o))return;let s=r._TmpMats[1];i.Matrix.RotationAxisToRef(e,t,s),a.multiplyToRef(s,s),this._rotateWithMatrix(s,n,o)}setRotation(e,t=0,i){this.setYawPitchRoll(e.y,e.x,e.z,t,i)}setRotationQuaternion(e,t=0,n){if(0===t){this._decompose(),this._localRotation.copyFrom(e),this._markAsDirtyAndCompose();return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];i.Matrix.FromQuaternionToRef(e,a),o.multiplyToRef(a,a),this._rotateWithMatrix(a,t,n)}setRotationMatrix(e,t=0,n){if(0===t){let o=r._TmpQuat;i.Quaternion.FromRotationMatrixToRef(e,o),this.setRotationQuaternion(o,t,n);return}let o=r._TmpMats[0];if(!this._getAbsoluteInverseMatrixUnscaledToRef(o,n))return;let a=r._TmpMats[1];a.copyFrom(e),o.multiplyToRef(e,a),this._rotateWithMatrix(a,t,n)}_rotateWithMatrix(e,t=0,i){let n=this.getLocalMatrix(),o=n.m[12],a=n.m[13],s=n.m[14],l=this.getParent(),u=r._TmpMats[3],c=r._TmpMats[4];l&&1==t?(i?(u.copyFrom(i.getWorldMatrix()),l.getAbsoluteMatrix().multiplyToRef(u,u)):u.copyFrom(l.getAbsoluteMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):1==t&&i?(u.copyFrom(i.getWorldMatrix()),c.copyFrom(u),c.invert(),n.multiplyToRef(u,n),n.multiplyToRef(e,n),n.multiplyToRef(c,n)):n.multiplyToRef(e,n),n.setTranslationFromFloats(o,a,s),this._markAsDirtyAndDecompose()}_getAbsoluteInverseMatrixUnscaledToRef(e,t){let n=r._TmpMats[2];return e.copyFrom(this.getAbsoluteMatrix()),t?(e.multiplyToRef(t.getWorldMatrix(),e),i.Matrix.ScalingToRef(t.scaling.x,t.scaling.y,t.scaling.z,n)):i.Matrix.IdentityToRef(n),e.invert(),!isNaN(e.m[0])&&(n.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyToRef(n,e),!0)}getPosition(e=0,t=null){let n=i.Vector3.Zero();return this.getPositionToRef(e,t,n),n}getPositionToRef(e=0,t,i){if(0==e){let e=this.getLocalMatrix();i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}else{let e=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&e.multiplyToRef(t.getWorldMatrix(),e),i.x=e.m[12],i.y=e.m[13],i.z=e.m[14]}}getAbsolutePosition(e=null){let t=i.Vector3.Zero();return this.getPositionToRef(1,e,t),t}getAbsolutePositionToRef(e,t){this.getPositionToRef(1,e,t)}computeAbsoluteMatrices(){if(this._compose(),this.parent)this._localMatrix.multiplyToRef(this.parent._absoluteMatrix,this._absoluteMatrix);else{this._absoluteMatrix.copyFrom(this._localMatrix);let e=this._skeleton.getPoseMatrix();e&&this._absoluteMatrix.multiplyToRef(e,this._absoluteMatrix)}let e=this.children,t=e.length;for(let i=0;i<t;i++)e[i].computeAbsoluteMatrices()}computeAbsoluteTransforms(){this.computeAbsoluteMatrices()}getDirection(e,t=null){let n=i.Vector3.Zero();return this.getDirectionToRef(e,t,n),n}getDirectionToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformNormalToRef(e,o,n),n.normalize()}getRotation(e=0,t=null){let n=i.Vector3.Zero();return this.getRotationToRef(e,t,n),n}getRotationToRef(e=0,t=null,i){let n=r._TmpQuat;this.getRotationQuaternionToRef(e,t,n),n.toEulerAnglesToRef(i)}getRotationQuaternion(e=0,t=null){let n=i.Quaternion.Identity();return this.getRotationQuaternionToRef(e,t,n),n}getRotationQuaternionToRef(e=0,t=null,i){if(0==e)this._decompose(),i.copyFrom(this._localRotation);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.decompose(void 0,i,void 0)}}getRotationMatrix(e=0,t){let n=i.Matrix.Identity();return this.getRotationMatrixToRef(e,t,n),n}getRotationMatrixToRef(e=0,t,i){if(0==e)this.getLocalMatrix().getRotationMatrixToRef(i);else{let e=r._TmpMats[0],n=this.getAbsoluteMatrix();t?n.multiplyToRef(t.getWorldMatrix(),e):e.copyFrom(n),e.multiplyAtIndex(0,this._scalingDeterminant),e.multiplyAtIndex(1,this._scalingDeterminant),e.multiplyAtIndex(2,this._scalingDeterminant),e.getRotationMatrixToRef(i)}}getAbsolutePositionFromLocal(e,t=null){let n=i.Vector3.Zero();return this.getAbsolutePositionFromLocalToRef(e,t,n),n}getAbsolutePositionFromLocalToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),i.Vector3.TransformCoordinatesToRef(e,o,n)}getLocalPositionFromAbsolute(e,t=null){let n=i.Vector3.Zero();return this.getLocalPositionFromAbsoluteToRef(e,t,n),n}getLocalPositionFromAbsoluteToRef(e,t=null,n){let o=r._TmpMats[0].copyFrom(this.getAbsoluteMatrix());t&&o.multiplyToRef(t.getWorldMatrix(),o),o.invert(),i.Vector3.TransformCoordinatesToRef(e,o,n)}setCurrentPoseAsRest(){this.setRestMatrix(this.getLocalMatrix())}dispose(){this._linkedTransformNode=null;let e=this._skeleton.bones.indexOf(this);if(-1!==e&&this._skeleton.bones.splice(e,1),this._parentNode&&this._parentNode.children){let e=this._parentNode.children,t=e.indexOf(this);-1!==t&&e.splice(t,1)}super.dispose()}}r._TmpVecs=(0,n.BuildArray)(2,i.Vector3.Zero),r._TmpQuat=i.Quaternion.Identity(),r._TmpMats=(0,n.BuildArray)(5,i.Matrix.Identity),(t=r.prototype).copyAnimationRange??(t.copyAnimationRange=(0,a._MissingSideEffect)("Bone","copyAnimationRange")),e.s(["Bone",0,r])}]);
|