1import{o as R,a as g,g as A,p as B,j as e}from"./react-vendor-DBxhyi1n.js";import{e as T,aa as u,a8 as y,S as v,p as f,B as E,k as L,b as N}from"./index-CSyO7D9J.js";import{C as b,c as _,a as V,b as z}from"./card-bfZEUetg.js";import{T as I,a as Q,b as h,c as i,d as D,e as l}from"./table-CxTDt-NZ.js";import{B as k}from"./badge-BIz0NTZj.js";import{S as M,a as w,b as S,c as C,d as c}from"./select-DyIPON2t.js";import{R as K}from"./rotate-ccw-BSw-gdPJ.js";import"./index-D0PqiZ_3.js";import"./chevron-up-DQYC2RIz.js";/** 2 * @license lucide-react v0.462.0 - ISC 3 * 4 * This source code is licensed under the ISC license. 5 * See the LICENSE file in the root directory of this source tree. 6 */const P=T("FileWarning",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 7 * @license lucide-react v0.462.0 - ISC 8 * 9 * This source code is licensed under the ISC license. 10 * See the LICENSE file in the root directory of this source tree. 11 */const W=T("Fingerprint",[["path",{d:"M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4",key:"1nerag"}],["path",{d:"M14 13.12c0 2.38 0 6.38-1 8.88",key:"o46ks0"}],["path",{d:"M17.29 21.02c.12-.6.43-2.3.5-3.02",key:"ptglia"}],["path",{d:"M2 12a10 10 0 0 1 18-6",key:"ydlgp0"}],["path",{d:"M2 16h.01",key:"1gqxmh"}],["path",{d:"M21.8 16c.2-2 .131-5.354 0-6",key:"drycrb"}],["path",{d:"M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2",key:"1tidbn"}],["path",{d:"M8.65 22c.21-.66.45-1.32.57-2",key:"13wd9y"}],["path",{d:"M9 6.8a6 6 0 0 1 9 5.2v2",key:"1fr1j5"}]]),Y={build_id_mismatch:{label:"ÐопиÑан билд",icon:W,hint:"ФайловеÑе ноÑÑÑ ÑÑжд build_id â веÑоÑÑно копиÑано инÑÑалиÑане Ð¾Ñ Ð´ÑÑг лиÑенз"},integrity_mismatch:{label:"Сменени Ñайлове",icon:P,hint:"files_hash не ÑÑвпада Ñ Ð¾ÑÐ°ÐºÐ²Ð°Ð½Ð¸Ñ Ð·Ð° веÑÑиÑÑа â лиÑенз-кÑиÑиÑен Ñайл е ÑедакÑиÑан"}},j=(n,r=14)=>n?n.length>r?n.slice(0,r)+"â¦":n:"â";function ae(){const n=R(),[r,F]=g.useState("all"),[o,H]=g.useState("false"),{data:a,isLoading:m}=A({queryKey:["security-events",r,o],queryFn:()=>N.get("/admin/security/events?page=1&limit=100"+(r!=="all"?`&type=${r}`:"")+(o!=="all"?`&resolved=${o}`:""))}),{mutate:$,isPending:q}=B({mutationFn:s=>N.patch(`/admin/security/events/${s.id}`,{resolved:s.resolved}),onSuccess:()=>n.invalidateQueries({queryKey:["security-events"]})}),p=(a==null?void 0:a.data)??[];return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(u,{className:"h-6 w-6 text-primary"}),e.jsx("h2",{className:"text-2xl font-bold",children:"СигÑÑноÑÑ"})]}),e.jsx(k,{variant:"secondary",className:"text-xs",children:"Anti-piracy"})]}),e.jsx("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-4",children:[{icon:y,label:"ÐÑвоÑени Ñигнали",value:m?null:((a==null?void 0:a.unresolved)??0).toLocaleString(),accent:((a==null?void 0:a.unresolved)??0)>0},{icon:u,label:"ÐбÑо запиÑани",value:m?null:((a==null?void 0:a.grand_total)??0).toLocaleString()}].map(({icon:s,label:t,value:d,accent:x})=>e.jsx(b,{children:e.jsxs(_,{className:"p-4 flex items-start gap-3",children:[e.jsx("div",{className:`mt-0.5 p-2 rounded-md ${x?"bg-destructive/10":"bg-muted"}`,children:e.jsx(s,{className:`h-4 w-4 ${x?"text-destructive":"text-muted-foreground"}`})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:t}),d===null?e.jsx(v,{className:"h-5 w-12 mt-1"}):e.jsx("p",{className:`text-xl font-bold leading-tight ${x?"text-destructive":""}`,children:d})]})]})},t))}),e.jsxs(b,{children:[e.jsx(V,{children:e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx(z,{className:"text-base",children:"ÐнÑи-пиÑаÑÑки ÑÑбиÑиÑ"}),e.jsxs("div",{className:"flex gap-2 ml-auto",children:[e.jsxs(M,{value:r,onValueChange:F,children:[e.jsx(w,{className:"h-8 w-44",children:e.jsx(S,{})}),e.jsxs(C,{children:[e.jsx(c,{value:"all",children:"ÐÑиÑки Ñипове"}),e.jsx(c,{value:"build_id_mismatch",children:"ÐопиÑан билд"}),e.jsx(c,{value:"integrity_mismatch",children:"Сменени Ñайлове"})]})]}),e.jsxs(M,{value:o,onValueChange:H,children:[e.jsx(w,{className:"h-8 w-36",children:e.jsx(S,{})}),e.jsxs(C,{children:[e.jsx(c,{value:"false",children:"ÐÑвоÑени"}),e.jsx(c,{value:"true",children:"ÐаÑвоÑени"}),e.jsx(c,{value:"all",children:"ÐÑиÑки"})]})]})]})]})}),e.jsx(_,{className:"p-0",children:e.jsxs(I,{children:[e.jsx(Q,{children:e.jsxs(h,{children:[e.jsx(i,{children:"Тип"}),e.jsx(i,{children:"Ðомейн"}),e.jsx(i,{children:"ÐиÑенз"}),e.jsx(i,{children:"ÐеÑÑиÑ"}),e.jsx(i,{children:"Ðодаден / ÐÑакван"}),e.jsx(i,{className:"text-right",children:"ÐÑой"}),e.jsx(i,{children:"ÐоÑледно"}),e.jsx(i,{className:"text-right",children:"ÐейÑÑвие"})]})}),e.jsx(D,{children:m?Array.from({length:5}).map((s,t)=>e.jsx(h,{children:Array.from({length:8}).map((d,x)=>e.jsx(l,{children:e.jsx(v,{className:"h-4 w-full"})},x))},t)):p.length===0?e.jsx(h,{children:e.jsxs(l,{colSpan:8,className:"text-center text-muted-foreground py-10",children:[e.jsx(u,{className:"h-8 w-8 mx-auto mb-2 opacity-30"}),"ÐÑма Ñигнали â ниÑо подозÑиÑелно не е докладвано"]})}):p.map(s=>{const t=Y[s.event_type],d=(t==null?void 0:t.icon)??y;return e.jsxs(h,{className:s.resolved?"opacity-50":"",children:[e.jsx(l,{children:e.jsxs("div",{className:"flex items-center gap-1.5",title:t==null?void 0:t.hint,children:[e.jsx(d,{className:"h-3.5 w-3.5 text-destructive"}),e.jsx("span",{className:"text-sm",children:(t==null?void 0:t.label)??s.event_type})]})}),e.jsx(l,{className:"font-mono text-sm",children:s.domain||"â"}),e.jsx(l,{className:"font-mono text-xs text-muted-foreground",title:s.license_key,children:j(s.license_key,10)}),e.jsx(l,{className:"text-sm text-muted-foreground",children:s.plugin_version||"â"}),e.jsxs(l,{className:"font-mono text-xs text-muted-foreground",children:[e.jsxs("div",{title:s.presented,children:["⪠",j(s.presented)]}),e.jsxs("div",{title:s.expected??"",className:"opacity-60",children:["â ",j(s.expected)]})]}),e.jsx(l,{className:"text-right tabular-nums",children:s.seen_count>1?e.jsxs(k,{variant:"destructive",children:[s.seen_count,"Ã"]}):s.seen_count}),e.jsx(l,{className:"text-muted-foreground text-sm",title:`ÐÑÑво: ${f(new Date(s.first_seen),"dd.MM.yyyy HH:mm")}`,children:f(new Date(s.last_seen),"dd.MM.yyyy HH:mm")}
11),e.jsx(l,{className:"text-right",children:e.jsx(E,{size:"sm",variant:"ghost",className:"h-7",disabled:q,onClick:()=>$({id:s.id,resolved:!s.resolved}),children:s.resolved?e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"h-3.5 w-3.5 mr-1"}),"ÐÑвоÑи"]}):e.jsxs(e.Fragment,{children:[e.jsx(L,{className:"h-3.5 w-3.5 mr-1"}),"ÐаÑвоÑи"]})})})]},s.id)})})]})})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["СигналиÑе Ñа ",e.jsx("strong",{children:"Ñамо за инÑоÑмаÑиÑ"}),' â ниÑо не Ñе блокиÑа авÑомаÑиÑно. âÐопиÑан билд" = ÑайловеÑе ноÑÑÑ build_id Ð¾Ñ Ð´ÑÑг лиÑенз. âСменени Ñайлове" = ÑедакÑиÑан лиÑенз-кÑиÑиÑен Ñайл.']})]})}export{ae 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.