UNPKG

vue-data-ui

Version:

A user-empowering data visualization Vue 3 components library for eloquent data storytelling

7 lines (6 loc) 49.3 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-_gyicZFE.cjs"),ee=require("./usePrinter-BRTNfg7r.cjs"),ge=require("./vue-ui-skeleton-KlT3Rmkn.cjs"),ke=require("./BaseIcon-q0bEOOzl.cjs"),_e=require("./vue-ui-accordion-8mzPx86h.cjs"),te=require("./useNestedProp-BJQoarHp.cjs"),xe=require("./PackageVersion-DHtx9fnE.cjs"),Be=require("./PenAndPaper-DPoMEHE6.cjs"),Ee=require("./useUserOptionState-BgepsfED.cjs"),Ne=require("./useChartAccessibility-Cm7nkzTG.cjs"),Se=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ce=["id"],we={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},ze=["xmlns","viewBox"],Ve=["width","height"],$e={key:1},Te=["fill","font-weight","font-size","x","y"],Fe=["fill","font-weight","font-size","x","y"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Ie=["stop-color"],Me=["stop-color"],Re=["id"],Ae=["stop-color"],Xe=["stop-color"],je=["stop-color"],Ge=["id"],Ue=["stop-color"],qe=["stop-color"],Ye=["stop-color"],He=["id"],We=["stop-color"],Ke=["stop-color"],Je=["stop-color"],Qe={key:2},Ze=["x","y","font-size","font-weight","fill"],et=["x","y","font-size","font-weight","fill"],tt=["d","stroke"],lt=["cx","cy","r","fill"],at=["cx","cy","r","fill","stroke","stroke-width","onClick"],ot={key:3},nt=["x","y","font-size","fill","onClick"],rt={key:0},st=["x","y","fill","font-size","font-weight"],ut=["x","y","height","width","fill","rx","onClick"],ct=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],it={key:4},dt=["x","y","fill","font-size","onClick"],yt=["d","stroke"],vt=["fill","cx","cy","r","onClick"],ht={key:5},ft=["x","y","font-size","font-weight","fill"],pt=["x1","x2","y1","y2","stroke","stroke-width"],mt=["y","height","width"],bt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},gt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},kt={viewBox:"0 0 20 20",height:"16",width:"16"},_t=["fill"],xt={key:7},Bt=["y","height","width"],Et={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},Nt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},St={viewBox:"0 0 20 20",height:"16",width:"16"},Ct=["fill"],wt=["cx","cy","fill"],zt=["d","stroke"],Vt=["cx","cy","fill"],$t=["d","stroke"],Tt=["cx","cy","fill"],Ft=["cx","cy","fill"],Lt=["x","y","fill","font-size","font-weight"],Dt=["x","y","fill","font-size","font-weight"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],It=["x","text-anchor","y","fill","font-size"],Mt=["x","text-anchor","y","fill","font-size"],Rt=["x","text-anchor","y","fill","font-size"],At=["x","y","font-size","fill"],Xt=["x","y","font-size","fill"],jt=["x","y","font-size","fill"],Gt={key:4,class:"vue-data-ui-watermark"},Ut={key:6,ref:"source",dir:"auto"},qt={style:{"padding-top":"36px",position:"relative"}},Yt={class:"vue-ui-data-table"},Ht={key:0},Wt=["data-cell"],Kt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Jt={key:0},Qt={key:1},Zt=["data-cell"],el={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},tl={key:0},ll={key:1},al=["data-cell"],ol={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},nl={key:0},rl={key:1},sl=["data-cell"],ul={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},cl={key:0},il={key:1},dl=["data-cell"],yl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},vl={key:0},hl={key:1},fl=["data-cell"],pl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ml={key:0},bl={key:1},gl=["data-cell"],kl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},_l={key:0},xl={key:1},Bl=["data-cell"],El={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Nl=["data-cell"],Sl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Cl=["data-cell"],wl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},zl=["data-cell"],Vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},$l=["data-cell"],Tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Fl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(le,{expose:ae,emit:oe}){e.useCssVars(a=>({"4c4794f5":a.tdo}));const{vue_ui_chestnut:ne}=o.useConfig(),k=le,z=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),I=e.ref(null),re=e.ref(null),M=e.ref(0),t=e.computed({get:()=>j(),set:a=>a}),{userOptionsVisible:T,setUserOptionsVisibility:R,keepUserOptionState:A}=Ee.useUserOptionState({config:t.value}),{svgRef:X}=Ne.useChartAccessibility({config:t.value.style.chart.layout.title});function j(){const a=te.useNestedProp({userConfig:k.config,defaultConfig:ne});return a.theme?{...te.useNestedProp({userConfig:o.themes.vue_ui_chestnut[a.theme]||k.config,defaultConfig:a}),customPalette:o.themePalettes[a.theme]||o.palette}:a}e.watch(()=>k.config,a=>{t.value=j(),T.value=!t.value.userOptions.showOnChartHover,S.value.showTable=t.value.table.show,J()},{deep:!0});const{isPrinting:G,isImaging:U,generatePdf:q,generateImage:Y}=ee.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),se=e.computed(()=>t.value.userOptions.show),F=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),S=e.ref({showTable:t.value.table.show}),L=e.ref(null),H=e.ref(!1),ue=e.computed(()=>t.value.table.responsiveBreakpoint),r=e.ref({gap:6,padding:{top:102,left:12,right:12,bottom:96},width:1024,height:0,branchSize:32,branchStart:128}),p=e.computed(()=>({left:r.value.padding.left,top:r.value.padding.top,right:r.value.width-r.value.padding.right,bottom:r.value.height-r.value.padding.bottom,width:r.value.width-(r.value.padding.left+r.value.padding.right),height:r.value.height-(r.value.padding.top+r.value.padding.bottom),seedX:r.value.padding.left+64})),_=e.computed(()=>z.value?k.dataset.flatMap(a=>(a.branches||[]).map(s=>s.value||0)).reduce((a,s)=>a+s,0):0),m=e.computed(()=>(k.dataset.forEach((a,s)=>{o.getMissingDatasetAttributes({datasetObject:a,requiredAttributes:["name","branches"]}).forEach(l=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:l,index:s})}),a.branches&&a.branches.forEach((l,n)=>{o.getMissingDatasetAttributes({datasetObject:l,requiredAttributes:["name","value"]}).forEach(d=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:d,index:`${s} - ${n}`})}),l.breakdown&&l.breakdown.forEach((d,i)=>{o.getMissingDatasetAttributes({datasetObject:d,requiredAttributes:["name","value"]}).forEach(y=>{o.error({componentName:"VueUiChestnut",type:"datasetSerieAttribute",property:y,index:`${s} - ${n} - ${i}`})})})})}),k.dataset.map((a,s)=>{const l=(a.branches||[]).map(n=>n.value||0).reduce((n,d)=>n+d,0);return{...a,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],id:a.id||`root_${s}_${h.value}`,type:"root",total:l,rootIndex:s,branches:(a.branches||[]).map((n,d)=>({...n,rootName:a.name,rootIndex:s,color:o.convertColorToHex(a.color)||F.value[s]||o.palette[s]||o.palette[s%o.palette.length],value:n.value>=0?n.value:0,id:n.id||`branch_${s}_${d}_${h.value}`,proportionToRoot:n.value/l,type:"branch",breakdown:(n.breakdown||[]).map((i,y)=>({table:{rootName:a.name,rootValue:l,rootToTotal:l/_.value,branchName:n.name,branchValue:n.value,branchToTotal:n.value/_.value,branchToRoot:n.value/l,nutName:i.name,nutValue:i.value,nutToTotal:i.value/_.value,nutToRoot:i.value/l,nutToBranch:i.value/n.value},...i,type:"nut",branchName:n.name,rootName:a.name,branchTotal:n.value>=0?n.value:0,proportionToBranch:i.value/n.value,proportionToRoot:i.value/l,proportionToTree:i.value/_.value,rootIndex:s,id:i.id||`nut_${s}_${d}_${y}_${h.value}`,color:o.convertColorToHex(i.color)||F.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function ce(){return m.value}const C=oe,ie=e.computed(()=>m.value.flatMap(a=>a.branches).length),de=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ye=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),W=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=p.value.height/m.value.length/2,n=a.total/de.value*(l>64?64:l);return{...a,x:p.value.seedX,y:p.value.top+p.value.height/m.value.length*(s+1)-(p.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),ve=e.computed(()=>t.value.style.chart.layout.branches.widthRatio<=0?.1:t.value.style.chart.layout.branches.widthRatio>1.8?1.8:t.value.style.chart.layout.branches.widthRatio),he=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>he.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+p.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:W.value,x2:384*a.value/ye.value*ve.value+W.value})));function D(a){const s=B.value.find(l=>l.rootIndex===a.rootIndex);return{x:s.x,y:s.y,r:s.r}}const u=e.ref(null),x=e.ref(null),v=e.ref(null),b=e.ref(null);function f(){u.value=null,v.value=null,b.value=null}function g(a){return b.value?b.value===null?!0:a.type==="root"?a.id===b.value.id:a.rootIndex===b.value.rootIndex:u.value===null&&v.value===null?!0:a.type==="nut"?u.value.id===a.id:a.type==="branch"?v.value.id===a.id:a.type==="root"?v.value&&v.value.rootIndex===a.rootIndex||u.value&&u.value.rootIndex===a.rootIndex:!1}function fe(a){f(),e.nextTick(()=>{u.value=a,v.value=a,x.value=o.makeDonut({series:a.breakdown,base:1},a.x2+24+t.value.style.chart.layout.nuts.offsetX,a.y1+r.value.branchSize/2,80,80),C("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,C("selectNut",null)}function O(a){v.value&&v.value.id===a.id?(v.value=null,f(),C("selectBranch",null)):(f(),v.value=a,C("selectBranch",a))}function K(a){b.value&&b.value.id===a.id?(f(),C("selectRoot",null)):(f(),b.value=a,C("selectRoot",a))}function pe(){return p.value.bottom-(u.value.y1+180)<0?0:p.value.bottom}function w(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function me(){const a=new ResizeObserver(s=>{s.forEach(l=>{H.value=l.contentRect.width<ue.value})});L.value&&a.observe(L.value)}e.onMounted(()=>{J()});function J(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ie.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,me()}const c=e.computed(()=>{const a=[t.value.table.th.translations.rootName,t.value.table.th.translations.rootValue,t.value.table.th.translations.rootToTotal,t.value.table.th.translations.branchName,t.value.table.th.translations.branchValue,t.value.table.th.translations.branchToRoot,t.value.table.th.translations.branchToTotal,t.value.table.th.translations.nutName,t.value.table.th.translations.nutValue,t.value.table.th.translations.nutToBranch,t.value.table.th.translations.nutToRoot,t.value.table.th.translations.nutToTotal],s=m.value.flatMap((l,n)=>l.branches.flatMap((d,i)=>d.breakdown.flatMap((y,Dl)=>y.table)));return{head:a,body:s}});function Q(){e.nextTick(()=>{const a=[[t.value.style.chart.layout.title.text],[t.value.style.chart.layout.title.subtitle.text],[""],["Grand total",_.value],[""]],s=c.value.head,l=c.value.body.map((i,y)=>[c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootName,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootValue,c.value.body[y-1]&&c.value.body[y-1].rootName===i.rootName?"":i.rootToTotal,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchName,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchValue,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToRoot,c.value.body[y-1]&&c.value.body[y-1].branchName===i.branchName?"":i.branchToTotal,i.nutName,i.nutValue,i.nutToBranch,i.nutToRoot,i.nutToTotal]),n=a.concat([s]).concat(l),d=o.createCsvContent(n);o.downloadCsv({csvContent:d,title:t.value.style.chart.layout.title.text||"vue-ui-chestnut"})})}const V=e.ref(!1);function be(a){V.value=a,M.value+=1}function Z(){S.value.showTable=!S.value.showTable}const $=e.ref(!1);function P(){$.value=!$.value}return ae({getData:ce,generatePdf:q,generateCsv:Q,generateImage:Y,toggleTable:Z,toggleAnnotator:P}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:I,id:`vue-ui-chestnut_${h.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.chart.backgroundColor}`),onMouseenter:s[2]||(s[2]=()=>e.unref(R)(!0)),onMouseleave:s[3]||(s[3]=()=>e.unref(R)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Be.PenAndPaper,{key:0,svgRef:e.unref(X),backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:P},null,8,["svgRef","backgroundColor","color","active"])):e.createCommentVNode("",!0),se.value?(e.openBlock(),e.createElementBlock("div",we,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&z.value&&(e.unref(A)||e.unref(T))?(e.openBlock(),e.createBlock(ee.UserOptions,{ref_key:"details",ref:re,key:`user_options_${M.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(U),isPrinting:e.unref(G),uid:h.value,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:V.value,titles:{...t.value.userOptions.buttonTitles},chartElement:I.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:be,onGeneratePdf:e.unref(q),onGenerateCsv:Q,onGenerateImage:e.unref(Y),onToggleTable:Z,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(A)?e.unref(T)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.menuIcon?{name:"menuIcon",fn:e.withCtx(({isOpen:l,color:n})=>[e.renderSlot(a.$slots,"menuIcon",e.normalizeProps(e.guardReactiveProps({isOpen:l,color:n})),void 0,!0)]),key:"0"}:void 0,a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,a.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:l,isFullscreen:n})=>[e.renderSlot(a.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:l,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,a.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:l,isAnnotator:n})=>[e.renderSlot(a.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:l,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),r.value.height>0&&z.value?(e.openBlock(),e.createElementBlock("svg",{key:3,ref_key:"svgRef",ref:X,xmlns:e.unref(o.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":V.value,"vue-data-ui-fulscreen--off":!V.value}),viewBox:`0 0 ${r.value.width<=0?10:r.value.width} ${r.value.height<=0?10:r.value.height}`,style:e.normalizeStyle(`overflow:visible;background:transparent;color:${t.value.style.chart.color}`)},[e.createVNode(xe._sfc_main),a.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:0,y:0,width:r.value.width<=0?10:r.value.width,height:r.value.height<=0?10:r.value.height,style:{pointerEvents:"none"}},[e.renderSlot(a.$slots,"chart-background",{},void 0,!0)],8,Ve)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",$e,[t.value.style.chart.layout.title.text?(e.openBlock(),e.createElementBlock("text",{key:0,"text-anchor":"middle",fill:t.value.style.chart.layout.title.color,"font-weight":t.value.style.chart.layout.title.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.fontSize,x:r.value.width/2,y:12+t.value.style.chart.layout.title.fontSize+t.value.style.chart.layout.title.offsetY,onClick:f},e.toDisplayString(t.value.style.chart.layout.title.text),9,Te)):e.createCommentVNode("",!0),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("text",{key:1,"text-anchor":"middle",fill:t.value.style.chart.layout.title.subtitle.color,"font-weight":t.value.style.chart.layout.title.subtitle.bold?"bold":"normal","font-size":t.value.style.chart.layout.title.subtitle.fontSize,x:r.value.width/2,y:48+t.value.style.chart.layout.title.subtitle.fontSize+t.value.style.chart.layout.title.subtitle.offsetY,onClick:f},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Fe)):e.createCommentVNode("",!0)])),e.createElementVNode("defs",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(l,n)=>(e.openBlock(),e.createElementBlock("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`root_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.05),100-t.value.style.chart.layout.roots.gradientIntensity)},null,8,De),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Oe)],8,Le))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,l=>(e.openBlock(),e.createElementBlock("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"0%",id:`branch_gradient_${h.value}_${l.rootIndex}`},[e.createElementVNode("stop",{offset:"0%","stop-color":l.color},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(e.unref(o.shiftHue)(l.color,.02),100-t.value.style.chart.layout.branches.gradientIntensity)},null,8,Me)],8,Pe))),256)),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nutpick_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,je)],8,Re),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ue),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,qe),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ye)],8,Ge),e.createElementVNode("radialGradient",{cx:"50%",cy:"50%",r:"50%",fx:"50%",fy:"50%",id:`nut_underlayer_${h.value}`},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,100)},null,8,We),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ke),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,Je)],8,He)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",Qe,[e.createElementVNode("text",{x:p.value.seedX,y:32+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:f},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ze),e.createElementVNode("text",{x:p.value.seedX,y:38+t.value.style.chart.layout.grandTotal.fontSize+t.value.style.chart.layout.grandTotal.offsetY,"font-size":t.value.style.chart.layout.grandTotal.fontSize,"font-weight":t.value.style.chart.layout.grandTotal.bold?"bold":"normal",fill:t.value.style.chart.layout.grandTotal.color,"text-anchor":"middle",onClick:f},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.grandTotal.formatter,_.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.grandTotal.prefix,v:_.value,s:t.value.style.chart.layout.grandTotal.suffix,r:t.value.style.chart.layout.grandTotal.roundingValue}))),9,et)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.value.branchSize,(n,d)=>(e.openBlock(),e.createElementBlock("path",{d:`M ${l.x1},${l.y1+d} C${l.x1-20},${l.y1+d} ${l.x1-80},${l.y1+d} ${D(l).x+D(l).r/2}, ${D(l).y} `,stroke:e.unref(o.setOpacity)(l.color,t.value.style.chart.layout.links.opacity),fill:"none","stroke-width":"2","shape-rendering":"cirspEdges",style:e.normalizeStyle(`opacity:${g(l)?1:0}`),onClick:f},null,12,tt))),256))]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.underlayerColor,stroke:"none",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`)},null,12,lt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("circle",{cx:l.x,cy:l.y,r:l.r,fill:t.value.style.chart.layout.roots.useGradient?`url(#root_gradient_${h.value}_${l.rootIndex})`:l.color,stroke:t.value.style.chart.layout.roots.stroke,"stroke-width":t.value.style.chart.layout.roots.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>K(l)},null,12,at))),256)),t.value.style.chart.layout.roots.labels.show?(e.openBlock(),e.createElementBlock("g",ot,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,(l,n)=>(e.openBlock(),e.createElementBlock("text",{x:l.x,y:l.y+t.value.style.chart.layout.roots.labels.fontSize/2.6,"text-anchor":"middle","font-size":t.value.style.chart.layout.roots.labels.fontSize,fill:t.value.style.chart.layout.roots.labels.adaptColorToBackground?e.unref(o.adaptColorToBackground)(l.color):t.value.style.chart.layout.roots.labels.color,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>K(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.roots.labels.prefix,v:l.total,s:t.value.style.chart.layout.roots.labels.suffix,r:t.value.style.chart.layout.roots.labels.roundingValue}),{datapoint:l})),13,nt))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("g",null,[u.value&&l.rootIndex===u.value.rootIndex||v.value&&l.rootIndex===v.value.rootIndex||b.value&&l.rootIndex===b.value.rootIndex?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("text",{x:l.x,y:l.y+l.r+24,"text-anchor":"middle",fill:t.value.style.chart.layout.roots.labels.name.color,"font-size":t.value.style.chart.layout.roots.labels.name.fontSize,"font-weight":t.value.style.chart.layout.roots.labels.name.bold?"bold":"normal",onClick:f},e.toDisplayString(l.name),9,st)])):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.underlayerColor,rx:t.value.style.chart.layout.branches.borderRadius,stroke:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.05}`),onClick:n=>O(l)},null,12,ut))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("rect",{x:l.x1,y:l.y1,height:r.value.branchSize,width:l.x2-l.x1,fill:t.value.style.chart.layout.branches.useGradient?`url(#branch_gradient_${h.value}_${l.rootIndex})`:l.color,rx:t.value.style.chart.layout.branches.borderRadius,stroke:t.value.style.chart.layout.branches.stroke,"stroke-width":t.value.style.chart.layout.branches.strokeWidth,style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:d=>O(l)},null,12,ct))),256)),t.value.style.chart.layout.branches.labels.dataLabels.show?(e.openBlock(),e.createElementBlock("g",it,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[l.proportionToRoot*100>t.value.style.chart.layout.branches.labels.dataLabels.hideUnderValue?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize/1.5,"text-anchor":"start",fill:e.unref(o.adaptColorToBackground)(l.color),"font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,"font-weight":"bold",style:e.normalizeStyle(`cursor:pointer; opacity:${g(l)?1:.05}`),onClick:n=>O(l)},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),13,dt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o.makeDonut)({series:l.breakdown,base:1},l.x2+24+t.value.style.chart.layout.nuts.offsetX,l.y1+r.value.branchSize/2,r.value.branchSize/3,r.value.branchSize/3),(d,i)=>(e.openBlock(),e.createElementBlock("path",{d:d.path,stroke:d.color,"stroke-width":10,fill:"none",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},null,12,yt))),256)),e.createElementVNode("circle",{fill:t.value.style.chart.layout.nuts.useGradient?`url(#nut_${h.value})`:"transparent",cx:l.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:l.y1+r.value.branchSize/2,r:r.value.branchSize/2+2,onClick:d=>fe(l),style:e.normalizeStyle(`cursor:pointer;opacity:${g(l)?1:.1}`)},null,12,vt)]))),256)),t.value.style.chart.layout.branches.labels.show&&!v.value?(e.openBlock(),e.createElementBlock("g",ht,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("text",{x:l.x2+r.value.branchSize+24+t.value.style.chart.layout.nuts.offsetX,y:l.y1+r.value.branchSize/2+5,"font-size":t.value.style.chart.layout.branches.labels.fontSize,"font-weight":t.value.style.chart.layout.branches.labels.bold?"bold":"normal",fill:t.value.style.chart.layout.branches.labels.color,"text-anchor":"start",style:e.normalizeStyle(`opacity:${g(l)?1:.1}`)},e.toDisplayString(l.name),13,ft))),256))])):e.createCommentVNode("",!0),e.createElementVNode("line",{x1:256+r.value.padding.left,x2:256+r.value.padding.left,y1:p.value.top,y2:p.value.bottom,stroke:t.value.style.chart.layout.verticalSeparator.stroke,"stroke-width":t.value.style.chart.layout.verticalSeparator.strokeWidth},null,8,pt),!u.value&&!v.value?(e.openBlock(),e.createElementBlock("foreignObject",{key:6,x:0,y:p.value.bottom,height:r.value.height-p.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:f},[e.createElementVNode("div",bt,[e.createElementVNode("div",gt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(B.value,l=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:3px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",kt,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,_t)])),e.createElementVNode("span",null,e.toDisplayString(l.name)+":",1),e.createElementVNode("b",null,e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.roots.labels.formatter,l.total,e.unref(o.dataLabel)({p:t.value.style.chart.layout.legend.prefix,v:l.total,s:t.value.style.chart.layout.legend.suffix,r:t.value.style.chart.layout.legend.roundingValue}),{datapoint:l})),1),e.createTextVNode(" ("+e.toDisplayString(e.unref(o.dataLabel)({v:l.total/_.value*100,s:"%",r:t.value.style.chart.layout.legend.roundingPercentage}))+") ",1)],4))),256))])])],8,mt)):e.createCommentVNode("",!0),u.value&&x.value?(e.openBlock(),e.createElementBlock("g",xt,[(e.openBlock(),e.createElementBlock("foreignObject",{x:0,y:pe(),height:r.value.height-p.value.bottom,width:r.value.width,style:{overflow:"visible"},onClick:f},[e.createElementVNode("div",Et,[e.createElementVNode("b",null,e.toDisplayString(u.value.name),1),e.createElementVNode("div",Nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value.breakdown,(l,n)=>(e.openBlock(),e.createElementBlock("div",{style:e.normalizeStyle(`display:flex;align-items:center;gap:6px;flex-direction:row;font-size:${t.value.style.chart.layout.legend.fontSize}px;`)},[(e.openBlock(),e.createElementBlock("svg",St,[e.createElementVNode("circle",{cx:"10",cy:"10",r:"10",fill:l.color,stroke:"none"},null,8,Ct)])),e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(l.name)+": ",1),e.createElementVNode("b",null,e.toDisplayString(t.value.style.chart.layout.legend.prefix)+" "+e.toDisplayString(l.value.toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingValue))+" "+e.toDisplayString(t.value.style.chart.layout.legend.suffix),1),e.createTextVNode(" ("+e.toDisplayString((l.proportionToBranch*100).toFixed(t.value.style.chart.layout.nuts.selected.labels.roundingPercentage))+"%)",1)])],4))),256))])])],8,Bt)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:256,fill:`url(#nut_underlayer_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,wt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("path",{key:0,d:e.unref(o.calcNutArrowPath)(l,{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+r.value.branchSize/2},16,16,!1,!1,64),stroke:l.color,"stroke-width":"1","stroke-linecap":"round","stroke-linejoin":"round",fill:"none",class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,zt)):e.createCommentVNode("",!0)]))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:118,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Vt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,l=>(e.openBlock(),e.createElementBlock("path",{d:l.path,stroke:l.color,"stroke-width":64,fill:"none",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,$t))),256)),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:100,fill:`url(#nutpick_${h.value})`,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Tt),e.createElementVNode("circle",{cx:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,cy:u.value.y1+r.value.branchSize/2,r:48,fill:t.value.style.chart.backgroundColor,onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},null,10,Ft),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+8,fill:t.value.style.chart.layout.nuts.selected.labels.core.total.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.total.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.total.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(t.value.translations.total),11,Lt),e.createElementVNode("text",{x:u.value.x2+24+t.value.style.chart.layout.nuts.offsetX,y:u.value.y1+36,fill:t.value.style.chart.layout.nuts.selected.labels.core.value.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.core.value.fontSize,"font-weight":t.value.style.chart.layout.nuts.selected.labels.core.value.bold?"bold":"normal","text-anchor":"middle",onClick:N,class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.core.value.prefix,v:u.value.value,s:t.value.style.chart.layout.nuts.selected.labels.core.value.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:u.value})),11,Dt),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l),fill:l.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")}," ⬤ ",14,Ot)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l,!0).anchor,y:e.unref(o.calcMarkerOffsetY)(l),fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(u.value.breakdown[n].name),15,Pt)):e.createCommentVNode("",!0)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x.value,(l,n)=>(e.openBlock(),e.createElementBlock("g",null,[w(l)?(e.openBlock(),e.createElementBlock("text",{key:0,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].value/u.value.value*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].branchName)+" "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.nuts.selected.labels.dataLabels.formatter,u.value.breakdown[n].value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.nuts.selected.labels.dataLabels.prefix,v:u.value.breakdown[n].value,s:t.value.style.chart.layout.nuts.selected.labels.dataLabels.suffix,r:t.value.style.chart.layout.nuts.selected.roundingValue}),{datapoint:x.value,seriesIndex:n})),15,It)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:1,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*2,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToRoot*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(u.value.breakdown[n].rootName),15,Mt)):e.createCommentVNode("",!0),w(l)?(e.openBlock(),e.createElementBlock("text",{key:2,x:e.unref(o.calcMarkerOffsetX)(l,!0).x,"text-anchor":e.unref(o.calcMarkerOffsetX)(l).anchor,y:e.unref(o.calcMarkerOffsetY)(l)+t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize*3,fill:t.value.style.chart.layout.nuts.selected.labels.dataLabels.color,"font-size":t.value.style.chart.layout.nuts.selected.labels.dataLabels.fontSize,style:e.normalizeStyle(`font-weight:${t.value.style.chart.layout.nuts.selected.labels.dataLabels.bold?"bold":""}`),class:e.normalizeClass(t.value.style.chart.layout.nuts.selected.useMotion?"vue-ui-chestnut-animated":"")},e.toDisplayString(e.unref(o.dataLabel)({v:u.value.breakdown[n].proportionToTree*100,s:"%",r:t.value.style.chart.layout.nuts.selected.labels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),15,Rt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(E.value,l=>(e.openBlock(),e.createElementBlock("g",null,[v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:0,x:l.x1+6,y:l.y1+r.value.branchSize+24,"font-weight":"bold","text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:f},e.toDisplayString(l.name)+": "+e.toDisplayString(e.unref(o.applyDataLabel)(t.value.style.chart.layout.branches.labels.dataLabels.formatter,l.value,e.unref(o.dataLabel)({p:t.value.style.chart.layout.branches.labels.dataLabels.prefix,v:l.value,s:t.value.style.chart.layout.branches.labels.dataLabels.suffix,r:t.value.style.chart.layout.branches.labels.dataLabels.roundingValue}),{datapoint:l})),9,At)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:1,x:l.x1+6,y:l.y1+r.value.branchSize+48,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:f},e.toDisplayString(e.unref(o.dataLabel)({v:l.proportionToRoot*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.of)+" "+e.toDisplayString(l.rootName),9,Xt)):e.createCommentVNode("",!0),v.value&&v.value.id===l.id&&!u.value?(e.openBlock(),e.createElementBlock("text",{key:2,x:l.x1+6,y:l.y1+r.value.branchSize+72,"text-anchor":"start","font-size":t.value.style.chart.layout.branches.labels.dataLabels.fontSize,fill:t.value.style.chart.layout.branches.labels.color,onClick:f},e.toDisplayString(e.unref(o.dataLabel)({v:l.value/_.value*100,s:"%",r:t.value.style.chart.layout.branches.labels.dataLabels.roundingPercentage}))+" "+e.toDisplayString(t.value.translations.proportionToTree),9,jt)):e.createCommentVNode("",!0)]))),256)),e.renderSlot(a.$slots,"svg",{svg:r.value},void 0,!0)],14,ze)):e.createCommentVNode("",!0),a.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Gt,[e.renderSlot(a.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(G)||e.unref(U)})),void 0,!0)])):e.createCommentVNode("",!0),z.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ge.default,{key:5,config:{type:"chestnut",style:{backgroundColor:t.value.style.chart.backgroundColor,chestnut:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(a.$slots,"legend",{legend:m.value},void 0,!0),a.$slots.source?(e.openBlock(),e.createElementBlock("div",Ut,[e.renderSlot(a.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createBlock(_e.default,{key:7,hideDetails:"",config:{open:S.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color},head:{backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color}}},{content:e.withCtx(()=>[e.createElementVNode("div",{ref_key:"tableContainer",ref:L,class:"vue-ui-chestnut-table"},[e.createElementVNode("div",qt,[e.createElementVNode("div",{role:"button",tabindex:"0",style:e.normalizeStyle(`width:32px; position: absolute; top: 0; left:4px; padding: 0 0px; display: flex; align-items:center;justify-content:center;height: 36px; width: 32px; cursor:pointer; background:${t.value.table.th.backgroundColor};`),onClick:s[0]||(s[0]=l=>S.value.showTable=!1),onKeypress:s[1]||(s[1]=e.withKeys(l=>S.value.showTable=!1,["enter"]))},[e.createVNode(ke.default,{name:"close",stroke:t.value.table.th.color,"stroke-width":2},null,8,["stroke"])],36),e.createElementVNode("div",{style:{width:"100%"},class:e.normalizeClass({"vue-ui-responsive":H.value})},[e.createElementVNode("table",Yt,[e.createElementVNode("caption",{style:e.normalizeStyle({backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline}),class:"vue-ui-data-table__caption"},[e.createTextVNode(e.toDisplayString(t.value.style.chart.layout.title.text)+" ",1),t.value.style.chart.layout.title.subtitle.text?(e.openBlock(),e.createElementBlock("span",Ht,e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),1)):e.createCommentVNode("",!0)],4),e.createElementVNode("thead",null,[e.createElementVNode("tr",{role:"row",style:e.normalizeStyle(`background:${t.value.table.th.backgroundColor};color:${t.value.table.th.color}`)},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.head,l=>(e.openBlock(),e.createElementBlock("th",{style:e.normalizeStyle(`outline:${t.value.table.th.outline}`)},e.toDisplayString(l),5))),256))],4)]),e.createElementVNode("tbody",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.body,(l,n)=>(e.openBlock(),e.createElementBlock("tr",{class:e.normalizeClass({"vue-ui-data-table__tbody__row":!0,"vue-ui-data-table__tbody__row-even":n%2===0,"vue-ui-data-table__tbody__row-odd":n%2!==0}),style:e.normalizeStyle(`background:${t.value.table.td.backgroundColor};color:${t.value.table.td.color}`)},[e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[0]},[e.createElementVNode("div",Kt,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",Jt)):(e.openBlock(),e.createElementBlock("span",Qt,e.toDisplayString(l.rootName),1))])],12,Wt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[1]},[e.createElementVNode("div",el,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",tl)):(e.openBlock(),e.createElementBlock("span",ll,e.toDisplayString(l.rootValue.toFixed(t.value.table.td.roundingValue)),1))])],12,Zt),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[2]},[e.createElementVNode("div",ol,[c.value.body[n-1]&&c.value.body[n-1].rootName===l.rootName?(e.openBlock(),e.createElementBlock("span",nl)):(e.openBlock(),e.createElementBlock("span",rl,e.toDisplayString((l.rootToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,al),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[3]},[e.createElementVNode("div",ul,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",cl)):(e.openBlock(),e.createElementBlock("span",il,e.toDisplayString(l.branchName),1))])],12,sl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[4]},[e.createElementVNode("div",yl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",vl)):(e.openBlock(),e.createElementBlock("span",hl,e.toDisplayString(l.branchValue.toFixed(t.value.table.td.roundingValue)),1))])],12,dl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[5]},[e.createElementVNode("div",pl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",ml)):(e.openBlock(),e.createElementBlock("span",bl,e.toDisplayString((l.branchToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,fl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[6]},[e.createElementVNode("div",kl,[c.value.body[n-1]&&c.value.body[n-1].branchName===l.branchName?(e.openBlock(),e.createElementBlock("span",_l)):(e.openBlock(),e.createElementBlock("span",xl,e.toDisplayString((l.branchToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1))])],12,gl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[7]},[e.createElementVNode("div",El,e.toDisplayString(l.nutName),1)],12,Bl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[8]},[e.createElementVNode("div",Sl,e.toDisplayString(l.nutValue.toFixed(t.value.table.td.roundingValue)),1)],12,Nl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[9]},[e.createElementVNode("div",wl,e.toDisplayString((l.nutToBranch*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,Cl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[10]},[e.createElementVNode("div",Vl,e.toDisplayString((l.nutToRoot*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,zl),e.createElementVNode("td",{class:"vue-ui-data-table__tbody__td",style:e.normalizeStyle(`outline:${t.value.table.td.outline}`),"data-cell":c.value.head[11]},[e.createElementVNode("div",Tl,e.toDisplayString((l.nutToTotal*100).toFixed(t.value.table.td.roundingPercentage))+"% ",1)],12,$l)],6))),256))])])],2)])],512)]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Ce))}},Ll=Se._export_sfc(Fl,[["__scopeId","data-v-3dcea4e3"]]);exports.default=Ll;