1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[154],{80154:function(e,s,a){a.r(s),a.d(s,{default:function(){return m}});var t=a(57437),n=a(14296),l=a(86810),d=a(10062),i=a(20407),r=a(18030);function c(e){let{title:s,rate:a,data:r,colors:c,labels:m,testId:o}=e,x=r.reduce((e,s)=>e+s.value,0);return(0,t.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 p-5","data-testid":o,children:[(0,t.jsx)("h3",{className:"text-sm font-semibold text-gray-700 mb-3",children:s}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"relative w-[120px] h-[120px] shrink-0",children:[(0,t.jsx)(n.h,{width:"100%",height:"100%",children:(0,t.jsx)(l.u,{children:(0,t.jsx)(d.by,{data:r,cx:"50%",cy:"50%",innerRadius:36,outerRadius:52,paddingAngle:2,dataKey:"value",startAngle:90,endAngle:-270,stroke:"none",children:r.map((e,s)=>(0,t.jsx)(i.b,{fill:c[s]},s))})})}),(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,t.jsxs)("span",{className:"text-lg font-bold text-gray-800",children:[a,"%"]})})]}),(0,t.jsx)("div",{className:"space-y-2",children:r.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"inline-block w-3 h-3 rounded-full shrink-0",style:{backgroundColor:c[s]}}),(0,t.jsx)("span",{className:"text-xs text-gray-600",children:m[s]}),(0,t.jsx)("span",{className:"text-xs font-semibold text-gray-800",children:x>0?"".concat(e.value," (").concat((e.value/x*100).toFixed(1),"%)"):"0"})]},s))})]})]})}function m(e){let{locale:s,total_plays:a,total_winners:n,total_redeemed:l}=e,{t:d}=(0,r.$)(s),i=a>0?(n/a*100).toFixed(1):"0.0",m=n>0?(l/n*100).toFixed(1):"0.0",o=a-n,x=n-l;return(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,t.jsx)(c,{testId:"stats-win-donut",title:d("events.manage.stats.winVsLoss"),rate:i,data:[{name:"win",value:n},{name:"noWin",value:Math.max(o,0)}],colors:["#22c55e","#e5e7eb"],labels:[d("events.manage.stats.win"),d("events.manage.stats.noWin")]}),(0,t.jsx)(c,{testId:"stats-redeem-donut",title:d("events.manage.stats.redeemStatus"),rate:m,data:[{name:"redeemed",value:l},{name:"notRedeemed",value:Math.max(x,0)}],colors:["#a855f7","#e5e7eb"],labels:[d("events.manage.stats.redeemed"),d("events.manage.stats.notRedeemed")]})]})}}}]);
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.