import{RasS,Vasz,aGasj,gasq,sasH,aasZ,basJ,qasK,pasQ,_asp,lasF,casX,DasY,Hasee,a4aste,easae,yasre,Easne}from"./mermaid.core-Bp72wBaC.js";import{pasie}from"./chunk-4BX2VUAB-82LsI6ZO.js";import{passe}from"./treemap-GDKQZRPO-AdnGbe1r.js";import{dasI}from"./arc-BfzAnNAP.js";import{oasle}from"./ordinal-Cboi1Yqb.js";import"./index-BzKy-nNf.js";import"./_baseUniq-Blm_akxr.js";import"./_basePickBy-BruevaAz.js";import"./clone-BbeogWA3.js";import"./init-Gi6I4Gst.js";functionoe(e,a){returna<e?-1:a>e?1:a>=e?0:NaN}functionce(e){returne}functionue(){vare=ce,a=oe,f=null,y=S(0),s=S(z),o=S(0);functionl(t){varn,c=(t=j(t)).length,d,x,h=0,u=newArray(c),i=newArray(c),v=+y.apply(this,arguments),w=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(w)/c,o.apply(this,arguments)),$=C*(w<0?-1:1),g;for(n=0;n<c;++n)(g=i[u[n]=n]=+e(t[n],n,t))>0&&(h+=g);for(a!=null?u.sort(function(A,D){returna(i[A],i[D])}):f!=null&&u.sort(function(A,D){returnf(t[A],t[D])}),n=0,x=h?(w-c*$)/h:0;n<c;++n,v=m)d=u[n],g=i[d],m=v+(g>0?g*x:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};returni}returnl.value=function(t){returnarguments.length?(e=typeoft=="function"?t:S(+t),l):e},l.sortValues=function(t){returnarguments.length?(a=t,f=null,l):a},l.sort=function(t){returnarguments.length?(f=t,a=null,l):f},l.startAngle=function(t){returnarguments.length?(y=typeoft=="function"?t:S(+t),l):y},l.endAngle=function(t){returnarguments.length?(s=typeoft=="function"?t:S(+t),l):s},l.padAngle=function(t){returnarguments.length?(o=typeoft=="function"?t:S(+t),l):o},l}varpe=ne.pie,G={sections:newMap,showData:!1},T=G.sections,N=G.showData,de=structuredClone(pe),ge=p(()=>structuredClone(de),"getConfig"),fe=p(()=>{T=newMap,N=G.showData,re()},"clear"),me=p(({label:e,value:a})=>{if(a<0)thrownewError(`"${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"),he=p(()=>T,"getSections"),ve=p(e=>{N=e},"setShowData"),Se=p(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:Q,getDiagramTitle:K,setAccTitle:J,getAccTitle:Z,setAccDescription:H,getAccDescription:q,addSection:me,getSections:he,setShowData:ve,getShowData:Se},ye=p((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),xe={parse:p(asynce=>{consta=awaitse("pie",e);F.debug(a),ye(a,L)},"parse")},we=p(e=>`