@uptimizr/dashboard 0.3.6 → 0.4.1

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 (31) hide show
  1. package/README.md +16 -8
  2. package/out/404.html +1 -1
  3. package/out/__next.__PAGE__.txt +2 -2
  4. package/out/__next._full.txt +3 -3
  5. package/out/__next._head.txt +1 -1
  6. package/out/__next._index.txt +2 -2
  7. package/out/__next._tree.txt +2 -2
  8. package/out/_next/static/chunks/{3iwf5yeurp57i.js → 1-4v8oivkgnyl.js} +3 -3
  9. package/out/_next/static/chunks/1xqv11mvnfa8n.js +1 -0
  10. package/out/_next/static/chunks/2_rc4w-1zqj0b.js +1 -0
  11. package/out/_next/static/chunks/2ru5rfia-y2hd.js +1 -0
  12. package/out/_next/static/chunks/2x83vs8ns4pww.js +74 -0
  13. package/out/_next/static/chunks/34845aqksy1dl.js +3 -0
  14. package/out/_next/static/chunks/3_jmgj9glg_z2.css +3 -0
  15. package/out/_not-found/__next._full.txt +2 -2
  16. package/out/_not-found/__next._head.txt +1 -1
  17. package/out/_not-found/__next._index.txt +2 -2
  18. package/out/_not-found/__next._not-found.__PAGE__.txt +1 -1
  19. package/out/_not-found/__next._not-found.txt +1 -1
  20. package/out/_not-found/__next._tree.txt +2 -2
  21. package/out/_not-found.html +1 -1
  22. package/out/_not-found.txt +2 -2
  23. package/out/index.html +1 -1
  24. package/out/index.txt +3 -3
  25. package/package.json +5 -4
  26. package/out/_next/static/chunks/06f-0kw8s0mqo.js +0 -3
  27. package/out/_next/static/chunks/2kv9_bt15v83g.js +0 -1
  28. package/out/_next/static/chunks/3ef6upwlgr4q-.css +0 -3
  29. /package/out/_next/static/{yF_tmb8VExvESewet-_To → KOVbqg1TLKKpa1XmuMLXi}/_buildManifest.js +0 -0
  30. /package/out/_next/static/{yF_tmb8VExvESewet-_To → KOVbqg1TLKKpa1XmuMLXi}/_clientMiddlewareManifest.js +0 -0
  31. /package/out/_next/static/{yF_tmb8VExvESewet-_To → KOVbqg1TLKKpa1XmuMLXi}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,77269,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"BailoutToCSR",{enumerable:!0,get:function(){return r}});let n=e.r(47201);function r({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new n.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},51974,(e,t,s)=>{"use strict";function n(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"encodeURIPath",{enumerable:!0,get:function(){return n}})},55650,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"PreloadChunks",{enumerable:!0,get:function(){return o}});let n=e.r(46369),r=e.r(54737),a=e.r(98269),i=e.r(51974),l=e.r(91100);function o({moduleIds:e}){if("u">typeof window)return null;let t=a.workAsyncStorage.getStore();if(void 0===t)return null;let s=[];if(t.reactLoadableManifest&&e){let n=t.reactLoadableManifest;for(let t of e){if(!n[t])continue;let e=n[t].files;s.push(...e)}}if(0===s.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,n.jsx)(n.Fragment,{children:s.map(e=>{let s=`${t.assetPrefix}/_next/${(0,i.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,n.jsx)("link",{precedence:"dynamic",href:s,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,r.preload)(s,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},11438,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return c}});let n=e.r(46369),r=e.r(19594),a=e.r(77269),i=e.r(55650);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},s=(0,r.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,n.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?r.Suspense:r.Fragment,u=t.ssr?(0,n.jsxs)(n.Fragment,{children:["u"<typeof window?(0,n.jsx)(i.PreloadChunks,{moduleIds:t.modules}):null,(0,n.jsx)(s,{...e})]}):(0,n.jsx)(a.BailoutToCSR,{reason:"next/dynamic",children:(0,n.jsx)(s,{...e})});return(0,n.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},42633,(e,t,s)=>{"use strict";Object.defineProperty(s,"__esModule",{value:!0}),Object.defineProperty(s,"default",{enumerable:!0,get:function(){return r}});let n=e.r(81258)._(e.r(11438));function r(e,t){let s={};"function"==typeof e&&(s.loader=e);let r={...s,...t};return(0,n.default)({...r,modules:r.loadableGenerated?.modules})}("function"==typeof s.default||"object"==typeof s.default&&null!==s.default)&&void 0===s.default.__esModule&&(Object.defineProperty(s.default,"__esModule",{value:!0}),Object.assign(s.default,s),t.exports=s.default)},14936,e=>{"use strict";var t=e.i(85053),s=e.i(46369),n=e.i(42633),r=e.i(19594);let a=!!t.default.env.NEXT_PUBLIC_COLLECTOR_URL,i=t.default.env.NEXT_PUBLIC_COLLECTOR_URL??"http://localhost:4318",l="1"===t.default.env.DASHBOARD_STATIC?"":t.default.env.NEXT_PUBLIC_API_KEY??"",o=t.default.env.NEXT_PUBLIC_PLAYGROUND_URL??"http://localhost:5173";class c extends Error{status;constructor(e,t){super(e),this.status=t,this.name="ApiError"}}async function d(e,t,s){let n=e.getReader(),r=new TextDecoder,a="";for(t.addEventListener("abort",()=>void n.cancel().catch(()=>{}));;){let{done:e,value:t}=await n.read();if(e)return;let i=(a+=r.decode(t,{stream:!0})).indexOf("\n\n");for(;i>=0;){let e=a.slice(0,i);a=a.slice(i+2);let t="message",n=[];for(let s of e.split("\n"))!s.startsWith(":")&&(s.startsWith("event:")?t=s.slice(6).trim():s.startsWith("data:")&&n.push(s.slice(5).replace(/^ /,"")));"event"===t&&n.length>0&&s(n.join("\n")),i=a.indexOf("\n\n")}}}class u{baseUrl;apiKey;constructor(e,t){this.baseUrl=e,this.apiKey=t}async get(e,t={}){let s=new URL(e,m(this.baseUrl));for(let[e,n]of Object.entries(t))null!=n&&s.searchParams.set(e,String(n));let n=await fetch(s,{headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!n.ok)throw new c(await n.text().catch(()=>"")||n.statusText,n.status);return await n.json()}sessions(e){return this.get("api/v1/sessions",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}pointerHeatmap(e){return this.get("api/v1/heatmaps/pointer",e)}meshUvHeatmap(e){return this.get("api/v1/heatmaps/mesh-uv",e)}cameraHeatmap(e){return this.get("api/v1/heatmaps/camera",e)}viewCoverageHistogram(e){return this.get("api/v1/coverage/view-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}topMeshes(e){return this.get("api/v1/meshes/top",e).then(e=>e.map(e=>({...e,count:Number(e.count)})))}meshBlindSpots(e){return this.get("api/v1/meshes/blind-spots",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),visible_ms:Number(e.visible_ms??0),vis_samples:Number(e.vis_samples??0),interactions:Number(e.interactions??0),hover_ms:Number(e.hover_ms??0),hover_episodes:Number(e.hover_episodes??0)})))}meshKinds(e){return this.get("api/v1/meshes/kinds",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),kind:String(e.kind??""),count:Number(e.count??0)})))}reachability(e){return this.get("api/v1/meshes/reachability",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0),avg_distance:Number(e.avg_distance??0)})))}topMeshesBySource(e){return this.get("api/v1/meshes/sources",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),source:String(e.source??""),count:Number(e.count??0)})))}topMeshesTrend(e){return this.get("api/v1/meshes/trend",e).then(e=>e.map(e=>({mesh:String(e.mesh??""),bucket:Number(e.bucket??0),count:Number(e.count??0)})))}topInputActions(e){return this.get("api/v1/input-actions/top",e).then(e=>e.map(e=>({action:String(e.action??""),source:String(e.source??""),count:Number(e.count??0)})))}perf(e){return this.get("api/v1/perf",e).then(e=>({samples:Number(e.samples??0),avg_fps:Number(e.avg_fps??0),min_fps:Number(e.min_fps??0),p50_fps:Number(e.p50_fps??0)}))}renderScale(e){return this.get("api/v1/perf/render-scale",e).then(e=>{let t=e[0]??{},s=Number(t.downscaled_samples??0),n=Number(t.scale_samples??0);return{samples:Number(t.samples??0),avg_fps:Number(t.avg_fps??0),p50_fps:Number(t.p50_fps??0),avg_render_scale:Number(t.avg_render_scale??0),p50_render_scale:Number(t.p50_render_scale??0),downscaled_samples:s,scale_samples:n,downscaled_share:n>0?s/n:0}})}perfDistribution(e){return this.get("api/v1/perf/distribution",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p05_fps:Number(t.p05_fps??0),p50_fps:Number(t.p50_fps??0),p95_fps:Number(t.p95_fps??0)}})}fpsHistogram(e){return this.get("api/v1/perf/fps-histogram",e).then(e=>e.map(e=>({bucket:Number(e.bucket??0),sessions:Number(e.sessions??0)})))}frameTimePercentiles(e){return this.get("api/v1/perf/frame-time",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_ms:Number(t.p50_ms??0),p95_ms:Number(t.p95_ms??0)}})}jankRate(e){return this.get("api/v1/perf/jank",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),total_long_frames:Number(t.total_long_frames??0),median_rate:Number(t.median_rate??0),worst_decile_rate:Number(t.worst_decile_rate??0)}})}perfChurn(e){return this.get("api/v1/perf/churn",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),churn_sessions:Number(t.churn_sessions??0),fps_churn_sessions:Number(t.fps_churn_sessions??0),stall_churn_sessions:Number(t.stall_churn_sessions??0)}})}perfByDevice(e){return this.get("api/v1/perf/by-device",e).then(e=>e.map(e=>({engine:String(e.engine??""),is_mobile:String(e.is_mobile??""),renderer:String(e.renderer??""),browser:String(e.browser??""),os:String(e.os??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}perfByScene(e){return this.get("api/v1/perf/by-scene",e).then(e=>e.map(e=>({scene_id:String(e.scene_id??""),sessions:Number(e.sessions??0),samples:Number(e.samples??0),p50_fps:Number(e.p50_fps??0)})))}resourcePercentiles(e){return this.get("api/v1/perf/resource-percentiles",e).then(e=>{let t=e[0]??{};return{sessions:Number(t.sessions??0),samples:Number(t.samples??0),p50_js_heap_bytes:Number(t.p50_js_heap_bytes??0),p95_js_heap_bytes:Number(t.p95_js_heap_bytes??0),p50_texture_bytes:Number(t.p50_texture_bytes??0),p95_texture_bytes:Number(t.p95_texture_bytes??0),p50_triangles:Number(t.p50_triangles??0),p95_triangles:Number(t.p95_triangles??0)}})}stabilityCounts(e){return this.get("api/v1/perf/stability",e).then(e=>{let t=e[0]??{};return{context_losses:Number(t.context_losses??0),compile_stalls:Number(t.compile_stalls??0),incidents:Number(t.incidents??0)}})}graphicsDiagnosticCounts(e){return this.get("api/v1/graphics-diagnostics",e).then(e=>e.map(e=>({severity:String(e.severity??""),category:String(e.category??""),backend:String(e.backend??""),incidents:Number(e.incidents??0)})))}renderingTechnology(e){return this.get("api/v1/rendering-technology",e).then(e=>e.map(e=>({api:String(e.api??""),backend:String(e.backend??""),apiVersion:String(e.api_version??""),shadingLanguage:String(e.shading_language??""),sessions:Number(e.sessions??0)})))}worldHeatmap(e){return this.get("api/v1/heatmaps/world",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}gazeHeatmap(e){return this.get("api/v1/heatmaps/gaze",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}errorHeatmap(e){return this.get("api/v1/heatmaps/errors",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count)})))}worldHeatmapStats(e){return this.get("api/v1/heatmaps/world/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}gazeHeatmapStats(e){return this.get("api/v1/heatmaps/gaze/stats",e).then(e=>({cellSize:Number(e.cellSize??0),cells:Number(e.cells??0),hits:Number(e.hits??0)}))}cameraPositionHeatmap(e){return this.get("api/v1/heatmaps/position",e).then(e=>e.map(e=>({gx:Number(e.gx),gz:Number(e.gz),avg_y:Number(e.avg_y??0),count:Number(e.count??0)})))}sessionTrajectory(e,t){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/trajectory`,t).then(e=>e.map(e=>({ts:Number(e.ts),x:Number(e.x),y:Number(e.y),z:Number(e.z)})))}aggregatePaths(e){return this.get("api/v1/paths",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),ts:Number(e.ts),gx:Number(e.gx),gz:Number(e.gz)})))}clickRays(e){return this.get("api/v1/heatmaps/click-rays",e).then(e=>e.map(e=>({camVoxel:[Number(e.cam_vx),Number(e.cam_vy),Number(e.cam_vz)],origin:[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)],hitVoxel:[Number(e.hit_vx),Number(e.hit_vy),Number(e.hit_vz)],hit:[Number(e.hit_x),Number(e.hit_y),Number(e.hit_z)],mesh:String(e.mesh??""),count:Number(e.count)})))}flowHeatmap(e){return this.get("api/v1/heatmaps/flow",e).then(e=>e.map(e=>{let t={azimuth_bin:Number(e.azimuth_bin),elevation_bin:Number(e.elevation_bin),mesh:String(e.mesh??""),count:Number(e.count)};return null!=e.origin_vx&&(t.originVoxel=[Number(e.origin_vx),Number(e.origin_vy),Number(e.origin_vz)],t.origin=[Number(e.origin_x),Number(e.origin_y),Number(e.origin_z)]),t}))}scenes(e){return this.get("api/v1/scenes",e).then(e=>e.map(e=>({...e,events:Number(e.events)})))}timeseries(e){return this.get("api/v1/timeseries",e).then(e=>e.map(e=>({bucket:Number(e.bucket),events:Number(e.events??0),avg_fps:Number(e.avg_fps??0)})))}eventCounts(e){return this.get("api/v1/event-counts",e).then(e=>e.map(e=>({event_type:String(e.event_type),count:Number(e.count??0)})))}funnel(e,t){return this.get("api/v1/funnel",{...t,steps:JSON.stringify(e)}).then(e=>e.map(e=>({step:Number(e.step),sessions:Number(e.sessions??0)})))}sceneRetention(e){return this.get("api/v1/scene-retention",e).then(e=>e.map(e=>({from:String(e.from_scene??""),to:String(e.to_scene??""),sessions:Number(e.sessions??0)})))}loadBounce(e){let{bands:t,...s}=e??{};return this.get("api/v1/load-bounce",{...s,...null!=t&&t.length>0?{bands:t.join(",")}:{}}).then(e=>e.map(e=>({band:Number(e.band??0),sessions:Number(e.sessions??0),bounced:Number(e.bounced??0)})))}variantLeaderboard(e={},t){return this.get("api/v1/variant-leaderboard",{...t,variant:e.variant?JSON.stringify(e.variant):void 0,conversion:e.conversion?JSON.stringify(e.conversion):void 0}).then(e=>e.map(e=>{let t=Number(e.sessions??0),s=Number(e.conversions??0);return{variant:String(e.variant),views:Number(e.views??0),sessions:t,conversions:s,avgDwellMs:Number(e.avg_dwell_ms??0),conversionRate:t>0?s/t:0}}))}coverage(e){return this.get("api/v1/coverage",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),count:Number(e.count??0)})))}perfHeatmap(e){return this.get("api/v1/heatmaps/perf",e).then(e=>e.map(e=>({vx:Number(e.vx),vy:Number(e.vy),vz:Number(e.vz),samples:Number(e.samples??0),avgFps:Number(e.avg_fps??0),minFps:Number(e.min_fps??0)})))}cameraDistance(e){return this.get("api/v1/camera/distance",e).then(e=>e.map(e=>({bucket:Number(e.bucket),count:Number(e.count??0)})))}navigation(e){return this.get("api/v1/navigation",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),segments:Number(e.segments??0),total_distance:Number(e.total_distance??0),active_segments:Number(e.active_segments??0),active_distance:Number(e.active_distance??0)})))}backtrackRatio(e){return this.get("api/v1/backtrack",e).then(e=>e.map(e=>({scene:String(e.scene??""),sessions:Number(e.sessions??0),entries:Number(e.entries??0),revisits:Number(e.revisits??0),backtrack_ratio:Number(e.backtrack_ratio??0)})))}cameraGestures(e){return this.get("api/v1/camera-gestures",e).then(e=>e.map(e=>({kind:String(e.kind??""),gestures:Number(e.gestures??0),total_ms:Number(e.total_ms??0),avg_ms:Number(e.avg_ms??0),max_ms:Number(e.max_ms??0)})))}interactionsBySource(e){return this.get("api/v1/interactions/sources",e).then(e=>e.map(e=>({event_type:String(e.event_type??""),source:String(e.source??""),count:Number(e.count??0),sessions:Number(e.sessions??0)})))}xrLocomotion(e){return this.get("api/v1/xr/locomotion",e).then(e=>e.map(e=>({session_id:String(e.session_id??""),fly_gestures:Number(e.fly_gestures??0),navigate_gestures:Number(e.navigate_gestures??0),teleports:Number(e.teleports??0),locomotion_ms:Number(e.locomotion_ms??0),started_at:String(e.started_at??""),ended_at:String(e.ended_at??"")})))}sessionMeta(e){return this.get(`api/v1/sessions/${encodeURIComponent(e)}/meta`)}async sceneRepresentation(e){try{return await this.get(`api/v1/scenes/${encodeURIComponent(e)}/representation`)}catch(e){if(e instanceof c&&404===e.status)return null;throw e}}async liveToken(){let e=new URL("api/v1/live/token",m(this.baseUrl)),t=await fetch(e,{method:"POST",headers:{"x-api-key":this.apiKey},cache:"no-store"});if(!t.ok)throw new c(await t.text().catch(()=>"")||t.statusText,t.status);return await t.json()}livePresenceUrl(e){let t=new URL("api/v1/live/presence",m(this.baseUrl));return t.searchParams.set("token",e),t.toString()}liveStreamUrl(e,t){let s=new URL("api/v1/live/stream",m(this.baseUrl));return s.searchParams.set("token",e),t&&t.length>0&&s.searchParams.set("types",t.join(",")),s.toString()}liveSessionUrl(e,t){let s=new URL(`api/v1/live/sessions/${encodeURIComponent(t)}`,m(this.baseUrl));return s.searchParams.set("token",e),s.toString()}async sessionEvents(t){let{fetchSessionEvents:s}=await e.A(85461);return s({endpoint:this.baseUrl,apiKey:this.apiKey,sessionId:t})}liveSession(e,t,s){if(!this.apiKey||!this.baseUrl||!e)return s?.onState?.({status:"idle",gated:!1,count:0}),()=>{};let n=!1,r=0,a=null,i=null,l=0,o="idle",c=!1,u=()=>s?.onState?.({status:o,gated:c,count:l}),m=e=>{o=e,u()},h=()=>{if(n)return;m("reconnecting");let e=Math.min(1e3*2**r,15e3);r+=1,i=setTimeout(()=>void p(),e)},p=async()=>{let i;if(!n){m(0===r?"connecting":"reconnecting"),s?.onReset?.(),l=0,u();try{({token:i}=await this.liveToken())}catch{h();return}if(!n){a=new AbortController;try{let s=await fetch(this.liveSessionUrl(i,e),{headers:{accept:"text/event-stream"},cache:"no-store",signal:a.signal});if(403===s.status){c=!0,m("idle");return}if(!s.ok||!s.body)return void h();r=0,m("open"),await d(s.body,a.signal,e=>{try{t(JSON.parse(e)),l+=1,u()}catch{}}),n||h()}catch{n||h()}}}};return p(),()=>{n=!0,i&&clearTimeout(i),a?.abort()}}}function m(e){return e.endsWith("/")?e:`${e}/`}let h={window:"1h"},p=[{id:"1h",label:"Last hour"},{id:"24h",label:"Last 24h"},{id:"7d",label:"Last 7 days"},{id:"all",label:"All time"}],x={"1h":36e5,"24h":864e5,"7d":6048e5};function g(e,t=Date.now()){return"all"===e.window?{}:"custom"===e.window?{since:e.since,until:e.until}:{since:t-x[e.window],until:t}}function f(e,t=Date.now()){return{...g(e,t),scene:e.scene&&e.scene.length>0?e.scene:void 0,source:e.source,cameraMode:e.cameraMode}}let b=[60,300,900,1800,3600,10800,21600,43200,86400,604800];function v(e,t=80){let s=Math.max(60,Math.round(e/t/1e3));return b.find(e=>e>=s)??604800}function j(e){return"xr-controller"===e?"XR controller":e.charAt(0).toUpperCase()+e.slice(1)}let y=["mouse","touch","stylus","pen","xr-controller","hand","gaze","transient","other"];var N=e.i(56054);function w(e,t=1){let[s,n,r]=(0,N.heatRgb)(e);return`rgba(${Math.round(255*s)}, ${Math.round(255*n)}, ${Math.round(255*r)}, ${t})`}function k(e){return new Date(e.includes("T")?e:e.replace(" ","T")+"Z").getTime()}function S(e,t=0){return Number.isFinite(e)?e.toLocaleString(void 0,{maximumFractionDigits:t}):"—"}var _=e.i(60614);let M="Live now",C="Active sessions and a real-time event feed, updating in place.",z=(0,s.jsx)(s.Fragment,{children:"Sessions seen within the liveness window, streamed over SSE from the collector. The roster is intentionally non-identifying — no geo, user-agent, or visitor id. Click a session to follow it live."});function P(e){return e.length>10?`${e.slice(0,8)}…`:e}function R(e,t){let s=Math.max(0,Math.round((t-e)/1e3));if(s<60)return`${s}s ago`;let n=Math.floor(s/60);return n<60?`${n}m ago`:`${Math.floor(n/60)}h ago`}let T={active:"bg-emerald-400",recent:"bg-amber-400",idle:"bg-fg-muted"},$={idle:"offline",connecting:"connecting…",open:"live",reconnecting:"reconnecting…"};function E({status:e,sessions:t}){let n="open"===e;return(0,s.jsxs)("span",{className:"inline-flex items-center gap-2 rounded-full border border-edge bg-ink px-3 py-1 text-xs",children:[(0,s.jsxs)("span",{className:"relative flex h-2 w-2",children:[n?(0,s.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-emerald-400 opacity-75"}):null,(0,s.jsx)("span",{className:`relative inline-flex h-2 w-2 rounded-full ${n?"bg-emerald-400":"idle"===e?"bg-fg-muted":"bg-amber-400"}`})]}),(0,s.jsx)("span",{className:"font-medium text-fg",children:n?`${S(t)} live now`:$[e]})]})}function I({snapshot:e,status:t,feed:n,now:r,onSelectSession:a}){let i=e?.sessions??[],l=e?.activeSessions??0,o=e?.activeVisitors??0;return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mb-3 flex flex-wrap items-center gap-4",children:[(0,s.jsx)(E,{status:t,sessions:l}),(0,s.jsxs)("span",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"font-semibold text-fg",children:S(o)})," visitor",1===o?"":"s"]})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsxs)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:["Sessions (",i.length,")"]}),0===i.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===t?"No active sessions right now.":"Waiting for live data…"}):(0,s.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1",children:i.map(e=>(0,s.jsx)("li",{children:a?(0,s.jsxs)("button",{type:"button",onClick:()=>a(e.sessionId),className:"flex w-full items-center gap-2 rounded-md border border-transparent px-2 py-1.5 text-left transition hover:border-edge hover:bg-ink",children:[(0,s.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${T[e.activity]}`,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"font-mono text-xs text-fg",children:P(e.sessionId)}),(0,s.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,s.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:R(e.lastSeen,r)})]}):(0,s.jsxs)("div",{className:"flex w-full items-center gap-2 px-2 py-1.5",children:[(0,s.jsx)("span",{className:`h-2 w-2 flex-none rounded-full ${T[e.activity]}`,"aria-hidden":"true"}),(0,s.jsx)("span",{className:"font-mono text-xs text-fg",children:P(e.sessionId)}),(0,s.jsx)("span",{className:"truncate text-xs text-fg-muted",children:e.sceneId}),(0,s.jsx)("span",{className:"ml-auto flex-none text-xs text-fg-muted",children:R(e.lastSeen,r)})]})},e.sessionId))})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-2 text-xs uppercase tracking-wide text-fg-muted",children:"Event feed"}),0===n.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"open"===t?"Listening for events…":"Waiting for live data…"}):(0,s.jsx)("ul",{className:"flex max-h-64 flex-col gap-1 overflow-y-auto pr-1 font-mono text-xs",children:n.map((e,t)=>(0,s.jsxs)("li",{className:"flex items-center gap-2 rounded-md px-2 py-1",children:[(0,s.jsx)("span",{className:"flex-none rounded bg-amber/15 px-1.5 py-0.5 text-[11px] text-saffron",children:e.type}),(0,s.jsx)("span",{className:"text-fg-muted",children:P(e.sessionId)}),(0,s.jsx)("span",{className:"ml-auto flex-none text-fg-muted",children:R(e.ts,r)})]},`${e.sessionId}-${e.ts}-${t}`))})]})]})]})}function A(e,t,s,n){let r={cancelled:!1,source:null,timer:null},a=0,i=async()=>{let i;if(r.cancelled)return;n(0===a?"connecting":"reconnecting");try{let{token:s}=await e.liveToken();i=t(s)}catch{l();return}if(r.cancelled)return;let o=new EventSource(i);r.source=o,o.onopen=()=>{a=0,n("open")},o.onerror=()=>{o.close(),r.source===o&&(r.source=null),l()},s(o)},l=()=>{if(r.cancelled)return;n("reconnecting");let e=Math.min(1e3*2**a,15e3);a+=1,r.timer=setTimeout(()=>void i(),e)};return i(),()=>{r.cancelled=!0,r.timer&&clearTimeout(r.timer),r.source?.close(),r.source=null}}let F=e=>import(e);async function L(e,t={}){var s;let n,r=t.fetchImpl??fetch;try{let s=await r(e,{signal:t.signal});if(!s.ok)return{source:e,code:"manifest-fetch",message:`HTTP ${s.status}`};n=await s.json()}catch(t){return{source:e,code:"manifest-fetch",message:U(t)}}return"object"==typeof(s=n)&&null!==s&&"number"==typeof s.version&&Array.isArray(s.panels)&&s.panels.every(e=>"object"==typeof e&&null!==e&&"string"==typeof e.url&&e.url.length>0&&"number"==typeof e.contract&&(void 0===e.export||"string"==typeof e.export)&&(void 0===e.id||"string"==typeof e.id))?n:{source:e,code:"manifest-invalid",message:"Manifest shape is invalid"}}async function D(e,t={}){let s=t.importModule??F,n=[],r=[];for(let a of(await Promise.all(e.panels.map(e=>O(e,s,t.allowOrigins)))))"panel"in a?n.push(a.panel):r.push(a.error);return{panels:n,errors:r}}async function O(e,t,s){var n;let r,a,i=e.url;if(1!==e.contract)return{error:{source:i,code:"incompatible",message:`Panel declares contract ${e.contract}; host requires 1`}};if(!function(e,t){let s;if(!t||0===t.length)return!0;try{s=new URL(e).origin}catch{return!1}return t.includes(s)}(e.url,s))return{error:{source:i,code:"origin-blocked",message:"Module origin is not in the allowlist"}};try{r=await t(e.url)}catch(e){return{error:{source:i,code:"import-failed",message:U(e)}}}let l=e.export??"default",o=void 0!==(a=(n=r)[l])?a:"default"===l&&void 0!==n.panel?n.panel:void 0;return void 0===o?{error:{source:i,code:"export-missing",message:`No "${l}" export found`}}:"object"==typeof o&&null!==o&&"string"==typeof o.id&&0!==o.id.length&&"string"==typeof o.title&&"function"==typeof o.render&&(void 0===o.load||"function"==typeof o.load)&&(void 0===o.enabled||"function"==typeof o.enabled)&&(void 0===o.span||1===o.span||2===o.span)&&(void 0===o.surfaces||Array.isArray(o.surfaces))&&1?{panel:o}:{error:{source:i,code:"invalid-panel",message:"Export is not a valid PanelDefinition"}}}function U(e){return e instanceof Error?e.message:String(e)}var B=r;let H={hidden:[],settings:{}},V={load:()=>H,save:()=>{}};function K({children:e,label:t="More information"}){return(0,s.jsxs)("span",{className:"group relative inline-flex",children:[(0,s.jsx)("button",{type:"button","aria-label":t,className:"flex h-4 w-4 items-center justify-center rounded-full border border-edge text-[10px] font-bold leading-none text-fg-muted transition hover:border-amber hover:text-fg-hi focus:outline-none focus:ring-1 focus:ring-amber",children:"?"}),(0,s.jsx)("span",{role:"tooltip",className:"pointer-events-none absolute left-1/2 top-6 z-20 w-64 -translate-x-1/2 rounded-md border border-edge bg-ink/95 p-2.5 text-xs font-normal normal-case leading-relaxed tracking-normal text-fg opacity-0 shadow-lg shadow-black/40 transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",children:e})]})}function W({label:e,onClick:t,active:n=!1,children:r}){return(0,s.jsx)("button",{type:"button","aria-label":e,title:e,onClick:t,"aria-pressed":n,className:`flex h-6 w-6 items-center justify-center rounded-md border text-sm leading-none transition focus:outline-none focus:ring-1 focus:ring-amber ${n?"border-amber text-amber":"border-edge text-fg-muted hover:border-amber hover:text-fg-hi"}`,children:r})}function G({title:e,subtitle:t,help:n,children:a,className:i="",collapsible:l=!1,defaultCollapsed:o=!1,onHide:c,settings:d}){let[u,m]=(0,r.useState)(l&&o),[h,p]=(0,r.useState)(!1),x=(0,s.jsxs)("header",{className:u?"":"mb-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold uppercase tracking-wide text-fg",children:e}),l?(0,s.jsx)("span",{"aria-hidden":"true",className:"text-xs text-fg-muted",children:u?"▸":"▾"}):null,n?(0,s.jsx)(K,{label:`About: ${e}`,children:n}):null]}),t?(0,s.jsx)("p",{className:"mt-0.5 text-xs text-fg-muted",children:t}):null]}),g=!!d||!!c;return(0,s.jsxs)("section",{className:`rounded-xl border border-edge bg-panel p-4 shadow-lg shadow-black/20 ${i}`,children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[l?(0,s.jsx)("button",{type:"button",onClick:()=>m(e=>!e),"aria-expanded":u?"false":"true",className:"min-w-0 flex-1 text-left",children:x}):(0,s.jsx)("div",{className:"min-w-0 flex-1",children:x}),g?(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[d?(0,s.jsx)(W,{label:`${e} settings`,active:h,onClick:()=>p(e=>!e),children:(0,s.jsx)("span",{"aria-hidden":"true",children:"⚙"})}):null,c?(0,s.jsx)(W,{label:`Hide ${e}`,onClick:c,children:(0,s.jsx)("span",{"aria-hidden":"true",children:"×"})}):null]}):null]}),d&&h?(0,s.jsx)("div",{className:"mb-3 rounded-lg border border-edge bg-ink/40 p-3",children:d}):null,u?null:a]})}function X({panelId:e,spec:t,values:n,onChange:a,onReset:i,showReset:l=!0}){let o=(0,r.useId)(),c=Object.keys(t);return 0===c.length?null:(0,s.jsxs)("div",{className:"space-y-3","data-panel-settings":e,children:[c.map(e=>{let r=t[e];if(!r)return null;let i=`${o}-${e}`,l=r.label??e;return(0,s.jsxs)("div",{className:"space-y-1",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("label",{htmlFor:i,className:"text-xs font-medium text-fg",children:l}),"number"===r.type?(0,s.jsxs)("span",{className:"text-xs tabular-nums text-fg-muted",children:[String(n[e]),r.unit?` ${r.unit}`:""]}):null]}),"number"===r.type?(0,s.jsx)("input",{id:i,type:"range",className:"w-full accent-amber",min:r.min,max:r.max,step:r.step??1,value:Number(n[e]),onChange:t=>a(e,Number(t.target.value))}):null,"boolean"===r.type?(0,s.jsxs)("label",{htmlFor:i,className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,s.jsx)("input",{id:i,type:"checkbox",className:"accent-amber",checked:!!n[e],onChange:t=>a(e,t.target.checked)}),r.help??"Enabled"]}):null,"select"===r.type?(0,s.jsx)("select",{id:i,className:"w-full rounded-md border border-edge bg-ink px-2 py-1 text-xs text-fg",value:String(n[e]),onChange:t=>a(e,t.target.value),children:r.options.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label??e.value},e.value))}):null,"boolean"!==r.type&&r.help?(0,s.jsx)("p",{className:"text-[11px] leading-tight text-fg-muted",children:r.help}):null]},e)}),l?(0,s.jsx)("button",{type:"button",onClick:i,className:"text-[11px] text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Reset to defaults"}):null]})}function J({panels:e,ctx:t,surface:n,revision:a=0,exclude:i}){let l=function(e,t){let s=(0,r.useMemo)(()=>{var t;let s;return(void 0)??(t=`uptimizr:dashboard:panels:${e}`,(s=window.localStorage?window.localStorage:null)?{load(){try{let e=s.getItem(t);return e?function(e){if(!e||"object"!=typeof e)return H;let t=Array.isArray(e.hidden)?e.hidden.filter(e=>"string"==typeof e):[],s={};if(e.settings&&"object"==typeof e.settings)for(let[t,n]of Object.entries(e.settings)){if(!n||"object"!=typeof n)continue;let e={};for(let[t,s]of Object.entries(n))("number"==typeof s||"boolean"==typeof s||"string"==typeof s)&&(e[t]=s);Object.keys(e).length>0&&(s[t]=e)}return{hidden:t,settings:s}}(JSON.parse(e)):H}catch{return H}},save(e){try{0===e.hidden.length&&0===Object.keys(e.settings).length?s.removeItem(t):s.setItem(t,JSON.stringify(e))}catch{}}}:V)},[void 0,e]),[n,a]=(0,r.useState)(H),[i,l]=(0,r.useState)(!1),o=(0,r.useRef)(t);o.current=t,(0,r.useEffect)(()=>{a(s.load()),l(!0)},[s]);let c=(0,r.useCallback)(e=>{a(e),s.save(e)},[s]),d=(0,r.useCallback)(e=>{a(t=>{if(t.hidden.includes(e))return t;let n={...t,hidden:[...t.hidden,e]};return s.save(n),n})},[s]),u=(0,r.useCallback)(e=>{a(t=>{if(!t.hidden.includes(e))return t;let n={...t,hidden:t.hidden.filter(t=>t!==e)};return s.save(n),n})},[s]),m=(0,r.useCallback)(()=>{a(e=>{if(0===e.hidden.length)return e;let t={...e,hidden:[]};return s.save(t),t})},[s]),h=(0,r.useCallback)((e,t,n)=>{a(r=>{let a={...r.settings[e]??{},[t]:n},i=function(e,t){let s={};if(!e)return s;for(let n of Object.keys(t)){let r=e[n];r&&t[n]!==r.default&&(s[n]=t[n])}return s}(o.current(e),a),l={...r.settings};Object.keys(i).length>0?l[e]=i:delete l[e];let c={...r,settings:l};return s.save(c),c})},[s]),p=(0,r.useCallback)(e=>{a(t=>{if(!t.settings[e])return t;let n={...t.settings};delete n[e];let r={...t,settings:n};return s.save(r),r})},[s]),x=(0,r.useCallback)(e=>n.settings[e]??{},[n]),g=(0,r.useCallback)(e=>n.hidden.includes(e),[n]);return{hydrated:i,hidden:n.hidden,isHidden:g,hide:d,show:u,showAll:m,overridesFor:x,setSetting:h,resetSettings:p,replace:c}}(n,(0,B.useCallback)(t=>e.find(e=>e.id===t)?.settings,[e])),o=(0,B.useMemo)(()=>e.filter(e=>(e.surfaces??["overview"]).includes(n)).filter(e=>!i?.includes(e.id)).map(e=>{let s=function(e,t){let s={};if(!e)return s;for(let n of Object.keys(e))s[n]=function(e,t){switch(e.type){case"number":var s,n;let r;if("number"!=typeof t||!Number.isFinite(t))return e.default;return s=e.min,n=e.max,r=t,"number"==typeof s&&r<s&&(r=s),"number"==typeof n&&r>n&&(r=n),r;case"boolean":return"boolean"==typeof t?t:e.default;case"select":if("string"!=typeof t)return e.default;return e.options.some(e=>e.value===t)?t:e.default}}(e[n],t?.[n]);return s}(e.settings,l.overridesFor(e.id));return{panel:e,panelCtx:{...t,settings:s}}}).filter(({panel:e,panelCtx:t})=>{if(!e.enabled)return!0;try{return e.enabled(t)}catch(t){return console.error(`Panel "${e.id}" enabled() threw; hiding it`,t),!1}}),[e,n,t,l,i]),c=l.hydrated?o.filter(({panel:e})=>!l.isHidden(e.id)):o,d=l.hydrated?o.filter(({panel:e})=>l.isHidden(e.id)):[];return(0,s.jsxs)(s.Fragment,{children:[d.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(q,{hidden:d.map(({panel:e})=>({id:e.id,title:e.title})),onRestore:l.show,onRestoreAll:l.showAll})}):null,c.map(({panel:e,panelCtx:t})=>(0,s.jsx)("div",{className:2===e.span?"lg:col-span-2":void 0,children:(0,s.jsx)(Y,{panel:e,ctx:t,revision:a,onHide:()=>l.hide(e.id),settingsForm:e.settings?(0,s.jsx)(X,{panelId:e.id,spec:e.settings,values:t.settings,onChange:(t,s)=>l.setSetting(e.id,t,s),onReset:()=>l.resetSettings(e.id)}):void 0})},e.id))]})}function q({hidden:e,onRestore:t,onRestoreAll:n}){return(0,s.jsxs)("section",{className:"flex flex-wrap items-center gap-2 rounded-xl border border-dashed border-edge bg-panel/60 px-4 py-2.5 text-xs text-fg-muted",children:[(0,s.jsxs)("span",{className:"font-medium uppercase tracking-wide",children:["Hidden panels (",e.length,")"]}),e.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>t(e.id),className:"rounded-md border border-edge px-2 py-1 text-fg transition hover:border-amber hover:text-fg-hi",children:["+ ",e.title]},e.id)),(0,s.jsx)("button",{type:"button",onClick:n,className:"ml-auto text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Show all"})]})}function Y({panel:e,ctx:t,revision:n,onHide:a,settingsForm:i}){let{data:l,loading:o,error:c}=function(e,t,s=0){let[n,a]=(0,r.useState)({data:null,loading:!!e.load,error:null}),i=JSON.stringify({params:t.params,settings:t.settings});return(0,r.useEffect)(()=>{if(!e.load)return void a({data:null,loading:!1,error:null});let s=!0,n=new AbortController;return a(e=>({...e,loading:!0,error:null})),e.load({...t,signal:n.signal}).then(e=>{s&&a({data:e,loading:!1,error:null})},e=>{s&&!n.signal.aborted&&a({data:null,loading:!1,error:e instanceof Error?e:Error(String(e))})}),()=>{s=!1,n.abort()}},[e,i,t.surface,t.sessionId,s]),n}(e,t,n),d="function"==typeof e.subtitle?e.subtitle(t):e.subtitle,u=o&&!!e.load&&null==l,m=function(){let[e,t]=(0,B.useState)(!1);return(0,B.useEffect)(()=>t(!0),[]),e}(),h=!e.clientOnly||m;return(0,s.jsx)(G,{title:e.title,subtitle:d,help:e.help,collapsible:e.collapsible,onHide:a,settings:i,children:h?c?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["Could not load: ",c.message]}):u?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Loading…"}):(0,s.jsx)(Z,{panelId:e.id,children:e.render({data:l,ctx:t})}):null})}class Z extends B.Component{state={error:null};static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e){console.error(`Panel "${this.props.panelId}" failed to render`,e)}componentDidUpdate(e){e.panelId!==this.props.panelId&&this.state.error&&this.setState({error:null})}render(){return this.state.error?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["Could not render: ",this.state.error.message]}):this.props.children}}var Q=e.i(18637);function ee({bins:e,cellSize:t}){let n=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let t=n.current;if(!t)return;let s=t.getContext("2d");if(!s||(s.clearRect(0,0,360,360),s.fillStyle="#0b0e14",s.fillRect(0,0,360,360),0===e.length))return;let r=1/0,a=-1/0,i=1/0,l=-1/0,o=0;for(let t of e)t.gx<r&&(r=t.gx),t.gx>a&&(a=t.gx),t.gz<i&&(i=t.gz),t.gz>l&&(l=t.gz),t.count>o&&(o=t.count);let c=344/Math.max(a-r+1,l-i+1);for(let t of e){s.fillStyle=w(o>0?t.count/o:0,.9);let e=8+(t.gx-r)*c,n=8+(l-t.gz)*c;s.fillRect(e,n,Math.ceil(c),Math.ceil(c))}},[e,t]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsxs)("div",{className:"relative inline-block",children:[(0,s.jsx)("canvas",{ref:n,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Floor-plan position heatmap"}),e.length>0?(0,s.jsx)(Q.HeatLegend,{title:"Dwell density",lowLabel:"rarely",highLabel:"most",note:`${t} m cells`}):null]})}),0===e.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera-position data in range. Capture a first-person session to populate the plan."}):null]})}function et({points:e}){let t=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let s=t.current;if(!s)return;let n=s.getContext("2d");if(!n||(n.clearRect(0,0,360,360),n.fillStyle="#0b0e14",n.fillRect(0,0,360,360),0===e.length))return;let r=1/0,a=-1/0,i=1/0,l=-1/0;for(let t of e)t.gx<r&&(r=t.gx),t.gx>a&&(a=t.gx),t.gz<i&&(i=t.gz),t.gz>l&&(l=t.gz);let o=344/Math.max(a-r+1,l-i+1),c=(e,t)=>[8+(e-r+.5)*o,8+(l-t+.5)*o],d=function(e){let t=new Map;for(let s of e){let e=t.get(s.session_id);e||(e=[],t.set(s.session_id,e));let n=e[e.length-1];n&&n.gx===s.gx&&n.gz===s.gz||e.push({gx:s.gx,gz:s.gz})}return[...t.values()].map(e=>({cells:e}))}(e);for(let e of(n.lineWidth=2,n.lineJoin="round",n.lineCap="round",n.globalCompositeOperation="lighter",n.strokeStyle="rgba(251, 191, 36, 0.18)",d)){if(e.cells.length<2)continue;n.beginPath();let[t,s]=c(e.cells[0].gx,e.cells[0].gz);n.moveTo(t,s);for(let t=1;t<e.cells.length;t++){let[s,r]=c(e.cells[t].gx,e.cells[t].gz);n.lineTo(s,r)}n.stroke()}n.globalCompositeOperation="source-over"},[e]),(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("canvas",{ref:t,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Aggregate desire-line paths"})}),0===e.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera-path data in range. Capture first-person sessions to populate the desire lines."}):null]})}let es={hover:"#60a5fa",pick:"#34d399",click:"#fbbf24",drag:"#f472b6",select:"#a78bfa",squeeze:"#fb7185",grab:"#22d3ee",release:"#94a3b8",teleport:"#f59e0b"};function en(e){return es[e]??"#64748b"}function er({rows:e,topN:t=8}){let n=function(e,t){let s=new Map;for(let t of e){let e=s.get(t.mesh);e||(e={mesh:t.mesh,total:0,kinds:[]},s.set(t.mesh,e)),e.kinds.push({kind:t.kind,count:t.count}),e.total+=t.count}let n=[...s.values()].sort((e,t)=>t.total-e.total).slice(0,t);for(let e of n)e.kinds.sort((e,t)=>t.count-e.count);return n}(e,t);if(0===n.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."});let r=[...new Set(e.map(e=>e.kind))];return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("ul",{className:"space-y-2",children:n.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:S(e.total)})]}),(0,s.jsx)("div",{className:"mt-1 flex h-2 w-full overflow-hidden rounded bg-ink/60",children:e.kinds.map(t=>(0,s.jsx)("div",{className:"h-full",style:{width:`${e.total>0?t.count/e.total*100:0}%`,backgroundColor:en(t.kind)},title:`${t.kind}: ${S(t.count)}`},t.kind))})]},e.mesh))}),(0,s.jsx)("ul",{className:"flex flex-wrap gap-x-3 gap-y-1",children:r.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:en(e)}}),e]},e))})]})}function ea({bins:e,bucketSize:t,threshold:n=2,topN:r=12}){let a=function(e,t,s=2){let n=new Map;for(let s of e){let e=n.get(s.mesh);e||(e={count:0,distanceSum:0,maxBand:0},n.set(s.mesh,e)),e.count+=s.count,e.distanceSum+=s.avg_distance*s.count,e.maxBand=Math.max(e.maxBand,s.bucket*t)}let r=[...n.entries()].map(([e,t])=>{let n=t.count>0?t.distanceSum/t.count:0;return{mesh:e,count:t.count,meanDistance:n,maxBandDistance:t.maxBand,far:n>s}});return r.sort((e,t)=>t.meanDistance-e.meanDistance||t.count-e.count),r}(e,t,n);if(0===a.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No measurable interactions in range. Reachability needs mesh_interaction events with a world point plus preceding camera_sample positions in the same session."});let i=a.reduce((e,t)=>Math.max(e,t.meanDistance,t.maxBandDistance),0)||1,l=a.filter(e=>e.far).length,o=a.slice(0,r);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"tabular-nums text-fg",children:S(l)})," of"," ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:S(a.length)})," meshes are reached from beyond ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:S(n,2)})," m on average."]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:o.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.mesh,children:e.mesh}),(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[e.far&&(0,s.jsx)("span",{className:"rounded bg-rose-500/20 px-1.5 text-xs text-rose-300",children:"far"}),(0,s.jsxs)("span",{className:"tabular-nums text-xs text-fg-muted",children:[S(e.meanDistance,2)," m · ",S(e.count)]})]})]}),(0,s.jsxs)("div",{className:"relative mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:[(0,s.jsx)("div",{className:`h-full rounded ${e.far?"bg-rose-500/70":"bg-sky-500/70"}`,style:{width:`${e.meanDistance/i*100}%`}}),(0,s.jsx)("span",{className:"absolute top-0 h-full w-px bg-fg/50",style:{left:`${Math.min(100,n/i*100)}%`},title:`Comfortable-reach threshold: ${S(n,2)} m`})]})]},e.mesh))})]})}let ei={mouse:"#60a5fa",touch:"#34d399",stylus:"#a78bfa",pen:"#a78bfa","xr-controller":"#fbbf24",hand:"#f472b6",gaze:"#22d3ee",transient:"#fb7185",keyboard:"#f59e0b",gamepad:"#c084fc",other:"#94a3b8"};function el(e){return ei[e]??"#64748b"}function eo({buckets:e}){if(e.length<2)return(0,s.jsx)("span",{className:"text-[10px] text-fg-muted",children:"—"});let t=e.reduce((e,t)=>Math.max(e,t),0)||1;return(0,s.jsx)("div",{className:"flex h-5 items-end gap-px","aria-hidden":!0,children:e.map((e,n)=>(0,s.jsx)("div",{className:"w-1 rounded-sm bg-sky-400/70",style:{height:`${Math.max(8,e/t*100)}%`}},n))})}function ec({delta:e}){return e>0?(0,s.jsxs)("span",{className:"tabular-nums text-xs text-emerald-400",children:["▲ ",S(e)]}):e<0?(0,s.jsxs)("span",{className:"tabular-nums text-xs text-rose-400",children:["▼ ",S(-e)]}):(0,s.jsx)("span",{className:"text-xs text-fg-muted",children:"—"})}function ed({sources:e,trend:t,topN:n=8}){let r=function(e,t,s){let n=new Map;for(let t of e){let e=n.get(t.mesh);e||(e={total:0,sources:new Map},n.set(t.mesh,e)),e.total+=t.count,e.sources.set(t.source,(e.sources.get(t.source)??0)+t.count)}let r=new Map;for(let e of t){let t=r.get(e.mesh);t?t.push(e):r.set(e.mesh,[e])}return[...n.entries()].map(([e,t])=>{let s=(r.get(e)??[]).slice().sort((e,t)=>e.bucket-t.bucket).map(e=>e.count),n=Math.floor(s.length/2),a=s.slice(0,n).reduce((e,t)=>e+t,0),i=s.slice(n).reduce((e,t)=>e+t,0);return{mesh:e,total:t.total,sources:[...t.sources.entries()].map(([e,t])=>({source:e,count:t})).sort((e,t)=>t.count-e.count),buckets:s,delta:i-a}}).sort((e,t)=>t.total-e.total).slice(0,s)}(e,t,n);return 0===r.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."}):(0,s.jsx)("ol",{className:"space-y-2",children:r.map((e,t)=>(0,s.jsx)("li",{className:"text-sm",children:(0,s.jsxs)("details",{className:"group",children:[(0,s.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-3",children:[(0,s.jsx)("span",{className:"w-5 shrink-0 text-right tabular-nums text-xs text-fg-muted",children:t+1}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)(eo,{buckets:e.buckets}),(0,s.jsx)(ec,{delta:e.delta}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",children:S(e.total)})]}),(0,s.jsx)("ul",{className:"mt-1.5 space-y-1 pl-8",children:e.sources.map(t=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:el(t.source)}}),(0,s.jsx)("span",{className:"w-24 shrink-0 truncate text-fg-muted",children:t.source}),(0,s.jsx)("div",{className:"h-1.5 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded",style:{width:`${e.total>0?t.count/e.total*100:0}%`,backgroundColor:el(t.source)}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 text-right tabular-nums text-fg-muted",children:S(t.count)})]},t.source))})]})},e.mesh))})}function eu(e){return!Number.isFinite(e)||e<=0?"0 ms":e<1e3?`${Math.round(e)} ms`:`${(e/1e3).toFixed(e<1e4?2:1)} s`}function em({meshes:e}){let t=e.reduce((e,t)=>Math.max(e,t.visible_ms),0);return 0===e.length?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No blind spots in range. This needs object-dwell (",(0,s.jsx)("code",{children:"meshVisibility"}),") capture enabled."]}):(0,s.jsx)("ul",{className:"space-y-2",children:e.map(e=>{let n=e.interactions+e.hover_episodes;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsxs)("span",{className:"shrink-0 tabular-nums text-fg-muted",children:[eu(e.visible_ms)," seen"]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${t>0?e.visible_ms/t*100:0}%`}})}),(0,s.jsx)("div",{className:"mt-1 flex items-center gap-2 text-xs text-fg-muted",children:0===n?(0,s.jsx)("span",{className:"rounded bg-rose-500/20 px-1.5 py-0.5 font-medium text-rose-300",children:"never engaged"}):(0,s.jsxs)("span",{className:"tabular-nums",children:[S(e.interactions)," interaction",1===e.interactions?"":"s",e.hover_episodes>0?` \xb7 ${S(e.hover_episodes)} hover${1===e.hover_episodes?"":"s"} (${eu(e.hover_ms)})`:""]})})]},e.mesh)})})}function eh({initialRows:e,api:t,params:n}){let[a,i]=(0,r.useState)(""),[l,o]=(0,r.useState)(e),[c,d]=(0,r.useState)(!1),[u,m]=(0,r.useState)(!1),h=(0,r.useMemo)(()=>e.map(e=>e.variant).sort((e,t)=>e.localeCompare(t)),[e]);(0,r.useEffect)(()=>{o(e),i(""),m(!1)},[e]);let p=JSON.stringify(n);if((0,r.useEffect)(()=>{if(!a){o(e),m(!1);return}let s=!1;return d(!0),m(!1),t.variantLeaderboard({conversion:{type:"custom",name:a}},n).then(e=>{s||o(e)}).catch(()=>{s||m(!0)}).finally(()=>{s||d(!1)}),()=>{s=!0}},[a,p,e,t]),0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No configurator variants in range."});let x=""!==a,g=l.reduce((e,t)=>Math.max(e,t.views),0)||1;return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"shrink-0",children:"Success event"}),(0,s.jsxs)("select",{className:"min-w-0 flex-1 rounded border border-ink/40 bg-ink/40 px-2 py-1 text-xs text-fg",value:a,onChange:e=>i(e.target.value),children:[(0,s.jsx)("option",{value:"",children:"None — views only"}),h.map(e=>(0,s.jsx)("option",{value:e,children:e},e))]}),c&&(0,s.jsx)("span",{className:"shrink-0 text-fg-muted",children:"…"})]}),u?(0,s.jsx)("p",{className:"text-sm text-rose-400",children:"Couldn’t load conversion rates."}):(0,s.jsx)("ol",{className:"space-y-2",children:l.map((e,t)=>{var n,r;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsx)("span",{className:"w-5 shrink-0 text-right tabular-nums text-xs text-fg-muted",children:t+1}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.variant}),(0,s.jsx)("span",{className:"w-16 shrink-0 text-right tabular-nums text-xs text-fg-muted",title:"Mean dwell before the next variant switch or conversion",children:(n=e.avgDwellMs)>0?n<1e3?`${Math.round(n)} ms`:n<6e4?`${(n/1e3).toFixed(+(n<1e4))} s`:`${(n/6e4).toFixed(1)} min`:"—"}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-xs",title:x?`${S(e.conversions)} of ${S(e.sessions)} sessions converted`:"Pick a success event to compute conversion",children:(r=e.conversionRate,x?`${(100*r).toFixed(r>=.1||0===r?0:1)}%`:"—")}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",title:`${S(e.sessions)} distinct sessions`,children:S(e.views)})]}),(0,s.jsx)("div",{className:"mt-1 ml-8 h-1.5 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-sky-400/70",style:{width:`${e.views/g*100}%`}})})]},e.variant)})})]})}let ep={mouse:"#60a5fa",touch:"#34d399",stylus:"#a78bfa",pen:"#a78bfa","xr-controller":"#fbbf24",hand:"#f472b6",gaze:"#22d3ee",transient:"#fb7185",keyboard:"#f59e0b",gamepad:"#c084fc",other:"#94a3b8"};function ex(e){return ep[e]??"#64748b"}function eg({sources:e,actions:t,topActions:n=8}){let r=function(e){let t=new Map;for(let s of e)t.set(s.source,(t.get(s.source)??0)+s.count);let s=[...t.values()].reduce((e,t)=>e+t,0);return[...t.entries()].map(([e,t])=>({source:e,count:t,share:s>0?t/s:0})).sort((e,t)=>t.count-e.count)}(e),a=t.slice(0,n);return 0===r.length&&0===a.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No input interactions in range."}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted",children:"Modality share"}),0===r.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No source-bearing interactions in range."}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"flex h-3 w-full overflow-hidden rounded bg-ink/60",children:r.map(e=>(0,s.jsx)("div",{className:"h-full",style:{width:`${100*e.share}%`,backgroundColor:ex(e.source)},title:`${e.source}: ${S(e.count)}`},e.source))}),(0,s.jsx)("ul",{className:"mt-2 flex flex-wrap gap-x-3 gap-y-1",children:r.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-1.5 text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 rounded-sm",style:{backgroundColor:ex(e.source)}}),e.source,(0,s.jsxs)("span",{className:"tabular-nums text-fg",children:[Math.round(100*e.share),"%"]})]},e.source))})]})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h4",{className:"mb-2 text-xs font-semibold uppercase tracking-wide text-fg-muted",children:"Most-used shortcuts"}),0===a.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No input_action events in range."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:a.map(e=>(0,s.jsxs)("li",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"inline-block h-2 w-2 shrink-0 rounded-sm",style:{backgroundColor:ex(e.source)}}),(0,s.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-fg",children:e.action}),(0,s.jsx)("span",{className:"shrink-0 text-xs text-fg-muted",children:e.source}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right tabular-nums text-fg-muted",children:S(e.count)})]},`${e.action}/${e.source}`))})]})]})}function ef({coverage:e,proxyMeshes:t,cellSize:n,topN:r=12}){if(0===t.length)return(0,s.jsxs)("div",{className:"space-y-2 text-sm text-fg-muted",children:[(0,s.jsx)("p",{children:"No scene proxy is registered, so there is no reference geometry to call “dead”."}),(0,s.jsx)("p",{children:"Register proxy geometry (ADR 0014) via the scene representation API to enumerate the regions visitors could approach."})]});if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera-position samples in range — every region reads as dead. Widen the range or check that first-person camera samples are being captured."});let a=function(e,t,s,n=1){let r=s*n,a=t.slice(0,600).map(t=>{let n=0;for(let a of e)(function(e,t,s,n,r,a){let i=(e+.5)*n,l=(t+.5)*n,o=(s+.5)*n,[c,d,u,m,h,p]=r;return i>=c-a&&i<=m+a&&l>=d-a&&l<=h+a&&o>=u-a&&o<=p+a})(a.vx,a.vy,a.vz,s,t.aabb,r)&&(n+=a.count);return{mesh:t.name,path:t.path,nearbySamples:n,dead:0===n}});return a.sort((e,t)=>e.nearbySamples-t.nearbySamples),{rows:a,deadCount:a.filter(e=>e.dead).length,total:a.length}}(e,t,n),i=a.rows.reduce((e,t)=>Math.max(e,t.nearbySamples),0)||1,l=a.rows.slice(0,r);return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:[(0,s.jsx)("span",{className:"tabular-nums text-fg",children:S(a.deadCount)})," of"," ",(0,s.jsx)("span",{className:"tabular-nums text-fg",children:S(a.total)})," proxy meshes are dead (no nearby camera samples)."]}),(0,s.jsx)("ul",{className:"space-y-1.5",children:l.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.path??e.mesh,children:e.mesh}),e.dead?(0,s.jsx)("span",{className:"shrink-0 rounded bg-rose-500/20 px-1.5 text-xs text-rose-300",children:"dead"}):(0,s.jsx)("span",{className:"shrink-0 tabular-nums text-xs text-fg-muted",children:S(e.nearbySamples)})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-sky-500/70",style:{width:`${e.nearbySamples/i*100}%`}})})]},e.path??e.mesh))})]})}function eb({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:t})]})}function ev({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No FPS samples in range."});let t=[...e].sort((e,t)=>e.bucket-t.bucket),n=t.reduce((e,t)=>Math.max(e,t.sessions),0)||1,r=t.length>1?t[1].bucket-t[0].bucket:10;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.bucket,"–",e.bucket+r]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})}function ej({distribution:e,histogram:t}){return e&&0!==e.samples?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,s.jsx)(eb,{label:"p05 FPS (worst)",value:S(e.p05_fps,1)}),(0,s.jsx)(eb,{label:"p50 FPS (typical)",value:S(e.p50_fps,1)}),(0,s.jsx)(eb,{label:"p95 FPS (best)",value:S(e.p95_fps,1)}),(0,s.jsx)(eb,{label:"Sessions",value:S(e.sessions)})]}),(0,s.jsx)(ev,{bins:t})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No performance samples in range."})}function ey({label:e,value:t,hint:n}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:t}),n?(0,s.jsx)("div",{className:"mt-0.5 text-xs text-fg-muted",children:n}):null]})}function eN({label:e,count:t,total:n,color:r}){let a=n>0?t/n:0;return(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"w-28 shrink-0 text-right text-fg-muted",children:e}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:`h-full rounded ${r}`,style:{width:`${100*a}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:t})]})}function ew({churn:e}){if(!e||0===e.sessions)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No ended sessions in range."});let t=e.churn_sessions/e.sessions,n=`${Math.round(100*t)}%`;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[(0,s.jsx)(ey,{label:"Perf-correlated churn",value:n,hint:"of ended sessions"}),(0,s.jsx)(ey,{label:"Churned sessions",value:S(e.churn_sessions),hint:`of ${S(e.sessions)} ended`}),(0,s.jsx)(ey,{label:"Ended sessions",value:S(e.sessions)})]}),e.churn_sessions>0?(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Churn by cause"}),(0,s.jsx)(eN,{label:"FPS dip",count:e.fps_churn_sessions,total:e.churn_sessions,color:"bg-amber-500/70"}),(0,s.jsx)(eN,{label:"Compile stall",count:e.stall_churn_sessions,total:e.churn_sessions,color:"bg-rose-500/70"}),(0,s.jsx)("p",{className:"pt-1 text-xs text-fg-muted",children:"A session hit by both a dip and a stall is counted under each cause, so the bars can sum to more than the churned total."})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No ended session followed a perf dip within the window — perf isn't driving churn here."})]})}function ek(e){return`${Math.round(100*e)}%`}function eS({data:e}){if(!e||0===e.samples)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No frame-perf samples in range."});let t=e.p50_fps>=50&&e.p50_render_scale>0&&e.p50_render_scale<.9,n=[{label:"Median FPS",value:S(Math.round(e.p50_fps))},{label:"Avg FPS",value:S(Math.round(e.avg_fps))},{label:"Median render scale",value:ek(e.p50_render_scale)},{label:"Avg render scale",value:ek(e.avg_render_scale)},{label:"Downscaled frames",value:ek(e.downscaled_share)},{label:"Samples",value:S(e.samples)}];return(0,s.jsxs)("div",{className:"space-y-3",children:[(0,s.jsx)("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-3 sm:grid-cols-3",children:n.map(e=>(0,s.jsxs)("div",{children:[(0,s.jsx)("dt",{className:"text-xs text-fg-muted",children:e.label}),(0,s.jsx)("dd",{className:"tabular-nums text-lg text-fg",children:e.value})]},e.label))}),t?(0,s.jsxs)("p",{className:"rounded-md border border-amber/40 bg-amber/10 px-3 py-2 text-xs text-amber",children:["Good FPS is being bought with resolution — the median frame renders at"," ",ek(e.p50_render_scale)," scale. The headline FPS overstates the device experience."]}):null]})}let e_={orbit:"Orbit",pan:"Pan",dolly:"Dolly",zoom:"Zoom",roll:"Roll",fly:"Fly",navigate:"Navigate"};function eM({stats:e}){let t=[...e].sort((e,t)=>t.gestures-e.gestures),n=t.reduce((e,t)=>e+t.gestures,0),r=t.reduce((e,t)=>Math.max(e,t.gestures),0);return 0===t.length||0===n?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No camera-navigation gestures in range. Enable ",(0,s.jsx)("code",{children:"cameraGesture"})," capture in the SDK (on by default for Babylon) to populate this."]}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>{var t,a;let i=n>0?e.gestures/n*100:0;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:e_[t=e.kind]??t.charAt(0).toUpperCase()+t.slice(1)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[S(e.gestures),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",i.toFixed(0),"%"]}),(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:["avg ",!Number.isFinite(a=e.avg_ms)||a<=0?"0 ms":a<1e3?`${Math.round(a)} ms`:`${(a/1e3).toFixed(a<1e4?2:1)} s`]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${r>0?e.gestures/r*100:0}%`}})})]},e.kind)})})}function eC(e){let t=k(e.started_at),s=k(e.ended_at);return Number.isFinite(t)&&Number.isFinite(s)?Math.max(0,s-t):0}function ez(e,t){let s=e.length;if(0===s)return{sessions:0,earlyExitRate:0,avgDurationMs:0,avgPerMinute:0};let n=0,r=0,a=0;for(let{stat:s,rate:i}of e){let e=eC(s);e<t&&(n+=1),r+=e,a+=i}return{sessions:s,earlyExitRate:n/s,avgDurationMs:r/s,avgPerMinute:a/s}}function eP(e){return`${Math.round(100*e)}%`}let eR=[{key:"teleport",label:"Teleport"},{key:"smooth",label:"Smooth locomotion"},{key:"navigate",label:"Navigate"}];function eT({stats:e}){let t=function(e){let t=0,s=0,n=0;for(let r of e)t+=r.teleports,s+=Math.max(0,r.fly_gestures-r.teleports),n+=r.navigate_gestures;return{teleport:t,smooth:s,navigate:n,total:t+s+n}}(e),n=function(e,t=3e4){if(e.length<2)return null;let s=e.map(e=>({stat:e,rate:(e.fly_gestures+e.navigate_gestures)/(Math.max(eC(e),1e3)/6e4)})).sort((e,t)=>e.rate-t.rate),n=Math.floor(s.length/2),r=s.slice(0,n);return{heavy:ez(s.slice(n),t),light:ez(r,t)}}(e);if(0===e.length||0===t.total)return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No XR locomotion in range. This panel reads ",(0,s.jsx)("code",{children:"camera_gesture"})," (fly / navigate) and"," ",(0,s.jsx)("code",{children:"mesh_interaction"})," teleports from sessions using an XR input source — enter an immersive session to populate it."]});let r=Math.max(t.teleport,t.smooth,t.navigate,1);return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)("ul",{className:"space-y-3",children:eR.map(e=>{let n=t[e.key],a=t.total>0?n/t.total:0;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:e.label}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[S(n),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",eP(a)]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n/r*100}%`}})})]},e.key)})}),n&&(0,s.jsxs)("div",{className:"border-t border-ink/40 pt-3 text-sm",children:[(0,s.jsx)("div",{className:"mb-2 text-xs font-medium uppercase tracking-wide text-fg-muted",children:"Comfort · locomotion vs. early exit"}),(0,s.jsxs)("table",{className:"w-full text-xs tabular-nums",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{className:"text-fg-muted",children:[(0,s.jsx)("th",{className:"text-left font-normal",children:"Locomotion"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Sessions"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Early exit"}),(0,s.jsx)("th",{className:"text-right font-normal",children:"Avg length"})]})}),(0,s.jsx)("tbody",{children:[{label:"Heavy",split:n.heavy},{label:"Light",split:n.light}].map(({label:e,split:t})=>{var n;return(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"py-0.5 text-fg",children:e}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:S(t.sessions)}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:eP(t.earlyExitRate)}),(0,s.jsx)("td",{className:"py-0.5 text-right text-fg-muted",children:!Number.isFinite(n=t.avgDurationMs)||n<=0?"0 s":n<6e4?`${(n/1e3).toFixed(1)} s`:`${(n/6e4).toFixed(1)} min`})]},e)})})]}),(0,s.jsx)("p",{className:"mt-2 text-xs text-fg-muted",children:"Heavy-locomotion sessions above the median gesture rate. A higher early-exit rate there than for light-locomotion sessions suggests motion discomfort."})]})]})}function e$({stats:e}){let t=[...e].sort((e,t)=>t.backtrack_ratio-e.backtrack_ratio),n=t.reduce((e,t)=>Math.max(e,t.backtrack_ratio),0);return 0===t.length?(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No camera-position samples in range. Enable ",(0,s.jsx)("code",{children:"cameraSample"})," capture in the SDK (on by default for Babylon) to populate this."]}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>{var t;let r=100*e.backtrack_ratio;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:""===(t=e.scene)?"(default scene)":t}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[r.toFixed(0),"%",(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:[S(e.revisits)," / ",S(e.entries)," entries ·"," ",S(e.sessions)," ",1===e.sessions?"session":"sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n>0?e.backtrack_ratio/n*100:0}%`}})})]},e.scene)})})}let eE="#161210",eI={fontSize:13,color:"#a8917c"},eA={padding:"6px 10px",fontSize:13,borderTop:"1px solid #34291f"};function eF({sessions:e,onSelect:t,selectedId:n}){return 0===e.length?(0,s.jsx)("p",{style:eI,children:"No sessions in range."}):(0,s.jsx)("div",{style:{maxHeight:320,overflow:"auto"},children:(0,s.jsxs)("table",{style:{width:"100%",borderCollapse:"collapse",textAlign:"left"},children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{style:{fontSize:11,textTransform:"uppercase",color:"#a8917c"},children:[(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Session"}),(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Visitor"}),(0,s.jsx)("th",{style:{padding:"6px 10px",textAlign:"right"},children:"Events"}),(0,s.jsx)("th",{style:{padding:"6px 10px"},children:"Started"})]})}),(0,s.jsx)("tbody",{children:e.map(e=>{var r;let a,i=e.session_id===n;return(0,s.jsxs)("tr",{onClick:t?()=>t(e.session_id):void 0,style:{cursor:t?"pointer":"default",background:i?"rgba(237,166,62,0.15)":void 0},children:[(0,s.jsx)("td",{style:{...eA,fontFamily:"ui-monospace, monospace",color:"#d8c8b8"},children:e.session_id.slice(0,12)}),(0,s.jsx)("td",{style:{...eA,fontFamily:"ui-monospace, monospace",color:"#a8917c"},children:e.visitor_id.slice(0,8)}),(0,s.jsx)("td",{style:{...eA,textAlign:"right",fontVariantNumeric:"tabular-nums"},children:S(e.events)}),(0,s.jsx)("td",{style:{...eA,fontSize:12,color:"#a8917c"},children:Number.isNaN((a=new Date((r=e.started_at).includes("T")?r:r.replace(" ","T")+"Z")).getTime())?r:a.toLocaleString()})]},e.session_id)})})]})})}function eL({bins:e,gridSize:t,size:n=320,className:a,style:i}){let l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let s=l.current;if(!s)return;let r=s.getContext("2d");r&&function(e,t,s,n){if(e.clearRect(0,0,n,n),e.fillStyle=eE,e.fillRect(0,0,n,n),0===t.length)return;let r=t.reduce((e,t)=>Math.max(e,t.count),0),a=n/s;for(let s of t)e.fillStyle=w(r>0?s.count/r:0,.85),e.fillRect(s.gx*a,s.gy*a,Math.ceil(a),Math.ceil(a))}(r,e,t,n)},[e,t,n]),(0,s.jsx)("canvas",{ref:l,width:n,height:n,className:a,style:i,"aria-label":"Pointer heatmap"})}function eD({bins:e,gridSize:t,size:n=340,className:a,style:i}){let l=(0,r.useRef)(null);return(0,r.useEffect)(()=>{let s=l.current;if(!s)return;let r=s.getContext("2d");if(!r)return;let a=Math.min(window.devicePixelRatio||1,2);s.width=n*a,s.height=n*a,r.setTransform(a,0,0,a,0,0),function(e,t,s,n){let r=n/2,a=n/2,i=n/2-18;if(e.clearRect(0,0,n,n),e.fillStyle=eE,e.fillRect(0,0,n,n),e.strokeStyle="#34291f",e.lineWidth=1,e.beginPath(),e.arc(r,a,i,0,2*Math.PI),e.stroke(),e.beginPath(),e.arc(r,a,i/2,0,2*Math.PI),e.stroke(),t.length>0){let n=t.reduce((e,t)=>Math.max(e,t.count),0),l=2*Math.PI/s;for(let o of t){let t=n>0?o.count/n:0,c=1-(o.elevation_bin+1)/s,d=1-o.elevation_bin/s,u=Math.max(0,c)*i,m=Math.max(0,d)*i,h=o.azimuth_bin*l,p=h+l;e.beginPath(),e.arc(r,a,m,h,p),e.arc(r,a,u,p,h,!0),e.closePath(),e.fillStyle=w(t,.85),e.fill()}}let l=(t,s,n)=>{e.lineWidth=3,e.strokeStyle="rgba(22,18,16,0.9)",e.strokeText(t,s,n),e.fillStyle="#d8c8b8",e.fillText(t,s,n)};for(let t of(e.font="600 10px ui-sans-serif, system-ui, sans-serif",e.textAlign="left",e.textBaseline="middle",e.strokeStyle="rgba(203,213,225,0.35)",e.lineWidth=1,e.beginPath(),e.moveTo(r,a),e.lineTo(r,a-i),e.stroke(),[0,i/2,i]))e.beginPath(),e.moveTo(r-3,a-t),e.lineTo(r+3,a-t),e.stroke();l("up",r+6,a),l("horizon",r+6,a-i/2),l("down",r+6,a-i+2)}(r,e,t,n)},[e,t,n]),(0,s.jsx)("canvas",{ref:l,className:a,style:{width:n,height:n,...i},"aria-label":"Camera view-direction heatmap: top-down polar plot where the center is looking up, the middle ring is the horizon, and the rim is looking down; color shows how often each direction was viewed."})}let eO={background:"rgba(32,25,19,0.6)",borderRadius:8,padding:12},eU={fontSize:11,textTransform:"uppercase",letterSpacing:"0.04em",color:"#a8917c"},eB={marginTop:4,fontSize:24,fontWeight:600,color:"#f4eadf",fontVariantNumeric:"tabular-nums"};function eH({label:e,value:t}){return(0,s.jsxs)("div",{style:eO,children:[(0,s.jsx)("div",{style:eU,children:e}),(0,s.jsx)("div",{style:eB,children:t})]})}function eV({perf:e}){return e&&0!==e.samples?(0,s.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, minmax(0, 1fr))",gap:12},children:[(0,s.jsx)(eH,{label:"Samples",value:S(e.samples)}),(0,s.jsx)(eH,{label:"Avg FPS",value:S(e.avg_fps,1)}),(0,s.jsx)(eH,{label:"p50 FPS",value:S(e.p50_fps,1)}),(0,s.jsx)(eH,{label:"Min FPS",value:S(e.min_fps,1)})]}):(0,s.jsx)("p",{style:eI,children:"No performance samples in range."})}function eK({bins:e,gridSize:t}){return(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)(eL,{bins:e,gridSize:t,className:"rounded-lg border border-edge"})})}function eW({meshes:e,gridSize:t,fetchHeatmap:n}){let a=(0,r.useMemo)(()=>e.filter(e=>e.mesh),[e]),[i,l]=(0,r.useState)(a[0]?.mesh??""),[o,c]=(0,r.useState)([]),[d,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),p=(0,r.useRef)(n);p.current=n;let x=(0,r.useRef)(null);return((0,r.useEffect)(()=>{0===a.length?l(""):a.some(e=>e.mesh===i)||l(a[0].mesh)},[a,i]),(0,r.useEffect)(()=>{if(!i){c([]),u(!1),x.current=null;return}let e=x.current!==i;x.current=i;let t=!1;return e&&u(!0),h(null),p.current(i).then(e=>{t||c(e)}).catch(e=>{t||h(e instanceof Error?e.message:"Failed to load heatmap")}).finally(()=>{t||u(!1)}),()=>{t=!0}},[i,e]),0===a.length)?(0,s.jsx)("p",{className:"text-sm text-muted",children:"No mesh interactions in this range yet."}):(0,s.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,s.jsxs)("label",{className:"flex items-center gap-2 text-sm",children:[(0,s.jsx)("span",{className:"text-muted",children:"Mesh"}),(0,s.jsx)("select",{className:"rounded-md border border-edge bg-surface px-2 py-1",value:i,onChange:e=>l(e.target.value),children:a.map(e=>(0,s.jsxs)("option",{value:e.mesh,children:[e.mesh," (",e.count,")"]},e.mesh))})]}),(0,s.jsx)("div",{className:"flex min-h-[8rem] justify-center",children:m?(0,s.jsx)("p",{className:"text-sm text-danger",children:m}):d?(0,s.jsx)("p",{className:"text-sm text-muted",children:"Loading…"}):(0,s.jsx)(eL,{bins:o,gridSize:t,className:"rounded-lg border border-edge"})})]})}function eG({meshes:e}){let t=e.reduce((e,t)=>Math.max(e,t.count),0);return 0===e.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No mesh interactions in range."}):(0,s.jsx)("ul",{className:"space-y-1.5",children:e.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e.mesh}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:S(e.count)})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${t>0?e.count/t*100:0}%`}})})]},e.mesh))})}function eX({links:e}){let t=function(e){let t=new Map;for(let s of e){let e=t.get(s.from);e||(e={from:s.from,outgoing:0,top:0,links:[]},t.set(s.from,e)),e.links.push({to:s.to,sessions:s.sessions}),e.outgoing+=s.sessions,e.top=Math.max(e.top,s.sessions)}let s=[...t.values()].sort((e,t)=>t.outgoing-e.outgoing);for(let e of s)e.links.sort((e,t)=>t.sessions-e.sessions);return s}(e);return 0===t.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted","data-testid":"scene-retention-empty",children:"No scene transitions in range. Sessions need at least two scene_change markers to form a flow."}):(0,s.jsx)("ul",{className:"space-y-4","data-testid":"scene-retention-funnel",children:t.map(e=>(0,s.jsxs)("li",{className:"space-y-1.5",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-3",children:[(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",title:e.from,children:e.from}),(0,s.jsxs)("span",{className:"tabular-nums text-xs text-fg-muted",children:[S(e.outgoing)," leaving"]})]}),(0,s.jsx)("ul",{className:"space-y-1",children:e.links.map(t=>{let n=e.top>0?t.sessions/e.top*100:0;return(0,s.jsxs)("li",{className:"text-sm","data-scene-link":`${e.from}->${t.to}`,children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsxs)("span",{className:"truncate font-mono text-xs text-fg-muted",children:["→ ",t.to]}),(0,s.jsx)("span",{className:"tabular-nums text-fg-muted",children:S(t.sessions)})]}),(0,s.jsx)("div",{className:"mt-0.5 h-2 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full",style:{width:`${n}%`,backgroundColor:"#34d399"},title:`${e.from} → ${t.to}: ${S(t.sessions)} sessions`})})]},t.to)})})]},e.from))})}let eJ=[{bucket:0,label:"0–25%"},{bucket:25,label:"25–50%"},{bucket:50,label:"50–75%"},{bucket:75,label:"75–100%"}];function eq({bins:e}){let t=new Map(e.map(e=>[e.bucket,e.sessions])),n=eJ.map(e=>({...e,sessions:t.get(e.bucket)??0})),r=n.reduce((e,t)=>e+t.sessions,0);if(0===r)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No view-direction samples in range."});let a=n.reduce((e,t)=>Math.max(e,t.sessions),0)||1,i=(t.get(0)??0)/r;return(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Sessions that saw <25% of the object"}),(0,s.jsxs)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:[S(100*i,0),"%"]})]}),(0,s.jsx)("div",{className:"space-y-1.5",children:n.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsx)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:e.label}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/a*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})]})}let eY=[1e3,3e3,5e3];function eZ(e){if(!Number.isFinite(e)||e<=0)return"0 ms";if(e<1e3)return`${Math.round(e)} ms`;let t=e/1e3;return`${Number.isInteger(t)?t:t.toFixed(1)} s`}function eQ({rows:e,boundaries:t=eY}){let n=new Map(e.map(e=>[e.band,e])),r=t.length+1;if(0===e.reduce((e,t)=>e+t.sessions,0))return(0,s.jsxs)("p",{className:"text-sm text-fg-muted",children:["No ",(0,s.jsx)("code",{children:"asset_load"})," events in range. Enable asset/scene load capture in the SDK (on by default for Babylon) to see how load time affects bounce rate."]});let a=Array.from({length:r},(e,t)=>{let s=n.get(t),r=s?.sessions??0,a=s?.bounced??0;return{i:t,sessions:r,bounced:a,rate:r>0?a/r:0}});return(0,s.jsx)("ul",{className:"space-y-3",children:a.map(e=>{var n,r;return(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:(n=e.i,0===n?`< ${eZ(t[0]??0)}`:n>=t.length?`≥ ${eZ(t[t.length-1]??0)}`:`${eZ(t[n-1]??0)} – ${eZ(t[n]??0)}`)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[(100*e.rate).toFixed(0),"% bounced",(0,s.jsxs)("span",{className:"ml-2 text-xs text-fg-muted",children:["· ",S(e.bounced),"/",S(e.sessions)," sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:`h-full rounded ${(r=e.rate)>=.4?"bg-red":r>=.15?"bg-amber":"bg-emerald"}`,style:{width:`${e.sessions>0?100*e.rate:0}%`}})})]},e.i)})})}var e0=e.i(37215);let e1=(0,r.lazy)(()=>e.A(78573).then(e=>({default:e.CameraDome3DView}))),e5=(0,r.lazy)(()=>e.A(47410).then(e=>({default:e.WorldHeatmap3DView}))),e2=(0,r.lazy)(()=>e.A(70162).then(e=>({default:e.FlowSankey3DView}))),e3=(0,r.lazy)(()=>e.A(21269).then(e=>({default:e.GazeClickDivergence3DView}))),e4=(0,r.lazy)(()=>e.A(44113).then(e=>({default:e.SessionReplayView})));function e6({children:e}){return(0,s.jsx)(r.Suspense,{fallback:(0,s.jsx)("div",{className:"grid min-h-[12rem] place-items-center text-sm text-fg-muted",children:"Loading 3D view…"}),children:e})}function e8(e){return"session"===e.surface&&e.sessionId?{...e.params,session:e.sessionId}:e.params}async function e9(e){let t=e.params.scene;if(t){let s=await e.api.sceneRepresentation(t).catch(()=>null);return s?.proxy?.meshes??[]}return(0,_.mergeSceneProxies)(e.api,e.params)}let e7={id:"camera-dome-3d",title:e0.CAMERA_DOME_TITLE,subtitle:e0.CAMERA_DOME_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Direction resolution",help:"Angular bins for the view-direction dome. More bins resolve finer look-directions; fewer aggregate them.",default:36,min:12,max:72,step:6}},load:e=>e.api.cameraHeatmap({...e8(e),source:void 0,bins:e.settings.bins}),render:({data:e,ctx:t})=>(0,s.jsx)(e6,{children:(0,s.jsx)(e1,{bins:e??[],gridSize:t.settings.bins})})},te={id:"world-heatmap-3d",title:e0.WORLD_HEATMAP_TITLE,subtitle:e0.WORLD_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning pointer hits. Larger voxels smooth the heat; smaller ones sharpen spatial detail.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s,n]=await Promise.all([e.api.worldHeatmap({...e8(e),cellSize:e.settings.cellSize}),e9(e),e.api.worldHeatmapStats({...e8(e),cellSize:e.settings.cellSize})]);return{voxels:t,proxyMeshes:s,totals:{cells:n.cells,hits:n.hits}}},render:({data:e,ctx:t})=>(0,s.jsx)(e6,{children:(0,s.jsx)(e5,{voxels:e.voxels,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,totals:e.totals})})},tt={id:"perf-heatmap-3d",title:e0.PERF_HEATMAP_TITLE,subtitle:e0.PERF_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning frame_perf samples by camera position. Larger voxels smooth the map; smaller ones sharpen where FPS drops.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s]=await Promise.all([e.api.perfHeatmap({...e8(e),cellSize:e.settings.cellSize}),e9(e)]);return{voxels:t,proxyMeshes:s}},render:({data:e,ctx:t})=>{let n=e.voxels.reduce((e,t)=>Math.max(e,t.avgFps),0),r=e.voxels.map(e=>({vx:e.vx,vy:e.vy,vz:e.vz,count:n+1-e.avgFps})),a=e.voxels.map(e=>`${Math.round(e.avgFps)} fps avg \xb7 ${Math.round(e.minFps)} fps min \xb7 ${e.samples} sample${1===e.samples?"":"s"}`);return(0,s.jsx)(e6,{children:(0,s.jsx)(e5,{voxels:r,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,voxelLabels:a,legendTitle:"FPS (slowest = hottest)",legendLow:"smooth",legendHigh:"janky",legendNote:"Each marker is a voxel where frame_perf was sampled, placed at the camera position. Color & size scale with slowness (lower FPS = hotter/bigger), so your worst-performing spots stand out. Hover a cell for its average/min FPS and sample count.",emptyLabel:"No frame_perf samples with position in range. Position capture is opt-in — update your SDK to record where FPS drops."})})}},ts={id:"error-heatmap-3d",title:e0.ERROR_HEATMAP_TITLE,subtitle:e0.ERROR_HEATMAP_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"World-space voxel size for binning error/diagnostic positions. Larger voxels smooth the heat; smaller ones sharpen where things break.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s]=await Promise.all([e.api.errorHeatmap({...e8(e),cellSize:e.settings.cellSize}),e9(e)]);return{voxels:t,proxyMeshes:s}},render:({data:e,ctx:t})=>(0,s.jsx)(e6,{children:(0,s.jsx)(e5,{voxels:e.voxels,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes,legendTitle:"Error density",legendLow:"fewer errors",legendHigh:"most errors",legendNote:"Each marker is a voxel where a runtime error or engine diagnostic fired, binned by the camera position at that moment. Color & size scale with the error count, normalized to the 95th-percentile cell so a few hotspots don't wash out the rest.",emptyLabel:"No positioned errors in range."})})},tn={id:"flow-sankey-3d",title:e0.FLOW_SANKEY_TITLE,subtitle:e0.FLOW_SANKEY_SUBTITLE,help:e0.FLOW_SANKEY_HELP,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{maxLinks:{type:"number",label:"Max links",help:"Maximum aggregate flow links drawn before the panel caps for legibility.",default:80,min:10,max:200,step:10}},load:async e=>{let t={...e8(e),cameraMode:void 0},[s,n]=await Promise.all([e.api.flowHeatmap({...t,bins:36,limit:400,groupByOrigin:!0}),e9(e)]);return{links:s,proxyMeshes:n,flowQuery:t}},render:({data:e,ctx:t})=>(0,s.jsx)(e6,{children:(0,s.jsx)(e2,{links:e.links,gridSize:36,proxyMeshes:e.proxyMeshes,maxLinks:t.settings.maxLinks,api:t.api,flowQuery:e.flowQuery,hasFirstPerson:t.capabilities.hasFirstPerson})})},tr={id:"gaze-click-divergence-3d",title:e0.GAZE_CLICK_TITLE,subtitle:e0.GAZE_CLICK_SUBTITLE,span:2,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Voxel size",help:"Shared world-space voxel size for both the gaze and click grids, so the divergence field stays aligned.",default:.5,min:.1,max:2,step:.1,unit:"m"}},load:async e=>{let[t,s,n]=await Promise.all([e.api.gazeHeatmap({...e8(e),source:void 0,cellSize:e.settings.cellSize}),e.api.worldHeatmap({...e8(e),cellSize:e.settings.cellSize}),e9(e)]);return{gaze:t,click:s,proxyMeshes:n}},render:({data:e,ctx:t})=>(0,s.jsx)(e6,{children:(0,s.jsx)(e3,{gazeVoxels:e.gaze,clickVoxels:e.click,cellSize:t.settings.cellSize,proxyMeshes:e.proxyMeshes})})};function ta(e){return!!e.live.enabled&&!!e.sessionId&&(e.live.presence?.sessions.some(t=>t.sessionId===e.sessionId)??!1)}function ti({ctx:e}){let{enabled:t,subscribe:n}=e.live,[a,i]=(0,r.useState)([]),[l,o]=(0,r.useState)(()=>Date.now());return(0,r.useEffect)(()=>t?n(e=>{i(t=>[e,...t].slice(0,40))}):void i([]),[t,n]),(0,r.useEffect)(()=>{if(!t)return;let e=setInterval(()=>o(Date.now()),1e3);return()=>clearInterval(e)},[t]),(0,s.jsx)(I,{snapshot:e.live.presence,status:e.live.status,feed:a,now:l,onSelectSession:e.actions.selectSession})}let tl=[{id:"session-replay",title:e0.SESSION_REPLAY_TITLE,subtitle:e=>(0,e0.sessionReplaySubtitle)(ta(e)),span:2,surfaces:["session"],clientOnly:!0,render:({ctx:e})=>e.sessionId?(0,s.jsx)(e6,{children:(0,s.jsx)(e4,{api:e.api,sessionId:e.sessionId,isLive:ta(e)})}):null},{id:"live-presence",title:M,subtitle:C,help:z,span:2,surfaces:["overview"],render:({ctx:e})=>(0,s.jsx)(ti,{ctx:e})},{id:"top-meshes",title:"Top meshes",subtitle:"Most-interacted meshes",span:1,surfaces:["overview","session"],settings:{limit:{type:"number",label:"Top N",help:"How many meshes to rank in the list.",default:25,min:5,max:100,step:5}},load:e=>e.api.topMeshes({...e8(e),source:void 0,scene:void 0,limit:e.settings.limit}),render:({data:e})=>(0,s.jsx)(eG,{meshes:e??[]})},{id:"mesh-leaderboard",title:"Part-popularity leaderboard",subtitle:"Ranked meshes, with trend and input split",help:"The most-interacted meshes ranked by total active interactions (clicks / hovers / picks / drags — passive gaze is excluded), each with a trend sparkline (rising/falling over the range) and an input-source split (mouse / touch / XR / …). Expand a row to see which sources drove it. Unlike the plain Top-meshes list, gaze-only hits don't inflate the ranking.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.topMeshesBySource({...e8(e),source:void 0,limit:400}),e.api.topMeshesTrend({...e8(e),source:void 0,interval:function(e){let{since:t,until:s}=e.params;return null==t||null==s||s<=t?3600:v(s-t,24)}(e),limit:2e3})]);return{sources:t,trend:s}},render:({data:e})=>(0,s.jsx)(ed,{sources:e.sources??[],trend:e.trend??[]})},{id:"blind-spots",title:"Blind spots",subtitle:"Rendered but never noticed",help:"The inverse of the mesh leaderboard (#143): objects with lots of on-screen time (mesh_visibility) but little or no engagement (mesh_interaction + hover_dwell). A retail engraving nobody spots, or a prop/room that renders but nobody investigates. Ranked most-seen-yet-least-touched first. Requires object-dwell capture (mesh_visibility) to be enabled.",span:1,surfaces:["overview","session"],load:e=>e.api.meshBlindSpots({...e8(e),limit:25}),render:({data:e})=>(0,s.jsx)(em,{meshes:e??[]})},{id:"variant-leaderboard",title:"Variant → conversion leaderboard",subtitle:"Ranked configurator variants, with conversion rate",help:'Ranks product-configurator variants — `custom` events grouped by their name (e.g. a colour, material, or trim swap) — by how often each was viewed, with distinct sessions and the mean dwell before the shopper switched variant or converted. Pick a "success" custom event (e.g. add_to_cart) to reveal the per-variant conversion rate: the share of sessions that fired the success event at or after first viewing that variant. Everything is session-based and read-only; the variant and success events are the ones your scene already emits — no schema changes.',span:1,surfaces:["overview"],load:e=>e.api.variantLeaderboard({},e8(e)),render:({data:e,ctx:t})=>(0,s.jsx)(eh,{initialRows:e??[],api:t.api,params:e8(t)})},{id:"pointer-heatmap",title:"Pointer heatmap",subtitle:"Normalized screen positions",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Grid resolution",help:"Bins per axis for the 2D pointer grid. More bins sharpen detail; fewer smooth the heat.",default:50,min:10,max:120,step:10}},load:e=>e.api.pointerHeatmap({...e8(e),bins:e.settings.bins}),render:({data:e,ctx:t})=>(0,s.jsx)(eK,{bins:e??[],gridSize:t.settings.bins})},{id:"mesh-uv-heatmap",title:"Mesh UV heatmap",subtitle:"Texture-space attention on one mesh",help:"Where on a mesh's surface (its UV/texture space) interactions concentrate. Pick a mesh to see clicks, picks, and hovers binned across its unwrapped texture.",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{bins:{type:"number",label:"Grid resolution",help:"Bins per axis for the mesh UV grid. More bins sharpen surface detail; fewer smooth the heat.",default:50,min:10,max:120,step:10}},load:e=>e.api.topMeshes({...e8(e),source:void 0,scene:void 0,limit:100}),render:({data:e,ctx:t})=>(0,s.jsx)(eW,{meshes:e??[],gridSize:t.settings.bins,fetchHeatmap:e=>t.api.meshUvHeatmap({...e8(t),mesh:e,bins:t.settings.bins})})},e7,{id:"view-coverage",title:"View coverage",subtitle:"How much of the object each session actually saw",help:"The 360° coverage gauge (#146): for each session, its camera view-direction samples are binned into the same azimuth/elevation grid as the view-direction dome, and the fraction of cells it visited is its coverage score (0–100%). Sessions are grouped into four coverage bands, so you can read at a glance how many visitors barely looked around (<25%) versus explored the whole object (75–100%). Derived entirely from existing camera samples — no extra capture.",span:1,surfaces:["overview","session"],load:e=>e.api.viewCoverageHistogram(e8(e)),render:({data:e})=>(0,s.jsx)(eq,{bins:e??[]})},{id:"floor-plan",title:"Floor-plan heatmap",subtitle:"Where visitors stand (top-down, first-person)",help:"Camera positions binned on the ground plane — the first-person counterpart of the pointer heatmap. Filter to the first-person camera mode to isolate walkable sessions.",span:1,surfaces:["overview","session"],clientOnly:!0,settings:{cellSize:{type:"number",label:"Cell size",help:"Ground-plane bin size in world units. Larger cells smooth the dwell heat; smaller cells sharpen spatial resolution.",default:1,min:.25,max:5,step:.25,unit:"m"}},enabled:e=>"viewer"!==e.filters.cameraMode,load:e=>e.api.cameraPositionHeatmap({...e8(e),cellSize:e.settings.cellSize}),render:({data:e,ctx:t})=>(0,s.jsx)(ee,{bins:e??[],cellSize:t.settings.cellSize})},{id:"desire-lines",title:"Desire lines",subtitle:"The routes visitors actually walk",help:"Every session's camera path, binned onto the ground plane and overlaid as a faint poly-line. Where many visitors walk the same way the lines pile up into bright 'desire lines' — the routes people take vs. the ones the scene intended. Filter to the first-person camera mode to isolate walkable sessions.",span:1,surfaces:["overview"],clientOnly:!0,enabled:e=>"viewer"!==e.filters.cameraMode,load:e=>e.api.aggregatePaths({...e8(e),cellSize:1}),render:({data:e})=>(0,s.jsx)(et,{points:e??[]})},{id:"mesh-interaction-kinds",title:"Interaction kinds",subtitle:"How visitors act on each mesh",help:"Per-mesh breakdown of interaction kinds (hover, pick, click, drag, …) from mesh_interaction events. The dwell ranking says which objects draw attention; this says how people act on them — a hovered-but-never-picked mesh reads very differently from a dragged one.",span:1,surfaces:["overview","session"],load:e=>e.api.meshKinds({...e8(e),limit:200}),render:({data:e})=>(0,s.jsx)(er,{rows:e??[]})},{id:"reachability-report",title:"Reachability report",subtitle:"How far interacted objects sit from the user",help:"Per-mesh distance between where the user stood (the click-time camera position) and the point they interacted with, from mesh_interaction events ASOF-joined to the nearest preceding camera_sample (#151). Objects whose interactions cluster far from the standpoint are consistently reached from an uncomfortable range — actionable feedback for VR UI placement and first-person layout. Meshes past the comfortable-reach threshold are flagged.",span:1,surfaces:["overview","session"],load:e=>e.api.reachability({...e8(e),bucketSize:.5,limit:500}),render:({data:e})=>(0,s.jsx)(ea,{bins:e??[],bucketSize:.5,threshold:2})},{id:"input-modality-split",title:"Input-modality split",subtitle:"Keyboard / gamepad / touch / XR — and top shortcuts",help:"How visitors drive the experience: the share of interactions per input source (mouse / touch / keyboard / gamepad / XR), from the input-source breakdown (ADR 0011), paired with the most-used app-level shortcuts/actions from input_action events (ADR 0023).",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.interactionsBySource({...e8(e),source:void 0,limit:100}),e.api.topInputActions({...e8(e),source:void 0,limit:50})]);return{sources:t,actions:s}},render:({data:e})=>(0,s.jsx)(eg,{sources:e.sources??[],actions:e.actions??[]})},{id:"render-scale-truth",title:"Render-scale truth",subtitle:"Is that FPS real, or downscaled?",help:"Adaptive renderers keep frame rate up by quietly dropping resolution. This pairs the FPS headline with the render scale that bought it, and flags the 'good FPS at a low render scale' case where the headline overstates the real device experience.",span:1,surfaces:["overview","session"],load:e=>e.api.renderScale(e8(e)),render:({data:e})=>(0,s.jsx)(eS,{data:e})},{id:"perf-distribution",title:"Performance distribution",subtitle:"p05 / p50 / p95 FPS bands, not just the average",help:"The shape of rendering performance, not a single average: p05 (worst), p50 (typical) and p95 (best) FPS computed per-session then aggregated (ADR 0028 §1), plus a histogram of per-session median FPS. One session contributes one data point, so a few chatty sessions can't skew the curve.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.perfDistribution(e8(e)),e.api.fpsHistogram(e8(e))]);return{distribution:t,histogram:s}},render:({data:e})=>(0,s.jsx)(ej,{distribution:e.distribution,histogram:e.histogram??[]})},{id:"perf-churn",title:"Perf-driven churn",subtitle:"Did the stutter actually cost the session?",help:"Correlates perf dips with early session end (#144). Of the sessions that ended in range, this is the share that ended shortly after an FPS dip (a frame_perf sample below the threshold) or a compile_stall, within the configured window. The cause split attributes each churned session to a low-FPS dip and/or a compile stall — a session hit by both is counted under each cause but only once in the headline rate. No schema change: derived from existing frame_perf, compile_stall and session_end events.",span:1,surfaces:["overview","session"],settings:{windowSec:{type:"number",label:"Window",help:"How long before a session's end a perf dip still counts as correlated.",default:30,min:5,max:300,step:5,unit:"s"},fpsThreshold:{type:"number",label:"FPS dip below",help:"A frame_perf sample below this FPS counts as a dip.",default:30,min:10,max:90,step:5},stallMs:{type:"number",label:"Compile stall ≥",help:"A compile_stall of at least this many milliseconds counts.",default:100,min:0,max:2e3,step:50,unit:"ms"}},load:e=>e.api.perfChurn({...e8(e),windowMs:1e3*e.settings.windowSec,fpsThreshold:e.settings.fpsThreshold,stallMs:e.settings.stallMs}),render:({data:e})=>(0,s.jsx)(ew,{churn:e})},te,tt,ts,{id:"navigation-mix",title:"Navigation-style mix",subtitle:"Orbit / pan / dolly / zoom / roll / fly share + avg gesture duration",span:1,surfaces:["overview","session"],load:e=>e.api.cameraGestures({...e8(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eM,{stats:e??[]})},{id:"xr-locomotion-comfort",title:"VR comfort & locomotion",subtitle:"Teleport / smooth / navigate mix for XR sessions + early-exit correlation",span:1,surfaces:["overview","session"],load:e=>e.api.xrLocomotion({...e8(e),source:void 0}),render:({data:e})=>(0,s.jsx)(eT,{stats:e??[]})},{id:"scene-retention-funnel",title:"Scene retention funnel",subtitle:"How sessions flow between scenes/levels",help:"Canned level-retention preset (#147): session counts flowing scene → scene in the order they occur, built directly from scene_change markers — no funnel steps to author. Each row is a consecutive transition weighted by the distinct sessions that made it; grouping by the scene left shows where visitors go next and where they drop off. Complements the caller-authored funnel (ADR 0038).",span:1,surfaces:["overview"],load:e=>e.api.sceneRetention({...e8(e),scene:void 0,limit:50}),render:({data:e})=>(0,s.jsx)(eX,{links:e??[]})},{id:"backtrack-ratio",title:"Backtracking hotspots",subtitle:"Scenes ranked by how often visitors re-walk the same area",help:"Path-retrace signal (#153): the same camera-position stream that feeds desire lines, binned onto a coarse grid. Consecutive samples in one cell are collapsed (so standing still doesn't count), then re-entering a cell you already left is a 'backtrack'. The ratio is revisits ÷ cell entries, pooled per scene — a high ratio flags a dead end, a missed cue, or an unclear puzzle, i.e. a candidate for clearer signage / level-design fixes.",span:1,surfaces:["overview","session"],load:e=>e.api.backtrackRatio({...e8(e),source:void 0}),render:({data:e})=>(0,s.jsx)(e$,{stats:e??[]})},{id:"load-bounce-funnel",title:"Load → bounce funnel",subtitle:"Bounce rate by asset-load time band",help:"Sessions bucketed by their initial asset-load time. A session 'bounces' when it produces no interaction (pointer, mesh, or camera gesture) at or after loading. Rising bounce rate in the slower bands is the concrete cost of slow loads.",span:1,surfaces:["overview"],load:e=>e.api.loadBounce({...e8(e),bands:[...eY]}),render:({data:e})=>(0,s.jsx)(eQ,{rows:e??[],boundaries:eY})},{id:"dead-zone-report",title:"Dead-zone report",subtitle:"Scene parts visitors never approach",help:"The negative space: registered proxy meshes (ADR 0014) with near-zero camera proximity, computed by subtracting the occupied camera-position voxels (scene coverage) from the scene's proxy geometry. Ranked coldest first. Requires a registered scene proxy to know which regions could be visited.",span:1,surfaces:["overview","session"],load:async e=>{let[t,s]=await Promise.all([e.api.coverage({...e8(e),cellSize:1}),e9(e)]);return{coverage:t,proxyMeshes:s}},render:({data:e})=>(0,s.jsx)(ef,{coverage:e.coverage??[],proxyMeshes:e.proxyMeshes??[],cellSize:1})},tn,tr];function to(e){return e?e.split(",").map(e=>e.trim()).filter(e=>e.length>0):[]}let tc={panels:[],errors:[],loading:!1};function td({errors:e}){let[t,n]=(0,r.useState)(!1);return 0===e.length||t?null:(0,s.jsxs)("section",{className:"rounded-xl border border-dashed border-amber/60 bg-panel/60 px-4 py-3 text-xs text-fg-muted",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,s.jsxs)("span",{className:"font-medium uppercase tracking-wide text-fg",children:[e.length," panel",1===e.length?"":"s"," failed to load"]}),(0,s.jsx)("button",{type:"button",onClick:()=>n(!0),className:"text-fg-muted underline-offset-2 transition hover:text-amber hover:underline",children:"Dismiss"})]}),(0,s.jsx)("ul",{className:"mt-2 space-y-1",children:e.map((e,t)=>(0,s.jsxs)("li",{className:"font-mono",children:[(0,s.jsx)("span",{className:"text-fg",children:e.source}),(0,s.jsxs)("span",{className:"text-fg-muted",children:[" ","— [",e.code,"] ",e.message]})]},`${e.source}-${t}`))})]})}function tu({bins:e,gridSize:t}){return(0,s.jsx)(G,{title:"View-direction heatmap",subtitle:"Top-down sphere — center = looking up, rim = looking down",help:(0,s.jsxs)(s.Fragment,{children:["A flattened top-down view of where the camera pointed."," ",(0,s.jsx)("strong",{children:"Distance from the center"})," is the up/down tilt: the ",(0,s.jsx)("strong",{children:"center"})," ","is looking straight up, the ",(0,s.jsx)("strong",{children:"middle ring"})," is the horizon (level), and the"," ",(0,s.jsx)("strong",{children:"outer rim"})," is looking straight down. The"," ",(0,s.jsx)("strong",{children:"angle around the disc"})," is the facing (azimuth) direction. Color shows how often each direction was viewed, normalized to the most-viewed direction in range."]}),children:(0,s.jsxs)("div",{className:"flex flex-col items-center gap-3",children:[(0,s.jsx)(eD,{bins:e,gridSize:t,className:"rounded-lg border border-edge"}),e.length>0?(0,s.jsxs)("div",{className:"flex items-center gap-2 text-[10px] text-fg-muted",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:"View density"}),(0,s.jsx)("span",{children:"rarely"}),(0,s.jsx)("span",{className:"h-2 w-28 rounded-sm",style:{background:N.HEAT_GRADIENT}}),(0,s.jsx)("span",{children:"most-viewed"})]}):null]})})}function tm(e){return null==e?"":new Date(e-6e4*new Date(e).getTimezoneOffset()).toISOString().slice(0,16)}function th(e){if(!e)return;let t=new Date(e).getTime();return Number.isNaN(t)?void 0:t}function tp({filters:e,scenes:t,onChange:n,busy:r}){let a=t=>n({...e,...t});return(0,s.jsxs)("section",{className:"mb-6 flex flex-wrap items-end gap-x-4 gap-y-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsx)("span",{className:"text-xs text-fg-muted",children:"Time window"}),(0,s.jsxs)("div",{className:"flex flex-wrap gap-1",role:"group","aria-label":"Time window",children:[p.map(t=>{let n=e.window===t.id;return(0,s.jsx)("button",{type:"button",onClick:()=>a({window:t.id}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${n?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:t.label},t.id)}),(0,s.jsx)("button",{type:"button",onClick:()=>a({window:"custom",since:e.since??Date.now()-864e5,until:e.until??Date.now()}),className:`rounded-md border px-2.5 py-1.5 text-xs transition ${"custom"===e.window?"border-amber bg-amber/10 text-saffron":"border-edge text-fg hover:border-amber/60 hover:text-fg-hi"}`,children:"Custom"})]})]}),"custom"===e.window?(0,s.jsxs)("div",{className:"flex items-end gap-2",children:[(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["From",(0,s.jsx)("input",{type:"datetime-local",value:tm(e.since),onChange:e=>a({since:th(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["To",(0,s.jsx)("input",{type:"datetime-local",value:tm(e.until),onChange:e=>a({until:th(e.target.value)}),className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron"})]})]}):null,(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Scene",(0,s.jsxs)("select",{value:e.scene??"",onChange:e=>a({scene:e.target.value||void 0}),className:"min-w-40 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All scenes"}),t.map(e=>(0,s.jsxs)("option",{value:e.scene_id,children:[e.scene_id," (",e.events.toLocaleString(),")"]},e.scene_id))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Input source",(0,s.jsxs)("select",{value:e.source??"",onChange:e=>a({source:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All sources"}),y.map(e=>(0,s.jsx)("option",{value:e,children:j(e)},e))]})]}),(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Camera mode",(0,s.jsxs)("select",{value:e.cameraMode??"",onChange:e=>a({cameraMode:e.target.value||void 0}),className:"min-w-36 rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",children:[(0,s.jsx)("option",{value:"",children:"All cameras"}),(0,s.jsx)("option",{value:"viewer",children:"Viewer (orbit)"}),(0,s.jsx)("option",{value:"first-person",children:"First-person (walk)"})]})]}),(0,s.jsx)("span",{className:`ml-auto text-xs ${r?"text-saffron":"text-fg-muted"}`,"aria-live":"polite",children:r?"Refreshing…":"Up to date"})]})}function tx({rows:e}){let t=function(e){let t=new Map;for(let s of e){let e=t.get(s.source);e||(e={source:s.source,total:0,sessions:0,byType:[]},t.set(s.source,e)),e.total+=s.count,e.sessions=Math.max(e.sessions,s.sessions),e.byType.push({event_type:s.event_type,count:s.count})}for(let e of t.values())e.byType.sort((e,t)=>t.count-e.count);return[...t.values()].sort((e,t)=>t.total-e.total)}(e),n=t.reduce((e,t)=>Math.max(e,t.total),0);return(0,s.jsx)(G,{title:"Input sources",subtitle:"Interactions by input source",children:0===t.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No source-bearing interactions in range."}):(0,s.jsx)("ul",{className:"space-y-3",children:t.map(e=>(0,s.jsxs)("li",{className:"text-sm",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,s.jsx)("span",{className:"font-medium text-fg",children:j(e.source)}),(0,s.jsxs)("span",{className:"tabular-nums text-fg-muted",children:[S(e.total),(0,s.jsxs)("span",{className:"ml-1 text-xs text-fg-muted",children:["· ",S(e.sessions)," ",1===e.sessions?"session":"sessions"]})]})]}),(0,s.jsx)("div",{className:"mt-1 h-1.5 w-full overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-amber",style:{width:`${n>0?e.total/n*100:0}%`}})}),(0,s.jsx)("div",{className:"mt-1.5 flex flex-wrap gap-1.5",children:e.byType.map(e=>{let t;return(0,s.jsxs)("span",{className:"rounded bg-ink/60 px-1.5 py-0.5 font-mono text-[11px] text-fg-muted",children:[(t=e.event_type.replace(/_/g," ")).charAt(0).toUpperCase()+t.slice(1)," ",S(e.count)]},e.event_type)})})]},e.source))})})}function tg({perf:e}){return(0,s.jsx)(G,{title:"Rendering performance",subtitle:"frame_perf samples",children:(0,s.jsx)(eV,{perf:e})})}function tf({label:e,value:t,unit:n}){return(0,s.jsxs)("div",{className:"rounded-lg bg-ink/60 p-3",children:[(0,s.jsx)("div",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsxs)("div",{className:"mt-1 text-2xl font-semibold tabular-nums text-fg-hi",children:[t,n?(0,s.jsx)("span",{className:"ml-1 text-sm font-normal text-fg-muted",children:n}):null]})]})}function tb(e){return S(e/1048576,1)}function tv({bins:e}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No FPS samples in range."});let t=[...e].sort((e,t)=>e.bucket-t.bucket),n=t.reduce((e,t)=>Math.max(e,t.sessions),0)||1,r=t.length>1?t[1].bucket-t[0].bucket:10;return(0,s.jsx)("div",{className:"space-y-1.5",children:t.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-2 text-xs",children:[(0,s.jsxs)("span",{className:"w-16 shrink-0 text-right tabular-nums text-fg-muted",children:[e.bucket,"–",e.bucket+r]}),(0,s.jsx)("div",{className:"h-4 flex-1 overflow-hidden rounded bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded bg-emerald-500/70",style:{width:`${e.sessions/n*100}%`}})}),(0,s.jsx)("span",{className:"w-10 shrink-0 tabular-nums text-fg-muted",children:e.sessions})]},e.bucket))})}function tj({data:e}){let{distribution:t,histogram:n,frameTime:r,jank:a,byDevice:i,byScene:l,resources:o,stability:c}=e,d=(t?.samples??0)>0;return(0,s.jsxs)("section",{className:"space-y-4",children:[(0,s.jsx)("h2",{className:"text-sm font-semibold uppercase tracking-wide text-fg-muted",children:"Performance"}),(0,s.jsx)(G,{title:"FPS distribution",subtitle:"per-session p05 / p50 / p95, summarized across sessions",children:d?(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-4",children:[(0,s.jsx)(tf,{label:"p05 FPS (worst)",value:S(t.p05_fps,1)}),(0,s.jsx)(tf,{label:"p50 FPS (typical)",value:S(t.p50_fps,1)}),(0,s.jsx)(tf,{label:"p95 FPS (best)",value:S(t.p95_fps,1)}),(0,s.jsx)(tf,{label:"Sessions",value:S(t.sessions)})]}),(0,s.jsx)(tv,{bins:n})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No performance samples in range."})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsx)(G,{title:"Frame time",subtitle:"per-session median & worst-window p95",children:r&&0!==r.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(tf,{label:"p50 frame time",value:S(r.p50_ms,1),unit:"ms"}),(0,s.jsx)(tf,{label:"p95 frame time",value:S(r.p95_ms,1),unit:"ms"})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No frame-time samples in range."})}),(0,s.jsx)(G,{title:"Jank",subtitle:"long frames per sample window",children:a&&0!==a.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,s.jsx)(tf,{label:"Median session",value:S(a.median_rate,2)}),(0,s.jsx)(tf,{label:"Worst decile",value:S(a.worst_decile_rate,2)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No jank data in range."})})]}),(0,s.jsx)(G,{title:"FPS by device",subtitle:"per-session median FPS, by session_start.device + UA-derived browser/OS",children:0===i.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No device data in range."}):(0,s.jsx)("div",{className:"overflow-x-auto",children:(0,s.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Backend"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Browser"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"OS"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Mobile"}),(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"GPU"}),(0,s.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,s.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,s.jsx)("tbody",{className:"text-fg",children:i.map((e,t)=>(0,s.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,s.jsx)("td",{className:"py-1 pr-4",children:e.engine||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:e.browser||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:e.os||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4",children:"true"===e.is_mobile?"yes":"no"}),(0,s.jsx)("td",{className:"py-1 pr-4 max-w-[16rem] truncate",title:e.renderer,children:e.renderer||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:S(e.sessions)}),(0,s.jsx)("td",{className:"py-1 text-right tabular-nums",children:S(e.p50_fps,1)})]},`${e.engine}|${e.browser}|${e.os}|${e.is_mobile}|${e.renderer}|${t}`))})]})})}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-2",children:[(0,s.jsx)(G,{title:"FPS by scene",subtitle:"per-session median FPS per scene",children:0===l.length?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No scene data in range."}):(0,s.jsxs)("table",{className:"w-full text-left text-sm",children:[(0,s.jsx)("thead",{className:"text-xs uppercase tracking-wide text-fg-muted",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"py-1 pr-4 font-medium",children:"Scene"}),(0,s.jsx)("th",{className:"py-1 pr-4 text-right font-medium",children:"Sessions"}),(0,s.jsx)("th",{className:"py-1 text-right font-medium",children:"p50 FPS"})]})}),(0,s.jsx)("tbody",{className:"text-fg",children:l.map(e=>(0,s.jsxs)("tr",{className:"border-t border-ink/60",children:[(0,s.jsx)("td",{className:"py-1 pr-4",children:e.scene_id||"—"}),(0,s.jsx)("td",{className:"py-1 pr-4 text-right tabular-nums",children:S(e.sessions)}),(0,s.jsx)("td",{className:"py-1 text-right tabular-nums",children:S(e.p50_fps,1)})]},e.scene_id))})]})}),(0,s.jsx)(G,{title:"Stability",subtitle:"hard failures frame_perf can't show",children:c?(0,s.jsxs)("div",{className:"grid grid-cols-3 gap-3",children:[(0,s.jsx)(tf,{label:"Context losses",value:S(c.context_losses)}),(0,s.jsx)(tf,{label:"Compile stalls",value:S(c.compile_stalls)}),(0,s.jsx)(tf,{label:"Incidents",value:S(c.incidents)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No stability data in range."})})]}),(0,s.jsx)(G,{title:"Resource footprint",subtitle:"per-session p50 / p95 of what the scene asked of the device",children:o&&0!==o.sessions?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3",children:[(0,s.jsx)(tf,{label:"p50 JS heap",value:tb(o.p50_js_heap_bytes),unit:"MB"}),(0,s.jsx)(tf,{label:"p50 texture",value:tb(o.p50_texture_bytes),unit:"MB"}),(0,s.jsx)(tf,{label:"p50 triangles",value:S(o.p50_triangles)}),(0,s.jsx)(tf,{label:"p95 JS heap",value:tb(o.p95_js_heap_bytes),unit:"MB"}),(0,s.jsx)(tf,{label:"p95 texture",value:tb(o.p95_texture_bytes),unit:"MB"}),(0,s.jsx)(tf,{label:"p95 triangles",value:S(o.p95_triangles)})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No resource samples in range."})})]})}function ty({label:e,value:t,tone:n="neutral",hint:r}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("p",{className:`mt-0.5 text-lg font-semibold tabular-nums ${"bad"===n?"text-red-300":"warn"===n?"text-amber-300":"good"===n?"text-emerald-300":"text-fg-hi"}`,children:t}),r?(0,s.jsx)("p",{className:"text-[11px] text-fg-muted",children:r}):null]})}function tN({counts:e,perf:t}){let n=new Map(e.map(e=>[e.event_type,e.count])),r=e=>n.get(e)??0,a=r("session_start"),i=r("runtime_error"),l=r("context_lost"),o=r("focus_change"),c=r("visibility_change"),d=r("viewport_resize"),u=e.reduce((e,t)=>e+t.count,0),m=a>0?i/a:0;return(0,s.jsx)(G,{title:"Scene health",subtitle:"Errors, GPU context loss & attention gaps in the selected window",children:u>0?(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[(0,s.jsx)(ty,{label:"Errors",value:S(i),tone:i>0?"bad":"good",hint:a>0?`${m.toFixed(2)} / session`:void 0}),(0,s.jsx)(ty,{label:"Context loss",value:S(l),tone:l>0?"warn":"good",hint:"GPU device lost"}),(0,s.jsx)(ty,{label:"Avg FPS",value:t&&t.samples>0?S(t.avg_fps,1):"—",tone:t&&t.samples>0?t.avg_fps>=50?"good":"warn":"neutral",hint:t&&t.samples>0?`min ${S(t.min_fps,0)}`:void 0}),(0,s.jsx)(ty,{label:"Sessions",value:S(a)}),(0,s.jsx)(ty,{label:"Attention",value:S(o+c),hint:"focus + visibility changes"}),(0,s.jsx)(ty,{label:"Resizes",value:S(d),hint:"viewport changes"})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No events in range."})})}let tw=["fatal","error","warning","info"];function tk(e){let t=tw.indexOf(e);return -1===t?tw.length:t}function tS({label:e,value:t,tone:n="neutral"}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"truncate text-xs uppercase tracking-wide text-fg-muted",title:e,children:e}),(0,s.jsx)("p",{className:`mt-0.5 text-lg font-semibold tabular-nums ${"bad"===n?"text-red-300":"warn"===n?"text-amber-300":"text-fg-hi"}`,children:t})]})}function t_({title:e,buckets:t,tones:n}){return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(e=>(0,s.jsx)(tS,{label:e.label,value:S(e.count),tone:n?.(e)},e.key))})]})}function tM({rows:e}){let{bySeverity:t,byCategory:n,byBackend:r,total:a}=function(e){let t=new Map,s=new Map,n=new Map,r=0;for(let a of e){let e=Number(a.incidents)||0;if(e<=0)continue;r+=e,t.set(a.severity,(t.get(a.severity)??0)+e),s.set(a.category,(s.get(a.category)??0)+e);let i=""===a.backend?"unknown":a.backend;n.set(i,(n.get(i)??0)+e)}let a=e=>[...e.entries()].map(([e,t])=>({key:e,label:e,count:t})),i=a(t).sort((e,t)=>tk(e.key)-tk(t.key)||e.key.localeCompare(t.key)),l=(e,t)=>t.count-e.count||e.key.localeCompare(t.key);return{bySeverity:i,byCategory:a(s).sort(l),byBackend:a(n).sort(l),total:r}}(e);return(0,s.jsx)(G,{title:"Engine diagnostics",subtitle:"GPU-health incidents by severity, category & backend in the selected window",children:0===a?(0,s.jsxs)("div",{className:"space-y-1.5",children:[(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No engine diagnostics in range."}),(0,s.jsxs)("p",{className:"text-xs text-fg-muted",children:["Engine diagnostics (",(0,s.jsx)("code",{className:"text-fg-hi",children:"graphics_diagnostic"}),") are"," ",(0,s.jsx)("span",{className:"text-fg-hi",children:"opt-in and off by default"}),". Enable"," ",(0,s.jsx)("code",{className:"text-fg-hi",children:"captureGraphicsDiagnostics"})," in the SDK to surface GPU errors, device losses, and shader-compile failures here."]})]}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(t_,{title:"By severity",buckets:t,tones:e=>{var t;return"fatal"===(t=e.key)||"error"===t?"bad":"warning"===t?"warn":"neutral"}}),(0,s.jsx)(t_,{title:"By category",buckets:n}),(0,s.jsx)(t_,{title:"By backend",buckets:r})]})})}function tC({label:e,value:t}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"truncate text-xs uppercase tracking-wide text-fg-muted",title:e,children:e}),(0,s.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-fg-hi",children:t})]})}function tz({title:e,buckets:t}){return(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs font-medium uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:t.map(e=>(0,s.jsx)(tC,{label:e.label,value:S(e.count)},e.key))})]})}function tP({rows:e}){let{byApi:t,byBackend:n,byShadingLanguage:r,total:a}=function(e){let t=new Map,s=new Map,n=new Map,r=0;for(let a of e){let e=Number(a.sessions)||0;if(e<=0)continue;r+=e;let i=(t,s)=>{let n=""===s?"unknown":s;t.set(n,(t.get(n)??0)+e)};i(t,a.api),i(s,a.backend),i(n,a.shadingLanguage)}let a=(e,t)=>t.count-e.count||e.key.localeCompare(t.key),i=e=>[...e.entries()].map(([e,t])=>({key:e,label:e,count:t})).sort(a);return{byApi:i(t),byBackend:i(s),byShadingLanguage:i(n),total:r}}(e);return(0,s.jsx)(G,{title:"Rendering technology",subtitle:"Sessions by graphics API, backend & shading language in the selected window",children:0===a?(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No sessions in range."}):(0,s.jsxs)("div",{className:"space-y-4",children:[(0,s.jsx)(tz,{title:"By API",buckets:t}),(0,s.jsx)(tz,{title:"By backend",buckets:n}),(0,s.jsx)(tz,{title:"By shading language",buckets:r})]})})}function tR({label:e,value:t,hint:n}){return(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 px-3 py-2.5",children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("p",{className:"mt-0.5 text-lg font-semibold tabular-nums text-fg-hi",children:t}),n?(0,s.jsx)("p",{className:"text-[11px] text-fg-muted",children:n}):null]})}function tT({buckets:e,bucketSize:t}){if(0===e.length)return(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."});let n=[...e].sort((e,t)=>e.bucket-t.bucket),r=n.reduce((e,t)=>Math.max(e,t.count),0)||1;return(0,s.jsx)("div",{className:"flex flex-col gap-1",children:n.map(e=>{let n=e.bucket*t;return(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsxs)("span",{className:"w-24 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:[S(n,1),"–",S(n+t,1)]}),(0,s.jsx)("div",{className:"h-3.5 flex-1 overflow-hidden rounded-sm bg-ink/60",children:(0,s.jsx)("div",{className:"h-full rounded-sm bg-amber",style:{width:`${e.count/r*100}%`}})}),(0,s.jsx)("span",{className:"w-12 shrink-0 text-right font-mono text-[11px] text-fg-muted",children:S(e.count)})]},e.bucket)})})}function t$({coverage:e,cellSize:t,distance:n,bucketSize:r,navigation:a}){let i=e.length,l=e.reduce((e,t)=>e+t.count,0),o=a.reduce((e,t)=>e+t.total_distance,0),c=a.reduce((e,t)=>e+t.segments,0),d=a.reduce((e,t)=>e+t.active_segments,0),u=a.length,m=i>0||a.length>0;return(0,s.jsx)(G,{title:"Scene traversal",subtitle:"Coverage, camera distance & navigation effort — derived from camera_sample",collapsible:!0,defaultCollapsed:!0,children:m?(0,s.jsxs)("div",{className:"flex flex-col gap-5",children:[(0,s.jsxs)("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[(0,s.jsx)(tR,{label:"Visited cells",value:S(i),hint:`${S(t,2)} u voxels`}),(0,s.jsx)(tR,{label:"Camera samples",value:S(l)}),(0,s.jsx)(tR,{label:"Avg travel",value:S(u>0?o/u:0,1),hint:u>0?`over ${S(u)} sessions`:void 0}),(0,s.jsx)(tR,{label:"Active movement",value:`${S(100*(c>0?d/c:0),0)}%`,hint:"of camera segments"})]}),(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"mb-1.5 text-xs uppercase tracking-wide text-fg-muted",children:"Camera distance distribution"}),(0,s.jsx)(tT,{buckets:n,bucketSize:r})]})]}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"No camera samples in range."})})}let tE={babylon:"Babylon.js","babylon-lite":"Babylon (lite)",three:"three.js",playcanvas:"PlayCanvas",r3f:"react-three-fiber",aframe:"A-Frame"};function tI({project:e,playgroundUrl:t,onView:n,onOpenOverlay:a}){var i;let l=e.scene,o=l?.engines.length?l.engines:[],[c,d]=(0,r.useState)(l?.defaultEngine??o[0]??""),u=t.length>0&&c.length>0;return(0,s.jsxs)("div",{className:"flex flex-col gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("h3",{className:"text-sm font-semibold text-fg-hi",children:l?.label??e.name}),(0,s.jsx)("p",{className:"text-xs text-fg-muted",children:e.name})]}),l?(0,s.jsx)("span",{className:"shrink-0 rounded-full border border-edge bg-ink/50 px-2 py-0.5 text-[11px] text-fg-muted",children:"first-person"===l.cameraMode?"first-person":"viewer"}):null]}),l?.description?(0,s.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:l.description}):(0,s.jsx)("p",{className:"text-xs leading-relaxed text-fg-muted",children:"A project without scene metadata — open its analytics directly."}),o.length>1?(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-[11px] text-fg-muted",children:["Engine",(0,s.jsx)("select",{className:"rounded-md border border-edge bg-ink px-2 py-1.5 text-xs text-fg outline-none focus:border-saffron",value:c,onChange:e=>d(e.target.value),children:o.map(e=>(0,s.jsx)("option",{value:e,children:tE[e]??e},e))})]}):1===o.length?(0,s.jsxs)("p",{className:"text-[11px] text-fg-muted",children:["Engine: ",tE[i=o[0]]??i]}):null,(0,s.jsxs)("div",{className:"mt-auto flex flex-wrap gap-2 pt-1",children:[(0,s.jsx)("button",{type:"button",onClick:()=>n(e),className:"rounded-md bg-amber px-3 py-1.5 text-xs font-medium text-ink transition hover:bg-ember",children:"View analytics"}),l?(0,s.jsx)("button",{type:"button",disabled:!u,onClick:()=>a(e,c),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi disabled:opacity-40",children:"Open live scene"}):null]})]})}function tA({projects:e,playgroundUrl:t,onView:n}){let[a,i]=(0,r.useState)(null),l=(0,r.useMemo)(()=>{let t=[],s=[],n=[];for(let r of e)r.scene?"first-person"===r.scene.cameraMode?s.push(r):t.push(r):n.push(r);return{viewer:t,firstPerson:s,other:n}},[e]),o=(e,s)=>{let n=e.scene;n&&t&&i({url:`${t.replace(/\/$/,"")}/?scene=${encodeURIComponent(n.id)}&engine=${encodeURIComponent(s)}`,title:`${n.label} \xb7 ${tE[s]??s}`})},c=(e,r)=>r.length>0?(0,s.jsxs)("section",{className:"flex flex-col gap-3",children:[(0,s.jsx)("h2",{className:"text-xs font-semibold uppercase tracking-wide text-fg-muted",children:e}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",children:r.map(e=>(0,s.jsx)(tI,{project:e,playgroundUrl:t,onView:n,onOpenOverlay:o},e.id))})]}):null;return(0,s.jsxs)(G,{title:"Scenes",subtitle:"Pick a scene to explore its analytics, or open it live to test capture.",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-6",children:[c("Viewer",l.viewer),c("First-person",l.firstPerson),c("Other projects",l.other)]}),a?(0,s.jsx)("div",{className:"fixed inset-0 z-50 flex flex-col bg-black/70 p-4 sm:p-8",role:"dialog","aria-modal":"true","aria-label":"Live scene overlay",children:(0,s.jsxs)("div",{className:"mx-auto flex h-full w-full max-w-6xl flex-col overflow-hidden rounded-xl border border-edge bg-panel",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-edge px-4 py-2.5",children:[(0,s.jsx)("p",{className:"text-sm text-fg",children:a.title}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[(0,s.jsx)("a",{href:a.url,target:"_blank",rel:"noreferrer",className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Open in new tab ↗"}),(0,s.jsx)("button",{type:"button",onClick:()=>i(null),className:"rounded-md border border-edge px-3 py-1.5 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Close ✕"})]})]}),(0,s.jsx)("iframe",{title:a.title,src:a.url,className:"h-full w-full flex-1 bg-ink"})]})}):null]})}function tF({sessions:e,onSelect:t,selectedId:n}){return(0,s.jsx)(G,{title:"Sessions",subtitle:t?`${e.length} most recent \xb7 select to drill in`:`${e.length} most recent`,children:(0,s.jsx)(eF,{sessions:e,onSelect:t,selectedId:n})})}function tL({baseUrl:e,apiKey:t,sessionId:n,scene:a}){let i=(0,r.useRef)(null),[l,o]=(0,r.useState)([]),[c,d]=(0,r.useState)("loading");return(0,r.useEffect)(()=>{let s=!1;return d("loading"),new u(e,t).sessionTrajectory(n,{scene:a,limit:5e3}).then(e=>{s||(o(e),d("ready"))}).catch(()=>{s||(o([]),d("error"))}),()=>{s=!0}},[e,t,n,a]),(0,r.useEffect)(()=>{let e=i.current;if(!e)return;let t=e.getContext("2d");if(!t||(t.clearRect(0,0,360,360),t.fillStyle="#0b0e14",t.fillRect(0,0,360,360),0===l.length))return;let s=1/0,n=-1/0,r=1/0,a=-1/0;for(let e of l)e.x<s&&(s=e.x),e.x>n&&(n=e.x),e.z<r&&(r=e.z),e.z>a&&(a=e.z);let o=328/Math.max(n-s,a-r,.001),c=e=>[16+(e.x-s)*o,16+(a-e.z)*o];t.lineWidth=2,t.strokeStyle="#38bdf8",t.beginPath(),l.forEach((e,s)=>{let[n,r]=c(e);0===s?t.moveTo(n,r):t.lineTo(n,r)}),t.stroke();let d=l[0],u=l[l.length-1];if(d){let[e,s]=c(d);t.fillStyle="#22c55e",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}if(u){let[e,s]=c(u);t.fillStyle="#ef4444",t.beginPath(),t.arc(e,s,5,0,2*Math.PI),t.fill()}},[l]),(0,s.jsxs)(G,{title:"Walked path",subtitle:"Camera trajectory (top-down)",help:"The ordered route this session's camera took across the X/Z ground plane — green is the start, red is the end. Meaningful for first-person (walkable) sessions.",children:[(0,s.jsx)("div",{className:"flex justify-center",children:(0,s.jsx)("canvas",{ref:i,width:360,height:360,className:"rounded-lg border border-edge","aria-label":"Session camera trajectory"})}),"loading"===c?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"Loading trajectory…"}):"error"===c?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-red-400",children:"Failed to load trajectory."}):0===l.length?(0,s.jsx)("p",{className:"mt-2 text-center text-xs text-fg-muted",children:"No camera movement recorded for this session."}):null]})}function tD(e){return e>=36e5?`${Math.round(e/36e5)}h`:e>=6e4?`${Math.round(e/6e4)}m`:e>=1e3?`${Math.round(e/1e3)}s`:`${e}ms`}function tO({buckets:e,intervalMs:t,onBrush:n,onClear:a,brushed:i}){let l=(0,r.useRef)(null),o=(0,r.useRef)(null),[c,d]=(0,r.useState)(640),u=(0,r.useRef)(null),[m,h]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=l.current;if(!e)return;let t=()=>d(Math.max(320,e.clientWidth));t();let s=new ResizeObserver(t);return s.observe(e),()=>s.disconnect()},[]);let p={x:40,y:14,w:Math.max(1,c-40-36),h:114},x=e.length>0?{start:e[0].bucket,end:e[e.length-1].bucket+t}:null,g=(0,r.useCallback)(e=>{if(!x)return 0;let t=(e-p.x)/p.w;return Math.round(x.start+Math.max(0,Math.min(1,t))*(x.end-x.start))},[x,p.x,p.w]);(0,r.useEffect)(()=>{let s=o.current;if(!s)return;let n=s.getContext("2d");if(!n)return;if(n.clearRect(0,0,c,150),n.fillStyle="#0b0e14",n.fillRect(0,0,c,150),0===e.length||!x){n.fillStyle="#64748b",n.font="12px system-ui, sans-serif",n.textAlign="center",n.fillText("No events in range",c/2,75);return}let r=e.reduce((e,t)=>Math.max(e,t.events),0)||1,a=x.end-x.start,i=Math.max(1,p.w/e.length*.8);for(let t of e){let e=p.x+(t.bucket-x.start)/a*p.w,s=t.events/r*p.h;n.fillStyle="rgba(56, 189, 248, 0.55)",n.fillRect(e,p.y+p.h-s,i,s)}if(n.font="10px system-ui, sans-serif",n.textBaseline="middle",n.fillStyle="rgba(56, 189, 248, 0.95)",n.textAlign="right",n.fillText(String(r),p.x-5,p.y+4),n.fillText("0",p.x-5,p.y+p.h),n.textBaseline="alphabetic",n.fillStyle="rgba(56, 189, 248, 0.7)",n.textAlign="left",n.fillText(`events / ${tD(t)}`,p.x,144),m){let e=Math.min(m.x0,m.x1),t=Math.max(m.x0,m.x1);n.fillStyle="rgba(56, 189, 248, 0.18)",n.fillRect(e,p.y,t-e,p.h),n.strokeStyle="rgba(56, 189, 248, 0.8)",n.lineWidth=1,n.strokeRect(e,p.y,t-e,p.h)}},[e,c,x,m,t,p.x,p.y,p.w,p.h]);let f=()=>{let e=u.current;if(u.current=null,h(null),!e||4>Math.abs(e.x1-e.x0))return;let t=g(Math.min(e.x0,e.x1)),s=g(Math.max(e.x0,e.x1));s>t&&n(t,s)};return(0,s.jsx)(G,{title:"Event volume over time",subtitle:`Bars: events per ${tD(t)} \xb7 drag to zoom the time window`,children:(0,s.jsxs)("div",{ref:l,className:"relative",children:[(0,s.jsx)("canvas",{ref:o,width:c,height:150,className:"w-full cursor-crosshair rounded-lg border border-edge",onMouseDown:e=>{let t=e.currentTarget.getBoundingClientRect(),s=e.clientX-t.left;u.current={x0:s,x1:s},h({x0:s,x1:s})},onMouseMove:e=>{if(!u.current)return;let t=e.currentTarget.getBoundingClientRect(),s={...u.current,x1:e.clientX-t.left};u.current=s,h(s)},onMouseUp:f,onMouseLeave:f,"aria-label":"Event volume time series"}),i&&a?(0,s.jsx)("button",{type:"button",onClick:a,className:"absolute right-2 top-2 rounded-md border border-edge bg-ink/80 px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:"Clear zoom"}):null]})})}var tU=e.i(19761);function tB({label:e,value:t}){return(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-3 py-0.5",children:[(0,s.jsx)("span",{className:"shrink-0 text-xs text-fg-muted",children:e}),(0,s.jsx)("span",{className:"min-w-0 truncate text-right font-mono text-xs text-fg",title:t,children:t})]})}function tH({title:e,rows:t}){return 0===t.length?null:(0,s.jsxs)("div",{className:"rounded-lg border border-edge bg-ink/40 p-3",children:[(0,s.jsx)("p",{className:"mb-1.5 text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:e}),t.map(([e,t])=>(0,s.jsx)(tB,{label:e,value:t},e))]})}function tV(e){let t=[];for(let[s,n]of e){let e=null==n||""===n?null:Array.isArray(n)?n.join(" × "):"boolean"==typeof n?n?"yes":"no":"object"==typeof n?JSON.stringify(n):String(n);null!=e&&t.push([s,e])}return t}function tK({baseUrl:e,apiKey:t,sessionId:n,hiddenTypes:a,onToggleType:i,onSetAllHidden:l}){let o,c,d,[u,m]=(0,r.useState)([]),[h,p]=(0,r.useState)("loading"),[x,g]=(0,r.useState)(null),[f,b]=(0,r.useState)(new Set);(0,r.useEffect)(()=>{let s=!1;return p("loading"),g(null),m([]),b(new Set),(async()=>{try{let r=await (0,tU.fetchSessionEvents)({endpoint:e,apiKey:t,sessionId:n});if(s)return;m(r),p(0===r.length?"empty":"ready")}catch(e){if(s)return;p("error"),g(e instanceof Error?e.message:"Failed to load session data.")}})(),()=>{s=!0}},[e,t,n]);let{meta:v,byType:j,allTypes:y,sorted:N}=(0,r.useMemo)(()=>{let e=[...u].sort((e,t)=>e.ts-t.ts),t=new Map;for(let s of e)t.set(s.type,(t.get(s.type)??0)+1);let s=[...t.keys()].sort(),n=e[0];return{meta:{start:n,end:e[e.length-1],startEvent:e.find(e=>"session_start"===e.type)},byType:t,allTypes:s,sorted:e}},[u]);if("ready"!==h)return(0,s.jsx)(G,{title:"Session data",subtitle:"Metadata and captured event breakdown",children:(0,s.jsx)("p",{className:"py-6 text-center text-sm text-fg-muted",children:"loading"===h?"Loading session data…":"empty"===h?"No events captured for this session.":x??"Session data unavailable."})});let w=v.start,k=v.end,S=v.startEvent,_=w&&k?k.ts-w.ts:0,M=e=>e?new Date(e).toLocaleString():"—",C=w?.pageMeta,z=tV([["Project",w?.projectId],["Session",w?.sessionId],["Visitor",w?.visitorId],["SDK",w?.sdkVersion],["Scene ID",w?.sceneId],["URL",w?.url],["Started",M(w?.ts)],["Ended",M(k?.ts)],["Duration",(c=Math.floor((o=Math.round(_/1e3))/60),d=o%60,c>0?`${c}m ${d}s`:`${d}s`)],["Events",String(N.length)]]),P=C?tV([["Title",C.title],["Language",C.language],["Referrer",C.referrer],["Viewport",C.viewport],["Device pixel ratio",C.devicePixelRatio]]):[],R=S?.type==="session_start"?S.device:void 0,T=S?.type==="session_start"?S.graphics:void 0,$=S?.type==="session_start"?S.scene:void 0,E=S?.type==="session_start"?S.connector:void 0,I=S?.type==="session_start"?S.user:void 0,A=tV([["Engine",R?.engine],["Graphics API",T?.api],["Backend",T?.backend],["API version",T?.apiVersion],["Shading language",T?.shadingLanguage],["GPU vendor",R?.vendor],["GPU renderer",R?.renderer],["Max texture size",R?.maxTextureSize],["CPU cores",R?.hardwareConcurrency],["Device memory (GB)",R?.deviceMemoryGb],["Mobile",R?.isMobile]]),F=tV([["Connector",E?[E.name,E.version].filter(Boolean).join(" "):null],["Coordinate system",E?.coordinateSystem],["Description",$?.description],["Camera type",$?.cameraType],["Camera name",$?.cameraName],["Mesh count",$?.meshCount],["User id",I?.id],["User traits",I?.traits]]),L=y.every(e=>a.has(e));return(0,s.jsxs)(G,{title:"Session data",subtitle:"Metadata that was sent and a per-feature breakdown — toggle a type to show/hide it in the replay, expand to inspect raw payloads",help:(0,s.jsxs)(s.Fragment,{children:["Project-level metadata beyond the ",(0,s.jsx)("strong",{children:"Project ID"}),"isn't stored in the OSS collector (Phase 1) — everything here is derived from the session's own events. The"," ",(0,s.jsx)("strong",{children:"Device / graphics"})," and ",(0,s.jsx)("strong",{children:"Scene / connector"})," blocks come from the one-time ",(0,s.jsx)("code",{children:"session_start"})," event."]}),children:[(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,s.jsx)(tH,{title:"Identity",rows:z}),(0,s.jsx)(tH,{title:"Page context",rows:P}),(0,s.jsx)(tH,{title:"Device / graphics",rows:A}),(0,s.jsx)(tH,{title:"Scene / connector",rows:F})]}),(0,s.jsxs)("div",{className:"mt-4",children:[(0,s.jsxs)("div",{className:"mb-2 flex items-center justify-between",children:[(0,s.jsxs)("p",{className:"text-[10px] font-semibold uppercase tracking-wide text-fg-muted",children:["Captured features (",y.length," event types)"]}),(0,s.jsx)("button",{type:"button",onClick:()=>l(!L,y),className:"rounded-md border border-edge px-2 py-1 text-xs text-fg transition hover:border-amber hover:text-fg-hi",children:L?"Show all":"Hide all"})]}),(0,s.jsx)("div",{className:"grid grid-cols-1 gap-1.5 sm:grid-cols-2 lg:grid-cols-3",children:y.map(e=>{let t=!a.has(e),n=f.has(e),r=N.filter(t=>t.type===e).slice(0,3);return(0,s.jsxs)("div",{className:`self-start rounded-lg border border-edge bg-ink/40 ${n?"sm:col-span-2 lg:col-span-3":""}`,children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 px-2.5 py-1.5",children:[(0,s.jsxs)("label",{className:"flex min-w-0 flex-1 cursor-pointer items-center gap-2",children:[(0,s.jsx)("input",{type:"checkbox",checked:t,onChange:()=>i(e),className:"accent-amber"}),(0,s.jsx)("span",{className:"truncate font-mono text-xs text-fg",children:e})]}),(0,s.jsx)("span",{className:"tabular-nums text-xs text-fg-muted",children:j.get(e)}),(0,s.jsx)("button",{type:"button",onClick:()=>b(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s}),"aria-expanded":n?"true":"false",className:"rounded border border-edge px-1.5 py-0.5 text-[10px] text-fg-muted transition hover:border-amber hover:text-fg-hi",children:n?"Hide raw":"Raw"})]}),n?(0,s.jsxs)("pre",{className:"max-h-64 overflow-auto border-t border-edge bg-black/30 px-3 py-2 text-[10px] leading-relaxed text-fg",children:[r.map(e=>JSON.stringify(e,null,2)).join("\n\n"),(j.get(e)??0)>r.length?`
2
-
3
- … ${(j.get(e)??0)-r.length} more`:""]}):null]},e)})})]})]})}let tW=(0,n.default)(()=>e.A(15867).then(e=>e.SessionReplayView),{loadableGenerated:{modules:[94452]},ssr:!1}),tG=(0,n.default)(()=>e.A(15867).then(e=>e.WorldHeatmap3DView),{loadableGenerated:{modules:[94452]},ssr:!1}),tX=(0,n.default)(()=>e.A(15867).then(e=>e.ClickRays3DView),{loadableGenerated:{modules:[94452]},ssr:!1}),tJ={sessions:[],camera:[],perf:null,gaze:[],clickRays:[],hasFirstPerson:!1,proxyMeshes:[],timeseries:[],counts:[],diagnostics:[],renderingTech:[],coverage:[],distance:[],navigation:[],sources:[],floorPlan:[],performance:{distribution:null,histogram:[],frameTime:null,jank:null,byDevice:[],byScene:[],resources:null,stability:null},intervalMs:36e5};e.s(["default",0,function(){let[e,n]=(0,r.useState)(i),[d,m]=(0,r.useState)(l),[p,x]=(0,r.useState)([]),[b,j]=(0,r.useState)(""),[y,N]=(0,r.useState)(h),[w,S]=(0,r.useState)([]),[P,R]=(0,r.useState)(tJ),[T,$]=(0,r.useState)("idle"),[E,F]=(0,r.useState)(null),[O,U]=(0,r.useState)(null),[B,H]=(0,r.useState)("idle"),[V,K]=(0,r.useState)(new Set),[W,X]=(0,r.useState)([]),[q,Y]=(0,r.useState)(()=>Date.now()),[Z,Q]=(0,r.useState)(0),[ee,et]=(0,r.useState)(0),[es,en]=(0,r.useState)(void 0),er=(0,r.useRef)(void 0),ea=(0,r.useRef)(new Set),ei=(0,r.useRef)(y);ei.current=y;let el=(0,r.useRef)(h.window),eo=(0,r.useRef)(b);eo.current=b;let ec=(0,r.useRef)(O);ec.current=O;let ed=(0,r.useRef)(null),eu=(0,r.useRef)(null),em=(0,r.useRef)(!1),eh=(0,r.useCallback)((e,t)=>{let s=`/projects/${encodeURIComponent(e)}`;return t?`${s}/session/${encodeURIComponent(t)}`:s},[]),ep=(0,r.useCallback)(e=>{window.location.pathname!==e&&window.history.pushState({},"",e)},[]);(0,r.useEffect)(()=>{let e=window.location.pathname.match(/^\/projects\/([^/]+)(?:\/session\/([^/]+))?/);e?.[1]&&(ed.current=decodeURIComponent(e[1]),e[2]&&(eu.current=decodeURIComponent(e[2])))},[]),(0,r.useEffect)(()=>{a||n(window.location.origin)},[]),(0,r.useEffect)(()=>{let e=!1;return fetch("/api/projects").then(e=>e.ok?e.json():[]).then(t=>{if(e||!Array.isArray(t)||0===t.length)return;x(t);let[s]=t,n=ed.current,r=(n?t.find(e=>e.id===n):void 0)??t.find(e=>e.apiKey===l)??s;r&&(j(r.id),m(r.apiKey),(n&&r.id===n||1===t.length&&!r.scene)&&(em.current=!0))}).catch(()=>{}),()=>{e=!0}},[]);let ex=(0,r.useCallback)(async t=>{let s=t??d;if(!s){$("error"),F("An API key is required.");return}$("loading"),F(null),U(null),H("idle");let n=ei.current,r=f(n),a=g(n),i=new u(e,s);try{let e=await i.sessions({...r,source:void 0,limit:100}),t=a.until??Date.now(),s=a.since;if(null==s){let n=e.reduce((e,t)=>{let s=k(t.started_at);return Number.isFinite(s)?Math.min(e,s):e},Date.now());s=Number.isFinite(n)?n:t-864e5}let n=v(Math.max(6e4,t-s)),l=1e3*n,[o,c,d,u,m,h,p,x,g,f,b,j,y,N,w]=await Promise.all([i.cameraHeatmap({...r,source:void 0,bins:36}),i.perf({...r,source:void 0}),i.gazeHeatmap({...r,source:void 0,cellSize:.5}),i.clickRays({...r,cellSize:.5}),i.scenes({since:a.since,until:a.until,limit:200}),i.timeseries({since:a.since,until:a.until,scene:r.scene,interval:n}),i.eventCounts({since:a.since,until:a.until,scene:r.scene}),i.graphicsDiagnosticCounts({...r,source:void 0}),i.renderingTechnology({...r,source:void 0}),i.coverage({...r,source:void 0,cellSize:1}),i.cameraDistance({...r,source:void 0,bucketSize:1}),i.navigation({...r,source:void 0}),i.interactionsBySource(r),i.cameraPositionHeatmap({...r,source:void 0,cameraMode:"first-person",cellSize:1}),(async()=>{let[e,t,s,n,a,l,o,c]=await Promise.all([i.perfDistribution({...r,source:void 0}),i.fpsHistogram({...r,source:void 0}),i.frameTimePercentiles({...r,source:void 0}),i.jankRate({...r,source:void 0}),i.perfByDevice({...r,source:void 0}),i.perfByScene({...r,source:void 0,scene:void 0}),i.resourcePercentiles({...r,source:void 0}),i.stabilityCounts({...r,source:void 0})]);return{distribution:e,histogram:t,frameTime:s,jank:n,byDevice:a,byScene:l,resources:o,stability:c}})()]);S(m),R(t=>({sessions:e,camera:o,perf:c,gaze:d,clickRays:u,hasFirstPerson:N.length>0,proxyMeshes:t.proxyMeshes,timeseries:h,counts:p,diagnostics:x,renderingTech:g,coverage:f,distance:b,navigation:j,sources:y,floorPlan:N,performance:w,intervalMs:l})),$("ready")}catch(e){R(tJ),$("error"),F(e instanceof c?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[d,e]),eg=(0,r.useCallback)(e=>{j(e.id),m(e.apiKey),en(void 0),er.current=void 0,ep(eh(e.id)),ex(e.apiKey)},[ex,eh,ep]);(0,r.useEffect)(()=>{if("idle"===T)return;let e=setTimeout(()=>void ex(),300);return()=>clearTimeout(e)},[y]);let ef="idle"!==T&&!!d,eb=(0,r.useRef)(0),ev=(0,r.useRef)(!1);ev.current=null!=O;let ej=(0,r.useCallback)(e=>{X(t=>[e,...t].slice(0,30)),ea.current.forEach(t=>t(e)),!ev.current&&e.sceneId&&e.sceneId!==er.current&&(er.current=e.sceneId,en(e.sceneId),Q(e=>e+1));let t=Date.now();ev.current||t-eb.current<5e3||(eb.current=t,ex(),Q(e=>e+1))},[ex]),{snapshot:ey,status:eN}=function(e,t,s){let[n,a]=(0,r.useState)(null),[i,l]=(0,r.useState)("idle");return(0,r.useEffect)(()=>{if(!s||!t||!e){l("idle"),a(null);return}let n=new u(e,t);return A(n,e=>n.livePresenceUrl(e),e=>{e.addEventListener("presence",e=>{try{a(JSON.parse(e.data))}catch{}})},l)},[e,t,s]),{snapshot:n,status:i}}(e,d,ef);!function(e,t,s,n){let[a,i]=(0,r.useState)("idle"),l=(0,r.useRef)(n);l.current=n;(0,r.useEffect)(()=>{if(!s||!t||!e)return void i("idle");let n=new u(e,t),r=void 0;return A(n,e=>n.liveStreamUrl(e,r),e=>{e.addEventListener("event",e=>{try{l.current(JSON.parse(e.data))}catch{}})},i)},[e,t,s,""])}(e,d,ef,ej),(0,r.useEffect)(()=>{if(!ef)return;let e=setInterval(()=>Y(Date.now()),1e3);return()=>clearInterval(e)},[ef]),(0,r.useEffect)(()=>{if(!ef)return;let t=new u(e,d),s=!1,n=async()=>{let e=g(ei.current),n=await t.scenes({since:e.since,until:e.until,limit:200}).catch(()=>null);!s&&n&&S(n)},r=setInterval(()=>void n(),5e3);return()=>{s=!0,clearInterval(r)}},[ef,e,d]);let ew=y.scene&&y.scene.length>0?y.scene:void 0;(0,r.useEffect)(()=>{if("idle"===T)return;let t=!1;return(async()=>{let s=new u(e,d),n=ew?(await s.sceneRepresentation(ew).catch(()=>null))?.proxy?.meshes??[]:await (0,_.mergeSceneProxies)(s,f(ei.current));t||R(e=>({...e,proxyMeshes:n}))})(),()=>{t=!0}},[ew,e,d,T,Z]);let ek=(0,r.useCallback)(async t=>{let s=f(ei.current),n=new u(e,d),[r,a,i]=await Promise.all([n.cameraHeatmap({...s,source:void 0,bins:36,session:t}),n.perf({...s,source:void 0,session:t}),n.sessionMeta(t).catch(()=>null)]);return{id:t,meta:i,camera:r,perf:a}},[e,d]),eS=(0,r.useCallback)(async e=>{let t=eo.current;t&&ep(eh(t,e)),window.scrollTo({top:0,behavior:"smooth"}),U({id:e,meta:null,camera:[],perf:null}),H("loading"),K(new Set);try{U(await ek(e)),H("ready")}catch(e){H("error"),F(e instanceof c?`${e.status}: ${e.message}`:e instanceof Error?e.message:"Request failed.")}},[ek,eh,ep]),e_=(0,r.useCallback)(()=>{let e=eo.current;e&&ep(eh(e)),U(null),H("idle"),K(new Set)},[eh,ep]),eM=(0,r.useCallback)(e=>{let t=p.find(t=>t.id===e);j(e),t&&m(t.apiKey),R(tJ),S([]),$("idle"),F(null),U(null),H("idle"),K(new Set)},[p]),eC=(0,r.useCallback)(e=>{K(t=>{let s=new Set(t);return s.has(e)?s.delete(e):s.add(e),s})},[]),ez=(0,r.useCallback)((e,t)=>{K(e?new Set(t):new Set)},[]),eP=(0,r.useCallback)((e,t)=>{N(s=>("custom"!==s.window&&(el.current=s.window),{...s,window:"custom",since:e,until:t}))},[]),eR=(0,r.useCallback)(()=>{N(e=>({...e,window:el.current}))},[]);(0,r.useEffect)(()=>{em.current&&d&&(em.current=!1,ex())},[p,d,ex]),(0,r.useEffect)(()=>{if("ready"===T&&eu.current){let e=eu.current;eu.current=null,eS(e)}},[T,eS]),(0,r.useEffect)(()=>{let e=()=>{let e=window.location.pathname.match(/^\/projects\/[^/]+(?:\/session\/([^/]+))?/),t=e?.[1]?decodeURIComponent(e[1]):null;t?ec.current?.id!==t&&eS(t):ec.current&&e_()};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[eS,e_]);let eT="loading"===T,e$=(0,r.useMemo)(()=>new u(e,d),[e,d]),eE=(0,r.useMemo)(()=>f(y),[y,Z]),eI=(0,r.useCallback)(e=>{let t=ea.current;return t.add(e),()=>{t.delete(e)}},[]),eA=(0,r.useMemo)(()=>({selectSession:e=>void eS(e),setTimeRange:(e,t)=>eP(e,t),setFilters:e=>N(t=>({...t,...e}))}),[eS,eP]),eF={api:e$,baseUrl:e,apiKey:d,params:eE,filters:y,capabilities:{hasFirstPerson:P.hasFirstPerson},actions:eA,live:{presence:ey,enabled:ef,subscribe:eI,sceneId:ef?es:void 0,status:eN},settings:{}},eL={...eF,surface:"overview"},eD=O?{...eF,surface:"session",sessionId:O.id}:null,eO=function(){let[e,s]=(0,r.useState)(tc);return(0,r.useEffect)(()=>{let e,n,r=(e=to(t.default.env.NEXT_PUBLIC_PANELS_MANIFEST_URL),n=to(t.default.env.NEXT_PUBLIC_PANELS_ALLOWED_ORIGINS),{enabled:e.length>0,manifestUrls:e,allowOrigins:n});if(!r.enabled)return;let a=!1,i=new AbortController;return s({panels:[],errors:[],loading:!0}),(async()=>{let e=[],t=[],n=new Set;for(let s of r.manifestUrls){let a=await L(s,{signal:i.signal});if("code"in a){t.push(a);continue}let l=await D(a,{allowOrigins:r.allowOrigins.length>0?r.allowOrigins:void 0});for(let s of(t.push(...l.errors),l.panels)){if(n.has(s.id)){t.push({source:s.id,code:"invalid-panel",message:`Duplicate panel id "${s.id}" from another manifest — ignored`});continue}n.add(s.id),e.push(s)}}a||s({panels:e,errors:t,loading:!1})})(),()=>{a=!0,i.abort()}},[]),e}(),eU=(0,r.useMemo)(()=>(function(e,t){let s=new Map;for(let t of e)s.set(t.id,t);let n=[...e],r=[];for(let e of t){if(s.has(e.id)){r.push({source:e.id,code:"invalid-panel",message:`Duplicate panel id "${e.id}" — kept the existing panel`});continue}s.set(e.id,e),n.push(e)}return{panels:n,errors:r}})(tl,eO.panels),[eO.panels]),eB=eU.panels,eH=(0,r.useMemo)(()=>[...eO.errors,...eU.errors],[eO.errors,eU.errors]),eV=!!(O&&ey?.sessions.some(e=>e.sessionId===O.id)),eK=(0,r.useRef)(eV);return(0,r.useEffect)(()=>{let e=eK.current;if(eK.current=eV,!e||eV)return;let t=ec.current;if(!t||"ready"!==B)return;let s=t.id,n=!1;return(async()=>{try{let e=await ek(s);n||ec.current?.id!==s||U(e)}catch{}})(),()=>{n=!0}},[eV,B,ek]),(0,r.useEffect)(()=>{if(!eV||"ready"!==B)return;let e=ec.current?.id;if(!e)return;let t=!1,s=setInterval(()=>{(async()=>{try{let s=await ek(e);t||ec.current?.id!==e||U(s)}catch{}})(),t||et(e=>e+1)},1e3);return()=>{t=!0,clearInterval(s)}},[eV,B,ek]),(0,s.jsxs)("main",{className:"mx-auto max-w-6xl px-6 py-8",children:[(0,s.jsxs)("header",{className:"mb-6 flex items-center gap-3",children:[(0,s.jsx)("img",{src:"/logo.svg",alt:"Uptimizr",width:36,height:36,className:"h-9 w-9 shrink-0"}),(0,s.jsxs)("div",{children:[(0,s.jsx)("h1",{className:"font-display text-2xl font-bold text-fg-hi",children:"Uptimizr"}),(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Analytics for 3D scenes — open-source collector."})]})]}),(0,s.jsxs)("form",{className:"mb-6 flex flex-wrap items-end gap-3 rounded-xl border border-edge bg-panel p-4",onSubmit:e=>{e.preventDefault(),b&&ep(eh(b)),ex()},children:[p.length>0?(0,s.jsxs)("label",{className:"flex flex-col gap-1 text-xs text-fg-muted",children:["Project",(0,s.jsx)("select",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:b,onChange:e=>eM(e.target.value),children:p.map(e=>(0,s.jsx)("option",{value:e.id,children:e.name},e.id))})]}):null,(0,s.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Collector URL",(0,s.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:e,onChange:e=>n(e.target.value),placeholder:"http://localhost:4318"})]}),(0,s.jsxs)("label",{className:"flex flex-1 flex-col gap-1 text-xs text-fg-muted",children:["Project API key",(0,s.jsx)("input",{className:"min-w-56 rounded-md border border-edge bg-ink px-3 py-2 text-sm text-fg outline-none focus:border-saffron",value:d,onChange:e=>m(e.target.value),type:"password",placeholder:"utk_…"})]}),(0,s.jsx)("button",{type:"submit",disabled:"loading"===T,className:"rounded-md bg-amber px-4 py-2 text-sm font-medium text-ink transition hover:bg-ember disabled:opacity-50",children:"loading"===T?"Loading…":"Load"})]}),"idle"!==T?(0,s.jsx)(tp,{filters:y,scenes:w,onChange:N,busy:eT}):null,E?(0,s.jsx)("div",{className:"mb-6 rounded-lg border border-red-900/60 bg-red-950/40 px-4 py-3 text-sm text-red-300",children:E}):null,"idle"===T?p.length>0?(0,s.jsx)(tA,{projects:p,playgroundUrl:o,onView:eg}):(0,s.jsx)("p",{className:"text-sm text-fg-muted",children:"Enter your collector URL and a project API key, then load to view analytics."}):O?(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[eH.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(td,{errors:eH})}):null,(0,s.jsxs)("div",{className:"lg:col-span-2 flex flex-wrap items-center justify-between gap-3 rounded-xl border border-edge bg-panel p-4",children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("p",{className:"text-xs uppercase tracking-wide text-fg-muted",children:"Session"}),(0,s.jsx)("p",{className:"font-mono text-sm text-fg",children:O.id}),(0,s.jsx)("p",{className:"mt-1 text-xs text-fg-muted",children:"loading"===B?"Loading session…":[O.meta?.scene?.sceneId?`scene: ${O.meta.scene.sceneId}`:null,O.meta?.device?.gpu?`gpu: ${O.meta.device.gpu}`:null,O.meta?.startedAt?`started: ${O.meta.startedAt}`:null].filter(Boolean).join(" · ")||"No session metadata."})]}),(0,s.jsx)("button",{type:"button",onClick:e_,className:"rounded-md border border-edge px-3 py-2 text-sm text-fg transition hover:border-amber hover:text-fg-hi",children:"← All sessions"})]}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(G,{title:eV?"Session replay · live":"Session replay (birdview timeline)",subtitle:eV?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek).",children:(0,s.jsx)(tW,{api:e$,sessionId:O.id,hiddenTypes:V,isLive:eV})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tK,{baseUrl:e,apiKey:d,sessionId:O.id,hiddenTypes:V,onToggleType:eC,onSetAllHidden:ez})}),(0,s.jsx)(tg,{perf:O.perf}),eD?(0,s.jsx)(J,{panels:eB,ctx:eD,surface:"session",revision:Z+ee,exclude:["session-replay"]}):null,(0,s.jsx)(tu,{bins:O.camera,gridSize:36}),O.meta?.scene?.cameraType==="free"?(0,s.jsx)(tL,{baseUrl:e,apiKey:d,sessionId:O.id,scene:O.meta?.scene?.sceneId??y.scene}):null,(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tF,{sessions:P.sessions,selectedId:O.id,onSelect:eS})})]}):(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-5 lg:grid-cols-2",children:[eH.length>0?(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(td,{errors:eH})}):null,(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(G,{title:M,subtitle:C,help:z,children:(0,s.jsx)(I,{snapshot:ey,status:eN,feed:W,now:q,onSelectSession:eS})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tO,{buckets:P.timeseries,intervalMs:P.intervalMs,onBrush:eP,brushed:"custom"===y.window,onClear:eR})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tN,{counts:P.counts,perf:P.perf})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tM,{rows:P.diagnostics})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tP,{rows:P.renderingTech})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(t$,{coverage:P.coverage,cellSize:1,distance:P.distance,bucketSize:1,navigation:P.navigation})}),(0,s.jsx)(tg,{perf:P.perf}),(0,s.jsx)(J,{panels:eB,ctx:eL,surface:"overview",revision:Z,exclude:["live-presence"]}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tj,{data:P.performance})}),(0,s.jsx)(tx,{rows:P.sources}),(0,s.jsx)(tu,{bins:P.camera,gridSize:36}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(G,{title:"Gaze heatmap (3D)",subtitle:"Camera-pose gaze hit-points voxel-binned in world space — what viewers actually look at",children:(0,s.jsx)(tG,{voxels:P.gaze,cellSize:.5,proxyMeshes:P.proxyMeshes,legendTitle:"Gaze density",legendLow:"few looks",legendHigh:"most looks",legendNote:"Each marker is a voxel where the camera-forward (gaze) ray hit your scene. Enable gaze capture in the SDK to populate this.",emptyLabel:"No gaze hit-points in range. Enable gaze capture in the SDK."})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(G,{title:"Click rays (3D)",subtitle:"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter",children:(0,s.jsx)(tX,{rays:P.clickRays,cellSize:.5,proxyMeshes:P.proxyMeshes})})}),(0,s.jsx)("div",{className:"lg:col-span-2",children:(0,s.jsx)(tF,{sessions:P.sessions,onSelect:eS})})]})]})}],14936)}]);
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,56054,e=>{"use strict";e.s(["HEAT_GRADIENT",0,"linear-gradient(to right, rgb(178,47,38), rgb(224,123,57), rgb(244,200,75))","heatRgb",0,function(e){let t=Math.max(0,Math.min(1,e)),s=[.878,.482,.224],i=(e,t,s)=>[e[0]+(t[0]-e[0])*s,e[1]+(t[1]-e[1])*s,e[2]+(t[2]-e[2])*s];return t<.5?i([.698,.184,.149],s,t/.5):i(s,[.957,.784,.294],(t-.5)/.5)},"percentileMax",0,function(e,t=.95){if(0===e.length)return 1;let s=[...e].sort((e,t)=>e-t),i=Math.max(0,Math.min(1,t))*(s.length-1),n=Math.floor(i),o=Math.ceil(i);return Math.max(1,n===o?s[n]:s[n]+(s[o]-s[n])*(i-n))}])},18637,e=>{"use strict";var t=e.i(46369),s=e.i(56054);e.s(["HeatLegend",0,function({title:e,lowLabel:i="low",highLabel:n="high",note:o}){return(0,t.jsxs)("div",{className:"pointer-events-none absolute bottom-3 left-3 rounded-md border border-edge bg-ink/80 px-3 py-2 text-fg backdrop-blur-sm",children:[(0,t.jsx)("div",{className:"mb-1 text-xs font-medium text-fg",children:e}),(0,t.jsx)("div",{className:"h-2 w-36 rounded-sm",style:{background:s.HEAT_GRADIENT}}),(0,t.jsxs)("div",{className:"mt-1 flex w-36 justify-between text-[10px] text-fg-muted",children:[(0,t.jsx)("span",{children:i}),(0,t.jsx)("span",{children:n})]}),o?(0,t.jsx)("div",{className:"mt-1 max-w-44 text-[10px] leading-tight text-fg-muted",children:o}):null]})}])},60614,e=>{"use strict";async function t(e,t){let s=await e.scenes(t).catch(()=>[]);if(0===s.length)return[];let i=await Promise.all(s.map(t=>e.sceneRepresentation(t.scene_id).catch(()=>null))),n=new Set,o=[];for(let e of i)for(let t of e?.proxy?.meshes??[])n.has(t.name)||(n.add(t.name),o.push(t));return o}e.s(["mergeSceneProxies",0,t])},37215,e=>{"use strict";var t=e.i(46369);let s=(0,t.jsxs)(t.Fragment,{children:["Each ",(0,t.jsx)("strong",{children:"source"})," is a camera ",(0,t.jsx)("em",{children:"gaze-direction bin"})," — a cell on the sphere of where viewers were looking (grouped by azimuth/elevation). Each ",(0,t.jsx)("strong",{children:"target"})," is a"," ",(0,t.jsx)("em",{children:"mesh that was clicked"}),". A ribbon's thickness is how many clicks on that mesh happened while viewers looked from that direction, so you can see which viewpoints drive interaction with which objects. When the scene reports ",(0,t.jsx)("em",{children:"standpoints"}),' (where the viewer stood, §7.8), pick one to gate the flow to clicks made from that vantage — a pin marks it in the scene. "All standpoints" is the aggregate view. Switch to ',(0,t.jsx)("strong",{children:"Two-stage"})," ","for a three-column ",(0,t.jsx)("em",{children:"standpoint → gaze sector → mesh"}),' flow with a birdview minimap; the busiest standpoints/meshes are kept and the tail folds into an "Other" node.']});e.s(["CAMERA_DOME_SUBTITLE",0,"Where the audience looked, mapped onto a sphere — drag to orbit, +/- to zoom, double-click to focus","CAMERA_DOME_TITLE",0,"View-direction dome (3D)","CLICK_RAYS_SUBTITLE",0,"Each click joined to the view it was made from — gate by viewpoint or focus a mesh; double-click to recenter","CLICK_RAYS_TITLE",0,"Click rays (3D)","ERROR_HEATMAP_SUBTITLE",0,"Where errors & engine diagnostics fired, voxel-binned by the camera position at the moment they hit — drag to orbit, double-click to focus","ERROR_HEATMAP_TITLE",0,"Error heatmap (3D)","FLOW_SANKEY_HELP",0,s,"FLOW_SANKEY_SUBTITLE",0,"Direction-bin → mesh links (aggregate), or standpoint → gaze → mesh (two-stage) — double-click to focus","FLOW_SANKEY_TITLE",0,"Flow Sankey (3D)","GAZE_CLICK_SUBTITLE",0,"Where viewers look (gaze) vs. where they act (clicks), voxel-binned in world space — double-click to focus","GAZE_CLICK_TITLE",0,"Gaze vs. click divergence","PERF_HEATMAP_SUBTITLE",0,"Where FPS is bad in your scene — frame_perf samples voxel-binned by camera position; hot = slow. Drag to orbit, +/- to zoom, double-click to focus","PERF_HEATMAP_TITLE",0,"Performance heatmap (3D)","SESSION_REPLAY_TITLE",0,"Session replay","WORLD_HEATMAP_SUBTITLE",0,"Pointer hit-points voxel-binned in world space — drag to orbit, +/- to zoom, double-click to focus","WORLD_HEATMAP_TITLE",0,"World heatmap (3D)","sessionReplaySubtitle",0,function(e){return e?"Following this session live — new camera moves and interactions stream in and the timeline grows. Scrub back to review, then press ● LIVE to return to the edge.":"Scrub the camera path and interaction rays; every click stays marked and glows as the playhead passes it. The color-coded strip marks when each event fired (click to seek)."},"sessionReplayTitle",0,function(e){return e?"Session replay · live":"Session replay (birdview timeline)"}])},85461,e=>{e.v(t=>Promise.all(["static/chunks/0n8n481szj90g.js"].map(t=>e.l(t))).then(()=>t(57092)))},78573,e=>{e.v(t=>Promise.all(["static/chunks/23d-hvrwpixpm.js"].map(t=>e.l(t))).then(()=>t(48939)))},47410,e=>{e.v(t=>Promise.all(["static/chunks/1gaexq_suxai0.js"].map(t=>e.l(t))).then(()=>t(53993)))},70162,e=>{e.v(t=>Promise.all(["static/chunks/0kzw45f61wm3j.js"].map(t=>e.l(t))).then(()=>t(19399)))},21269,e=>{e.v(t=>Promise.all(["static/chunks/1fwsjnd1y-lx_.js"].map(t=>e.l(t))).then(()=>t(39592)))},44113,e=>{e.v(t=>Promise.all(["static/chunks/01fh3_bncbe5u.js"].map(t=>e.l(t))).then(()=>t(76421)))},15867,e=>{e.v(t=>Promise.all(["static/chunks/0l8bfa2xewq69.js"].map(t=>e.l(t))).then(()=>t(94452)))}]);
@@ -1,3 +0,0 @@
1
- @font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/32687112bd2dd8db-s.1gepa_7fcx9fm.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/28868e710e86be81-s.2eksvhm1z0jwa.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Space Grotesk;font-style:normal;font-weight:300 700;font-display:swap;src:url(../media/0c89a48fa5027cee-s.p.2cyn07wtgehh0.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Space Grotesk Fallback;src:local(Arial);ascent-override:89.71%;descent-override:26.62%;line-gap-override:0.0%;size-adjust:109.69%}.space_grotesk_59d6dcf5-module__z_Ctiq__className{font-family:Space Grotesk,Space Grotesk Fallback;font-style:normal}.space_grotesk_59d6dcf5-module__z_Ctiq__variable{--font-space-grotesk:"Space Grotesk", "Space Grotesk Fallback"}
2
- @font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/13bf9871fe164e7f-s.2f7nqdagzwx2-.woff2)format("woff2");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/cc545e633e20c56d-s.176arc174-8zp.woff2)format("woff2");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/71b036adf157cdcf-s.0bp8oijd_gu96.woff2)format("woff2");unicode-range:U+370-377,U+37A-37F,U+384-38A,U+38C,U+38E-3A1,U+3A3-3FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/89b21bb081cb7469-s.1fby2rem9ngyr.woff2)format("woff2");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/3fe682a82f50d426-s.0vfdmo25voy_0.woff2)format("woff2");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:JetBrains Mono;font-style:normal;font-weight:100 800;font-display:swap;src:url(../media/70bc3e132a0a741e-s.p.3t6q91iet4nsy.woff2)format("woff2");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:JetBrains Mono Fallback;src:local(Arial);ascent-override:75.79%;descent-override:22.29%;line-gap-override:0.0%;size-adjust:134.59%}.jetbrains_mono_38c99671-module__5Dhsuq__className{font-family:JetBrains Mono,JetBrains Mono Fallback;font-style:normal}.jetbrains_mono_38c99671-module__5Dhsuq__variable{--font-jetbrains-mono:"JetBrains Mono", "JetBrains Mono Fallback"}
3
- @layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:var(--font-jetbrains-mono), ui-monospace, SFMono-Regular, monospace;--color-red-300:#ffa3a3;--color-red-400:#ff6568;--color-red-900:#82181a;--color-red-950:#460809;--color-amber-300:#ffd236;--color-amber-400:#fcbb00;--color-amber-500:#f99c00;--color-emerald-300:#5ee9b5;--color-emerald-400:#00d294;--color-emerald-500:#00bb7f;--color-sky-400:#00bcfe;--color-sky-500:#00a5ef;--color-fuchsia-300:#f2a9ff;--color-fuchsia-400:#ec6cff;--color-fuchsia-500:#e12afb;--color-rose-300:#ffa2ae;--color-rose-400:#ff667f;--color-rose-500:#ff2357;--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-6xl:72rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-normal:0em;--tracking-wide:.025em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-sm:.25rem;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-ping:ping 1s cubic-bezier(0, 0, .2, 1) infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-sm:8px;--aspect-video:16 / 9;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-ink:#161210;--color-panel:#201913;--color-edge:#34291f;--color-fg-hi:#f4eadf;--color-fg:#d8c8b8;--color-fg-muted:#a8917c;--color-saffron:#f4c84b;--color-amber:#eda63e;--color-ember:#e07b39;--font-display:var(--font-space-grotesk), system-ui, sans-serif;--font-body:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif}@supports (color:lab(0% 0 0)){:root,:host{--color-red-300:lab(76.5514% 36.422 15.5335);--color-red-400:lab(63.7053% 60.745 31.3109);--color-red-900:lab(28.5139% 44.5539 29.0463);--color-red-950:lab(13.003% 29.04 16.7519);--color-amber-300:lab(86.4156% 6.13147 78.3961);--color-amber-400:lab(80.1641% 16.6016 99.2089);--color-amber-500:lab(72.7183% 31.8672 97.9407);--color-emerald-300:lab(83.9203% -48.7124 13.8849);--color-emerald-400:lab(75.0771% -60.7313 19.4147);--color-emerald-500:lab(66.9756% -58.27 19.5419);--color-sky-400:lab(70.687% -23.6078 -45.9483);--color-sky-500:lab(63.3038% -18.433 -51.0407);--color-fuchsia-300:lab(78.5378% 39.3533 -32.9615);--color-fuchsia-400:lab(66.1178% 66.0652 -52.4733);--color-fuchsia-500:lab(56.4256% 83.132 -64.639);--color-rose-300:lab(76.6339% 38.3549 9.68835);--color-rose-400:lab(64.4125% 63.0291 19.2068);--color-rose-500:lab(56.101% 79.4328 31.4532)}}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:0}.inset-y-1{inset-block:var(--spacing)}.top-0{top:0}.top-2{top:calc(var(--spacing) * 2)}.top-3{top:calc(var(--spacing) * 3)}.top-6{top:calc(var(--spacing) * 6)}.right-2{right:calc(var(--spacing) * 2)}.right-3{right:calc(var(--spacing) * 3)}.bottom-3{bottom:calc(var(--spacing) * 3)}.left-0{left:0}.left-1\/2{left:50%}.left-3{left:calc(var(--spacing) * 3)}.isolate{isolation:isolate}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.mx-auto{margin-inline:auto}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-auto{margin-top:auto}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.ml-1{margin-left:var(--spacing)}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-8{margin-left:calc(var(--spacing) * 8)}.ml-auto{margin-left:auto}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.table{display:table}.aspect-video{aspect-ratio:var(--aspect-video)}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-27\.5{height:calc(var(--spacing) * 27.5)}.h-full{height:100%}.max-h-64{max-height:calc(var(--spacing) * 64)}.min-h-\[8rem\]{min-height:8rem}.min-h-\[12rem\]{min-height:12rem}.w-1{width:var(--spacing)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-10{width:calc(var(--spacing) * 10)}.w-12{width:calc(var(--spacing) * 12)}.w-16{width:calc(var(--spacing) * 16)}.w-24{width:calc(var(--spacing) * 24)}.w-28{width:calc(var(--spacing) * 28)}.w-36{width:calc(var(--spacing) * 36)}.w-37\.5{width:calc(var(--spacing) * 37.5)}.w-64{width:calc(var(--spacing) * 64)}.w-full{width:100%}.w-px{width:1px}.max-w-6xl{max-width:var(--container-6xl)}.max-w-44{max-width:calc(var(--spacing) * 44)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-\[12rem\]{max-width:12rem}.max-w-\[16rem\]{max-width:16rem}.max-w-\[20rem\]{max-width:20rem}.min-w-0{min-width:0}.min-w-36{min-width:calc(var(--spacing) * 36)}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-56{min-width:calc(var(--spacing) * 56)}.flex-1{flex:1}.flex-none{flex:none}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1);translate:var(--tw-translate-x) var(--tw-translate-y)}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-crosshair{cursor:crosshair}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-3{column-gap:calc(var(--spacing) * 3)}.gap-x-4{column-gap:calc(var(--spacing) * 4)}.gap-y-1{row-gap:var(--spacing)}.gap-y-3{row-gap:calc(var(--spacing) * 3)}.self-start{align-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-sm{border-radius:var(--radius-sm)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-amber{border-color:var(--color-amber)}.border-amber\/40{border-color:#eda63e66}@supports (color:color-mix(in lab, red, red)){.border-amber\/40{border-color:color-mix(in oklab, var(--color-amber) 40%, transparent)}}.border-amber\/60{border-color:#eda63e99}@supports (color:color-mix(in lab, red, red)){.border-amber\/60{border-color:color-mix(in oklab, var(--color-amber) 60%, transparent)}}.border-edge{border-color:var(--color-edge)}.border-ink\/40{border-color:#16121066}@supports (color:color-mix(in lab, red, red)){.border-ink\/40{border-color:color-mix(in oklab, var(--color-ink) 40%, transparent)}}.border-ink\/60{border-color:#16121099}@supports (color:color-mix(in lab, red, red)){.border-ink\/60{border-color:color-mix(in oklab, var(--color-ink) 60%, transparent)}}.border-red-900\/60{border-color:#82181a99}@supports (color:color-mix(in lab, red, red)){.border-red-900\/60{border-color:color-mix(in oklab, var(--color-red-900) 60%, transparent)}}.border-transparent{border-color:#0000}.bg-\[\#38bdf8\]{background-color:#38bdf8}.bg-\[\#f4c84b\]{background-color:#f4c84b}.bg-amber{background-color:var(--color-amber)}.bg-amber-400{background-color:var(--color-amber-400)}.bg-amber-500\/70{background-color:#f99c00b3}@supports (color:color-mix(in lab, red, red)){.bg-amber-500\/70{background-color:color-mix(in oklab, var(--color-amber-500) 70%, transparent)}}.bg-amber\/10{background-color:#eda63e1a}@supports (color:color-mix(in lab, red, red)){.bg-amber\/10{background-color:color-mix(in oklab, var(--color-amber) 10%, transparent)}}.bg-amber\/15{background-color:#eda63e26}@supports (color:color-mix(in lab, red, red)){.bg-amber\/15{background-color:color-mix(in oklab, var(--color-amber) 15%, transparent)}}.bg-amber\/30{background-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.bg-amber\/30{background-color:color-mix(in oklab, var(--color-amber) 30%, transparent)}}.bg-black\/30{background-color:#0000004d}@supports (color:color-mix(in lab, red, red)){.bg-black\/30{background-color:color-mix(in oklab, var(--color-black) 30%, transparent)}}.bg-black\/70{background-color:#000000b3}@supports (color:color-mix(in lab, red, red)){.bg-black\/70{background-color:color-mix(in oklab, var(--color-black) 70%, transparent)}}.bg-emerald-400{background-color:var(--color-emerald-400)}.bg-emerald-500\/70{background-color:#00bb7fb3}@supports (color:color-mix(in lab, red, red)){.bg-emerald-500\/70{background-color:color-mix(in oklab, var(--color-emerald-500) 70%, transparent)}}.bg-fg-muted{background-color:var(--color-fg-muted)}.bg-fg\/15{background-color:#d8c8b826}@supports (color:color-mix(in lab, red, red)){.bg-fg\/15{background-color:color-mix(in oklab, var(--color-fg) 15%, transparent)}}.bg-fg\/50{background-color:#d8c8b880}@supports (color:color-mix(in lab, red, red)){.bg-fg\/50{background-color:color-mix(in oklab, var(--color-fg) 50%, transparent)}}.bg-fuchsia-400\/30{background-color:#ec6cff4d}@supports (color:color-mix(in lab, red, red)){.bg-fuchsia-400\/30{background-color:color-mix(in oklab, var(--color-fuchsia-400) 30%, transparent)}}.bg-ink{background-color:var(--color-ink)}.bg-ink\/40{background-color:#16121066}@supports (color:color-mix(in lab, red, red)){.bg-ink\/40{background-color:color-mix(in oklab, var(--color-ink) 40%, transparent)}}.bg-ink\/50{background-color:#16121080}@supports (color:color-mix(in lab, red, red)){.bg-ink\/50{background-color:color-mix(in oklab, var(--color-ink) 50%, transparent)}}.bg-ink\/60{background-color:#16121099}@supports (color:color-mix(in lab, red, red)){.bg-ink\/60{background-color:color-mix(in oklab, var(--color-ink) 60%, transparent)}}.bg-ink\/80{background-color:#161210cc}@supports (color:color-mix(in lab, red, red)){.bg-ink\/80{background-color:color-mix(in oklab, var(--color-ink) 80%, transparent)}}.bg-ink\/90{background-color:#161210e6}@supports (color:color-mix(in lab, red, red)){.bg-ink\/90{background-color:color-mix(in oklab, var(--color-ink) 90%, transparent)}}.bg-ink\/95{background-color:#161210f2}@supports (color:color-mix(in lab, red, red)){.bg-ink\/95{background-color:color-mix(in oklab, var(--color-ink) 95%, transparent)}}.bg-panel{background-color:var(--color-panel)}.bg-panel\/60{background-color:#20191399}@supports (color:color-mix(in lab, red, red)){.bg-panel\/60{background-color:color-mix(in oklab, var(--color-panel) 60%, transparent)}}.bg-red-950\/40{background-color:#46080966}@supports (color:color-mix(in lab, red, red)){.bg-red-950\/40{background-color:color-mix(in oklab, var(--color-red-950) 40%, transparent)}}.bg-rose-400{background-color:var(--color-rose-400)}.bg-rose-500\/20{background-color:#ff235733}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/20{background-color:color-mix(in oklab, var(--color-rose-500) 20%, transparent)}}.bg-rose-500\/70{background-color:#ff2357b3}@supports (color:color-mix(in lab, red, red)){.bg-rose-500\/70{background-color:color-mix(in oklab, var(--color-rose-500) 70%, transparent)}}.bg-saffron{background-color:var(--color-saffron)}.bg-sky-400\/70{background-color:#00bcfeb3}@supports (color:color-mix(in lab, red, red)){.bg-sky-400\/70{background-color:color-mix(in oklab, var(--color-sky-400) 70%, transparent)}}.bg-sky-500\/70{background-color:#00a5efb3}@supports (color:color-mix(in lab, red, red)){.bg-sky-500\/70{background-color:color-mix(in oklab, var(--color-sky-500) 70%, transparent)}}.bg-transparent{background-color:#0000}.bg-white\/5{background-color:#ffffff0d}@supports (color:color-mix(in lab, red, red)){.bg-white\/5{background-color:color-mix(in oklab, var(--color-white) 5%, transparent)}}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2\.5{padding:calc(var(--spacing) * 2.5)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-6{padding-block:calc(var(--spacing) * 6)}.py-8{padding-block:calc(var(--spacing) * 8)}.pt-1{padding-top:var(--spacing)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pr-1{padding-right:var(--spacing)}.pr-4{padding-right:calc(var(--spacing) * 4)}.pb-0\.5{padding-bottom:calc(var(--spacing) * .5)}.pl-8{padding-left:calc(var(--spacing) * 8)}.text-center{text-align:center}.text-left{text-align:left}.text-right{text-align:right}.font-display{font-family:var(--font-display)}.font-mono{font-family:var(--font-mono)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.leading-none{--tw-leading:1;line-height:1}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-normal{--tw-tracking:var(--tracking-normal);letter-spacing:var(--tracking-normal)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.whitespace-nowrap{white-space:nowrap}.text-amber{color:var(--color-amber)}.text-amber-300{color:var(--color-amber-300)}.text-emerald-300{color:var(--color-emerald-300)}.text-emerald-400{color:var(--color-emerald-400)}.text-fg{color:var(--color-fg)}.text-fg-hi{color:var(--color-fg-hi)}.text-fg-muted{color:var(--color-fg-muted)}.text-fg-muted\/40{color:#a8917c66}@supports (color:color-mix(in lab, red, red)){.text-fg-muted\/40{color:color-mix(in oklab, var(--color-fg-muted) 40%, transparent)}}.text-fuchsia-300{color:var(--color-fuchsia-300)}.text-ink{color:var(--color-ink)}.text-red-300{color:var(--color-red-300)}.text-red-400{color:var(--color-red-400)}.text-rose-300{color:var(--color-rose-300)}.text-rose-400{color:var(--color-rose-400)}.text-saffron{color:var(--color-saffron)}.text-white{color:var(--color-white)}.normal-case{text-transform:none}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.underline-offset-2{text-underline-offset:2px}.accent-amber{accent-color:var(--color-amber)}.opacity-0{opacity:0}.opacity-75{opacity:.75}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring,.ring-1{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-amber\/30{--tw-shadow-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.shadow-amber\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-amber) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/20{--tw-shadow-color:#0003}@supports (color:color-mix(in lab, red, red)){.shadow-black\/20{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 20%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-black\/40{--tw-shadow-color:#0006}@supports (color:color-mix(in lab, red, red)){.shadow-black\/40{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-black) 40%, transparent) var(--tw-shadow-alpha), transparent)}}.shadow-fuchsia-500\/30{--tw-shadow-color:#e12afb4d}@supports (color:color-mix(in lab, red, red)){.shadow-fuchsia-500\/30{--tw-shadow-color:color-mix(in oklab, color-mix(in oklab, var(--color-fuchsia-500) 30%, transparent) var(--tw-shadow-alpha), transparent)}}.ring-amber{--tw-ring-color:var(--color-amber)}.ring-amber\/30{--tw-ring-color:#eda63e4d}@supports (color:color-mix(in lab, red, red)){.ring-amber\/30{--tw-ring-color:color-mix(in oklab, var(--color-amber) 30%, transparent)}}.ring-fuchsia-300{--tw-ring-color:var(--color-fuchsia-300)}.ring-fuchsia-400\/30{--tw-ring-color:#ec6cff4d}@supports (color:color-mix(in lab, red, red)){.ring-fuchsia-400\/30{--tw-ring-color:color-mix(in oklab, var(--color-fuchsia-400) 30%, transparent)}}.ring-rose-400\/40{--tw-ring-color:#ff667f66}@supports (color:color-mix(in lab, red, red)){.ring-rose-400\/40{--tw-ring-color:color-mix(in oklab, var(--color-rose-400) 40%, transparent)}}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-blur{--tw-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.backdrop-blur-sm{--tw-backdrop-blur:blur(var(--blur-sm));-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.group-focus-within\:opacity-100:is(:where(.group):focus-within *){opacity:1}@media (hover:hover){.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.first\:rounded-l-md:first-child{border-top-left-radius:var(--radius-md);border-bottom-left-radius:var(--radius-md)}.last\:rounded-r-md:last-child{border-top-right-radius:var(--radius-md);border-bottom-right-radius:var(--radius-md)}@media (hover:hover){.hover\:border-amber:hover{border-color:var(--color-amber)}.hover\:border-amber\/60:hover{border-color:#eda63e99}@supports (color:color-mix(in lab, red, red)){.hover\:border-amber\/60:hover{border-color:color-mix(in oklab, var(--color-amber) 60%, transparent)}}.hover\:border-edge:hover{border-color:var(--color-edge)}.hover\:bg-ember:hover{background-color:var(--color-ember)}.hover\:bg-ink:hover{background-color:var(--color-ink)}.hover\:text-amber:hover{color:var(--color-amber)}.hover\:text-fg:hover{color:var(--color-fg)}.hover\:text-fg-hi:hover{color:var(--color-fg-hi)}.hover\:text-white:hover{color:var(--color-white)}.hover\:underline:hover{text-decoration-line:underline}}.focus\:border-saffron:focus{border-color:var(--color-saffron)}.focus\:ring-1:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus\:ring-amber:focus{--tw-ring-color:var(--color-amber)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:40rem){.sm\:col-span-2{grid-column:span 2/span 2}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.sm\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.sm\:p-8{padding:calc(var(--spacing) * 8)}}@media (min-width:64rem){.lg\:col-span-2{grid-column:span 2/span 2}.lg\:col-span-3{grid-column:span 3/span 3}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}}:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}body{background-color:var(--color-ink);color:var(--color-fg);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-family:var(--font-body)}h1,h2,h3,h4{font-family:var(--font-display)}code,kbd,samp,pre{font-family:var(--font-mono)}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}