1import{C as x,R as ee,A as te,c as ae,d as oe,h as se}from"./vendor-charts-BlE0PIEs.js";import{s as O,_ as ne}from"./index-CkbxFzmV.js";import{d as re,b0 as le,E as R,c as ie,f as ce,A as de,k as ue,R as h}from"./vendor-vuetify-DaY1MzuL.js";import"./vendor-sentry-CdlvO8A5.js";try{let f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new f.Error().stack;r&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[r]="cc852811-8d46-4c59-b4e8-805b1b9ce2f7",f._sentryDebugIdIdentifier="sentry-dbid-cc852811-8d46-4c59-b4e8-805b1b9ce2f7")}catch{}const be={class:"chart-container"},fe=30,pe=re({__name:"PolarCompareOld",props:{isReport:{type:Boolean,default:!1},labels:{},playerData:{},averageData:{},bestData:{},name:{},big:{type:Boolean,default:!1}},setup(f){x.register(ee,te,ae,oe);const r=f,P=["Fouls","Yellow Cards Per Foul","Back Passes","Own Half Losses"],g={good:"#26a69e",bad:"#e64c34",neutral:"#e4b618"},y={good:"rgb(58, 161, 63)",bad:"rgb(228, 77, 0)",neutral:"rgb(82, 111, 125, 1)"},V={minOutput:30,maxOutput:100,minInput:0,maxInput:100},W={3:[2],4:[1,2],5:[1,2,3],6:[2,3],7:[2,3,4],8:[2,3,4,5],9:[2,3,4,5,6],10:[3,4,5,6]},z=[45,60,75,90],M=le(),u=h(()=>M.current.value.colors),Y=(e,t,a,o,s,l)=>{const n=Math.min(l,o/2,s/2);e.beginPath(),e.moveTo(t+n,a),e.arcTo(t+o,a,t+o,a+s,n),e.arcTo(t+o,a+s,t,a+s,n),e.arcTo(t,a+s,t,a,n),e.arcTo(t,a,t+o,a,n),e.closePath(),e.fill(),e.stroke()},F=e=>e*(Math.PI/180),S=e=>{const{minOutput:t,maxOutput:a,minInput:o,maxInput:s}=V;return t+(e-o)*(a-t)/(s-o)},T=(e,t)=>P.includes(e)?t>70?g.bad:t<40?g.good:g.neutral:t>70?g.good:t<40?g.bad:g.neutral,N=(e,t,a)=>{const o=P.includes(e);if(t===a)return y.neutral;const s=t>a;return o?s?y.bad:y.good:s?y.good:y.bad},_=h(()=>r.playerData.map((e,t)=>e/r.bestData[t]*100)),$=h(()=>({responsive:!0,animation:!r.isReport,devicePixelRatio:2,layout:{padding:r.big?40:35},borderWidth:1,plugins:{legend:{display:!1},tooltip:{enabled:!1}},scales:{r:{beginAtZero:!0,min:0,max:100,grid:{circular:!0,color:u.value.grey3},pointLabels:{display:!1,font:{size:11,weight:500,lineHeight:1.4}},ticks:{display:!1,maxTicksLimit:1,showLabelBackdrop:!1},backgroundColor:u.value.white}}})),D=h(()=>({labels:[...r.labels],datasets:[{label:r.name,data:_.value.map(S),backgroundColor:_.value.map((e,t)=>T(r.labels[t],e)),borderColor:u.value.white}]})),H=h(()=>({id:"compareDataLabels",afterDatasetsDraw(e){const{ctx:t,data:a,scales:o}=e,s=o.r,{xCenter:l,yCenter:n,drawingArea:c}=s,i=a.datasets[0].data.length,b=360/i,d=a.labels,k=W[i]||[];t.save(),t.textAlign="center",t.textBaseline="middle",_.value.forEach((v,p)=>{const m=r.averageData[p],J=r.playerData[p],w=d[p],C=k.includes(p),Q=b*p+b/2,A=F(Q),L=-c+Math.sin(A);t.save(),t.translate(l,n),t.rotate(A);let I;C?(t.rotate(Math.PI),I=-L+10):I=L-10;const B=r.big?12:10,E=r.big?11:9;X(t,{playerValue:v,label:w,drawingArea:c,fontSize:B,isBottomIndex:C}),G(t,{value:J,averageValue:m,label:w,yCoor:I,fontSize:E,isBottomIndex:C}),j(t,{value:m,yCoor:I,fontSize:E,isBottomIndex:C}),K(t,{label:w,yCoor:I,fontSize:B,isBottomIndex:C}),t.restore()}),t.restore()}})),X=(e,t)=>{const{playerValue:a,label:o,drawingArea:s,fontSize:l,isBottomIndex:n}=t,c=Math.round(a).toString(),i=4,b=5,d=15;e.font=`bold ${l}px Inter`;const v=e.measureText(c).width+i*2,p=-v/2;let m=n?s/100*S(a):-(s/100)*S(a)-d/2;n&&(m-=d/2),e.fillStyle=T(o,a),Y(e,p,m,v,d,b),e.strokeStyle=u.value.grey3,e.lineWidth=1.5,e.stroke(),e.fillStyle=u.value.white,e.fillText(c,p+v/2,m+d/2)},G=(e,t)=>{const{value:a,averageValue:o,label:s,yCoor:l,fontSize:n,isBottomIndex:c}=t;e.font=`bold ${n}px Inter`,e.fillStyle=N(s,a,o);const i=O.wyStatChartValue(a),b=e.measureText(i).width,d=c?l+4:l-4;e.fillText(i,-b/2-5,d)},j=(e,t)=>{const{value:a,yCoor:o,fontSize:s,isBottomIndex:l}=t;e.font=`bold ${s}px Inter`,e.fillStyle=u.value.grey1;const n=O.wyStatChartValue(a),c=e.measureText(n).width,i=l?o+4:o-4;e.fillText(n,c/2+5,i)},K=(e,t)=>{const{label:a,yCoor:o,fontSize:s,isBottomIndex:l}=t;e.font=`${s}px Inter`;const n=r.big?10:8,c=l?o+n+5:o-n-5,i=r.big?125:90;e.fillText(a,0,c,i)},U=h(()=>({id:"centerCircle",afterDatasetsDraw(e){const{ctx:t,chartArea:a,scales:o}=e,{left:s,right:l,top:n,bottom:c}=a,i=(s+l)/2,b=(n+c)/2,d=o.r.drawingArea;Z(t,i,b,d),q(t,i,b,d)}})),Z=(e,t,a,o)=>{const s=o*fe/100;e.save(),e.beginPath(),e.arc(t,a,s,0,2*Math.PI),e.fillStyle=u.value.white,e.fill(),e.strokeStyle=u.value.grey3,e.lineWidth=1,e.stroke(),e.restore(
1)},q=(e,t,a,o)=>{z.forEach(s=>{const l=o*s/100;e.save(),e.beginPath(),e.arc(t,a,l,0,2*Math.PI),e.strokeStyle=u.value.white,e.lineWidth=1,e.stroke(),e.restore()})};return(e,t)=>(R(),ie("div",be,[D.value?(R(),ce(de(se),{key:0,id:"PolarAreaChart",options:$.value,data:D.value,plugins:[U.value,H.value]},null,8,["options","data","plugins"])):ue("",!0)]))}}),ve=ne(pe,[["__scopeId","data-v-038b5f0f"]]);export{ve as default}; 2//# sourceMappingURL=PolarCompareOld-BY-0Vgfw.js.map
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.