1import{f as N,j as e,k as Ue,n as qe,aJ as Qe,r as d,aR as Ce,bd as ze,be as ve,aD as we,bf as _,aG as W,bg as ee,aH as Xe,b3 as Ie,A as Ye,aL as Ze,B as o,al as es,T as r,bh as ss,x as w,bi as ts,as as os,K as ce,bj as ns,bk as as,Q as ls}from"./index-DHSVqSeO.js";import{C as rs}from"./CheckCircleOutlineRounded-C01Cu4yT.js";import{C as Be}from"./CodeRounded-B09Gp7KF.js";import{l as is,T as cs,A as Fe}from"./analyst-6TyxYPem.js";import{H as xs}from"./HistoryRounded-D0h6Z3pX.js";import{l as ds}from"./gyani-Br1X_awA.js";import{a as ps}from"./query-Bke_BWjU.js";import{l as hs}from"./connections-BeudCMMg.js";import{c as fs}from"./agents-BBHMl14F.js";import{l as us}from"./storybooks-CdYUhxa9.js";import{l as ms}from"./datasets-GrLSoaaP.js";import{l as ys}from"./analystSkills-P-j2oWHm.js";import{i as gs}from"./mcp-BCtis7zN.js";import{S as js}from"./SyncRounded-C9pKBkB7.js";import{W as Ss}from"./WarningAmberRounded-BVdF-0h4.js";import{R as T,A as ks,C as P,X as H,Y as K,T as A,d as se,P as Te,e as Ae,f as M,c as h,B as te,b as oe}from"./chartHelpers-D10mXxhR.js";import"./with-selector-DR4riBYb.js";const ne=N(e.jsx("path",{d:"M10.67 21c-.35 0-.62-.31-.57-.66L11 14H7.5c-.88 0-.33-.75-.31-.78 1.26-2.23 3.15-5.53 5.65-9.93.1-.18.3-.29.5-.29.35 0 .62.31.57.66l-.9 6.34h3.51c.4 0 .62.19.4.66-3.29 5.74-5.2 9.09-5.75 10.05-.1.18-.29.29-.5.29"}),"BoltRounded"),Ee=N(e.jsx("path",{d:"M14.07 5.32C16.26 6 18 7.74 18.68 9.93c.19.63.76 1.07 1.41 1.07h.04c1 0 1.72-.96 1.43-1.91-.97-3.18-3.48-5.69-6.66-6.66-.94-.29-1.9.43-1.9 1.43v.04c0 .66.44 1.23 1.07 1.42m4.61 8.75c-.68 2.2-2.42 3.93-4.61 4.61-.63.19-1.07.76-1.07 1.41v.04c0 1 .96 1.72 1.91 1.43 3.18-.97 5.69-3.48 6.66-6.66.29-.95-.43-1.91-1.42-1.91h-.05c-.66.01-1.23.45-1.42 1.08M11 20.11c0-.67-.45-1.24-1.09-1.44C7.07 17.78 5 15.13 5 12s2.07-5.78 4.91-6.67c.64-.2 1.09-.77 1.09-1.44v-.01c0-1-.97-1.74-1.93-1.44C4.98 3.69 2 7.5 2 12s2.98 8.31 7.07 9.56c.96.3 1.93-.44 1.93-1.45"}),"DonutLargeRounded"),Re=N([e.jsx("path",{d:"M17.5 4.5c-1.95 0-4.05.4-5.5 1.5-1.45-1.1-3.55-1.5-5.5-1.5-1.45 0-2.99.22-4.28.79C1.49 5.62 1 6.33 1 7.14v11.28c0 1.3 1.22 2.26 2.48 1.94.98-.25 2.02-.36 3.02-.36 1.56 0 3.22.26 4.56.92.6.3 1.28.3 1.87 0 1.34-.67 3-.92 4.56-.92 1 0 2.04.11 3.02.36 1.26.33 2.48-.63 2.48-1.94V7.14c0-.81-.49-1.52-1.22-1.85-1.28-.57-2.82-.79-4.27-.79M21 17.23c0 .63-.58 1.09-1.2.98-.75-.14-1.53-.2-2.3-.2-1.7 0-4.15.65-5.5 1.5V8c1.35-.85 3.8-1.5 5.5-1.5.92 0 1.83.09 2.7.28.46.1.8.51.8.98z"},"0"),e.jsx("path",{d:"M13.98 11.01c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.54-.5 3.53-.66 5.36-.45.41.05.71.42.66.83s-.42.71-.83.66c-1.62-.19-3.39-.04-4.73.39-.08.01-.16.03-.23.03m0 2.66c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.53-.5 3.53-.66 5.36-.45.41.05.71.42.66.83s-.42.71-.83.66c-1.62-.19-3.39-.04-4.73.39-.08.02-.16.03-.23.03m0 2.66c-.32 0-.61-.2-.71-.52-.13-.39.09-.82.48-.94 1.53-.5 3.53-.66 5.36-.45.41.05.71.42.66.83s-.42.7-.83.66c-1.62-.19-3.39-.04-4.73.39-.08.02-.16.03-.23.03"},"1")],"MenuBookRounded"),ae=N([e.jsx("path",{d:"M18 11c1.49 0 2.87.47 4 1.26V8c0-1.11-.89-2-2-2h-4V4c0-1.11-.89-2-2-2h-4c-1.11 0-2 .89-2 2v2H4c-1.11 0-1.99.89-1.99 2L2 19c0 1.11.89 2 2 2h7.68c-.43-.91-.68-1.92-.68-3 0-3.87 3.13-7 7-7m-8-7h4v2h-4z"},"0"),e.jsx("path",{d:"M18 13c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5m1.65 7.35L17.5 18.2V15h1v2.79l1.85 1.85z"},"1")],"WorkHistoryRounded"),f={border:1,borderColor:"divider",borderRadius:0,bgcolor:"background.paper"},u={fontSize:"0.62rem",fontWeight:700,textTransform:"uppercase",letterSpacing:.55,color:"text.secondary"},g={px:1.2,py:.75,display:"flex",alignItems:"center",gap:.7,borderBottom:1,borderColor:"divider"},E={completed:"#52BE80",succeeded:"#52BE80",success:"#52BE80",running:"#5B8DEF",in_progress:"#5B8DEF",pending:"#F8B739",queued:"#F8B739",awaiting_approval:"#F8B739",submitted:"#F8B739",approved:"#52BE80",rejected:"#E74C3C",archived:"#85929E",draft:"#85929E",failed:"#E74C3C",error:"#E74C3C",cancelled:"#9013FE",active:"#52BE80"},De=n=>E[(n||"").toLowerCase()]||"#7F8C8D",le=n=>{if(!n)return"â";const x=new Date(n).getTime();if(Number.isNaN(x))return n;const p=Date.now()-x;if(p<0)return"just now";const m=Math.floor(p/1e3);if(m<60)return`${m}s ago`;const a=Math.floor(m/60);if(a<60)return`${a}m ago`;const C=Math.floor(a/60);if(C<24)return`${C}h ago`;const j=Math.floor(C/24);if(j<30)return`${j}d ago`;const i=Math.floor(j/30);return i<12?`${i}mo ago`:`${Math.floor(i/12)}y ago`},re=n=>{if(!n)return null;const x=new Date(n);return Number.isNaN(x.getTime())?null:x.toISOString().slice(0,10)};function Ws(){const{id:n}=Ue(),x=qe(),p=Qe(),m=p.palette.mode==="dark",a=d.useMemo(()=>{const t=p.palette.text.secondary,s=Ce(p.palette.text.primary,m?.32:.28),l=Ce(p.palette.text.primary,m?.14:.1),c={fontSize:11,backgroundColor:p.palette.background.paper,color:p.palette.text.primary,border:`1px solid ${p.palette.divider}`,borderRadius:0,boxShadow:m?"0 4px 12px rgba(0,0,0,0.55)":"0 4px 12px rgba(0,0,0,0.10)"},v={fontSize:11,fontWeight:600,color:p.palette.text.primary},X={fontSize:11,color:p.palette.text.secondary};
1return{axisTick:t,axisLine:s,gridStroke:l,tooltipStyle:c,tooltipLabelStyle:v,tooltipItemStyle:X}},[p,m]),[C,j]=d.useState(!0),[i,S]=d.useState(null),[k,Le]=d.useState([]),[I,_e]=d.useState([]),[z,Me]=d.useState([]),[G,Oe]=d.useState([]),[y,xe]=d.useState(null),[b,$e]=d.useState({plansTotal:0,jobsTotal:0,generatedCodePlans:0,connections:0,storybooks:0,datasets:0,skills:0,asks:0,mcpServers:0}),[J,We]=d.useState([]);d.useEffect(()=>{let t=!0;return j(!0),Promise.all([ze(n).catch(()=>null),ds(n,{skip:0,limit:100}).catch(()=>({items:[],total:0})),fs(n,{skip:0,limit:100}).catch(()=>({jobs:[],total:0})),ps(n).catch(()=>({plans:[]})),hs(n).catch(()=>({connections:[]})),us(n).catch(()=>({storybooks:[]})),ms(n).catch(()=>[]),ys(n).catch(()=>({items:[]})),is(n,{skip:0,limit:100}).catch(()=>({items:[],total:0})),gs(n).catch(()=>({servers:[]})),ve(n).catch(()=>null)]).then(([s,l,c,v,X,ue,$,me,Y,ye,Ve])=>{if(!t)return;S(s),xe(Ve);const ge=l.items||[],je=c.jobs||c.items||[],Se=Y.items||[],ke=me.items||me.skills||[];Le(ge),_e(je),Me(Se),Oe(ke);const be=X.connections||[],Z={};be.forEach(L=>{const B=L.warehouse_type||"unknown";Z[B]=(Z[B]||0)+1}),We(Object.entries(Z).map(([L,B])=>({type:L,value:B})).sort((L,B)=>B.value-L.value)),$e({plansTotal:l.total??l.count??ge.length,jobsTotal:c.total??c.count??je.length,generatedCodePlans:(v.plans||v.scripts||[]).length,connections:be.length,storybooks:(ue.storybooks||ue.items||[]).length,datasets:Array.isArray($)?$.length:($.datasets||$.items||[]).length,skills:ke.length,asks:Y.total??Y.count??Se.length,mcpServers:(ye.servers||ye.items||[]).length})}).finally(()=>{t&&j(!1)}),()=>{t=!1}},[n]),d.useEffect(()=>{const t=setInterval(()=>{ve(n).then(xe).catch(()=>{}),ze(n).then(S).catch(()=>{})},3e4);return()=>clearInterval(t)},[n]);const Pe=d.useMemo(()=>k.filter(t=>t.status==="completed").length,[k]),R=d.useMemo(()=>{const t={};return k.forEach(s=>{const l=(s.status||"unknown").toLowerCase();t[l]=(t[l]||0)+1}),Object.entries(t).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value)},[k]),V=d.useMemo(()=>{const t={};return I.forEach(s=>{const l=s.agent_type||"unknown";t[l]=(t[l]||0)+1}),Object.entries(t).map(([s,l])=>({type:s,value:l})).sort((s,l)=>l.value-s.value).slice(0,8)},[I]),He=d.useMemo(()=>{const s={};for(let l=13;l>=0;l--){const c=new Date;c.setDate(c.getDate()-l);const v=c.toISOString().slice(0,10);s[v]={day:v.slice(5),plans:0,jobs:0,asks:0}}return k.forEach(l=>{const c=re(l.created_at);c&&s[c]&&(s[c].plans+=1)}),I.forEach(l=>{const c=re(l.created_at);c&&s[c]&&(s[c].jobs+=1)}),z.forEach(l=>{const c=re(l.created_at);c&&s[c]&&(s[c].asks+=1)}),Object.values(s)},[k,I,z]),D=d.useMemo(()=>{const t={};return G.forEach(s=>{const l=(s.status||"unknown").toLowerCase();t[l]=(t[l]||0)+1}),Object.entries(t).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value)},[G]),U=d.useMemo(()=>{const t={};return z.forEach(s=>{const l=(s.status||"unknown").toLowerCase();t[l]=(t[l]||0)+1}),Object.entries(t).map(([s,l])=>({name:s,value:l})).sort((s,l)=>l.value-s.value)},[z]),q=d.useMemo(()=>[...k.map(s=>({kind:"plan",id:s.plan_id,title:s.problem_statement||"Plan",status:s.status,ts:s.created_at,href:`/workspaces/${n}/gyani`})),...I.map(s=>({kind:"job",id:s.job_id,title:s.agent_type||"Agent job",status:s.status,ts:s.created_at,href:`/workspaces/${n}/agents`})),...z.map(s=>({kind:"ask",id:s.session_id,title:s.question||"Analyst ask",status:s.status,ts:s.created_at,href:`/workspaces/${n}/skills`}))].filter(s=>s.ts).sort((s,l)=>new Date(l.ts)-new Date(s.ts)).slice(0,8),[k,I,z,n]),Q=[{key:"plansTotal",label:"Plans",value:b.plansTotal,icon:e.jsx(we,{sx:{fontSize:14}}),accent:"#5B8DEF"},{key:"completed",label:"Completed Plans",value:Pe,icon:e.jsx(rs,{sx:{fontSize:14}}),accent:"#52BE80"},{key:"asks",label:"Analyst Asks",value:b.asks,icon:e.jsx(_,{sx:{fontSize:14}}),accent:"#FF6B6B"},{key:"skills",label:"Analyst Skills",value:b.skills,icon:e.jsx(W,{sx:{fontSize:14}}),accent:"#9013FE"},{key:"codePlans",label:"Generated Code",value:b.generatedCodePlans,icon:e.jsx(Be,{sx:{fontSize:14}}),accent:"#BB8FCE"},{key:"jobs",label:"Agent Jobs",value:b.jobsTotal,icon:e.jsx(ae,{sx:{fontSize:14}}),accent:"#F6A623"},{key:"conn",label:"Connections",value:b.connections,icon:e.jsx(ee,{sx:{fontSize:14}}),accent:"#50E3C2"},{key:"datasets",label:"Datasets",value:b.datasets,icon:e.jsx(Xe,{sx:{fontSize:14}}),accent:"#45B7D1"}],de=[{key:"gyani",label:"Gyani Hub",desc:"Plan, reason, and design data products with the Gyani agent.",icon:e.jsx(W,{sx:{fontSize:18}}
1),href:`/workspaces/${n}/gyani`,accent:"#9013FE"},{key:"skills",label:"Analyst Skills",desc:"Ask the analyst agent, approve plans, run skills.",icon:e.jsx(_,{sx:{fontSize:18}}),href:`/workspaces/${n}/skills`,accent:"#FF6B6B"},{key:"data",label:"Data Upload",desc:"Bring files in and stage them as datasets.",icon:e.jsx(Ie,{sx:{fontSize:18}}),href:`/workspaces/${n}/data`,accent:"#50E3C2"},{key:"connections",label:"Connections",desc:"Connect warehouses, lakes, and data sources.",icon:e.jsx(ee,{sx:{fontSize:18}}),href:`/workspaces/${n}/connections`,accent:"#5B8DEF"},{key:"graph",label:"Semantic Graph",desc:"Explore the ontology and data product graph.",icon:e.jsx(Ye,{sx:{fontSize:18}}),href:`/workspaces/${n}/semantics`,accent:"#45B7D1"},{key:"storybooks",label:"Storybooks",desc:"Author and share interactive analytical narratives.",icon:e.jsx(Re,{sx:{fontSize:18}}),href:`/workspaces/${n}/storybooks`,accent:"#BB8FCE"},{key:"query",label:"Query Editor",desc:"Run SQL, preview rows, visualize results.",icon:e.jsx(Be,{sx:{fontSize:18}}),href:`/workspaces/${n}/query`,accent:"#F6A623"},{key:"jobs",label:"Agent Jobs",desc:"Track background runs, schedules, and history.",icon:e.jsx(ae,{sx:{fontSize:18}}),href:`/workspaces/${n}/agents`,accent:"#7ED321"},{key:"mcp",label:"MCP Servers",desc:"Hook in Model Context Protocol tools and crawlers.",icon:e.jsx(Ze,{sx:{fontSize:18}}),href:`/workspaces/${n}/admin`,accent:"#D0021B",badge:b.mcpServers}];if(C)return e.jsxs(o,{sx:{...f,px:1.2,py:2.4,display:"flex",alignItems:"center",justifyContent:"center",gap:1},children:[e.jsx(es,{size:16}),e.jsx(r,{sx:{fontSize:"0.78rem",color:"text.secondary"},children:"Loading dashboard..."})]});const pe=["source_setup","physical_build","data_profile","semantic_build"],Ke={source_setup:"Choose your data",physical_build:"Discover & profile",data_profile:"Discover & profile",semantic_build:"Build knowledge graph"},Ne=y&&(y.status==="not_started"||y.status==="in_progress"),Ge=y!=null&&y.current_step?pe.indexOf(y.current_step)+1||pe.length:1,Je=Ke[y==null?void 0:y.current_step]||"Setup",F=(i==null?void 0:i.last_successful_graph_sync)??null,he=F?Date.now()-new Date(F).getTime():null,fe=he!==null&&he<1440*60*1e3;return e.jsxs(o,{sx:{display:"flex",flexDirection:"column",gap:1.2},children:[Ne&&e.jsxs(o,{sx:{...f,px:1.4,py:1.1,display:"flex",alignItems:"center",gap:1.5,borderLeft:"3px solid #0EF6CC",bgcolor:t=>t.palette.mode==="dark"?"#1A1830":"#F8F7FF"},children:[e.jsx(ss,{sx:{fontSize:18,color:"#0EF6CC",flexShrink:0}}),e.jsxs(o,{sx:{flex:1,minWidth:0},children:[e.jsx(r,{sx:{fontSize:"0.78rem",fontWeight:700,color:"#0EF6CC",textTransform:"uppercase",letterSpacing:.5},children:"Setup in progress"}),e.jsxs(r,{sx:{fontSize:"0.72rem",color:"text.secondary"},children:["Step ",Ge," of 4 · ",Je]})]}),e.jsx(w,{size:"small",endIcon:e.jsx(ts,{sx:{fontSize:14}}),onClick:()=>x(`/workspaces/${n}/onboarding`),sx:{borderRadius:0,fontSize:"0.72rem",fontWeight:600,color:"#0EF6CC",border:"1px solid #0EF6CC",px:1.2,py:.4,textTransform:"none",flexShrink:0,"&:hover":{bgcolor:"#0EF6CC20"}},children:"Continue setup"})]}),e.jsxs(o,{sx:{...f,px:1.4,py:1,display:"flex",alignItems:"center",gap:1},children:[e.jsx(js,{sx:{fontSize:15,color:"text.secondary",flexShrink:0}}),e.jsx(r,{sx:{...u,flexShrink:0},children:"Knowledge graph sync"}),e.jsx(o,{sx:{flex:1,display:"flex",alignItems:"center",gap:.75},children:fe?e.jsxs(e.Fragment,{children:[e.jsx(os,{sx:{fontSize:14,color:"#52BE80"}}),e.jsxs(r,{sx:{fontSize:"0.72rem",color:"#52BE80",fontWeight:600},children:["Synced ",le(F)]})]}):e.jsxs(e.Fragment,{children:[e.jsx(Ss,{sx:{fontSize:14,color:"#F8B739"}}),e.jsx(r,{sx:{fontSize:"0.72rem",color:"#F8B739",fontWeight:600},children:F?`Last sync ${le(F)} â may be stale`:"Never synced"})]})}),!fe&&e.jsx(w,{size:"small",onClick:()=>x(`/workspaces/${n}/agents`),sx:{borderRadius:0,fontSize:"0.65rem",color:"text.secondary",textTransform:"none",px:.8,py:.3},children:"View jobs"})]}),e.jsxs(o,{sx:{...f,px:1.4,py:1.1,display:"flex",alignItems:"center",justifyContent:"space-between",gap:1,flexWrap:"wrap"},children:[e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:1},children:[e.jsx(we,{sx:{fontSize:20,color:"primary.main"}}),e.jsxs(o,{children:[e.jsx(r,{sx:{fontSize:"0.95rem",fontWeight:700,lineHeight:1.1},children:(i==null?void 0:i.name)||"AuraSpace"}),e.jsxs(r,{sx:{fontSize:"0.66rem",color:"text.secondary",textTransform:"uppercase",letterSpacing:.55},children:["AuraSpace Dashboard · ",(i==null?void 0:i.subscription_tier)||"standard"," tier"]})]})]}),e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.6},children:[(i==null?void 0:i.status)&&e.jsx(ce,{size:"small",label:i.status,sx:{height:20,fontSize:"0.62rem",borderRadius:0,bgcolor:De(i.status),color:"#fff",textTransform:"uppercase",letterSpacing:.5,fontWeight:700}}),e.jsx(ce,{size:"small",icon:e.jsx(ne,{sx:{fontSize:13}}),label:"Live metrics",sx:{height:20,fontSize:"0.62rem",borderRadius:0}})]})]}),e.jsx(o,{sx:{...f},children:e.jsx(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr 1fr",sm:"repeat(4, 1fr)",lg:"repeat(8, 1fr)"}},children:Q.map((t,s)=>e.jsxs(o,{sx:{px:1.1,py:.95,borderRight:{sm:(s+1)%4!==0?1:0,lg:s<Q.length-1?1:0},borderBottom:{xs:s<Q.length-2?1:0,sm:s<4?1:0,lg:0},borderColor:"divider",position:"relative",overflow:"hidden"},children:[e.jsx(o,{sx:{position:"absolute",left:0,top:0,bottom:0,width:3,bgcolor:t.accent}}),e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.55,mb:.25,pl:.4},children:[e.jsx(o,{sx:{display:"flex",color:t.accent},children:t.icon}),e.jsx(r,{sx:u,children:t.label})]}),e.jsx(r,{sx:{fontSize:"1.15rem",fontWeight:700,lineHeight:1.1,pl:.4,color:"text.primary"},children:t.value})]},t.key))})}),e.jsxs(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"2fr 1fr"},gap:1.2}
1,children:[e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(cs,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Activity · last 14 days"}),e.jsx(o,{sx:{flex:1}}),e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:1.2},children:[e.jsx(ie,{color:"#5B8DEF",label:"Plans"}),e.jsx(ie,{color:"#F6A623",label:"Jobs"}),e.jsx(ie,{color:"#FF6B6B",label:"Asks"})]})]}),e.jsx(o,{sx:{height:200,p:.6},children:e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(ks,{data:He,margin:{top:8,right:10,left:-18,bottom:0},children:[e.jsxs("defs",{children:[e.jsxs("linearGradient",{id:"gradPlans",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#5B8DEF",stopOpacity:.55}),e.jsx("stop",{offset:"95%",stopColor:"#5B8DEF",stopOpacity:0})]}),e.jsxs("linearGradient",{id:"gradJobs",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#F6A623",stopOpacity:.55}),e.jsx("stop",{offset:"95%",stopColor:"#F6A623",stopOpacity:0})]}),e.jsxs("linearGradient",{id:"gradAsks",x1:"0",y1:"0",x2:"0",y2:"1",children:[e.jsx("stop",{offset:"5%",stopColor:"#FF6B6B",stopOpacity:.55}),e.jsx("stop",{offset:"95%",stopColor:"#FF6B6B",stopOpacity:0})]})]}),e.jsx(P,{strokeDasharray:"2 3",stroke:a.gridStroke,vertical:!1}),e.jsx(H,{dataKey:"day",tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine}),e.jsx(K,{tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine,allowDecimals:!1,width:28}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}}),e.jsx(se,{type:"monotone",dataKey:"plans",stroke:"#5B8DEF",strokeWidth:2,fill:"url(#gradPlans)"}),e.jsx(se,{type:"monotone",dataKey:"jobs",stroke:"#F6A623",strokeWidth:2,fill:"url(#gradJobs)"}),e.jsx(se,{type:"monotone",dataKey:"asks",stroke:"#FF6B6B",strokeWidth:2,fill:"url(#gradAsks)"})]})})})]}),e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(Ee,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Plan status mix"})]}),e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.5,p:.6,minHeight:200},children:[e.jsx(o,{sx:{width:"55%",height:180},children:R.length===0?e.jsx(O,{label:"No plans yet"}):e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(Te,{children:[e.jsx(Ae,{data:R,dataKey:"value",nameKey:"name",innerRadius:45,outerRadius:70,paddingAngle:1,stroke:"none",children:R.map((t,s)=>e.jsx(M,{fill:E[t.name]||h[s%h.length]},t.name))}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}})]})})}),e.jsx(o,{sx:{flex:1,display:"flex",flexDirection:"column",gap:.45,pr:.6},children:R.length===0?e.jsx(r,{sx:{fontSize:"0.7rem",color:"text.secondary"},children:"â"}):R.map((t,s)=>e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.6},children:[e.jsx(o,{sx:{width:8,height:8,bgcolor:E[t.name]||h[s%h.length]}}),e.jsx(r,{sx:{fontSize:"0.7rem",textTransform:"capitalize",flex:1},children:t.name.replace(/_/g," ")}),e.jsx(r,{sx:{fontSize:"0.72rem",fontWeight:700},children:t.value})]},t.name))})]})]})]}),e.jsxs(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"1fr 1fr"},gap:1.2},children:[e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(ns,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Jobs by agent type"})]}),e.jsx(o,{sx:{height:200,p:.6},children:V.length===0?e.jsx(O,{label:"No agent runs yet"}):e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(te,{data:V,layout:"vertical",margin:{top:4,right:16,left:8,bottom:0},children:[e.jsx(P,{strokeDasharray:"2 3",stroke:a.gridStroke,horizontal:!1}),e.jsx(H,{type:"number",tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine,allowDecimals:!1}),e.jsx(K,{dataKey:"type",type:"category",tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine,width:120}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}}),e.jsx(oe,{dataKey:"value",radius:0,children:V.map((t,s)=>e.jsx(M,{fill:h[s%h.length]},s))})]})})})]}
1),e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(as,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Connections by warehouse"})]}),e.jsx(o,{sx:{height:200,p:.6},children:J.length===0?e.jsx(O,{label:"No connections yet"}):e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(te,{data:J,margin:{top:8,right:10,left:-18,bottom:0},children:[e.jsx(P,{strokeDasharray:"2 3",stroke:a.gridStroke,vertical:!1}),e.jsx(H,{dataKey:"type",tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine}),e.jsx(K,{tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine,allowDecimals:!1,width:28}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}}),e.jsx(oe,{dataKey:"value",radius:0,children:J.map((t,s)=>e.jsx(M,{fill:h[(s+4)%h.length]},s))})]})})})]})]}),e.jsxs(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"1fr 1fr"},gap:1.2},children:[e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(_,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Analyst skills by status"}),e.jsx(o,{sx:{flex:1}}),e.jsxs(r,{sx:{fontSize:"0.62rem",color:"text.disabled"},children:[G.length," total"]})]}),e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.5,p:.6,minHeight:200},children:[e.jsx(o,{sx:{width:"55%",height:180},children:D.length===0?e.jsx(O,{label:"No skills yet"}):e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(Te,{children:[e.jsx(Ae,{data:D,dataKey:"value",nameKey:"name",innerRadius:45,outerRadius:70,paddingAngle:1,stroke:"none",children:D.map((t,s)=>e.jsx(M,{fill:E[t.name]||h[s%h.length]},t.name))}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}})]})})}),e.jsx(o,{sx:{flex:1,display:"flex",flexDirection:"column",gap:.45,pr:.6},children:D.length===0?e.jsx(r,{sx:{fontSize:"0.7rem",color:"text.secondary"},children:"â"}):D.map((t,s)=>e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.6},children:[e.jsx(o,{sx:{width:8,height:8,bgcolor:E[t.name]||h[s%h.length]}}),e.jsx(r,{sx:{fontSize:"0.7rem",textTransform:"capitalize",flex:1},children:t.name.replace(/_/g," ")}),e.jsx(r,{sx:{fontSize:"0.72rem",fontWeight:700},children:t.value})]},t.name))})]})]}),e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(Ee,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Analyst ask status"}),e.jsx(o,{sx:{flex:1}}),e.jsxs(r,{sx:{fontSize:"0.62rem",color:"text.disabled"},children:[z.length," total"]})]}),e.jsx(o,{sx:{height:200,p:.6},children:U.length===0?e.jsx(O,{label:"No analyst asks yet"}):e.jsx(T,{width:"100%",height:"100%",children:e.jsxs(te,{data:U,margin:{top:8,right:10,left:-18,bottom:0},children:[e.jsx(P,{strokeDasharray:"2 3",stroke:a.gridStroke,vertical:!1}),e.jsx(H,{dataKey:"name",tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine}),e.jsx(K,{tick:{fontSize:10,fill:a.axisTick},stroke:a.axisLine,allowDecimals:!1,width:28}),e.jsx(A,{contentStyle:a.tooltipStyle,labelStyle:a.tooltipLabelStyle,itemStyle:a.tooltipItemStyle,cursor:{fill:a.gridStroke}}),e.jsx(oe,{dataKey:"value",radius:0,children:U.map((t,s)=>e.jsx(M,{fill:E[t.name]||h[s%h.length]},t.name))})]})})})]})]}),e.jsxs(o,{sx:{...f},children:[e.jsxs(o,{sx:g,children:[e.jsx(ne,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Capabilities"})]}),e.jsx(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",sm:"repeat(2, 1fr)",md:"repeat(3, 1fr)"}},children:de.map((t,s)=>e.jsx(bs,{capability:t,isLastCol:(s+1)%3===0,isLastRow:s>=de.length-3,onClick:()=>x(t.href)},t.key))})]}),e.jsxs(o,{sx:{display:"grid",gridTemplateColumns:{xs:"1fr",lg:"2fr 1fr"},gap:1.2},children:[e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(xs,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Recent activity"})]}),q.length===0?e.jsx(o,{sx:{p:1.4},children:e.jsx(r,{sx:{fontSize:"0.74rem",color:"text.secondary"},children:"No recent activity. Run a plan or trigger an agent job to get started."})}):e.jsx(o,{children:q.map((t,s)=>e.jsxs(o,{onClick:()=>x(t.href),sx:{display:"flex",alignItems:"center",gap:.8,px:1.1,py:.7,borderBottom:s<q.length-1?1:0,borderColor:"divider",cursor:"pointer","&:hover":{bgcolor:"action.hover"}},children:[e.jsx(o,{sx:{width:5,alignSelf:"stretch",bgcolor:De(t.status)}}),e.jsx(o,{sx:{display:"flex",alignItems:"center",gap:.5,color:"text.secondary"},children:t.kind==="plan"?e.jsx(W,{sx:{fontSize:14}}):t.kind==="ask"?e.jsx(_,{sx:{fontSize:14}}):e.jsx(ae,{sx:{fontSize:14}})}),e.jsxs(o,{sx:{flex:1,minWidth:0},children:[e.jsx(ls,{title:t.title,children:e.jsx(r,{sx:{fontSize:"0.76rem",fontWeight:600,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:t.title})}),e.jsxs(r,{sx:{fontSize:"0.62rem",color:"text.secondary",textTransform:"uppercase",letterSpacing:.45},children:[t.kind," · ",t.status||"unknown"," · ",le(t.ts)]})]}),e.jsx(Fe,{sx:{fontSize:13,color:"text.disabled"}})]},t.kind+t.id+s))})]}
1),e.jsxs(o,{sx:{...f,display:"flex",flexDirection:"column"},children:[e.jsxs(o,{sx:g,children:[e.jsx(ne,{sx:{fontSize:15,color:"text.secondary"}}),e.jsx(r,{sx:u,children:"Quick actions"})]}),e.jsxs(o,{sx:{p:1.1,display:"flex",flexDirection:"column",gap:.7},children:[e.jsx(w,{variant:"contained",size:"small",startIcon:e.jsx(W,{}),onClick:()=>x(`/workspaces/${n}/gyani`),sx:{borderRadius:0,justifyContent:"flex-start"},children:"Open Gyani"}),e.jsx(w,{variant:"outlined",size:"small",startIcon:e.jsx(_,{}),onClick:()=>x(`/workspaces/${n}/skills`),sx:{borderRadius:0,justifyContent:"flex-start"},children:"Ask the Analyst"}),e.jsx(w,{variant:"outlined",size:"small",startIcon:e.jsx(Ie,{}),onClick:()=>x(`/workspaces/${n}/data`),sx:{borderRadius:0,justifyContent:"flex-start"},children:"Upload Data"}),e.jsx(w,{variant:"outlined",size:"small",startIcon:e.jsx(ee,{}),onClick:()=>x(`/workspaces/${n}/connections`),sx:{borderRadius:0,justifyContent:"flex-start"},children:"Manage Connections"}),e.jsx(w,{variant:"outlined",size:"small",startIcon:e.jsx(Re,{}),onClick:()=>x(`/workspaces/${n}/storybooks`),sx:{borderRadius:0,justifyContent:"flex-start"},children:"Open Storybooks"})]})]})]})]})}function ie({color:n,label:x}){return e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.4},children:[e.jsx(o,{sx:{width:8,height:8,bgcolor:n}}),e.jsx(r,{sx:{fontSize:"0.62rem",textTransform:"uppercase",letterSpacing:.45,color:"text.secondary"},children:x})]})}function O({label:n}){return e.jsx(o,{sx:{height:"100%",display:"flex",alignItems:"center",justifyContent:"center"},children:e.jsx(r,{sx:{fontSize:"0.72rem",color:"text.disabled"},children:n})})}function bs({capability:n,isLastCol:x,isLastRow:p,onClick:m}){const{label:a,desc:C,icon:j,accent:i,badge:S}=n;return e.jsxs(o,{onClick:m,sx:{px:1.1,py:1,borderRight:{md:x?0:1},borderBottom:p?0:1,borderColor:"divider",cursor:"pointer",position:"relative",transition:"background-color 0.15s ease","&:hover":{bgcolor:"action.hover"},"&:hover .cap-icon":{color:i,borderColor:i},"&:hover .cap-arrow":{opacity:1,transform:"translateX(2px) translateY(-2px)"}},children:[e.jsxs(o,{sx:{display:"flex",alignItems:"center",gap:.7,mb:.4},children:[e.jsx(o,{className:"cap-icon",sx:{width:26,height:26,display:"flex",alignItems:"center",justifyContent:"center",color:"text.secondary",border:1,borderColor:"divider",transition:"color 0.15s ease, border-color 0.15s ease"},children:j}),e.jsx(r,{sx:{fontSize:"0.82rem",fontWeight:700},children:a}),S!=null&&S>0&&e.jsx(ce,{size:"small",label:S,sx:{height:16,fontSize:"0.58rem",borderRadius:0,ml:"auto",bgcolor:i,color:"#fff",fontWeight:700}}),e.jsx(Fe,{className:"cap-arrow",sx:{fontSize:13,color:"text.disabled",ml:S!=null&&S>0?0:"auto",opacity:0,transition:"opacity 0.15s ease, transform 0.15s ease"}})]}),e.jsx(r,{sx:{fontSize:"0.7rem",color:"text.secondary",lineHeight:1.35},children:C})]})}export{Ws as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.