PageSourceSearch

https://infrarails.ai/_next/static/chunks/87095-3e9508b4639680ff.js

js infrarails.ai collected 2026-10-09 22:56:16 UTC 29,335 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[87095],{35626:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(45105).A)("ArrowLeft",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]])},78020:(e,t,s)=>{s.d(t,{wC:()=>l,nl:()=>n,M0:()=>h});var a=s(95155);function l(e){let{evidence:t,onClick:s,selected:l=!1}=e,r=function(e){switch(e){case"system_config":return{label:"Config",bg:"bg-purple-100",text:"text-purple-700",icon:(0,a.jsxs)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:[(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})};case"api_response":return{label:"API",bg:"bg-blue-100",text:"text-blue-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 9l3 3-3 3m5 0h3M5 20h14a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})})};case"model_output":return{label:"Model",bg:"bg-emerald-100",text:"text-emerald-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"})})};case"audit_log":return{label:"Audit",bg:"bg-amber-100",text:"text-amber-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})};case"metric":return{label:"Metric",bg:"bg-blue-100",text:"text-blue-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z"})})};case"document":return{label:"Doc",bg:"bg-slate-100",text:"text-slate-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})})};default:return{label:"Unknown",bg:"bg-slate-100",text:"text-slate-700",icon:(0,a.jsx)("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})})}}}(t.type);return(0,a.jsxs)("button",{onClick:()=>null==s?void 0:s(t),className:"w-full text-left p-4 border transition-all ".concat(l?"border-blue-500 bg-blue-50 ring-1 ring-blue-500":"border-slate-200 bg-white hover:border-slate-300 hover:shadow-sm"),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2 mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("div",{className:"p-1.5 ".concat(r.bg," ").concat(r.text),children:r.icon}),(0,a.jsx)("div",{children:(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-bold ".concat(r.bg," ").concat(r.text),children:r.label})})]}),(0,a.jsx)("div",{className:"flex items-center gap-1",children:t.verified?(0,a.jsxs)("span",{className:"flex items-center gap-0.5 px-1.5 py-0.5 bg-emerald-100 text-emerald-700 text-[9px] font-medium",children:[(0,a.jsx)("svg",{className:"w-2.5 h-2.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}),"Verified"]}):(0,a.jsxs)("span",{className:"flex items-center gap-0.5 px-1.5 py-0.5 bg-amber-100 text-amber-700 text-[9px] font-medium",children:[(0,a.jsx)("svg",{className:"w-2.5 h-2.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01"})}),"Unverified"]})})]}),(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("p",{className:"text-xs font-medium text-slate-900 truncate",children:t.source}),(0,a.jsx)("p",{className:"text-[10px] text-slate-500 truncate",children:t.systemName})]}),(0,a.jsxs)("div",{className:"mb-2 p-2 bg-slate-50 border border-slate-100",children:[(0,a.jsx)("div",{className:"text-[9px] text-slate-400 uppercase tracking-wide mb-0.5",children:"SHA-256"}),(0,a.jsx)("div",{className:"text-[10px] font-mono text-slate-600 truncate",children:t.hash})]}),t.evaluators.length>0&&(0,a.jsx)("div",{className:"mb-2",children:(0,a.jsxs)("div",{className:"flex items-center gap-1 flex-wrap",children:[t.evaluators.slice(0,3).map(e=>(0,a.jsx)("span",{className:"px-1.5 py-0.5 bg-blue-50 text-blue-600 text-[9px] font-mono",children:e},e)),t.evaluators.length>3&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-400",children:["+",t.evaluators.length-3]})]})}),(0,a.jsxs)("div",{className:"flex items-center justify-between pt-2 border-t border-slate-100",children:[(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:new Date(t.timestamp).toLocaleDateString()}),(0,a.jsx)("span",{className:"text-[10px] text-slate-400",children:function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,t)).toFixed(1))," ").concat(["B","KB","MB","GB"][t])}(t.size)})]})]})}var r=s(12115);function n(e){let{open:t,onClose:s,evidence:l}=e,n=(0,r.useRef)(null),[i,c]=(0,r.useState)(!1),[d,o]=(0,r.useState)(null);(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&s()};return t&&(document.addEventListener("keydown",e),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),document.body.style.overflow=""}},[t,s]),(0,r.useEffect)(()=>{let e=e=>{n.current&&!n.current.contains(e.target)&&s()};return t&&setTimeout(()=>document.addEventListener("mousedown",e),100),()=>document.removeEventListener("mousedown",e)},[t,s]);let x=async()=>{c(!0),await new Promise(e=>setTimeout(e,1500)),o((null==l?void 0:l.verified)?"success":"failed"),c(!1)},m=e=>{if(!l)return;let t=new Blob(["json"===e?JSON.stringify(l,null,2):""],{type:"json"===e?"application/json":"text/csv"}),s=URL.createObjectURL(t),a=document.createElement("a");a.href=s,a.download="evidence-".concat(l.id,".").concat(e),a.click(),URL.revokeObjectURL(s)};if(!t)return null;let h=l?function(e){switch(e){case"system_config":return{label:"System Configuration",bg:"bg-purple-100",text:"text-purple-700"};case"api_response":return{label:"API Response",bg:"bg-blue-100",text:"text-blue-700"};case"model_output":return{label:"Model Output",bg:"bg-emerald-100",text:"text-emerald-700"};case"audit_log":return{label:"Audit Log",bg:"bg-amber-100",text:"text-amber-700"};case"metric":return{label:"Performance Metric",bg:"bg-blue-100",text:"text-blue-700"};case"document":return{label:"Document",bg:"bg-slate-100",text:"text-slate-700"};
1default:return{label:"Unknown",bg:"bg-slate-100",text:"text-slate-700"}}}(l.type):null;return(0,a.jsxs)("div",{className:"fixed inset-0 z-50",children:[(0,a.jsx)("div",{className:"absolute inset-0 bg-black/50 transition-opacity"}),(0,a.jsxs)("div",{ref:n,className:"absolute right-0 top-0 h-full w-full max-w-xl bg-white shadow-xl transition-transform duration-300 ".concat(t?"translate-x-0":"translate-x-full"),children:[(0,a.jsx)("div",{className:"p-4 border-b ".concat((null==h?void 0:h.bg)||"bg-slate-50"," border-slate-200"),children:(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsx)("div",{className:"flex-1",children:l&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] font-bold ".concat(null==h?void 0:h.bg," ").concat(null==h?void 0:h.text),children:null==h?void 0:h.label}),l.verified?(0,a.jsxs)("span",{className:"flex items-center gap-0.5 px-1.5 py-0.5 bg-emerald-100 text-emerald-700 text-[9px] font-medium",children:[(0,a.jsx)("svg",{className:"w-2.5 h-2.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}),"Verified"]}):(0,a.jsx)("span",{className:"flex items-center gap-0.5 px-1.5 py-0.5 bg-amber-100 text-amber-700 text-[9px] font-medium",children:"Unverified"})]}),(0,a.jsx)("h2",{className:"text-sm font-semibold text-slate-900",children:l.source}),(0,a.jsx)("p",{className:"text-xs text-slate-500 mt-0.5",children:l.systemName})]})}),(0,a.jsx)("button",{onClick:s,className:"p-2 hover:bg-white/50 transition-colors",children:(0,a.jsx)("svg",{className:"w-5 h-5 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,a.jsx)("div",{className:"p-4 h-[calc(100%-80px)] overflow-y-auto",children:l?(0,a.jsxs)("div",{className:"space-y-4",children:[(0,a.jsxs)("div",{className:"p-4 bg-slate-50 border border-slate-200",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("svg",{className:"w-4 h-4 text-slate-500",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),(0,a.jsx)("span",{className:"text-[10px] font-bold text-slate-600 uppercase tracking-wide",children:"SHA-256 Hash"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>{(null==l?void 0:l.hash)&&navigator.clipboard.writeText(l.hash)},className:"text-[10px] text-blue-600 hover:text-blue-800",children:"Copy"}),(0,a.jsx)("button",{onClick:x,disabled:i,className:"text-[10px] text-blue-600 hover:text-blue-800 disabled:text-slate-400",children:i?"Verifying...":"Verify"})]})]}),(0,a.jsx)("div",{className:"font-mono text-[10px] text-slate-700 break-all bg-white p-2 border border-slate-200",children:l.hash}),d&&(0,a.jsx)("div",{className:"mt-2 p-2 text-[10px] font-medium ".concat("success"===d?"bg-emerald-50 text-emerald-700 border border-emerald-200":"bg-red-50 text-red-700 border border-red-200"),children:"success"===d?"Hash verification successful - Evidence integrity confirmed":"Hash verification failed - Evidence may have been tampered with"})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Metadata"}),(0,a.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,a.jsxs)("div",{className:"p-2 bg-slate-50 border border-slate-200",children:[(0,a.jsx)("div",{className:"text-[10px] text-slate-400 uppercase mb-0.5",children:"Timestamp"}),(0,a.jsx)("div",{className:"text-xs text-slate-700",children:new Date(l.timestamp).toLocaleStr
1ing()})]}),(0,a.jsxs)("div",{className:"p-2 bg-slate-50 border border-slate-200",children:[(0,a.jsx)("div",{className:"text-[10px] text-slate-400 uppercase mb-0.5",children:"Size"}),(0,a.jsx)("div",{className:"text-xs text-slate-700",children:function(e){if(0===e)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return"".concat(parseFloat((e/Math.pow(1024,t)).toFixed(1))," ").concat(["B","KB","MB","GB"][t])}(l.size)})]}),(0,a.jsxs)("div",{className:"p-2 bg-slate-50 border border-slate-200",children:[(0,a.jsx)("div",{className:"text-[10px] text-slate-400 uppercase mb-0.5",children:"System ID"}),(0,a.jsx)("div",{className:"text-xs font-mono text-slate-700",children:l.systemId})]}),(0,a.jsxs)("div",{className:"p-2 bg-slate-50 border border-slate-200",children:[(0,a.jsx)("div",{className:"text-[10px] text-slate-400 uppercase mb-0.5",children:"Evaluation ID"}),(0,a.jsx)("div",{className:"text-xs font-mono text-slate-700",children:l.evaluationId})]})]})]}),l.evaluators.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsxs)("h3",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:["Linked Evaluators (",l.evaluators.length,")"]}),(0,a.jsx)("div",{className:"flex items-center gap-1 flex-wrap",children:l.evaluators.map(e=>(0,a.jsx)("span",{className:"px-2 py-1 bg-blue-50 text-blue-600 text-[10px] font-mono",children:e},e))})]}),l.metadata&&(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Raw Data"}),(0,a.jsx)("div",{className:"bg-slate-900 text-slate-100 p-4 overflow-x-auto max-h-[200px]",children:(0,a.jsx)("pre",{className:"text-[10px] font-mono whitespace-pre-wrap",children:JSON.stringify(l.metadata,null,2)})})]}),(0,a.jsxs)("div",{children:[(0,a.jsx)("h3",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Audit Trail"}),(0,a.jsx)("div",{className:"space-y-2",children:[{action:"Evidence collected",timestamp:l.timestamp,user:"System"},{action:"Hash generated",timestamp:l.timestamp,user:"NEXUS Engine"},{action:"Evidence verified",timestamp:l.timestamp,user:"Evidence Engine"}].map((e,t)=>(0,a.jsxs)("div",{className:"flex items-center gap-3 p-2 bg-slate-50 border border-slate-100",children:[(0,a.jsx)("div",{className:"w-1.5 h-1.5 bg-slate-400 rounded-full"}),(0,a.jsxs)("div",{className:"flex-1",children:[(0,a.jsx)("div",{className:"text-xs text-slate-700",children:e.action}),(0,a.jsx)("div",{className:"text-[10px] text-slate-400",children:e.user})]}),(0,a.jsx)("div",{className:"text-[10px] text-slate-400",children:new Date(e.timestamp).toLocaleTimeString()})]},t))})]}),(0,a.jsx)("div",{className:"pt-4 border-t border-slate-200",children:(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("button",{onClick:()=>m("json"),className:"flex-1 px-4 py-2 bg-slate-100 text-slate-700 text-xs font-medium hover:bg-slate-200 transition-colors",children:"Export JSON"}),(0,a.jsx)("button",{onClick:()=>m("csv"),className:"flex-1 px-4 py-2 bg-slate-100 text-slate-700 text-xs font-medium hover:bg-slate-200 transition-colors",children:"Export CSV"})]})})]}):(0,a.jsx)("div",{className:"flex items-center justify-center h-full",children:(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)("svg",{className:"w-12 h-12 text-slate-300 mx-auto mb-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"Select an evidence item to view details"})]})})})]})]})}var i=s(67141);function c(e){switch(e){case"safety_violation":return{bg:"bg-red-50",text:"text-red-600",label:"Safety"};case"security_threat":return{bg:"bg-purple-50",text:"text-purple-600",label:"Security"};case"privacy_breach":return{bg:"bg-blue-50",text:"text-blue-600",label:"Privacy"};case"compliance_failure":return{bg:"bg-amber-50",text:"text-amber-600",label:"Compliance"};case"hard_fail_trigger":return{bg:"bg-red-50",text:"text-red-700",label:"Hard Fail"};case"policy_violation":return{bg:"bg-orange-50",text:"text-orange-600",label:"Policy"};case"quality_failure":return{bg:"bg-yellow-50",text:"text-yellow-600",label:"Quality"};default:return{bg:"bg-slate-50",text:"text-slate-600",label:e}}}function d(e){var t;let{item:s,index:l}=e,[n,d]=(0,r.useState)(!1),o=function(e){switch(e.toLowerCase()){case"critical":return{bg:"bg-red-100",text:"text-red-700",label:"CRITICAL"};case"major":return{bg:"bg-orange-100",text:"text-orange-700",label:"MAJOR"};case"minor":return{bg:"bg-yellow-100",text:"text-yellow-700",label:"MINOR"};case"contextual":return{bg:"bg-slate-100",text:"text-slate-600",label:"CONTEXT"};default:return{bg:"bg-slate-100",text:"text-slate-600",label:e.toUpperCase()}}}(s.severity),x=c(s.category);return(0,a.jsxs)("div",{className:"border border-slate-200 bg-white p-3",children:[(0,a.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"text-[10px] font-mono text-slate-400",children:["#",l+1]}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-bold ".concat(o.bg," ").concat(o.text),children:o.label}),(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium ".concat(x.bg," ").concat(x.text),children:x.label})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Confidence: ",(100*s.confidence).toFixed(0),"%"]}),(0,a.jsx)("div",{className:"w-16 h-1.5 bg-slate-200 overflow-hidden",title:"Confidence: ".concat((100*s.confidence).toFixed(1),"%"),children:(0,a.jsx)("div",{className:"h-full ".concat(s.confidence>=.9?"bg-red-500":s.confidence>=.7?"bg-orange-500":"bg-yellow-500"),style:{width:"".concat(100*s.confidence,"%")}})})]})]}),(0,a.jsxs)("div",{className:"mt-2",children:[(0,a.jsx)("h4",{className:"text-xs font-semibold text-slate-900",children:s.title}),(0,a.jsx)("p",{className:"text-[11px] text-slate-600 mt-0.5",children:s.description})]}),(0,a.jsxs)("div",{className:"mt-2 flex items-center gap-3 flex-wrap",children:[(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Evaluator:"," ",(0,a.jsx)("span",{className:"text-slate-700",children:(0,i.t8)(null!=(t=s.evaluator_id)?t:"")})]}),s.rule_id&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Rule:"," ",(0,a.jsx)("span",{className:"font-mono text-slate-700",children:s.rule_id})]}),s.regulation&&(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Regulation:"," ",(0,a.jsx)("span",{className:"font-mono text-slate-700",children:s.regulation})]})]}),s.hash&&(0,a.jsx)("button",{onClick:()=>d(!n),className:"mt-2 text-[10px] text-blue-600 hover:text-blue-800",children:n?"Hide hash":"Show integrity hash"}),n&&s.hash&&(0,a.jsxs)("div",{className:"mt-1 p-2 bg-slate-50 border border-slate-100",children:[(0,a.jsx)("div",{className:"text-[9px] text-slate-400 uppercase mb-0.5",children:"SHA-256"}),(0,a.jsx)("div",{className:"text-[10px] font-mono text-slate-600 break-all",children:s.hash})]})]})}function o(e){let{pack:t,onPackClick:s}=e,l=t.critical_count>0;return(0,a.jsxs)("div",{className:"p-4 border ".concat(l?"border-red-200 bg-red-50":"border-amber-200 bg-amber-50"),children:[(0,a.jsxs)("div",{className:"flex items-start justify-between",children:[(0,a.jsxs)("div",{children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 mb-1",children:[(0,a.jsx)("svg",{className:"w-4 h-4 ".concat(l?"text-red-600":"text-amber-600"),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),(0,a.jsx)("h3",{className:"text-sm font-semibold ".concat(l?"text-red-900":"text-amber-900"),children:"Forensics Evidence Pack"})]}),(0,a.jsx)("p",{className:"text-xs ".concat(l?"text-red-700":"text-amber-700"),children:t.summary})]}),(0,a.jsxs)("div",{className:"text-right",children:[(0,a.jsx)("div",{className:"text-[10px] text-slate-500 font-mono",children:t.pack_id}),(0,a.jsx)("div",{className:"text-[10px] text-slate-400 mt-0.5",children:new Date(t.created_at).toLocaleStr
1ing()})]})]}),(0,a.jsxs)("div",{className:"mt-3 flex items-center gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-slate-700",children:t.evidence_count}),(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"evidence items"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-red-700",children:t.critical_count}),(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"critical"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("span",{className:"text-xs font-semibold text-slate-700",children:t.contributing_evaluators.length}),(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"evaluators"})]}),t.integrity_hash&&(0,a.jsxs)("div",{className:"flex items-center gap-1",children:[(0,a.jsx)("svg",{className:"w-3 h-3 text-emerald-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})}),(0,a.jsx)("span",{className:"text-[10px] text-emerald-600",children:"Integrity verified"})]})]}),s&&(0,a.jsx)("button",{onClick:()=>s(t.pack_id),className:"mt-3 px-3 py-1.5 text-xs font-medium text-white bg-slate-800 hover:bg-slate-700 transition-colors",children:"View Full Evidence Pack"})]})}function x(e){let{signalsDetected:t,packsTriggered:s,forensicsMode:l}=e;return(null==t?void 0:t.length)||(null==s?void 0:s.length)?(0,a.jsxs)("div",{className:"p-3 border border-slate-200 bg-white",children:[(0,a.jsx)("h4",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Signal Routing Details"}),l&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"Forensics Mode: "}),(0,a.jsx)("span",{className:"text-[10px] font-mono text-slate-700 px-1 py-0.5 bg-slate-100",children:l})]}),t&&t.length>0&&(0,a.jsxs)("div",{className:"mb-2",children:[(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"Signals Detected: "}),(0,a.jsx)("div",{className:"flex items-center gap-1 flex-wrap mt-1",children:t.map(e=>(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-purple-50 text-purple-700 border border-purple-200",children:e},e))})]}),s&&s.length>0&&(0,a.jsxs)("div",{children:[(0,a.jsx)("span",{className:"text-[10px] text-slate-500",children:"Packs Triggered: "}),(0,a.jsx)("div",{className:"flex items-center gap-1 flex-wrap mt-1",children:s.map(e=>(0,a.jsx)("span",{className:"px-1.5 py-0.5 text-[9px] font-medium bg-blue-50 text-blue-700 border border-blue-200",children:e},e))})]})]}):null}function m(e){let{results:t}=e,s=t.filter(e=>!e.passed||e.hard_fail_triggered);return 0===s.length?null:(0,a.jsxs)("div",{className:"border border-slate-200 bg-white p-3",children:[(0,a.jsxs)("h4",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:["Evaluator-Level Evidence (",s.length," flagged)"]}),(0,a.jsx)("div",{className:"space-y-2",children:s.map(e=>{var t;return(0,a.jsx)("div",{className:"p-2 border ".concat(e.hard_fail_triggered?"border-red-200 bg-red-50":"border-amber-200 bg-amber-50"),children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs text-slate-800",children:(0,i.t8)(null!=(t=e.evaluator)?t:"")}),e.hard_fail_triggered&&(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] font-bold bg-red-200 text-red-800",children:"HARD FAIL"}),!e.passed&&!e.hard_fail_triggered&&(0,a.jsx)("span",{className:"px-1 py-0.5 text-[9px] font-bold bg-amber-200 text-amber-800",children:"FAILED"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Score:"," ","number"==typeof e.score?e.score.toFixed(2):e.score]}),(0,a.jsxs)("span",{className:"text-[10px] text-slate-500",children:["Confidence: ",(100*e.confidence).toFixed(0),"%"]})]})]})},e.evaluator)})})]})}function h(e){let{evidencePack:t,evaluationData:s,loading:l=!1,onPackClick:n}=e,[h,p]=(0,r.useState)("evidence"),u=(0,r.useCallback)(e=>{null==n||n(e)},[n]);return l?(0,a.jsx)("div",{className:"p-6",children:(0,a.jsxs)("div",{className:"animate-pulse space-y-4",children:[(0,a.jsx)("div",{className:"h-20 bg-slate-200"}),(0,a.jsx)("div",{className:"h-8 bg-slate-200 w-1/3"}),(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsx)("div",{className:"h-16 bg-slate-200"}),(0,a.jsx)("div",{className:"h-16 bg-slate-200"}),(0,a.jsx)("div",{className:"h-16 bg-slate-200"})]})]})}):t||(null==s?void 0:s.forensics_triggered)?(0,a.jsxs)("div",{className:"space-y-4",children:[t&&(0,a.jsx)(o,{pack:t,onPackClick:u}),(0,a.jsx)(x,{signalsDetected:null==s?void 0:s.signals_detected,packsTriggered:null==s?void 0:s.packs_triggered,forensicsMode:null==s?void 0:s.forensics_mode}),(0,a.jsx)("div",{className:"flex items-center border-b border-slate-200",children:["evidence","evaluators","details"].map(e=>(0,a.jsx)("button",{onClick:()=>p(e),className:"px-4 py-2 text-xs font-medium border-b-2 transition-colors ".concat(h===e?"border-blue-500 text-blue-600":"border-transparent text-slate-500 hover:text-slate-700"),
1children:"evidence"===e?"Key Evidence".concat(t?" (".concat(t.key_evidence.length,")"):""):"evaluators"===e?"Evaluator Results":"Full Details"},e))}),"evidence"===h&&t&&(0,a.jsxs)("div",{className:"space-y-2",children:[t.key_evidence.length>0?t.key_evidence.map((e,t)=>(0,a.jsx)(d,{item:e,index:t},e.evidence_id)):(0,a.jsx)("div",{className:"p-4 border border-slate-200 bg-white text-center",children:(0,a.jsx)("p",{className:"text-xs text-slate-500",children:"No key evidence items in this pack"})}),t.contributing_evaluators.length>0&&(0,a.jsxs)("div",{className:"p-3 border border-slate-200 bg-white",children:[(0,a.jsx)("h4",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Contributing Evaluators"}),(0,a.jsx)("div",{className:"flex items-center gap-1 flex-wrap",children:t.contributing_evaluators.map(e=>(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] bg-blue-50 text-blue-700 border border-blue-200",children:(0,i.t8)(e)},e))})]}),t.categories.length>0&&(0,a.jsxs)("div",{className:"p-3 border border-slate-200 bg-white",children:[(0,a.jsx)("h4",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Evidence Categories"}),(0,a.jsx)("div",{className:"flex items-center gap-1 flex-wrap",children:t.categories.map(e=>{let t=c(e);return(0,a.jsx)("span",{className:"px-2 py-0.5 text-[10px] font-medium ".concat(t.bg," ").concat(t.text," border border-slate-200"),children:t.label},e)})})]})]}),"evaluators"===h&&(null==s?void 0:s.results)&&(0,a.jsx)(m,{results:s.results}),"details"===h&&t&&(0,a.jsxs)("div",{className:"p-3 border border-slate-200 bg-white",children:[(0,a.jsx)("h4",{className:"text-xs font-bold text-slate-700 uppercase tracking-wide mb-2",children:"Evidence Pack Details"}),(0,a.jsx)("div",{className:"bg-slate-900 text-slate-100 p-4 overflow-x-auto max-h-[400px]",children:(0,a.jsx)("pre",{className:"text-[10px] font-mono whitespace-pre-wrap",children:JSON.stringify({pack_id:t.pack_id,version:t.version,created_at:t.created_at,run_id:t.run_id,evidence_count:t.evidence_count,critical_count:t.critical_count,categories:t.categories,contributing_evaluators:t.contributing_evaluators,integrity_hash:t.integrity_hash,retention_policy:t.retention_policy,findings_count:t.findings.length,evaluator_results_count:t.evaluator_results.length},null,2)})})]})]}):(0,a.jsxs)("div",{className:"p-6 border border-slate-200 bg-white text-center",children:[(0,a.jsx)("svg",{className:"w-10 h-10 text-slate-300 mx-auto mb-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,a.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"})}),(0,a.jsx)("p",{className:"text-sm text-slate-500",children:"No forensics evidence available for this evaluation"}),(0,a.jsx)("p",{className:"text-xs text-slate-400 mt-1",children:"Forensics evidence is generated 
1when evaluations trigger BLOCK or FAIL verdicts"})]})}},96871:(e,t,s)=>{s.d(t,{A:()=>a});let a=(0,s(45105).A)("ShieldX",[["path",{d:"M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10",key:"1irkt0"}],["path",{d:"m14.5 9-5 5",key:"1m49dw"}],["path",{d:"m9.5 9 5 5",key:"wyx7zg"}]])}}]);

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.