import{r as T,k as e}from"./index-BVfpSx5Q.js";import{L as k}from"./layout-NiehYZnq.js";import{P as S,K as n,S as x,C as m}from"./ui-DGkmnhL-.js";import{u as C,R as E,L as w,E as I}from"./DefenseDataState--cwdhwZV.js";const t={surface:"rgba(255,255,255,0.025)",border:"rgba(255,255,255,0.08)",text:"#f5f5f5",dim:"#8a8a8a",muted:"#5e5e5e",accent:"#c9b787"},p={full:"#c9b787",partial:"#f59e0b",planned:"#5e5e5e"},o={compliant:"#c9b787",partial:"#f59e0b","in-progress":"#3b82f6"};function q(){var b;const[r,y]=T.useState("atlas"),{data:l,loading:j,error:h,lastUpdated:v,refresh:f}=C("/api/internal/a11oy/defense/atlas-shield"),a=(l==null?void 0:l.atlasTechniques)??[],c=(l==null?void 0:l.attckTechniques)??[],u=(l==null?void 0:l.owaspAgentic)??[],d=a.filter(s=>s.coverage==="full").length,i=c.filter(s=>s.coverage==="full").length,g=u.filter(s=>s.status==="compliant").length,N=a.reduce((s,A)=>s+A.detections,0);return e.jsxs(k,{children:[e.jsx(S,{label:"ATLAS SHIELD",title:"Dual-Framework AI Threat Coverage",subtitle:"MITRE ATLAS (84 AI-specific attack techniques) + MITRE ATT&CK coverage — combined with OWASP Agentic Security Top 10 compliance for comprehensive agent threat defense.",status:"LIVE"}),e.jsx(E,{loading:j,error:h,lastUpdated:v,onRefresh:f}),!l&&j?e.jsx(w,{label:"Loading ATLAS coverage matrix…"}):!l&&h?e.jsx(I,{error:h,onRetry:f}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-6 gap-3 mb-8",children:[e.jsx(n,{label:"ATLAS COVERAGE",value:`${d}/${a.length}`,sub:"techniques covered",accent:t.accent}),e.jsx(n,{label:"ATT&CK COVERAGE",value:`${i}/${c.length}`,sub:"techniques mapped",accent:t.accent}),e.jsx(n,{label:"OWASP AGENTIC",value:`${g}/10`,sub:"compliant",accent:t.accent}),e.jsx(n,{label:"TOTAL DETECTIONS",value:N.toLocaleString(),sub:"threats caught",accent:t.accent}),e.jsx(n,{label:"PROMPT INJECTIONS",value:((b=a.find(s=>s.id==="AML.T0048"))==null?void 0:b.detections.toLocaleString())??"0",sub:"blocked",accent:t.text}),e.jsx(n,{label:"FRAMEWORKS",value:"3",sub:"ATLAS + ATT&CK + OWASP",accent:t.dim})]}),e.jsx("div",{className:"flex gap-1 mb-6",children:["atlas","attck","owasp","coverage"].map(s=>e.jsx("button",{onClick:()=>y(s),className:"px-4 py-2 text-[10px] font-mono uppercase tracking-widest rounded-md transition-all",style:{background:r===s?"rgba(201,183,135,0.1)":"transparent",color:r===s?t.accent:t.muted,border:`1px solid ${r===s?"rgba(201,183,135,0.2)":"transparent"}`,cursor:"pointer"},children:s==="attck"?"ATT&CK":s},s))}),r==="atlas"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:"MITRE ATLAS — AI-Specific Attack Techniques"}),e.jsx("p",{className:"text-xs mb-4",style:{color:t.dim},children:"MITRE ATLAS catalogs 84 AI-specific attack techniques across 56 sub-techniques. A11oy maps each technique to a specific defense layer with detection telemetry."}),e.jsx("div",{className:"rounded-lg overflow-hidden mb-8",style:{border:`1px solid ${t.border}`},children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsx("tr",{style:{background:"rgba(255,255,255,0.02)"},children:["ID","Technique","Tactic","Coverage","Detections","A11oy Defense"].map(s=>e.jsx("th",{className:"text-left px-4 py-2.5 font-mono text-[9px] uppercase tracking-wider",style:{color:t.muted,borderBottom:`1px solid ${t.border}`},children:s},s))})}),e.jsx("tbody",{children:a.map(s=>e.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,0.04)"},children:[e.jsx("td",{className:"px-4 py-2.5 font-mono font-medium",style:{color:t.accent},children:s.id}),e.jsx("td",{className:"px-4 py-2.5",style:{color:t.text},children:s.name}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{background:"rgba(255,255,255,0.04)",color:t.dim},children:s.tactic})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{background:`${p[s.coverage]}15`,color:p[s.coverage]},children:s.coverage})}),e.jsx("td",{className:"px-4 py-2.5 font-mono",style:{color:s.detections>100?t.text:t.dim},children:s.detections.toLocaleString()}),e.jsx("td",{className:"px-4 py-2.5 text-[10px]",style:{color:t.dim,maxWidth:300},children:s.a11oyDefense})]},s.id))})]})})]}),r==="attck"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:"MITRE ATT&CK — Enterprise Techniques (Agent-Relevant)"}),e.jsx("p",{className:"text-xs mb-4",style:{color:t.dim},children:"Traditional ATT&CK techniques mapped to agentic AI attack surfaces. A11oy extends enterprise threat coverage to agent-specific contexts."}),e.jsx("div",{className:"rounded-lg overflow-hidden mb-8",style:{border:`1px solid ${t.border}`},children:e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsx("tr",{style:{background:"rgba(255,255,255,0.02)"},children:["ID","Technique","Tactic","Coverage","Agent Relevance"].map(s=>e.jsx("th",{className:"text-left px-4 py-2.5 font-mono text-[9px] uppercase tracking-wider",style:{color:t.muted,borderBottom:`1px solid ${t.border}`},children:s},s))})}),e.jsx("tbody",{children:c.map(s=>e.jsxs("tr",{style:{borderBottom:"1px solid rgba(255,255,255,0.04)"},children:[e.jsx("td",{className:"px-4 py-2.5 font-mono font-medium",style:{color:"#3b82f6"},children:s.id}),e.jsx("td",{className:"px-4 py-2.5",style:{color:t.text},children:s.name}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{background:"rgba(255,255,255,0.04)",color:t.dim},children:s.tactic})}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{background:`${p[s.coverage]}15`,color:p[s.coverage]},children:s.coverage})}),e.jsx("td",{className:"px-4 py-2.5 text-[10px]",style:{color:t.dim},children:s.relevance})]},s.id))})]})})]}),r==="owasp"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:"OWASP Agentic Security Top 10 Compliance"}),e.jsx("p",{className:"text-xs mb-4",style:{color:t.dim},children:"OWASP Agentic Security Initiative (ASI) defines the top 10 risks for agentic AI systems. A11oy maps each risk to specific governance controls."}),e.jsx("div",{className:"space-y-3 mb-8",children:u.map(s=>e.jsxs(m,{children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 mb-2",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-sm font-mono font-bold",style:{color:t.accent},children:s.id}),e.jsx("span",{className:"text-[9px] font-mono px-1.5 py-0.5 rounded",style:{background:`${o[s.status]}15`,color:o[s.status]},children:s.status})]}),e.jsx("div",{className:"text-sm font-medium mb-1",style:{color:t.text},children:s.name}),e.jsx("p",{className:"text-[10px] mb-2",style:{color:t.dim},children:s.description})]}),s.detections>0&&e.jsxs("div",{className:"flex-shrink-0 text-right",children:[e.jsx("div",{className:"text-lg font-mono font-bold",style:{color:t.accent},children:s.detections.toLocaleString()}),e.jsx("div",{className:"text-[9px] font-mono",style:{color:t.muted},children:"detections"})]})]}),e.jsxs("div",{className:"p-2.5 rounded",style:{background:"rgba(201,183,135,0.04)",border:"1px solid rgba(201,183,135,0.1)"},children:[e.jsx("span",{className:"text-[9px] font-mono",style:{color:t.accent},children:"A11OY CONTROL:"}),e.jsx("span",{className:"text-[10px] ml-1.5",style:{color:t.dim},children:s.a11oyControl})]})]},s.id))})]}),r==="coverage"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{children:"Dual-Framework Coverage Matrix"}),e.jsx("p",{className:"text-xs mb-4",style:{color:t.dim},children:"Combined view of MITRE ATLAS + MITRE ATT&CK coverage showing how A11oy's defense layers map across both frameworks."}),e.jsxs("div",{className:"grid md:grid-cols-2 gap-6 mb-8",children:[e.jsxs(m,{children:[e.jsx("div",{className:"text-[9px] font-mono uppercase tracking-widest mb-3",style:{color:t.muted},children:"MITRE ATLAS COVERAGE"}),e.jsxs("div",{className:"flex items-center gap-4 mb-3",children:[e.jsxs("div",{className:"text-3xl font-mono font-bold",style:{color:t.accent},children:[a.length?(d/a.length*100).toFixed(0):"0","%"]}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-3 rounded-full",style:{background:t.surface},children:e.jsx("div",{className:"h-3 rounded-full",style:{width:`${a.length?d/a.length*100:0}%`,background:t.accent}})})})]}),e.jsxs("div",{className:"flex gap-4 text-[10px]",children:[e.jsxs("div",{children:[e.jsx("span",{style:{color:t.accent},children:"Full:"})," ",e.jsx("span",{style:{color:t.text},children:d})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#f59e0b"},children:"Partial:"})," ",e.jsx("span",{style:{color:t.text},children:a.filter(s=>s.coverage==="partial").length})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:t.muted},children:"Planned:"})," ",e.jsx("span",{style:{color:t.text},children:a.filter(s=>s.coverage==="planned").length})]})]})]}),e.jsxs(m,{children:[e.jsx("div",{className:"text-[9px] font-mono uppercase tracking-widest mb-3",style:{color:t.muted},children:"MITRE ATT&CK COVERAGE"}),e.jsxs("div",{className:"flex items-center gap-4 mb-3",children:[e.jsxs("div",{className:"text-3xl font-mono font-bold",style:{color:t.accent},children:[c.length?(i/c.length*100).toFixed(0):"0","%"]}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-3 rounded-full",style:{background:t.surface},children:e.jsx("div",{className:"h-3 rounded-full",style:{width:`${c.length?i/c.length*100:0}%`,background:"#3b82f6"}})})})]}),e.jsxs("div",{className:"flex gap-4 text-[10px]",children:[e.jsxs("div",{children:[e.jsx("span",{style:{color:"#3b82f6"},children:"Full:"})," ",e.jsx("span",{style:{color:t.text},children:i})]}),e.jsxs("div",{children:[e.jsx("span",{style:{color:"#f59e0b"},children:"Partial:"})," ",e.jsx("span",{style:{color:t.text},children:c.filter(s=>s.coverage==="partial").length})]})]})]})]}),e.jsxs(m,{children:[e.jsx("div",{className:"text-[9px] font-mono uppercase tracking-widest mb-3",style:{color:t.muted},children:"OWASP AGENTIC COMPLIANCE"}),e.jsxs("div",{className:"flex items-center gap-4 mb-3",children:[e.jsxs("div",{className:"text-3xl font-mono font-bold",style:{color:t.accent},children:[g,"/10"]}),e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-3 rounded-full",style:{background:t.surface},children:e.jsx("div",{className:"h-3 rounded-full",style:{width:`${g/10*100}%`,background:t.accent}})})})]}),e.jsx("div",{className:"grid grid-cols-5 gap-2",children:u.map(s=>e.jsxs("div",{className:"text-center p-2 rounded",style:{background:`${o[s.status]}08`,border:`1px solid ${o[s.status]}20`},children:[e.jsx("div",{className:"text-[9px] font-mono font-bold",style:{color:o[s.status]},children:s.id}),e.jsx("div",{className:"text-[8px] mt-0.5",style:{color:t.muted},children:s.status})]},s.id))})]})]}),e.jsxs("div",{className:"p-3 rounded-lg text-xs flex items-center gap-2 mt-6",style:{background:"rgba(201,183,135,0.04)",border:"1px solid rgba(201,183,135,0.15)",color:t.muted},children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:t.accent}})," ATLAS Shield — dual-framework threat coverage combining MITRE ATLAS AI techniques, MITRE ATT&CK enterprise techniques, and OWASP Agentic Security Top 10."]})]})]})}export{q as AtlasShield};