PageSourceSearch

https://filiphric.com/_nuxt/snlvUo3N.js

js filiphric.com collected 2026-10-03 22:21:31 UTC 5,156 bytes, 31 lines download raw bytes

vendor: 5,156 bytes, lines 1-31
1import{b2 as S,aW as z,bY as U,ag as Y,af as Z,ah as q,ai as H,aB as J,aA as K,aj as p,am as F,ak as Q,aN as X,aR as ee,b9 as te,an as ae,aG as re,aO as ne}from"./CnWWEH4t.js";import{p as ie}from"./CYJtV-K1.js";import{p as se}from"./BwFLxRFM.js";import{d as I}from"./CUzOt27P.js";import{o as le}from"./CmKTTxBW.js";import"./CGIrL9Bj.js";import"./DO6u8moB.js";import"./Gi6I4Gst.js";function oe(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function ue(){var e=ce,a=oe,f=null,x=S(0),s=S(z),o=S(0);function l(t){var n,c=(t=U(t)).length,d,y,m=0,u=new Array(c),i=new Array(c),v=+x.apply(this,arguments),A=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),h,C=Math.min(Math.abs(A)/c,o.apply(this,arguments)),$=C*(A<0?-1:1),g;for(n=0;n<c;++n)(g=i[u[n]=n]=+e(t[n],n,t))>0&&(m+=g);for(a!=null?u.sort(function(w,D){return a(i[w],i[D])}):f!=null&&u.sort(function(w,D){return f(t[w],t[D])}),n=0,y=m?(A-c*$)/m:0;n<c;++n,v=h)d=u[n],g=i[d],h=v+(g>0?g*y:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:h,padAngle:C};return i}return l.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),l):e},l.sortValues=function(t){return arguments.length?(a=t,f=null,l):a},l.sort=function(t){return arguments.length?(f=t,a=null,l):f},l.startAngle=function(t){return arguments.length?(x=typeof t=="function"?t:S(+t),l):x},l.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),l):s},l.padAngle=function(t){return arguments.length?(o=typeof t=="function"?t:S(+t),l):o},l}var pe=ne.pie,G={sections:new Map,showData:!1},T=G.sections,N=G.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=new Map,N=G.showData,re()},"clear"),he=p(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),F.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),me=p(()=>T,"getSections"),ve=p(e=>{N=e},"setShowData"),Se=p(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:K,getDiagramTitle:J,setAccTitle:H,getAccTitle:q,setAccDescription:Z,getAccDescription:Y,addSection:he,getSections:me,setShowData:ve,getShowData:Se},xe=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:p(async e=>{const a=await se("pie",e);F.debug(a),xe(a,L)},"parse")},Ae=p(e=>`
2  .pieCircle{
3    stroke: ${e.pieStrokeColor};
4    stroke-width : ${e.pieStrokeWidth};
5    opacity : ${e.pieOpacity};
6  }
7  .pieOuterCircle{
8    stroke: ${e.pieOuterStrokeColor};
9    stroke-width: ${e.pieOuterStrokeWidth};
10    fill: none;
11  }
12  .pieTitleText {
13    text-anchor: middle;
14    font-size: ${e.pieTitleTextSize};
15    fill: ${e.pieTitleTextColor};
16    font-family: ${e.fontFamily};
17  }
18  .slice {
19    font-family: ${e.fontFamily};
20    fill: ${e.pieSectionTextColor};
21    font-size:${e.pieSectionTextSize};
22    // fill: white;
23  }
24  .legend text {
25    fill: ${e.pieLegendTextColor};
26    font-family: ${e.fontFamily};
27    font-size: ${e.pieLegendTextSize};
28  }
29`,"getStyles"),we=Ae,De=p(e=>{const a=[...e.values()].reduce((s,o)=>s+o,0),f=[...e.entries()].map(([s,o])=>({label:s,value:o})).filter(s=>s.value/a*100>=1).sort((s,o)=>o.value-s.value);return ue().value(s=>s.value)(f)},"createPieArcs"),Ce=p((e,a,f,x)=>{F.debug(`rendering pie chart
30`+e);const s=x.db,o=Q(),l=X(s.getConfig(),o.pie),t=40,n=18,c=4,d=450,y=d,m=ee(a),u=m.append("g");u.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:i}=o;let[v]=te(i.pieOuterStrokeWidth);v??=2;const A=l.textPosition,h=Math.min(y,d)/2-t,C=I().innerRadius(0).outerRadius(h),$=I().innerRadius(h*A).outerRadius(h*A);u.append("circle").attr("cx",0).attr("cy",0).attr("r",h+v/2).attr("class","pieOuterCircle");const g=s.getSections(),w=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;g.forEach(r=>{b+=r});const W=w.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),k=le(D);u.selectAll("mySlices").data(W).enter().append("path").attr("d",C).attr("fill",r=>k(r.data.label)).attr("class","pieCircle"),u.selectAll("mySlices").data(W).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),u.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const O=[...g.entries()].map(([r,M])=>({label:r,value:M})),E=u.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const P=n+c,B=P*O.length/2,V=12*n,j=M*P-B;return"translate("+V+","+j+")"});E.append("rect").attr("width",n).attr("height",n).style("fill",r=>k(r.label)).style("stroke",r=>k(r.label)),E.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...E.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),R=y+t+n+c+_;m.attr("viewBox",`0 0 ${R} ${d}`),ae(m,d,R,l.useMaxWidth)},"draw"),$e={draw:Ce},Ne={parser:ye,db:L,renderer:$e,styles:we};export{Ne as diagram};
31//# sourceMappingURL=snlvUo3N.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.