PageSourceSearch

https://vetano.com/assets/DonutChart-WC5VvyMK.js

js vetano.com collected 2026-10-02 01:00:55 UTC 2,362 bytes, 1 lines download raw bytes

1import{j as s}from"./vendor-framer-e_lHCn70.js";import{r as j}from"./vendor-react-KJNI7MOv.js";const p=["hsl(45 98% 57%)","hsl(142 76% 50%)","hsl(217 91% 60%)","hsl(280 87% 65%)","hsl(350 89% 60%)","hsl(180 80% 45%)","hsl(35 95% 55%)","hsl(0 0% 50%)"],w=({data:c,size:l=160,strokeWidth:d=24,showLegend:g=!0,centerLabel:h,centerValue:u})=>{const a=j.useMemo(()=>c.reduce((e,t)=>e+t.value,0),[c]),m=j.useMemo(()=>{let e=-90;return c.map((t,i)=>{const n=a>0?t.value/a*100:0,x=n/100*360,N={...t,percentage:n,startAngle:e,endAngle:e+x,color:t.color||p[i%p.length]};return e+=x,N})},[c,a]),r=(l-d)/2,o=l/2,f=e=>{const t=e*Math.PI/180;return{x:o+r*Math.cos(t),y:o+r*Math.sin(t)}},v=(e,t)=>{const i=f(e),n=f(t),x=t-e>180?1:0;return`M ${i.x} ${i.y} A ${r} ${r} 0 ${x} 1 ${n.x} ${n.y}`};return a===0?s.jsx("div",{className:"flex flex-col items-center gap-4",children:s.jsxs("div",{className:"relative flex items-center justify-center",style:{width:l,height:l},children:[s.jsx("svg",{width:l,height:l,children:s.jsx("circle",{cx:o,cy:o,r,fill:"none",stroke:"hsl(var(--muted))",strokeWidth:d})}),s.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:s.jsx("span",{className:"text-sm text-muted-foreground",children:"No data"})})]})}):s.jsxs("div",{className:"flex flex-col items-center gap-4",children:[s.jsxs("div",{className:"relative flex items-center justify-center",style:{width:l,height:l},children:[s.jsx("svg",{width:l,height:l,children:m.map((e,t)=>e.percentage>0&&s.jsx("path",{d:v(e.startAngle,e.endAngle-.5),fill:"none",stroke:e.color,strokeWidth:d,strokeLinecap:"round",className:"transition-all duration-300 hover:opacity-80"},t))}),(h||u)&&s.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center",children:[u!==void 0&&s.jsx("span",{className:"text-2xl font-bold text-foreground",children:u}),h&&s.jsx("span",{className:"text-xs text-muted-foreground",children:h})]})]}),g&&s.jsx("div",{className:"flex flex-wrap justify-center gap-3",children:m.map((e,t)=>s.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[s.jsx("div",{className:"w-2.5 h-2.5 rounded-full",style:{backgroundColor:e.color}}),s.jsx("span",{className:"text-muted-foreground",children:e.label}),s.jsxs("span",{className:"font-medium",children:[e.percentage.toFixed(0),"%"]})]},t))})]})};export{w as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.