@uptimizr/dashboard 0.3.5 → 0.4.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.
Files changed (319) hide show
  1. package/README.md +16 -8
  2. package/out/404.html +1 -1
  3. package/out/__next.__PAGE__.txt +4 -4
  4. package/out/__next._full.txt +11 -11
  5. package/out/__next._head.txt +4 -4
  6. package/out/__next._index.txt +4 -4
  7. package/out/__next._tree.txt +2 -2
  8. package/out/_next/static/chunks/{020h1b22yfzjc.js → 0-0hui1_v3h8b.js} +9 -9
  9. package/out/_next/static/chunks/{2dqg85hsevk3c.js → 0-tzsd_n-ywom.js} +4 -4
  10. package/out/_next/static/chunks/00g5suuoa-_wn.js +1 -0
  11. package/out/_next/static/chunks/00o9hr_3hd0r8.js +1 -0
  12. package/out/_next/static/chunks/{0jxklh_ayjd4b.js → 00xc-0pj7on2s.js} +12 -12
  13. package/out/_next/static/chunks/01fh3_bncbe5u.js +1 -0
  14. package/out/_next/static/chunks/01urdkl1j8o6l.js +1 -0
  15. package/out/_next/static/chunks/{2j-sax2xfdv7l.js → 026vw95s88gsy.js} +1 -1
  16. package/out/_next/static/chunks/02eui3ctddbd2.js +1 -0
  17. package/out/_next/static/chunks/{3kr1polwvt6o_.js → 03zip1uidm6x9.js} +1 -1
  18. package/out/_next/static/chunks/{3gi0f1kg72xsf.js → 04_3ri5emyfcu.js} +1 -1
  19. package/out/_next/static/chunks/04c4nksb5y9r-.js +1 -0
  20. package/out/_next/static/chunks/04g-l-_b4payc.js +1 -0
  21. package/out/_next/static/chunks/04j9pexbmysdy.js +1 -0
  22. package/out/_next/static/chunks/{1rcfy_gzean3n.js → 055baac5e-c2o.js} +1 -1
  23. package/out/_next/static/chunks/05bdni_jrobq1.js +1 -0
  24. package/out/_next/static/chunks/05o0tb8l_htmw.js +1 -0
  25. package/out/_next/static/chunks/{1bxxv3nsl2-o_.js → 05uqfgf-hh-p5.js} +1 -1
  26. package/out/_next/static/chunks/{18r387bj9iv0j.js → 077eo-0dhbxz-.js} +1 -1
  27. package/out/_next/static/chunks/{18k-0jn63_5ie.js → 07z6p262h5hgl.js} +1 -1
  28. package/out/_next/static/chunks/{08bm3ye5govev.js → 08m_4cihfmik8.js} +1 -1
  29. package/out/_next/static/chunks/08obqw64faj8j.js +1 -0
  30. package/out/_next/static/chunks/{2k4s5rt7-l8jr.js → 099ilz3dmm1jw.js} +1 -1
  31. package/out/_next/static/chunks/09ppu_k464q-n.js +1 -0
  32. package/out/_next/static/chunks/{1rne-b-ktit5c.js → 0av6n_6q6kzo3.js} +2 -2
  33. package/out/_next/static/chunks/0bgcaf2x51kms.js +1 -0
  34. package/out/_next/static/chunks/{0ptp4ne7j6yg6.js → 0bj_310rugcn1.js} +11 -11
  35. package/out/_next/static/chunks/0c5d3qn2mb3ew.js +1 -0
  36. package/out/_next/static/chunks/{2gtebfttq1v0o.js → 0dck67in84de0.js} +1 -1
  37. package/out/_next/static/chunks/0dg4wxz-6u5lo.js +1 -0
  38. package/out/_next/static/chunks/{2apt1vh-7rl2l.js → 0dva036n8ab62.js} +1 -1
  39. package/out/_next/static/chunks/{159u-hx80yfaw.js → 0erga_bzezbza.js} +1 -1
  40. package/out/_next/static/chunks/0f0-i105odxqd.js +1 -0
  41. package/out/_next/static/chunks/{1fvlbwp6r93wo.js → 0g2wngc6oe7fd.js} +24 -24
  42. package/out/_next/static/chunks/0gyeqz9pagssf.js +1 -0
  43. package/out/_next/static/chunks/0i82k-t0fbn8f.js +1 -0
  44. package/out/_next/static/chunks/0kzw45f61wm3j.js +1 -0
  45. package/out/_next/static/chunks/0l8bfa2xewq69.js +1 -0
  46. package/out/_next/static/chunks/{390fogn9oz13i.js → 0n-zml1gn0o1u.js} +1 -1
  47. package/out/_next/static/chunks/{44gsjajjdhf51.js → 0n92hec_jb_-_.js} +1 -1
  48. package/out/_next/static/chunks/{366e7izc386pj.js → 0okbyggxe6mx5.js} +1 -1
  49. package/out/_next/static/chunks/{0h-ohf4gntwtj.js → 0pv2wirx45e1m.js} +1 -1
  50. package/out/_next/static/chunks/0qxd_8t3nca36.js +1 -0
  51. package/out/_next/static/chunks/0s1jghzw8jufz.js +1 -0
  52. package/out/_next/static/chunks/{0ngai1_zxwsk8.js → 0s84ekz_f9ngx.js} +1 -1
  53. package/out/_next/static/chunks/{16d4a4iopj2if.js → 0t89-lfct-7m6.js} +5 -5
  54. package/out/_next/static/chunks/0ti58h622yo-_.js +2 -0
  55. package/out/_next/static/chunks/{2jfmqd86u1tzv.js → 0tn-9w46cwydp.js} +32 -32
  56. package/out/_next/static/chunks/0u8yr4k1y6m2t.js +1 -0
  57. package/out/_next/static/chunks/0ubxyut5rr600.js +1 -0
  58. package/out/_next/static/chunks/{3_bzxvqtk1t53.js → 0uxdbfa8gv6tk.js} +12 -12
  59. package/out/_next/static/chunks/0vso09vdz38sr.js +1 -0
  60. package/out/_next/static/chunks/{0_tqu60oxaj7q.js → 0w-hm7g7trtjg.js} +1 -1
  61. package/out/_next/static/chunks/0wbw9h7rsis2r.js +1 -0
  62. package/out/_next/static/chunks/{3sbm1ak54_2ep.js → 0wq_9f98weoe3.js} +1 -1
  63. package/out/_next/static/chunks/0y4e49hpuucdi.js +1 -0
  64. package/out/_next/static/chunks/{0ioyy42h35hnd.js → 0yvevihll7sz-.js} +1 -1
  65. package/out/_next/static/chunks/{33h_kt3pzks_y.js → 0zf26k6juhlzo.js} +50 -18
  66. package/out/_next/static/chunks/{2t9zu9v_g9kr9.js → 1-4v8oivkgnyl.js} +3 -3
  67. package/out/_next/static/chunks/{3sg4zff4-h3t1.js → 1-b44873bjsdw.js} +1 -1
  68. package/out/_next/static/chunks/1-c3a1vnl8v1q.js +1 -0
  69. package/out/_next/static/chunks/1-xf86jgea22y.js +1 -0
  70. package/out/_next/static/chunks/10b0qqdnb_nox.js +1 -0
  71. package/out/_next/static/chunks/{2ib62lnqqaf4p.js → 11p92pnn5el0v.js} +1 -1
  72. package/out/_next/static/chunks/{06ljadw2-i91-.js → 12kdmh0h_mboy.js} +1 -1
  73. package/out/_next/static/chunks/141tngxsk32hq.js +1 -0
  74. package/out/_next/static/chunks/14ijcpo72av4r.js +1 -0
  75. package/out/_next/static/chunks/16ggwxztrv8im.js +1 -0
  76. package/out/_next/static/chunks/16hdip1drt8o-.js +1 -0
  77. package/out/_next/static/chunks/{3g5ae-38cepwm.js → 17aahvhpls1l7.js} +199 -199
  78. package/out/_next/static/chunks/{17d1isrw8gtnb.js → 18txc1wwwu9f9.js} +1 -1
  79. package/out/_next/static/chunks/{2716si10ouwu-.js → 18wa83g0qfh-b.js} +1 -1
  80. package/out/_next/static/chunks/19dp8nr4uygg2.js +5 -0
  81. package/out/_next/static/chunks/1_8acnu6_-qe-.js +1 -0
  82. package/out/_next/static/chunks/1__nujzr9e352.js +3 -0
  83. package/out/_next/static/chunks/1bmyq1b0by7ug.js +1 -0
  84. package/out/_next/static/chunks/{1wyr4at61q29n.js → 1ccn725by19i1.js} +1 -1
  85. package/out/_next/static/chunks/{0f_nv15a8q415.js → 1d1tpj9nm1nhf.js} +1 -1
  86. package/out/_next/static/chunks/1dfwa563iciz3.js +1 -0
  87. package/out/_next/static/chunks/1di5enkavl9vx.js +4 -0
  88. package/out/_next/static/chunks/{006nix8mv66z_.js → 1e_-_7biavwmb.js} +1 -1
  89. package/out/_next/static/chunks/{1y12bjsbq18_t.js → 1ephzzweysylq.js} +34 -34
  90. package/out/_next/static/chunks/1fwsjnd1y-lx_.js +1 -0
  91. package/out/_next/static/chunks/{2z9ot-w1x60fv.js → 1fyh50hjt7hi_.js} +1 -1
  92. package/out/_next/static/chunks/1gaexq_suxai0.js +1 -0
  93. package/out/_next/static/chunks/1gtj_l5ame5mw.js +1 -0
  94. package/out/_next/static/chunks/{2cqxw5m39njar.js → 1gvdmbr65lpud.js} +39 -39
  95. package/out/_next/static/chunks/{02tc9r3sc7fgc.js → 1ho02fc091nj2.js} +1 -1
  96. package/out/_next/static/chunks/{3v0td-ziuai2i.js → 1hsvckd0sgdgr.js} +1 -1
  97. package/out/_next/static/chunks/1i4f3n_2_3ery.js +1 -0
  98. package/out/_next/static/chunks/1j7e3qpjuj89a.js +1 -0
  99. package/out/_next/static/chunks/{2btqzk0tj0gz6.js → 1mrvp94tietcv.js} +1 -1
  100. package/out/_next/static/chunks/{3vxkkhs0vi_xa.js → 1mvadj46owrck.js} +1 -1
  101. package/out/_next/static/chunks/1n9ai-iuqh78m.js +1 -0
  102. package/out/_next/static/chunks/{1b2tkk7e_2o0k.js → 1n_gxvu31aofy.js} +2 -2
  103. package/out/_next/static/chunks/{0gblbgw7w7r9w.js → 1nasz7q3tvb53.js} +1 -1
  104. package/out/_next/static/chunks/{2_7dp91937mqi.js → 1ng-fqh2_n984.js} +1 -1
  105. package/out/_next/static/chunks/{0x4-zyy8pzmlq.js → 1nqojcig-0m3c.js} +1 -1
  106. package/out/_next/static/chunks/1o3ggu95lfu6i.js +1 -0
  107. package/out/_next/static/chunks/{2dolerz81xb52.js → 1og49_atcksim.js} +1 -1
  108. package/out/_next/static/chunks/{0c2k-gvwph4qs.js → 1oljzgz5jistn.js} +1 -1
  109. package/out/_next/static/chunks/1ozi46t8jajqh.js +1 -0
  110. package/out/_next/static/chunks/{1w9xu1qa9-wmv.js → 1ph0tfo-4hl-f.js} +1 -1
  111. package/out/_next/static/chunks/{17dmbt396_tyq.js → 1qjsgebn9m-0l.js} +1 -1
  112. package/out/_next/static/chunks/{168r9r65o9jnc.js → 1qsut_e3msg0l.js} +1 -1
  113. package/out/_next/static/chunks/{3efuvh_35yhes.js → 1qxhgauuomthl.js} +39 -39
  114. package/out/_next/static/chunks/{2w7yf7ouyrlkb.js → 1rb8wewjbdisv.js} +1 -1
  115. package/out/_next/static/chunks/1rr74xxjtckyv.js +1 -0
  116. package/out/_next/static/chunks/{1kl5xxohpr6-4.js → 1solqr18og2ot.js} +1 -1
  117. package/out/_next/static/chunks/{2rjc8yn50ducj.js → 1t2exh89lnazc.js} +34 -34
  118. package/out/_next/static/chunks/{0_ux41xcoea3u.js → 1t7nl8rx7mabd.js} +40 -40
  119. package/out/_next/static/chunks/{3fx3sriw1w3sa.js → 1tt1bbry-4f-6.js} +1 -1
  120. package/out/_next/static/chunks/{36waz9xq39n4t.js → 1upkv4ltuh3s5.js} +40 -40
  121. package/out/_next/static/chunks/{2npk7tr63h7rl.js → 1uu55ejvi7q5u.js} +1 -1
  122. package/out/_next/static/chunks/{2cvvxifoedn6j.js → 1ux1rpe-n1mai.js} +1 -1
  123. package/out/_next/static/chunks/{091ll-lp6spu3.js → 1vmpltnr0cyos.js} +1 -1
  124. package/out/_next/static/chunks/1x99m91nt1m3b.js +1 -0
  125. package/out/_next/static/chunks/1xbzxfeq9789f.js +1 -0
  126. package/out/_next/static/chunks/1xqv11mvnfa8n.js +1 -0
  127. package/out/_next/static/chunks/1ybiu-rkt50_1.js +1 -0
  128. package/out/_next/static/chunks/{3y9c26fv1poq_.js → 2-hdejef-mpka.js} +199 -199
  129. package/out/_next/static/chunks/{22qzld31fbhbv.js → 2-p206i_ihx09.js} +1 -1
  130. package/out/_next/static/chunks/{3rx1jhuop94-l.js → 20qelrstvz9_n.js} +1 -1
  131. package/out/_next/static/chunks/21at65obnoo8z.js +1 -0
  132. package/out/_next/static/chunks/21ko5mxfderw0.js +1 -0
  133. package/out/_next/static/chunks/21muzwu43o8xg.js +1 -0
  134. package/out/_next/static/chunks/{3he9bxsc67ivq.js → 22ja7c3gk0_ko.js} +1 -1
  135. package/out/_next/static/chunks/{0mqi0xn_c010j.js → 22rl_arnzs-ve.js} +1 -1
  136. package/out/_next/static/chunks/23d-hvrwpixpm.js +1 -0
  137. package/out/_next/static/chunks/{1f-2upk7uaxky.js → 255knovck7pv2.js} +4 -4
  138. package/out/_next/static/chunks/2569rrrffvm2w.js +31 -0
  139. package/out/_next/static/chunks/{229mkx-mtfcgf.js → 25gf6xn9u1c57.js} +1 -1
  140. package/out/_next/static/chunks/{2vmybybb3dvia.js → 267q_eg-c6f6m.js} +1 -1
  141. package/out/_next/static/chunks/{0e7xuupmrw4-e.js → 28ndw4nsw2t_4.js} +1 -1
  142. package/out/_next/static/chunks/{0m3yjobjg36ce.js → 29gv2swsp7tzu.js} +1 -1
  143. package/out/_next/static/chunks/29o74k0d6hkdf.js +1 -0
  144. package/out/_next/static/chunks/{0kr-bd6fuqc2s.js → 2bm95r0011asw.js} +1 -1
  145. package/out/_next/static/chunks/2btabnibkm0db.js +1 -0
  146. package/out/_next/static/chunks/2c--awgkdcikq.js +1 -0
  147. package/out/_next/static/chunks/{2ab-99frxpah-.js → 2c2dspoukng-5.js} +1 -1
  148. package/out/_next/static/chunks/{0zo4x1j8ug-kb.js → 2e46-2ubc90do.js} +5 -5
  149. package/out/_next/static/chunks/2ep7mjbaoeou0.js +1 -0
  150. package/out/_next/static/chunks/{1kq86iv41cet4.js → 2ezgqm7atphi6.js} +1 -1
  151. package/out/_next/static/chunks/{2owp-uukmhm4s.js → 2ftp5xmq_w23j.js} +35 -35
  152. package/out/_next/static/chunks/{38g9jpxjoxn2x.js → 2g_1ov-0j2kwd.js} +1 -1
  153. package/out/_next/static/chunks/2gfjzq_vjea4w.js +1 -0
  154. package/out/_next/static/chunks/{1tdg_eolxlcdl.js → 2h5hase6ewoyc.js} +1 -1
  155. package/out/_next/static/chunks/{0m0n7kjzscx0y.js → 2h5nvlgky7fpa.js} +1 -1
  156. package/out/_next/static/chunks/{17dabmbnkkplu.js → 2i82rmjta9ijs.js} +1 -1
  157. package/out/_next/static/chunks/2ies66gmou203.js +1 -0
  158. package/out/_next/static/chunks/2jenu2eek9viz.js +1 -0
  159. package/out/_next/static/chunks/{3043pprgv9ors.js → 2khh_pmm224k5.js} +23 -23
  160. package/out/_next/static/chunks/{0msckddycfy76.js → 2luaj_cf5f19-.js} +1 -1
  161. package/out/_next/static/chunks/2mgmvz66gh5ub.js +1 -0
  162. package/out/_next/static/chunks/2nwlqtv3vrzcv.js +1 -0
  163. package/out/_next/static/chunks/{18ss4ls60s31e.js → 2o8k8x5zcepfy.js} +1 -1
  164. package/out/_next/static/chunks/{1e1zozntzsx42.js → 2pbgsq7vvtk8_.js} +1 -1
  165. package/out/_next/static/chunks/{0b7-mrrg7ryj2.js → 2pcdnd4nzcw4c.js} +1 -1
  166. package/out/_next/static/chunks/2q0rz76kj6h5z.js +1 -0
  167. package/out/_next/static/chunks/{3w1a2o8nevap8.js → 2rjfrjhp4kjev.js} +18 -18
  168. package/out/_next/static/chunks/2si5cg3hl5dtf.js +4 -0
  169. package/out/_next/static/chunks/2uhrhq35bki6u.js +1 -0
  170. package/out/_next/static/chunks/2x83vs8ns4pww.js +74 -0
  171. package/out/_next/static/chunks/{1l12hkz1g7uhf.js → 2ymtumj-hfrjo.js} +1 -1
  172. package/out/_next/static/chunks/{2yr9wt421xdjr.js → 2z9mdtudj8crz.js} +17 -17
  173. package/out/_next/static/chunks/{1iaxzjly2pap1.js → 2zdzgmacaoor9.js} +1 -1
  174. package/out/_next/static/chunks/{0mk8tangq9equ.js → 2zpn7010iqgsy.js} +1 -1
  175. package/out/_next/static/chunks/2zyjw8g4tiu51.js +1 -0
  176. package/out/_next/static/chunks/{2kn_dqzbyabtn.js → 3-_08i4_7yhno.js} +1 -1
  177. package/out/_next/static/chunks/3-irhmtm1q5qw.js +1 -0
  178. package/out/_next/static/chunks/3-k74vn9exnb6.js +1 -0
  179. package/out/_next/static/chunks/{18avgwx9nlxp9.js → 3-x7522okdy-7.js} +1 -1
  180. package/out/_next/static/chunks/{39dscgnk4__gl.js → 309f81l5ucsb_.js} +16 -16
  181. package/out/_next/static/chunks/{1f1vq3goue1w4.js → 31ei992g8gqz9.js} +1 -1
  182. package/out/_next/static/chunks/{0i9oqg-xbq-a9.js → 32vaw89wdwv5_.js} +1 -1
  183. package/out/_next/static/chunks/{0yvei5e7uye4f.js → 34845aqksy1dl.js} +2 -2
  184. package/out/_next/static/chunks/34y7nx6qmat06.js +1 -0
  185. package/out/_next/static/chunks/{1f92k-xa0pl-3.js → 35aagg46wp139.js} +1 -1
  186. package/out/_next/static/chunks/36rqw8h6ildpl.js +1 -0
  187. package/out/_next/static/chunks/{0zwkmsojeuekb.js → 380ivzcfb4o_3.js} +4 -4
  188. package/out/_next/static/chunks/3_jmgj9glg_z2.css +3 -0
  189. package/out/_next/static/chunks/{10w513bgw-bgi.js → 3a_khw6q6pyh1.js} +1 -1
  190. package/out/_next/static/chunks/3c_31f20z4jrl.js +1 -0
  191. package/out/_next/static/chunks/3ckp70rgr63u9.js +1 -0
  192. package/out/_next/static/chunks/{08rk1dp1wb-gm.js → 3d76e_yd8l_0x.js} +38 -38
  193. package/out/_next/static/chunks/{2p8dbh81chhon.js → 3ed24zmt8qfys.js} +1 -1
  194. package/out/_next/static/chunks/3ez20hi1mxw0w.js +1 -0
  195. package/out/_next/static/chunks/3fdx-rnos5ft-.js +1 -0
  196. package/out/_next/static/chunks/3fgfbxxb-j_bn.js +4 -0
  197. package/out/_next/static/chunks/{03st_hmor6qju.js → 3go-mst7n3udd.js} +1 -1
  198. package/out/_next/static/chunks/{3d0ejsnhbzi-j.js → 3gyyjsot8mdav.js} +1 -1
  199. package/out/_next/static/chunks/{0rruvj1cyflrh.js → 3k-gz8qf-mj-p.js} +1 -1
  200. package/out/_next/static/chunks/{2enlv4yy0t-9j.js → 3kalvwsf11-ss.js} +12 -12
  201. package/out/_next/static/chunks/3lehc5pujwhsz.js +1 -0
  202. package/out/_next/static/chunks/{05l3dluxivcor.js → 3m0ytnc241yfz.js} +1 -1
  203. package/out/_next/static/chunks/3mpe7c3iyxn5h.js +1 -0
  204. package/out/_next/static/chunks/{0tl8j9f8lt0yf.js → 3mvaub8qjdyuc.js} +1 -1
  205. package/out/_next/static/chunks/{0k79ryqehst0b.js → 3n-7bcmfbh299.js} +48 -18
  206. package/out/_next/static/chunks/{38ea9kqlbxt86.js → 3nw7u4bie0-g6.js} +1 -1
  207. package/out/_next/static/chunks/3qatb38-tk_gd.js +1 -0
  208. package/out/_next/static/chunks/3tdcdi_utmoy_.js +1 -0
  209. package/out/_next/static/chunks/{3x6wpv_z5m6rz.js → 3tdzweqszru4y.js} +1 -1
  210. package/out/_next/static/chunks/3tt_ir_va6262.js +1 -0
  211. package/out/_next/static/chunks/{16hx9_epo71u-.js → 3w4qettzp7khe.js} +32 -32
  212. package/out/_next/static/chunks/{2op88btas-hl8.js → 3w_umk1xtj6to.js} +1 -1
  213. package/out/_next/static/chunks/{1kmsg9ef5djl3.js → 3y_51bmdnc0ey.js} +1 -1
  214. package/out/_next/static/chunks/{1ajmblsp0wj0_.js → 3yr66ufoli71t.js} +1 -1
  215. package/out/_next/static/chunks/{348hdbpkkcq_2.js → 3z4suna4kq4j5.js} +20 -20
  216. package/out/_next/static/chunks/{1y20bv6vl4ylk.js → 41qxc142snm22.js} +1 -1
  217. package/out/_next/static/chunks/{404f_93w2e8ty.js → 41yy4p3-rtyz1.js} +1 -1
  218. package/out/_next/static/chunks/{3fz7tc-4j13uv.js → 425epvuw3yy-n.js} +21 -21
  219. package/out/_next/static/chunks/{1t60cososq7b0.js → 43hwl25uke0l_.js} +1 -1
  220. package/out/_next/static/chunks/43qmngblcab8f.js +1 -0
  221. package/out/_next/static/chunks/{2bn9u9r0rfhvc.js → 442e2l3jzxd-_.js} +1 -1
  222. package/out/_next/static/chunks/{turbopack-16ab30_1p4vhq.js → turbopack-3r8yn0j92tqw_.js} +1 -1
  223. package/out/_not-found/__next._full.txt +9 -9
  224. package/out/_not-found/__next._head.txt +4 -4
  225. package/out/_not-found/__next._index.txt +4 -4
  226. package/out/_not-found/__next._not-found.__PAGE__.txt +2 -2
  227. package/out/_not-found/__next._not-found.txt +3 -3
  228. package/out/_not-found/__next._tree.txt +2 -2
  229. package/out/_not-found.html +1 -1
  230. package/out/_not-found.txt +9 -9
  231. package/out/index.html +1 -1
  232. package/out/index.txt +11 -11
  233. package/package.json +12 -11
  234. package/out/_next/static/chunks/0-29qf-q72olu.js +0 -1
  235. package/out/_next/static/chunks/0-tk5ptli--r0.js +0 -1
  236. package/out/_next/static/chunks/0296l8lzd69ns.js +0 -1
  237. package/out/_next/static/chunks/04pk6n3z75dcy.js +0 -1
  238. package/out/_next/static/chunks/0g6u34xkzrpjn.js +0 -1
  239. package/out/_next/static/chunks/0g7p8zp2kxve5.js +0 -1
  240. package/out/_next/static/chunks/0gwa154w_0wuh.js +0 -1
  241. package/out/_next/static/chunks/0h1o0cr3327tt.js +0 -1
  242. package/out/_next/static/chunks/0jf3n5n5yrr4o.js +0 -1
  243. package/out/_next/static/chunks/0jsh6juckq525.js +0 -1
  244. package/out/_next/static/chunks/0kcbdjbdxu_wa.js +0 -1
  245. package/out/_next/static/chunks/0l3wwyl93sqh9.js +0 -1
  246. package/out/_next/static/chunks/0n0thxa3jkour.js +0 -4
  247. package/out/_next/static/chunks/0ngiuj5k-or6g.js +0 -1
  248. package/out/_next/static/chunks/0nx_t8iq-324h.js +0 -1
  249. package/out/_next/static/chunks/0oap0o8a8a_cl.js +0 -1
  250. package/out/_next/static/chunks/0ostjlqtwkhqr.js +0 -1
  251. package/out/_next/static/chunks/0vddljjnmozzx.js +0 -1
  252. package/out/_next/static/chunks/0w0sx062qmcsh.js +0 -1
  253. package/out/_next/static/chunks/0x6i6e6863tir.js +0 -1
  254. package/out/_next/static/chunks/1--kelnig7pxx.js +0 -1
  255. package/out/_next/static/chunks/1-ud6hztxiazp.js +0 -1
  256. package/out/_next/static/chunks/10v4rskkrjgd_.js +0 -1
  257. package/out/_next/static/chunks/117ys3lltfmcu.js +0 -1
  258. package/out/_next/static/chunks/14klj_i6-l-10.js +0 -1
  259. package/out/_next/static/chunks/17ev44x54_jrd.js +0 -1
  260. package/out/_next/static/chunks/17svumd4o0qnc.js +0 -1
  261. package/out/_next/static/chunks/17v12p4sfraa0.js +0 -1
  262. package/out/_next/static/chunks/1a7cup181rjod.js +0 -1
  263. package/out/_next/static/chunks/1ek5rtpo6rxev.js +0 -1
  264. package/out/_next/static/chunks/1evp209qbr4cr.js +0 -5
  265. package/out/_next/static/chunks/1fa265388524p.js +0 -1
  266. package/out/_next/static/chunks/1g3z43o3h-024.js +0 -31
  267. package/out/_next/static/chunks/1g_27texazqcj.js +0 -1
  268. package/out/_next/static/chunks/1j--a56ji33_x.js +0 -1
  269. package/out/_next/static/chunks/1oara6fkfvgs3.js +0 -1
  270. package/out/_next/static/chunks/1par9m038tiov.js +0 -1
  271. package/out/_next/static/chunks/1q-gcxr6o4bx2.js +0 -1
  272. package/out/_next/static/chunks/1st81sc3owvku.js +0 -4
  273. package/out/_next/static/chunks/1vkww9l6lgqag.js +0 -1
  274. package/out/_next/static/chunks/1vpcaaf-0dn7q.js +0 -1
  275. package/out/_next/static/chunks/1vzmzrjhlm1q5.js +0 -1
  276. package/out/_next/static/chunks/245h82k-g1nxr.js +0 -1
  277. package/out/_next/static/chunks/24cqjhy669845.js +0 -1
  278. package/out/_next/static/chunks/25ctnyh7njp-d.js +0 -4
  279. package/out/_next/static/chunks/286ggpetqnwyo.js +0 -3
  280. package/out/_next/static/chunks/28f1onw3nywbz.js +0 -1
  281. package/out/_next/static/chunks/28ud4w7xswcir.js +0 -1
  282. package/out/_next/static/chunks/28ycc-1519hl2.js +0 -1
  283. package/out/_next/static/chunks/2dhv35o59yzao.js +0 -1
  284. package/out/_next/static/chunks/2ey30qeaob985.js +0 -1
  285. package/out/_next/static/chunks/2f0r-df7tb3pu.js +0 -1
  286. package/out/_next/static/chunks/2fle007r0cdnq.js +0 -1
  287. package/out/_next/static/chunks/2gh4z57fem0_v.js +0 -1
  288. package/out/_next/static/chunks/2h1uw3cluvmmo.js +0 -1
  289. package/out/_next/static/chunks/2kje_jvmwsvwo.js +0 -1
  290. package/out/_next/static/chunks/2l_oqx9idxcs8.js +0 -1
  291. package/out/_next/static/chunks/2pkoed609lf41.js +0 -1
  292. package/out/_next/static/chunks/2reukv9c7cq_9.js +0 -1
  293. package/out/_next/static/chunks/2vaoftqgc44cg.js +0 -1
  294. package/out/_next/static/chunks/2wdk-kbm-n-m5.js +0 -1
  295. package/out/_next/static/chunks/2y75diyxqlhzl.js +0 -1
  296. package/out/_next/static/chunks/2zljunurdji0q.js +0 -1
  297. package/out/_next/static/chunks/30_2jsjk52x2i.js +0 -1
  298. package/out/_next/static/chunks/34gp3hvr3j6um.js +0 -1
  299. package/out/_next/static/chunks/3ajhvedcs_lzb.js +0 -1
  300. package/out/_next/static/chunks/3ef6upwlgr4q-.css +0 -3
  301. package/out/_next/static/chunks/3g4e2txsrb2p2.js +0 -1
  302. package/out/_next/static/chunks/3g_h_00xs9u59.js +0 -1
  303. package/out/_next/static/chunks/3ghwe2mr2ig7e.js +0 -1
  304. package/out/_next/static/chunks/3hr-mlwi78nov.js +0 -1
  305. package/out/_next/static/chunks/3mcfjxvxo0o3e.js +0 -1
  306. package/out/_next/static/chunks/3mwoauxszd3mn.js +0 -1
  307. package/out/_next/static/chunks/3oj29s_tuqbkm.js +0 -1
  308. package/out/_next/static/chunks/3ovd8o_usay7j.js +0 -1
  309. package/out/_next/static/chunks/3pdpaqzwhhijn.js +0 -1
  310. package/out/_next/static/chunks/3r2hbpm4wju16.js +0 -1
  311. package/out/_next/static/chunks/3rl45k759wfi1.js +0 -1
  312. package/out/_next/static/chunks/3urd7r018nel4.js +0 -1
  313. package/out/_next/static/chunks/3vaho-xrtuchd.js +0 -2
  314. package/out/_next/static/chunks/3wqs57qehored.js +0 -1
  315. package/out/_next/static/chunks/40acif2eh_unv.js +0 -1
  316. package/out/_next/static/chunks/4227p7752rnny.js +0 -1
  317. /package/out/_next/static/{RC8D0Hg382TugUN5Syz31 → BzI7wE6hab7b0g-tucqKW}/_buildManifest.js +0 -0
  318. /package/out/_next/static/{RC8D0Hg382TugUN5Syz31 → BzI7wE6hab7b0g-tucqKW}/_clientMiddlewareManifest.js +0 -0
  319. /package/out/_next/static/{RC8D0Hg382TugUN5Syz31 → BzI7wE6hab7b0g-tucqKW}/_ssgManifest.js +0 -0
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,2348,2413,e=>{"use strict";let t=1/1.2;e.s(["ZOOM_IN_FACTOR",0,t,"ZOOM_OUT_FACTOR",0,1.2,"attachDoubleClickFocus",0,function(e,t,n){let a=()=>{let t=e.pick(e.pointerX,e.pointerY);t?.hit&&t.pickedPoint&&n.setTarget(t.pickedPoint)};return t.addEventListener("dblclick",a),()=>t.removeEventListener("dblclick",a)},"disableWheelZoom",0,function(e){e.inputs.removeByType("ArcRotateCameraMouseWheelInput")},"resetFocus",0,function(e,t){e.setTarget(t.target),e.alpha=t.alpha,e.beta=t.beta,e.radius=t.radius},"stepZoom",0,function(e,t){let n=e.lowerRadiusLimit??.01,a=e.upperRadiusLimit??1/0;e.radius=Math.min(a,Math.max(n,e.radius*t))}],2348);var n=e.i(28100);e.s(["ZoomButtons",0,function({onZoom:e,onReset:a}){let r="grid h-8 w-8 place-items-center rounded-md border border-edge bg-ink/80 text-lg leading-none text-fg backdrop-blur transition hover:bg-ink hover:text-white";return(0,n.jsxs)("div",{className:"absolute right-3 top-3 flex flex-col gap-1",children:[(0,n.jsx)("button",{type:"button","aria-label":"Zoom in",className:r,onClick:()=>e(t),children:"+"}),(0,n.jsx)("button",{type:"button","aria-label":"Zoom out",className:r,onClick:()=>e(1.2),children:"−"}),a?(0,n.jsx)("button",{type:"button","aria-label":"Reset camera focus to center",title:"Reset focus to center",className:r,onClick:a,children:(0,n.jsxs)("svg",{viewBox:"0 0 16 16",width:"16",height:"16",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,n.jsx)("circle",{cx:"8",cy:"8",r:"3"}),(0,n.jsx)("path",{d:"M8 1v2.5M8 12.5V15M1 8h2.5M12.5 8H15"})]})}):null]})}],2413)},25476,e=>{"use strict";e.s(["attachMeshHover",0,function(e,t,n){let a=0,r=null,i=t=>{let i=t.offsetX,s=t.offsetY;a||(a=requestAnimationFrame(()=>{var t,l;let o;a=0;let c=e.pick(i,s,e=>e.isPickable&&e.isEnabled()),u=c?.pickedMesh?(t=c.pickedMesh,l=c.thinInstanceIndex??-1,(o=t.metadata)?l>=0&&o.hoverLabels?o.hoverLabels[l]??null:o.hoverLabel??null:null):null;u?n({label:u,x:i,y:s}):null!==r&&n(null),r=u}))},s=()=>{a&&(cancelAnimationFrame(a),a=0),null!==r&&(r=null,n(null))};return t.addEventListener("pointermove",i),t.addEventListener("pointerleave",s),()=>{t.removeEventListener("pointermove",i),t.removeEventListener("pointerleave",s),a&&cancelAnimationFrame(a)}}])},53993,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(56054),r=e.i(2348),i=e.i(25476),s=e.i(18637),l=e.i(2413);function o({shape:e,onChange:n}){let a=e=>`h-8 px-2.5 text-xs font-medium leading-none transition first:rounded-l-md last:rounded-r-md ${e?"bg-ink text-white":"bg-ink/80 text-fg hover:text-white"}`,r="sphere"===e,i="cube"===e;return(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge backdrop-blur",role:"group","aria-label":"Voxel marker shape",children:[(0,t.jsx)("button",{type:"button",className:a(r),"aria-pressed":r,onClick:()=>n("sphere"),children:"Spheres"}),(0,t.jsx)("button",{type:"button",className:a(i),"aria-pressed":i,onClick:()=>n("cube"),children:"Cubes"})]})}e.s(["WorldHeatmap3DView",0,function({voxels:c,cellSize:u,proxyMeshes:h=[],legendTitle:d="Pointer-hit density",legendLow:m="few hits",legendHigh:p="most hits",legendNote:f="Each marker is a voxel where the pointer hit your scene. Color & size scale with hits, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:b="No 3D hit-points in range.",totals:g,voxelLabels:x}){let w=(0,n.useRef)(null),v=(0,n.useRef)(null),k=(0,n.useRef)(null),[y,j]=(0,n.useState)("loading"),[M,z]=(0,n.useState)(null),[C,_]=(0,n.useState)("sphere"),[S,R]=(0,n.useState)(null),L=(0,n.useRef)(c),I=(0,n.useRef)(h),A=(0,n.useRef)(x);L.current=c,I.current=h,A.current=x;let P=(0,n.useRef)(null),E=c.length>0||h.length>0;(0,n.useEffect)(()=>{let t=w.current;if(!t)return;if(!E)return void j("empty");let n=!1,s=null;return j("loading"),z(null),(async()=>{try{let[{Engine:l},{Scene:o},{ArcRotateCamera:c},{HemisphericLight:h},{Vector3:d,Color3:m,Color4:p,Matrix:f},{MeshBuilder:b},{StandardMaterial:g}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(n)return;let x=L.current,w=I.current,y=0,M=0,z=0,_=0;for(let e of x)y+=(e.vx+.5)*u,M+=(e.vy+.5)*u,z+=(e.vz+.5)*u,_++;if(0===_)for(let e of w)y+=(e.aabb[0]+e.aabb[3])/2,M+=(e.aabb[1]+e.aabb[4])/2,z+=(e.aabb[2]+e.aabb[5])/2,_++;let S=new d(y/_,M/_,z/_),E=4*u;for(let e of x){let t=(e.vx+.5)*u-S.x,n=(e.vy+.5)*u-S.y,a=(e.vz+.5)*u-S.z;E=Math.max(E,Math.sqrt(t*t+n*n+a*a))}for(let e of w){let t=(e.aabb[0]+e.aabb[3])/2-S.x,n=(e.aabb[1]+e.aabb[4])/2-S.y,a=(e.aabb[2]+e.aabb[5])/2-S.z;E=Math.max(E,Math.sqrt(t*t+n*n+a*a))}let $=new l(t,!0,{preserveDrawingBuffer:!1}),N=new o($);N.clearColor=new p(.04,.05,.07,1);let T=new c("world-cam",Math.PI/4,Math.PI/3,2.4*E,S,N);T.attachControl(t,!0),(0,r.disableWheelZoom)(T),v.current=T,k.current={target:S,alpha:T.alpha,beta:T.beta,radius:T.radius},new h("world-light",new d(.4,1,.3),N);let B=Math.max(.02*E,.25*u)/(.9*u),F=T.radius,q="cube"===C?b.CreateBox("world-voxel",{size:.9*u},N):b.CreateSphere("world-voxel",{diameter:.9*u,segments:6},N),V=new g("world-voxel-mat",N);V.diffuseColor=new m(1,1,1),V.specularColor=new m(0,0,0),q.material=V;let O=0,D=new Float32Array(0),Z=new Float32Array(0),W=-1,H=()=>{if(0===O)return;let e=Math.min(8,Math.max(.6,T.radius/F));if(!(.01>Math.abs(e-W))){W=e;for(let t=0;t<O;t++){let n=Z[t]*e,a=16*t;D[a]=n,D[a+5]=n,D[a+10]=n}q.thinInstanceBufferUpdated("matrix")}};N.onBeforeRenderObservable.add(H);let K=null,U="\0",G=()=>{(()=>{let e=I.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===U||(U=t,K&&(K.dispose(!1,!0),K=null),0===e.length))return;K=b.CreateBox("scene-proxy",{size:1},N);let n=new g("scene-proxy-mat",N);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new m(.32,.4,.52),n.alpha=.35,K.material=n,K.isPickable=!0,K.thinInstanceEnablePicking=!0,K.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),i=Math.max(n[4]-n[1],.001),s=Math.max(n[5]-n[2],.001);f.Scaling(a,i,s).multiply(f.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}K.thinInstanceSetBuffer("matrix",r,16,!0)})(),(()=>{let e=L.current,t=A.current,n=e.length;if(0===n){O=0,q.isVisible=!1;return}let r=(0,a.percentileMax)(e.map(e=>e.count),.95),i=new Float32Array(16*n),s=new Float32Array(4*n),l=new Float32Array(n);for(let t=0;t<n;t++){let n=e[t],o=Math.min(1,n.count/r),c=B*(.5+.5*o);l[t]=c,f.Scaling(c,c,c).multiply(f.Translation((n.vx+.5)*u,(n.vy+.5)*u,(n.vz+.5)*u)).copyToArray(i,16*t);let[h,d,m]=(0,a.heatRgb)(o);s[4*t]=h,s[4*t+1]=d,s[4*t+2]=m,s[4*t+3]=1}O=n,D=i,Z=l,q.isVisible=!0,q.isPickable=!!t,q.thinInstanceEnablePicking=!!t,q.metadata=t?{hoverLabels:t}:null,q.thinInstanceSetBuffer("matrix",D,16,!1),q.thinInstanceSetBuffer("color",s,4,!0),W=-1,H()})()};P.current=G,G(),$.runRenderLoop(()=>N.render());let Y=()=>$.resize();window.addEventListener("resize",Y);let X=(0,i.attachMeshHover)(N,t,R),J=(0,r.attachDoubleClickFocus)(N,t,T);j("ready"),s=()=>{window.removeEventListener("resize",Y),X(),J(),R(null),P.current=null,v.current=null,k.current=null,N.dispose(),$.dispose()}}catch(e){if(n)return;j("error"),z(e instanceof Error?e.message:"Failed to render heatmap.")}})(),()=>{n=!0,s?.()}},[C,u,E]),(0,n.useEffect)(()=>{P.current?.()},[c,h,x]);let $=g?g.cells>c.length?` Showing the ${c.length.toLocaleString()} busiest of ${g.cells.toLocaleString()} occupied cells (${g.hits.toLocaleString()} total hits).`:` ${g.cells.toLocaleString()} occupied cells, ${g.hits.toLocaleString()} total hits.`:"";return(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:w,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),S?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:S.x+12,top:S.y+12},children:S.label}):null,"ready"===y?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{shape:C,onChange:_}),(0,t.jsx)(l.ZoomButtons,{onZoom:e=>v.current&&(0,r.stepZoom)(v.current,e),onReset:()=>v.current&&k.current&&(0,r.resetFocus)(v.current,k.current)}),(0,t.jsx)(s.HeatLegend,{title:d,lowLabel:m,highLabel:p,note:f+$})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===y?"Rendering…":"empty"===y?b:"error"===y?M??"Heatmap unavailable.":null})]})}])},48939,e=>{"use strict";var t=e.i(28100),n=e.i(11623);function a(e){return Number.isNaN(e)||e<0?0:e>1?1:e}function r(e){let t=a(e),n=[[0,.1,.9],[0,.85,1],[.1,.9,.2],[1,.85,0],[1,.15,0],[1,1,1]],r=n.length-1,i=t*r,s=Math.min(Math.floor(i),r-1),l=i-s,o=n[s],c=n[s+1];return o&&c?[o[0]+(c[0]-o[0])*l,o[1]+(c[1]-o[1])*l,o[2]+(c[2]-o[2])*l]:[1,1,1]}var i=e.i(56054),s=e.i(2348),l=e.i(25476),o=e.i(18637),c=e.i(2413);e.s(["CameraDome3DView",0,function({bins:u,gridSize:h}){let d=(0,n.useRef)(null),m=(0,n.useRef)(null),p=(0,n.useRef)(null),[f,b]=(0,n.useState)("loading"),[g,x]=(0,n.useState)(null),[w,v]=(0,n.useState)("markers"),[k,y]=(0,n.useState)(null),j=(0,n.useRef)(u),M=(0,n.useRef)(h),z=(0,n.useRef)(w);j.current=u,M.current=h,z.current=w;let C=(0,n.useRef)(null),_=u.length>0;return(0,n.useEffect)(()=>{let t=d.current;if(!t)return;if(!_)return void b("empty");let n=!1,o=null;return b("loading"),x(null),(async()=>{try{let[{Engine:c},{Scene:u},{ArcRotateCamera:h},{HemisphericLight:d},{Vector3:f,Color3:g,Color4:x,Matrix:w},{MeshBuilder:v},{StandardMaterial:k},{Mesh:_},{DynamicTexture:S}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(2213),e.A(15002),e.A(35983),e.A(18561)]);if(n)return;let R=new c(t,!0,{preserveDrawingBuffer:!1}),L=new u(R);L.clearColor=new x(.04,.05,.07,1);let I=f.Zero(),A=new h("dome-cam",Math.PI/3,Math.PI/2.4,3.6,I,L);A.attachControl(t,!0),A.lowerRadiusLimit=1.6,A.upperRadiusLimit=8,(0,s.disableWheelZoom)(A),m.current=A,p.current={target:I,alpha:A.alpha,beta:A.beta,radius:A.radius},new d("dome-light",new f(.3,1,.2),L);let P=v.CreateSphere("dome",{diameter:2,segments:20},L),E=new k("dome-mat",L);E.wireframe=!0,E.disableLighting=!0,E.emissiveColor=new g(.16,.2,.28),E.alpha=.5,P.material=E,P.isPickable=!1;let $=[];for(let e=0;e<=64;e++){let t=e/64*Math.PI*2;$.push(new f(Math.cos(t),0,Math.sin(t)))}let N=v.CreateLines("dome-horizon",{points:$},L);N.color=new g(.3,.36,.46),N.isPickable=!1;let T=v.CreateLines("dome-forward",{points:[f.Zero(),new f(1.25,0,0)]},L);T.color=new g(.4,.7,.95),T.isPickable=!1;let B=[],F=()=>{for(let e of B)e.dispose(!1,!0);B=[];let e=j.current;if(0===e.length)return;let t=e.reduce((e,t)=>Math.max(e,t.count),1),n=M.current>0?M.current:1;if("markers"===z.current){let a=v.CreateBox("dome-marker",{size:1},L),r=new k("dome-marker-mat",L);r.disableLighting=!0,r.emissiveColor=g.White(),r.specularColor=new g(0,0,0),a.material=r,a.isPickable=!0,a.thinInstanceEnablePicking=!0;let s=e.length,l=new Float32Array(16*s),o=new Float32Array(4*s),c=Array(s);for(let a=0;a<s;a++){let r=e[a],s=(r.azimuth_bin+.5)/n*Math.PI*2-Math.PI,u=(r.elevation_bin+.5)/n*Math.PI-Math.PI/2,h=Math.cos(u),d=h*Math.cos(s),m=Math.sin(u),p=h*Math.sin(s),f=r.count/t,b=.03+.12*f;w.Scaling(b,b,b).multiply(w.Translation(d,m,p)).copyToArray(l,16*a);let[g,x,v]=(0,i.heatRgb)(f);o[4*a]=g,o[4*a+1]=x,o[4*a+2]=v,o[4*a+3]=1,c[a]=`dir (${r.azimuth_bin}, ${r.elevation_bin}) \xb7 ${r.count}`}a.thinInstanceSetBuffer("matrix",l,16,!0),a.thinInstanceSetBuffer("color",o,4,!0),a.metadata={hoverLabels:c},B.push(a)}else{let t=function(e,t={}){let n=void 0!==t.width&&t.width>0?Math.floor(t.width):256,i=void 0!==t.height&&t.height>0?Math.floor(t.height):Math.max(1,Math.floor(n/2)),s=t.colorRamp??r,l=void 0!==t.blurBins&&t.blurBins>0?t.blurBins:1.5,o=a(t.alphaFloor??0),c=a(t.opacity??1),u=e.gridSize>0?e.gridSize:1,h=new Uint8ClampedArray(n*i*4),d=e.bins.filter(e=>e.count>0);if(0===d.length)return{width:n,height:i,rgba:h};let m=Math.max(1e-4,Math.PI/u*l),p=2*m*m,f=Math.cos(Math.min(Math.PI,3*m)),b=d.map(e=>{var t,n;let a,[r,i]=(t=e.azimuthBin,n=e.elevationBin,[(t+.5)/u*Math.PI*2-Math.PI,(n+.5)/u*Math.PI-Math.PI/2]);return[(a=Math.cos(i))*Math.cos(r),Math.sin(i),a*Math.sin(r)]}),g=new Float32Array(n*i),x=0;for(let e=0;e<i;e++){let t=Math.PI/2-(e+.5)/i*Math.PI,a=Math.cos(t),r=Math.sin(t);for(let t=0;t<n;t++){let i=(t+.5)/n*Math.PI*2-Math.PI,s=a*Math.cos(i),l=a*Math.sin(i),o=0;for(let e=0;e<d.length;e++){let t=b[e],n=s*t[0]+r*t[1]+l*t[2];if(n<f)continue;let a=Math.acos(n>1?1:n<-1?-1:n);o+=d[e].count*Math.exp(-(a*a)/p)}g[e*n+t]=o,o>x&&(x=o)}}if(x<=0)return{width:n,height:i,rgba:h};for(let e=0;e<g.length;e++){let t=a(g[e]/x),[n,r,i]=s(t),l=(o+(1-o)*t)*c,u=4*e;h[u]=Math.round(255*n),h[u+1]=Math.round(255*r),h[u+2]=Math.round(255*i),h[u+3]=Math.round(255*a(l))}return{width:n,height:i,rgba:h}}({bins:e.map(e=>({azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})),gridSize:n},{width:256,blurBins:1.5,opacity:.95}),i=new S("dome-skytex",{width:t.width,height:t.height},L,!1);i.hasAlpha=!0;let s=i.getContext(),l=s.createImageData(t.width,t.height);l.data.set(t.rgba),s.putImageData(l,0,0),i.update();let o=v.CreateSphere("dome-sky",{diameter:2,segments:48,sideOrientation:_.DOUBLESIDE},L),c=new k("dome-sky-mat",L);c.disableLighting=!0,c.emissiveColor=g.White(),c.diffuseColor=new g(0,0,0),c.specularColor=new g(0,0,0),c.emissiveTexture=i,c.opacityTexture=i,c.backFaceCulling=!1,o.material=c,o.isPickable=!1,B.push(o)}};C.current=F,F(),R.runRenderLoop(()=>L.render());let q=()=>R.resize();window.addEventListener("resize",q);let V=(0,l.attachMeshHover)(L,t,y),O=(0,s.attachDoubleClickFocus)(L,t,A);b("ready"),o=()=>{window.removeEventListener("resize",q),V(),O(),y(null),C.current=null,m.current=null,p.current=null,L.dispose(),R.dispose()}}catch(e){if(n)return;b("error"),x(e instanceof Error?e.message:"Failed to render dome.")}})(),()=>{n=!0,o?.()}},[_]),(0,n.useEffect)(()=>{C.current?.()},[u,h,w]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:d,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),k?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:k.x+12,top:k.y+12},children:k.label}):null,"ready"===f?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"absolute left-3 top-3 flex overflow-hidden rounded-md border border-edge bg-ink/80 text-xs backdrop-blur",children:["markers","skydome"].map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>v(e),className:`px-2.5 py-1 ${w===e?"bg-fg/15 font-medium text-white":"text-fg-muted hover:text-fg"}`,children:"markers"===e?"Markers":"Skydome"},e))}),(0,t.jsx)(c.ZoomButtons,{onZoom:e=>m.current&&(0,s.stepZoom)(m.current,e),onReset:()=>m.current&&p.current&&(0,s.resetFocus)(m.current,p.current)}),(0,t.jsx)(o.HeatLegend,{title:"Gaze density",lowLabel:"rarely",highLabel:"most-viewed",note:"markers"===w?"Each marker is a look-direction (camera forward). Blue line = forward, ring = horizon. Color & size scale with how often that direction was viewed.":"Continuous equirectangular heat field: the same gaze bins splatted into a smooth thermal texture wrapped on the dome. The in-scene SDK overlay (showGazeSkydome) renders this inward so you can stand inside it in WebXR."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===f?"Rendering…":"empty"===f?"No camera samples in range.":"error"===f?g??"Dome unavailable.":null})]})}],48939)},39592,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(56054),r=e.i(2348),i=e.i(25476),s=e.i(2413);function l(e){let t=Math.min(1,Math.max(0,e));return[.118+(.22-.118)*t,.227+.513*t,.541+(.97-.541)*t]}function o(e){return`${e.vx}|${e.vy}|${e.vz}`}function c({mode:e}){return(0,t.jsxs)("div",{className:"absolute bottom-3 right-3 max-w-72 rounded-md border border-edge bg-ink/80 px-2 py-1.5 text-xs text-fg backdrop-blur",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-sm bg-[#38bdf8]"}),"divergence"===e?"Gaze-heavy":"Gaze"]}),(0,t.jsxs)("span",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"inline-block h-2.5 w-2.5 rounded-sm bg-[#f4c84b]"}),"divergence"===e?"Click-heavy":"Clicks"]})]}),(0,t.jsx)("p",{className:"mt-1 text-fg-muted",children:"divergence"===e?"Per-voxel normalized difference: which signal dominates each cell. Color & size scale with the gap.":"Gaze = where viewers looked; Clicks = where they acted. Cells with gaze but no clicks are looked-at but un-acted-on."})]})}function u({active:e,onClick:n,children:a}){return(0,t.jsx)("button",{type:"button",onClick:n,className:`rounded px-2 py-0.5 font-medium transition ${e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:a})}e.s(["GazeClickDivergence3DView",0,function({gazeVoxels:h,clickVoxels:d,cellSize:m,proxyMeshes:p=[]}){let f=(0,n.useRef)(null),b=(0,n.useRef)(null),g=(0,n.useRef)(null),[x,w]=(0,n.useState)("loading"),[v,k]=(0,n.useState)(null),[y,j]=(0,n.useState)("overlay"),[M,z]=(0,n.useState)(null),C=(0,n.useRef)(h),_=(0,n.useRef)(d),S=(0,n.useRef)(p),R=(0,n.useRef)(y);C.current=h,_.current=d,S.current=p,R.current=y;let L=(0,n.useRef)(null),I=h.length>0||d.length>0||p.length>0;return(0,n.useEffect)(()=>{let t=f.current;if(!t)return;if(!I)return void w("empty");let n=!1,s=null;return w("loading"),k(null),(async()=>{try{let[{Engine:c},{Scene:u},{ArcRotateCamera:h},{HemisphericLight:d},{Vector3:p,Color3:f,Color4:x,Matrix:v},{MeshBuilder:k},{StandardMaterial:y}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(n)return;let j=C.current,M=_.current,I=S.current,A=[...j,...M],P=0,E=0,$=0,N=0;for(let e of A)P+=(e.vx+.5)*m,E+=(e.vy+.5)*m,$+=(e.vz+.5)*m,N++;if(0===N)for(let e of I)P+=(e.aabb[0]+e.aabb[3])/2,E+=(e.aabb[1]+e.aabb[4])/2,$+=(e.aabb[2]+e.aabb[5])/2,N++;let T=new p(P/N,E/N,$/N),B=4*m;for(let e of A){let t=(e.vx+.5)*m-T.x,n=(e.vy+.5)*m-T.y,a=(e.vz+.5)*m-T.z;B=Math.max(B,Math.sqrt(t*t+n*n+a*a))}for(let e of I){let t=(e.aabb[0]+e.aabb[3])/2-T.x,n=(e.aabb[1]+e.aabb[4])/2-T.y,a=(e.aabb[2]+e.aabb[5])/2-T.z;B=Math.max(B,Math.sqrt(t*t+n*n+a*a))}let F=new c(t,!0,{preserveDrawingBuffer:!1}),q=new u(F);q.clearColor=new x(.04,.05,.07,1);let V=new h("divergence-cam",Math.PI/4,Math.PI/3,2.4*B,T,q);V.attachControl(t,!0),(0,r.disableWheelZoom)(V),b.current=V,g.current={target:T,alpha:V.alpha,beta:V.beta,radius:V.radius},new d("divergence-light",new p(.4,1,.3),q);let O=null,D="\0",Z=Math.max(.02*B,.25*m)/(.9*m),W=[],H=(e,t,n,a,r)=>{if(0===t.length)return;let i=k.CreateSphere(e,{diameter:.9*m,segments:6},q),s=new y(`${e}-mat`,q);s.diffuseColor=new f(1,1,1),s.specularColor=new f(0,0,0),i.material=s,i.metadata={hoverLabel:r},W.push(i);let l=t.length,o=new Float32Array(16*l),c=new Float32Array(4*l);for(let e=0;e<l;e++){let r=t[e],i=r.count/n,s=Z*(.5+.5*i);v.Scaling(s,s,s).multiply(v.Translation((r.vx+.5)*m,(r.vy+.5)*m,(r.vz+.5)*m)).copyToArray(o,16*e);let[l,u,h]=a(i);c[4*e]=l,c[4*e+1]=u,c[4*e+2]=h,c[4*e+3]=1}i.thinInstanceSetBuffer("matrix",o,16,!1),i.thinInstanceSetBuffer("color",c,4,!0)},K=()=>{for(let e of((()=>{let e=S.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===D||(D=t,O&&(O.dispose(!1,!0),O=null),0===e.length))return;O=k.CreateBox("scene-proxy",{size:1},q);let n=new y("scene-proxy-mat",q);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new f(.32,.4,.52),n.alpha=.35,O.material=n,O.isPickable=!0,O.thinInstanceEnablePicking=!0,O.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),i=Math.max(n[4]-n[1],.001),s=Math.max(n[5]-n[2],.001);v.Scaling(a,i,s).multiply(v.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}O.thinInstanceSetBuffer("matrix",r,16,!0)})(),W))e.dispose(!1,!0);W=[];let e=C.current,t=_.current,n=e.reduce((e,t)=>Math.max(e,t.count),1),r=t.reduce((e,t)=>Math.max(e,t.count),1),i=R.current;if("divergence"===i){let i=new Map(e.map(e=>[o(e),e])),s=new Map(t.map(e=>[o(e),e])),c=new Set([...i.keys(),...s.keys()]),u=[],h=[];for(let e of c){let t=(i.get(e)?.count??0)/n,a=(s.get(e)?.count??0)/r,l=s.get(e)??i.get(e),o=a-t,c={vx:l.vx,vy:l.vy,vz:l.vz,count:1e3*Math.abs(o)};(o>=0?u:h).push(c)}H("div-click",u,1e3,a.heatRgb,"Click-heavy"),H("div-gaze",h,1e3,l,"Gaze-heavy")}else("overlay"===i||"gaze"===i)&&H("gaze-voxel",e,n,l,"Gaze"),("overlay"===i||"click"===i)&&H("click-voxel",t,r,a.heatRgb,"Click")};L.current=K,K(),F.runRenderLoop(()=>q.render());let U=()=>F.resize();window.addEventListener("resize",U);let G=(0,i.attachMeshHover)(q,t,z),Y=(0,r.attachDoubleClickFocus)(q,t,V);w("ready"),s=()=>{window.removeEventListener("resize",U),G(),Y(),z(null),L.current=null,b.current=null,g.current=null,q.dispose(),F.dispose()}}catch(e){if(n)return;w("error"),k(e instanceof Error?e.message:"Failed to render overlay.")}})(),()=>{n=!0,s?.()}},[I,m]),(0,n.useEffect)(()=>{L.current?.()},[h,d,p,m,y]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:f,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),M?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-64 truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:M.x+12,top:M.y+12},children:M.label}):null,"ready"===x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(u,{active:"overlay"===y,onClick:()=>j("overlay"),children:"Overlay"}),(0,t.jsx)(u,{active:"gaze"===y,onClick:()=>j("gaze"),children:"Gaze"}),(0,t.jsx)(u,{active:"click"===y,onClick:()=>j("click"),children:"Clicks"}),(0,t.jsx)(u,{active:"divergence"===y,onClick:()=>j("divergence"),children:"Divergence"})]}),(0,t.jsx)(s.ZoomButtons,{onZoom:e=>b.current&&(0,r.stepZoom)(b.current,e),onReset:()=>b.current&&g.current&&(0,r.resetFocus)(b.current,g.current)}),(0,t.jsx)(c,{mode:y})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===x?"Rendering…":"empty"===x?"No gaze or click hit-points in range. Enable gaze + pointer capture in the SDK.":"error"===x?v??"Overlay unavailable.":null})]})}])},19399,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(20880);let r="__other_sp__",i="__other_mesh__";function s(e){return`${e[0]}|${e[1]}|${e[2]}`}function l(e,t){return t<=1?0:1.4-e/(t-1)*2.8}var o=e.i(56054),c=e.i(2348),u=e.i(25476),h=e.i(18637),d=e.i(2413);let m="__all__",p={maxStandpoints:6,maxMeshes:10,maxRibbons:70};function f(e,t){return`${e}|${t}`}function b(e){let t=e.aabb;return[(t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2]}function g(e){let t=0;for(let n=0;n<e.length;n++)t=31*t+e.charCodeAt(n)|0;return Math.abs(t)}function x({label:e,value:n,onChange:a,allLabel:r,options:i}){return(0,t.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,t.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,t.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:n,onChange:e=>a(e.target.value),children:[(0,t.jsx)("option",{value:m,children:r}),i.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}function w({active:e,onClick:n,children:a,disabled:r=!1,title:i}){return(0,t.jsx)("button",{type:"button",onClick:n,disabled:r,title:i,className:`rounded px-2 py-0.5 font-medium transition ${r?"cursor-not-allowed text-fg-muted/40":e?"bg-amber text-ink":"text-fg-muted hover:text-fg"}`,children:a})}function v({standpoints:e,proxyMeshes:a,selectedKey:r,onSelect:i}){let s=(0,n.useRef)(null),l=(0,n.useMemo)(()=>e.filter(e=>e.origin),[e]),o=(0,n.useMemo)(()=>{let e=1/0,t=-1/0,n=1/0,r=-1/0,i=(a,i)=>{e=Math.min(e,a),t=Math.max(t,a),n=Math.min(n,i),r=Math.max(r,i)};for(let e of a)i(e.aabb[0],e.aabb[2]),i(e.aabb[3],e.aabb[5]);for(let e of l)i(e.origin[0],e.origin[2]);return Number.isFinite(e)?(t-e<.001&&(e-=1,t+=1),r-n<.001&&(n-=1,r+=1),{minX:e,maxX:t,minZ:n,maxZ:r}):{minX:-1,maxX:1,minZ:-1,maxZ:1}},[a,l]),c=(0,n.useMemo)(()=>{let e=Math.min(134/(o.maxX-o.minX),94/(o.maxZ-o.minZ));return(t,n)=>[8+(t-o.minX)*e,8+(n-o.minZ)*e]},[o]),u=(0,n.useMemo)(()=>l.reduce((e,t)=>Math.max(e,t.count),1),[l]);return(0,n.useEffect)(()=>{let e=s.current,t=e?.getContext("2d");if(!t)return;let n=window.devicePixelRatio||1;for(let r of(e.width=150*n,e.height=110*n,t.setTransform(n,0,0,n,0,0),t.clearRect(0,0,150,110),t.fillStyle="rgba(8,10,14,0.85)",t.fillRect(0,0,150,110),t.strokeStyle="rgba(120,140,170,0.35)",t.lineWidth=1,a)){let[e,n]=c(r.aabb[0],r.aabb[2]),[a,i]=c(r.aabb[3],r.aabb[5]);t.strokeRect(Math.min(e,a),Math.min(n,i),Math.abs(a-e),Math.abs(i-n))}for(let e of l){let[n,a]=c(e.origin[0],e.origin[2]),i=2+e.count/u*4,s=e.key===r;t.beginPath(),t.arc(n,a,i,0,2*Math.PI),t.fillStyle=s?"rgba(242,115,242,1)":"rgba(242,115,242,0.55)",t.fill(),s&&(t.beginPath(),t.arc(n,a,i+2.5,0,2*Math.PI),t.strokeStyle="rgba(255,255,255,0.9)",t.lineWidth=1.5,t.stroke())}},[a,l,c,u,r]),(0,t.jsxs)("div",{className:"absolute right-3 top-3 rounded-md border border-edge bg-ink/80 p-1 backdrop-blur",children:[(0,t.jsx)("div",{className:"px-1 pb-0.5 text-[10px] font-medium text-fg-muted",children:"Standpoints (top view)"}),(0,t.jsx)("canvas",{ref:s,className:"h-27.5 w-37.5 cursor-pointer rounded",onClick:e=>{let t=s.current;if(!t||0===l.length)return;let n=t.getBoundingClientRect(),a=(e.clientX-n.left)/n.width*150,r=(e.clientY-n.top)/n.height*110,o=null,u=1/0;for(let e of l){let[t,n]=c(e.origin[0],e.origin[2]),i=(t-a)**2+(n-r)**2;i<u&&(u=i,o=e)}o&&u<=196&&i(o.key)}})]})}e.s(["FlowSankey3DView",0,function({links:k,gridSize:y,proxyMeshes:j=[],maxLinks:M=80,baseUrl:z,apiKey:C,flowQuery:_,hasFirstPerson:S=!1}){let R=(0,n.useRef)(null),L=(0,n.useRef)(null),I=(0,n.useRef)(null),[A,P]=(0,n.useState)("loading"),[E,$]=(0,n.useState)(null),[N,T]=(0,n.useState)(m),[B,F]=(0,n.useState)(m),[q,V]=(0,n.useState)(m),[O,D]=(0,n.useState)("aggregate"),[Z,W]=(0,n.useState)(null),[H,K]=(0,n.useState)("all"),[U,G]=(0,n.useState)(k),Y=!!(z&&_),X=(0,n.useMemo)(()=>_?JSON.stringify(_):"",[_]),J=(0,n.useRef)(!1);(0,n.useEffect)(()=>{!J.current&&S&&(K("first-person"),J.current=!0)},[S]),(0,n.useEffect)(()=>{S&&"viewer"===H&&K("first-person")},[S,H]),(0,n.useEffect)(()=>{Y||G(k)},[k,Y]),(0,n.useEffect)(()=>{if(!z||!_)return;let e=!1,t=new a.CollectorApi(z,C??""),n="all"===H?void 0:H;return t.flowHeatmap({..._,bins:y,limit:400,groupByOrigin:!0,cameraMode:n}).then(t=>{e||G(t)}).catch(()=>{e||G([])}),()=>{e=!0}},[z,C,X,H,y]);let Q=(0,n.useMemo)(()=>{let e=new Map;for(let t of U){if(!t.originVoxel)continue;let n=s(t.originVoxel),a=t.origin,r=e.get(n);r?(r.count+=t.count,a&&(r.ox+=a[0]*t.count,r.oy+=a[1]*t.count,r.oz+=a[2]*t.count,r.wsum+=t.count)):e.set(n,{key:n,voxel:t.originVoxel,count:t.count,ox:a?a[0]*t.count:0,oy:a?a[1]*t.count:0,oz:a?a[2]*t.count:0,wsum:a?t.count:0})}return[...e.values()].map(e=>({key:e.key,voxel:e.voxel,count:e.count,origin:e.wsum>0?[e.ox/e.wsum,e.oy/e.wsum,e.oz/e.wsum]:void 0})).sort((e,t)=>t.count-e.count)},[U]),ee=Q.length>0,et=(0,n.useMemo)(()=>q===m?null:Q.find(e=>e.key===q)??null,[Q,q]),en=(0,n.useMemo)(()=>(function(e,t,n,a){let o=e.filter(e=>e.originVoxel);if(0===o.length)return{standpoints:[],gazes:[],meshes:[],ribbons:[],maxCount:1};let c=t.slice(0,Math.max(1,a.maxStandpoints)),u=new Set(c.map(e=>e.key)),h=e=>{let t=e.originVoxel?s(e.originVoxel):r;return u.has(t)?t:r},d=new Map;for(let e of o)d.set(e.mesh,(d.get(e.mesh)??0)+e.count);let m=new Set([...d.entries()].sort((e,t)=>t[1]-e[1]).slice(0,Math.max(1,a.maxMeshes)).map(([e])=>e)),p=e=>m.has(e)?e:i,f=new Map;for(let e of o){let t=h(e),n=p(e.mesh),a=`${t}|${e.azimuth_bin}|${e.elevation_bin}|${n}`,r=f.get(a);r?r.count+=e.count:f.set(a,{standpointId:t,gazeId:`${t}|${e.azimuth_bin}|${e.elevation_bin}`,meshId:n,azimuthBin:e.azimuth_bin,elevationBin:e.elevation_bin,count:e.count})}let b=[...f.values()].sort((e,t)=>t.count-e.count),g=b.slice(0,Math.max(1,a.maxRibbons)),x=b.slice(Math.max(1,a.maxRibbons));if(x.length>0){let e=new Map(g.map(e=>[`${e.standpointId}|${e.azimuthBin}|${e.elevationBin}|${i}`,e]));for(let t of x){let n=`${t.standpointId}|${t.azimuthBin}|${t.elevationBin}|${i}`,a=e.get(n);if(a)a.count+=t.count;else{let a={standpointId:t.standpointId,gazeId:t.gazeId,meshId:i,azimuthBin:t.azimuthBin,elevationBin:t.elevationBin,count:t.count};e.set(n,a),g.push(a)}}}let w=new Set(g.map(e=>e.standpointId)),v=new Set(g.map(e=>e.meshId)),k=[...c.filter(e=>w.has(e.key)).map(e=>e.key),...w.has(r)?[r]:[]],y=k.map((e,t)=>{let n=c.find(t=>t.key===e),a=g.filter(t=>t.standpointId===e).reduce((e,t)=>e+t.count,0);return{id:e,kind:"standpoint",pos:[-2.6,l(t,k.length),0],count:a,label:n?`[${n.voxel[0]}, ${n.voxel[1]}, ${n.voxel[2]}]`:"Other standpoints",isOther:e===r}}),j=new Map(y.map(e=>[e.id,e.pos[1]])),M=new Map;for(let e of g)M.set(e.meshId,(M.get(e.meshId)??0)+e.count);let z=[...v].sort((e,t)=>(M.get(t)??0)-(M.get(e)??0));z.sort((e,t)=>(e===i)-(t===i));let C=z.map((e,t)=>({id:e,kind:"mesh",pos:[2.6,l(t,z.length),0],count:M.get(e)??0,label:e===i?"Other meshes":e,isOther:e===i})),_=new Map;for(let e of g){let t=_.get(e.gazeId);t?t.count+=e.count:_.set(e.gazeId,{az:e.azimuthBin,el:e.elevationBin,sp:e.standpointId,count:e.count})}let S=[..._.entries()].map(([e,t])=>{let a=j.get(t.sp)??0,r=(t.az+.5)/n-.5;return{id:e,kind:"gaze",pos:[0,a+((t.el+.5)/n-.5)*.85,1.6*r],count:t.count,label:`(${t.az}, ${t.el})`,isOther:!1}}),R=g.reduce((e,t)=>Math.max(e,t.count),1);return{standpoints:y,gazes:S,meshes:C,ribbons:g,maxCount:R}})(U,Q,y,p),[U,Q,y]),ea="twostage"===O&&ee;(0,n.useEffect)(()=>{"twostage"!==O||ee||D("aggregate")},[O,ee]);let er=(0,n.useMemo)(()=>{if(q!==m&&ee)return U.filter(e=>e.originVoxel&&s(e.originVoxel)===q);if(!ee)return U;let e=new Map;for(let t of U){let n=`${t.azimuth_bin}|${t.elevation_bin}|${t.mesh}`,a=e.get(n);a?a.count+=t.count:e.set(n,{azimuth_bin:t.azimuth_bin,elevation_bin:t.elevation_bin,mesh:t.mesh,count:t.count})}return[...e.values()]},[U,q,ee]),ei=(0,n.useMemo)(()=>[...er].sort((e,t)=>t.count-e.count).slice(0,Math.max(1,M)),[er,M]),es=(0,n.useMemo)(()=>{let e=new Map;for(let t of ei)e.set(t.mesh,(e.get(t.mesh)??0)+t.count);return[...e.entries()].sort((e,t)=>t[1]-e[1])},[ei]),el=(0,n.useMemo)(()=>{let e=new Map;for(let t of ei){let n=f(t.azimuth_bin,t.elevation_bin),a=e.get(n);a?a.count+=t.count:e.set(n,{azimuthBin:t.azimuth_bin,elevationBin:t.elevation_bin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[ei]);(0,n.useEffect)(()=>{!ea&&N!==m&&(es.some(([e])=>e===N)||T(m))},[ea,N,es]),(0,n.useEffect)(()=>{!ea&&B!==m&&(el.some(e=>f(e.azimuthBin,e.elevationBin)===B)||F(m))},[ea,B,el]),(0,n.useEffect)(()=>{!ea&&q!==m&&(Q.some(e=>e.key===q)||V(m))},[ea,q,Q]),(0,n.useEffect)(()=>{T(m),F(m),V(m)},[O]);let eo=(0,n.useMemo)(()=>ea?en.ribbons.filter(e=>{let t=q===m||e.standpointId===q,n=B===m||f(e.azimuthBin,e.elevationBin)===B,a=N===m||e.meshId===N;return t&&n&&a}).length:ei.filter(e=>{let t=B===m||f(e.azimuth_bin,e.elevation_bin)===B,n=N===m||e.mesh===N;return t&&n}).length,[ea,en,ei,N,B,q]),ec=ea?en.ribbons.length:ei.length,eu=(0,n.useMemo)(()=>ea?en.standpoints.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):Q.slice(0,24).map(e=>({value:e.key,label:`[${e.voxel[0]}, ${e.voxel[1]}, ${e.voxel[2]}] \xb7 ${e.count}`})),[ea,en,Q]),eh=(0,n.useMemo)(()=>{if(ea){let e=new Map;for(let t of en.ribbons){let n=f(t.azimuthBin,t.elevationBin),a=e.get(n);a?a.count+=t.count:e.set(n,{az:t.azimuthBin,el:t.elevationBin,count:t.count})}return[...e.values()].sort((e,t)=>t.count-e.count).map(e=>({value:f(e.az,e.el),label:`(${e.az}, ${e.el}) \xb7 ${e.count}`}))}return el.map(e=>({value:f(e.azimuthBin,e.elevationBin),label:`(${e.azimuthBin}, ${e.elevationBin}) \xb7 ${e.count}`}))},[ea,en,el]),ed=(0,n.useMemo)(()=>ea?en.meshes.map(e=>({value:e.id,label:`${e.label} \xb7 ${e.count}`})):es.map(([e,t])=>({value:e,label:`${e} \xb7 ${t}`})),[ea,en,es]),em=(0,n.useRef)(ei);em.current=ei;let ep=(0,n.useRef)(en);ep.current=en;let ef=(0,n.useRef)(j);ef.current=j;let eb=(0,n.useRef)(es);eb.current=es;let eg=(0,n.useRef)(N);eg.current=N;let ex=(0,n.useRef)(B);ex.current=B;let ew=(0,n.useRef)(q);ew.current=q;let ev=(0,n.useRef)(et);ev.current=et;let ek=(0,n.useRef)(null),ey=ea?en.ribbons.length>0:ei.length>0;return(0,n.useEffect)(()=>{let t=R.current;if(!t)return;if(!ey)return void P("empty");let n=!1,a=null;return P("loading"),$(null),(async()=>{try{let r,[{Engine:i},{Scene:s},{ArcRotateCamera:l},{HemisphericLight:h},{Vector3:d,Color3:p,Color4:x},{MeshBuilder:w},{StandardMaterial:v}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(18561)]);if(n)return;let k=new i(t,!0,{preserveDrawingBuffer:!1}),j=new s(k);j.clearColor=new x(.04,.05,.07,1);let M=[],z=()=>{for(let e of M)e.dispose();M=[]};if(ea){let e=d.Zero();(r=new l("ts-cam",Math.PI/2,Math.PI/2.4,8.5,e,j)).attachControl(t,!0),(0,c.disableWheelZoom)(r),L.current=r,I.current={target:e,alpha:r.alpha,beta:r.beta,radius:r.radius},new h("ts-light",new d(.3,1,.2),j);let n={standpoint:[.95,.45,.95],gaze:[.45,.75,1],mesh:[1,.82,.42]},a={standpoint:.26,gaze:.13,mesh:.22},i=(e,t,n)=>{let a=e[0],r=e[1],i=e[2],s=t[0],l=t[1],o=t[2],c=[(a+s)/2,(r+l)/2+n,(i+o)/2],u=[];for(let e=0;e<=12;e++){let t=e/12,n=1-t;u.push(new d(n*n*a+2*n*t*c[0]+t*t*s,n*n*r+2*n*t*c[1]+t*t*l,n*n*i+2*n*t*c[2]+t*t*o))}return u},s=()=>{z();let e=ep.current;if(0===e.ribbons.length)return;let t=ew.current,r=ex.current,s=eg.current,l=e=>{let n=t===m||e.standpointId===t,a=r===m||f(e.azimuthBin,e.elevationBin)===r,i=s===m||e.meshId===s;return n&&a&&i},c=t!==m||r!==m||s!==m,u=new Set;for(let t of e.ribbons)l(t)&&(u.add(t.standpointId),u.add(t.gazeId),u.add(t.meshId));let h=[...e.standpoints,...e.gazes,...e.meshes],b=new Map(h.map(e=>[e.id,e.pos])),g=new Map(h.map(e=>[e.id,e.label]));for(let e of h){let t=w.CreateSphere(`ts-node-${e.kind}-${e.id}`,{diameter:a[e.kind],segments:8},j);t.position=new d(e.pos[0],e.pos[1],e.pos[2]);let r=new v(`ts-node-mat-${e.kind}-${e.id}`,j);r.disableLighting=!0;let[i,s,l]=n[e.kind];r.emissiveColor=new p(i,s,l),r.alpha=!c||u.has(e.id)?1:.2,t.material=r,t.isPickable=!0,t.metadata={hoverLabel:e.label},M.push(t,r)}for(let t of e.ribbons){let n=b.get(t.standpointId),a=b.get(t.gazeId),r=b.get(t.meshId);if(!n||!a||!r)continue;let s=t.count/e.maxCount,u=.18+.5*s,h=[...i(n,a,u),...i(a,r,u).slice(1)],d=l(t),[m,f,x]=(0,o.heatRgb)(s),k=w.CreateTube(`ts-link-${t.standpointId}-${t.gazeId}-${t.meshId}`,{path:h,radius:(d?1:.4)*(.012+.04*s),tessellation:8,cap:0,sideOrientation:0},j),y=new v(`ts-link-mat-${t.standpointId}-${t.gazeId}-${t.meshId}`,j);y.disableLighting=!0,y.emissiveColor=new p(m,f,x),y.alpha=d?.35+.65*s:c?.06:.18,k.material=y,k.isPickable=!0,k.metadata={hoverLabel:g.get(t.meshId)??t.meshId},M.push(k,y)}};ek.current=s,s()}else{let e=new Map;for(let t of ef.current)e.set(t.name,b(t));let n=new Map,a=eb.current.map(([e])=>e).filter(t=>!e.has(t));for(let e=0;e<a.length;e++){let t=a[e],r=g(t),i=e/Math.max(1,a.length)*Math.PI*2+r%100/100*.35;n.set(t,[2.2*Math.cos(i),-.35+(r%7-3)*.06,2.2*Math.sin(i)])}for(let[t,a]of e.entries())n.set(t,a);let i=0,s=0,u=0,x=0;for(let e of n.values())i+=e[0],s+=e[1],u+=e[2],x++;let k=new d(i/Math.max(1,x),s/Math.max(1,x),u/Math.max(1,x)),C=1.8;for(let e of n.values()){let t=e[0]-k.x,n=e[1]-k.y,a=e[2]-k.z;C=Math.max(C,Math.sqrt(t*t+n*n+a*a))}let _=.75*C+1,S=Math.max(1,C/1.8);(r=new l("flow-cam",Math.PI/4,Math.PI/3,3.4*C,k,j)).attachControl(t,!0),(0,c.disableWheelZoom)(r),L.current=r,I.current={target:k,alpha:r.alpha,beta:r.beta,radius:r.radius},new h("flow-light",new d(.3,1,.2),j);let R=w.CreateSphere("flow-source-dome",{diameter:2*_,segments:20},j);R.position=k;let A=new v("flow-source-dome-mat",j);A.wireframe=!0,A.disableLighting=!0,A.emissiveColor=new p(.16,.2,.28),A.alpha=.35,R.material=A,R.isPickable=!1;let P=()=>{z();let e=em.current;if(0===e.length)return;let t=eg.current,n=ex.current,a=ev.current,r=new Map;for(let e of ef.current)r.set(e.name,b(e));let i=new Map,s=eb.current.map(([e])=>e).filter(e=>!r.has(e));for(let e=0;e<s.length;e++){let t=s[e],n=g(t),a=e/Math.max(1,s.length)*Math.PI*2+n%100/100*.35;i.set(t,[2.2*Math.cos(a),-.35+(n%7-3)*.06,2.2*Math.sin(a)])}for(let[e,t]of r.entries())i.set(e,t);let l=e.reduce((e,t)=>Math.max(e,t.count),1),c=new v("flow-source-node",j);c.disableLighting=!0,c.emissiveColor=new p(.45,.75,1);let u=new v("flow-target-node",j);u.disableLighting=!0,u.emissiveColor=new p(1,.82,.42),M.push(c,u);let h=new Set,x=new Set,C=e=>{let a=n===m||f(e.azimuth_bin,e.elevation_bin)===n,r=t===m||e.mesh===t;return a&&r},R=new Set,L=new Set;for(let t of e)C(t)&&(R.add(f(t.azimuth_bin,t.elevation_bin)),L.add(t.mesh));for(let a of e){let e=`${a.azimuth_bin}|${a.elevation_bin}`,r=i.get(a.mesh);if(!r)continue;let s=C(a),f=(a.azimuth_bin+.5)/y*Math.PI*2-Math.PI,b=(a.elevation_bin+.5)/y*Math.PI-Math.PI/2,g=Math.cos(b),z=g*Math.cos(f),I=Math.sin(b),A=g*Math.sin(f),P=new d(k.x+z*_,k.y+I*_,k.z+A*_),E=new d(r[0],r[1],r[2]);if(!h.has(e)){let a=w.CreateSphere(`flow-src-${e}`,{diameter:.12*S,segments:6},j);a.position=P;let r=c.clone(`flow-src-mat-${e}`);r.alpha=R.has(e)||t===m&&n===m?1:.22,a.material=r,a.isPickable=!1,h.add(e),M.push(a,r)}if(!x.has(a.mesh)){let e=w.CreateSphere(`flow-target-${a.mesh}`,{diameter:.2*S,segments:7},j);e.position=E;let r=u.clone(`flow-target-mat-${a.mesh}`);r.alpha=L.has(a.mesh)||t===m&&n===m?1:.22,e.material=r,e.isPickable=!0,e.metadata={hoverLabel:a.mesh},x.add(a.mesh),M.push(e,r)}let $=P.add(E).scale(.5),N=$.subtract(k),T=Math.sqrt(N.x*N.x+N.y*N.y+N.z*N.z),B=T>1e-6?N.x/T:0,F=T>1e-6?N.y/T:1,q=T>1e-6?N.z/T:0,V=(.35+a.count/l*.75)*S,O=new d($.x+B*V,$.y+F*V+.12*S,$.z+q*V),D=[];for(let e=0;e<=18;e++){let t=e/18,n=1-t;D.push(new d(n*n*P.x+2*n*t*O.x+t*t*E.x,n*n*P.y+2*n*t*O.y+t*t*E.y,n*n*P.z+2*n*t*O.z+t*t*E.z))}let Z=a.count/l,[W,H,K]=(0,o.heatRgb)(Z),U=w.CreateTube(`flow-link-${a.mesh}-${e}`,{path:D,radius:(s?1:.4)*(.012+.04*Z)*S,tessellation:8,cap:0,sideOrientation:0},j),G=new v(`flow-link-mat-${a.mesh}-${e}`,j);G.disableLighting=!0,G.emissiveColor=new p(W,H,K),G.alpha=s?.35+.65*Z:.08,U.material=G,U.isPickable=!0,U.metadata={hoverLabel:a.mesh},M.push(U,G)}let I=a?.origin;if(I){let e=new d(I[0],I[1],I[2]),t=w.CreateSphere("flow-standpoint",{diameter:.26*S,segments:10},j);t.position=e;let n=new v("flow-standpoint-mat",j);n.disableLighting=!0,n.emissiveColor=new p(.95,.45,.95),t.material=n,t.isPickable=!1;let a=w.CreateLines("flow-standpoint-stem",{points:[e,new d(e.x,k.y,e.z)]},j);a.color=new p(.95,.45,.95),a.isPickable=!1,M.push(t,n,a)}};ek.current=P,P()}k.runRenderLoop(()=>j.render());let C=()=>k.resize();window.addEventListener("resize",C);let _=(0,u.attachMeshHover)(j,t,W),S=(0,c.attachDoubleClickFocus)(j,t,r);P("ready"),a=()=>{window.removeEventListener("resize",C),_(),S(),W(null),ek.current=null,L.current=null,I.current=null,z(),j.dispose(),k.dispose()}}catch(e){if(n)return;P("error"),$(e instanceof Error?e.message:"Failed to render flow links.")}})(),()=>{n=!0,a?.()}},[ea,y,ey]),(0,n.useEffect)(()=>{ek.current?.()},[ei,en,j,N,B,q,et]),(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:R,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),Z?(0,t.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:Z.x+12,top:Z.y+12},children:Z.label}):null,"ready"===A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"absolute left-3 top-3 flex flex-wrap gap-2",children:[ee?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(w,{active:!ea,onClick:()=>D("aggregate"),children:"Aggregate"}),(0,t.jsx)(w,{active:ea,onClick:()=>D("twostage"),children:"Two-stage"})]}):null,Y?(0,t.jsxs)("div",{className:"flex items-center gap-1 rounded-md border border-edge bg-ink/80 p-0.5 text-xs backdrop-blur",children:[(0,t.jsx)(w,{active:"first-person"===H,onClick:()=>K("first-person"),children:"Walk"}),(0,t.jsx)(w,{active:"viewer"===H,onClick:()=>K("viewer"),disabled:S,title:S?"Orbit (viewer) flow isn't available for walkable scenes":void 0,children:"Orbit"}),(0,t.jsx)(w,{active:"all"===H,onClick:()=>K("all"),children:"All"})]}):null,ee?(0,t.jsx)(x,{label:"Standpoint",value:q,onChange:V,allLabel:"All standpoints",options:eu}):null,(0,t.jsx)(x,{label:ea?"Gaze":"Source",value:B,onChange:F,allLabel:ea?"All gaze sectors":"All sources",options:eh}),(0,t.jsx)(x,{label:"Mesh",value:N,onChange:T,allLabel:"All meshes",options:ed})]}),ea?(0,t.jsx)(v,{standpoints:Q,proxyMeshes:j,selectedKey:q,onSelect:e=>V(t=>t===e?m:e)}):null,(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 right-3 flex max-w-[20rem] flex-col items-end gap-2",children:[Y&&!S?(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg-muted backdrop-blur",children:["Orbit-dominated scene — viewer ",(0,t.jsx)("em",{children:"position"})," adds little here. Use the"," ",(0,t.jsx)("strong",{children:"View dome"})," (§7.5) above for where viewers looked."]}):null,(0,t.jsxs)("div",{className:"rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:["Active links: ",eo,"/",ec]})]}),(0,t.jsx)(d.ZoomButtons,{onZoom:e=>L.current&&(0,c.stepZoom)(L.current,e),onReset:()=>L.current&&I.current&&(0,c.resetFocus)(L.current,I.current)}),(0,t.jsx)(h.HeatLegend,{title:"Flow volume",lowLabel:"fewer links",highLabel:"dominant links",note:ea?"Three columns: standpoint → gaze sector → mesh. Top standpoints/meshes are kept; the tail folds into an “Other” node. Pick a standpoint (or click the minimap), gaze sector, or mesh to emphasize matching ribbons.":"Each arc aggregates clicks from one camera-direction bin to a mesh. Pick a source or mesh to emphasize matching links and dim the rest."})]}):(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===A?"Rendering…":"empty"===A?"No aggregate flow links in range.":"error"===A?E??"Flow view unavailable.":null})]})}],19399)},76421,e=>{"use strict";var t=e.i(28100),n=e.i(11623),a=e.i(20880);async function r(e,t,n){let a=e.getReader(),r=new TextDecoder,i="";for(t.addEventListener("abort",()=>void a.cancel().catch(()=>{}));;){let{done:e,value:t}=await a.read();if(e)return;let s=(i+=r.decode(t,{stream:!0})).indexOf("\n\n");for(;s>=0;){let e=i.slice(0,s);i=i.slice(s+2);let t="message",a=[];for(let n of e.split("\n"))!n.startsWith(":")&&(n.startsWith("event:")?t=n.slice(6).trim():n.startsWith("data:")&&a.push(n.slice(5).replace(/^ /,"")));"event"===t&&a.length>0&&n(a.join("\n")),s=i.indexOf("\n\n")}}}var i=e.i(60614),s=e.i(2348),l=e.i(2413);let o=new Set,c=[{key:"interaction",label:"Clicks & picks",color:"#fb923c",types:new Set(["pointer_click","mesh_interaction"])},{key:"actors",label:"Scene actors",color:"#e879f9",types:new Set(["node_transform"])},{key:"custom",label:"Custom",color:"#34d399",types:new Set(["custom"])},{key:"camera",label:"Camera",color:"#38bdf8",types:new Set(["camera_sample"])},{key:"pointer",label:"Pointer",color:"#94a3b8",types:new Set(["pointer_move","pointer_down","pointer_up"])},{key:"perf",label:"Perf",color:"#a78bfa",types:new Set(["frame_perf"])},{key:"lifecycle",label:"Lifecycle",color:"#f472b6",types:new Set(["session_start","session_end","scene_change","focus_change","visibility_change","viewport_resize","context_lost","context_restored","runtime_error","capability_change","input_action","resource_sample","compile_stall","mesh_visibility","hover_dwell"])}];function u(e,t,n){let a=Math.max(1,n),r=new Map;c.forEach((e,t)=>{for(let n of e.types)r.set(n,t)});let i=c.map(()=>new Set);for(let n of e){let e=r.get(n.type);if(void 0===e)continue;let s=Math.min(1,Math.max(0,(n.ts-t)/a));i[e].add(Math.round(600*s))}return c.map((e,t)=>({key:e.key,label:e.label,color:e.color,marks:[...i[t]].sort((e,t)=>e-t).map(e=>e/600)})).filter(e=>e.marks.length>0)}function h(e){let t=Math.max(0,Math.round(e/1e3)),n=Math.floor(t/60);return`${n}:${(t%60).toString().padStart(2,"0")}`}function d(e){let t=e.slice(e.lastIndexOf("/")+1);return t.length>20?`${t.slice(0,19)}\u2026`:t}function m({lanes:e,duration:n,progress:a,onSeek:r,hiddenTypes:i}){let s=e.filter(e=>{let t=c.find(t=>t.key===e.key);if(!t)return!0;for(let e of t.types)if(!i.has(e))return!0;return!1});if(0===s.length)return null;let l=`${Math.min(100,Math.max(0,a/Math.max(1,n)*100))}%`;return(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("div",{className:"mb-1.5 flex flex-wrap items-center gap-x-3 gap-y-1 text-[10px] text-fg-muted",children:s.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-1",children:[(0,t.jsx)("span",{"aria-hidden":!0,className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:e.color}}),e.label,(0,t.jsxs)("span",{className:"tabular-nums text-fg-muted",children:["(",e.marks.length,")"]})]},e.key))}),(0,t.jsxs)("button",{type:"button","aria-label":"Event timeline — click to seek",className:"relative block w-full cursor-pointer select-none rounded-md border border-edge bg-ink/60 p-1.5 text-left",onClick:e=>{var t;let a;return t=e.clientX,void r(Math.min(1,Math.max(0,(t-(a=e.currentTarget.getBoundingClientRect()).left)/(a.width||1)))*n)},children:[(0,t.jsx)("div",{className:"flex flex-col gap-1",children:s.map(e=>(0,t.jsx)("div",{className:"relative h-2.5 rounded-sm bg-white/5",children:e.marks.map((n,a)=>(0,t.jsx)("span",{"aria-hidden":!0,className:"pointer-events-none absolute top-0 h-full w-px",style:{left:`${100*n}%`,backgroundColor:e.color,opacity:.85}},a))},e.key))}),(0,t.jsx)("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-y-1 w-px bg-saffron",style:{left:l}})]})]})}e.s(["SessionReplayView",0,function({baseUrl:c,apiKey:p,sessionId:f,hiddenTypes:b,isLive:g=!1}){let x=(0,n.useRef)(null),w=(0,n.useRef)(null),v=(0,n.useRef)(0),k=(0,n.useRef)(b??o),y=(0,n.useRef)(!1),j=(0,n.useRef)(null),M=(0,n.useRef)(!1),z=(0,n.useRef)(!1),C=(0,n.useRef)(null),_=(0,n.useRef)(0),S=(0,n.useRef)([]),R=(0,n.useRef)([]),L=(0,n.useRef)([]),I=(0,n.useRef)(!0),A=(0,n.useRef)("birdview"),P=(0,n.useRef)(null),E=(0,n.useRef)(null),$=(0,n.useRef)([]),N=(0,n.useRef)(null),T=(0,n.useRef)(null),[B,F]=(0,n.useState)("idle"),[q,V]=(0,n.useState)(null),[O,D]=(0,n.useState)(0),[Z,W]=(0,n.useState)(0),[H,K]=(0,n.useState)(!1),[U,G]=(0,n.useState)([]),[Y,X]=(0,n.useState)([]),[J,Q]=(0,n.useState)([]),[ee,et]=(0,n.useState)(!0),[en,ea]=(0,n.useState)(!1),[er,ei]=(0,n.useState)("birdview"),[es,el]=(0,n.useState)(null),[eo,ec]=(0,n.useState)(!1),[eu,eh]=(0,n.useState)(!1),[ed,em]=(0,n.useState)(null);(0,n.useEffect)(()=>{I.current=ee},[ee]),(0,n.useEffect)(()=>{z.current=H},[H]),(0,n.useEffect)(()=>{M.current=en},[en]),(0,n.useEffect)(()=>{A.current=er,y.current=!0},[er]),(0,n.useEffect)(()=>{k.current=b??o,y.current=!0},[b]),(0,n.useEffect)(()=>{let t=x.current;if(!t)return;let n=!1,r=null;return F("loading"),V(null),K(!1),D(0),W(0),G([]),X([]),Q([]),el(null),P.current=null,S.current=[],R.current=[],L.current=[],v.current=0,N.current=null,$.current=[],E.current=null,ec(!1),eh(!1),em(null),(async()=>{try{let[{Engine:l},{Scene:o},{ArcRotateCamera:h},{UniversalCamera:d},{HemisphericLight:m},{Vector3:b,Color3:x,Color4:T,Matrix:B},{MeshBuilder:q},{StandardMaterial:V},{fetchSessionEvents:O,ReplayPlayer:Z}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(68480),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(85461),e.A(18561)]),H=await O({endpoint:c,apiKey:p,sessionId:f});if(n)return;if(0===H.length)return void F("empty");let U=H[0].ts,Y=H[0].ts;for(let e of H)e.ts<U&&(U=e.ts),e.ts>Y&&(Y=e.ts);let J=new a.CollectorApi(c,p),ee=await (0,i.mergeSceneProxies)(J,{since:U-1,until:Y+1});if(n)return;let et=[...H].sort((e,t)=>e.ts-t.ts),en=et[0].ts,er=[],ei=[],es=new Map,eo=null;for(let e of et){let t=e.ts-en;if("camera_sample"===e.type){eo=[e.position[0],e.position[1],e.position[2]],er.push({at:t,position:eo,direction:[e.direction[0],e.direction[1],e.direction[2]],..."number"==typeof e.fov?{fov:e.fov}:{}});continue}if("node_transform"===e.type){if(e.boneId)continue;let n=e.childPath?`${e.nodeId}/${e.childPath}`:e.nodeId,a=es.get(n);a||(a=[],es.set(n,a)),a.push({at:t,position:[e.position[0],e.position[1],e.position[2]]});continue}if("pointer_click"===e.type&&e.hitPoint){let n=e.ray?.origin??eo;if(!n)continue;ei.push({at:t,type:"pointer_click",origin:[n[0],n[1],n[2]],hit:[e.hitPoint[0],e.hitPoint[1],e.hitPoint[2]],...e.hitMesh?{mesh:e.hitMesh}:{}});continue}if("mesh_interaction"===e.type&&e.point){if(!eo)continue;ei.push({at:t,type:"mesh_interaction",origin:[eo[0],eo[1],eo[2]],hit:[e.point[0],e.point[1],e.point[2]],...e.mesh?{mesh:e.mesh}:{}})}}if(0===er.length&&0===ei.length&&0===es.size)return void F("empty");let ec=new l(t,!0,{preserveDrawingBuffer:!1}),eu=new o(ec);eu.clearColor=new T(.04,.05,.07,1),E.current=eu;let eh=new h("birdview-cam",-Math.PI/2,.22,12,b.Zero(),eu);eh.attachControl(t,!0),(0,s.disableWheelZoom)(eh),w.current=eh,new m("replay-light",new b(0,1,0),eu);let ed=new d("replay-follow-cam",b.Zero(),eu);ed.minZ=.05,ed.fov=Math.PI/3,eu.activeCamera=eh;let em="birdview",ep=q.CreateGround("replay-ground",{width:20,height:20,subdivisions:20},eu),ef=new V("replay-ground-mat",eu);ef.diffuseColor=new x(.12,.14,.18),ef.wireframe=!0,ep.material=ef;let eb=new Set(es.keys()),eg=new Set(Array.from(eb,e=>e.slice(e.lastIndexOf("/")+1))),ex=[],ew=[],ev=new Set,ek=e=>{if(ev.has(e.name)||(e=>{if(e.path){for(let t of eb)if(e.path===t||e.path.endsWith(`/${t}`))return!0}return eg.has(e.name)})(e))return!1;ev.add(e.name);let t=e.aabb,n=Math.max(t[3]-t[0],.001),a=Math.max(t[4]-t[1],.001),r=Math.max(t[5]-t[2],.001),i=q.CreateBox(`replay-proxy-${e.name}`,{width:n,height:a,depth:r},eu);i.position=new b((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2);let s=new V(`replay-proxy-mat-${e.name}`,eu);return s.wireframe=!0,s.disableLighting=!0,s.emissiveColor=new x(.32,.4,.52),s.alpha=.35,i.material=s,i.isPickable=!1,N.current&&i.setEnabled(!1),ew.push(i),ex.push({name:e.name,center:new b((t[0]+t[3])/2,t[4],(t[2]+t[5])/2)}),!0};for(let e of ee)ek(e);S.current=ex,R.current=ex.map(()=>null),X(ex.map(e=>e.name)),$.current=ew;let ey=async()=>{let e=await (0,i.mergeSceneProxies)(J,{since:U-1}).catch(()=>null);if(n||!e)return;let t=!1;for(let n of e)ek(n)&&(t=!0);t&&(S.current=ex,R.current=ex.map((e,t)=>R.current[t]??null),X(ex.map(e=>e.name)),y.current=!0)},ej=[[.91,.47,.98],[.4,.95,.6],[.98,.8,.3],[.45,.85,1]],eM=e=>{let t=e.indexOf("/");return -1===t?e:e.slice(0,t)},ez=[],eC=new Map,e_=0,eS=(e,t,n)=>{let a=q.CreateSphere(`replay-actor-${e}`,{diameter:.5,segments:12},eu),r=new V(`replay-actor-mat-${e}`,eu);r.disableLighting=!0;let i=ej[e_%ej.length];r.emissiveColor=new x(i[0],i[1],i[2]),a.material=r,a.isPickable=!1,a.isVisible=!1,e_++;let s={key:e,mesh:a,samples:n,driveKey:t};return ez.push(s),eC.set(e,s),s},eR=new Map,eL=new Map;for(let[e,t]of es){if(0===t.length)continue;let n=eM(e);if(e===n)eR.set(n,t);else{let a=eL.get(n);(!a||t.length>a.samples.length)&&eL.set(n,{key:e,samples:t})}}for(let e of new Set([...eR.keys(),...eL.keys()])){let t=eR.get(e);if(t)eS(e,e,t);else{let t=eL.get(e);eS(e,t.key,t.samples)}}L.current=ez.map(()=>null),Q(ez.map(e=>e.key));let eI=(e,t)=>{if(0===e.length||t<e[0].at)return null;let n=0,a=e.length-1,r=-1;for(;n<=a;){let i=n+a>>1;e[i].at<=t?(r=i,n=i+1):a=i-1}if(r<0)return null;let i=e[r],s=e[r+1];if(!s)return i.position;let l=s.at-i.at;if(l<=0)return i.position;let o=Math.max(0,Math.min(1,(t-i.at)/l));return[i.position[0]+(s.position[0]-i.position[0])*o,i.position[1]+(s.position[1]-i.position[1])*o,i.position[2]+(s.position[2]-i.position[2])*o]},eA=1,eP=1.4,eE=q.CreateSphere("replay-camera-origin",{diameter:.35,segments:12},eu),e$=new V("replay-camera-origin-mat",eu);e$.disableLighting=!0,e$.emissiveColor=new x(.6,.9,1),eE.material=e$;let eN=q.CreateLines("replay-camera-frustum",{points:[b.Zero(),new b(0,0,1)]},eu);eN.color=new x(.7,.95,1),eN.isPickable=!1;let eT=q.CreateCylinder("replay-camera-cone",{height:1,diameterTop:0,diameterBottom:1,tessellation:24},eu);eT.bakeTransformIntoVertices(B.RotationX(-Math.PI/2).multiply(B.Translation(0,0,.5)));let eB=new V("replay-camera-cone-mat",eu);eB.disableLighting=!0,eB.emissiveColor=new x(.4,.78,1),eB.alpha=.16,eB.backFaceCulling=!1,eT.material=eB,eT.isPickable=!1,eT.isVisible=!1;let eF=(e,t,n,a)=>{if(e?.dispose(),0===n.length)return null;let r=q.CreateLineSystem(t,{lines:n,...a?{colors:a,useVertexAlpha:!0}:{}},eu);return r.isPickable=!1,r},eq=null,eV=null,eO=null,eD=()=>{let e=k.current,t=[],n=[];for(let a of ei){if(e.has(a.type))continue;let[r,i,s]=a.hit,l="mesh_interaction"===a.type?new T(.45,.85,1,.32):new T(1,.7,.35,.32);t.push([new b(r-.1,i,s),new b(r+.1,i,s)]),t.push([new b(r,i-.1,s),new b(r,i+.1,s)]),t.push([new b(r,i,s-.1),new b(r,i,s+.1)]),n.push([l,l],[l,l],[l,l])}eO=eF(eO,"replay-persistent-marks",t,n)};eD();let eZ=q.CreateSphere("replay-glow",{diameter:1,segments:12},eu),eW=new V("replay-glow-mat",eu);eW.disableLighting=!0,eW.emissiveColor=new x(1,.62,.2),eW.alpha=0,eZ.material=eW,eZ.isPickable=!1,eZ.isVisible=!1;let eH=1/0,eK=1/0,eU=1/0,eG=-1/0,eY=-1/0,eX=-1/0,eJ=!1,eQ=e=>{eH=Math.min(eH,e[0]),eK=Math.min(eK,e[1]),eU=Math.min(eU,e[2]),eG=Math.max(eG,e[0]),eY=Math.max(eY,e[1]),eX=Math.max(eX,e[2])},e0=()=>{let e;if(eJ||!Number.isFinite(eH))return;let t=(eH+eG)/2,n=(eK+eY)/2,a=(eU+eX)/2,r=eG-eH,i=eY-eK,s=eX-eU,l=Math.sqrt(r*r+i*i+s*s);eh.setTarget(new b(t,n,a)),e=1.3*l,eh.radius=Number.isFinite(e)?Math.max(8,e):12,eJ=!0};for(let e of er)eQ(e.position);for(let e of ei)eQ(e.origin),eQ(e.hit);for(let e of es.values())for(let t of e)eQ(t.position);for(let e of ee)eQ(e.aabb.slice(0,3)),eQ(e.aabb.slice(3,6));e0();{let e=eG-eH,t=eY-eK,n=eX-eU,a=Number.isFinite(e)?Math.sqrt(e*e+t*t+n*n):0,r=Math.min(Math.max(.035*a,.45),Math.max(.45,.18*a));eA=r/.35,eP=Math.max(.16*a,3.2*r,1.4),eE.scaling.setAll(eA)}let e1=-1,e2=e=>{var a;let r=y.current;if(!r&&e===e1)return;y.current=!1,e1=e,r&&eD();let i=k.current;(a=A.current)!==em&&(em=a,"follow"===a?(eh.detachControl(),eu.activeCamera=ed):(eu.activeCamera=eh,eh.attachControl(t,!0)));let s="follow"===A.current,l=i.has("camera_sample")?null:(e=>{if(0===er.length)return null;let t=0,n=er.length-1,a=-1;for(;t<=n;){let r=t+n>>1;er[r].at<=e?(a=r,t=r+1):n=r-1}return a>=0?er[a]:null})(e);if(l){eE.position.set(l.position[0],l.position[1],l.position[2]);let e=l.direction,t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2])||1,n=eP,a=new b(l.position[0]+e[0]/t*n,l.position[1]+e[1]/t*n,l.position[2]+e[2]/t*n);if(s)eE.isVisible=!1,eN.isVisible=!1,eT.isVisible=!1,ed.position.set(l.position[0],l.position[1],l.position[2]),ed.setTarget(a),l.fov&&l.fov>0&&(ed.fov=l.fov);else{eE.isVisible=!0,eN.isVisible=!0,eN=q.CreateLines("replay-camera-frustum",{points:[eE.position.clone(),a],instance:eN},eu);let e=(l.fov&&l.fov>0?l.fov:Math.PI/3)/2,t=n*Math.tan(e);eT.isVisible=!0,eT.position.copyFrom(eE.position),eT.lookAt(a),eT.scaling.set(2*t,2*t,n)}}else eE.isVisible=!1,eN.isVisible=!1,eT.isVisible=!1;let o=i.has("node_transform");for(let t of ez){let n=o?null:eI(t.samples,e);if(!n){t.mesh.isVisible=!1;continue}t.mesh.isVisible=!0,t.mesh.position.set(n[0],n[1],n[2])}let c=ei.filter(t=>!i.has(t.type)&&t.at<=e&&t.at>=e-2200),u=[],h=[],d=[],m=[],p=null;for(let t of c){let n=e-t.at,a=Math.max(0,Math.min(1,1-n/2200)),r=new T(1,.62,.2,.18+.72*a),i=new b(t.origin[0],t.origin[1],t.origin[2]),s=new b(t.hit[0],t.hit[1],t.hit[2]);u.push([i,s]),h.push([r,r]);let l=.12+.08*a;d.push([new b(s.x-l,s.y,s.z),new b(s.x+l,s.y,s.z)]),d.push([new b(s.x,s.y-l,s.z),new b(s.x,s.y+l,s.z)]),d.push([new b(s.x,s.y,s.z-l),new b(s.x,s.y,s.z+l)]);let o=new T(1,.78,.42,.22+.72*a);if(m.push([o,o],[o,o],[o,o]),n<=900){let e=1-n/900;(!p||e>p.t)&&(p={hit:t.hit,t:e})}}if(p){let e=.25+.9*p.t;eZ.isVisible=!0,eZ.scaling.set(e,e,e),eZ.position.set(p.hit[0],p.hit[1],p.hit[2]),eW.alpha=.12+.5*p.t}else eZ.isVisible=!1;let f=null,g=-1/0;for(let e of c)e.mesh&&e.at>g&&(g=e.at,f=e.mesh);f!==P.current&&(P.current=f,n||el(f)),eq=eF(eq,"replay-trail-lines",u,h),eV=eF(eV,"replay-trail-hits",d,m)},e5=et.length>0?et[et.length-1].ts-en:0,e3=e5,e4=et.length>0?et[et.length-1].ts:-1/0,e6=et.map(e=>({type:e.type,ts:e.ts})),e8=0,e9=null;if(g)j.current=null,C.current=e=>{if(n)return;let t="number"==typeof e.ts?e.ts:NaN;if(!Number.isFinite(t)||t<=e4)return;e4=t;let a=t-en;if(a>e3&&(e3=a),a>e5&&(e5=a),e6.push({type:e.type,ts:t}),"camera_sample"===e.type){let t=e.position,n=e.direction;if(t&&n){let r=[t[0],t[1],t[2]];eo=r;let i="number"==typeof e.fov?e.fov:void 0;er.push({at:a,position:r,direction:[n[0],n[1],n[2]],...void 0!==i?{fov:i}:{}}),eQ(r),e0()}}else if("pointer_click"===e.type){let t=e.hitPoint,n=e.ray,r=n?.origin??eo;if(t&&r){let n="string"==typeof e.hitMesh?e.hitMesh:void 0;ei.push({at:a,type:"pointer_click",origin:[r[0],r[1],r[2]],hit:[t[0],t[1],t[2]],...n?{mesh:n}:{}}),eQ(t),y.current=!0}}else if("mesh_interaction"===e.type){let t=e.point;if(t&&eo){let n="string"==typeof e.mesh?e.mesh:void 0;ei.push({at:a,type:"mesh_interaction",origin:[eo[0],eo[1],eo[2]],hit:[t[0],t[1],t[2]],...n?{mesh:n}:{}}),eQ(t),y.current=!0}}else if("node_transform"===e.type){let t=e.position;if(e.boneId||"string"!=typeof e.nodeId||!t)return;let n="string"==typeof e.childPath?e.childPath:void 0,r=n?`${e.nodeId}/${n}`:e.nodeId;((e,t)=>{let n=eM(e),a=eC.get(n);if(!a){a=eS(n,e,[]);let t=L.current;L.current=ez.map((e,n)=>t[n]??null),Q(ez.map(e=>e.key))}e===a.driveKey?a.samples.push(t):e===n&&a.driveKey!==n&&(a.driveKey=n,a.samples.length=0,a.samples.push(t))})(r,{at:a,position:[t[0],t[1],t[2]]}),eQ(t)}let r=performance.now();r-e8>250&&(e8=r,G(u(e6,en,Math.max(1,e5)))),M.current&&a>v.current&&(v.current=a)},_.current=e5,v.current=e5,M.current=!0,ea(!0),K(!1),D(e5),W(e5),G(u(e6,en,Math.max(1,e5))),e2(e5),e9=setInterval(()=>void ey(),4e3);else{let e=new Z(H,{reset(){},apply(){}},{onProgress:e=>{n||(v.current=e,W(e))},onComplete:()=>{n||K(!1)}});j.current=e,D(e.durationMs),G(u(et,en,e.durationMs)),e.update(0),e2(0)}let e7=B.Identity(),te=new Map,tt=e=>{let t=te.get(e);if(t)return t;let n={w:e.offsetWidth||60,h:e.offsetHeight||16};return e.offsetWidth>0&&te.set(e,n),n},tn=performance.now(),ta=0;ec.runRenderLoop(()=>{if(g){let e=performance.now(),t=e-tn;if(tn=e,M.current)v.current+=t,v.current>e5&&(e5=v.current),_.current=e5,W(v.current),e-ta>250&&(ta=e,D(e5));else if(z.current){let e=v.current+t;e>=e5&&(e=e5),v.current=e,W(e)}}e2(v.current),eu.render(),(()=>{if(!I.current)return;let e=t.clientWidth||ec.getRenderWidth(),n=t.clientHeight||ec.getRenderHeight(),a=eh.viewport.toGlobal(e,n),r=eu.getTransformMatrix(),i=P.current,s=e=>e.slice(e.lastIndexOf("/")+1),l=e=>!!i&&(i===e||s(i)===s(e)||e.endsWith(`/${i}`)||i.endsWith(`/${e}`)),o=[],c=S.current,u=R.current;for(let e=0;e<c.length;e++){let t=u[e];if(!t)continue;let n=b.Project(c[e].center,e7,r,a);if(n.z<0||n.z>1){t.style.opacity="0";continue}o.push({el:t,x:n.x,y:n.y,liftPct:140,highlighted:l(c[e].name)})}let h=L.current;for(let e=0;e<ez.length;e++){let t=h[e];if(!t)continue;let n=ez[e].mesh;if(!n.isVisible){t.style.opacity="0";continue}let i=b.Project(n.position,e7,r,a);if(i.z<0||i.z>1){t.style.opacity="0";continue}o.push({el:t,x:i.x,y:i.y,liftPct:180,highlighted:l(ez[e].key)})}o.sort((e,t)=>e.highlighted!==t.highlighted?e.highlighted?-1:1:e.y-t.y||e.x-t.x);let d=[];for(let e of o){let{w:t,h:n}=tt(e.el),a=e.x-t/2,r=e.x+t/2,i=e.y-e.liftPct/100*n,s=i,l=!0,o=0;for(;l&&o++<256;)for(let e of(l=!1,d))a<e.right&&r>e.left&&s<e.bottom&&s+n>e.top&&(s=e.bottom+1,l=!0);d.push({left:a,right:r,top:s,bottom:s+n});let c=s-i;e.el.style.opacity="1",e.el.style.zIndex=e.highlighted?"10":"",e.el.style.transform=`translate(${e.x}px, ${e.y+c}px) translate(-50%, -${e.liftPct}%)`}})()});let tr=()=>ec.resize();window.addEventListener("resize",tr),F("ready"),r=()=>{window.removeEventListener("resize",tr),e9&&clearInterval(e9),C.current=null,j.current?.pause(),eN.dispose(),eT.dispose(),eq?.dispose(),eV?.dispose(),eO?.dispose(),eZ.dispose(),N.current?.dispose(),N.current=null,$.current=[],E.current=null,eu.dispose(),ec.dispose(),w.current=null,j.current=null}}catch(e){if(n)return;F("error"),V(e instanceof Error?e.message:"Failed to load replay.")}})(),()=>{n=!0,r?.()}},[c,p,f,g]);let ep=(0,n.useCallback)(()=>{if(g){ea(!1),M.current=!1,K(e=>{let t=!e;return z.current=t,t});return}let e=j.current;e&&K(t=>(t?e.pause():e.play(),!t))},[g]),ef=(0,n.useCallback)(e=>{if(g){ea(!1),M.current=!1,K(!1),z.current=!1,v.current=e,W(e);return}let t=j.current;t&&(t.pause(),t.seek(e),K(!1),v.current=e,W(e))},[g]),eb=(0,n.useCallback)(()=>{ea(!0),M.current=!0,K(!1),z.current=!1,v.current=_.current,W(_.current)},[]),{gated:eg}=function(e,t,i,s,l,o){let[c,u]=(0,n.useState)("idle"),[h,d]=(0,n.useState)(!1),[m,p]=(0,n.useState)(0),f=(0,n.useRef)(l),b=(0,n.useRef)(o);return f.current=l,b.current=o,(0,n.useEffect)(()=>{if(!s||!t||!e||!i)return void u("idle");let n=new a.CollectorApi(e,t),l=!1,o=0,c=null,h=null;d(!1),p(0);let m=()=>{if(l)return;u("reconnecting");let e=Math.min(1e3*2**o,15e3);o+=1,h=setTimeout(()=>void g(),e)},g=async()=>{let e;if(!l){u(0===o?"connecting":"reconnecting"),b.current(),p(0);try{({token:e}=await n.liveToken())}catch{m();return}if(!l){c=new AbortController;try{let t=await fetch(n.liveSessionUrl(e,i),{headers:{accept:"text/event-stream"},cache:"no-store",signal:c.signal});if(403===t.status){d(!0),u("idle");return}if(!t.ok||!t.body)return void m();o=0,u("open"),await r(t.body,c.signal,e=>{try{f.current(JSON.parse(e)),p(e=>e+1)}catch{}}),l||m()}catch{l||m()}}}};return g(),()=>{l=!0,h&&clearTimeout(h),c?.abort()}},[e,t,i,s]),{status:c,gated:h,count:m}}(c,p,f,g&&"ready"===B,e=>C.current?.(e),()=>{}),ex=(0,n.useCallback)(e=>{if(!es)return!1;if(es===e)return!0;let t=e=>e.slice(e.lastIndexOf("/")+1);return t(es)===t(e)||e.endsWith(`/${es}`)||es.endsWith(`/${e}`)},[es]),ew=(0,n.useCallback)(async t=>{let n=E.current;if(n){eh(!0),em(`Loading ${t.name}…`);try{let[{loadSceneBackdrop:a}]=await Promise.all([e.A(3633),e.A(91064)]);if(E.current!==n)return;N.current?.dispose();let r=await a(n,t);if(E.current!==n)return void r.dispose();for(let e of(N.current=r,$.current))e.setEnabled(!1);y.current=!0,ec(!0),em(`Loaded ${t.name} (${r.meshes.length} meshes).`)}catch(e){em(e instanceof Error?e.message:"Could not load model.")}finally{eh(!1)}}},[]),ev=(0,n.useCallback)(e=>{let t=e.target.files?.[0];e.target.value="",t&&ew(t)},[ew]),ek=(0,n.useCallback)(()=>{for(let e of(N.current?.dispose(),N.current=null,$.current))e.setEnabled(!0);y.current=!0,ec(!1),em(null)},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)("canvas",{ref:x,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),(0,t.jsxs)("div",{className:`pointer-events-none absolute inset-0 overflow-hidden ${ee?"":"hidden"}`,children:[Y.map((e,n)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(R.current[n]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${ex(e)?"bg-amber/30 text-white ring-2 ring-amber shadow-lg shadow-amber/30":"bg-ink/80 text-saffron ring-1 ring-amber/30"}`,children:d(e)},e)),J.map((e,n)=>(0,t.jsx)("div",{title:e,ref:e=>{e&&(L.current[n]=e)},className:`absolute left-0 top-0 whitespace-nowrap rounded px-1.5 py-0.5 text-[10px] font-medium opacity-0 transition-colors ${ex(e)?"bg-fuchsia-400/30 text-white ring-2 ring-fuchsia-300 shadow-lg shadow-fuchsia-500/30":"bg-ink/80 text-fuchsia-300 ring-1 ring-fuchsia-400/30"}`,children:d(e)},`actor-${e}`))]}),"ready"===B&&(Y.length>0||J.length>0)?(0,t.jsx)("button",{type:"button",onClick:()=>et(e=>!e),className:"absolute left-3 top-3 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs font-medium text-fg transition hover:bg-ink hover:text-white","aria-pressed":ee?"true":"false",children:ee?"Hide labels":"Show labels"}):null,"ready"===B&&"birdview"===er?(0,t.jsx)(l.ZoomButtons,{onZoom:e=>w.current&&(0,s.stepZoom)(w.current,e)}):null,"ready"!==B?(0,t.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===B?"Loading replay…":"empty"===B?"No replayable events (raw retention may be disabled).":"error"===B?q??"Replay unavailable.":null}):null]}),(0,t.jsxs)("div",{className:"mt-3 flex items-center gap-3",children:[(0,t.jsx)("button",{type:"button",onClick:ep,disabled:"ready"!==B,className:"rounded-md bg-amber px-3 py-1.5 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-40",children:H?"Pause":"Play"}),g?(0,t.jsxs)("button",{type:"button",onClick:eb,disabled:"ready"!==B,"aria-pressed":en?"true":"false",className:`flex items-center gap-1.5 rounded-md px-2.5 py-1.5 text-sm font-medium transition disabled:opacity-40 ${en?"bg-rose-500/20 text-rose-300 ring-1 ring-rose-400/40":"border border-edge text-fg hover:bg-ink hover:text-white"}`,children:[(0,t.jsx)("span",{className:`inline-block h-2 w-2 rounded-full ${en?"animate-pulse bg-rose-400":"bg-fg-muted"}`}),en?"LIVE":"Resume live"]}):null,(0,t.jsxs)("div",{role:"group","aria-label":"Camera view",className:"flex items-center rounded-md border border-edge p-0.5 text-xs font-medium",children:[(0,t.jsx)("button",{type:"button",onClick:()=>ei("birdview"),disabled:"ready"!==B,"aria-pressed":"birdview"===er?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"birdview"===er?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Birdview"}),(0,t.jsx)("button",{type:"button",onClick:()=>ei("follow"),disabled:"ready"!==B,"aria-pressed":"follow"===er?"true":"false",className:`rounded px-2 py-1 transition disabled:opacity-40 ${"follow"===er?"bg-amber text-ink":"text-fg hover:text-white"}`,children:"Follow camera"})]}),(0,t.jsx)("span",{className:"w-12 text-right font-mono text-xs tabular-nums text-fg-muted",children:h(Z)}),(0,t.jsx)("input",{type:"range",min:0,max:Math.max(1,O),step:50,value:Math.min(Z,O),onChange:e=>ef(Number(e.target.value)),disabled:"ready"!==B,className:"flex-1 accent-amber"}),(0,t.jsx)("span",{className:"w-12 font-mono text-xs tabular-nums text-fg-muted",children:h(O)})]}),"ready"===B?(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap items-center gap-3",children:[(0,t.jsx)("input",{ref:T,type:"file",accept:".glb,.gltf,model/gltf-binary,model/gltf+json",onChange:ev,className:"hidden"}),(0,t.jsx)("button",{type:"button",onClick:()=>T.current?.click(),disabled:eu,className:"rounded-md border border-edge bg-ink/80 px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:eu?"Loading model…":eo?"Replace model (.glb)":"Load model (.glb)"}),eo?(0,t.jsx)("button",{type:"button",onClick:ek,disabled:eu,className:"rounded-md border border-edge px-2.5 py-1.5 text-xs font-medium text-fg transition hover:bg-ink hover:text-white disabled:opacity-40",children:"Remove model"}):null,ed?(0,t.jsx)("span",{className:"text-xs text-fg-muted",role:"status",children:ed}):(0,t.jsx)("span",{className:"text-xs text-fg-muted",children:"Load a glTF model to replace the wireframe boxes with your real scene."})]}):null,"ready"===B?(0,t.jsx)(m,{lanes:U,duration:O,progress:Z,onSeek:ef,hiddenTypes:b??o}):null,g&&eg&&"ready"===B?(0,t.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Live follow is unavailable — raw session retention is disabled on the collector."}):null]})}],76421)},64434,e=>{"use strict";e.s([],4255),e.i(4255);var t=e.i(48939),n=e.i(53993),a=e.i(19399),r=e.i(39592),i=e.i(28100),s=e.i(11623),l=e.i(56054),o=e.i(2348),c=e.i(25476),u=e.i(18637),h=e.i(2413);let d="__all__";function m(e){return`${e[0]},${e[1]},${e[2]}`}function p({label:e,value:t,onChange:n,allLabel:a,options:r}){return(0,i.jsxs)("label",{className:"flex items-center gap-1.5 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg backdrop-blur",children:[(0,i.jsx)("span",{className:"font-medium text-fg-muted",children:e}),(0,i.jsxs)("select",{className:"max-w-[12rem] bg-transparent text-white outline-none",value:t,onChange:e=>n(e.target.value),children:[(0,i.jsx)("option",{value:d,children:a}),r.map(e=>(0,i.jsx)("option",{value:e.value,children:e.label},e.value))]})]})}var f=e.i(76421),b=e.i(37215);e.s(["CAMERA_DOME_SUBTITLE",()=>b.CAMERA_DOME_SUBTITLE,"CAMERA_DOME_TITLE",()=>b.CAMERA_DOME_TITLE,"CLICK_RAYS_SUBTITLE",()=>b.CLICK_RAYS_SUBTITLE,"CLICK_RAYS_TITLE",()=>b.CLICK_RAYS_TITLE,"CameraDome3DView",()=>t.CameraDome3DView,"ClickRays3DView",0,function({rays:t,cellSize:n,proxyMeshes:a=[]}){let r=(0,s.useRef)(null),f=(0,s.useRef)(null),b=(0,s.useRef)(null),[g,x]=(0,s.useState)("loading"),[w,v]=(0,s.useState)(null),[k,y]=(0,s.useState)(d),[j,M]=(0,s.useState)(d),[z,C]=(0,s.useState)(null),_=(0,s.useRef)(t),S=(0,s.useRef)(a),R=(0,s.useRef)(k),L=(0,s.useRef)(j);_.current=t,S.current=a,R.current=k,L.current=j;let I=(0,s.useRef)(null),A=t.length>0,P=(0,s.useMemo)(()=>{let e=new Map;for(let n of t){let t=m(n.camVoxel),a=e.get(t);a?a.count+=n.count:e.set(t,{key:t,voxel:n.camVoxel,count:n.count})}return[...e.values()].sort((e,t)=>t.count-e.count)},[t]),E=(0,s.useMemo)(()=>{let e=new Map;for(let n of t)""!==n.mesh&&e.set(n.mesh,(e.get(n.mesh)??0)+n.count);return[...e.entries()].map(([e,t])=>({name:e,count:t})).sort((e,t)=>t.count-e.count)},[t]);return(0,s.useEffect)(()=>{k!==d&&(P.some(e=>e.key===k)||y(d))},[k,P]),(0,s.useEffect)(()=>{j!==d&&(E.some(e=>e.name===j)||M(d))},[j,E]),(0,s.useEffect)(()=>{let t=r.current;if(!t)return;if(!A)return void x("empty");let a=!1,i=null;return x("loading"),v(null),(async()=>{try{let[{Engine:r},{Scene:s},{ArcRotateCamera:u},{HemisphericLight:h},{Vector3:p,Color3:g,Color4:w,Matrix:v},{MeshBuilder:k},{StandardMaterial:y}]=await Promise.all([e.A(3905),e.A(94432),e.A(59694),e.A(88004),e.A(27940),e.A(27124),e.A(14074),e.A(35983),e.A(18561)]);if(a)return;let j=_.current,M=0,z=0,A=0,P=0,E=(e,t,n)=>{M+=e,z+=t,A+=n,P++};for(let e of j)E(e.origin[0],e.origin[1],e.origin[2]),E(e.hit[0],e.hit[1],e.hit[2]);let $=P>0?new p(M/P,z/P,A/P):p.Zero(),N=4*n;for(let e of j)for(let t of[e.origin,e.hit]){let e=t[0]-$.x,n=t[1]-$.y,a=t[2]-$.z;N=Math.max(N,Math.sqrt(e*e+n*n+a*a))}let T=new r(t,!0,{preserveDrawingBuffer:!1}),B=new s(T);B.clearColor=new w(.04,.05,.07,1);let F=new u("rays-cam",Math.PI/4,Math.PI/3,2.4*N,$,B);F.attachControl(t,!0),(0,o.disableWheelZoom)(F),f.current=F,b.current={target:$,alpha:F.alpha,beta:F.beta,radius:F.radius},new h("rays-light",new p(.4,1,.3),B);let q=null,V="\0",O=[],D=Math.max(3*n,.18*N),Z=()=>{for(let e of((()=>{let e=S.current,t=e.map(e=>`${e.name}:${e.aabb.join(",")}`).join("|");if(t===V||(V=t,q&&(q.dispose(!1,!0),q=null),0===e.length))return;q=k.CreateBox("scene-proxy",{size:1},B);let n=new y("scene-proxy-mat",B);n.wireframe=!0,n.disableLighting=!0,n.emissiveColor=new g(.32,.4,.52),n.alpha=.35,q.material=n,q.isPickable=!0,q.thinInstanceEnablePicking=!0,q.metadata={hoverLabels:e.map(e=>e.name)};let a=e.length,r=new Float32Array(16*a);for(let t=0;t<a;t++){let n=e[t].aabb,a=Math.max(n[3]-n[0],.001),i=Math.max(n[4]-n[1],.001),s=Math.max(n[5]-n[2],.001);v.Scaling(a,i,s).multiply(v.Translation((n[0]+n[3])/2,(n[1]+n[4])/2,(n[2]+n[5])/2)).copyToArray(r,16*t)}q.thinInstanceSetBuffer("matrix",r,16,!0)})(),O))e.dispose(!1,!0);O=[];let e=_.current,t=S.current,a=R.current,r=L.current,i=a===d?e:e.filter(e=>m(e.camVoxel)===a),s=i.reduce((e,t)=>Math.max(e,t.count),1),o=[],c=[];for(let e of i){let t=e.count/s,[n,a,r]=(0,l.heatRgb)(t),i=new w(n,a,r,.35+.65*t);o.push([new p(e.origin[0],e.origin[1],e.origin[2]),new p(e.hit[0],e.hit[1],e.hit[2])]),c.push([i,i])}if(o.length>0){let e=k.CreateLineSystem("click-rays",{lines:o,colors:c,useVertexAlpha:!0},B);e.isPickable=!1,O.push(e)}let u=new Map;for(let e of i)u.set(m(e.camVoxel),e.camVoxel);if(u.size>0){let e=k.CreateSphere("rays-eye",{diameter:.6*n,segments:6},B),t=new y("rays-eye-mat",B);t.disableLighting=!0,t.emissiveColor=new g(.9,.95,1),e.material=t;let a=[...u.values()],r=new Float32Array(16*a.length);for(let e=0;e<a.length;e++){let t=a[e];v.Translation((t[0]+.5)*n,(t[1]+.5)*n,(t[2]+.5)*n).copyToArray(r,16*e)}e.thinInstanceSetBuffer("matrix",r,16,!0),O.push(e)}if(r!==d){let a=e.filter(e=>e.mesh===r);if(a.length>0){let e,i=t.find(e=>e.name===r);if(i){let t=i.aabb;e=new p((t[0]+t[3])/2,(t[1]+t[4])/2,(t[2]+t[5])/2)}else{let t=0,n=0,r=0;for(let e of a)t+=e.hit[0],n+=e.hit[1],r+=e.hit[2];e=new p(t/a.length,n/a.length,r/a.length)}let s=a.reduce((e,t)=>Math.max(e,t.count),1),o=[],c=[];for(let t of a){let n=t.origin[0]-t.hit[0],a=t.origin[1]-t.hit[1],r=t.origin[2]-t.hit[2],i=Math.sqrt(n*n+a*a+r*r)||1,u=t.count/s,h=D*(.4+.6*u),d=new p(e.x+n/i*h,e.y+a/i*h,e.z+r/i*h),[m,f,b]=(0,l.heatRgb)(u),g=new w(m,f,b,1);o.push([e.clone(),d]),c.push([new w(m,f,b,.25),g])}if(o.length>0){let e=k.CreateLineSystem("mesh-rose",{lines:o,colors:c,useVertexAlpha:!0},B);e.isPickable=!1,O.push(e)}let u=k.CreateSphere("mesh-rose-hub",{diameter:.8*n,segments:8},B),h=new y("mesh-rose-hub-mat",B);h.disableLighting=!0,h.emissiveColor=new g(1,.85,.4),u.material=h,u.position=e,u.isPickable=!0,u.metadata={hoverLabel:r},O.push(u)}}};I.current=Z,Z(),T.runRenderLoop(()=>B.render());let W=()=>T.resize();window.addEventListener("resize",W);let H=(0,c.attachMeshHover)(B,t,C),K=(0,o.attachDoubleClickFocus)(B,t,F);x("ready"),i=()=>{window.removeEventListener("resize",W),H(),K(),C(null),I.current=null,f.current=null,b.current=null,B.dispose(),T.dispose()}}catch(e){if(a)return;x("error"),v(e instanceof Error?e.message:"Failed to render click rays.")}})(),()=>{a=!0,i?.()}},[A,n]),(0,s.useEffect)(()=>{I.current?.()},[t,a,n,k,j]),(0,i.jsxs)("div",{className:"relative",children:[(0,i.jsx)("canvas",{ref:r,className:"aspect-video w-full rounded-lg border border-edge bg-ink"}),z?(0,i.jsx)("div",{className:"pointer-events-none absolute z-10 max-w-[16rem] truncate rounded border border-edge bg-ink/90 px-1.5 py-0.5 text-xs text-white shadow backdrop-blur",style:{left:z.x+12,top:z.y+12},children:z.label}):null,"ready"===g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"absolute left-3 top-3 flex gap-2",children:[(0,i.jsx)(p,{label:"Viewpoint",value:k,onChange:y,allLabel:"All viewpoints",options:P.map(e=>({value:e.key,label:`(${e.voxel.join(", ")}) \xb7 ${e.count}`}))}),(0,i.jsx)(p,{label:"Mesh rose",value:j,onChange:M,allLabel:"No mesh focus",options:E.map(e=>({value:e.name,label:`${e.name} \xb7 ${e.count}`}))})]}),(0,i.jsx)(h.ZoomButtons,{onZoom:e=>f.current&&(0,o.stepZoom)(f.current,e),onReset:()=>f.current&&b.current&&(0,o.resetFocus)(f.current,b.current)}),(0,i.jsx)(u.HeatLegend,{title:"Click volume",lowLabel:"few clicks",highLabel:"most clicks",note:"Lines run from the camera position (bright eye) to where the click landed. Pick a viewpoint to see only clicks made from there; pick a mesh to see which directions its clicks came from."})]}):(0,i.jsx)("div",{className:"pointer-events-none absolute inset-0 grid place-items-center text-sm text-fg-muted",children:"loading"===g?"Rendering…":"empty"===g?"No correlated clicks in range.":"error"===g?w??"Click rays unavailable.":null})]})},"ERROR_HEATMAP_SUBTITLE",()=>b.ERROR_HEATMAP_SUBTITLE,"ERROR_HEATMAP_TITLE",()=>b.ERROR_HEATMAP_TITLE,"FLOW_SANKEY_HELP",()=>b.FLOW_SANKEY_HELP,"FLOW_SANKEY_SUBTITLE",()=>b.FLOW_SANKEY_SUBTITLE,"FLOW_SANKEY_TITLE",()=>b.FLOW_SANKEY_TITLE,"FlowSankey3DView",()=>a.FlowSankey3DView,"GAZE_CLICK_SUBTITLE",()=>b.GAZE_CLICK_SUBTITLE,"GAZE_CLICK_TITLE",()=>b.GAZE_CLICK_TITLE,"GazeClickDivergence3DView",()=>r.GazeClickDivergence3DView,"SESSION_REPLAY_TITLE",()=>b.SESSION_REPLAY_TITLE,"SessionReplayView",()=>f.SessionReplayView,"WORLD_HEATMAP_SUBTITLE",()=>b.WORLD_HEATMAP_SUBTITLE,"WORLD_HEATMAP_TITLE",()=>b.WORLD_HEATMAP_TITLE,"WorldHeatmap3DView",()=>n.WorldHeatmap3DView,"sessionReplaySubtitle",()=>b.sessionReplaySubtitle,"sessionReplayTitle",()=>b.sessionReplayTitle],64434)},94452,e=>{e.n(e.i(64434))},3905,e=>{e.v(t=>Promise.all(["static/chunks/3pdpaqzwhhijn.js","static/chunks/08bm3ye5govev.js","static/chunks/0g6u34xkzrpjn.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2gh4z57fem0_v.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0g7p8zp2kxve5.js"].map(t=>e.l(t))).then(()=>t(66232)))},94432,e=>{e.v(t=>Promise.all(["static/chunks/2kje_jvmwsvwo.js","static/chunks/1j--a56ji33_x.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vpcaaf-0dn7q.js"].map(t=>e.l(t))).then(()=>t(92494)))},59694,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/245h82k-g1nxr.js","static/chunks/3ovd8o_usay7j.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/2wdk-kbm-n-m5.js"].map(t=>e.l(t))).then(()=>t(67186)))},88004,e=>{e.v(t=>Promise.all(["static/chunks/2p8dbh81chhon.js","static/chunks/1oara6fkfvgs3.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(15768)))},27940,e=>{e.v(t=>Promise.all(["static/chunks/0w0sx062qmcsh.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(23235)))},27124,e=>{e.v(t=>Promise.all(["static/chunks/1par9m038tiov.js","static/chunks/1j--a56ji33_x.js","static/chunks/2j-sax2xfdv7l.js","static/chunks/3rx1jhuop94-l.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/0gwa154w_0wuh.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/2wdk-kbm-n-m5.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2npk7tr63h7rl.js","static/chunks/10w513bgw-bgi.js"].map(t=>e.l(t))).then(()=>t(70928)))},14074,e=>{e.v(t=>Promise.all(["static/chunks/0n0thxa3jkour.js","static/chunks/1tdg_eolxlcdl.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/0vddljjnmozzx.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js","static/chunks/0f_nv15a8q415.js","static/chunks/3g_h_00xs9u59.js","static/chunks/2npk7tr63h7rl.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(87566)))},2213,e=>{e.v(t=>Promise.all(["static/chunks/3wqs57qehored.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/0f_nv15a8q415.js","static/chunks/2wdk-kbm-n-m5.js","static/chunks/3vaho-xrtuchd.js","static/chunks/25ctnyh7njp-d.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(95758)))},15002,e=>{e.v(t=>Promise.all(["static/chunks/34gp3hvr3j6um.js","static/chunks/0x6i6e6863tir.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/3vaho-xrtuchd.js","static/chunks/2gh4z57fem0_v.js","static/chunks/25ctnyh7njp-d.js","static/chunks/28ycc-1519hl2.js"].map(t=>e.l(t))).then(()=>t(95729)))},35983,e=>{e.v(t=>Promise.all(["static/chunks/4227p7752rnny.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/2npk7tr63h7rl.js","static/chunks/1vkww9l6lgqag.js","static/chunks/25ctnyh7njp-d.js","static/chunks/0f_nv15a8q415.js","static/chunks/3vaho-xrtuchd.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/2wdk-kbm-n-m5.js","static/chunks/3pdpaqzwhhijn.js"].map(t=>e.l(t))).then(()=>t(50608)))},18561,e=>{e.v(t=>Promise.all(["static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2npk7tr63h7rl.js","static/chunks/117ys3lltfmcu.js","static/chunks/25ctnyh7njp-d.js","static/chunks/1vzmzrjhlm1q5.js","static/chunks/3g_h_00xs9u59.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/3vaho-xrtuchd.js"].map(t=>e.l(t))).then(()=>t(85106)))},68480,e=>{e.v(t=>Promise.all(["static/chunks/1--kelnig7pxx.js","static/chunks/1j--a56ji33_x.js","static/chunks/1vkww9l6lgqag.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2vaoftqgc44cg.js","static/chunks/3vaho-xrtuchd.js","static/chunks/3rl45k759wfi1.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(25062)))},85461,e=>{e.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>e.l(t))).then(()=>t(57092)))},3633,e=>{e.v(t=>Promise.all(["static/chunks/2l_oqx9idxcs8.js","static/chunks/25ctnyh7njp-d.js"].map(t=>e.l(t))).then(()=>t(97900)))},91064,e=>{e.v(t=>Promise.all(["static/chunks/17v12p4sfraa0.js","static/chunks/1j--a56ji33_x.js","static/chunks/3rx1jhuop94-l.js","static/chunks/0oap0o8a8a_cl.js","static/chunks/17dmbt396_tyq.js","static/chunks/0vddljjnmozzx.js","static/chunks/17d1isrw8gtnb.js","static/chunks/0gwa154w_0wuh.js","static/chunks/3g4e2txsrb2p2.js","static/chunks/3urd7r018nel4.js","static/chunks/2zljunurdji0q.js","static/chunks/3pdpaqzwhhijn.js","static/chunks/2h1uw3cluvmmo.js","static/chunks/3vaho-xrtuchd.js","static/chunks/2npk7tr63h7rl.js","static/chunks/3g_h_00xs9u59.js","static/chunks/0f_nv15a8q415.js","static/chunks/1vpcaaf-0dn7q.js","static/chunks/40acif2eh_unv.js","static/chunks/3r2hbpm4wju16.js","static/chunks/25ctnyh7njp-d.js","static/chunks/2wdk-kbm-n-m5.js","static/chunks/3rl45k759wfi1.js","static/chunks/1st81sc3owvku.js"].map(t=>e.l(t))).then(()=>t(83572)))}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,95180,e=>{"use strict";class t{constructor(e,t){this.width=e,this.height=t}toString(){return`{W: ${this.width}, H: ${this.height}}`}getClassName(){return"Size"}getHashCode(){let e=0|this.width;return 397*e^this.height}copyFrom(e){this.width=e.width,this.height=e.height}copyFromFloats(e,t){return this.width=e,this.height=t,this}set(e,t){return this.copyFromFloats(e,t)}multiplyByFloats(e,i){return new t(this.width*e,this.height*i)}clone(){return new t(this.width,this.height)}equals(e){return!!e&&this.width===e.width&&this.height===e.height}get surface(){return this.width*this.height}static Zero(){return new t(0,0)}add(e){return new t(this.width+e.width,this.height+e.height)}subtract(e){return new t(this.width-e.width,this.height-e.height)}scale(e){return new t(this.width*e,this.height*e)}static Lerp(e,i,r){return new t(e.width+(i.width-e.width)*r,e.height+(i.height-e.height)*r)}}e.s(["Size",0,t])},68061,e=>{"use strict";var t,i=e.i(16147),r=e.i(40220),s=e.i(57554),a=e.i(10534),n=e.i(47867),h=e.i(53477),o=e.i(95180);class l{get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get coordinatesMode(){return 0}get isCube(){return!!this._texture&&this._texture.isCube}set isCube(e){this._texture&&(this._texture.isCube=e)}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}getClassName(){return"ThinTexture"}static _IsRenderTargetWrapper(e){return e?.shareDepth!==void 0}constructor(e){this._wrapU=1,this._wrapV=1,this.wrapR=1,this.anisotropicFilteringLevel=4,this.delayLoadState=0,this._texture=null,this._engine=null,this._cachedSize=o.Size.Zero(),this._cachedBaseSize=o.Size.Zero(),this._initialSamplingMode=2,this._texture=l._IsRenderTargetWrapper(e)?e.texture:e,this._texture&&(this._engine=this._texture.getEngine(),this.wrapU=this._texture._cachedWrapU??this.wrapU,this.wrapV=this._texture._cachedWrapV??this.wrapV,this.wrapR=this._texture._cachedWrapR??this.wrapR)}isReady(){return 4===this.delayLoadState?(this.delayLoad(),!1):!!this._texture&&this._texture.isReady}delayLoad(){}getInternalTexture(){return this._texture}getSize(){if(this._texture){if(this._texture.width)return this._cachedSize.width=this._texture.width,this._cachedSize.height=this._texture.height,this._cachedSize;this._texture._size&&(this._cachedSize.width=this._texture._size,this._cachedSize.height=this._texture._size)}return this._cachedSize}getBaseSize(){return this.isReady()&&this._texture?this._texture._size?(this._cachedBaseSize.width=this._texture._size,this._cachedBaseSize.height=this._texture._size):(this._cachedBaseSize.width=this._texture.baseWidth,this._cachedBaseSize.height=this._texture.baseHeight):(this._cachedBaseSize.width=0,this._cachedBaseSize.height=0),this._cachedBaseSize}get samplingMode(){return this._texture?this._texture.samplingMode:this._initialSamplingMode}updateSamplingMode(e,t=!1){this._texture&&this._engine&&this._engine.updateTextureSamplingMode(e,this._texture,this._texture.generateMipMaps&&t)}releaseInternalTexture(){this._texture&&(this._texture.dispose(),this._texture=null)}dispose(){this._texture&&(this.releaseInternalTexture(),this._engine=null)}}var u=e.i(95397),_=e.i(54670);class c extends l{set hasAlpha(e){this._hasAlpha!==e&&(this._hasAlpha=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get hasAlpha(){return this._hasAlpha}set getAlphaFromRGB(e){this._getAlphaFromRGB!==e&&(this._getAlphaFromRGB=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get getAlphaFromRGB(){return this._getAlphaFromRGB}set coordinatesIndex(e){this._coordinatesIndex!==e&&(this._coordinatesIndex=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesIndex(){return this._coordinatesIndex}set coordinatesMode(e){this._coordinatesMode!==e&&(this._coordinatesMode=e,this._scene&&this._scene.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get coordinatesMode(){return this._coordinatesMode}get wrapU(){return this._wrapU}set wrapU(e){this._wrapU=e}get wrapV(){return this._wrapV}set wrapV(e){this._wrapV=e}get isCube(){return this._texture?this._texture.isCube:this._isCube}set isCube(e){this._texture?this._texture.isCube=e:this._isCube=e}get is3D(){return!!this._texture&&this._texture.is3D}set is3D(e){this._texture&&(this._texture.is3D=e)}get is2DArray(){return!!this._texture&&this._texture.is2DArray}set is2DArray(e){this._texture&&(this._texture.is2DArray=e)}get gammaSpace(){return this._texture?(null===this._texture._gammaSpace&&(this._texture._gammaSpace=this._gammaSpace),this._texture._gammaSpace&&!this._texture._useSRGBBuffer):this._gammaSpace}set gammaSpace(e){if(this._texture){if(this._texture._gammaSpace===e)return;this._texture._gammaSpace=e}else{if(this._gammaSpace===e)return;this._gammaSpace=e}this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this))}get isRGBD(){return null!=this._texture&&this._texture._isRGBD}set isRGBD(e){e!==this.isRGBD&&(this._texture&&(this._texture._isRGBD=e),this.getScene()?.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)))}get noMipmap(){return!1}get lodGenerationOffset(){return this._texture?this._texture._lodGenerationOffset:0}set lodGenerationOffset(e){this._texture&&(this._texture._lodGenerationOffset=e)}get lodGenerationScale(){return this._texture?this._texture._lodGenerationScale:0}set lodGenerationScale(e){this._texture&&(this._texture._lodGenerationScale=e)}get linearSpecularLOD(){return!!this._texture&&this._texture._linearSpecularLOD}set linearSpecularLOD(e){this._texture&&(this._texture._linearSpecularLOD=e)}get irradianceTexture(){return this._texture?this._texture._irradianceTexture:null}set irradianceTexture(e){this._texture&&(this._texture._irradianceTexture=e)}get uid(){return this._uid||(this._uid=(0,h.RandomGUID)()),this._uid}toString(){return this.name}getClassName(){return"BaseTexture"}set onDispose(e){this._onDisposeObserver&&this.onDisposeObservable.remove(this._onDisposeObserver),this._onDisposeObserver=this.onDisposeObservable.add(e)}get isBlocking(){return!0}get loadingError(){return this._loadingError}get errorObject(){return this._errorObject}constructor(e,t=null){super(null),this.metadata=null,this.reservedDataStore=null,this._hasAlpha=!1,this._getAlphaFromRGB=!1,this.level=1,this._coordinatesIndex=0,this.optimizeUVAllocation=!0,this._coordinatesMode=0,this.wrapR=1,this.anisotropicFilteringLevel=c.DEFAULT_ANISOTROPIC_FILTERING_LEVEL,this._isCube=!1,this._gammaSpace=!0,this.invertZ=!1,this.lodLevelInAlpha=!1,this._dominantDirection=null,this.isRenderTarget=!1,this._prefiltered=!1,this._forceSerialize=!1,this.animations=[],this.onDisposeObservable=new s.Observable,this._onDisposeObserver=null,this._scene=null,this._uid=null,this._parentContainer=null,this._loadingError=!1,e?c._IsScene(e)?this._scene=e:this._engine=e:this._scene=n.EngineStore.LastCreatedScene,this._scene&&(this.uniqueId=this._scene.getUniqueId(),this._scene.addTexture(this),this._engine=this._scene.getEngine()),this._texture=t,this._uid=null}getScene(){return this._scene}_getEngine(){return this._engine}getTextureMatrix(){return a.Matrix.IdentityReadOnly}getReflectionTextureMatrix(){return a.Matrix.IdentityReadOnly}getRefractionTextureMatrix(){return this.getReflectionTextureMatrix()}isReadyOrNotBlocking(){return!this.isBlocking||this.isReady()||this.loadingError}scale(e){}get canRescale(){return!1}_getFromCache(e,t,i,r,s,a){let n=this._getEngine();if(!n)return null;let h=n._getUseSRGBBuffer(!!s,t),o=n.getLoadedTexturesCache();for(let n=0;n<o.length;n++){let l=o[n];if((void 0===s||h===l._useSRGBBuffer)&&(void 0===r||r===l.invertY)&&l.url===e&&!t===l.generateMipMaps&&(!i||i===l.samplingMode)&&(void 0===a||a===l.isCube))return l.incrementReferences(),l}return null}_rebuild(e=!1){}clone(){return null}get textureType(){return this._texture&&void 0!==this._texture.type?this._texture.type:0}get textureFormat(){return this._texture&&void 0!==this._texture.format?this._texture.format:5}_markAllSubMeshesAsTexturesDirty(){let e=this.getScene();e&&e.markAllMaterialsAsDirty(1)}readPixels(e=0,t=0,i=null,r=!0,s=!1,a=0,n=0,h=Number.MAX_VALUE,o=Number.MAX_VALUE){if(!this._texture)return null;let l=this._getEngine();if(!l)return null;let u=this.getSize(),_=u.width,c=u.height;0!==t&&(_/=Math.pow(2,t),c/=Math.pow(2,t),_=Math.round(_),c=Math.round(c)),h=Math.min(_,h),o=Math.min(c,o);try{if(this._texture.isCube||this._texture.is2DArray)return l._readTexturePixels(this._texture,h,o,e,t,i,r,s,a,n);return l._readTexturePixels(this._texture,h,o,-1,t,i,r,s,a,n)}catch(e){return null}}_readPixelsSync(e=0,t=0,i=null,r=!0,s=!1){if(!this._texture)return null;let a=this.getSize(),n=a.width,h=a.height,o=this._getEngine();if(!o)return null;0!=t&&(n/=Math.pow(2,t),h/=Math.pow(2,t),n=Math.round(n),h=Math.round(h));try{if(this._texture.isCube)return o._readTexturePixelsSync(this._texture,n,h,e,t,i,r,s);return o._readTexturePixelsSync(this._texture,n,h,-1,t,i,r,s)}catch(e){return null}}get _lodTextureHigh(){return this._texture?this._texture._lodTextureHigh:null}get _lodTextureMid(){return this._texture?this._texture._lodTextureMid:null}get _lodTextureLow(){return this._texture?this._texture._lodTextureLow:null}dispose(){if(this._scene){this._scene.stopAnimation&&this._scene.stopAnimation(this),this._scene.removePendingData(this);let e=this._scene.textures.indexOf(this);if(e>=0&&this._scene.textures.splice(e,1),this._scene.onTextureRemovedObservable.notifyObservers(this),this._scene=null,this._parentContainer){let e=this._parentContainer.textures.indexOf(this);e>-1&&this._parentContainer.textures.splice(e,1),this._parentContainer=null}}this.onDisposeObservable.notifyObservers(this),this.onDisposeObservable.clear(),this.metadata=null,super.dispose()}serialize(e=!1){if(!this.name&&!e)return null;let t=u.SerializationHelper.Serialize(this);return u.SerializationHelper.AppendSerializedAnimations(this,t),t}static WhenAllReady(e,t){let i=e.length;if(0===i)return void t();for(let r=0;r<e.length;r++){let s=e[r];if(s.isReady())0==--i&&t();else{let e=s.onLoadObservable;e?e.addOnce(()=>{0==--i&&t()}):0==--i&&t()}}}static _IsScene(e){return"Scene"===e.getClassName()}}c.DEFAULT_ANISOTROPIC_FILTERING_LEVEL=4,(0,i.__decorate)([(0,r.serialize)()],c.prototype,"uniqueId",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"name",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"displayName",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"metadata",void 0),(0,i.__decorate)([(0,r.serialize)("hasAlpha")],c.prototype,"_hasAlpha",void 0),(0,i.__decorate)([(0,r.serialize)("getAlphaFromRGB")],c.prototype,"_getAlphaFromRGB",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"level",void 0),(0,i.__decorate)([(0,r.serialize)("coordinatesIndex")],c.prototype,"_coordinatesIndex",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"optimizeUVAllocation",void 0),(0,i.__decorate)([(0,r.serialize)("coordinatesMode")],c.prototype,"_coordinatesMode",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"wrapU",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"wrapV",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"wrapR",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"anisotropicFilteringLevel",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"isCube",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"is3D",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"is2DArray",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"gammaSpace",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"invertZ",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"lodLevelInAlpha",void 0),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"lodGenerationOffset",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"lodGenerationScale",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"linearSpecularLOD",null),(0,i.__decorate)([(0,r.serializeAsTexture)()],c.prototype,"irradianceTexture",null),(0,i.__decorate)([(0,r.serialize)()],c.prototype,"isRenderTarget",void 0),(t=c.prototype).forceSphericalPolynomialsRecompute??(t.forceSphericalPolynomialsRecompute=(0,_._MissingSideEffect)("BaseTexture","forceSphericalPolynomialsRecompute")),Object.getOwnPropertyDescriptor(c.prototype,"sphericalPolynomial")||Object.defineProperty(c.prototype,"sphericalPolynomial",(0,_._MissingSideEffectProperty)("BaseTexture","sphericalPolynomial")),e.s(["BaseTexture",0,c],68061)},67374,30649,e=>{"use strict";var t=e.i(16147),i=e.i(40220),r=e.i(57554),s=e.i(10534),a=e.i(68061),n=e.i(48477),h=e.i(54670),o=e.i(4775),l=e.i(58279),u=e.i(38677),_=e.i(61023);function c(e,t,i=!1){let r=t.width,s=t.height;if(e instanceof Float32Array){let t=e.byteLength/e.BYTES_PER_ELEMENT,i=new Uint8Array(t);for(;--t>=0;){let r=e[t];r<0?r=0:r>1&&(r=1),i[t]=255*r}e=i}let a=document.createElement("canvas");a.width=r,a.height=s;let n=a.getContext("2d");if(!n)return null;let h=n.createImageData(r,s);if(h.data.set(e),n.putImageData(h,0,0),i){let e=document.createElement("canvas");e.width=r,e.height=s;let t=e.getContext("2d");return t?(t.translate(0,s),t.scale(1,-1),t.drawImage(a,0,0),e.toDataURL("image/png")):null}return a.toDataURL("image/png")}function d(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=e._readPixelsSync(t,i);return s?c(s,e.getSize(),r.invertY):null}async function x(e,t=0,i=0){let r=e.getInternalTexture();if(!r)return null;let s=await e.readPixels(t,i);return s?c(s,e.getSize(),r.invertY):null}e.s(["GenerateBase64StringFromTexture",0,d,"GenerateBase64StringFromTextureAsync",0,x],30649);var p=e.i(21834),f=e.i(95397);class g extends a.BaseTexture{static _CreateVideoTexture(e,t,i,r=!1,s=!1,a=g.TRILINEAR_SAMPLINGMODE,n={},o,l=5){throw(0,h._WarnImport)("VideoTexture")}get noMipmap(){return this._noMipmap}get mimeType(){return this._mimeType}set isBlocking(e){this._isBlocking=e}get isBlocking(){return this._isBlocking}get invertY(){return this._invertY}constructor(e,t,i,s,a=g.TRILINEAR_SAMPLINGMODE,n=null,h=null,l=null,u=!1,_,c,d,x,f){let m;super(t),this.url=null,this.uOffset=0,this.vOffset=0,this.uScale=1,this.vScale=1,this.uAng=0,this.vAng=0,this.wAng=0,this.uRotationCenter=.5,this.vRotationCenter=.5,this.wRotationCenter=.5,this.homogeneousRotationInUVTransform=!1,this.inspectableCustomProperties=null,this._noMipmap=!1,this._invertY=!1,this._rowGenerationMatrix=null,this._cachedTextureMatrix=null,this._projectionModeMatrix=null,this._t0=null,this._t1=null,this._t2=null,this._cachedUOffset=-1,this._cachedVOffset=-1,this._cachedUScale=0,this._cachedVScale=0,this._cachedUAng=-1,this._cachedVAng=-1,this._cachedWAng=-1,this._cachedReflectionProjectionMatrixId=-1,this._cachedURotationCenter=-1,this._cachedVRotationCenter=-1,this._cachedWRotationCenter=-1,this._cachedHomogeneousRotationInUVTransform=!1,this._cachedIdentity3x2=!0,this._cachedReflectionTextureMatrix=null,this._cachedReflectionUOffset=-1,this._cachedReflectionVOffset=-1,this._cachedReflectionUScale=0,this._cachedReflectionVScale=0,this._cachedReflectionCoordinatesMode=-1,this._buffer=null,this._deleteBuffer=!1,this._format=null,this._delayedOnLoad=null,this._delayedOnError=null,this.onLoadObservable=new r.Observable,this._isBlocking=!0,this.name=e||"",this.url=e;let R=!1,T=null,M=!0;"object"==typeof i&&null!==i?(m=i.noMipmap??!1,s=i.invertY??!p.useOpenGLOrientationForUV,a=i.samplingMode??g.TRILINEAR_SAMPLINGMODE,n=i.onLoad??null,h=i.onError??null,l=i.buffer??null,u=i.deleteBuffer??!1,_=i.format,c=i.mimeType,d=i.loaderOptions,x=i.creationFlags,R=i.useSRGBBuffer??!1,T=i.internalTexture??null,M=i.gammaSpace??M,f=i.forcedExtension??f):m=!!i,this._gammaSpace=M,this._noMipmap=m,this._invertY=void 0===s?!p.useOpenGLOrientationForUV:s,this._initialSamplingMode=a,this._buffer=l,this._deleteBuffer=u,this._mimeType=c,this._loaderOptions=d,this._creationFlags=x,this._useSRGBBuffer=R,this._forcedExtension=f,void 0!==_&&(this._format=_);const S=this.getScene(),y=this._getEngine();if(!y)return;y.onBeforeTextureInitObservable.notifyObservers(this);const A=()=>{this._texture&&(this._texture._invertVScale&&(this.vScale*=-1,this.vOffset+=1),null!==this._texture._cachedWrapU&&(this.wrapU=this._texture._cachedWrapU,this._texture._cachedWrapU=null),null!==this._texture._cachedWrapV&&(this.wrapV=this._texture._cachedWrapV,this._texture._cachedWrapV=null),null!==this._texture._cachedWrapR&&(this.wrapR=this._texture._cachedWrapR,this._texture._cachedWrapR=null)),this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),n&&n(),!this.isBlocking&&S&&S.resetCachedMaterial()},O=(e,t)=>{this._loadingError=!0,this._errorObject={message:e,exception:t},h&&h(e,t),g.OnTextureLoadErrorObservable.notifyObservers(this)};if(!this.url&&!T){this._delayedOnLoad=A,this._delayedOnError=O;return}if(this._texture=T??this._getFromCache(this.url,m,a,this._invertY,R,this.isCube),this._texture)if(this._texture.isReady)o.TimingTools.SetImmediate(()=>A());else{const e=this._texture.onLoadedObservable.add(A);this._texture.onErrorObservable.add(t=>{O(t.message,t.exception),this._texture?.onLoadedObservable.remove(e)})}else if(S&&S.useDelayedTextureLoading)this.delayLoadState=4,this._delayedOnLoad=A,this._delayedOnError=O;else{try{this._texture=y.createTexture(this.url,m,this._invertY,S,a,A,O,this._buffer,void 0,this._format,this._forcedExtension,c,d,x,R)}catch(e){throw O("error loading",e),e}u&&(this._buffer=null)}}updateURL(e,t=null,i,r){this.url&&(this.releaseInternalTexture(),this.getScene().markAllMaterialsAsDirty(1,e=>e.hasTexture(this))),(!this.name||this.name.startsWith("data:"))&&(this.name=e),this.url=e,this._buffer=t,this._forcedExtension=r,this.delayLoadState=4;let s=this._delayedOnLoad,a=()=>{s?s():this.onLoadObservable.hasObservers()&&this.onLoadObservable.notifyObservers(this),i&&i()};this._delayedOnLoad=a,this.delayLoad()}delayLoad(){if(4!==this.delayLoadState)return;let e=this.getScene();if(!e)return;let t=this.url;!t&&(this.name.indexOf("://")>0||this.name.startsWith("data:"))&&(t=this.name),this.delayLoadState=1,this._texture=this._getFromCache(t,this._noMipmap,this.samplingMode,this._invertY,this._useSRGBBuffer,this.isCube),this._texture?this._delayedOnLoad&&(this._texture.isReady?o.TimingTools.SetImmediate(this._delayedOnLoad):this._texture.onLoadedObservable.add(this._delayedOnLoad)):(this._texture=e.getEngine().createTexture(t,this._noMipmap,this._invertY,e,this.samplingMode,this._delayedOnLoad,this._delayedOnError,this._buffer,null,this._format,this._forcedExtension,this._mimeType,this._loaderOptions,this._creationFlags,this._useSRGBBuffer),this._deleteBuffer&&(this._buffer=null)),this._delayedOnLoad=null,this._delayedOnError=null}_prepareRowForTextureGeneration(e,t,i,r){e*=this._cachedUScale,t*=this._cachedVScale,e-=this.uRotationCenter*this._cachedUScale,t-=this.vRotationCenter*this._cachedVScale,i-=this.wRotationCenter,s.Vector3.TransformCoordinatesFromFloatsToRef(e,t,i,this._rowGenerationMatrix,r),r.x+=this.uRotationCenter*this._cachedUScale+this._cachedUOffset,r.y+=this.vRotationCenter*this._cachedVScale+this._cachedVOffset,r.z+=this.wRotationCenter}getTextureMatrix(e=1){if(this.uOffset===this._cachedUOffset&&this.vOffset===this._cachedVOffset&&this.uScale*e===this._cachedUScale&&this.vScale===this._cachedVScale&&this.uAng===this._cachedUAng&&this.vAng===this._cachedVAng&&this.wAng===this._cachedWAng&&this.uRotationCenter===this._cachedURotationCenter&&this.vRotationCenter===this._cachedVRotationCenter&&this.wRotationCenter===this._cachedWRotationCenter&&this.homogeneousRotationInUVTransform===this._cachedHomogeneousRotationInUVTransform)return this._cachedTextureMatrix;this._cachedUOffset=this.uOffset,this._cachedVOffset=this.vOffset,this._cachedUScale=this.uScale*e,this._cachedVScale=this.vScale,this._cachedUAng=this.uAng,this._cachedVAng=this.vAng,this._cachedWAng=this.wAng,this._cachedURotationCenter=this.uRotationCenter,this._cachedVRotationCenter=this.vRotationCenter,this._cachedWRotationCenter=this.wRotationCenter,this._cachedHomogeneousRotationInUVTransform=this.homogeneousRotationInUVTransform,this._cachedTextureMatrix&&this._rowGenerationMatrix||(this._cachedTextureMatrix=s.Matrix.Zero(),this._rowGenerationMatrix=new s.Matrix,this._t0=s.Vector3.Zero(),this._t1=s.Vector3.Zero(),this._t2=s.Vector3.Zero()),s.Matrix.RotationYawPitchRollToRef(this.vAng,this.uAng,this.wAng,this._rowGenerationMatrix),this.homogeneousRotationInUVTransform?(s.Matrix.TranslationToRef(-this._cachedURotationCenter,-this._cachedVRotationCenter,-this._cachedWRotationCenter,s.TmpVectors.Matrix[0]),s.Matrix.TranslationToRef(this._cachedURotationCenter,this._cachedVRotationCenter,this._cachedWRotationCenter,s.TmpVectors.Matrix[1]),s.Matrix.ScalingToRef(this._cachedUScale,this._cachedVScale,0,s.TmpVectors.Matrix[2]),s.Matrix.TranslationToRef(this._cachedUOffset,this._cachedVOffset,0,s.TmpVectors.Matrix[3]),s.TmpVectors.Matrix[0].multiplyToRef(this._rowGenerationMatrix,this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(s.TmpVectors.Matrix[1],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(s.TmpVectors.Matrix[2],this._cachedTextureMatrix),this._cachedTextureMatrix.multiplyToRef(s.TmpVectors.Matrix[3],this._cachedTextureMatrix),this._cachedTextureMatrix.setRowFromFloats(2,this._cachedTextureMatrix.m[12],this._cachedTextureMatrix.m[13],this._cachedTextureMatrix.m[14],1)):(this._prepareRowForTextureGeneration(0,0,0,this._t0),this._prepareRowForTextureGeneration(1,0,0,this._t1),this._prepareRowForTextureGeneration(0,1,0,this._t2),this._t1.subtractInPlace(this._t0),this._t2.subtractInPlace(this._t0),s.Matrix.FromValuesToRef(this._t1.x,this._t1.y,this._t1.z,0,this._t2.x,this._t2.y,this._t2.z,0,this._t0.x,this._t0.y,this._t0.z,0,0,0,0,1,this._cachedTextureMatrix));let t=this.getScene();if(!t)return this._cachedTextureMatrix;let i=this._cachedIdentity3x2;return this._cachedIdentity3x2=this._cachedTextureMatrix.isIdentityAs3x2(),this.optimizeUVAllocation&&i!==this._cachedIdentity3x2&&t.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedTextureMatrix}getReflectionTextureMatrix(){let e=this.getScene();if(!e)return this._cachedReflectionTextureMatrix;if(this.uOffset===this._cachedReflectionUOffset&&this.vOffset===this._cachedReflectionVOffset&&this.uScale===this._cachedReflectionUScale&&this.vScale===this._cachedReflectionVScale&&this.coordinatesMode===this._cachedReflectionCoordinatesMode){if(this.coordinatesMode!==g.PROJECTION_MODE)return this._cachedReflectionTextureMatrix;else if(this._cachedReflectionProjectionMatrixId===e.getProjectionMatrix().updateFlag)return this._cachedReflectionTextureMatrix}this._cachedReflectionTextureMatrix||(this._cachedReflectionTextureMatrix=s.Matrix.Zero()),this._projectionModeMatrix||(this._projectionModeMatrix=s.Matrix.Zero());let t=this._cachedReflectionCoordinatesMode!==this.coordinatesMode;switch(this._cachedReflectionUOffset=this.uOffset,this._cachedReflectionVOffset=this.vOffset,this._cachedReflectionUScale=this.uScale,this._cachedReflectionVScale=this.vScale,this._cachedReflectionCoordinatesMode=this.coordinatesMode,this.coordinatesMode){case g.PLANAR_MODE:s.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix),this._cachedReflectionTextureMatrix[0]=this.uScale,this._cachedReflectionTextureMatrix[5]=this.vScale,this._cachedReflectionTextureMatrix[12]=this.uOffset,this._cachedReflectionTextureMatrix[13]=this.vOffset;break;case g.PROJECTION_MODE:{s.Matrix.FromValuesToRef(.5,0,0,0,0,-.5,0,0,0,0,0,0,.5,.5,1,1,this._projectionModeMatrix);let t=e.getProjectionMatrix();this._cachedReflectionProjectionMatrixId=t.updateFlag,t.multiplyToRef(this._projectionModeMatrix,this._cachedReflectionTextureMatrix);break}default:s.Matrix.IdentityToRef(this._cachedReflectionTextureMatrix)}return t&&e.markAllMaterialsAsDirty(1,e=>e.hasTexture(this)),this._cachedReflectionTextureMatrix}clone(){let e={noMipmap:this._noMipmap,invertY:this._invertY,samplingMode:this.samplingMode,onLoad:void 0,onError:void 0,buffer:this._texture?this._texture._buffer:void 0,deleteBuffer:this._deleteBuffer,format:this.textureFormat,mimeType:this.mimeType,loaderOptions:this._loaderOptions,creationFlags:this._creationFlags,useSRGBBuffer:this._useSRGBBuffer};return f.SerializationHelper.Clone(()=>new g(this._texture?this._texture.url:null,this.getScene(),e),this)}serialize(){let e=this.name;!g.SerializeBuffers&&this.name.startsWith("data:")&&(this.name=""),this.name.startsWith("data:")&&this.url===this.name&&(this.url="");let t=super.serialize(g._SerializeInternalTextureUniqueId);if(!t)return null;if(g.SerializeBuffers||g.ForceSerializeBuffers)if("string"==typeof this._buffer&&this._buffer.startsWith("data:"))t.base64String=this._buffer,t.name=t.name.replace("data:","");else if(this.url&&this.url.startsWith("data:")&&this._buffer instanceof Uint8Array){let e=this.mimeType||"image/png";t.base64String=`data:${e};base64,${(0,_.EncodeArrayBufferToBase64)(this._buffer)}`}else(g.ForceSerializeBuffers||this.url&&this.url.startsWith("blob:")||this._forceSerialize)&&(t.base64String=!this._engine||this._engine._features.supportSyncTextureRead?d(this):x(this));return t.invertY=this._invertY,t.samplingMode=this.samplingMode,t._creationFlags=this._creationFlags,t._useSRGBBuffer=this._useSRGBBuffer,g._SerializeInternalTextureUniqueId&&(t.internalTextureUniqueId=this._texture?.uniqueId),t.internalTextureLabel=this._texture?.label,t.noMipmap=this._noMipmap,this.name=e,t}getClassName(){return"Texture"}dispose(){super.dispose(),this.onLoadObservable.clear(),this._delayedOnLoad=null,this._delayedOnError=null,this._buffer=null}static Parse(e,t,i){let r;if(e.customType){let r=l.InstantiationTools.Instantiate(e.customType).Parse(e,t,i);return e.samplingMode&&r.updateSamplingMode&&r._samplingMode&&r._samplingMode!==e.samplingMode&&r.updateSamplingMode(e.samplingMode),r}if(e.isCube&&!e.isRenderTarget)return g._CubeTextureParser(e,t,i);let s=void 0!==e.internalTextureUniqueId;if(!e.name&&!e.isRenderTarget&&!s)return null;if(s){for(let i of t.getEngine().getLoadedTexturesCache())if(i.uniqueId===e.internalTextureUniqueId){r=i;break}}let a=t=>{if(t&&t._texture&&(t._texture._cachedWrapU=null,t._texture._cachedWrapV=null,t._texture._cachedWrapR=null),e.samplingMode){let i=e.samplingMode;t&&t.samplingMode!==i&&t.updateSamplingMode(i)}if(t&&e.animations)for(let i=0;i<e.animations.length;i++){let r=e.animations[i],s=(0,n.GetClass)("BABYLON.Animation");s&&t.animations.push(s.Parse(r))}t&&t._texture&&(s&&!r&&t._texture._setUniqueId(e.internalTextureUniqueId),t._texture.label=e.internalTextureLabel)};return f.SerializationHelper.Parse(()=>{let s=!0;if(e.noMipmap&&(s=!1),e.mirrorPlane){let i=g._CreateMirror(e.name,e.renderTargetSize,t,s);return i._waitingRenderList=e.renderList,i.mirrorPlane=u.Plane.FromArray(e.mirrorPlane),a(i),i}if(e.isRenderTarget&&!e.base64String){let i=null;if(e.isCube){if(t.reflectionProbes)for(let i=0;i<t.reflectionProbes.length;i++){let r=t.reflectionProbes[i];if(r.name===e.name)return r.cubeTexture}}else(i=g._CreateRenderTargetTexture(e.name,e.renderTargetSize,t,s,e._creationFlags??0))._waitingRenderList=e.renderList;return a(i),i}if(e.isVideo){let r=g._CreateVideoTexture(i+(e.url||e.name),i+(e.src||e.url),t,s,e.invertY,e.samplingMode,e.settings||{});return a(r),r}{let n;if("string"==typeof e.base64String&&e.base64String&&!r){let i={buffer:e.base64String,noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)}},r=e.base64String,h=r.startsWith("data:")?r.substring(5):r;(n=g.CreateFromBase64String("",h,t,i)).name=e.name}else{let h;h=e.name&&(e.name.indexOf("://")>0||e.name.startsWith("data:"))?e.name:i+e.name,e.url&&(e.url.startsWith("data:")||g.UseSerializedUrlIfAny)&&(h=e.url),n=new g(h,t,{noMipmap:!s,invertY:e.invertY,samplingMode:e.samplingMode,useSRGBBuffer:e._useSRGBBuffer??!1,creationFlags:e._creationFlags??0,onLoad:()=>{a(n)},internalTexture:r})}return n}},e,t)}static CreateFromBase64String(e,t,i,r,s,a=g.TRILINEAR_SAMPLINGMODE,n=null,h=null,o=5,l,u){return new g("data:"+t,i,r,s,a,n,h,e,!1,o,void 0,void 0,l,u)}static LoadFromDataString(e,t,i,r=!1,s,a=!0,n=g.TRILINEAR_SAMPLINGMODE,h=null,o=null,l=5,u,_){return"data:"!==e.substring(0,5)&&(e="data:"+e),new g(e,i,s,a,n,h,o,t,r,l,void 0,void 0,u,_)}}g.SerializeBuffers=!0,g.ForceSerializeBuffers=!1,g.OnTextureLoadErrorObservable=new r.Observable,g._SerializeInternalTextureUniqueId=!1,g._CubeTextureParser=(e,t,i)=>{throw(0,h._WarnImport)("CubeTexture")},g._CreateMirror=(e,t,i,r)=>{throw(0,h._WarnImport)("MirrorTexture")},g._CreateRenderTargetTexture=(e,t,i,r,s)=>{throw(0,h._WarnImport)("RenderTargetTexture")},g.NEAREST_SAMPLINGMODE=1,g.NEAREST_NEAREST_MIPLINEAR=8,g.BILINEAR_SAMPLINGMODE=2,g.LINEAR_LINEAR_MIPNEAREST=11,g.TRILINEAR_SAMPLINGMODE=3,g.LINEAR_LINEAR_MIPLINEAR=3,g.NEAREST_NEAREST_MIPNEAREST=4,g.NEAREST_LINEAR_MIPNEAREST=5,g.NEAREST_LINEAR_MIPLINEAR=6,g.NEAREST_LINEAR=7,g.NEAREST_NEAREST=1,g.LINEAR_NEAREST_MIPNEAREST=9,g.LINEAR_NEAREST_MIPLINEAR=10,g.LINEAR_LINEAR=2,g.LINEAR_NEAREST=12,g.EXPLICIT_MODE=0,g.SPHERICAL_MODE=1,g.PLANAR_MODE=2,g.CUBIC_MODE=3,g.PROJECTION_MODE=4,g.SKYBOX_MODE=5,g.INVCUBIC_MODE=6,g.EQUIRECTANGULAR_MODE=7,g.FIXED_EQUIRECTANGULAR_MODE=8,g.FIXED_EQUIRECTANGULAR_MIRRORED_MODE=9,g.CLAMP_ADDRESSMODE=0,g.WRAP_ADDRESSMODE=1,g.MIRROR_ADDRESSMODE=2,g.UseSerializedUrlIfAny=!1,(0,t.__decorate)([(0,i.serialize)()],g.prototype,"url",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"uOffset",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"vOffset",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"uScale",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"vScale",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"uAng",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"vAng",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"wAng",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"uRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"vRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"wRotationCenter",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"homogeneousRotationInUVTransform",void 0),(0,t.__decorate)([(0,i.serialize)()],g.prototype,"isBlocking",null);let m=!1;e.s(["RegisterTexture",0,function(){m||(m=!0,(0,n.RegisterClass)("BABYLON.Texture",g),f.SerializationHelper._TextureParser=g.Parse)},"Texture",0,g],67374)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,16475,e=>{"use strict";var t=e.i(38677);class r{static GetPlanes(e){let s=[];for(let e=0;e<6;e++)s.push(new t.Plane(0,0,0,0));return r.GetPlanesToRef(e,s),s}static GetNearPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[2],t.normal.y=r[7]+r[6],t.normal.z=r[11]+r[10],t.d=r[15]+r[14],t.normalize()}static GetFarPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[2],t.normal.y=r[7]-r[6],t.normal.z=r[11]-r[10],t.d=r[15]-r[14],t.normalize()}static GetLeftPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[0],t.normal.y=r[7]+r[4],t.normal.z=r[11]+r[8],t.d=r[15]+r[12],t.normalize()}static GetRightPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[0],t.normal.y=r[7]-r[4],t.normal.z=r[11]-r[8],t.d=r[15]-r[12],t.normalize()}static GetTopPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]-r[1],t.normal.y=r[7]-r[5],t.normal.z=r[11]-r[9],t.d=r[15]-r[13],t.normalize()}static GetBottomPlaneToRef(e,t){let r=e.m;t.normal.x=r[3]+r[1],t.normal.y=r[7]+r[5],t.normal.z=r[11]+r[9],t.d=r[15]+r[13],t.normalize()}static GetPlanesToRef(e,t){r.GetNearPlaneToRef(e,t[0]),r.GetFarPlaneToRef(e,t[1]),r.GetLeftPlaneToRef(e,t[2]),r.GetRightPlaneToRef(e,t[3]),r.GetTopPlaneToRef(e,t[4]),r.GetBottomPlaneToRef(e,t[5])}static IsPointInFrustum(e,t){for(let r=0;r<6;r++)if(0>t[r].dotCoordinate(e))return!1;return!0}}e.s(["Frustum",0,r])},66476,e=>{"use strict";var t=e.i(10534),r=e.i(65703);e.s(["PickingInfo",0,class{constructor(){this.hit=!1,this.distance=0,this.pickedPoint=null,this.pickedMesh=null,this.bu=0,this.bv=0,this.faceId=-1,this.subMeshFaceId=-1,this.subMeshId=0,this.pickedSprite=null,this.thinInstanceIndex=-1,this.ray=null,this.originMesh=null,this.aimTransform=null,this.gripTransform=null}getNormal(e=!1,s=!0){let a;if(!this.pickedMesh||s&&!this.pickedMesh.isVerticesDataPresent(r.VertexBuffer.NormalKind))return null;let i=this.pickedMesh.getIndices();i?.length===0&&(i=null);let n=t.TmpVectors.Vector3[0],o=t.TmpVectors.Vector3[1],l=t.TmpVectors.Vector3[2];if(s){let e=this.pickedMesh.getVerticesData(r.VertexBuffer.NormalKind),s=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId],n):n.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),h=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),p=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId+2],l):l.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]);s=s.scale(this.bu),h=h.scale(this.bv),p=p.scale(1-this.bu-this.bv),a=new t.Vector3(s.x+h.x+p.x,s.y+h.y+p.y,s.z+h.z+p.z)}else{let e=this.pickedMesh.getVerticesData(r.VertexBuffer.PositionKind),s=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId],n):n.copyFromFloats(e[3*this.faceId*3],e[3*this.faceId*3+1],e[3*this.faceId*3+2]),h=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId+1],o):o.copyFromFloats(e[(3*this.faceId+1)*3],e[(3*this.faceId+1)*3+1],e[(3*this.faceId+1)*3+2]),p=i?t.Vector3.FromArrayToRef(e,3*i[3*this.faceId+2],l):l.copyFromFloats(e[(3*this.faceId+2)*3],e[(3*this.faceId+2)*3+1],e[(3*this.faceId+2)*3+2]),c=s.subtract(h),u=p.subtract(h);a=t.Vector3.Cross(c,u)}let h=(e,r)=>{if(-1!==this.thinInstanceIndex){let s=e._thinInstanceDataStorage.matrixData,a=this.thinInstanceIndex<<4;if(s&&s.length>a){let e=t.TmpVectors.Matrix[0];t.Matrix.FromArrayToRef(s,a,e),t.Vector3.TransformNormalToRef(r,e,r)}}let s=e.getWorldMatrix();e.nonUniformScaling&&(t.TmpVectors.Matrix[0].copyFrom(s),(s=t.TmpVectors.Matrix[0]).setTranslationFromFloats(0,0,0),s.invert(),s.transposeToRef(t.TmpVectors.Matrix[1]),s=t.TmpVectors.Matrix[1]),t.Vector3.TransformNormalToRef(r,s,r)};if(e&&h(this.pickedMesh,a),this.ray){let r=t.TmpVectors.Vector3[0].copyFrom(a);e||h(this.pickedMesh,r),t.Vector3.Dot(r,this.ray.direction)>0&&a.negateInPlace()}return a.normalize(),a}getTextureCoordinates(e=r.VertexBuffer.UVKind){if(!this.pickedMesh||!this.pickedMesh.isVerticesDataPresent(e))return null;let s=this.pickedMesh.getIndices();if(!s)return null;let a=this.pickedMesh.getVerticesData(e);if(!a)return null;let i=t.Vector2.FromArray(a,2*s[3*this.faceId]),n=t.Vector2.FromArray(a,2*s[3*this.faceId+1]),o=t.Vector2.FromArray(a,2*s[3*this.faceId+2]);return i=i.scale(this.bu),n=n.scale(this.bv),o=o.scale(1-this.bu-this.bv),new t.Vector2(i.x+n.x+o.x,i.y+n.y+o.y)}}])},11437,e=>{"use strict";var t=e.i(10534);class r{}r.POINTERDOWN=1,r.POINTERUP=2,r.POINTERMOVE=4,r.POINTERWHEEL=8,r.POINTERPICK=16,r.POINTERTAP=32,r.POINTERDOUBLETAP=64;class s{constructor(e,t){this.type=e,this.event=t}}e.s(["PointerEventTypes",0,r,"PointerInfo",0,class extends s{get pickInfo(){return this._pickInfo||this._generatePickInfo(),this._pickInfo}constructor(e,t,r,s=null){super(e,t),this._pickInfo=r,this._inputManager=s}_generatePickInfo(){this._inputManager&&(this._pickInfo=this._inputManager._pickMove(this.event),this._inputManager._setRayOnPointerInfo(this._pickInfo,this.event),this._inputManager=null)}},"PointerInfoPre",0,class extends s{constructor(e,r,s,a){super(e,r),this.ray=null,this.originalPickingInfo=null,this.skipOnPointerObservable=!1,this.localPosition=new t.Vector2(s,a)}}])},70463,e=>{"use strict";class t{}t.KEYDOWN=1,t.KEYUP=2;class r{constructor(e,t){this.type=e,this.event=t}}e.s(["KeyboardEventTypes",0,t,"KeyboardInfo",0,r,"KeyboardInfoPre",0,class extends r{get skipOnPointerObservable(){return this.skipOnKeyboardObservable}set skipOnPointerObservable(e){this.skipOnKeyboardObservable=e}constructor(e,t){super(e,t),this.type=e,this.event=t,this.skipOnKeyboardObservable=!1}}])},24423,e=>{"use strict";var t,r;(r=t||(t={}))[r.PointerMove=0]="PointerMove",r[r.PointerDown=1]="PointerDown",r[r.PointerUp=2]="PointerUp";class s{}s.DOM_DELTA_PIXEL=0,s.DOM_DELTA_LINE=1,s.DOM_DELTA_PAGE=2,e.s(["EventConstants",0,s])},93357,29665,e=>{"use strict";var t=e.i(65703),r=e.i(57554);e.s(["PostProcessManager",0,class{constructor(e){this._vertexBuffers={},this._activePostProcesses=[],this.onBeforeRenderObservable=new r.Observable,this._scene=e}_prepareBuffers(){if(this._vertexBuffers[t.VertexBuffer.PositionKind])return;let e=[];e.push(1,1),e.push(-1,1),e.push(-1,-1),e.push(1,-1),this._vertexBuffers[t.VertexBuffer.PositionKind]=new t.VertexBuffer(this._scene.getEngine(),e,t.VertexBuffer.PositionKind,!1,!1,2),this._buildIndexBuffer()}_buildIndexBuffer(){let e=[];e.push(0),e.push(1),e.push(2),e.push(0),e.push(2),e.push(3),this._indexBuffer=this._scene.getEngine().createIndexBuffer(e)}_getActivePostProcesses(e){let t=this._activePostProcesses;t.length=0;for(let r=0;r<e.length;r++){let s=e[r];s&&t.push(s)}return t}_rebuild(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e._rebuild(),this._buildIndexBuffer())}_prepareFrame(e=null,t=null){let r=this._scene.activeCamera;return!!r&&!!(t=t||this._getActivePostProcesses(r._postProcesses))&&0!==t.length&&!!this._scene.postProcessesEnabled&&(t[0].activate(r,e,null!=t),!0)}directRender(e,t=null,r=!1,s=0,a=0,i=!1,n=e.length){let o=this._scene.getEngine();for(let l=0;l<n;l++){l<e.length-1?e[l+1].activate(this._scene.activeCamera||this._scene,t?.texture):(t?o.bindFramebuffer(t,s,void 0,void 0,r,a):i||o.restoreDefaultFramebuffer(),o._debugInsertMarker?.(`post process ${e[l].name} output`));let n=e[l],h=n.apply();h&&(n.onBeforeRenderObservable.notifyObservers(h),this._prepareBuffers(),o.bindBuffers(this._vertexBuffers,this._indexBuffer,h),o.drawElementsType(0,0,6),n.onAfterRenderObservable.notifyObservers(h))}o.setDepthBuffer(!0),o.setDepthWrite(!0)}_finalizeFrame(e,t,r,s,a=!1){let i=this._scene.activeCamera;if(!i||(this.onBeforeRenderObservable.notifyObservers(this),0===(s=s||this._getActivePostProcesses(i._postProcesses)).length||!this._scene.postProcessesEnabled))return;let n=this._scene.getEngine();for(let o=0,l=s.length;o<l;o++){let h=s[o];if(o<l-1?h._outputTexture=s[o+1].activate(i,t?.texture):(t?(n.bindFramebuffer(t,r,void 0,void 0,a),h._outputTexture=t):(n.restoreDefaultFramebuffer(),h._outputTexture=null),n._debugInsertMarker?.(`post process ${s[o].name} output`)),e)break;let p=h.apply();p&&(h.onBeforeRenderObservable.notifyObservers(p),this._prepareBuffers(),n.bindBuffers(this._vertexBuffers,this._indexBuffer,p),n.drawElementsType(0,0,6),h.onAfterRenderObservable.notifyObservers(p))}n.setDepthBuffer(!0),n.setDepthWrite(!0),n.setAlphaMode(0)}dispose(){let e=this._vertexBuffers[t.VertexBuffer.PositionKind];e&&(e.dispose(),this._vertexBuffers[t.VertexBuffer.PositionKind]=null),this._indexBuffer&&(this._scene.getEngine()._releaseBuffer(this._indexBuffer),this._indexBuffer=null)}}],93357);var s=e.i(95294),a=e.i(10534);class i{set opaqueSortCompareFn(e){e?this._opaqueSortCompareFn=e:this._opaqueSortCompareFn=i.PainterSortCompare,this._renderOpaque=this._renderOpaqueSorted}set alphaTestSortCompareFn(e){e?this._alphaTestSortCompareFn=e:this._alphaTestSortCompareFn=i.PainterSortCompare,this._renderAlphaTest=this._renderAlphaTestSorted}set transparentSortCompareFn(e){e?this._transparentSortCompareFn=e:this._transparentSortCompareFn=i.defaultTransparentSortCompare,this._renderTransparent=this._renderTransparentSorted}constructor(e,t,r=null,a=null,i=null){this.index=e,this._opaqueSubMeshes=new s.SmartArray(256),this._transparentSubMeshes=new s.SmartArray(256),this._alphaTestSubMeshes=new s.SmartArray(256),this._depthOnlySubMeshes=new s.SmartArray(256),this._particleSystems=new s.SmartArray(256),this._spriteManagers=new s.SmartArray(256),this._empty=!0,this._edgesRenderers=new s.SmartArrayNoDuplicate(16),this.disableDepthPrePass=!1,this._scene=t,this.opaqueSortCompareFn=r,this.alphaTestSortCompareFn=a,this.transparentSortCompareFn=i}render(e,t,r,s,a=!0,i=!0,n=!0,o=!0,l){if(e)return void e(this._opaqueSubMeshes,this._alphaTestSubMeshes,this._transparentSubMeshes,this._depthOnlySubMeshes);let h=this._scene.getEngine();a&&0!==this._depthOnlySubMeshes.length&&(h.setColorWrite(!1),this._renderAlphaTest(this._depthOnlySubMeshes),h.setColorWrite(!0)),i&&0!==this._opaqueSubMeshes.length&&this._renderOpaque(this._opaqueSubMeshes),n&&0!==this._alphaTestSubMeshes.length&&this._renderAlphaTest(this._alphaTestSubMeshes);let p=h.getStencilBuffer();if(h.setStencilBuffer(!1),t&&this._renderSprites(),r&&this._renderParticles(s),this.onBeforeTransparentRendering&&this.onBeforeTransparentRendering(),o&&(l||0!==this._transparentSubMeshes.length||this._scene.useOrderIndependentTransparency)){if(h.setStencilBuffer(p),l)l(this._transparentSubMeshes,this);else if(this._scene.useOrderIndependentTransparency){let e=this._scene.depthPeelingRenderer.render(this._transparentSubMeshes);e.length&&this._renderTransparent(e)}else this._renderTransparent(this._transparentSubMeshes);h.setAlphaMode(0)}if(h.setStencilBuffer(!1),i&&this._edgesRenderers.length){for(let e=0;e<this._edgesRenderers.length;e++)this._edgesRenderers.data[e].render();h.setAlphaMode(0)}h.setStencilBuffer(p)}_renderOpaqueSorted(e){i._RenderSorted(e,this._opaqueSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderAlphaTestSorted(e){i._RenderSorted(e,this._alphaTestSortCompareFn,this._scene.activeCamera,!1,this.disableDepthPrePass)}_renderTransparentSorted(e){i._RenderSorted(e,this._transparentSortCompareFn,this._scene.activeCamera,!0,this.disableDepthPrePass)}static _RenderSorted(e,t,r,s,n){let o,l=0,h=r?r.globalPosition:i._ZeroVector;if(s)for(;l<e.length;l++)(o=e.data[l])._alphaIndex=o.getMesh().alphaIndex,o._distanceToCamera=a.Vector3.Distance(o.getBoundingInfo().boundingSphere.centerWorld,h);let p=e.length===e.data.length?e.data:e.data.slice(0,e.length);t&&p.sort(t);let c=p[0].getMesh().getScene();for(l=0;l<p.length;l++)if(o=p[l],!c._activeMeshesFrozenButKeepClipping||o.isInFrustum(c._frustumPlanes)){if(s){let e=o.getMaterial();if(e&&e.needDepthPrePass&&!n){let t=e.getScene().getEngine();t.setColorWrite(!1),t.setAlphaMode(0),o.render(!1),t.setColorWrite(!0)}}o.render(s)}}static defaultTransparentSortCompare(e,t){return e._alphaIndex>t._alphaIndex?1:e._alphaIndex<t._alphaIndex?-1:i.backToFrontSortCompare(e,t)}static backToFrontSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?1:e._distanceToCamera>t._distanceToCamera?-1:0}static frontToBackSortCompare(e,t){return e._distanceToCamera<t._distanceToCamera?-1:+(e._distanceToCamera>t._distanceToCamera)}static PainterSortCompare(e,t){let r=e.getMesh(),s=t.getMesh();return r.material&&s.material?r.material.uniqueId-s.material.uniqueId:r.uniqueId-s.uniqueId}prepare(){this._opaqueSubMeshes.reset(),this._transparentSubMeshes.reset(),this._alphaTestSubMeshes.reset(),this._depthOnlySubMeshes.reset(),this._particleSystems.reset(),this.prepareSprites(),this._edgesRenderers.reset(),this._empty=!0}prepareSprites(){this._spriteManagers.reset()}dispose(){this._opaqueSubMeshes.dispose(),this._transparentSubMeshes.dispose(),this._alphaTestSubMeshes.dispose(),this._depthOnlySubMeshes.dispose(),this._particleSystems.dispose(),this._spriteManagers.dispose(),this._edgesRenderers.dispose()}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),void 0===r&&(r=e.getMaterial()),null!=r&&(r.needAlphaBlendingForMesh(t)?this._transparentSubMeshes.push(e):r.needAlphaTestingForMesh(t)?(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._alphaTestSubMeshes.push(e)):(r.needDepthPrePass&&!this.disableDepthPrePass&&this._depthOnlySubMeshes.push(e),this._opaqueSubMeshes.push(e)),t._renderingGroup=this,t._edgesRenderer&&t.isEnabled()&&t.isVisible&&t._edgesRenderer.isEnabled&&this._edgesRenderers.pushNoDuplicate(t._edgesRenderer),this._empty=!1)}dispatchSprites(e){this._spriteManagers.push(e),this._empty=!1}dispatchParticles(e){this._particleSystems.push(e),this._empty=!1}_renderParticles(e){if(0===this._particleSystems.length)return;let t=this._scene.activeCamera;this._scene.onBeforeParticlesRenderingObservable.notifyObservers(this._scene);for(let r=0;r<this._particleSystems.length;r++){let s=this._particleSystems.data[r];if(0===(t&&t.layerMask&s.layerMask))continue;let a=s.emitter;a.position&&e&&-1===e.indexOf(a)||this._scene._activeParticles.addCount(s.render(),!1)}this._scene.onAfterParticlesRenderingObservable.notifyObservers(this._scene)}_renderSprites(){if(!this._scene.spritesEnabled||0===this._spriteManagers.length)return;let e=this._scene.activeCamera;this._scene.onBeforeSpritesRenderingObservable.notifyObservers(this._scene);for(let t=0;t<this._spriteManagers.length;t++){let r=this._spriteManagers.data[t];0!==(e&&e.layerMask&r.layerMask)&&r.render()}this._scene.onAfterSpritesRenderingObservable.notifyObservers(this._scene)}}i._ZeroVector=a.Vector3.Zero();class n{}class o{get disableDepthPrePass(){return this._disableDepthPrePass}set disableDepthPrePass(e){for(let t of(this._disableDepthPrePass=e,this._renderingGroups))t.disableDepthPrePass=e}get maintainStateBetweenFrames(){return this._maintainStateBetweenFrames}set maintainStateBetweenFrames(e){e!==this._maintainStateBetweenFrames&&(this._maintainStateBetweenFrames=e,this._maintainStateBetweenFrames||this.restoreDispachedFlags())}restoreDispachedFlags(){for(let e of this._scene.meshes)if(e.subMeshes)for(let t of e.subMeshes)t._wasDispatched=!1;if(this._scene.spriteManagers)for(let e of this._scene.spriteManagers)e._wasDispatched=!1;for(let e of this._scene.particleSystems)e._wasDispatched=!1}constructor(e){this._useSceneAutoClearSetup=!1,this._disableDepthPrePass=!1,this._renderingGroups=[],this._autoClearDepthStencil={},this._customOpaqueSortCompareFn={},this._customAlphaTestSortCompareFn={},this._customTransparentSortCompareFn={},this._renderingGroupInfo=new n,this._maintainStateBetweenFrames=!1,this._scene=e;for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++)this._autoClearDepthStencil[e]={autoClear:!0,depth:!0,stencil:!0}}get renderingGroups(){return this._renderingGroups}getRenderingGroup(e){let t=e||0;return this._prepareRenderingGroup(t),this._renderingGroups[t]}_clearDepthStencilBuffer(e=!0,t=!0){this._depthStencilBufferAlreadyCleaned||(this._scene.getEngine().clear(null,!1,e,t),this._depthStencilBufferAlreadyCleaned=!0)}render(e,t,r,s,a=!0,i=!0,n=!0,l=!0,h){let p=this._renderingGroupInfo;if(p.scene=this._scene,p.camera=this._scene.activeCamera,p.renderingManager=this,this._scene.spriteManagers&&s)for(let e=0;e<this._scene.spriteManagers.length;e++){let t=this._scene.spriteManagers[e];this.dispatchSprites(t)}for(let c=o.MIN_RENDERINGGROUPS;c<o.MAX_RENDERINGGROUPS;c++){this._depthStencilBufferAlreadyCleaned=c===o.MIN_RENDERINGGROUPS;let u=this._renderingGroups[c];if(!u||u._empty)continue;let d=1<<c;if(p.renderingGroupId=c,this._scene.onBeforeRenderingGroupObservable.notifyObservers(p,d),o.AUTOCLEAR){let e=this._useSceneAutoClearSetup?this._scene.getAutoClearDepthStencilSetup(c):this._autoClearDepthStencil[c];e&&e.autoClear&&this._clearDepthStencilBuffer(e.depth,e.stencil)}for(let e of this._scene._beforeRenderingGroupDrawStage)e.action(c);for(let o of(u.render(e,s,r,t,a,i,n,l,h),this._scene._afterRenderingGroupDrawStage))o.action(c);this._scene.onAfterRenderingGroupObservable.notifyObservers(p,d)}}reset(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepare()}}resetSprites(){if(!this.maintainStateBetweenFrames)for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.prepareSprites()}}dispose(){this.freeRenderingGroups(),this._renderingGroups.length=0,this._renderingGroupInfo=null}freeRenderingGroups(){for(let e=o.MIN_RENDERINGGROUPS;e<o.MAX_RENDERINGGROUPS;e++){let t=this._renderingGroups[e];t&&t.dispose()}}_prepareRenderingGroup(e){void 0===this._renderingGroups[e]&&(this._renderingGroups[e]=new i(e,this._scene,this._customOpaqueSortCompareFn[e],this._customAlphaTestSortCompareFn[e],this._customTransparentSortCompareFn[e]),this._renderingGroups[e].disableDepthPrePass=this._disableDepthPrePass)}dispatchSprites(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchSprites(e))}dispatchParticles(e){this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(e.renderingGroupId).dispatchParticles(e))}dispatch(e,t,r){void 0===t&&(t=e.getMesh()),this.maintainStateBetweenFrames&&e._wasDispatched||(e._wasDispatched=!0,this.getRenderingGroup(t.renderingGroupId).dispatch(e,t,r))}setRenderingOrder(e,t=null,r=null,s=null){if(this._customOpaqueSortCompareFn[e]=t,this._customAlphaTestSortCompareFn[e]=r,this._customTransparentSortCompareFn[e]=s,this._renderingGroups[e]){let t=this._renderingGroups[e];t.opaqueSortCompareFn=this._customOpaqueSortCompareFn[e],t.alphaTestSortCompareFn=this._customAlphaTestSortCompareFn[e],t.transparentSortCompareFn=this._customTransparentSortCompareFn[e]}}setRenderingAutoClearDepthStencil(e,t,r=!0,s=!0){this._autoClearDepthStencil[e]={autoClear:t,depth:r,stencil:s}}getAutoClearDepthStencilSetup(e){return this._autoClearDepthStencil[e]}}o.MAX_RENDERINGGROUPS=4,o.MIN_RENDERINGGROUPS=0,o.AUTOCLEAR=!0,e.s(["RenderingManager",0,o],29665)},89102,e=>{"use strict";var t=e.i(10534),r=e.i(35270),s=e.i(12247),a=e.i(26722),i=e.i(75053);class n{constructor(e,t,r,s){this.name=e,this.worldAxisForNormal=t,this.worldAxisForFileX=r,this.worldAxisForFileY=s}}class o{static _NearestPow2Floor(e){return e<=1?1:1<<Math.floor(Math.log2(e))}static ConvertCubeMapTextureToSphericalPolynomial(e){let t,r;if(!e.isCube)return null;e.getScene()?.getEngine().flushFramebuffer();let s=e.getSize().width,a=e._sphericalPolynomialTargetSize,i=a>0?this._NearestPow2Floor(a):0,n=!e.noMipmap&&e._texture?.generateMipMaps===!0,o=i>0&&i<s&&n,l=o?Math.max(0,Math.round(Math.log2(s/i))):0,h=o?Math.max(1,Math.floor(s/Math.pow(2,l))):s,p=e.readPixels(0,l,void 0,!1),c=e.readPixels(1,l,void 0,!1);e.isRenderTarget?(t=e.readPixels(3,l,void 0,!1),r=e.readPixels(2,l,void 0,!1)):(t=e.readPixels(2,l,void 0,!1),r=e.readPixels(3,l,void 0,!1));let u=e.readPixels(4,l,void 0,!1),d=e.readPixels(5,l,void 0,!1),f=e.gammaSpace,m=i>0&&i<s&&!o;return new Promise(e=>{Promise.all([c,p,t,r,u,d]).then(([t,r,a,n,o,l])=>{let p=h;m&&(t=this._DownsampleFace(t,s,i,4),r=this._DownsampleFace(r,s,i,4),a=this._DownsampleFace(a,s,i,4),n=this._DownsampleFace(n,s,i,4),o=this._DownsampleFace(o,s,i,4),l=this._DownsampleFace(l,s,i,4),p=i);let c={size:p,right:r,left:t,up:a,down:n,front:o,back:l,format:5,type:+(t instanceof Float32Array),gammaSpace:f};e(this.ConvertCubeMapToSphericalPolynomial(c))})})}static _AreaElement(e,t){return Math.atan2(e*t,Math.sqrt(e*e+t*t+1))}static _DownsampleFace(e,t,r,s){let a=e instanceof Float32Array?e:Float32Array.from(e),i=r*r*s,n=new Float32Array(i),o=t/r,l=1/(o*o);for(let e=0;e<r;e++){let i=Math.floor(e*o),h=Math.floor((e+1)*o);for(let p=0;p<r;p++){let c=Math.floor(p*o),u=Math.floor((p+1)*o),d=(e*r+p)*s;for(let e=0;e<s;e++){let r=0;for(let n=i;n<h;n++)for(let i=c;i<u;i++)r+=a[(n*t+i)*s+e];n[d+e]=r*l}}}if(e instanceof Float32Array)return n;let h=new e.constructor(i);for(let e=0;e<i;e++)h[e]=n[e]+.5|0;return h}static ConvertCubeMapToSphericalPolynomial(e,t=0){let n=t>0?this._NearestPow2Floor(t):0;if(n>0&&e.size>n){let t=5===e.format?4:3,r={};for(let s of["right","left","up","down","front","back"])r[s]=this._DownsampleFace(e[s],e.size,n,t);e={...e,...r,size:n}}let o=new s.SphericalHarmonics,l=0,h=2/e.size,p=.5*h,c=p-1;for(let t=0;t<6;t++){let s=this._FileFaces[t],n=e[s.name],u=c,d=5===e.format?4:3;for(let t=0;t<e.size;t++){let f=c;for(let c=0;c<e.size;c++){let m=s.worldAxisForFileX.scale(f).add(s.worldAxisForFileY.scale(u)).add(s.worldAxisForNormal);m.normalize();let _=this._AreaElement(f-p,u-p)-this._AreaElement(f-p,u+p)-this._AreaElement(f+p,u-p)+this._AreaElement(f+p,u+p),g=n[t*e.size*d+c*d+0],y=n[t*e.size*d+c*d+1],b=n[t*e.size*d+c*d+2];isNaN(g)&&(g=0),isNaN(y)&&(y=0),isNaN(b)&&(b=0),0===e.type&&(g/=255,y/=255,b/=255),e.gammaSpace&&(g=Math.pow((0,r.Clamp)(g),a.ToLinearSpace),y=Math.pow((0,r.Clamp)(y),a.ToLinearSpace),b=Math.pow((0,r.Clamp)(b),a.ToLinearSpace));let P=this.MAX_HDRI_VALUE;if(this.PRESERVE_CLAMPED_COLORS){let e=Math.max(g,y,b);if(e>P){let t=P/e;g*=t,y*=t,b*=t}}else g=(0,r.Clamp)(g,0,P),y=(0,r.Clamp)(y,0,P),b=(0,r.Clamp)(b,0,P);let S=new i.Color3(g,y,b);o.addLight(m,S,_),l+=_,f+=h}u+=h}}let u=4*Math.PI*6/6/l;return o.scaleInPlace(u),o.convertIncidentRadianceToIrradiance(),o.convertIrradianceToLambertianRadiance(),s.SphericalPolynomial.FromHarmonics(o)}}o._FileFaces=[new n("right",new t.Vector3(1,0,0),new t.Vector3(0,0,-1),new t.Vector3(0,-1,0)),new n("left",new t.Vector3(-1,0,0),new t.Vector3(0,0,1),new t.Vector3(0,-1,0)),new n("up",new t.Vector3(0,1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,1)),new n("down",new t.Vector3(0,-1,0),new t.Vector3(1,0,0),new t.Vector3(0,0,-1)),new n("front",new t.Vector3(0,0,1),new t.Vector3(1,0,0),new t.Vector3(0,-1,0)),new n("back",new t.Vector3(0,0,-1),new t.Vector3(-1,0,0),new t.Vector3(0,-1,0))],o.MAX_HDRI_VALUE=4096,o.PRESERVE_CLAMPED_COLORS=!1,e.s(["CubeMapToSphericalPolynomialTools",0,o])},93701,e=>{"use strict";var t=e.i(16147),r=e.i(44988),s=e.i(29711),a=e.i(35270),i=e.i(47867),n=e.i(83464),o=e.i(61023),l=e.i(40220);let h=null;async function p(){let t=i.EngineStore.LastCreatedEngine?.createCanvas(100,100)??new OffscreenCanvas(100,100);t instanceof OffscreenCanvas&&n.Logger.Warn("DumpData: OffscreenCanvas will be used for dumping data. This may result in lossy alpha values.");let{ThinEngine:s}=await e.A(14235);if(!s.IsSupported)throw Error("DumpData: No WebGL context available. Cannot dump data.");let a=new s(t,!1,{preserveDrawingBuffer:!0,depth:!1,stencil:!1,alpha:!0,premultipliedAlpha:!1,antialias:!1,failIfMajorPerformanceCaveat:!1});i.EngineStore.Instances.pop(),i.EngineStore.OnEnginesDisposedObservable.add(e=>{a&&e!==a&&!a.isDisposed&&0===i.EngineStore.Instances.length&&g()}),a.getCaps().parallelShaderCompile=void 0;let o=new r.EffectRenderer(a),{passPixelShader:l}=await e.A(23899),h=new r.EffectWrapper({engine:a,name:l.name,fragmentShader:l.shader,samplerNames:["textureSampler"]});return{canvas:t,dumpEngine:{engine:a,renderer:o,wrapper:h}}}async function c(){return h||(h=p()),await h}class u{static async EncodeImageAsync(e,t,r,a,i,n){let o=await c(),l=o.dumpEngine;l.engine.setSize(t,r,!0);let h=l.engine.createRawTexture(e,t,r,5,!1,!i,1);return l.renderer.setViewport(),l.renderer.applyEffectWrapper(l.wrapper),l.wrapper.effect._bindTexture("textureSampler",h),l.renderer.draw(),h.dispose(),await new Promise((e,t)=>{s.Tools.ToBlob(o.canvas,r=>{r?e(r):t(Error("EncodeImageAsync: Failed to convert canvas to blob."))},a,n)})}}(0,t.__decorate)([l.nativeOverride],u,"EncodeImageAsync",null);let d=u.EncodeImageAsync;async function f(e,t,r,s,a="image/png",i,n){let o=new Uint8Array((await r.readPixels(0,0,e,t)).buffer);_(e,t,o,s,a,i,!0,void 0,n)}async function m(e,t,r,i="image/png",l,h=!1,p=!1,c){if(r instanceof Float32Array){let e=new Uint8Array(r.length),t=r.length;for(;t--;){let s=r[t];e[t]=Math.round(255*(0,a.Clamp)(s))}r=e}let d=await u.EncodeImageAsync(r,e,t,i,h,c);void 0!==l&&s.Tools.DownloadBlob(d,l),d.type!==i&&n.Logger.Warn(`DumpData: The requested mimeType '${i}' is not supported. The result has mimeType '${d.type}' instead.`);let f=await d.arrayBuffer();return p?f:`data:${i};base64,${(0,o.EncodeArrayBufferToBase64)(f)}`}function _(e,t,r,s,a="image/png",i,n=!1,o=!1,l){void 0!==i||s||(i=""),m(e,t,r,a,i,n,o,l).then(e=>{s&&s(e)})}function g(){h&&(h?.then(e=>{e.canvas instanceof HTMLCanvasElement&&e.canvas.remove(),e.dumpEngine&&(e.dumpEngine.engine.dispose(),e.dumpEngine.renderer.dispose(),e.dumpEngine.wrapper.dispose())}),h=null)}let y=!1;e.s(["Dispose",0,g,"DumpData",0,_,"DumpDataAsync",0,m,"DumpFramebuffer",0,f,"DumpTools",0,{DumpData:_,DumpDataAsync:m,DumpFramebuffer:f,Dispose:g},"EncodeImageAsync",0,d,"RegisterDumpTools",0,function(){y||(y=!0,s.Tools.DumpData=_,s.Tools.DumpDataAsync=m,s.Tools.DumpFramebuffer=f)}])},84658,e=>{"use strict";var t=e.i(65679),r=e.i(10534),s=e.i(35270),a=e.i(12247),i=e.i(58727),n=e.i(68061),o=(e.i(56770),e.i(41190)),l=e.i(83464),h=e.i(13456),p=e.i(93701),c=e.i(5512);let u="image/png",d=[134,22,135,150,246,214,150,54];function f(e){if(e.version>2)throw Error(`Unsupported babylon environment map version "${e.version}". Latest supported version is "2".`);return 2===e.version?e:e={...e,version:2,imageType:u}}async function m(e,t,r,s,a,i,n,o,l,h,p){return await new Promise((c,u)=>{if(r){let r=t.createTexture(null,!0,!0,null,1,null,e=>{u(e)},e);s?.onEffectCreatedObservable.addOnce(o=>{o.executeWhenCompiled(()=>{s.externalTextureSamplerBinding=!0,s.onApply=s=>{s._bindTexture("textureSampler",r),s.setFloat2("scale",1,t._features.needsInvertingBitmap&&e instanceof ImageBitmap?-1:1)},t.scenes.length&&(t.scenes[0].postProcessManager.directRender([s],h,!0,i,n),t.restoreDefaultFramebuffer(),r.dispose(),URL.revokeObjectURL(a),c())})})}else{if(t._uploadImageToTexture(p,e,i,n),o){let r=l[n];r&&t._uploadImageToTexture(r._texture,e,i,0)}c()}})}async function _(e,t,r=u){let s=e.getEngine();e.format=5,e.type=0,e.generateMipMaps=!0,e._cachedAnisotropicFilteringLevel=null,s.updateTextureSamplingMode(3,e),await y(e,t,!0,r),e.isReady=!0}async function g(e,t,r,s=u,a=null){let o=e.getEngine(),l=new i.InternalTexture(o,5),h=new n.BaseTexture(o,l);e._irradianceTexture=h,h._dominantDirection=a,l.isCube=!0,l.format=5,l.type=0,l.generateMipMaps=!0,l._cachedAnisotropicFilteringLevel=null,l.generateMipMaps=!0,l.width=r,l.height=r,o.updateTextureSamplingMode(3,l),await y(l,[t],!1,s),o.generateMipMapsForCubemap(l),l.isReady=!0}async function y(r,a,l,h=u){if(!(0,t.IsExponentOfTwo)(r.width))throw Error("Texture size must be a power of two");let p=(0,s.ILog2)(r.width)+1,d=r.getEngine(),f=!1,_=!1,g=null,b=null,P=null,S=d.getCaps();S.textureLOD?d._features.supportRenderAndCopyToLodForFloatTextures?S.textureHalfFloatRender&&S.textureHalfFloatLinearFiltering?(f=!0,r.type=2):S.textureFloatRender&&S.textureFloatLinearFiltering&&(f=!0,r.type=1):f=!1:(f=!1,_=l);let T=0;if(f)d.isWebGPU?(T=1,await e.A(40343)):await e.A(50570),g=new o.PostProcess("rgbdDecode","rgbdDecode",null,null,1,null,3,d,!1,void 0,r.type,void 0,null,!1,void 0,T),r._isRGBD=!1,r.invertY=!1,b=d.createRenderTargetCubeTexture(r.width,{generateDepthBuffer:!1,generateMipMaps:!0,generateStencilBuffer:!1,samplingMode:3,type:r.type,format:5});else if(r._isRGBD=!0,r.invertY=!0,_){P={};let e=r._lodGenerationScale,t=r._lodGenerationOffset;for(let s=0;s<3;s++){let a=(p-1)*e+t,o=Math.round(Math.min(Math.max(t+(a-t)*(1-s/2),0),a)),l=new i.InternalTexture(d,2);l.isCube=!0,l.invertY=!0,l.generateMipMaps=!1,d.updateTextureSamplingMode(2,l);let h=new n.BaseTexture(null);switch(h._isCube=!0,h._texture=l,P[o]=h,s){case 0:r._lodTextureLow=h;break;case 1:r._lodTextureMid=h;break;case 2:r._lodTextureHigh=h}}}let v=[];for(let e=0;e<a.length;e++)for(let t=0;t<6;t++){let s,i=a[e][t],n=new Blob([(0,c.GetBlobBufferSource)(i)],{type:h}),o=URL.createObjectURL(n);if(d._features.forceBitmapOverHTMLImageElement)s=d.createImageBitmap(n,{premultiplyAlpha:"none",colorSpaceConversion:"none"}).then(async s=>await m(s,d,f,g,o,t,e,_,P,b,r));else{let a=new Image;a.src=o,s=new Promise((s,i)=>{a.onload=()=>{m(a,d,f,g,o,t,e,_,P,b,r).then(()=>s()).catch(e=>{i(e)})},a.onerror=e=>{i(e)}})}v.push(s)}if(await Promise.all(v),a.length<p){let e,t=Math.pow(2,p-1-a.length),s=t*t*4;switch(r.type){case 0:e=new Uint8Array(s);break;case 2:e=new Uint16Array(s);break;case 1:e=new Float32Array(s)}for(let t=a.length;t<p;t++)for(let s=0;s<6;s++)d._uploadArrayBufferViewToTexture(b?.texture||r,e,s,t)}if(b){let e=r._irradianceTexture;r._irradianceTexture=null,d._releaseTexture(r),b._swapAndDie(r),r._irradianceTexture=e}g&&g.dispose(),_&&(r._lodTextureHigh&&r._lodTextureHigh._texture&&(r._lodTextureHigh._texture.isReady=!0),r._lodTextureMid&&r._lodTextureMid._texture&&(r._lodTextureMid._texture.isReady=!0),r._lodTextureLow&&r._lodTextureLow._texture&&(r._lodTextureLow._texture.isReady=!0))}e.s(["GetEnvInfo",0,function(e){let t,r=new DataView(e.buffer,e.byteOffset,e.byteLength),s=0;for(let e=0;e<d.length;e++)if(r.getUint8(s++)!==d[e])return l.Logger.Error("Not a babylon environment map"),null;let a="";for(;t=r.getUint8(s++);)a+=String.fromCharCode(t);let i=JSON.parse(a);return(i=f(i)).binaryDataPosition=s,i.specular&&(i.specular.lodGenerationScale=i.specular.lodGenerationScale||.8),i},"UploadEnvLevelsAsync",0,function(e,t,s){let a=(s=f(s)).specular;if(!a)return Promise.resolve([]);e._lodGenerationScale=a.lodGenerationScale;let i=[],n=function(e,t){let r=(t=f(t)).specular,s=Math.log2(t.width);if(s=Math.round(s)+1,r.mipmaps.length!==6*s)throw Error(`Unsupported specular mipmaps number "${r.mipmaps.length}"`);let a=Array(s);for(let i=0;i<s;i++){a[i]=Array(6);for(let s=0;s<6;s++){let n=r.mipmaps[6*i+s];a[i][s]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+n.position,n.length)}}return a}(t,s);i.push(_(e,n,s.imageType));let o=s.irradiance?.irradianceTexture;if(o){let a=function(e,t){t=f(t);let r=Array(6),s=t.irradiance?.irradianceTexture;if(s){if(6!==s.faces.length)throw Error(`Incorrect irradiance texture faces number "${s.faces.length}"`);for(let a=0;a<6;a++){let i=s.faces[a];r[a]=new Uint8Array(e.buffer,e.byteOffset+t.binaryDataPosition+i.position,i.length)}}return r}(t,s),n=null;s.irradiance?.irradianceTexture?.dominantDirection&&(n=r.Vector3.FromArray(s.irradiance.irradianceTexture.dominantDirection)),i.push(g(e,a,o.size,s.imageType,n))}return Promise.all(i)},"UploadEnvSpherical",0,function(e,t){let s=(t=f(t)).irradiance;if(!s)return;let i=new a.SphericalPolynomial;r.Vector3.FromArrayToRef(s.x,0,i.x),r.Vector3.FromArrayToRef(s.y,0,i.y),r.Vector3.FromArrayToRef(s.z,0,i.z),r.Vector3.FromArrayToRef(s.xx,0,i.xx),r.Vector3.FromArrayToRef(s.yy,0,i.yy),r.Vector3.FromArrayToRef(s.zz,0,i.zz),r.Vector3.FromArrayToRef(s.yz,0,i.yz),r.Vector3.FromArrayToRef(s.zx,0,i.zx),r.Vector3.FromArrayToRef(s.xy,0,i.xy),e._sphericalPolynomial=i},"_UpdateRGBDAsync",0,function(e,t,r,s,a){let i=_(e.getEngine().createRawCubeTexture(null,e.width,e.format,e.type,e.generateMipMaps,e.invertY,e.samplingMode,e._compression),t).then(()=>e);return e.onRebuildCallback=e=>({proxy:i,isReady:!0,isAsync:!0}),e._source=13,e._bufferViewArrayArray=t,e._lodGenerationScale=s,e._lodGenerationOffset=a,e._sphericalPolynomial=r,_(e,t).then(()=>(e.isReady=!0,e))}])},69384,e=>{"use strict";var t=e.i(84658),r=e.i(89102),s=e.i(68061);let a=!1;e.s(["_ENVTextureLoader",0,class{constructor(){this.supportCascades=!1}loadCubeData(e,i,n,o,l){if(Array.isArray(e))return;let h=(0,t.GetEnvInfo)(e);if(h){i.width=h.width,i.height=h.width;try{a||(a=!0,s.BaseTexture.prototype._sphericalPolynomialTargetSize=0,s.BaseTexture.prototype.forceSphericalPolynomialsRecompute=function(){this._texture&&(this._texture._sphericalPolynomial=null,this._texture._sphericalPolynomialPromise=null,this._texture._sphericalPolynomialComputed=!1)},Object.defineProperty(s.BaseTexture.prototype,"sphericalPolynomial",{get:function(){if(this._texture){if(this._texture._sphericalPolynomial||this._texture._sphericalPolynomialComputed)return this._texture._sphericalPolynomial;this._texture.isReady&&(this._texture._sphericalPolynomialPromise||(this._texture._sphericalPolynomialPromise=r.CubeMapToSphericalPolynomialTools.ConvertCubeMapTextureToSphericalPolynomial(this),null===this._texture._sphericalPolynomialPromise?this._texture._sphericalPolynomialComputed=!0:this._texture._sphericalPolynomialPromise.then(e=>{this._texture._sphericalPolynomial=e,this._texture._sphericalPolynomialComputed=!0})))}return null},set:function(e){this._texture&&(this._texture._sphericalPolynomial=e)},enumerable:!0,configurable:!0})),(0,t.UploadEnvSpherical)(i,h),(0,t.UploadEnvLevelsAsync)(i,e,h).then(()=>{i.isReady=!0,i.onLoadedObservable.notifyObservers(i),i.onLoadedObservable.clear(),o&&o()},e=>{l?.("Can not upload environment levels",e)})}catch(e){l?.("Can not upload environment file",e)}}else l&&l("Can not parse the environment file",null)}loadData(){throw".env not supported in 2d."}}],69384)},88484,e=>{e.v(t=>Promise.all(["static/chunks/1kl5xxohpr6-4.js"].map(t=>e.l(t))).then(()=>t(99916)))},13831,e=>{e.v(t=>Promise.all(["static/chunks/1f92k-xa0pl-3.js"].map(t=>e.l(t))).then(()=>t(86742)))},16301,e=>{e.v(t=>Promise.all(["static/chunks/1-ud6hztxiazp.js"].map(t=>e.l(t))).then(()=>t(57348)))},23899,e=>{e.v(t=>Promise.all(["static/chunks/2dolerz81xb52.js"].map(t=>e.l(t))).then(()=>t(36090)))},17030,e=>{e.v(t=>Promise.all(["static/chunks/2kn_dqzbyabtn.js"].map(t=>e.l(t))).then(()=>t(67861)))},94467,e=>{e.v(t=>Promise.all(["static/chunks/0c2k-gvwph4qs.js"].map(t=>e.l(t))).then(()=>t(31151)))},28636,e=>{e.v(t=>Promise.all(["static/chunks/0mk8tangq9equ.js"].map(t=>e.l(t))).then(()=>t(86828)))},38938,e=>{e.v(t=>Promise.all(["static/chunks/3he9bxsc67ivq.js"].map(t=>e.l(t))).then(()=>t(76530)))},11,e=>{e.v(t=>Promise.all(["static/chunks/22qzld31fbhbv.js"].map(t=>e.l(t))).then(()=>t(82014)))},11326,e=>{e.v(t=>Promise.all(["static/chunks/3sbm1ak54_2ep.js"].map(t=>e.l(t))).then(()=>t(20009)))},79994,e=>{e.v(t=>Promise.all(["static/chunks/2vmybybb3dvia.js"].map(t=>e.l(t))).then(()=>t(16388)))},28348,e=>{e.v(t=>Promise.all(["static/chunks/0x4-zyy8pzmlq.js"].map(t=>e.l(t))).then(()=>t(78529)))},26797,e=>{e.v(t=>Promise.all(["static/chunks/286ggpetqnwyo.js"].map(t=>e.l(t))).then(()=>t(43682)))},50570,e=>{e.v(t=>Promise.all(["static/chunks/1b2tkk7e_2o0k.js"].map(t=>e.l(t))).then(()=>t(93822)))},40343,e=>{e.v(t=>Promise.all(["static/chunks/2dqg85hsevk3c.js"].map(t=>e.l(t))).then(()=>t(7058)))},55967,e=>{e.v(t=>Promise.all(["static/chunks/0zwkmsojeuekb.js"].map(t=>e.l(t))).then(()=>t(79789)))},82777,e=>{e.v(t=>Promise.all(["static/chunks/1rne-b-ktit5c.js"].map(t=>e.l(t))).then(()=>t(60512)))},14235,e=>{e.v(t=>Promise.all(["static/chunks/2f0r-df7tb3pu.js"].map(t=>e.l(t))).then(()=>t(93891)))}]);