import{pasU}from"./chunk-OQCM5LHU-BYoxSG74.js";import{adasy,a5asz,aJasj,zasq,pasJ,qasZ,sasH,gasK,casQ,basX,_asp,lasF,rasY,dastt,Aaset,Easat,Lasrt,kasnt}from"./index-C-KGFJzk.js";import{pasit}from"./gitGraph-YCYPL57B-DzJ-HjCo.js";import{dasO}from"./arc-CYpfu1ZG.js";import{oasst}from"./ordinal-Cboi1Yqb.js";import"./min-B2F24MMj.js";import"./_baseUniq-Bh6xcCP0.js";import"./init-Gi6I4Gst.js";functionot(t,a){returna<t?-1:a>t?1:a>=t?0:NaN}functionlt(t){returnt}functionct(){vart=lt,a=ot,m=null,o=y(0),g=y(z),x=y(0);functioni(e){varr,l=(e=j(e)).length,c,A,h=0,u=newArray(l),n=newArray(l),v=+o.apply(this,arguments),w=Math.min(z,Math.max(-z,g.apply(this,arguments)-v)),f,T=Math.min(Math.abs(w)/l,x.apply(this,arguments)),$=T*(w<0?-1:1),d;for(r=0;r<l;++r)(d=n[u[r]=r]=+t(e[r],r,e))>0&&(h+=d);for(a!=null?u.sort(function(S,C){returna(n[S],n[C])}):m!=null&&u.sort(function(S,C){returnm(e[S],e[C])}),r=0,A=h?(w-l*$)/h:0;r<l;++r,v=f)c=u[r],d=n[c],f=v+(d>0?d*A:0)+$,n[c]={data:e[c],index:r,value:d,startAngle:v,endAngle:f,padAngle:T};returnn}returni.value=function(e){returnarguments.length?(t=typeofe=="function"?e:y(+e),i):t},i.sortValues=function(e){returnarguments.length?(a=e,m=null,i):a},i.sort=function(e){returnarguments.length?(m=e,a=null,i):m},i.startAngle=function(e){returnarguments.length?(o=typeofe=="function"?e:y(+e),i):o},i.endAngle=function(e){returnarguments.length?(g=typeofe=="function"?e:y(+e),i):g},i.padAngle=function(e){returnarguments.length?(x=typeofe=="function"?e:y(+e),i):x},i}varP=q.pie,G={sections:newMap,showData:!1,config:P},b=G.sections,W=G.showData,ut=structuredClone(P),pt=p(()=>structuredClone(ut),"getConfig"),gt=p(()=>{b=newMap,W=G.showData,Y()},"clear"),dt=p(({label:t,value:a})=>{b.has(t)||(b.set(t,a),F.debug(`added new section: ${t}, with value: ${a}`))},"addSection"),ft=p(()=>b,"getSections"),mt=p(t=>{W=t},"setShowData"),ht=p(()=>W,"getShowData"),R={getConfig:pt,clear:gt,setDiagramTitle:J,getDiagramTitle:Z,setAccTitle:H,getAccTitle:K,setAccDescription:Q,getAccDescription:X,addSection:dt,getSections:ft,setShowData:mt,getShowData:ht},vt=p((t,a)=>{U(t,a),a.setShowData(t.showData),t.sections.map(a.addSection)},"populateDb"),St={parse:p(asynct=>{consta=awaitit("pie",t);F.debug(a),vt(a,R)},"parse")},yt=p(t=>`