1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2777,6198],{40028:function(e,t,l){l.d(t,{Z:function(){return n}});var a=l(13289);/** 2 * @license lucide-react v0.378.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 */let n=(0,a.Z)("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]])},99124:function(e,t,l){var a=l(52322),n=l(59877),s=l(5789),r=l(83808);let i=e=>{let{collapsed:t,onToggle:l,floating:i=!1,className:o=""}=e,{t:d}=(0,n.$G)(["common"]);if(i&&!t)return null;let c=i&&t;return(0,a.jsxs)("button",{type:"button",onClick:l,title:d(t?"w-000428":"w-002016"),className:"flex shrink-0 items-center rounded-full bg-[#F4F3EF] text-[#48483f] hover:bg-[#eae8e0] ".concat(c?"gap-[4px] px-[12px] py-[6px] text-[13px] font-[500]":"justify-center p-[6px]"," ").concat(i?"absolute left-[16px] top-[18px] z-10 shadow-sm":""," ").concat(o),children:[c&&(0,a.jsx)("span",{children:d("w-000428")}),t?(0,a.jsx)(s.Z,{className:"h-[18px] w-[18px]"}):(0,a.jsx)(r.Z,{className:"h-[18px] w-[18px]"})]})};t.Z=i},82954:function(e,t,l){l.d(t,{u:function(){return lC}});var a,n,s=l(52322),r=l(2784),i=l(59877),o=l(5632),d=l(50154),c=l(13289);/** 7 * @license lucide-react v0.378.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 */let x=(0,c.Z)("LayoutGrid",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]]),p=(0,c.Z)("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]),u=(0,c.Z)("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);var m=l(99124),h=l(82098),b=l(3255),f=l(31518);let g=e=>{let{data:t,error:l,isLoading:a,mutate:n}=(0,b.ZP)(e?["/shield/detection/stats",e]:null,()=>(0,f.bd)(null!=e?e:{}));return{stats:null!=t?t:null,isLoading:a,error:l,mutate:n}},v=e=>{let{index:t,page:l}=e;return t<0?{kind:"none"}:t>0?{kind:"same-page",index:t-1}:l>1?{kind:"cross-page",page:l-1,edge:"last"}:{kind:"none"}},j=e=>{let{index:t,count:l,page:a,totalPages:n}=e;return t<0?{kind:"none"}:t<l-1?{kind:"same-page",index:t+1}:a<n?{kind:"cross-page",page:a+1,edge:"first"}:{kind:"none"}},w=e=>"none"!==e.kind,y=e=>{let{rows:t,target:l,setTarget:a,page:n,setPage:s,loadedPage:i,totalPages:o,resetKey:d}=e,c=(0,r.useMemo)(()=>l?t.findIndex(e=>e.id===l.id):-1,[t,l]),x=(0,r.useRef)(null);(0,r.useEffect)(()=>{x.current=null},[d]),(0,r.useEffect)(()=>{if(!x.current||i!==n)return;let e=x.current;x.current=null,0!==t.length&&a("first"===e?t[0]:t[t.length-1])},[i,n,t,a]);let p={index:c,count:t.length,page:n,totalPages:o},u=v(p),m=j(p),h=e=>{"same-page"===e.kind?a(t[e.index]):"cross-page"===e.kind&&(x.current=e.edge,s(e.page))};return{hasPrev:w(u),hasNext:w(m),goPrev:()=>h(u),goNext:()=>h(m),cancelPending:()=>{x.current=null}}};var N=l(4864),E=l(24347),F=l(9662),k=l(47123);let C=function(e,t,l){let a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],n=0,s=0,r=0,i=[];for(let o of e){if(12!==o.status){n+=1;continue}if((0,F.U)(o,l).lockedByOther){r+=1;continue}if(!a&&(0,k.jZ)(o.signals)){s+=1;continue}i.push(o.id)}let d=Number.isFinite(t)&&t>0?Math.floor(t):0;return{ids:i.slice(0,d),skippedNotReady:n,skippedDone:s,skippedClaimed:r,overCap:Math.max(0,i.length-d)}},_=()=>({suspicious:0,unrelated:0,unclear:0,failed:0,moved:0}),D=e=>"ìì¬ ".concat(e.suspicious," \xb7 ë¬´ê´ ").concat(e.unrelated," \xb7 íì ë¶ê° ").concat(e.unclear," \xb7 ì¤í¨ ").concat(e.failed)+" (ë¨ê³ ì´ë ".concat(e.moved,"ê±´ \xb7 ì ì리 ").concat(e.suspicious+e.unrelated+e.unclear-e.moved,"ê±´)"),A=async e=>{let t=_();for(let[l,a]of e.ids.entries()){var n;if(e.isCancelled())return{tally:t,stopped:!0};try{let s=await e.judge(a);t[s.verdict]+=1,s.moved&&(t.moved+=1)}catch(r){t.failed+=1}null===(n=e.onProgress)||void 0===n||n.call(e,l+1,e.ids.length)}return{tally:t,stopped:!1}},B=e=>{var t;let{user:l,refresh:a,onJudged:n}=e,[s,i]=(0,r.useState)(!1),[o,d]=(0,r.useState)(null),[c,x]=(0,r.useState)(null),[p,u]=(0,r.useState)(null),[m,h]=(0,r.useState)(""),[b,g]=(0,r.useState)(20),[v,j]=(0,r.useState)(null),[w,y]=(0,r.useState)(null),F=(0,r.useRef)(!1);(0,r.useEffect)(()=>{let e=!1;return(0,f.SI)().then(t=>{var l;e||(i(t.llm_enabled),h(t.llm_model),g(null!==(l=t.llm_bulk_max)&&void 0!==l?l:20))}).catch(()=>void 0),()=>{e=!0}},[]),(0,r.useEffect)(()=>()=>{F.current=!0},[]);let k=async e=>{d(e),x(null);try{let t=await (0,f.$T)(e);n(t.detection),u({id:e,verdict:t.verdict}),await a()}catch(l){x((0,N.s)(l,"AI íì ì ì¤í¨íìµëë¤."))}finally{d(null)}},C=async e=>{if(0===e.length)return;F.current=!1,x(null),y(null),j({done:0,total:e.length});let{tally:t,stopped:l}=await A({ids:e,judge:async e=>{let t=await (0,f.$T)(e);return{verdict:t.verdict.verdict,moved:t.verdict.moved}},isCancelled:()=>F.current,onProgress:(e,t)=>j({done:e,total:t})});j(null),y("".concat(l?"ì¤ë¨ë¨ \xb7 ":"").concat(D(t)).concat(t.failed>0?" \xb7 ì¤í¨í ê±´ì ìíê° ê·¸ëë¡ì ëë¤":"")),await a()},_=s&&(0,E.XJ)(l)?{cap:b,model:m,myEmail:null!==(t=null==l?void 0:l.email)&&void 0!==t?t:null,onRun:e=>void C(e),onCancel:()=>{F.current=!0},progress:v}:void 0,B=(0,r.useCallback)(()=>u(null),[]);return{llmEnabled:s,llmJudgingId:o,llmResult:p,clearLlmResult:B,llmError:c,setLlmError:x,llmBulk:_,llmBulkSummary:w,setLlmBulkSummary:y,runLlmJudge:k,runLlmBulk:C}};var S=l(68941);let M=()=>{let[e,t]=(0,r.useState)(new Set),l=(0,r.useRef)(null),a=(0,r.useRef)(null);
11return{selected:e,setSelected:t,anchorRef:l,preselectAppliedRef:a}},L=e=>{let{detections:t,statusFilter:l,activeId:a,preselectId:n,isLoading:s,pageSize:i,onBulkStatusChange:o,store:d}=e,c=(0,r.useMemo)(()=>l?t.filter(e=>l.includes(e.status)):t,[t,l]),[x,p]=(0,r.useState)(1),u=M(),{selected:m,setSelected:h,anchorRef:b,preselectAppliedRef:f}=null!=d?d:u,[g,v]=(0,r.useState)(null),j=(0,r.useCallback)(e=>{v(t=>t===e?t:e)},[]);(0,r.useEffect)(()=>{s||h(e=>{if(0===e.size)return e;let t=new Set([...e].filter(e=>c.some(t=>t.id===e)));return t.size===e.size?e:t})},[c,s,h]),(0,r.useEffect)(()=>{null!=n&&f.current!==n&&c.some(e=>e.id===n)&&(f.current=n,h(e=>e.has(n)?e:new Set(e).add(n)))},[n,c,f,h]),(0,r.useEffect)(()=>{if(null==a)return;let e=c.findIndex(e=>e.id===a);if(e<0)return;j(a);let t=Math.floor(e/i)+1;p(e=>e===t?e:t)},[a,c,i,j]);let w=Math.max(1,Math.ceil(c.length/i));(0,r.useEffect)(()=>{p(e=>Math.min(e,w))},[w]);let y=c.slice((x-1)*i,x*i),N=y.length>0&&y.every(e=>m.has(e.id)),E=y.reduce((e,t)=>m.has(t.id)?e+1:e,0),F=(0,r.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2?arguments[2]:void 0,a=null!=l?l:y.map(e=>e.id);h(l=>{let n=(0,S.Z)(l,a,b.current,e,t);return b.current=n.anchorId,n.selected})},[y,b,h]),k=(0,r.useCallback)(()=>{h(e=>{let t=new Set(e),l=y.length>0&&y.every(e=>t.has(e.id));return y.forEach(e=>l?t.delete(e.id):t.add(e.id)),t})},[y,h]),C=(0,r.useCallback)((e,t)=>{0!==m.size&&o&&(o([...m],e,t),h(new Set))},[m,o]);return{rows:c,page:x,setPage:p,totalPages:w,pageRows:y,selected:m,currentId:g,markCurrent:j,toggleRow:F,allPageSelected:N,pageSelectedCount:E,togglePageSelection:k,runBulk:C}},z="wgf-shield-filter-panel-collapsed",Z=()=>{let e=window.localStorage.getItem(z);return"1"===e},I=()=>{let[e,t]=(0,r.useState)(Z),l=()=>{t(e=>{let t=!e;try{window.localStorage.setItem(z,t?"1":"0")}catch(l){}return t})};return{collapsed:e,toggle:l}};var P=l(79087);let R=(e,t)=>{let l=null!=t?t:0;return"high"===e?l>=.85:"medium"===e?l>=.7&&l<.85:l>0&&l<.7},O=(e,t,l)=>e.filter(e=>!!(("all"===l||l.includes(e.status))&&(!(t.confidenceLevels.length>0)||t.confidenceLevels.some(t=>R(t,e.confidence))))),T=(e,t,l)=>{let a=[],n=0,s=0;for(let r of e){if(void 0!==t&&void 0!==r.status&&r.status===t){n+=1;continue}if((0,F.U)(r,l).lockedByOther){s+=1;continue}a.push(r.id)}return{ids:a,skippedSameStage:n,skippedClaimed:s}},J=(e,t)=>void 0===t||e.some(e=>void 0===e.status||e.status!==t),U=["marketplace","social_media","ads","apps"],H=["maps"],Y=e=>U.includes(e),K=e=>H.includes(e);var q=l(62894),G=l(60513),W=l(92150),X=l(32791);let V=e=>{let t=new Set,l=new Set;for(let a of e){for(let[n,s]of Object.entries(X.u))s===a&&t.add(n);for(let[r,i]of W.Xq)i===a&&l.add(r);t.add(a),l.add(a)}return{keys:[...t],hosts:[...l]}},$={all:null,"24h":1,"72h":3,"7d":7,"14d":14,"30d":30},Q=e=>{let t=$[e];if(null!=t)return(0,G.Z)().subtract(t,"day").format("YYYY-MM-DD")},ee=e=>{let{channel:t,filter:l,search:a,dateField:n}=e,s={channel:t},r=a.trim();r&&(s.search=r);let i=Q(l.dateRange);if(i&&(s.date_from=i),n&&(s.date_field=n),l.statuses.length>0&&(s.filter_status_in=l.statuses.join(",")),l.tags.length>0&&(s.tags_in=JSON.stringify(l.tags),s.tag_mode=l.tagMode),l.hasMemo&&(s.has_memo=!0),l.platforms.length>0){let o=V(l.platforms);s.platform_keys=JSON.stringify(o.keys),s.platform_hosts=JSON.stringify(o.hosts)}return s},et=new Set(["channel","date_field"]),el=e=>Object.entries(e).some(e=>{let[t,l]=e;return!et.has(t)&&void 0!==l});var ea=l(48761),en=l(21821);let es=e=>Array.isArray(e)?[...e].map(String).sort():e,er=e=>{let{debouncedSearch:t,filter:l,viewMode:a,channel:n,stage:s,pageSize:r,exitFrom:i}=e,o=Object.keys(l).filter(e=>"search"!==e).sort().map(e=>"".concat(e,"=").concat(JSON.stringify(es(l[e])))).join("&");return[t,a,n,s,String(r),(null!=i?i:[]).join(","),o].join("|")},ei=[10,25,50,100],eo=e=>{if("number"!=typeof e||!Number.isFinite(e))return 50;let t=ei[0],l=ei[ei.length-1];return e<t?t:e>l?l:e},ed=e=>{let{isMapView:t,pageSize:l}=e;return t?100:eo(l)},ec=(e,t)=>{let l={};if(!e)return l;for(let[a,n]of Object.entries(e)){var s;let r=(0,X.s)({channel:t,raw_data:JSON.stringify({xl_01_sitename:a}),source_url:"https://".concat(a)});r&&"-"!==r&&(l[r]=(null!==(s=l[r])&&void 0!==s?s:0)+n)}return l},ex=(e,t,l)=>{var a,n;let s=null!==(a=(0,ea.a0)(t).find(t=>t.key===e))&&void 0!==a?a:(0,ea.HO)(l).find(t=>t.key===e);return null!==(n=null==s?void 0:s.statuses)&&void 0!==n?n:[]};var ep=l(84418),eu=l(60998);let em=["unprocessed","ai_review","ai_deep_review","fake_check","confirmed","closed"],eh=new Map;em.forEach((e,t)=>{let l=ea.xo[e];if("all"!==l)for(let a of l)eh.set(a,t)});let eb=new Set("all"===ea.xo.unrelated?[]:ea.xo.unrelated),ef=em.indexOf("closed"),eg=[0,12,13,2,4,3],ev=e=>{if(null==e)return null;let t=eh.get(e);return void 0===t?null:t},ej=e=>null!=e&&eb.has(e),ew=(e,t)=>{if(null==e||null==t||e===t)return!1;let l=ev(t);if(null===l)return!1;if(ej(e))return l<ef;let a=ev(e);return null!==a&&l<a};var ey=l(23793),eN=l(86021),eE=l(16097),eF=l(56839),ek=l(88724),eC=l(18417);let e_=e=>{if("string"!=typeof e)return null;let t=e.trim();return t||null},eD=e=>{let t=(null!=e?e:"").trim();if(!t)return null;let l=t.replace(/^[a-zA-Z][a-zA-Z0-9+.-]*:\/\//,"");l=l.split(/[/?#]/)[0];let a=l.lastIndexOf("@");return a>=0&&(l=l.slice(a+1)),(l=l.replace(/:\d+$/,"").toLowerCase().replace(/^www\./,"").replace(/\.+$/,""))||null},eA=(e,t)=>
11!e||!t||e===t||e.endsWith(".".concat(t))||t.endsWith(".".concat(e)),eB={brand:"ë¸ëëê²ì",powerlink:"íìë§í¬",shopping:"ì¼íê²ì",place:"íë ì´ì¤",power_contents:"íì컨í
ì¸ ",premium:"í리미ìë§í¬",special:"ì¤íì
ë§í¬",google_search_ads:"êµ¬ê¸ ê²ìê´ê³ "},eS=e=>e?null!==(a=eB[e])&&void 0!==a?a:e:null,eM={nexearch:"íµí©ê²ì",ad_search:"ê²ìê´ê³ ",google_search:"êµ¬ê¸ ê²ì",daum_search:"ë¤ì íµí©ê²ì",daum_ad_search:"ë¤ì ê´ê³ ì ì©ë©´"},eL=e=>e?null!==(n=eM[e])&&void 0!==n?n:e:null,ez=e=>{var t,l,a,n;let s;if(!e)return null;try{s=JSON.parse(e)}catch(r){return null}if(!s||"object"!=typeof s)return null;let i=s.shield_ads,o=i&&"object"==typeof i?i:null,d=e_(s.xl_05_url),c=null!==(t=e_(null==o?void 0:o.link_title))&&void 0!==t?t:e_(s.xl_06_prod_name),x=null!==(l=e_(null==o?void 0:o.advertiser))&&void 0!==l?l:e_(s.xl_48_seller_name);if(!c&&!x)return null;let p=o?null!==(a=e_(o.landing_url))&&void 0!==a?a:d:null,u=o?e_(o.display_url):eD(d),m=eD(p),h=null==o?void 0:o.rank,b="number"==typeof h&&Number.isFinite(h)?h:null;return{advertiser:x,displayUrl:u,title:c,landingUrl:p,landingHost:m,openUrl:null!=p?p:d,landingConfirmed:null!=p,imageUrl:e_(s.xl_11_plimage),urlMismatch:!eA(eD(u),m),runPeriod:e_(null==o?void 0:o.run_period),adProduct:e_(null==o?void 0:o.ad_product),rank:b,surface:e_(null==o?void 0:o.surface),captureCard:e_(null==o?void 0:o.capture_card),captureSerp:e_(null==o?void 0:o.capture_serp),captureLanding:e_(null==o?void 0:o.capture_landing),capturedAt:null!==(n=e_(null==o?void 0:o.captured_at))&&void 0!==n?n:e_(s.captured_at)}};var eZ=l(28191);let eI=e=>"string"==typeof e?e.trim():"",eP=e=>{let t="number"==typeof e?e:"string"==typeof e?Number(e.trim()):NaN;return Number.isFinite(t)?t:null},eR=e=>{if(!e||"string"!=typeof e)return null;try{let t=JSON.parse(e);if(!t||"object"!=typeof t||Array.isArray(t))return null;return t}catch(l){return null}},eO=e=>{let t=eR(e);if(!t)return null;let l={placeName:eI(t.place_name)||eI(t.xl_06_prod_name),address:eI(t.road_address)||eI(t.address)||eI(t.road_address_name)||eI(t.address_name)||eI(t.xl_52_seller_address),phone:eI(t.phone)||eI(t.xl_51_seller_phone)};return l.placeName||l.address||l.phone?l:null},eT=e=>{var t;let l=eR(e);if(!l)return null;let a=eP(l.lat),n=eP(l.lng);if((null==a||null==n)&&(a=eP(l.y),n=eP(l.x)),null==a||null==n||a<-90||a>90||n<-180||n>180)return null;let s=null!==(t=eO(e))&&void 0!==t?t:{placeName:"",address:"",phone:""};return{lat:a,lng:n,...s}},eJ=e=>4===e||e>=6&&e<=10?"#CD6565":2===e?"#D98165":12===e||13===e?"#8B7BC8":"#9AA7BF",eU=(e,t)=>{let l=new Map;for(let a of e){let n="".concat(Math.floor(a.lat/t),":").concat(Math.floor(a.lng/t)),s=l.get(n);s?s.push(a):l.set(n,[a])}let r=[];for(let i of l.values()){let o={suspected:0,fake:0,reported:0},d=0,c=0;for(let x of i)d+=x.lat,c+=x.lng,12===x.status||13===x.status?o.suspected+=1:4===x.status||x.status>=6&&x.status<=10?o.fake+=1:2===x.status&&(o.reported+=1);r.push({lat:d/i.length,lng:c/i.length,seller_count:i.length,product_count:i.length,status_counts:o})}return r};var eH=l(73181),eY=l(10287),eK=l(96469);let eq=e=>{let{card:t}=e,[l,a]=(0,r.useState)(null),n=[t.captureCard&&{url:t.captureCard,label:"ê´ê³ í목",hint:"ê²ì ê²°ê³¼ì ì´ë ê² ë
¸ì¶ëìµëë¤",fit:"object-cover object-top"},t.captureLanding&&{url:t.captureLanding,label:"ëë© íì´ì§",hint:"ê´ê³ 를 ëë ì ë ëì°©íë íì´ì§",fit:"object-cover object-top"}].filter(Boolean);return 0===n.length?null:(0,s.jsxs)("div",{className:"rounded-[6px] border border-[#DEDECE] bg-white p-[12px]",children:[(0,s.jsxs)("div",{className:"mb-[8px] flex items-baseline gap-[8px]",children:[(0,s.jsx)("span",{className:"text-[12px] font-medium text-[#48483F]",children:"ìì§ ì¦ê±°"}),t.capturedAt&&(0,s.jsxs)("span",{className:"text-[11px] text-[#78786A]",children:[(0,G.Z)(t.capturedAt).format("YYYY-MM-DD HH:mm")," ê´ì¸¡"]})]}),(0,s.jsx)("div",{className:"flex flex-wrap gap-[10px]",children:n.map(e=>(0,s.jsxs)("button",{type:"button",onClick:()=>a({url:e.url,caption:e.hint}),title:e.hint,className:"group w-[128px] shrink-0 text-left focus:outline-none",children:[(0,s.jsx)("div",{className:"h-[86px] w-full overflow-hidden rounded border border-[#DEDECE] bg-white transition-colors group-hover:border-[#10B981] group-focus-visible:border-[#10B981]",children:(0,s.jsx)("img",{src:e.url,alt:e.label,loading:"lazy",className:"h-full w-full ".concat(e.fit)})}),(0,s.jsx)("div",{className:"mt-[4px] truncate text-[11px] text-[#48483F]",children:e.label})]},e.url))}),(0,s.jsx)("p",{className:"mt-[8px] text-[11px] text-[#B8B8A8]",children:"í´ë¦íë©´ ì본 í¬ê¸°ë¡ ì´ë¦½ëë¤. ê´ê³ ë ë
¸ì¶ë§ë¤ ë°ëì´ ë¤ì ì°¾ì§ ëª»í ì ììµëë¤."}),(0,s.jsx)(eK.S,{target:l,onClose:()=>a(null)})]})},eG=e=>{var t,l;let{data:a,error:n,isLoading:s,mutate:r}
11=(0,b.ZP)(e?["/shield/detection/caselog",e]:null,()=>(0,f.Bq)(e));return{entries:null!==(t=null==a?void 0:a.list)&&void 0!==t?t:[],truncated:null!==(l=null==a?void 0:a.truncated)&&void 0!==l&&l,isLoading:s,error:n,mutate:r}},eW={created:{label:"ë°ê²¬ ë±ë¡",color:"bg-[#F4F3EF] text-[#78786A]"},reviewed:{label:"ìí ë³ê²½",color:"bg-[#E0F0FE] text-[#0068C9]"},memo:{label:"ë©ëª¨",color:"bg-[#FFF6E0] text-[#D98165]"},claim:{label:"ê²í ì ì ",color:"bg-[#E3E0FE] text-[#4B3CC9]"},release:{label:"ì ì í´ì ",color:"bg-[#F4F3EF] text-[#7d7d6f]"},merged:{label:"ì¤ë³µ ì ì",color:"bg-[#F4F3EF] text-[#78786A]"},created_allowed:{label:"ë°ê²¬ ë±ë¡ \xb7 리ì¤í¸ ìë ì¢
ê²°",color:"bg-[#EEF6E9] text-[#6B9F46]"},created_flagged:{label:"ë°ê²¬ ë±ë¡ \xb7 리ì¤í¸ ìë ì¹ê²©",color:"bg-[#E7F0FE] text-[#2F6BC4]"},promoted:{label:"AI ê²í ë¡ ëê¹",color:"bg-[#E7F0FE] text-[#2F6BC4]"},escalated:{label:"AI ì¬ëê²í ë¡ ì¹ê²©",color:"bg-[#E3E0FE] text-[#4B3CC9]"},closed:{label:"ì ì/무ê´",color:"bg-[#EEF6E9] text-[#6B9F46]"},flagged:{label:"íì¸íì",color:"bg-[#FFF6E0] text-[#D98165]"},reported:{label:"ì ê³ ìì²",color:"bg-[#FCE7E5] text-[#CD6565]"},blocked:{label:"ì°¨ë¨ìë£",color:"bg-[#EEF6E9] text-[#3F7A2E]"},reverted:{label:"AI ê²í ì·¨ì",color:"border border-[#DEDECE] bg-white text-[#7d7d6f]"},demoted:{label:"AI ì¬ëê²í ì·¨ì",color:"border border-[#DEDECE] bg-white text-[#7d7d6f]"}},eX=e=>{let t=eW[e];return t||{label:e||"기í",color:"bg-[#F4F3EF] text-[#78786A]"}},eV=e=>{let t=e.from_status,l=e.to_status;return null==t||null==l||t===l?null:{from:t,to:l,backward:ew(t,l)}},e$=e=>{let t=(null!=e?e:"").trim();if(!t)return"-";if(t.startsWith("hjy_omsp"))return"ìì¤í
";let l=t.indexOf("@");return l>0?t.slice(0,l):t},eQ=e=>{let{status:t}=e,l=(0,ey.c)(t);return(0,s.jsx)("span",{className:"inline-block whitespace-nowrap rounded px-[6px] py-[1px] text-[10px] font-medium ".concat(l.color),children:l.label})},e0=e=>{let{detectionId:t,currentStatus:l,onRevert:a}=e,{entries:n,truncated:i,isLoading:o,error:d}=eG(t),c=r.useMemo(()=>{if(!a||void 0===l)return null;for(let e=n.length-1;e>=0;e-=1){let t=eV(n[e]);if(t)return t.to===l?{id:n[e].id,to:t.from}:null}return null},[n,l,a]);return(0,s.jsxs)("div",{className:"mt-[16px] rounded border border-[#DEDECE] bg-[#FAFAF6] px-[12px] py-[10px]",children:[(0,s.jsx)("div",{className:"mb-[6px] text-[11px] font-medium text-[#48483F]",children:"ì²ë¦¬ ì´ë ¥"}),o&&(0,s.jsx)("div",{className:"text-[11px] text-[#B9B9A5]",children:"ë¶ë¬ì¤ë ì¤â¦"}),!o&&d&&(0,s.jsx)("div",{className:"text-[11px] text-[#CD6565]",children:"ì´ë ¥ì ë¶ë¬ì¤ì§ 못íìµëë¤."}),!o&&!d&&0===n.length&&(0,s.jsx)("div",{className:"text-[11px] text-[#B9B9A5]",children:"ìì§ ê¸°ë¡ë ì´ë ¥ì´ ììµëë¤."}),!o&&!d&&n.length>0&&(0,s.jsx)("ol",{className:"flex flex-col gap-[6px]",children:n.map(e=>{var t;let l=eX(e.action),n=eV(e);return(0,s.jsxs)("li",{className:"flex items-start gap-[8px] text-[11px]",children:[(0,s.jsx)("span",{className:"w-[92px] shrink-0 tabular-nums text-[#B9B9A5]",children:(0,G.Z)(e.created_at).format("MM-DD HH:mm")}),n?(0,s.jsxs)("span",{className:"flex shrink-0 items-center gap-[4px]",children:[(0,s.jsx)(eQ,{status:n.from}),(0,s.jsx)("span",{"aria-label":n.backward?"ëë림":"ì§í",className:n.backward?"text-[#CD6565]":"text-[#B9B9A5]",children:n.backward?"â":"â"}),(0,s.jsx)(eQ,{status:n.to})]}):(0,s.jsx)("span",{className:"inline-block shrink-0 rounded px-[6px] py-[1px] text-[10px] font-medium ".concat(l.color),children:l.label}),(0,s.jsx)("span",{className:"w-[70px] shrink-0 truncate text-[#78786A]",title:null!==(t=e.actor)&&void 0!==t?t:void 0,children:e$(e.actor)}),e.note&&(0,s.jsx)("span",{className:"flex-1 break-words text-[#48483F]",children:e.note}),(null==c?void 0:c.id)===e.id&&(0,s.jsx)("button",{type:"button","data-testid":"caselog-revert",onClick:()=>null==a?void 0:a(c.to),title:"".concat((0,ey.c)(c.to).label," ë¨ê³ë¡ ëë립ëë¤"),className:"ml-auto shrink-0 rounded border border-[#DEDECE] bg-white px-[7px] py-[1px] text-[10px] text-[#78786A] hover:bg-[#F4F3EF]",children:"ëë리기"})]},e.id)})}),i&&(0,s.jsx)("div",{className:"mt-[6px] text-[10px] text-[#B9B9A5]",children:"ìµê·¼ 200ê±´ë§ íìí©ëë¤ â ì´ë ¥ì´ ë ììµëë¤."})]})};var e1=l(68275),e8=l(78606),e4=l(89019),e6=l(40028);let e2=["allow","ignore","grace","deny"],e7={allow:"hover:border-[#10B981] hover:text-[#0E8A5F]",ignore:"hover:border-[#7d7d6f] hover:text-[#48483F]",grace:"hover:border-[#8A6D3B] hover:text-[#6E5630]",deny:"hover:border-[#CD6565] hover:text-[#B94A4A]"},e3={allow:"bg-[#10B981] hover:bg-[#0EA271]",ignore:"bg-[#7d7d6f] hover:bg-[#6A6A5E]",grace:"bg-[#8A6D3B] hover:bg-[#6E5630]",deny:"bg-[#CD6565] hover:bg-[#B94A4A]"},e5=e=>{var t,l,a,n,i,o;let{kind:d,value:c,brandId:x,channel:p,user:u,onDone:m}=e,[h,b]=(0,r.useState)(null),[g,v]=(0,r.useState)(!1),[j,w]=(0,r.useState)(null),[y,F]=(0,r.useState)(null),[k,C]=(0,r.useState)(null),[_,D]=(0,r.useState)(null),A=(null!=c?c:"").trim(),B=!!A&&null!=x&&(0,e1.DN)(p,d)&&(0,E.E0)(u);if(!B)return null;let S=e1.Wd[d],M="".concat(S).concat((0,e1.hb)(S)),L=null!==(l=null==j?void 0:j.display)&&void 0!==l?l:(0,e1.p7)(d,null!==(t=null==j?void 0:j.value)&&void 0!==t?t:A),z=()=>
11{v(!1),b(null),w(null),C(null)},Z=async e=>{b(e),F("impact"),C(null),D(null);try{w(await (0,f.fA)({brandId:x,kind:d,policy:e,value:A}))}catch(t){C((0,N.s)(t,"íì¸ ì¤í¨"))}finally{F(null)}},I=async()=>{if(h){F("save"),C(null);try{let e=await (0,f.cm)({brandId:x,kind:d,policy:h,value:A}),t=(0,e8.JE)(h).label,l=e.affected>0?"promote"===e.effect?" \xb7 기존 ".concat(e.affected,"ê±´ì ê²í ë¨ê³ë¡ ì¬ë ¸ìµëë¤"):" \xb7 기존 ".concat(e.affected,"ê±´ì ì ì/무ê´ì¼ë¡ ë«ììµëë¤"):"";z(),D("".concat(t," ").concat(M," ë±ë¡íìµëë¤").concat(l)),null==m||m({affected:e.affected})}catch(a){C((0,N.s)(a,"ë±ë¡ ì¤í¨"))}finally{F(null)}}},P=h?(0,e8.JE)(h):null,R=(null==j?void 0:j.effect)==="promote"&&(0,ea.Fg)(null==u?void 0:u.role),O="deny"===h&&(null!==(a=null==j?void 0:j.other_policies)&&void 0!==a?a:[]).some(e8.i_),T=!!(null==j?void 0:j.blocked)&&!!h;return(0,s.jsxs)("span",{className:"relative inline-flex items-center gap-[6px]",children:[(0,s.jsxs)("button",{type:"button","aria-label":"".concat((0,e1.p7)(d,A)," 리ì¤í¸ì ë±ë¡"),disabled:null!==y,onClick:()=>g?z():v(!0),title:"ì´ ".concat(S,"를 ê³µì \xb7 ë¬´ê´ \xb7 íì© \xb7 ì¹¨í´ ì¤ íëë¡ ë±ë¡í©ëë¤"),className:"inline-flex items-center gap-[3px] rounded border border-[#DEDECE] px-[6px] py-[1px] text-[10px] text-[#78786A] hover:border-[#10B981] hover:text-[#0E8A5F] disabled:opacity-40",children:["impact"===y?(0,s.jsx)(e4.Z,{size:10,className:"animate-spin"}):(0,s.jsx)(e6.Z,{size:10}),"리ì¤í¸ ë±ë¡"]}),_&&(0,s.jsx)("span",{className:"text-[11px] text-[#0E8A5F]",children:_}),k&&!j&&(0,s.jsx)("span",{className:"text-[11px] text-[#CD6565]",children:k}),g&&(0,s.jsxs)("div",{"data-testid":"detail-entry-panel",className:"absolute left-0 top-full z-[10001] mt-[6px] w-[330px] rounded border border-[#DEDECE] bg-white p-[12px] shadow-lg",children:[(0,s.jsxs)("div",{className:"text-[12px] font-medium text-[#48483F]",children:[(0,s.jsx)("span",{className:"text-[#0E8A5F]",children:L})," 를 ì´ë 목ë¡ì"]}),!j&&(0,s.jsx)("div",{className:"mt-[8px] flex flex-col gap-[4px]",children:e2.map(e=>{let t=(0,e8.JE)(e);return(0,s.jsxs)("button",{type:"button",disabled:null!==y,onClick:()=>void Z(e),className:"rounded border border-[#DEDECE] px-[8px] py-[5px] text-left text-[11px] text-[#78786A] disabled:opacity-40 ".concat(e7[e]),children:[(0,s.jsx)("b",{className:"text-[12px] text-[#48483F]",children:t.label}),(0,s.jsx)("span",{className:"mt-[2px] block leading-[15px]",children:t.effect})]},e)})}),j&&P&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"mt-[6px] text-[11px] text-[#48483F]",children:[(0,s.jsx)("b",{children:P.label})," ",M," ë±ë¡í©ëë¤"]}),j.ok?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("p",{className:"mt-[6px] text-[11px] leading-[16px] text-[#78786A]",children:P.effect}),P.risk&&(0,s.jsx)("p",{className:"mt-[4px] text-[11px] leading-[16px] text-[#8A6D3B]",children:P.risk}),j.duplicate&&(0,s.jsxs)("div",{className:"mt-[6px] rounded bg-[#FFF6E0] px-[8px] py-[4px] text-[11px] text-[#8A6D3B]",children:["ì´ë¯¸ ë±ë¡ë ",S,"ì
ëë¤. 기존 ë°ê²¬ ê±´ë§ ì 리í©ëë¤."]}),j.truncated?(0,s.jsxs)("div",{className:"mt-[6px] rounded bg-[#FFF6E0] px-[8px] py-[4px] text-[11px] text-[#8A6D3B]",children:["ì´ ",S,"ì ê±´ì´ ë무 ë§ì 기존 ê±´ì í¨ê» ì²ë¦¬íì§ ììµëë¤. ë±ë¡ë§ íê³ , 기존 ê±´ì 목ë¡ìì ì¼ê´ë¡ ì²ë¦¬í´ 주ì¸ì."]}):(0,s.jsxs)("ul",{className:"mt-[8px] flex flex-col gap-[2px] text-[11px] text-[#48483F]",children:[(0,s.jsxs)("li",{children:["기존 ë°ê²¬ ",(0,s.jsx)("b",{children:null!==(n=j.matched)&&void 0!==n?n:0}),"ê±´ ì¤"," ",(0,s.jsxs)("b",{className:"text-[#0E8A5F]",children:[null!==(i=j.affected)&&void 0!==i?i:0,"ê±´"]}),"ì"," ","promote"===j.effect?"ê²í ë¨ê³ë¡ ì¬ë¦½ëë¤":"ì ì/무ê´ì¼ë¡ ë«ìµëë¤"]}),!!j.skipped_judged&&(0,s.jsxs)("li",{className:"text-[#78786A]",children:["ì´ë¯¸ íë¨\xb7ì ê³ ê° ì§íë ",j.skipped_judged,"ê±´ì ê·¸ëë¡ ë¡ëë¤"]}),!!j.skipped_claimed&&(0,s.jsxs)("li",{className:"text-[#78786A]",children:["ë¤ë¥¸ ë´ë¹ìê° íì¸ ì§í ì¤ì¸ ",j.skipped_claimed,"ê±´ì ê±´ëëëë¤"]})]}),O&&(0,s.jsxs)("div",{className:"mt-[6px] rounded bg-[#FFF6E0] px-[8px] py-[4px] text-[11px] text-[#8A6D3B]",children:["ì´ ê°ì ì´ë¯¸ ê³µì/ë¬´ê´ ëª©ë¡ìë ììµëë¤. 기존 ê±´ì ê²í ë¡ ì¬ë¦¬ì§ë§,",(0,s.jsx)("b",{children:" ìì¼ë¡ ìì§ëë ê±´ì ê³µì/ë¬´ê´ íì ì´ ì°ì "}),"í©ëë¤ â 침í´ë¡ë§ ë¤ë£¨ë ¤ë©´ ë¸ëë ìì° íë©´ìì 그쪽 í목ì 먼ì ì¤ì§í´ 주ì¸ì."]}),R&&(0,s.jsx)("div",{className:"mt-[6px] rounded bg-[#FFF6E0] px-[8px] py-[4px] text-[11px] text-[#8A6D3B]",children:"ì¬ë¦° ê±´ì ìê³ íì´ ê²í 를 ê±°ì¹ë ëì 목ë¡ìì ë³´ì´ì§ ììµëë¤. ê²í ê° ëëë©´ ë¤ì ëíë©ëë¤."}),j.warning&&(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#8A6D3B]",children:j.warning}),T&&h&&(0,s.jsx)("div",{"data-testid":"detail-entry-blocked",className:"mt-[6px] rounded bg-[#FCE7E5] px-[8px] py-[4px] text-[11px] leading-[16
11px] text-[#B94A4A]",children:(0,e8.eB)(h,null!==(o=j.conflict_policies)&&void 0!==o?o:[],S)})]}):(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#CD6565]",children:j.error})]}),k&&(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#CD6565]",children:k}),(0,s.jsxs)("div",{className:"mt-[10px] flex justify-end gap-[6px]",children:[(0,s.jsx)("button",{type:"button",disabled:null!==y,onClick:z,className:"rounded border border-[#DEDECE] px-[10px] py-[4px] text-[11px] text-[#78786A] hover:bg-[#F4F3EF]",children:"ì·¨ì"}),(null==j?void 0:j.ok)&&h&&!T&&(0,s.jsxs)("button",{type:"button",disabled:null!==y,onClick:()=>void I(),className:"flex items-center gap-[4px] rounded px-[12px] py-[4px] text-[11px] font-medium text-white disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5] ".concat(e3[h]),children:["save"===y&&(0,s.jsx)(e4.Z,{size:10,className:"animate-spin"}),"ë±ë¡"]})]})]})]})};var e9=l(3094);/** 12 * @license lucide-react v0.378.0 - ISC 13 * 14 * This source code is licensed under the ISC license. 15 * See the LICENSE file in the root directory of this source tree. 16 */let te=(0,c.Z)("UserCheck",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["polyline",{points:"16 11 18 13 22 9",key:"1pwet4"}]]),tt=e=>{let t=(null!=e?e:"").trim();return t?"shieldReviewerName:".concat(t):null},tl=e=>(null!=e?e:"").trim(),ta=e=>{let t=tt(e);if(!t)return null;try{return tl(localStorage.getItem(t))||null}catch(l){return null}},tn=(e,t)=>{let l=tt(e),a=tl(t);if(l&&a)try{localStorage.setItem(l,a)}catch(n){}},ts=e=>{let t=tt(e);if(t)try{localStorage.removeItem(t)}catch(l){}},tr=e=>{let{remembered:t,displayName:l,email:a}=e;return tl(t)||tl(l)||tl(a).split("@")[0]||""},ti=e=>{let{detectionId:t,claimedBy:l,claimedName:a,claimedAt:n,myEmail:i,myName:o,onChanged:d}=e,c=(0,F.U)({claimed_by:l,claimed_name:a},i),x=tr({remembered:ta(i),displayName:o,email:i}),[p,u]=(0,r.useState)(x),[m,h]=(0,r.useState)([]),[b,g]=(0,r.useState)(!1),[v,j]=(0,r.useState)(null),w=(0,r.useRef)(null);(0,r.useEffect)(()=>{u(x),j(null),h([])},[t,x]);let y=()=>{w.current!==t&&(w.current=t,(0,f.VQ)(t).then(h).catch(()=>h([])))},E=async(e,t)=>{g(!0),j(null);try{await e(),null==d||d()}catch(l){j((0,N.s)(l,t))}finally{g(!1)}};return c.lockedByOther?(0,s.jsxs)("section",{"data-testid":"shield-claim",className:"flex items-center gap-[8px] rounded border border-[#E0C9A6] bg-[#FBF4E8] px-[12px] py-[10px]",children:[(0,s.jsx)(e9.Z,{size:14,className:"shrink-0 text-[#9A7B45]"}),(0,s.jsxs)("div",{className:"flex-1 text-[12px] text-[#7A6337]",children:[(0,s.jsx)("strong",{className:"font-semibold text-[#5F4D2B]",children:c.label}),(0,s.jsx)("span",{className:"ml-[6px]",children:"â ì´ëë§ ê°ë¥í©ëë¤. ìì íë ¤ë©´ ë´ë¹ììê² ë¬¸ìíì¸ì."})]}),n&&(0,s.jsx)("span",{className:"shrink-0 text-[11px] text-[#A08B5F]",children:String(n).slice(0,16).replace("T"," ")})]}):c.mine?(0,s.jsxs)("section",{"data-testid":"shield-claim",className:"flex items-center gap-[8px] rounded border border-[#10B981] bg-[#EAF7F1] px-[12px] py-[10px]",children:[(0,s.jsx)(te,{size:14,className:"shrink-0 text-[#0E8A5F]"}),(0,s.jsxs)("div",{className:"flex-1 text-[12px] text-[#0E8A5F]",children:[(0,s.jsx)("strong",{className:"font-semibold",children:"ë´ê° íì¸ ì§í ì¤"}),a&&(0,s.jsxs)("span",{className:"ml-[6px] text-[#48483F]",children:["(",a,")"]}),(0,s.jsx)("span",{className:"ml-[6px] text-[#78786A]",children:"â ë¤ë¥¸ ê³ì ìë ì 겨 ììµëë¤."})]}),(0,s.jsx)("button",{type:"button",disabled:b,onClick:()=>void E(()=>(0,f.wr)(t),"íì¸ ì¢ ë£ ì¤í¨"),className:"shrink-0 rounded border border-[#DEDECE] bg-white px-[10px] py-[4px] text-[11px] text-[#48483F] hover:bg-[#F4F3EF] disabled:opacity-50",children:b?"ì²ë¦¬ ì¤...":"íì¸ ì¢ ë£"}),v&&(0,s.jsx)("span",{className:"text-[11px] text-[#CD6565]",children:v})]}):(0,s.jsxs)("section",{"data-testid":"shield-claim",className:"rounded border border-[#DEDECE] bg-white px-[12px] py-[10px]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-[8px]",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:"ê²í ì"}),(0,s.jsx)("input",{"aria-label":"ê²í ì ì´ë¦",list:"shield-reviewers-".concat(t),onFocus:y,value:p,onChange:e=>u(e.target.value),placeholder:"ì´ë¦ ì ë ¥ ëë 목ë¡ìì ì í",className:"min-w-[180px] flex-1 rounded border border-[#DEDECE] px-[8px] py-[5px] text-[12px] text-[#48483F] placeholder:text-[#B9B9A5] focus:border-[#10B981] focus:outline-none"}),(0,s.jsx)("datalist",{id:"shield-reviewers-".concat(t),children:m.map(e=>(0,s.jsx)("option",{value:e},e))}),(0,s.jsxs)("button",{type:"button",disabled:b||!p.trim(),onClick:()=>void E(async()=>{let e=p.trim();await (0,f.Ns)(t,e);let l=tr({displayName:o,email:i});e&&e!==l?tn(i,e):ts(i)},"íì¸ ì§í ì¤í¨"),className:"flex items-center gap-[4px] rounded bg-[#10B981] px-[12px] py-[5px] text-[12px] font-medium text-white hover:bg-[#0EA271] disabled:cursor-not-allowed disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5]",children:[b?(0,s.jsx)(e4.Z,{size:12,className:"animate-spin"}):(0,s.jsx)(te,{size:12}),"íì¸ ì§í"]})]}),(0,s.jsx)("p",{className:"mt-[6px] text-[11px] text-[#A3A396]",children:"íì¸ ì§íì ììíë©´ ë¤ë¥¸ ê³ì ììë ì´ëë§ ê°ë¥í´ì§ëë¤. ê´ê³ì¬ íì¸ ë±ì¼ë¡ ë³´ë¥í ë ì¬ì©íì¸ì."}),v&&(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#CD6565]",children:v})]})};var to=l(28316),td=l(32678),tc=l(66023);let tx={width:640,height:480},tp=(e,t,l)=>Math.max(t,Math.min(e,l)),tu=e=>({width:Math.max(1,Math.min(tx.width,e.width-24)),height:Math.max(1,Math.min(tx.height,e.height-24))}),tm=e=>{let t,{anchor:l,preview:a,viewport:n}=e,s=n.width-12-a.width,r=l.left+l.width+12,i=l.left-12-a.width;t=r<=s?r:i>=12?i:tp(r,12,s);let o=l.top+l.height/2-a.height/2,d=tp(o,12,n.height-12-a.height);return{top:Math.round(d),left:Math.round(t)}};var th=l(50304);let tb=e=>{let t=e.getBoundingClientRect();
16return{top:t.top,left:t.left,width:t.width,height:t.height}},tf=e=>{let{url:t,anchor:l}=e;if("undefined"==typeof document)return null;let a={width:window.innerWidth,height:window.innerHeight},n=tu(a),{top:r,left:i}=tm({anchor:l,preview:n,viewport:a});return(0,to.createPortal)((0,s.jsx)("div",{style:{position:"fixed",top:r,left:i,width:n.width,height:n.height},className:"pointer-events-none z-[60] flex items-center justify-center rounded border border-[#DEDECE] bg-white p-[6px] shadow-xl",children:(0,s.jsx)("img",{src:t,alt:"ë©ëª¨ ì²¨ë¶ ìº¡ì² ë¯¸ë¦¬ë³´ê¸°",className:"max-h-full max-w-full object-contain"})}),document.body)},tg=e=>new Promise((t,l)=>{let a=new FileReader;a.onload=()=>t(String(a.result)),a.onerror=()=>l(a.error),a.readAsDataURL(e)}),tv=e=>{let{detectionId:t,memo:l,memoImages:a,memoBy:n,memoAt:i,onSaved:o}=e,[d,c]=(0,r.useState)(null!=l?l:""),[x,p]=(0,r.useState)(null!=l?l:""),[u,m]=(0,r.useState)(()=>(0,th.G)(a)),[h,b]=(0,r.useState)(!1),[g,v]=(0,r.useState)(!1),[j,w]=(0,r.useState)(null),[y,E]=(0,r.useState)(null),F=(0,r.useRef)(null),k=(0,r.useRef)(u),C=(0,r.useRef)(d),_=(0,r.useRef)(o);k.current=u,C.current=d,_.current=o,(0,r.useEffect)(()=>{c(null!=l?l:""),p(null!=l?l:""),m((0,th.G)(a)),w(null),E(null)},[t]),(0,r.useEffect)(()=>{if(!y)return;let e=()=>E(null);return window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[y]);let D=(0,r.useCallback)(async e=>{let l=k.current;k.current=e,m(e),w(null);try{var a;await (0,f.ER)(t,{memo:C.current,memo_images:e}),p(C.current),null===(a=_.current)||void 0===a||a.call(_)}catch(n){k.current=l,m(l),w((0,N.s)(n,"ì²¨ë¶ ì ì¥ ì¤í¨"))}},[t]),A=(0,r.useCallback)(async e=>{if(0!==e.length){b(!0),w(null);try{let t=[];for(let l of e){let a=await tg(l),n=l instanceof File&&l.name?l.name:"capture-".concat(Date.now()),s=await (0,f.mB)(a,n);t.push(s.url)}let r=k.current;await D([...r,...t.filter(e=>!r.includes(e))])}catch(i){w((0,N.s)(i,"ì´ë¯¸ì§ ì
ë¡ë ì¤í¨"))}finally{b(!1)}}},[D]);(0,r.useEffect)(()=>{let e=e=>{var t;let l=(0,th.b)(null===(t=e.clipboardData)||void 0===t?void 0:t.items);0!==l.length&&(e.preventDefault(),A(l))};return document.addEventListener("paste",e),()=>document.removeEventListener("paste",e)},[A]);let B=async()=>{v(!0),w(null);try{await (0,f.ER)(t,{memo:d,memo_images:k.current}),p(d),null==o||o()}catch(e){w((0,N.s)(e,"ë©ëª¨ ì ì¥ ì¤í¨"))}finally{v(!1)}};return(0,s.jsxs)("section",{className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[8px]",children:[(0,s.jsxs)("div",{className:"mb-[6px] flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:"ë¶ì ë©ëª¨"}),n&&i&&(0,s.jsxs)("span",{className:"text-[11px] text-[#A7A79B]",children:[n," \xb7 ",String(i).slice(0,16).replace("T"," ")]})]}),(0,s.jsx)("textarea",{"aria-label":"ë¶ì ë©ëª¨",value:d,onChange:e=>c(e.target.value),rows:3,placeholder:"ì¬ì¸µ íì¸ ë´ì©ì ë¨ê²¨ì£¼ì¸ì. 캡ì²ë ì´ ì°½ ì´ëìë Ctrl/Cmd+V ë¡ ë¶ì¬ë£ì ì ììµëë¤.",className:"w-full resize-y rounded border border-[#DEDECE] px-[8px] py-[6px] text-[12px] text-[#48483F] placeholder:text-[#B9B9A5] focus:border-[#10B981] focus:outline-none"}),u.length>0&&(0,s.jsx)("div",{className:"mt-[8px] flex flex-wrap gap-[8px]",children:u.map(e=>(0,s.jsxs)("div",{className:"group relative",children:[(0,s.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",onMouseEnter:t=>E({url:e,anchor:tb(t.currentTarget)}),onMouseLeave:()=>E(null),onFocus:t=>E({url:e,anchor:tb(t.currentTarget)}),onBlur:()=>E(null),children:(0,s.jsx)("img",{src:e,alt:"ë©ëª¨ ì²¨ë¶ ìº¡ì²",className:"h-[72px] w-[72px] rounded border border-[#DEDECE] object-cover"})}),(0,s.jsx)("button",{type:"button","aria-label":"ì²¨ë¶ ì´ë¯¸ì§ ìì ",onClick:()=>void D(k.current.filter(t=>t!==e)),className:"absolute -right-[6px] -top-[6px] hidden h-[20px] w-[20px] items-center justify-center rounded-full bg-white text-[#CD6565] shadow group-hover:flex",children:(0,s.jsx)(td.Z,{size:12})})]},e))}),y&&(0,s.jsx)(tf,{url:y.url,anchor:y.anchor}),j&&(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#CD6565]",children:j}),(0,s.jsxs)("div",{className:"mt-[8px] flex items-center gap-[8px]",children:[(0,s.jsx)("input",{ref:F,type:"file",accept:"image/*",multiple:!0,className:"hidden",onChange:e=>{var t;A(Array.from(null!==(t=e.target.files)&&void 0!==t?t:[])),e.target.value=""}}),(0,s.jsxs)("button",{type:"button",onClick:()=>{var e;return null===(e=F.current)||void 0===e?void 0:e.click()},disabled:h,className:"flex items-center gap-[4px] rounded border border-[#DEDECE] px-[8px] py-[4px] text-[11px] text-[#78786A] hover:bg-[#F4F3EF] disabled:opacity-50",children:[h?(0,s.jsx)(e4.Z,{size:12,className:"animate-spin"}):(0,s.jsx)(tc.Z,{size:12}),"ì´ë¯¸ì§ 첨ë¶"]}),(0,s.jsx)("button",{type:"button",onClick:B,disabled:g||h||!(d!==x),className:"rounded bg-[#10B981] px-[12px] py-[4px] text-[11px] font-medium text-white hover:bg-[#0EA271] disabled:cursor-not-allowed disabled:opacity-40",children:g?"ì ì¥ ì¤...":"ë©ëª¨ ì ì¥"})]})]})};var tj=l(34389),tw=l(53270),ty=l(28692);let tN=(e,t,l)=>Math.max(t,Math.min(e,l)),tE=(e,t)=>Math.min(Math.max(e,200),Math.max(1,t-16)),tF=e=>
16{let{anchor:t,dropdown:l,viewport:a}=e,n=t.top+t.height+4,s=t.top-4-l.height,r=n+l.height<=a.height-8,i=r||!(s>=8)?"below":"above",o=tN("below"===i?n:s,8,Math.max(8,a.height-8-l.height)),d=tN(t.left,8,Math.max(8,a.width-8-l.width));return{top:Math.round(o),left:Math.round(d),placement:i}};var tk=l(38209);let tC=(e,t)=>{let l=t.trim();return l?e.includes(l)?{kind:"skip",reason:"duplicate"}:{kind:"add",tag:l}:{kind:"skip",reason:"empty"}},t_=(e,t,l)=>(0,en.I)((0,tk.yk)(JSON.stringify(e),t,l));var tD=l(33788),tA=l(4987);let tB=e=>{let{anchor:t,open:l,candidates:a,customTags:n,index:i,onHover:o,onPick:d,onForget:c}=e;if(!l||!t||0===a.length||"undefined"==typeof document)return null;let x={width:window.innerWidth,height:window.innerHeight},p=tE(t.width,x.width),u=Math.min(200,26*a.length+2),{top:m,left:h}=tF({anchor:t,dropdown:{width:p,height:u},viewport:x});return(0,to.createPortal)((0,s.jsx)("div",{"aria-label":"íê·¸ íë³´",style:{position:"fixed",top:m,left:h,width:p,maxHeight:200},onMouseDown:e=>e.preventDefault(),className:"z-[10001] overflow-y-auto overflow-x-hidden rounded border border-[#DEDECE] bg-white shadow-lg",children:a.map((e,t)=>{let l=(0,tD.GK)(e,n),x=t>0&&(0,tD.GK)(a[t-1],n)!==l;return(0,s.jsxs)(r.Fragment,{children:[x&&(0,s.jsx)("div",{"data-testid":"tag-group-divider",className:tD.xv}),(0,s.jsxs)("div",{"data-tag-kind":l,onMouseEnter:()=>o(t),className:"flex items-center border-b border-[#F0F0E8] last:border-b-0 ".concat((0,tD.tU)(l,t===i)),children:[(0,s.jsx)("button",{type:"button",title:e,onClick:()=>d(e),className:"min-w-0 flex-1 truncate px-[10px] py-[5px] text-left text-[12px]",children:e}),"custom"===l&&(0,s.jsx)("button",{type:"button","aria-label":"".concat(e," íë³´ìì ì ê±°"),onMouseDown:t=>{t.preventDefault(),t.stopPropagation(),c(e)},className:"mr-[6px] ".concat(tD.b9),children:(0,s.jsx)(ek.Z,{size:10})})]})]},e)})}),document.body)},tS=e=>{let{detectionId:t,tags:l,canEdit:a,lockLabel:n,onSaved:i}=e,[o,d]=(0,r.useState)(()=>(0,en.I)(l)),[c,x]=(0,r.useState)(""),[p,u]=(0,r.useState)(!1),[m,h]=(0,r.useState)(null),[b,g]=(0,r.useState)(!1),[v,j]=(0,r.useState)(-1),[w,y]=(0,r.useState)(null),E=(0,r.useRef)(null),{customTags:F,tagOptions:k,rememberTag:C,forgetTag:_}=(0,tw.Z)(),D=(0,tA._f)(k,o,c);(0,r.useLayoutEffect)(()=>{if(!b)return;let e=()=>{let e=E.current;if(!e)return;let t=e.getBoundingClientRect();y({top:t.top,left:t.left,width:t.width,height:t.height})};return e(),window.addEventListener("scroll",e,!0),window.addEventListener("resize",e),()=>{window.removeEventListener("scroll",e,!0),window.removeEventListener("resize",e)}},[b]),(0,r.useEffect)(()=>{d((0,en.I)(l)),x(""),h(null),g(!1),j(-1)},[t,l]);let A=(0,r.useRef)(t);(0,r.useEffect)(()=>{A.current=t},[t]);let B=async(e,l)=>{u(!0),h(null);try{if(await (0,f.Hc)({items:[t],addTags:e,deleteTags:l}),A.current!==t)return;d(t=>t_(t,e,l)),null==i||i({itemIds:[t],addTags:e,deleteTags:l})}catch(a){A.current===t&&h((0,N.s)(a,"íê·¸ ì ì¥ ì¤í¨"))}finally{A.current===t&&u(!1)}},S=async e=>{let t=tC(o,e);if("skip"===t.kind){"duplicate"===t.reason&&h("ì´ë¯¸ ë¶ì´ ìë íê·¸ì
ëë¤.");return}x(""),g(!1),j(-1),await B([t.tag],[]),C(t.tag)},M=(0,ty.Z)({candidates:k,existing:o,query:c,open:b,index:v,setOpen:g,setIndex:j,setQuery:x,onAdd:e=>void S(e)});return(0,s.jsxs)("section",{"data-testid":"shield-detection-tags",className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[8px]",children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-x-[8px] gap-y-[6px]",children:[(0,s.jsx)("span",{className:"shrink-0 text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:"íê·¸"}),o.map(e=>(0,s.jsxs)("span",{title:e,className:"inline-flex max-w-[180px] items-center gap-[4px] rounded-full border border-[#DEDECE] bg-[#F4F3EF] py-[1px] pl-[8px] pr-[3px] text-[11px] font-medium text-[#78786A]",children:[(0,s.jsx)("span",{className:"truncate",children:e}),a&&(0,s.jsx)("button",{type:"button","aria-label":"".concat(e," íê·¸ ìì "),disabled:p,onClick:()=>void B([],[e]),className:"shrink-0 rounded-full p-[2px] text-[#A3A396] hover:bg-[#
16E4E3DA] hover:text-[#CD6565] disabled:opacity-40",children:(0,s.jsx)(ek.Z,{size:10})})]},e)),0===o.length&&!a&&(0,s.jsx)("span",{className:"text-[11px] text-[#A3A396]",children:"ìì"}),a&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-[4px]",children:[(0,s.jsx)("input",{ref:E,"aria-label":"íê·¸ ì¶ê°",value:c,disabled:p,onChange:e=>{x(e.target.value),g(!0),j(-1),m&&h(null)},onFocus:()=>{g(!0),j(-1)},onBlur:()=>{setTimeout(()=>{g(!1),j(-1)},150)},onKeyDown:M,placeholder:"íê·¸ ì
ë ¥ í Enter",className:"w-[150px] rounded border border-[#DEDECE] px-[8px] py-[3px] text-[11px] text-[#48483F] placeholder:text-[#B9B9A5] focus:border-[#10B981] focus:outline-none disabled:bg-[#F4F3EF]"}),(0,s.jsx)(tB,{anchor:w,open:b&&!p,candidates:D,customTags:F,index:v,onHover:j,onPick:e=>void S(e),onForget:_}),(0,s.jsx)("button",{type:"button","aria-label":"íê·¸ ì¶ê° ì¤í",disabled:p||!c.trim(),onClick:()=>void S(c),className:"flex shrink-0 items-center rounded border border-[#DEDECE] p-[3px] text-[#78786A] hover:bg-[#F4F3EF] disabled:opacity-40",children:p?(0,s.jsx)(e4.Z,{size:11,className:"animate-spin"}):(0,s.jsx)(tj.Z,{size:11})})]}),!a&&n&&(0,s.jsxs)("span",{className:"inline-flex items-center gap-[4px] text-[11px] text-[#9A7B45]",children:[(0,s.jsx)(e9.Z,{size:11}),n," â í그를 ë°ê¿ ì ììµëë¤"]})]}),m&&(0,s.jsx)("div",{className:"mt-[6px] text-[11px] text-[#CD6565]",children:m})]})},tM=(e,t)=>eg.filter(t=>J(e,t)).map(l=>{let a=T(e,l,t),n=(0,ey.c)(l);return{status:l,label:n.label,color:n.color,count:a.ids.length,backward:a.ids.some(t=>{let a=e.find(e=>e.id===t);return ew(null==a?void 0:a.status,l)})}}),tL=e=>{let{rows:t,myEmail:l,onPick:a}=e,[n,i]=(0,r.useState)(!1),o=(0,r.useRef)(null),d=(0,r.useMemo)(()=>tM(t,l),[t,l]);return((0,r.useEffect)(()=>{if(!n)return;let e=e=>{o.current&&!o.current.contains(e.target)&&i(!1)},t=e=>{"Escape"===e.key&&i(!1)};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}},[n]),0===d.length)?null:(0,s.jsxs)("div",{ref:o,className:"relative",children:[(0,s.jsx)("button",{type:"button","data-testid":"stage-move-open","aria-expanded":n,"aria-haspopup":"menu",onClick:()=>i(e=>!e),className:"whitespace-nowrap rounded border border-[#DEDECE] bg-white px-[12px] py-[4px] text-[11px] font-semibold text-[#48483F] hover:bg-[#F4F3EF]",children:"ë¨ê³ ì´ë â¾"}),n&&(0,s.jsx)("div",{role:"menu","data-testid":"stage-move-menu",className:"absolute left-0 top-[calc(100%+6px)] z-20 w-[264px] rounded-[8px] border border-[#DEDECE] bg-white p-[5px] shadow-[0_8px_24px_-12px_rgba(46,46,40,0.3)]",children:d.map(e=>(0,s.jsxs)("button",{type:"button",role:"menuitem","data-testid":"stage-move-to-".concat(e.status),onClick:()=>{a(e.status),i(!1)},className:"flex w-full items-center justify-between gap-[10px] rounded-[5px] px-[10px] py-[6px] text-left text-[12px] text-[#48483F] hover:bg-[#F4F3EF]",children:[(0,s.jsx)("span",{className:"inline-block whitespace-nowrap rounded px-[6px] py-[1px] text-[10px] font-medium ".concat(e.color),children:e.label}),(0,s.jsxs)("span",{className:"whitespace-nowrap text-[11px] text-[#78786A]",children:[e.count,"ê±´",e.backward&&(0,s.jsx)("span",{className:"ml-[5px] text-[#CD6565]",children:"ì¬ì íì"})]})]},e.status))})]})},tz={confirm:4,needs_check:2,legit:3,escalate:13,promote:12,revert_triage:0,demote:12},tZ={0:"revert_triage",2:"needs_check",3:"legit",4:"confirm",12:"promote",13:"escalate"},tI={suspicious:"ìì¬",unrelated:"무ê´",unclear:"íì ë¶ê°"},tP={confirm:{label:"ì ê³ ìì²",bg:"bg-[#FCE7E5] hover:bg-[#F5CFCB]",text:"text-[#CD6565] font-semibold"},needs_check:{label:"íì¸íì",bg:"bg-[#FFF6E0] hover:bg-[#FFE9C0]",text:"text-[#D98165]"},legit:{label:"ì ì/무ê´",bg:"bg-[#EEF6E9] hover:bg-[#DCEACF]",text:"text-[#6B9F46]"},escalate:{label:"AI ì¬ëê²í ë¡ ì¹ê²©",bg:"bg-[#E3E0FE] hover:bg-[#D4CFFB]",text:"text-[#4B3CC9]"},promote:{label:"AI ê²í ë¡ ë기기",bg:"bg-[#E7F0FE] hover:bg-[#D6E5FC]",text:"text-[#2F6BC4]"},revert_triage:{label:"AI ê²í ì·¨ì",bg:"bg-[#F4F3EF] hover:bg-[#
16E9E9DF]",text:"text-[#78786A]"},demote:{label:"AI ì¬ëê²í ì·¨ì",bg:"bg-[#F4F3EF] hover:bg-[#E9E9DF]",text:"text-[#78786A]"}},tR=e=>{let{k:t,v:l}=e;return(0,s.jsxs)("div",{className:"flex items-start gap-[10px] py-[3px]",children:[(0,s.jsx)("span",{className:"w-[80px] shrink-0 text-[11px] text-[#78786A]",children:t}),(0,s.jsx)("span",{className:"flex-1 break-words text-[12px] text-[#48483F]",children:l})]})},tO=(e,t)=>{let l=(null!=t?t:"").trim();if(!l||!e)return e;let a=l.split(/\s+/).filter(Boolean);if(0===a.length)return e;let n=a.map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),i=RegExp("(".concat(n,")"),"gi"),o=e.split(i);return o.map((e,t)=>i.test(e)?(0,s.jsx)("mark",{className:"rounded bg-[#FFF4A1] px-[2px] py-[1px] text-[#4a3a00]",children:e},t):(0,s.jsx)(r.Fragment,{children:e},t))},tT=(e,t)=>{let l=(null!=t?t:"").trim();if(!l||!e)return!1;let a=l.split(/\s+/).filter(Boolean),n=e.toLowerCase();return a.some(e=>n.includes(e.toLowerCase()))},tJ=e=>{var t,l,a,n,i,o,c,x,p,u,m,h,b,f,g,v,j,w,y,N,C,_,D,A,B;let{detection:S,onClose:M,onAction:L,onPrev:z,onNext:Z,hasPrev:I,hasNext:R,onMemoSaved:O,onClaimChanged:T,onLlmJudge:J,llmJudgingId:U,llmResult:H,onTagsSaved:Y,onAuthorAllowed:K}=e,[q]=(0,d.KO)(P.LF),V=null!==(t=null==q?void 0:q.email)&&void 0!==t?t:null;null==q||q.role;let $=(0,F.U)(S,V),Q=(0,E.XJ)(q),ee=(0,E.XJ)(q)&&(null==S?void 0:S.status)===12,[et,el]=(0,r.useState)(""),[ea,en]=(0,r.useState)(!1);(0,r.useEffect)(()=>{el(""),en(!1)},[null==S?void 0:S.id]);let es=(0,r.useMemo)(()=>(null==S?void 0:S.channel)==="ads"?ez(null!==(l=S.raw_data)&&void 0!==l?l:null):null,[S]),er=(0,r.useMemo)(()=>(null==S?void 0:S.channel)==="maps"?eO(null!==(a=S.raw_data)&&void 0!==a?a:null):null,[null==S?void 0:S.channel,null==S?void 0:S.raw_data]),ei=(0,r.useMemo)(()=>S?(0,W.Of)(null!==(n=S.raw_data)&&void 0!==n?n:null,S.image_url):null,[S]),eo=(0,r.useMemo)(()=>S?(0,eZ.p)(S.channel,null==ei?void 0:ei.prod_name,S.threat_summary):null,[S,ei]);if((0,r.useEffect)(()=>{if(!S)return;let e=e=>{"ArrowLeft"===e.key&&I?(e.preventDefault(),null==z||z()):"ArrowRight"===e.key&&R?(e.preventDefault(),null==Z||Z()):"Escape"===e.key&&M()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[S,I,R,z,Z,M]),!S||!ei)return null;let ed=e=>{let t=tZ[e];if(t){if(ew(S.status,e)&&!et.trim()){en(!0);return}en(!1),L(t,et.trim()||void 0)}},ec=null!==(i=S.keyword)&&void 0!==i?i:null,ex=(0,ey.c)(S.status),ep=tT(ei.prod_name||S.threat_summary,ec),eu=tT(ei.seller_name,ec),em=tT(null!==(o=S.source_url)&&void 0!==o?o:"",ec),eh=ep||eu||em,eb=null,ef=null,eg=null,ev=null;try{let ej=S.raw_data?JSON.parse(S.raw_data):null;ej&&"object"==typeof ej&&(eb="string"==typeof ej.captured_at?ej.captured_at:null,ef="string"==typeof ej.source_provider?ej.source_provider:null,eg="string"==typeof ej.xl_07_prod_code?ej.xl_07_prod_code:null,ev=(0,e1.kV)(ej))}catch(eN){}return(0,s.jsx)("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-[20px] md:pl-[275px]",onClick:M,children:(0,s.jsxs)("div",{className:"relative flex max-h-[90vh] w-full max-w-[1000px] flex-col rounded-[8px] bg-white shadow-xl",onClick:e=>e.stopPropagation(),children:[(0,s.jsx)("button",{type:"button","aria-label":"ì´ì í목 (â)",disabled:!I,onClick:e=>{e.stopPropagation(),I&&(null==z||z())},className:"absolute -left-[60px] top-1/2 z-[10] flex h-[44px] w-[44px] -translate-y-1/2 items-center justify-center rounded-full bg-white text-[#48483F] shadow-md transition hover:bg-white hover:shadow-lg disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:shadow-md",children:(0,s.jsx)(eE.Z,{size:24})}),(0,s.jsx)("button",{type:"button","aria-label":"ë¤ì í목 (â)",disabled:!R,onClick:e=>{e.stopPropagation(),R&&(null==Z||Z())},className:"absolute -right-[60px] top-1/2 z-[10] flex h-[44px] w-[44px] -translate-y-1/2 items-center justify-center rounded-full bg-white text-[#48483F] shadow-md transition hover:bg-white hover:shadow-lg disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:shadow-md",children:(0,s.jsx)(eF.Z,{size:24})}),(0,s.jsxs)("div",{className:"flex items-center justify-between border-b border-[#DEDECE] px-[20px] py-[14px]",children:[(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsxs)("span",{className:"text-[11px] text-[#78786A]",children:["ë°ê²¬ ìì¸ \xb7 #",S.id]}),(0,s.jsx)("span",{"data-testid":"detail-header-title",title:ei.prod_name||S.threat_summary||void 0,className:"mt-[2px] line-clamp-2 text-[15px] font-medium text-[#48483F]",children:tO(ei.prod_name||S.threat_summary,ec)})]}),(0,s.jsx)("button",{type:"button","aria-label":"ë«ê¸°",onClick:M,className:"shrink-0 rounded p-[6px] text-[#78786A] hover:bg-[#F4F3EF] hover:text-[#48483F]",children:(0,s.jsx)(ek.Z,{size:18})})]}),(0,s.jsxs)("div",{className:"flex-1 overflow-auto px-[20px] py-[16px]",children:[H&&H.id===S.id&&(0,s.jsxs)("div",{"data-testid":"llm-result-banner",className:"mb-[14px] rounded-[6px] border px-[14px] py-[10px] ".concat(H.verdict.moved?"border-[#C7E8D6] bg-[#EAF7F0]":"border-[#F0E2C4] bg-[#FFF9EC]"),children:[(0,s.jsxs)("div",{className:"flex flex-wrap items-center gap-[8px]",children:[(0,s.jsxs)("span",{className:"text-[13px] font-medium text-[#48483F]",children:["AI ì¬ëê²í ê²°ê³¼ â"," ",null!==(c=tI[H.verdict.verdict])&&void 0!==c?c:H.verdict.verdict]}),(0,s.jsxs)("span",{className:"rounded-full bg-white px-[8px] py-[1px] text-[11px] text-[#78786A]",children:["ì 뢰ë ",Math.round(100*H.verdict.confidence),"%"]}),(0,s.jsx)("span",{className:"rounded-full bg-white px-[8px] py-[1px] text-[11px] text-[#78786A]",children:H.verdict.model}),(0,s.jsx)("span",{"data-testid":"llm-result-moved",className:"rounded-full px-[8px] py-[1px] text-[11px] font-medium ".concat(H.verdict.moved?"bg-[#127A5
165] text-white":"bg-[#E9E9DF] text-[#78786A]"),children:H.verdict.moved?"ë¨ê³ ì´ëí¨":"ìí ê·¸ëë¡"})]}),(0,s.jsx)("p",{className:"mt-[5px] text-[12px] leading-[18px] text-[#78786A]",children:H.verdict.reason}),H.verdict.rationale&&(0,s.jsx)("p",{className:"mt-[4px] text-[12px] leading-[18px] text-[#48483F]",children:H.verdict.rationale})]}),(0,s.jsxs)("div",{className:"grid grid-cols-1 gap-[20px] md:grid-cols-[280px_1fr]",children:[(0,s.jsxs)("div",{className:"flex flex-col gap-[12px]",children:[(0,s.jsx)("div",{className:"aspect-square w-full overflow-hidden rounded border border-[#DEDECE] bg-[#F4F3EF]",children:ei.image_url?(0,s.jsx)("img",{src:ei.image_url,alt:ei.prod_name||"#".concat(S.id),referrerPolicy:"no-referrer",className:"h-full w-full object-cover"}):(0,s.jsx)("div",{className:"flex h-full w-full items-center justify-center text-[11px] text-[#7d7d6f]",children:"ì´ë¯¸ì§ ìì"})}),(0,s.jsxs)("div",{className:"rounded border px-[12px] py-[10px] text-[11px] ".concat(eh?"border-[#FFE9C0] bg-[#FFF9E8]":"border-[#DEDECE] bg-[#F4F3EF]"),children:[(0,s.jsxs)("div",{className:"mb-[4px] text-[11px] font-medium text-[#48483F]",children:["ë¸ëë ì¸ê¸ ",eh?"ê°ì§":"미ë°ê²¬"]}),(0,s.jsxs)("div",{className:"text-[10px] text-[#7d7d6f]",children:["ê²ìì´: ",(0,s.jsx)("span",{className:"text-[#48483F]",children:null!=ec?ec:"-"})]}),(0,s.jsxs)("ul",{className:"mt-[6px] flex flex-col gap-[2px] text-[10px]",children:[(0,s.jsxs)("li",{children:["ìíëª
",ep?"â
매ì¹":"\xb7 ë§¤ì¹ ìì"]}),(0,s.jsxs)("li",{children:["ê²ìì ",eu?"â
매ì¹":"\xb7 ë§¤ì¹ ìì"]}),(0,s.jsxs)("li",{children:["URL ",em?"â
매ì¹":"\xb7 ë§¤ì¹ ìì"]})]}),!eh&&ec&&(0,s.jsx)("div",{className:"mt-[6px] text-[10px] text-[#CD6565]",children:"ìì§ íëì ê²ìì´ê° ìì´ ìë ë¬´ê´ íì íë³´."})]})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-[14px]",children:[(0,s.jsxs)("section",{children:[(0,s.jsx)("div",{className:"mb-[6px] text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:"ìí"}),(0,s.jsxs)("div",{className:"rounded border border-[#F4F3EF] bg-[#FAFAF6] px-[10px] py-[6px]",children:[eo&&(0,s.jsx)("div",{"data-testid":"detail-body-text",children:(0,s.jsx)(tR,{k:eo.label,v:(0,s.jsx)("span",{className:"whitespace-pre-wrap break-words",children:tO(eo.text,ec)})})}),(0,s.jsx)(tR,{k:"ê²ìì",v:(0,s.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-[6px]",children:[(0,s.jsx)("span",{children:tO(ei.seller_name||"-",ec)}),(0,s.jsx)(e5,{kind:"account",value:ei.seller_name||null,brandId:null!==(x=S.brand_id)&&void 0!==x?x:null,channel:S.channel,user:q,onDone:K}),(0,s.jsx)(e5,{kind:"place",value:null!==(p=null!=ev?ev:ei.seller_name)&&void 0!==p?p:null,brandId:null!==(u=S.brand_id)&&void 0!==u?u:null,channel:S.channel,user:q,onDone:K}),e1.Oi.map(e=>(0,s.jsx)(e5,{kind:e,value:ei.seller_name||null,brandId:null!==(m=S.brand_id)&&void 0!==m?m:null,channel:S.channel,user:q,onDone:K},e))]})}),(0,s.jsx)(tR,{k:"íë«í¼",v:(0,s.jsx)(eY.C,{label:(0,X.s)(S)})}),(null==er?void 0:er.address)&&(0,s.jsx)(tR,{k:"주ì",v:tO(er.address,ec)}),(null==er?void 0:er.phone)&&(0,s.jsx)(tR,{k:"ì í",v:er.phone}),eg&&(0,s.jsx)(tR,{k:"ìí ì½ë",v:(0,s.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-[6px]",children:[(0,s.jsx)("span",{className:"break-all",children:eg}),(0,s.jsx)(e5,{kind:"app",value:eg,brandId:null!==(h=S.brand_id)&&void 0!==h?h:null,channel:S.channel,user:q,onDone:K})]})}),(0,s.jsx)(tR,{k:"URL",v:S.source_url?(0,s.jsxs)("span",{className:"inline-flex flex-wrap items-center gap-[6px]",children:[(0,s.jsx)("a",{href:S.source_url,target:"_blank",rel:"noreferrer",className:"break-all text-[#3a7d8f] hover:underline",children:tO(S.source_url,ec)}),(0,s.jsx)(e5,{kind:"domain",value:S.source_url,brandId:null!==(b=S.brand_id)&&void 0!==b?b:null,channel:S.channel,user:q,onDone:K})]}):"-"})]})]}),(0,s.jsxs)("section",{children:[(0,s.jsx)("div",{className:"mb-[6px] text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:"ë°ê²¬"}),(0,s.jsxs)("div",{className:"rounded border border-[#F4F3EF] bg-[#FAFAF6] px-[10px] py-[6px]",children:[(0,s.jsx)(tR,{k:"ì±ë",v:S.channel}),(0,s.jsx)(tR,{k:"ë¸ëë",v:null!==(f=S.brand)&&void 0!==f?f:"-"}),(0,s.jsx)(tR,{k:"ê²ìì´",v:null!=ec?ec:"-"}),(0,s.jsx)(tR,{k:"ë°ê²¬ ìê°",v:(0,G.Z)(S.detected_at).format("YYYY-MM-DD HH:mm:ss")}),eb&&(0,s.jsx)(tR,{k:"í¬ë¡¤ë§ ìê°",v:(0,G.Z)(eb).format("YYYY-MM-DD HH:mm:ss")}),ef&&(0,s.jsx)(tR,{k:"í¬ë¡¤ë¬",v:(0,s.jsx)("span",{className:"text-[11px]",children:ef})}),(0,s.jsx)(tR,{k:"íì¬ ìí",v:(0,s.jsx)("span",{className:"inline-block rounded-sm px-[10px] py-[2px] text-[11px] font-semibold ".concat(ex.color),children:ex.label})})]})]}),(()=>{var e,t,l;let a=(0,k.Jo)(S.signals),n=(0,k.dC)(a.ml_rule),r=(0,k.jZ)(S.signals),i=S.suggested_status||null!=S.confidence||S.rationale||S.ai_model||n||r;return i?(0,s.jsxs)("section",{children:[(0,s.jsxs)("div",{className:"mb-[6px] flex items-center gap-[6px] text-[11px] font-medium uppercase tracking-wide text-[#78786A]",children:["AI íì ",r?(0,s.jsxs)("span",{"data-testid":"verdict-source-llm",className:"rounded-full bg-[#E3E0FE] px-[8px] py-[1px] text-[10px] font-medium normal-case tracking-normal text-[#4B3CC9]",children:["LLM ê²í í¨ \xb7 ",null!==(e=r.model)&&void 0!==e?e:"ëª¨ë¸ ë¯¸ì",null!=r.criteriaVersion?" \xb7 ê¸°ì¤ ".concat(r.criteriaVersion,"í"):""]}):(0,s.jsx)("span",{"data-testid":"verdict-source-rule",className:"rounded-full bg-[#F4F3EF] px-[8px] py-[1px] text-[10px] font-medium normal-case tracking-normal text-[#78786A]",children:"ìë ë¶ë¥ë§ \xb7 LLM 미ê²í "})]}),(0,s.jsxs)("div",{className:"rounded border border-[#F4F3EF] bg-[#FAFAF6] px-[10px] py-[6px]",children:[r&&r.signals.length>0&&(0,s.jsx)(tR,{k:"LLM 근거",v:r.signals.join(" \xb7 ")}),n&&(0,s.jsx)(tR,{k:"íì ê·ì¹",v:(0,s.jsx)("span",{className:"inline-block rounded-full px-[10px] py-[2px] text-[11px] font-medium ".concat(n.color),children:n.label})}),S.suggested_status&&(0,s.jsx)(tR,{k:"ì ì ìí",v:null!==(t=tI[S.suggested_status])&&void 0!==t?t:S.suggested_status}),null!=S.confidence&&(0,s.jsx)(tR,{k:"ì 뢰ë",v:"".concat(Math.round((null!==(l=S.confidence)&&void 0!==l?l:0)*100),"%")}),S.ai_model&&(0,s.jsx)(tR,{k:"모ë¸",v:S.ai_model}),S.rationale&&(0,s.jsx)(tR,{k:"íì ì´ì ",v:S.rationale}),a.matched_official_ref&&a.matched_ns?(0,s.jsx)(tR,{k:"ë§¤ì¹ ê³µì ì´ë¯¸ì§",v:(0,s.jsx)("img",{src:(0,eH.U)({path:a.matched_official_ref,ns:a.matched_ns},eC.KB),alt:"ë§¤ì¹ ê³µì ì´ë¯¸ì§",className:"h-[64px] w-[64px] rounded border border-[#F4F3EF] bg-[#FAFAF6] object-cover",onError:e=>{e.target.src="/images/no_image.png",e.target.onerror=null}})}):a.matched_official_url?(0,s.jsx)(tR,{k:"ë§¤ì¹ ê³µì ì´ë¯¸ì§",v:(0,s.jsx)("a",{href:a.matched_official_url,target:"_blank",rel:"noreferrer",className:"text-[11px] text-[#3B7A9E] underline hover:text-[#245A7A]",children:a.matched_official_url})}):null]})]}):null})(),es&&(0,s.jsx)(eq,{card:es}),S.raw_data&&(0,s.jsxs)("details",{className:"rounded border border-[#F4F3EF] bg-[#FAFAF6] px-[10px] py-[6px]",children:[(0,s.jsx)("summary",{className:"cursor-pointer text-[11px] text-[#78786A] hover:text-[#48483F]",children:"Raw ìì§ ë°ì´í° (JSON)"}),(0,s.jsx)("pre",{className:"mt-[6px] max-h-[240px] overflow-auto rounded bg-white p-[8px] text-[10px] text-[#48483F]",children:(()=>{try{return JSON.stringify(JSON.parse(S.raw_data),null,2)}catch(e){return S.raw_data}})()})]})]})]}),(0,s.jsx)("div",{className:"mt-[16px]",children:(0,s.jsx)(ti,{detectionId:S.id,claimedBy:null!==(g=S.claimed_by)&&void 0!==g?g:null,claimedName:null!==(v=S.claimed_name)&&void 0!==v?v:null,claimedAt:null!==(j=S.claimed_at)&&void 0!==j?j:null,myEmail:V,myName:null!==(w=null==q?void 0:q.dis
16play_name)&&void 0!==w?w:null,onChanged:T})}),(0,s.jsx)("div",{className:"mt-[16px]",children:(0,s.jsx)(tS,{detectionId:S.id,tags:null!==(y=S.tags)&&void 0!==y?y:null,canEdit:$.canEdit,lockLabel:$.label,onSaved:Y})}),(0,s.jsx)("div",{className:"mt-[16px]",children:(0,s.jsx)(tv,{detectionId:S.id,memo:null!==(N=S.memo)&&void 0!==N?N:null,memoImages:null!==(C=S.memo_images)&&void 0!==C?C:null,memoBy:null!==(_=S.memo_by)&&void 0!==_?_:null,memoAt:null!==(D=S.memo_at)&&void 0!==D?D:null,onSaved:O})}),(0,s.jsx)(e0,{detectionId:null!==(A=null==S?void 0:S.id)&&void 0!==A?A:null,currentStatus:null==S?void 0:S.status,onRevert:Q&&$.canEdit?ed:void 0})]}),(0,s.jsxs)("div",{className:"border-t border-[#DEDECE] px-[20px] py-[14px]",children:[(0,s.jsx)("input",{type:"text",value:et,onChange:e=>{el(e.target.value),e.target.value.trim()&&en(!1)},disabled:!$.canEdit,maxLength:500,"aria-label":"íì ì¬ì ",placeholder:"ì¬ì (ì í) \xb7 ì: ë¸ëë ìì²´ ì´ë²¤í¸ ì모 ê²ì물 â ì¬ì¹ ìë",className:"mb-[4px] w-full rounded border bg-white px-[10px] py-[6px] text-[12px] text-[#48483F] placeholder:text-[#B8B8A8] focus:outline-none disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5] ".concat(ea?"border-[#CD6565] focus:border-[#CD6565]":"border-[#DEDECE] focus:border-[#10B981]")}),(0,s.jsx)("div",{className:"mb-[10px] min-h-[15px] text-[11px] text-[#CD6565]",children:ea&&(0,s.jsx)("span",{"data-testid":"detail-note-required",children:"ëë리ë ì´ëì
ëë¤ â ì ëë리ëì§ ì ì´ ì£¼ì¸ì"})}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[11px] text-[#7d7d6f]",children:$.lockedByOther?"".concat($.label," â íì í ì ììµëë¤"):"ìí ë³ê²½ì ìë 기ë¡ë©ëë¤"}),(0,s.jsxs)("div",{className:"flex gap-[8px]",children:[ee&&J&&(0,s.jsx)("button",{type:"button","data-testid":"llm-judge",disabled:!$.canEdit||U===S.id,title:$.canEdit?"LLM ì´ ì´ ê±´ì íì í©ëë¤":null!==(B=$.label)&&void 0!==B?B:void 0,onClick:()=>void J(S.id),className:"rounded bg-[#4B3CC9] px-[14px] py-[7px] text-[12px] font-medium text-white hover:bg-[#3F32A8] disabled:cursor-not-allowed disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5]",children:U===S.id?"LLM ì´ ë³´ë ì¤â¦":"LLM ì¼ë¡ íì "}),Q&&(0,s.jsx)(tL,{rows:[{id:S.id,status:S.status,claimed_by:S.claimed_by}],myEmail:V,onPick:ed}),["legit","needs_check","confirm"].filter(e=>tz[e]!==S.status).map(e=>{var t;let l=tP[e];return(0,s.jsx)("button",{type:"button",disabled:!$.canEdit,title:$.canEdit?void 0:null!==(t=$.label)&&void 0!==t?t:void 0,onClick:()=>L(e,et.trim()||void 0),className:"rounded px-[14px] py-[7px] text-[12px] font-medium disabled:cursor-not-allowed disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5] ".concat($.canEdit?"".concat(l.bg," ").concat(l.text):""),children:l.label},e)})]})]})]})]})})},tU=[{action:"legit",label:"ì ì/무ê´",color:"bg-[#EEF6E9] hover:bg-[#DCEACF] text-[#6B9F46]"},{action:"needs_check",label:"íì¸íì",color:"bg-[#FFF6E0] hover:bg-[#FFE9C0] text-[#D98165]"},{action:"confirm",label:"ì¡°ì¹ëì íì ",color:"bg-[#FCE7E5] hover:bg-[#F5CFCB] text-[#CD6565] font-semibold"}],tH=e=>{let{selectedCount:t,page:l,totalPages:a,onBulk:n,selectedRows:i,myEmail:o,onTagged:d,canMoveStage:c,allPageSelected:x,pageSelectedCount:p,onTogglePageSelection:u,llmBulk:m,trailing:h}=e,[b,g]=(0,r.useState)(!1),v=!!i&&i.length>0,[j,w]=(0,r.useState)(null),[y,N]=(0,r.useState)(""),E=(0,r.useMemo)(()=>j&&i?T(i,tz[j.action],o):null,[j,i,o]),F=E?E.ids.length:null,k=(0,r.useMemo)(()=>{if(!j||!i||!E)return!1;let e=tz[j.action];return E.ids.some(t=>{var l;return ew(null===(l=i.find(e=>e.id===t))||void 0===l?void 0:l.status,e)})},[j,i,E]),_=k&&0===y.trim().length,D=(0,r.useMemo)(()=>i?tU.filter(e=>J(i,tz[e.action])):tU,[i]),A=(0,r.useMemo)(()=>!i||i.some(e=>void 0===e.status||12===e.status),[i]),B=()=>{w(null),N("")},[S,M]=(0,r.useState)(!1),L=(0,r.useMemo)(()=>m&&i?C(i,m.cap,m.myEmail):null,[m,i]);return(0,r.useEffect)(()=>{0===t&&(B(),M(!1))},[t]),(0,r.useEffect)(()=>{j&&i&&!J(i,tz[j.action])&&B()},[j,i]),(0,r.useEffect)(()=>{S&&!A&&M(!1)},[S,A]),(0,s.jsxs)("div",{className:"mb-[20px] flex min-h-[36px] flex-wrap items-center justify-between gap-x-[16px] gap-y-[8px] text-[14px]",children:[(0,s.jsx)("span",{className:"flex items-center gap-[12px] text-[#58584E]",children:u&&(0,s.jsxs)("label",{htmlFor:"shield-select-all",className:"flex cursor-pointer items-center gap-[8px] text-[14px] font-[600] text-[#58584E] hover:text-[#48483F]",children:[(0,s.jsx)(eN.X,{id:"shield-select-all","aria-label":"íì¬ íì´ì§ ì ì²´ ì í",className:"h-[20px] w-[20px] cursor-pointer",checked:!!x||(null!=p?p:t)>0&&"indeterminate",onCheckedChange:()=>u()}),"ì ì²´ ì í"]})}),(null==m?void 0:m.progress)&&(0,s.jsxs)("div",{className:"flex flex-1 items-center justify-center gap-[8px]",children:[(0,s.jsxs)("span",{"data-testid":"llm-bulk-progress",className:"text-[14px] text-[#48483F]",children:["LLM íì ",(0,s.jsx)("strong",{className:"text-[#4B3CC9]",children:m.progress.done})," /"," ",m.progress.total," ê±´"]}),(0,s.jsx)("span",{className:"text-[12px] text-[#78786A]",children:"ì´ íë©´ì ë ëë©´ ë©ì¶¥ëë¤"}),(0,s.jsx)("button",{type:"button","data-testid":"llm-bulk-cancel",onClick:m.onCancel,className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[5px] text-[14px] text-[#58584E] hover:bg-[#F4F3EF]",children:"ì¤ë¨"})]}),t>0&&!j&&S&&m&&L&&!m.progress&&(0,s.jsxs)("div",{className:"flex flex-1 items-center justify-center gap-[8px]",children:[(0,s.jsxs)("span",{className:"whitespace-nowrap text-[14px] text-[#48483F]",children:[(0,s.jsx)("strong",{className:"text-[#4B3CC9]",children:L.ids.length})," ê±´ì LLM ì¼ë¡ íì í©ëë¤ \xb7"," ",m.model]}),L.ids.length<t&&(0,s.jsxs)("span",{"data-testid":"llm-bulk-skipped",className:"text-[12px] text-[#78786A]",children:[[L.skippedNotReady>
160?"AI ê²í ë¨ê³ ìë ".concat(L.skippedNotReady):"",L.skippedDone>0?"ì´ë¯¸ LLM ê²í í¨ ".concat(L.skippedDone):"",L.skippedClaimed>0?"ë¤ë¥¸ ì¬ëì´ íì¸ ì¤ ".concat(L.skippedClaimed):"",L.overCap>0?"ìí ì´ê³¼ ".concat(L.overCap):""].filter(Boolean).join(" \xb7 ")," ","ì ì¸"]}),(0,s.jsx)("button",{type:"button","data-testid":"llm-bulk-confirm",disabled:0===L.ids.length,onClick:()=>{m.onRun(L.ids),M(!1)},className:"whitespace-nowrap rounded bg-[#4B3CC9] px-[12px] py-[5px] text-[14px] font-medium text-white hover:bg-[#3F32A8] disabled:cursor-not-allowed disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5]",children:"ì¤í"}),(0,s.jsx)("button",{type:"button",onClick:()=>M(!1),className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[5px] text-[14px] text-[#58584E] hover:bg-[#F4F3EF]",children:"ì·¨ì"})]}),t>0&&!j&&!S&&!(null==m?void 0:m.progress)&&(0,s.jsxs)("div",{className:"flex flex-1 items-center justify-center gap-[8px]",children:[(0,s.jsxs)("span",{className:"text-[14px] text-[#48483F]",children:[(0,s.jsx)("strong",{className:"text-[#10B981]",children:t})," ê±´ ì í"]}),void 0!==p&&t>p&&(0,s.jsxs)("span",{"data-testid":"offpage-selection-warning",className:"whitespace-nowrap rounded bg-[#FFF6E0] px-[10px] py-[5px] text-[14px] text-[#D98165]",children:["ì´ íì´ì§ ",p,"ê±´ \xb7 ë¤ë¥¸ íì´ì§ ",t-p,"ê±´"]}),(0,s.jsx)("span",{className:"text-[#DEDECE]",children:"\xb7"}),m&&A&&(0,s.jsx)("button",{type:"button","data-testid":"llm-bulk-open",onClick:()=>M(!0),className:"rounded bg-[#E3E0FE] px-[12px] py-[5px] text-[14px] font-medium text-[#4B3CC9] hover:bg-[#D4CFFB]",children:"LLM ì¼ë¡ íì "}),D.map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>w(e),className:"rounded px-[12px] py-[5px] text-[14px] font-medium ".concat(e.color),children:e.label},e.action)),c&&i&&(0,s.jsx)(tL,{rows:i,myEmail:o,onPick:e=>{let t=tZ[e];if(!t)return;let l=(0,ey.c)(e);w({action:t,label:l.label,color:l.color})}}),v&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[#DEDECE]",children:"\xb7"}),(0,s.jsx)("button",{type:"button",onClick:()=>g(!0),className:"rounded border border-[#DEDECE] bg-white px-[12px] py-[5px] text-[14px] font-medium text-[#48483F] hover:bg-[#F4F3EF]",children:"íê·¸"})]})]}),h&&(0,s.jsx)("div",{className:"ml-auto flex shrink-0 items-center gap-[8px]",children:h}),t>0&&j&&(0,s.jsxs)("div",{className:"flex flex-1 items-center justify-center gap-[8px]",children:[(0,s.jsxs)("span",{className:"whitespace-nowrap text-[14px] text-[#48483F]",children:[(0,s.jsx)("strong",{className:"text-[#10B981]",children:null!=F?F:t})," ê±´ \xb7 ",j.label,E&&null!=F&&F<t&&(0,s.jsxs)("span",{"data-testid":"bulk-status-skipped",className:"ml-[6px] text-[12px] text-[#78786A]",children:["(ì í ",t,"ê±´ ì¤"," ",[E.skippedSameStage>0?"ì´ë¯¸ ê·¸ ë¨ê³ ".concat(E.skippedSameStage):"",E.skippedClaimed>0?"ë¤ë¥¸ ë´ë¹ì íì¸ ì¤ ".concat(E.skippedClaimed):""].filter(Boolean).join(" \xb7 ")," ","ì ì¸)"]})]}),(0,s.jsx)("input",{type:"text",autoFocus:!0,value:y,onChange:e=>N(e.target.value),onKeyDown:e=>{"Enter"!==e.key||0===F||_||n(j.action,y.trim()||void 0),"Escape"===e.key&&B()},maxLength:500,"aria-label":"ì¼ê´ ì²ë¦¬ ì¬ì ",placeholder:k?"ëë리ë ì´ì (íì) \xb7 ì íí ê±´ ì ì²´ì í¨ê» 기ë¡ë©ëë¤":"ì¬ì (ì í) \xb7 ì íí ê±´ ì ì²´ì í¨ê» 기ë¡ë©ëë¤",className:"min-w-0 max-w-[340px] flex-1 rounded border bg-white px-[8px] py-[5px] text-[14px] text-[#48483F] placeholder:text-[#B8B8A8] focus:outline-none ".concat(_?"border-[#CD6565] focus:border-[#CD6565]":"border-[#DEDECE] focus:border-[#10B981]")}),(0,s.jsx)("button",{type:"button",disabled:0===F||_,title:_?"ëë리ë ì´ëì
ëë¤ â ì ëë리ëì§ ì ì´ ì£¼ì¸ì":0===F?E&&E.skippedClaimed>0&&0===E.skippedSameStage?"ì íí ê±´ì 모ë ë¤ë¥¸ ë´ë¹ìê° íì¸ ì¤ì
ëë¤ (ì´ëë§ ê°ë¥)":"ì íí ê±´ì´ ì´ë¯¸ ì´ ë¨ê³ì
ëë¤":void 0,onClick:()=>n(j.action,y.trim()||void 0),className:"whitespace-nowrap rounded px-[12px] py-[5px] text-[14px] font-medium disabled:cursor-not-allowed disabled:bg-[#F4F3EF] disabled:text-[#B9B9A5] ".concat(0===F||_?"":j.color),children:"ì¤í"}),_&&(0,s.jsx)("span",{"data-testid":"bulk-note-required",className:"whitespace-nowrap text-[12px] text-[#CD6565]",children:"ëë리ë ì´ë \xb7 ì¬ì íì"}),(0,s.jsx)("button",{type:"button",onClick:B,className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[5px] text-[14px] text-[#58584E] hover:bg-[#F4F3EF]",children:"ì·¨ì"})]}),a>1&&(0,s.jsxs)("span",{className:"text-[#78786A]",children:["íì´ì§ ",l," / ",a]}),(0,s.jsx)(eu.Z,{open:b,setOpen:g,selectedProducts:i,onSave:f.Hc,onConfirm:e=>{e&&(null==d||d(e))}})]})};
16var tY=l(18369),tK=l(10923);let tq=e=>{var t;let{channel:l,detections:a,statusFilter:n,activeId:i,preselectId:o,isLoading:c,selectionStore:x,onReviewClick:p,onBulkStatusChange:u,onTagged:m,llmBulk:h,trailing:b,pageSize:f=24}=e,[g]=(0,d.KO)(P.LF),v=null!==(t=null==g?void 0:g.email)&&void 0!==t?t:null,{rows:j,page:w,setPage:y,totalPages:N,pageRows:F,selected:k,currentId:C,markCurrent:_,toggleRow:D,allPageSelected:A,pageSelectedCount:B,togglePageSelection:S,runBulk:M}=L({detections:a,statusFilter:n,activeId:i,preselectId:o,isLoading:c,pageSize:f,onBulkStatusChange:u,store:x}),z=(0,r.useMemo)(()=>j.filter(e=>k.has(e.id)),[j,k]);return(0,s.jsxs)("div",{className:"flex w-full flex-col",children:[(0,s.jsx)(tH,{trailing:b,selectedCount:k.size,page:w,totalPages:N,onBulk:M,selectedRows:z,myEmail:v,pageSelectedCount:B,onTagged:m,llmBulk:h,allPageSelected:A,onTogglePageSelection:S,canMoveStage:(0,E.XJ)(g)}),0===F.length?(0,s.jsx)("div",{className:"rounded-[6px] border border-[#DEDECE] bg-white px-[14px] py-[20px] text-center text-[#7d7d6f]",children:"ë°ê²¬ ìì"}):(0,s.jsx)("div",{"data-testid":"shield-cards-".concat(l),style:{gridTemplateColumns:(0,ep.Ue)()},className:"grid gap-[20px]",children:F.map(e=>(0,s.jsx)(tY.z,{row:e,isSelected:k.has(e.id),isCurrent:C===e.id,myEmail:v,onToggle:t=>D(e.id,t),onOpen:()=>null==p?void 0:p(e),onFocus:()=>_(e.id)},e.id))}),(0,s.jsx)(tK.K,{page:w,totalPages:N,onChange:y})]})};var tG=l(52261),tW=l(80436),tX=l(30877);let tV=e=>{let{children:t}=e;return(0,s.jsx)("span",{className:"inline-block shrink-0 rounded-full border border-[#E5E5DC] px-[7px] py-[1px] text-[10px] font-medium text-[#78786A]",children:t})},t$=e=>{let{card:t,onOpenSource:l}=e,a=eS(t.adProduct),n=eL(t.surface),[i,o]=(0,r.useState)(null),d=(0,s.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-x-[7px] gap-y-[4px] text-[12px]",children:[t.advertiser&&(0,s.jsx)("span",{className:"min-w-0 truncate font-medium text-[#242424]",title:t.advertiser,children:t.advertiser}),t.displayUrl&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("span",{className:"text-[#DEDECE]",children:"\xb7"}),(0,s.jsx)("span",{className:"min-w-0 truncate text-[#767676]",title:t.displayUrl,children:t.displayUrl})]}),a&&(0,s.jsx)(tV,{children:a}),null!=t.rank&&(0,s.jsxs)(tV,{children:[t.rank,"ì"]}),n&&(0,s.jsx)(tV,{children:n})]}),c=t.urlMismatch&&t.landingHost&&(0,s.jsxs)("div",{className:"mt-[5px] flex items-center gap-[4px] text-[12px] text-[#CD6565]",children:[(0,s.jsx)(tW.Z,{size:12,className:"shrink-0"}),(0,s.jsxs)("span",{className:"min-w-0 truncate",children:["íìì ë¤ë¥¸ ê³³ì¼ë¡ ì´ë: ",(0,s.jsx)("strong",{className:"font-semibold",children:t.landingHost})]})]}),x=t.openUrl&&(0,s.jsxs)("a",{href:t.openUrl,target:"_blank",rel:"noreferrer",onClick:e=>{e.stopPropagation(),null==l||l()},onAuxClick:e=>{1===e.button&&(e.stopPropagation(),null==l||l())},title:t.openUrl,className:"mt-[6px] inline-flex items-center gap-[3px] text-[11px] text-[#3a7d8f] hover:underline",children:[(0,s.jsx)(tX.Z,{size:10,className:"shrink-0"}),t.landingConfirmed?"ê´ê³ íì´ì§ ì´ê¸°":"ìì§ë 주ì ì´ê¸°"]});return t.captureCard?(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),o(t.captureCard)},"aria-label":"ê´ê³ ìº¡ì² í¬ê² 보기",title:"ê²ì ê²°ê³¼ì ì´ë ê² ë
¸ì¶ëìµëë¤ â í´ë¦íë©´ ì본",className:"block w-full max-w-[460px] overflow-hidden rounded-[6px] border border-[#E5E5DC] bg-white transition-colors hover:border-[#10B981] focus:outline-none focus-visible:border-[#10B981]",children:(0,s.jsx)("img",{src:t.captureCard,alt:"ê²ì ê²°ê³¼ì ë
¸ì¶ë ê´ê³ ",loading:"lazy",className:"max-h-[200px] w-full object-cover object-top"})}),(0,s.jsx)("div",{className:"mt-[7px]",children:d}),c,x,(0,s.jsx)(eK.S,{target:i?{url:i,caption:"ê²ì ê²°ê³¼ì ì´ë ê² ë
¸ì¶ëìµëë¤"}:null,onClose:()=>o(null)})]}):(0,s.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-[14px]",children:[(0,s.jsxs)("div",{className:"min-w-0 flex-1",children:[d,t.title&&(0,s.jsx)("div",{className:"mt-[5px] line-clamp-2 min-w-0 text-[15px] leading-[1.4] text-[#1c5fc4]",title:t.title,children:t.title}),c,t.runPeriod&&(0,s.jsxs)("div",{className:"mt-[5px] text-[11px] text-[#8a8a7d]",children:["ê´ê³ ì§íê¸°ê° ",t.runPeriod]}),x]}),t.imageUrl&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),o(t.imageUrl)},"aria-label":"ê´ê³ ì´ë¯¸ì§ í¬ê² 보기",title:"ê´ê³ ì ì¬ì©ë ì´ë¯¸ì§",className:"h-[84px] w-[84px] shrink-0 overflow-hidden rounded-[10px] border border-[#
16E5E5DC] bg-white transition-colors hover:border-[#10B981] focus:outline-none focus-visible:border-[#10B981]",children:(0,s.jsx)("img",{src:t.imageUrl,alt:"ê´ê³ ì´ë¯¸ì§",loading:"lazy",className:"h-full w-full object-contain"})}),(0,s.jsx)(eK.S,{target:i?{url:i,caption:"ê´ê³ ì ì¬ì©ë ì´ë¯¸ì§"}:null,onClose:()=>o(null)})]})]})},tQ=(0,c.Z)("NotebookPen",[["path",{d:"M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4",key:"re6nr2"}],["path",{d:"M2 6h4",key:"aawbzj"}],["path",{d:"M2 10h4",key:"l0bgd4"}],["path",{d:"M2 14h4",key:"1gsvsf"}],["path",{d:"M2 18h4",key:"1bu2t1"}],["path",{d:"M18.4 2.6a2.17 2.17 0 0 1 3 3L16 11l-4 1 1-4Z",key:"1dba1m"}]]);var t0=l(8249),t1=l(29802),t8=l(47199),t4=l(36263);let t6=e=>{let{status:t}=e,l=(0,ey.c)(t);return(0,s.jsx)("span",{className:"inline-block rounded-sm px-[10px] py-[2px] text-[11px] font-semibold ".concat(l.color),children:l.label})},t2=e=>{let{value:t}=e;if(null==t)return(0,s.jsx)("span",{className:"text-[12px] text-[#7d7d6f]",children:"â"});let l=Math.round(100*t);return(0,s.jsxs)("div",{className:"flex items-center gap-[6px]",children:[(0,s.jsx)("div",{className:"h-[4px] w-[60px] overflow-hidden rounded bg-[#F4F3EF]",children:(0,s.jsx)("div",{className:"h-full ".concat(t>=.85?"bg-[#E89999]":t>=.7?"bg-[#EBA98B]":"bg-[#EDD1A0]"),style:{width:"".concat(l,"%")}})}),(0,s.jsxs)("span",{className:"text-[11px] text-[#78786A]",children:[l,"%"]})]})},t7="hidden xl:table-cell",t3="hidden min-[1400px]:table-cell",t5="hidden min-[1600px]:table-cell",t9="hidden min-[1750px]:table-cell",le="hidden 3xl:table-cell",lt=e=>{var t;let{channel:l,detections:a,statusFilter:n,activeId:i,preselectId:o,isLoading:c,selectionStore:x,onReviewClick:p,onBulkStatusChange:u,onTagged:m,llmBulk:h,trailing:b,pageSize:f=10}=e,[g]=(0,d.KO)(P.LF),v=null!==(t=null==g?void 0:g.email)&&void 0!==t?t:null,{rows:j,page:w,setPage:y,totalPages:N,pageRows:F,selected:C,currentId:_,markCurrent:D,toggleRow:A,allPageSelected:B,pageSelectedCount:S,togglePageSelection:M,runBulk:z}=L({detections:a,statusFilter:n,activeId:i,preselectId:o,isLoading:c,pageSize:f,onBulkStatusChange:u,store:x}),Z=(0,r.useMemo)(()=>j.filter(e=>C.has(e.id)),[j,C]);return(0,s.jsxs)("div",{className:"flex w-full flex-col",children:[(0,s.jsx)(tH,{trailing:b,selectedCount:C.size,page:w,totalPages:N,onBulk:z,selectedRows:Z,myEmail:v,pageSelectedCount:S,onTagged:m,llmBulk:h,canMoveStage:(0,E.XJ)(g)}),(0,s.jsx)("div",{className:"overflow-hidden rounded-[6px] border border-[#DEDECE] bg-white",children:(0,s.jsxs)("table",{className:"w-full table-fixed text-[13px]",children:[(0,s.jsx)("thead",{className:"bg-[#F4F3EF] text-[12px] font-medium text-[#78786A]",children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{className:"w-[40px] px-[10px] py-[10px] text-left",children:(0,s.jsx)(t1.o,{label:"íì¬ íì´ì§ ì ì²´ ì í",checked:!!B||S>0&&"indeterminate",onSelect:()=>M()})}),(0,s.jsx)("th",{className:"w-[110px] px-[14px] py-[10px] text-left",children:"ë°ê²¬ ìê°"}),(0,s.jsx)("th",{className:"px-[14px] py-[10px] text-left",children:"ìí / ì¶ì²"}),(0,s.jsx)("th",{className:"w-[100px] px-[14px] py-[10px] text-left ".concat(t5),children:"íë«í¼"}),(0,s.jsx)("th",{className:"w-[110px] px-[14px] py-[10px] text-left ".concat(t3),children:"ê²ìì´"}),(0,s.jsx)("th",{className:"w-[120px] px-[14px] py-[10px] text-left ".concat(t9),children:"ë¸ëë"}),(0,s.jsx)("th",{className:"w-[90px] px-[14px] py-[10px] text-left ".concat(t7),children:"ìí"}),(0,s.jsx)("th",{className:"w-[120px] px-[14px] py-[10px] text-left ".concat(le),children:"AI ìì¬ë"}),(0,s.jsx)("th",{className:"w-[60px] px-[14px] py-[10px] text-left",children:"LLM"})]})}),(0,s.jsxs)("tbody",{children:[0===F.length&&(0,s.jsx)("tr",{children:(0,s.jsx)("td",{colSpan:9,className:"px-[14px] py-[20px] text-center text-[#7d7d6f]",children:"ë°ê²¬ ìì"})}),F.map(e=>{var t,a,n;let r=C.has(e.id),i=_===e.id,o="ads"===l?ez(e.raw_data):null;return(0,s.jsxs)("tr",{onClick:()=>null==p?void 0:p(e),className:"cursor-pointer border-t border-[#F4F3EF] ".concat((0,tG.B)({isSelected:r,isCurrent:i})),"data-testid":"shield-row-".concat(e.id),"data-selected":r,"data-current":i,children:[(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top",children:(0,s.jsx)(t1.o,{label:"row ".concat(e.id," ì í"),checked:r,onSelect:t=>A(e.id,t)}
16)}),(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top text-[12px] text-[#78786A]",children:(0,G.Z)(e.detected_at).format("MM-DD HH:mm")}),(0,s.jsxs)("td",{className:"overflow-hidden px-[14px] py-[10px] align-top",children:[o?(0,s.jsxs)("div",{className:"flex items-start gap-[6px]",children:[(0,s.jsx)(t$,{card:o,onOpenSource:()=>D(e.id)}),(0,s.jsx)(t0.j,{memoImages:e.memo_images})]}):(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-[6px] font-medium text-[#48483F]",children:[(0,s.jsx)("span",{className:"min-w-0 truncate",title:e.threat_summary,children:e.threat_summary}),(0,s.jsx)(t0.j,{memoImages:e.memo_images})]}),(0,s.jsx)("a",{href:e.source_url,target:"_blank",rel:"noreferrer",onClick:t=>{t.stopPropagation(),D(e.id)},onAuxClick:t=>{1===t.button&&(t.stopPropagation(),D(e.id))},className:"mt-[2px] block truncate text-[11px] text-[#3a7d8f] hover:underline",children:e.source_url})]}),(0,s.jsxs)("div",{className:"mt-[4px]",children:[(0,s.jsx)(t8.U,{claimedBy:e.claimed_by,claimedName:e.claimed_name,myEmail:v}),(0,s.jsx)(t4.E,{tags:e.tags,max:3,size:"sm"})]}),e.memo&&(0,s.jsxs)("div",{"data-testid":"row-memo-".concat(e.id),title:e.memo,className:"mt-[4px] flex items-center gap-[4px] truncate text-[11px] text-[#78786A]",children:[(0,s.jsx)(tQ,{size:11,className:"shrink-0 text-[#A3A396]"}),(0,s.jsx)("span",{className:"truncate",children:e.memo})]})]}),(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top ".concat(t5),children:(0,s.jsx)(eY.C,{label:(0,X.s)(e)})}),(0,s.jsx)("td",{className:"overflow-hidden px-[14px] py-[10px] align-top text-[12px] text-[#48483F] ".concat(t3),children:(0,s.jsx)("div",{className:"truncate",title:null!==(t=e.keyword)&&void 0!==t?t:void 0,children:null!==(a=e.keyword)&&void 0!==a?a:"-"})}),(0,s.jsx)("td",{className:"overflow-hidden px-[14px] py-[10px] align-top text-[#48483F] ".concat(t9),children:(0,s.jsx)("div",{className:"truncate",title:null!==(n=e.brand)&&void 0!==n?n:void 0,children:e.brand})}),(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top ".concat(t7),children:(0,s.jsx)(t6,{status:e.status})}),(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top ".concat(le),children:(0,s.jsx)(t2,{value:e.confidence})}),(0,s.jsx)("td",{className:"px-[14px] py-[10px] align-top",children:(0,s.jsx)("div",{className:"flex flex-col items-start gap-[4px]",children:(0,k.jZ)(e.signals)&&(0,s.jsx)("span",{"data-testid":"llm-done-".concat(e.id),title:"LLM ì´ ì´ë¯¸ ê²í í ê±´ì
ëë¤",className:"rounded-sm bg-[#E3E0FE] px-[7px] py-[1px] text-[10px] font-semibold text-[#4B3CC9]",children:"LLM â"})})})]},e.id)})]})]})}),(0,s.jsx)(tK.K,{page:w,totalPages:N,onChange:y})]})};var ll=l(81395),la=l(38880),ln=l(42057),ls=l(94719),lr=l(69824);let li={search:"",dateRange:"all",statuses:[],confidenceLevels:[],platforms:[],tags:[],tagMode:"include",hasMemo:!1},lo=[{value:"all",label:"ì ì²´"},{value:"24h",label:"ìµê·¼ 24ìê°"},{value:"72h",label:"ìµê·¼ 72ìê°"},{value:"7d",label:"ìµê·¼ 1주ì¼"},{value:"14d",label:"ìµê·¼ 2주ì¼"},{value:"30d",label:"ìµê·¼ 30ì¼"}],ld=e=>{let{id:t,title:l,extra:a,className:n="",children:i}=e,[o,d]=(0,r.useState)(!0);return(0,s.jsxs)("div",{className:"flex w-full flex-col ".concat(n),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between gap-[8px]",children:[(0,s.jsxs)("button",{type:"button","data-testid":"filter-section-".concat(t),"aria-expanded":o,onClick:()=>d(e=>!e),className:"flex h-[24px] flex-1 cursor-pointer select-none items-center justify-between font-semibold text-black",children:[l,(0,s.jsx)(ll.Z,{size:18,className:"shrink-0 transition-transform ".concat(o?"":"-rotate-90")})]}),a]}),o&&(0,s.jsx)("div",{className:"mt-[14px]",children:i})]})},lc=e=>{let{label:t,checked:l,onToggle:a,clampLabel:n,count:r}=e;return(0,s.jsxs)("label",{htmlFor:"shield-filter-".concat(t),className:"flex cursor-pointer items-center gap-[8px] text-[14px] font-medium text-[#58584E]",children:[(0,s.jsx)(eN.X,{id:"shield-filter-".concat(t),"aria-label":t,checked:l,onCheckedChange:()=>a(),className:"h-[20px] w-[20px] shrink-0 cursor-pointer"}),(0,s.jsx)("span",{className:n?"line-clamp-1 break-all":void 0,children:t}),void 0!==r&&(0,s.jsx)("span",{className:"ml-auto shrink-0 text-[#78786A]",children:(0,ls.jZ)(r)})]})},lx=e=>{let{value:t,onChange:l,matchedCount:a,totalCount:n,platformOptions:i,tagOptions:o,dateLabel:d="ë°ê²¬ 기ê°",collapsed:c,onToggle:x,platformCounts:p,tagCounts:u}=e,[h,b]=r.useState(""),[f,g]=r.useState(!1),v=r.useMemo(()=>{let e=h.trim().toLowerCase(),l=e?(null!=o?o:[]).filter(t=>t.toLowerCase().includes(e)):null!=o?o:[];if(e||f)return l;let a=l.slice(0,10),n=l.filter(e=>t.tags.includes(e)&&!a.includes(e));return[...a,...n]},[o,h,f,t.tags]),j=e=>l({...t,platforms:(0,lr.p)(t.platforms,e)}),w=e=>l({...t,tags:(0,lr.p)(t.tags,e)}),y=()=>{b(""),g(!1),l(li)};return c?null:(0,s.jsxs)("aside",{className:"custom-scroll sticky top-[70px] flex h-[calc(100vh-70px)] w-[270px] shrink-0 flex-col overflow-y-auto border-r border-[#DEDECE] px-[30px] pb-[60px] pt-[18px]","data-testid":"shield-filter-panel",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsx)("span",{className:"text-[22px] font-[500] text-[#48483F]",children:"íí°"}),(0,s.jsx)(m.Z,{collapsed:!1,onToggle:x})]}),(0,s.jsx)("div",{className:"mt-[24px]",children:(0,s.jsxs)("div",{className:"flex h-[40px] w-full overflow-hidden rounded-full border border-[#48483F] bg-white",children:[(0,s.jsx)("input",{type:"text",value:t.search,onChange:e=>l({...t,search:e.target.value}),placeholder:"ìí / URL",className:"h-full w-full border-none bg-transparent pl-[16px] text-[14px] font-medium tracking-tight outline-none ring-0 placeholder:text-[#A3A396]"}),(0,s.jsx)("div",{className:"flex items-center justify-center pl-[10px] pr-[14px]",children:(0,s.jsx)(la.Z,{size:20,"data-testid":"filter-search-icon",className:"text-[#48483F]"})})]})}),(0,s.jsx)("div",{className:"mt-[30px]",children:(0,s.jsxs)("label",{htmlFor:"shield-filter-has-memo",className:"flex cursor-pointer items-center gap-[8px] text-[14px] font-medium text-[#58584E]",children:[(0,s.jsx)(eN.X,{id:"shield-filter-has-memo","aria-label":"ë©ëª¨ ìë ê±´ë§",checked:t.hasMemo,onCheckedChange:e=>l({...t,hasMemo:!0===e}),className:"h-[20px] w-[20px] shrink-0 cursor-pointer"}),"ë©ëª¨ ìë ê±´ë§"]})}),(0,s.jsx)(ld,{id:"date",title:d,className:"mt-[30px]",children:(0,s.jsxs)(ln.Ph,{value:t.dateRange,onValueChange:e=>l({...t,dateRange:e}),children:[(0,s.jsx)(ln.i4,{"aria-label":"ë°ê²¬ 기ê°",className:"h-[38px] w-full rounded-[5px] !border-[#DEDECE] px-[10px] text-[14px] font-medium text-[#48483F]",children:(0,s.jsx)(ln.ki,{})}),(0,s.jsx)(ln.Bw,{children:lo.map(e=>(0,s.jsx)(ln.Ql,{value:e.value,className:"text-[14px]",children:e.label},e.value))})]})}),i&&i.length>0&&(0,s.jsx)(ld,{id:"platforms",title:"íë«í¼ (ë¤ì¤ ì í)",className:"mt-[30px]",children:(0,s.jsx)("div",{className:"flex flex-col gap-[12px]",children:i.map(e=>(0,s.jsx)(lc,{label:e,checked:t.platforms.includes(e),onToggle:()=>j(e),count:null==p?void 0:p[e]},e))})}),o&&o.length>0&&(0,s.jsxs)(ld,{id:"tags",title:"íê·¸ (ë¤ì¤ ì í)",className:"mt-[30px]",extra:(0,s.jsx)(s.Fragment,{children:(0,s.jsx)("div",{className:"flex overflow-hidden rounded border border-[#DEDECE] text-[10px]",children:["include","exclude"].map(e=>(0,s.jsx)("button",{type:"button",onClick:()=>l({...t,tagMode:e}),"aria-pressed":t.tagMode===e,className:"px-[6px] py-[2px] ".concat(t.tagMode===e?"bg-[#58584E] text-white":"bg-white text-[#78786A]"),
16children:"include"===e?"í¬í¨":"ì ì¸"},e))})}),children:[(0,s.jsx)("input",{type:"text",value:h,onChange:e=>b(e.target.value),placeholder:"íê·¸ ê²ì","aria-label":"íê·¸ ê²ì",className:"h-[38px] w-full rounded-[5px] border border-[#DEDECE] bg-white px-[10px] text-[14px] font-medium outline-none placeholder:text-[#A3A396] focus:border-[#48483F]"}),(0,s.jsx)("div",{className:"mt-[12px] flex flex-col gap-[12px]",children:0===v.length?(0,s.jsx)("span",{className:"text-[11px] text-[#B9B9A5]",children:"ê²ì ê²°ê³¼ ìì"}):v.map(e=>(0,s.jsx)(lc,{label:e,count:null==u?void 0:u[e],checked:t.tags.includes(e),onToggle:()=>w(e),clampLabel:!0},e))}),!h.trim()&&!f&&o.length>10&&(0,s.jsxs)("button",{type:"button",onClick:()=>g(!0),className:"mt-[6px] flex w-fit cursor-pointer items-center gap-[4px] p-[4px] text-[14px] font-bold hover:bg-[#f7f7f6]",children:[o.length-10,"ê° ë 보기"]})]}),(0,s.jsxs)("div",{className:"mt-[30px] flex items-center justify-between border-t border-[#DEDECE] pt-[10px]",children:[(0,s.jsx)("span",{className:"text-[11px] text-[#78786A]",children:null!=a&&null!=n?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("strong",{className:"font-bold text-[#48483F]",children:a})," / ",n]}):""}),(0,s.jsx)("button",{type:"button",onClick:y,className:"rounded border border-[#DEDECE] bg-white px-[10px] py-[4px] text-[11px] text-[#78786A] hover:bg-[#FAFAF6]",children:"ì´ê¸°í"})]})]})};var lp=l(66198);let lu=r.forwardRef((e,t)=>{let{point:l,detection:a,isActive:n,onFocus:r,onDetail:i,selected:o,onToggleSelect:d}=e,c=(0,ey.c)(a.status),x=(0,k.dC)((0,k.Jo)(a.signals).ml_rule),p=(0,X.s)(a);return(0,s.jsxs)("div",{ref:t,onClick:r,className:"cursor-pointer rounded border bg-white px-[12px] py-[10px] transition-colors ".concat(n?"border-[#48483F] border-2":"border-[#DEDECE] hover:border-[#B9B9A5]"),children:[(0,s.jsxs)("div",{className:"flex items-start justify-between gap-[6px]",children:[d&&(0,s.jsx)(t1.o,{label:"".concat(l.placeName||"ì§ì "," ì í"),checked:!!o,onSelect:d,className:"mt-[2px]"}),(0,s.jsx)("div",{className:"line-clamp-2 min-w-0 text-[12px] font-semibold text-[#3A3A31]",children:l.placeName||"(ìí¸ ë¯¸ì)"}),(0,s.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-full px-[6px] py-[2px] text-[10px] font-medium ".concat(c.color),children:c.label})]}),l.address&&(0,s.jsx)("div",{className:"mt-[4px] truncate text-[11px] text-[#78786A]",children:l.address}),(0,s.jsxs)("div",{className:"mt-[6px] flex items-center justify-between gap-[4px]",children:[(0,s.jsxs)("span",{className:"flex min-w-0 items-center gap-[4px]",children:["-"!==p&&(0,s.jsx)(eY.C,{label:p,size:"sm"}),l.phone&&(0,s.jsx)("span",{className:"truncate text-[10px] text-[#9B9B8C]",children:l.phone}),x&&(0,s.jsx)("span",{className:"shrink-0 whitespace-nowrap rounded-full px-[6px] py-[1px] text-[10px] font-medium ".concat(x.color),children:x.label})]}),(0,s.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),i()},className:"rounded bg-[#F4F3EF] px-[8px] py-[2px] text-[10px] text-[#48483F] hover:bg-[#E8E7DF]",children:"ìì¸"})]})]})});lu.displayName="ShieldMapCard";let lm=e=>{var t;let{trailing:l,detections:a,onDetailClick:n,onBulkStatusChange:i,preselectId:o,pageSize:d=100,isLoading:c,selectionStore:x}=e,[p,u]=(0,r.useState)(7),[m,h]=(0,r.useState)(null),[b,f]=(0,r.useState)(null),g=(0,r.useRef)(new Map),v=(0,r.useMemo)(()=>a.map(e=>({detection:e,point:eT(null!==(t=e.raw_data)&&void 0!==t?t:null)})).filter(e=>null!=e.point),[a]),j=(0,r.useMemo)(()=>eU(v.map(e=>({lat:e.point.lat,lng:e.point.lng,status:e.detection.status})),p<9?.5:.15),[v,p]),w=(0,r.useMemo)(()=>v.map(e=>({address:String(e.detection.id),lat:e.point.lat,lng:e.point.lng,seller_count:1,product_count:1,top_status:e.detection.status})),[v]),y=(0,r.useCallback)((e,t)=>{u(t)},[]),N=(0,r.useCallback)(e=>{h(e.detection.id),f({lat:e.point.lat,lng:e.point.lng,zoom:15})},[]),E=(0,r.useCallback)(e=>{let t=v.find(t=>String(t.detection.id)===e);if(t){if(m===t.detection.id){n(t.detection);return}N(t)}},[v,m,N,n]),F=(0,r.useMemo)(()=>v.map(e=>e.detection.id),[v]),{selected:k,toggleRow:C,runBulk:_,allPageSelected:D,togglePageSelection:A}=L({detections:a,preselectId:o,isLoading:c,pageSize:d,onBulkStatusChange:i,store:x});return(0,r.useEffect)(()=>{var e;null!=m&&(null===(e=g.current.get(m))||void 0===e||e.scrollIntoView({behavior:"smooth",block:"nearest"}))},[m]),(0,s.jsxs)("div",{className:"flex flex-col gap-[8px]",children:[(i||l)&&(0,s.jsx)(tH,{trailing:l,selectedCount:k.size,page:1,totalPages:1,onBulk:_,allPageSelected:D,onTogglePageSelection:A}),(0,s.jsxs)("div",{className:"flex h-[560px] gap-[12px]",children:[(0,s.jsxs)("div",{className:"grid w-[480px] shrink-0 auto-rows-min grid-cols-2 content-start gap-[8px] overflow-y-auto pr-[2px]",children:[0===v.length&&(0,s.jsx)("div",{className:"col-span-2 rounded border border-[#DEDECE] bg-white px-[12px] py-[16px] text-[12px] text-[#78786A]",children:"ì¢íê° ìë ë°ê²¬ ê±´ì´ ììµëë¤."}),v.map(e=>(0,s.jsx)(lu,{ref:t=>{t?g.current.set(e.detection.id,t):g.current.delete(e.detection.id)},point:e.point,detection:e.detection,isActive:m===e.detection.id,onFocus:()=>N(e),onDetail:()=>n(e.detection),selected:k.has(e.detection.id),onToggleSelect:i?t=>C(e.detection.id,t,F):void 0},e.detection.id))]}),(0,s.jsx)("div",{className:"relative min-w-0 flex-1 overflow-hidden rounded border border-[#DEDECE] bg-white",children:(0,s.jsx)(lp.default,{cluster
16s:j,markers:w,zoomLevel:p,isLoading:!1,onBoundsChange:y,onMarkerClick:E,resolveMarkerColor:eJ,focus:b,activeKey:null!=m?String(m):null})})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between text-[11px] text-[#78786A]",children:[(0,s.jsxs)("span",{children:["ì§ë íì ",v.length,"ê±´",v.length<a.length&&" \xb7 ì¢í ìì ".concat(a.length-v.length,"ê±´ (í
ì´ë¸ìì íì¸)")]}),(0,s.jsxs)("span",{className:"flex items-center gap-[10px]",children:[(0,s.jsx)(lh,{color:"#8B7BC8",label:"AI ê²í "}),(0,s.jsx)(lh,{color:"#D98165",label:"íì¸íì"}),(0,s.jsx)(lh,{color:"#CD6565",label:"ì ê³ ê³ì´"}),(0,s.jsx)(lh,{color:"#9AA7BF",label:"ìì§ìë£"})]})]})]})},lh=e=>{let{color:t,label:l}=e;return(0,s.jsxs)("span",{className:"flex items-center gap-[4px]",children:[(0,s.jsx)("span",{className:"inline-block h-[10px] w-[10px] rounded-full border border-white shadow-sm",style:{backgroundColor:t}}),l]})};var lb=l(11298);let lf="rounded border border-[#DEDECE] bg-white px-[7px] py-[3px] hover:border-[#10B981]/60 disabled:opacity-40 disabled:hover:border-[#DEDECE]",lg=e=>{let{page:t,totalPages:l,onChange:a}=e;return l<=1?null:(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-[4px] text-[11px] text-[#78786A]",children:[(0,s.jsx)("button",{type:"button","aria-label":"ì´ì íì´ì§",disabled:t<=1,onClick:()=>a(Math.max(1,t-1)),className:lf,children:"â¹"}),(0,s.jsxs)("span",{className:"whitespace-nowrap tabular-nums",children:[(0,s.jsx)("strong",{className:"font-bold text-[#48483F]",children:t})," / ",l]}),(0,s.jsx)("button",{type:"button","aria-label":"ë¤ì íì´ì§",disabled:t>=l,onClick:()=>a(Math.min(l,t+1)),className:lf,children:"âº"})]})},lv="h-[64px]",lj={value:"text-[#48483F]",zero:"text-[#C9C9BA]"},lw=(e,t)=>{let l=t?"100% 0, 100% 100%":"calc(100% - ".concat(16,"px) 0, 100% 50%, calc(100% - ").concat(16,"px) 100%");return"polygon(0 0, ".concat(l,", ").concat(e?"0 100%":"0 100%, ".concat(16,"px 50%"),")")},ly=e=>{let{n:t,isActive:l}=e;return(0,s.jsx)("span",{"data-testid":"stage-count",className:"block text-[26px] font-semibold tabular-nums leading-[30px] ".concat(l?"text-white":t>0?"text-[#48483F]":"text-[#C9C9BA]"),children:(0,ls.jZ)(t)})},lN=e=>{let{text:t,isActive:l,dim:a}=e;return(0,s.jsx)("span",{"data-testid":"stage-label",className:"block whitespace-nowrap text-[12px] font-medium leading-[14px] ".concat(l?"text-white/85":a?"text-[#B9B9A5]":"text-[#78786A]"),children:t})},lE=e=>{let{n:t,isActive:l,compact:a}=e;return(0,s.jsx)("span",{className:"inline-block rounded-full text-center font-bold tabular-nums ".concat(a?"ml-[5px] min-w-[18px] px-[5px] text-[11px]":"ml-[7px] min-w-[22px] px-[7px] py-[1px] text-[12px]"," ").concat(l?"bg-white/25 text-white":t>0?"bg-white text-[#78786A]":"bg-white/60 text-[#B9B9A5]"),children:t})},lF=e=>{let{stage:t,stats:l,active:a,onChange:n,title:r}=e,i=a===t.key,o=(0,ea.Yr)(t.statuses,l);return(0,s.jsxs)("button",{type:"button","data-testid":"exit-stage",onClick:()=>n(t.key),"aria-current":i?"true":void 0,title:r,className:"flex h-[22px] shrink-0 items-center whitespace-nowrap rounded-[4px] px-[11px] text-[11px] font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset ".concat(i?"bg-[#48483F] text-white focus-visible:ring-white/70":"bg-[#F4F3EF] hover:bg-[#E9E9DF] hover:text-[#48483F] focus-visible:ring-[#48483F]/50 ".concat(o>0?"text-[#78786A]":"text-[#A3A392]")),children:[t.label,(0,s.jsx)(lE,{n:o,isActive:i,compact:!0})]})},lk=e=>{let{active:t,onChange:l,stats:a,role:n,onExitSelect:i,activeExitFrom:o,filtered:d=!1}=e,c=d?"bg-[#3A7D8F]":"bg-[#10B981]",x=(0,r.useMemo)(()=>(0,ea.a0)(n),[n]),[p,...u]=x,m=t===p.key,h=(0,r.useMemo)(()=>(0,ea.HO)(a),[a]),b=h.find(e=>"unrelated"===e.key),f=h.filter(e=>"unrelated"!==e.key);return(0,s.jsxs)("div",{className:"scrollbar-custom flex min-w-0 items-start overflow-x-auto py-[3px]",children:[u.map((e,n)=>{let r=t===e.key,d=0===n,x=n===u.length-1,p=(0,ea.Yr)(e.statuses,a),m=(0,ea.ND)(e.statuses,a);return(0,s.jsxs)("div",{"data-testid":"stage-column",className:"flex min-w-[132px] flex-1 flex-col gap-[4px]",style:{marginLeft:d?void 0:-13}
16,children:[(0,s.jsxs)("button",{type:"button","data-testid":"pipeline-stage",onClick:()=>l(e.key),"aria-current":r?"step":void 0,style:{clipPath:lw(d,x),paddingLeft:d?18:31,paddingRight:x?18:29,filter:r?"drop-shadow(0 3px 7px rgba(46,46,40,0.24))":void 0},className:"flex ".concat(lv," w-full flex-col justify-center gap-[2px] text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset ").concat(r?"".concat(c," focus-visible:ring-white/70"):"bg-[#F4F3EF] hover:bg-[#E9E9DF] focus-visible:ring-[#48483F]/50"),children:[(0,s.jsx)(lN,{text:e.label,isActive:r,dim:0===p}),(0,s.jsx)(ly,{n:p,isActive:r})]}),(0,s.jsx)("div",{className:"px-[2px]",style:{marginLeft:d?void 0:13},children:(()=>{if(x)return null;let t="all"===e.statuses?[]:e.statuses,l=!!i&&t.length>0,a=(0,ea.pW)(t,o);return(0,s.jsx)(l?"button":"div",{...l?{type:"button",onClick:()=>null==i?void 0:i(t)}:{},"data-testid":"stage-exit","data-paired":r?"true":void 0,"data-viewing":a?"true":void 0,title:m>0?"".concat(e.label," ë¨ê³ìì 무ê´ì¼ë¡ ë¹ ì§ ").concat(m,"ê±´").concat(l?" â ëë¬ì 보기":""):"".concat(e.label," ë¨ê³ìì 무ê´ì¼ë¡ ë¹ ì§ ê±´ì´ ììµëë¤"),className:"flex h-[22px] w-full items-center justify-center rounded-[3px] text-[11px] font-medium tabular-nums transition-colors ".concat(a?"".concat(c," text-white"):"".concat("bg-[#FAFAF6]"," ").concat(m>0?lj.value:lj.zero)).concat(l?"cursor-pointer hover:brightness-95":""),children:"â ".concat(m)})})()})]},e.key)}),(0,s.jsxs)("div",{"data-testid":"overview-group",className:"ml-[20px] flex shrink-0 flex-col gap-[4px]",children:[(0,s.jsxs)("button",{type:"button",onClick:()=>l(p.key),"aria-current":m?"true":void 0,className:"flex ".concat(lv," ").concat("rounded-[8px]"," min-w-[152px] flex-col justify-center gap-[2px] whitespace-nowrap px-[18px] text-left transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-inset ").concat(m?"bg-[#48483F] focus-visible:ring-white/70":"bg-[#F4F3EF] hover:bg-[#E9E9DF] focus-visible:ring-[#48483F]/50"),children:[(0,s.jsx)(lN,{text:p.label,isActive:m,dim:!1}),(0,s.jsx)(ly,{n:(0,ea.Yr)(p.statuses,a),isActive:m})]}),(0,s.jsxs)("div",{"data-testid":"overview-bottom-row",className:"flex h-[22px] items-center gap-[4px]",children:[b&&(0,s.jsx)(lF,{stage:b,stats:a,active:t,onChange:l,title:"ì§ê¸ 무ê´ì¼ë¡ ë¶ë¥ë ê±´ (ê²½ë¡ë¥¼ 모르ë ì ê¸°ë¡ í¬í¨). ì¼ìª½ì ê° ë¨ê³ìì ë´ë³´ë¸ íìì
ëë¤."}),f.map(e=>(0,s.jsx)(lF,{stage:e,stats:a,active:t,onChange:l,title:"ì´ë ë¨ê³ìë ìíì§ ìë ê±´ â íììë 0 ì
ëë¤"},e.key))]})]})]})},lC=e=>{var t,l,a,n,c;let{channel:b}=e,v=(0,o.useRouter)(),[j]=(0,d.KO)(P.LF),w=null!==(l=null==j?void 0:j.role)&&void 0!==l?l:null,N=(0,r.useMemo)(()=>(0,ea.a0)(w),[w]),[E,F]=(0,r.useState)(null),k=null!==(a=null!=E?E:null===(t=N[1])||void 0===t?void 0:t.key)&&void 0!==a?a:"all",[C,_]=(0,r.useState)(li),{collapsed:D,toggle:A}=I(),{t:S}=(0,i.$G)(["shield"]),[L,z]=(0,r.useState)(null),Z=Y(b),R=K(b),[J,U]=(0,r.useState)(R?"map":"ads"===b?"table":Z?"cards":"table"),[H,G]=(0,r.useState)(1),[W,V]=(0,r.useState)(null),[$,Q]=(0,r.useState)(null),et=M(),[es,eo]=(0,r.useState)(50),ep=R&&"map"===J,eu=ed({isMapView:ep,pageSize:es}),[em,eh]=(0,r.useState)("");(0,r.useEffect)(()=>{let e=setTimeout(()=>eh(C.search.trim()),400);return()=>clearTimeout(e)},[C.search]);let eb=er({debouncedSearch:em,filter:C,viewMode:J,channel:b,stage:k,pageSize:es,exitFrom:W});(0,r.useEffect)(()=>{G(1)},[eb]);let ef="closed"===k?"reviewed":void 0,eg=(0,r.useMemo)(()=>ee({channel:b,filter:C,search:em,dateField:ef}),[b,C,em,ef]),ev=el(eg),ej=(0,r.useMemo)(()=>ex(k,w,null),[k,w]),ew=(0,r.useMemo)(()=>({...eg,tag_status_in:(0,ea.Cu)(ej)}),[eg,ej]),{stats:ey,mutate:eN}=g(ew),eE=ex(k,w,null!=ey?ey:null),eF=Array.isArray(eE)&&0===eE.length,{list:ek,total:eC,page:e_,isLoading:eD,mutate:eA}=(0,h.Z)(eF?null:{...eg,status_in:(0,ea.Cu)(eE),exit_from_in:W&&W.length>0?W.join(","):void 0,page:H,limit:eu}),{llmEnabled:eB,llmJudgingId:eS,llmResult:eM,clearLlmResult:eL,llmError:ez,setLlmError:eZ,llmBulk:eI,llmBulkSummary:eP,setLlmBulkSummary:eR,runLlmJudge:eO}=B({user:j,refresh:()=>Promise.all([eA(),eN()]),onJudged:z});(0,r.useEffect)(()=>{eL()},[null==L?void 0:L.id,eL]);let eT=(0,r.useRef)(null);(0,r.useEffect)(()=>
16{if(!v.isReady)return;let e=(0,q.dG)(v.query.detection);null!==e&&eT.current!==e&&(eT.current=e,(0,f.ZU)(e).then(e=>{z(e);let t=(0,ea.st)(e.status,w);t&&F(t),Q(e.id)}).catch(t=>{console.warn("[shield] ë¥ë§í¬ ìì¸ ì¡°í ì¤í¨ (detection=".concat(e,")"),t)}).finally(()=>{let e={...v.query};delete e.detection,v.replace({pathname:v.pathname,query:e},void 0,{shallow:!0})}))},[v.isReady,v.query.detection]),(0,r.useEffect)(()=>{z(e=>{if(!e)return e;let t=ek.find(t=>t.id===e.id);return null!=t?t:e})},[ek]);let eJ=e=>{eA(t=>(0,en.J)(t,e),{revalidate:!1}),eN()},eU=(0,r.useMemo)(()=>O(ek,C,"all"),[ek,C]),eH=Math.max(1,Math.ceil(eC/eu)),eY=y({rows:eU,target:L,setTarget:z,page:H,setPage:G,loadedPage:e_,totalPages:eH,resetKey:eb}),eK=(0,r.useMemo)(()=>ec(null==ey?void 0:ey.platform_counts,b),[null==ey?void 0:ey.platform_counts,b]),eq=(0,r.useMemo)(()=>{let e=Object.keys(eK);if(e.length>0)return e.sort();let t=new Set;for(let l of ek){let a=(0,X.s)(l);a&&"-"!==a&&t.add(a)}return Array.from(t).sort()},[eK,ek]),eG=(0,r.useMemo)(()=>{var e;let t=null!==(e=null==ey?void 0:ey.tag_options)&&void 0!==e?e:[],l=C.tags.filter(e=>!t.includes(e));return 0===l.length?t:[...t,...l].sort()},[null==ey?void 0:ey.tag_options,C.tags]),eW=null==ey?void 0:ey.tag_counts,eX=async(e,t,l)=>{var a;let n=tz[t],s=e.map(e=>ek.find(t=>t.id===e)).filter(Boolean),{ids:r}=T(s,n,null!==(a=null==j?void 0:j.email)&&void 0!==a?a:null);0!==r.length&&(1===r.length?await (0,f.HX)(r[0],{status:n,note:l}):await (0,f.uN)({ids:r,status:n,note:l}),await Promise.all([eA(),eN()]))},eV=(0,s.jsxs)("div",{"data-testid":"channel-list-tools",className:"flex shrink-0 items-center gap-[8px] py-[6px]",children:[(!ep||eH>1)&&(0,s.jsx)(lg,{page:H,totalPages:eH,onChange:G}),!ep&&(0,s.jsxs)("label",{className:"flex shrink-0 items-center gap-[8px] whitespace-nowrap text-[14px] font-[600] text-[#58584E]",children:["íì´ì§ë¹",(0,s.jsx)("select",{"aria-label":"íì´ì§ë¹ íì ê±´ì",value:es,onChange:e=>eo(Number(e.target.value)),className:"rounded border border-[#DEDECE] bg-white px-[12px] py-[6px] text-[14px] text-[#58584E] hover:bg-[#f7f7f6]/50",children:ei.map(e=>(0,s.jsxs)("option",{value:e,children:[e,"ê±´"]},e))})]}),(Z||R)&&(0,s.jsxs)("div",{className:"flex shrink-0 items-center gap-[2px] rounded border border-[#DEDECE] bg-white p-[2px]",children:[Z&&(0,s.jsxs)("button",{type:"button","aria-label":"ì¹´ë ë·°",onClick:()=>U("cards"),className:"flex shrink-0 items-center gap-[4px] whitespace-nowrap rounded px-[10px] py-[5px] text-[14px] ".concat("cards"===J?"bg-[#10B981] font-bold text-white":"font-[600] text-[#58584E] hover:bg-[#F4F3EF]"),children:[(0,s.jsx)(x,{size:16,className:"shrink-0"}),"ì¹´ë"]}),(0,s.jsxs)("button",{type:"button","aria-label":"í
ì´ë¸ ë·°",onClick:()=>U("table"),className:"flex shrink-0 items-center gap-[4px] whitespace-nowrap rounded px-[10px] py-[5px] text-[14px] ".concat("table"===J?"bg-[#10B981] font-bold text-white":"font-[600] text-[#58584E] hover:bg-[#F4F3EF]"),children:[(0,s.jsx)(p,{size:16,className:"shrink-0"}),"í
ì´ë¸"]}),R&&(0,s.jsxs)("button",{type:"button","aria-label":"ì§ë ë·°",onClick:()=>U("map"),className:"flex shrink-0 items-center gap-[4px] whitespace-nowrap rounded px-[10px] py-[5px] text-[14px] ".concat("map"===J?"bg-[#10B981] font-bold text-white":"font-[600] text-[#58584E] hover:bg-[#F4F3EF]"),children:[(0,s.jsx)(u,{size:16,className:"shrink-0"}),"ì§ë"]})]})]});return(0,s.jsxs)("div",{className:"flex w-full",children:[(0,s.jsx)(lx,{collapsed:D,onToggle:A,value:C,onChange:_,matchedCount:eU.length,totalCount:eC,platformOptions:eq,tagOptions:eG,platformCounts:eK,tagCounts:eW,dateLabel:"closed"===k?"ì¢
ê²° 기ê°":"ë°ê²¬ 기ê°"}),(0,s.jsxs)("div",{"data-testid":"channel-content-column",className:"relative flex min-w-0 flex-1 flex-col gap-[16px] px-[40px] pb-[60px] pt-[60px]",children:[(0,s.jsx)(m.Z,{floating:!0,collapsed:D,onToggle:A}),(0,s.jsx)("h1",{"data-testid":"channel-title",className:"mb-[16px] text-[28px] font-[600] leading-[1.2] text-[#48483F]",children:S("nav.".concat(b),{ns:"shield"})}),ez&&(0,s.jsxs)("div",{role:"alert",className:"flex items-start justify-between gap-[10px] rounded-[8px] border border-[#F0C9C4] bg-[#FCF2F1] px-[14px] py-[10px] text-[13px] text-[#CD6565]",children:[(0,s.jsx)("span",{children:ez}),(0,s.jsx)("button",{type:"button",onClick:()=>eZ(null),className:"shrink-0 text-[11px] text-[#CD6565] underline",children:"ë«ê¸°"})]}),eP&&(0,s.jsxs)("div",{"data-testid":"llm-bulk-summary",className:"flex items-start justify-between gap-[10px] rounded-[8px] border border-[#D5CFF6] bg-[#F2F0FE] px-[14px] py-[10px] text-[13px] text-[#4B3CC9]",children:[(0,s.jsxs)("span",{children:["AI ì¬ëê²í ìë£ â ",eP]}),(0,s.jsx)("button",{type:"button",onClick:()=>eR(null),className:"shrink-0 text-[11px] text-[#4B3CC9] underline",children:"ë«ê¸°"})]}),(0,s.jsx)("div",{"data-testid":"channel-workflow-row",className:"min-w-0 rounded-[6px] border border-[#DEDECE] bg-white px-[16px] py-[14px] shadow-[0_2px_12px_-6px_rgba(46,46,40,0.28)]",children:(0,s.jsx)(lk,{active:k,onChange:e=>{V(null),F(e)},stats:ey,role:w,onExitSelect:e=>{F("unrelated"),V(e)},activeExitFrom:W,filtered:ev})}),(0,s.jsxs)("div",{"data-testid":"channel-content-group",className:"flex flex-col gap-[8px]",children:[ep?(0,s.jsx)(lm,{trailing:eV,detections:eU,onDetailClick:z,onBulkStatusChange:eX,preselectId:$,selectionStore:et,isLoading:eD,pageSize:eu}):Z&&"cards"===J?(0,s.jsx)(tq,{trailing:eV,channel:b,detections:eU,activeId:null!==(n=null==L?void 0:L.id)&&void 0!==n?n:null,preselectId:$,selectionStore:et,isLoading:eD,onReviewClick:z,onBulkStatusChange:eX,onTagged:eJ,llmBulk:eI,pageSize:eu}):(0,s.jsx)(lt,{trailing:eV,channel:b,detections:eU,activeId:null!==(c=null==L?void 0:L.id)&&void 0!==c?c:null,preselectId:$,selectionStore:et,isLoading:eD,onReviewClick:z,onBulkStatusChange:eX,onTagged:eJ,llmBulk:eI,pageSize:eu}),eC>0&&(!ep||eH>1)&&(0,s.jsx)(lb.f,{page:H,limit:eu,total:eC,onChange:G})]})]}),(0,s.jsx)(tJ,{detection:L,onClose:()=>z(null),onMemoSaved:()=>{eA()},onLlmJudge:eB?eO:void 0,llmJudgingId:eS,llmResult:eM,onTagsSaved:eJ,onAuthorAllowed:()=>{eA(),eN()},onClaimChanged:()=>{eA()},onAction:(e,t)=>{L&&(eX([L.id],e,t),z(null))},hasPrev:eY.hasPrev,hasNext:eY.hasNext,onPrev:eY.goPrev,onNext:eY.goNext})]})}},11298:function(e,t,l){l.d(t,{f:function(){return r}});var a=l(52322),n=l(2784);let s=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;if(t<=1)return[1];let a=Math.max(1,Math.min(t,e)),n=Math.max(a-l,1),s=Math.min(a+l,t),r=[];n>1&&(r.push(1),n>2&&r.push("ellipsis"));for(let i=n;i<=s;i++)r.push(i);return s<t&&(s<t-1&&r.push("ellipsis"),r.push(t)),r},r=e=>{let{page:t,limit:l,total:r,onChange:i,siblings:o=2}
16=e,d=Math.max(1,Math.ceil(r/l)),c=s(t,d,o),[x,p]=(0,n.useState)(""),u=()=>{let e=parseInt(x,10);Number.isFinite(e)&&e>=1&&e<=d&&i(e),p("")},m="rounded border border-[#DEDECE] px-[10px] py-[3px] disabled:opacity-40",h=e=>"min-w-[32px] rounded border px-[8px] py-[3px] text-center transition-colors ".concat(e?"border-[#10B981] bg-[#10B981] text-white font-bold":"border-[#DEDECE] bg-white text-[#48483F] hover:border-[#10B981]/60");return(0,a.jsxs)("div",{className:"flex items-center justify-between gap-[16px] rounded border border-[#DEDECE] bg-white px-[14px] py-[8px] text-[12px] text-[#78786A]",children:[(0,a.jsxs)("span",{className:"shrink-0",children:[(0,a.jsx)("strong",{className:"font-bold text-[#48483F]",children:((t-1)*l+1).toLocaleString()})," â",(0,a.jsxs)("strong",{className:"font-bold text-[#48483F]",children:[" ",Math.min(t*l,r).toLocaleString()]})," / ì ì²´",(0,a.jsxs)("strong",{className:"font-bold text-[#48483F]",children:[" ",r.toLocaleString()]})," ê±´"]}),(0,a.jsxs)("div",{className:"flex items-center gap-[4px]",children:[(0,a.jsx)("button",{type:"button",disabled:t<=1,onClick:()=>i(1),"aria-label":"첫 íì´ì§",className:m,children:"\xab"}),(0,a.jsx)("button",{type:"button",disabled:t<=1,onClick:()=>i(t-1),"aria-label":"ì´ì íì´ì§",className:m,children:"â¹"}),c.map((e,l)=>"ellipsis"===e?(0,a.jsx)("span",{className:"px-[6px] text-[#B8B8A8]","aria-hidden":"true",children:"â¦"},"e-".concat(l)):(0,a.jsx)("button",{type:"button",onClick:()=>i(e),"aria-current":e===t?"page":void 0,"aria-label":"íì´ì§ ".concat(e),className:h(e===t),children:e},e)),(0,a.jsx)("button",{type:"button",disabled:t>=d,onClick:()=>i(t+1),"aria-label":"ë¤ì íì´ì§",className:m,children:"âº"}),(0,a.jsx)("button",{type:"button",disabled:t>=d,onClick:()=>i(d),"aria-label":"ë§ì§ë§ íì´ì§",className:m,children:"\xbb"})]}),(0,a.jsxs)("div",{className:"flex shrink-0 items-center gap-[6px]",children:[(0,a.jsx)("span",{className:"text-[#78786A]",children:"ì´ë"}),(0,a.jsx)("input",{type:"number",min:1,max:d,value:x,onChange:e=>p(e.target.value),onKeyDown:e=>{"Enter"===e.key&&(e.preventDefault(),u())},placeholder:String(t),"aria-label":"íì´ì§ ë²í¸ ì
ë ¥",className:"w-[64px] rounded border border-[#DEDECE] bg-white px-[6px] py-[3px] text-center text-[12px] text-[#48483F] outline-none focus:border-[#10B981]"}),(0,a.jsx)("button",{type:"button",onClick:u,className:"rounded border border-[#DEDECE] bg-white px-[8px] py-[3px] text-[#48483F] hover:border-[#10B981]/60",children:"Go"})]})]})}},66198:function(e,t,l){l.r(t);var a=l(52322),n=l(2784),s=l(45847),r=l.n(s),i=l(59877);function o(e){let t=e.status_counts.suspected+e.status_counts.fake+e.status_counts.reported;if(0===t)return"#9AA7BF";let l=e.status_counts.fake/t;return l>=.6?"#CD6565":l>=.2?"#E8A28F":"#9AA7BF"}function d(e){switch(e){case 4:return"#CD6565";case 2:return"#E8A28F";default:return"#5B8DEF"}}let c=e=>{let{clusters:t,markers:l,zoomLevel:s,isLoading:c,onBoundsChange:x,onMarkerClick:p,resolveMarkerColor:u,resolveClusterColor:m,focus:h,activeKey:b}=e,{t:f}=(0,i.$G)(["common"]),g=(0,n.useRef)(null),v=(0,n.useRef)(null),j=(0,n.useRef)([]);(0,n.useRef)(!1);let[w,y]=(0,n.useState)(!1),N=(0,n.useCallback)(()=>{j.current.forEach(e=>e.setMap(null)),j.current=[]},[]),E=(0,n.useCallback)(()=>{var e;if(!v.current||!(null===(e=window.naver)||void 0===e?void 0:e.maps))return;g.current&&(g.current.destroy(),g.current=null);let t=new window.naver.maps.Map(v.current,{center:new window.naver.maps.LatLng(36.5,127.5),zoom:7,minZoom:6,maxZoom:18,zoomControl:!0,zoomControlOptions:{position:window.naver.maps.Position.TOP_RIGHT}});window.naver.maps.Event.addListener(t,"idle",()=>{let e=t.getBounds(),l=t.getZoom();x({sw_lat:e.getSW().lat(),sw_lng:e.getSW().lng(),ne_lat:e.getNE().lat(),ne_lng:e.getNE().lng()},l)}),g.current=t,y(!0)},[x]);(0,n.useEffect)(()=>{var e;return(null===(e=window.naver)||void 0===e?void 0:e.maps)&&E(),()=>{N(),g.current&&(g.current.destroy(),g.current=null),y(!1)}},[E,N]);let[F,k]=(0,n.useState)(!1),C=(0,n.useCallback)(()=>{E()},[E]),_=(0,n.useCallback)(()=>{k(!0)},[]);return(0,n.useEffect)(()=>{var e;g.current&&(null===(e=window.naver)||void 0===e?void 0:e.maps)&&!(s>
16=12)&&(N(),t.forEach(e=>{let t=(null!=m?m:o)(e),l=Math.max(15,Math.min(50,3*Math.sqrt(e.seller_count))),a=new window.naver.maps.Marker({position:new window.naver.maps.LatLng(e.lat,e.lng),map:g.current,icon:{content:'\n <div style="\n width: '.concat(2*l,"px; height: ").concat(2*l,"px;\n background: ").concat(t,"; opacity: 0.8;\n border-radius: 50%; border: 2px solid white;\n display: flex; align-items: center; justify-content: center;\n color: white; font-size: ").concat(l>20?12:10,'px; font-weight: bold;\n box-shadow: 0 2px 6px rgba(0,0,0,0.3);\n cursor: pointer;\n ">').concat(e.seller_count,"</div>\n "),anchor:new window.naver.maps.Point(l,l)}});window.naver.maps.Event.addListener(a,"click",()=>{g.current.setCenter(new window.naver.maps.LatLng(e.lat,e.lng)),g.current.setZoom(Math.min(s+3,15))}),j.current.push(a)}))},[t,s,N,m,w]),(0,n.useEffect)(()=>{var e;g.current&&(null===(e=window.naver)||void 0===e?void 0:e.maps)&&!(s<12)&&(N(),l.forEach(e=>{let t=(null!=u?u:d)(e.top_status),l=null!=b&&e.address===b,a=l?32:24,n=new window.naver.maps.Marker({position:new window.naver.maps.LatLng(e.lat,e.lng),map:g.current,icon:{content:'\n <div style="\n width: '.concat(a,"px; height: ").concat(a,"px;\n background: ").concat(t,";\n border-radius: 50%; border: ").concat(l?"3px solid #10B981":"2px solid white",";\n box-shadow: 0 2px ").concat(l?8:4,"px rgba(0,0,0,").concat(l?.45:.3,');\n cursor: pointer;\n "></div>\n '),anchor:new window.naver.maps.Point(a/2,a/2)},zIndex:l?100:void 0});window.naver.maps.Event.addListener(n,"click",()=>{p(e.address)}),j.current.push(n)}))},[l,s,N,p,u,b,w]),(0,n.useEffect)(()=>{var e,t;h&&g.current&&(null===(e=window.naver)||void 0===e?void 0:e.maps)&&(g.current.setCenter(new window.naver.maps.LatLng(h.lat,h.lng)),g.current.setZoom(null!==(t=h.zoom)&&void 0!==t?t:15))},[h]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r(),{src:"https://oapi.map.naver.com/openapi/v3/maps.js?ncpKeyId=".concat("zcpmf2f0bl"),strategy:"afterInteractive",onLoad:C,onError:_}),F?(0,a.jsx)("div",{className:"flex h-full w-full items-center justify-center bg-gray-50 text-sm text-gray-400",children:"ì§ë를 ë¶ë¬ì¬ ì ììµëë¤. ë¤í¸ìí¬ ì°ê²°ì íì¸í´ì£¼ì¸ì."}):(0,a.jsx)("div",{ref:v,className:"h-full w-full"}),c&&(0,a.jsxs)("div",{className:"pointer-events-none absolute right-3 top-3 z-10 flex items-center gap-2 rounded-full border border-gray-200 bg-white/95 px-3 py-1.5 text-xs font-medium text-gray-600 shadow",children:[(0,a.jsx)("div",{className:"h-3.5 w-3.5 animate-spin rounded-full border-2 border-gray-300 border-t-blue-500"}),f("w-001879")]})]})};t.default=c},82098:function(e,t,l){var a=l(3255),n=l(31518);let s=e=>{var t,l,s,r;let{data:i,error:o,isLoading:d,mutate:c}=(0,a.ZP)(e?["/shield/detection",e]:null,()=>(0,n.LW)(null!=e?e:{}));return{list:null!==(t=null==i?void 0:i.list)&&void 0!==t?t:[],total:null!==(l=null==i?void 0:i.total)&&void 0!==l?l:0,page:null!==(s=null==i?void 0:i.page)&&void 0!==s?s:1,limit:null!==(r=null==i?void 0:i.limit)&&void 0!==r?r:20,isLoading:d,error:o,mutate:c}};t.Z=s},68941:function(e,t,l){l.d(t,{Z:function(){return a}});function a(e,t,l,a,n){let s=null===l?-1:t.indexOf(l),r=t.indexOf(a);if(n&&-1!==s&&-1!==r){let i=Math.min(s,r),o=Math.max(s,r),d=new Set(e);for(let c=i;c<=o;c++)d.add(t[c]);return{selected:d,anchorId:t[s]}}if(n)return{selected:new Set([a]),anchorId:a};let x=new Set(e);return x.has(a)?x.delete(a):x.add(a),{selected:x,anchorId:a}}},95889:function(e,t,l){l.d(t,{WK:function(){return a},mj:function(){return r},v:function(){return n}});let a="ì´ë¯¸ì§ëì©",n=[a,"í¤ìëëì©","ìì¡°ìí","미ìì°","ì¬ì ì°¨ë¨","íë ë§í¬íì"],s={ì´ë¯¸ì§ëì©:"w-002085",í¤ìëëì©:"w-002086",ìì¡°ìí:"w-002087",미ìì°:"w-002088",ì¬ì ì°¨ë¨:"w-002089",íë ë§í¬íì:"w-002090","íì 0":"w-002607","íì 3.0 ì´í":"w-002608","리뷰 0":"w-002609","리뷰 50 ì´í":"w-002610","리뷰 100 ì´í":"w-002611","리뷰 500 ì´í":"w-002612","리뷰 1000 ì´í":"w-002613","리뷰 1000 ì´ê³¼":"w-002614",ê°ê²©ë³ë:"w-002615",ê°ê²©ìë°:"w-002616",ìì ê°ìë°:"w-002617",ì ê³ ë¶ê°:"w-002618",ê´ê³ :"w-002619",ì ê·ìí:"w-002620",기존ìí:"w-002621","URL ìì§ìë£":"w-002622",미ì§ìì¬ì´í¸:"w-002623","404 error":"w-002624","AIíë¨-ì´ë¯¸ì§ìì¬":"w-002625"};function r(e,t){var l;let a=null!==(l=s[e])&&void 0!==l?l:null;return a?t(a):e}}}]);
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.