vue-data-ui 2.4.78 → 2.4.79
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Arrow-C7AmfY-d.js → Arrow-CZYIn9eL.js} +1 -1
- package/dist/{Arrow-DbrjRMa6.cjs → Arrow-Ckps_h_h.cjs} +1 -1
- package/dist/{BaseIcon-Dzpk4O8L.js → BaseIcon-BmzdBA_n.js} +1 -1
- package/dist/{BaseIcon-CIjjPDqj.cjs → BaseIcon-DmjD9_x3.cjs} +1 -1
- package/dist/{DataTable-DtRXoetj.js → DataTable-B2jdS-OG.js} +2 -2
- package/dist/{DataTable-wN-jvOfe.cjs → DataTable-CX55KEac.cjs} +1 -1
- package/dist/{Legend-RnRqBxiV.js → Legend-DCSiQPuL.js} +2 -2
- package/dist/{Legend-DqGE1lkA.cjs → Legend-DSoIWaIm.cjs} +1 -1
- package/dist/{PackageVersion-CgJdp_Ki.js → PackageVersion-CiKxfy3h.js} +1 -1
- package/dist/{PackageVersion-Dn-t7tbm.cjs → PackageVersion-DLubhuZS.cjs} +1 -1
- package/dist/{PenAndPaper-BTLEk55u.js → PenAndPaper-Dkvtj3o8.js} +3 -3
- package/dist/{PenAndPaper-DFXJJink.cjs → PenAndPaper-DmTTxoH_.cjs} +1 -1
- package/dist/{Shape-B1fqUhjt.js → Shape-BO_Ef-2H.js} +1 -1
- package/dist/{Shape-D7IbPjU8.cjs → Shape-DicDy5ja.cjs} +1 -1
- package/dist/{Slicer-GQf9ZyPj.js → Slicer-3blwRUEA.js} +2 -2
- package/dist/{Slicer-8bCK41mN.cjs → Slicer-be7PbWkd.cjs} +1 -1
- package/dist/{Title-XYNHfYwN.js → Title-B4ZkvXK-.js} +1 -1
- package/dist/{Title-D-6pIV0l.cjs → Title-Dc2F9vf7.cjs} +1 -1
- package/dist/{Tooltip-DYRo59nq.js → Tooltip-B0LX9lY0.js} +1 -1
- package/dist/{Tooltip-CNox4F8U.cjs → Tooltip-Cd-T5cyc.cjs} +1 -1
- package/dist/{index-KJL8ra_6.cjs → index-0dnbsm6P.cjs} +1 -1
- package/dist/{index-B8Eaq54E.js → index-DJL-Bkqp.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{useNestedProp-Bu958azG.cjs → useNestedProp-B5IAA861.cjs} +1 -1
- package/dist/{useNestedProp-Ka0R_Yqa.js → useNestedProp-uEksOW7g.js} +1 -1
- package/dist/{usePrinter-pDOF3CfL.cjs → usePrinter-CRgTdjvo.cjs} +1 -1
- package/dist/{usePrinter-D83W2gfG.js → usePrinter-DdGbL4Nm.js} +1 -1
- package/dist/{vue-data-ui-DgmXnSUU.js → vue-data-ui-DH_NVt2Y.js} +60 -60
- package/dist/{vue-data-ui-Ot5xYhbV.cjs → vue-data-ui-DnUrT668.cjs} +1 -1
- package/dist/vue-data-ui.cjs +1 -1
- package/dist/vue-data-ui.js +1 -1
- package/dist/{vue-ui-3d-bar-CB0XzatQ.cjs → vue-ui-3d-bar-CHmad-2R.cjs} +1 -1
- package/dist/{vue-ui-3d-bar-CqiW8qFZ.js → vue-ui-3d-bar-E96Fh4bt.js} +9 -9
- package/dist/{vue-ui-accordion-4-dyMgJA.cjs → vue-ui-accordion-BFiGf3JH.cjs} +1 -1
- package/dist/{vue-ui-accordion--5td7b94.js → vue-ui-accordion-B_eXBJPl.js} +3 -3
- package/dist/{vue-ui-age-pyramid-Bsg0z9ei.js → vue-ui-age-pyramid-CXRrdWei.js} +10 -10
- package/dist/{vue-ui-age-pyramid-DNseB8ej.cjs → vue-ui-age-pyramid-e_hykrXO.cjs} +1 -1
- package/dist/{vue-ui-annotator-CHjtF8NT.cjs → vue-ui-annotator-BgORX2C5.cjs} +1 -1
- package/dist/{vue-ui-annotator-obnYFvvq.js → vue-ui-annotator-D9LEIs0K.js} +1 -1
- package/dist/{vue-ui-bullet-CNWHd7dO.cjs → vue-ui-bullet-BOkYPzif.cjs} +1 -1
- package/dist/{vue-ui-bullet-yKEVhE17.js → vue-ui-bullet-Bag56IIJ.js} +8 -8
- package/dist/{vue-ui-candlestick-VBq82rfW.cjs → vue-ui-candlestick-B-jIAcFq.cjs} +1 -1
- package/dist/{vue-ui-candlestick-Cc-Ee4zv.js → vue-ui-candlestick-DO-VI3mP.js} +11 -11
- package/dist/{vue-ui-carousel-table-B6v1NycN.js → vue-ui-carousel-table-BMIh1Ebr.js} +4 -4
- package/dist/{vue-ui-carousel-table-DLwVijSb.cjs → vue-ui-carousel-table-EsGc3cUz.cjs} +1 -1
- package/dist/{vue-ui-chestnut-CekC1moT.js → vue-ui-chestnut-DSvIYyla.js} +8 -8
- package/dist/{vue-ui-chestnut-DHZbhIf_.cjs → vue-ui-chestnut-DztcJ6be.cjs} +1 -1
- package/dist/{vue-ui-cursor-CISKzkNu.js → vue-ui-cursor-BoIxmcTJ.js} +2 -2
- package/dist/{vue-ui-cursor-Bz-jVx3a.cjs → vue-ui-cursor-CIRMZioa.cjs} +1 -1
- package/dist/{vue-ui-dashboard-PAi8o4AC.cjs → vue-ui-dashboard-CGKgFm-J.cjs} +1 -1
- package/dist/{vue-ui-dashboard-w7Ts26Xc.js → vue-ui-dashboard-DEPiIO5h.js} +2 -2
- package/dist/{vue-ui-digits-I_lj1m6d.cjs → vue-ui-digits-5mLwwYL4.cjs} +1 -1
- package/dist/{vue-ui-digits-kaBR5FUU.js → vue-ui-digits-BsoQJduO.js} +2 -2
- package/dist/{vue-ui-donut-BVuaExCl.js → vue-ui-donut-G2ULBU8l.js} +12 -12
- package/dist/{vue-ui-donut-evolution-DAmX1OX-.js → vue-ui-donut-evolution-BTrHgtdk.js} +11 -11
- package/dist/{vue-ui-donut-evolution-ChGao_WW.cjs → vue-ui-donut-evolution-Blr2REpx.cjs} +1 -1
- package/dist/{vue-ui-donut-dDpMdK4G.cjs → vue-ui-donut-llWIbtQp.cjs} +1 -1
- package/dist/{vue-ui-dumbbell-CrQNRN_m.js → vue-ui-dumbbell-B016NgrO.js} +10 -10
- package/dist/{vue-ui-dumbbell-DsR4RQY9.cjs → vue-ui-dumbbell-B6sZjfji.cjs} +1 -1
- package/dist/{vue-ui-flow-Dhcvvzee.cjs → vue-ui-flow-DBSOYUBa.cjs} +1 -1
- package/dist/{vue-ui-flow-B0lCe4G8.js → vue-ui-flow-Drv-rQxc.js} +9 -9
- package/dist/{vue-ui-funnel-Cinv1hUx.js → vue-ui-funnel-BToC759R.js} +9 -9
- package/dist/{vue-ui-funnel-Bu_wMJ98.cjs → vue-ui-funnel-DB2ffuqD.cjs} +1 -1
- package/dist/{vue-ui-galaxy-BcwunIK3.js → vue-ui-galaxy-BugfEsdL.js} +11 -11
- package/dist/{vue-ui-galaxy-zx6O9AuV.cjs → vue-ui-galaxy-Bv5qHEuI.cjs} +1 -1
- package/dist/{vue-ui-gauge-C4W4OAXQ.js → vue-ui-gauge-B1e3bQ5v.js} +7 -7
- package/dist/{vue-ui-gauge-Cb6sxoZI.cjs → vue-ui-gauge-Dz6mZtio.cjs} +1 -1
- package/dist/{vue-ui-gizmo-D4VHyFmN.js → vue-ui-gizmo-BnI-keJZ.js} +3 -3
- package/dist/{vue-ui-gizmo-DBSYx24z.cjs → vue-ui-gizmo-qy22gBYB.cjs} +1 -1
- package/dist/{vue-ui-heatmap-CBNt4Huo.cjs → vue-ui-heatmap-CWlfZsyN.cjs} +1 -1
- package/dist/{vue-ui-heatmap-C3WHfifV.js → vue-ui-heatmap-I3_jZmtP.js} +10 -10
- package/dist/{vue-ui-history-plot-dJp-Lai2.js → vue-ui-history-plot-DB6tM7q1.js} +11 -11
- package/dist/{vue-ui-history-plot-Dp8Llb3A.cjs → vue-ui-history-plot-Dy5l19KO.cjs} +1 -1
- package/dist/{vue-ui-kpi-Dnp8IUyb.cjs → vue-ui-kpi-C-RJn7Qb.cjs} +1 -1
- package/dist/{vue-ui-kpi-B3XhowYx.js → vue-ui-kpi-CMPPk7-2.js} +3 -3
- package/dist/{vue-ui-mini-loader-Cca7PA4v.js → vue-ui-mini-loader-BTovhpqa.js} +2 -2
- package/dist/{vue-ui-mini-loader-BgwhuEda.cjs → vue-ui-mini-loader-DdgUBFgc.cjs} +1 -1
- package/dist/{vue-ui-molecule-B1AocG3H.cjs → vue-ui-molecule-BToE-D1m.cjs} +1 -1
- package/dist/{vue-ui-molecule-BcZNqWfD.js → vue-ui-molecule-DEApFPTb.js} +11 -11
- package/dist/{vue-ui-mood-radar-Cn65TQEs.cjs → vue-ui-mood-radar-CzQJlxHB.cjs} +1 -1
- package/dist/{vue-ui-mood-radar-HjLL0ZZ8.js → vue-ui-mood-radar-DidL44m8.js} +11 -11
- package/dist/{vue-ui-nested-donuts-CymFt4B3.cjs → vue-ui-nested-donuts-B4rvzmai.cjs} +1 -1
- package/dist/{vue-ui-nested-donuts-BIqySYG_.js → vue-ui-nested-donuts-CZCq_ntG.js} +11 -11
- package/dist/{vue-ui-onion-BLMFR0GK.cjs → vue-ui-onion-BN1bQ_8T.cjs} +1 -1
- package/dist/{vue-ui-onion-muCAMEG8.js → vue-ui-onion-Bz7SkpKH.js} +11 -11
- package/dist/{vue-ui-parallel-coordinate-plot-DYOlnKPw.js → vue-ui-parallel-coordinate-plot-BROqRQi1.js} +12 -12
- package/dist/{vue-ui-parallel-coordinate-plot-i-hhfnwF.cjs → vue-ui-parallel-coordinate-plot-ihPS549o.cjs} +1 -1
- package/dist/{vue-ui-quadrant-DJPOp1-A.cjs → vue-ui-quadrant-D-8RaXV1.cjs} +1 -1
- package/dist/{vue-ui-quadrant-TU5fWoEw.js → vue-ui-quadrant-a8UWsJs0.js} +12 -12
- package/dist/{vue-ui-quick-chart-DzuUofFN.js → vue-ui-quick-chart-DtOsqO98.js} +9 -9
- package/dist/{vue-ui-quick-chart-CTJxOisL.cjs → vue-ui-quick-chart-vJIqGDPA.cjs} +1 -1
- package/dist/{vue-ui-radar-D4xX7TNQ.cjs → vue-ui-radar-CqVTynLe.cjs} +1 -1
- package/dist/{vue-ui-radar-C0WA20R8.js → vue-ui-radar-DpdtzwTa.js} +12 -12
- package/dist/{vue-ui-rating-DUcyhyrN.js → vue-ui-rating-CrSkkJtF.js} +2 -2
- package/dist/{vue-ui-rating-C2JILb2g.cjs → vue-ui-rating-DlIF1TSo.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-D-Wxskec.cjs → vue-ui-relation-circle-BNqozco5.cjs} +1 -1
- package/dist/{vue-ui-relation-circle-BYlIjbUK.js → vue-ui-relation-circle-DAbgurAL.js} +7 -7
- package/dist/{vue-ui-rings-CsXVOIn3.cjs → vue-ui-rings-BQBc8s_2.cjs} +1 -1
- package/dist/{vue-ui-rings-w4KQSfym.js → vue-ui-rings-FuqykMtf.js} +12 -12
- package/dist/{vue-ui-scatter--5Ob2lKM.cjs → vue-ui-scatter-Cspy4HEB.cjs} +1 -1
- package/dist/{vue-ui-scatter-CfgCA3Di.js → vue-ui-scatter-LB5ZPicT.js} +12 -12
- package/dist/{vue-ui-screenshot-BsD3ySuA.js → vue-ui-screenshot-BOSDTFhQ.js} +1 -1
- package/dist/{vue-ui-screenshot-UEVUHXWY.cjs → vue-ui-screenshot-DGJZevoI.cjs} +1 -1
- package/dist/{vue-ui-skeleton-D_YCUi1y.cjs → vue-ui-skeleton-DgPl6VyF.cjs} +1 -1
- package/dist/{vue-ui-skeleton-DpadzgbS.js → vue-ui-skeleton-z4MGfNaM.js} +3 -3
- package/dist/{vue-ui-smiley-BHqeb-Ol.js → vue-ui-smiley-BH4kob-0.js} +2 -2
- package/dist/{vue-ui-smiley-C32dLhtP.cjs → vue-ui-smiley-DAx9UeuW.cjs} +1 -1
- package/dist/{vue-ui-spark-trend-NAcB2zZ1.js → vue-ui-spark-trend-B2zsG57C.js} +5 -5
- package/dist/{vue-ui-spark-trend-Bt2wpc5C.cjs → vue-ui-spark-trend-C1IgkFvC.cjs} +1 -1
- package/dist/{vue-ui-sparkbar-BPpSxe5Z.js → vue-ui-sparkbar-BxILnvE_.js} +4 -4
- package/dist/{vue-ui-sparkbar-CgoGRT0_.cjs → vue-ui-sparkbar-DTAMO_6l.cjs} +1 -1
- package/dist/{vue-ui-sparkgauge-C1mW3KbZ.js → vue-ui-sparkgauge-Bh6Xnlrr.js} +4 -4
- package/dist/{vue-ui-sparkgauge-frN6uK_L.cjs → vue-ui-sparkgauge-oKz3v_tA.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-CqQY434G.cjs → vue-ui-sparkhistogram-BwHRHEjh.cjs} +1 -1
- package/dist/{vue-ui-sparkhistogram-HgBi5OvP.js → vue-ui-sparkhistogram-hroDFCtN.js} +5 -5
- package/dist/{vue-ui-sparkline-BABBXY2c.js → vue-ui-sparkline-BoTbKk0m.js} +4 -4
- package/dist/{vue-ui-sparkline-XOa6LfX2.cjs → vue-ui-sparkline-DVsfUCqf.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-B4Xduiv1.cjs → vue-ui-sparkstackbar-BPLyPxbb.cjs} +1 -1
- package/dist/{vue-ui-sparkstackbar-Ch3JvFBq.js → vue-ui-sparkstackbar-Dx-gwkJS.js} +5 -5
- package/dist/{vue-ui-stackbar-CH8tLDZq.cjs → vue-ui-stackbar-Bo35LeX3.cjs} +1 -1
- package/dist/{vue-ui-stackbar-JIEn0g7t.js → vue-ui-stackbar-CytcFp3F.js} +13 -13
- package/dist/{vue-ui-strip-plot-BkWzm1mI.cjs → vue-ui-strip-plot-6YPlHYHR.cjs} +1 -1
- package/dist/{vue-ui-strip-plot-RZu43QbP.js → vue-ui-strip-plot-BWElug2N.js} +11 -11
- package/dist/{vue-ui-table-CJ2gGmYi.js → vue-ui-table-CkyKeMnT.js} +1 -1
- package/dist/{vue-ui-table-CgtE4HWs.cjs → vue-ui-table-CpaLMB0s.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-DxTs_PZF.cjs → vue-ui-table-heatmap-C2p-9Bww.cjs} +1 -1
- package/dist/{vue-ui-table-heatmap-B_TfeHsa.js → vue-ui-table-heatmap-REK_djPO.js} +4 -4
- package/dist/{vue-ui-table-sparkline-PA9L6AjE.cjs → vue-ui-table-sparkline-D-p7um7k.cjs} +1 -1
- package/dist/{vue-ui-table-sparkline-DqMH7xbY.js → vue-ui-table-sparkline-XH9Z7XJu.js} +5 -5
- package/dist/{vue-ui-thermometer-AwZdEG3j.cjs → vue-ui-thermometer-B2_wvLY0.cjs} +1 -1
- package/dist/{vue-ui-thermometer-D7aR0elr.js → vue-ui-thermometer-CHDexaNq.js} +7 -7
- package/dist/{vue-ui-timer-C9sO9AoQ.js → vue-ui-timer-CO-ocJlg.js} +5 -5
- package/dist/{vue-ui-timer-C6fnDeD8.cjs → vue-ui-timer-XNil_xPc.cjs} +1 -1
- package/dist/{vue-ui-tiremarks-KvOyYNVW.js → vue-ui-tiremarks-D1KhIO-C.js} +7 -7
- package/dist/{vue-ui-tiremarks-Dje0I1vf.cjs → vue-ui-tiremarks-PhCHMESG.cjs} +1 -1
- package/dist/{vue-ui-treemap-BPxLXNZ5.js → vue-ui-treemap-CTaRPtej.js} +11 -11
- package/dist/{vue-ui-treemap-C2Vrj3tg.cjs → vue-ui-treemap-eRw-KvRP.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-_MWpPkwZ.cjs → vue-ui-vertical-bar-C397hdCy.cjs} +1 -1
- package/dist/{vue-ui-vertical-bar-BAdSzbYU.js → vue-ui-vertical-bar-CKNaAzgO.js} +12 -12
- package/dist/{vue-ui-waffle-DfJI5Lez.cjs → vue-ui-waffle-BoPIMVpL.cjs} +1 -1
- package/dist/{vue-ui-waffle-CW1UVf-q.js → vue-ui-waffle-IiqKFXtD.js} +12 -12
- package/dist/{vue-ui-wheel-DAwYc7XY.js → vue-ui-wheel-Qxs183kC.js} +7 -7
- package/dist/{vue-ui-wheel-CzZEsjmd.cjs → vue-ui-wheel-zs6y5J02.cjs} +1 -1
- package/dist/{vue-ui-word-cloud-BzfYkI08.js → vue-ui-word-cloud-7WimWD85.js} +151 -149
- package/dist/vue-ui-word-cloud-CKmr45uE.cjs +1 -0
- package/dist/{vue-ui-xy-BolkwiXB.cjs → vue-ui-xy-CkFO_zsE.cjs} +1 -1
- package/dist/{vue-ui-xy-CJYGMbMt.js → vue-ui-xy-DMwaxdDv.js} +14 -14
- package/dist/{vue-ui-xy-canvas-sB1dmJQc.js → vue-ui-xy-canvas-3FUkwO0G.js} +11 -11
- package/dist/{vue-ui-xy-canvas-DkltjVWN.cjs → vue-ui-xy-canvas-Cr3-2wGm.cjs} +1 -1
- package/package.json +1 -1
- package/dist/vue-ui-word-cloud-BEyV6jMo.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-KJL8ra_6.cjs"),X=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./Title-D-6pIV0l.cjs"),Y=require("./usePrinter-pDOF3CfL.cjs"),ie=require("./Tooltip-CNox4F8U.cjs"),ne=require("./DataTable-wN-jvOfe.cjs"),ue=require("./vue-ui-skeleton-D_YCUi1y.cjs"),de=require("./vue-ui-accordion-4-dyMgJA.cjs"),J=require("./useNestedProp-Bu958azG.cjs"),ce=require("./PackageVersion-Dn-t7tbm.cjs"),ve=require("./PenAndPaper-DFXJJink.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],ge=["x","y","width","height"],be=["id"],me=["stop-color"],xe=["stop-color"],ke=["id"],we=["stop-color"],Ce=["stop-color"],Ne=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se=["x","y","width","height","fill","rx"],Te={key:0},Be=["x","y","fill","font-size","font-weight"],Ae=["x","y","fill","font-size","font-weight"],$e={key:1},Ee=["x","y","font-size","fill","font-weight"],Ve={key:2},ze={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","font-size","fill","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["x","y","width","height","fill","onMouseover"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:K}){const u=T,{vue_ui_age_pyramid:Q}=r.useConfig(),m=e.computed(()=>!!u.dataset&&u.dataset.length),c=e.ref(r.createUid()),Z=e.ref(null),C=e.ref(!1),N=e.ref(""),x=e.ref(null),B=e.ref(0),y=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const l=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),_.value=!t.value.showOnChartHover,D(),V.value+=1,z.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=X.throttle(()=>{const{width:i,height:o}=X.useResponsive({chart:y.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});d.value.width=i,d.value.height=o});I.value=new ResizeObserver(l),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=le(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,j=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(j),x:s.value.left+s.value.width/2+j/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function le(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),f=e.computed(()=>u.dataset.length),oe=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),p=e.computed(()=>oe.value.map((l,i)=>{const o=s.value.top+s.value.height/f.value*i,a=s.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),L=e.ref(null);function ae(l,i){x.value=l,L.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))N.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let a="";const n=p.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",N.value=`<div>${a}</div>`}C.value=!0}function G(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:o,colNames:l}}),g=e.ref(!1);function se(l){g.value=l,B.value+=1}function H(){v.value.showTable=!v.value.showTable}function W(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:H,toggleTooltip:W,toggleAnnotator:S}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(P)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(_))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:H,onToggleTooltip:W,onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,xe)],8,be),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ce)],8,ke)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Se)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,Be),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ae)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/f.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,Ee)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Ie)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Me)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Re)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/f.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/f.value<=0?1e-4:s.value.height/f.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>ae(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ie._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:N.value,isFullscreen:g.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ne.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},He=he._export_sfc(Ge,[["__scopeId","data-v-8fdd585f"]]);exports.default=He;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),r=require("./index-0dnbsm6P.cjs"),X=require("./useResponsive-BJ7DTGpm.cjs"),re=require("./Title-Dc2F9vf7.cjs"),Y=require("./usePrinter-CRgTdjvo.cjs"),ie=require("./Tooltip-Cd-T5cyc.cjs"),ne=require("./DataTable-CX55KEac.cjs"),ue=require("./vue-ui-skeleton-DgPl6VyF.cjs"),de=require("./vue-ui-accordion-BFiGf3JH.cjs"),J=require("./useNestedProp-B5IAA861.cjs"),ce=require("./PackageVersion-DLubhuZS.cjs"),ve=require("./PenAndPaper-DmTTxoH_.cjs"),ye=require("./useUserOptionState-BgepsfED.cjs"),he=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),fe=["id"],pe=["xmlns","viewBox"],ge=["x","y","width","height"],be=["id"],me=["stop-color"],xe=["stop-color"],ke=["id"],we=["stop-color"],Ce=["stop-color"],Ne=["x","y","width","height","fill","rx"],_e=["x","y","width","height","fill","rx"],Le=["x","y","width","height","fill","rx"],Se=["x","y","width","height","fill","rx"],Te={key:0},Be=["x","y","fill","font-size","font-weight"],Ae=["x","y","fill","font-size","font-weight"],$e={key:1},Ee=["x","y","font-size","fill","font-weight"],Ve={key:2},ze={key:0},Pe=["x1","x2","y1","y2","stroke","stroke-width"],Oe=["x1","x2","y1","y2","stroke","stroke-width"],Fe=["x1","x2","y1","y2","stroke","stroke-width"],Ie=["x","y","font-size","fill","font-weight"],De=["x1","x2","y1","y2","stroke","stroke-width"],Me=["x","y","font-size","fill","font-weight"],Re=["x","y","font-size","fill","font-weight"],qe=["x","y","width","height","fill","onMouseover"],Ue={key:5,class:"vue-data-ui-watermark"},Ge={__name:"vue-ui-age-pyramid",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(T,{expose:K}){const u=T,{vue_ui_age_pyramid:Q}=r.useConfig(),m=e.computed(()=>!!u.dataset&&u.dataset.length),c=e.ref(r.createUid()),Z=e.ref(null),C=e.ref(!1),N=e.ref(""),x=e.ref(null),B=e.ref(0),y=e.ref(null),A=e.ref(null),$=e.ref(null),E=e.ref(null),V=e.ref(0),z=e.ref(0),t=e.computed({get:()=>F(),set:l=>l}),{userOptionsVisible:_,setUserOptionsVisibility:P,keepUserOptionState:O}=ye.useUserOptionState({config:t.value});function F(){const l=J.useNestedProp({userConfig:u.config,defaultConfig:Q});return l.theme?{...J.useNestedProp({userConfig:r.themes.vue_ui_age_pyramid[l.theme]||u.config,defaultConfig:l})}:l}e.watch(()=>u.config,l=>{t.value=F(),_.value=!t.value.showOnChartHover,D(),V.value+=1,z.value+=1},{deep:!0});const I=e.ref(null);e.onMounted(()=>{D()});function D(){if(r.objectIsEmpty(u.dataset)&&r.error({componentName:"VueUiAgePyramid",type:"dataset"}),t.value.responsive){const l=X.throttle(()=>{const{width:i,height:o}=X.useResponsive({chart:y.value,title:t.value.style.title.text?A.value:null,source:$.value,noTitle:E.value});d.value.width=i,d.value.height=o});I.value=new ResizeObserver(l),I.value.observe(y.value.parentNode)}}const{isPrinting:M,isImaging:R,generatePdf:q,generateImage:U}=Y.usePrinter({elementId:`vue-ui-age-pyramid_${c.value}`,fileName:t.value.style.title.text||"vue-ui-age-pyramid"}),ee=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),v=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),d=e.ref({height:t.value.style.height,width:t.value.style.width}),s=e.computed(()=>{const l=d.value.width-t.value.style.layout.padding.right-t.value.style.layout.padding.left,i=t.value.style.layout.padding.left,o=d.value.width-t.value.style.layout.padding.right;return{top:t.value.style.layout.padding.top,left:i,right:o,bottom:d.value.height-t.value.style.layout.padding.bottom,width:l,height:d.value.height-t.value.style.layout.padding.top-t.value.style.layout.padding.bottom,centerX:t.value.style.layout.padding.left+l/2,leftChart:{width:l/2-t.value.style.layout.centerSlit.width,right:i+l/2-t.value.style.layout.centerSlit.width},rightChart:{width:l/2-t.value.style.layout.centerSlit.width,left:i+l/2+t.value.style.layout.centerSlit.width}}}),te=e.computed(()=>u.dataset.map(l=>t.value.style.layout.dataLabels.yAxis.display==="age"?l[1]:l[0])),h=e.computed(()=>{const l=le(b.value/5),i=[],o=[];for(let a=0;a<=5;a+=1){const n=l*a,j=l*(a-5);i.push({value:n,x:s.value.left+s.value.width/2+t.value.style.layout.centerSlit.width+n/b.value*s.value.leftChart.width}),o.push({value:Math.abs(j),x:s.value.left+s.value.width/2+j/b.value*s.value.leftChart.width-t.value.style.layout.centerSlit.width})}return{right:i,left:o}});function le(l){if(l===0)return 0;const o=10**Math.floor(Math.log10(Math.abs(l)));let a;return l<0,a=Math.round(l/o)*o,a}const b=e.computed(()=>Math.max(...u.dataset.flatMap(l=>l.slice(-2).map(i=>r.checkNaN(i))))),f=e.computed(()=>u.dataset.length),oe=e.computed(()=>u.dataset.map(l=>({segment:l[0],age:l[1],left:{value:l[2],proportionToMax:l[2]/b.value},right:{value:l[3],proportionToMax:l[3]/b.value}}))),p=e.computed(()=>oe.value.map((l,i)=>{const o=s.value.top+s.value.height/f.value*i,a=s.value.height/f.value-t.value.style.layout.bars.gap;return{segment:l.segment,age:l.age,left:{...l.left,y:o,color:t.value.style.layout.bars.left.color,x:s.value.leftChart.right-l.left.proportionToMax*s.value.leftChart.width,width:r.checkNaN(l.left.proportionToMax*s.value.leftChart.width),height:a},right:{...l.right,y:o,color:t.value.style.layout.bars.right.color,x:s.value.rightChart.left,width:r.checkNaN(l.right.proportionToMax*s.value.rightChart.width),height:a}}})),L=e.ref(null);function ae(l,i){x.value=l,L.value={datapoint:i,seriesIndex:l,series:p.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(r.isFunction(o)&&r.functionReturnsString(()=>o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value})))N.value=o({seriesIndex:l,datapoint:{segment:i[0],index:i[1],left:i[2],right:i[3]},series:p.value,config:t.value});else{let a="";const n=p.value[l];a+=`<div><b>${n.segment}</b></div>`,a+=`<div>${t.value.translations.age}: ${r.applyDataLabel(t.value.style.layout.dataLabels.yAxis.formatter,r.checkNaN(n.age),r.dataLabel({v:r.checkNaN(n.age)}),{datapoint:i,seriesIndex:l})}</div>`,a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,a+='<div style="display:flex; flex-direction:row;gap:12px">',a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:t.value.style.layout.bars.left.color}"/></svg><div>${t.value.translations.female}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+=`<div style="display:flex;flex-direction:column;align-items:center;justify-content:center"><svg viewBox="0 0 12 12" height="12" width="12"><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.underlayer}"/><rect stroke="none" x="0" y="0" height="12" width="12" rx="2" fill="${t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:t.value.style.layout.bars.right.color}"/></svg><div>${t.value.translations.male}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value),r.dataLabel({v:r.checkNaN(n.right.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",a+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}"><div>${t.value.translations.total}</div><div><b>${r.applyDataLabel(t.value.style.layout.dataLabels.xAxis.formatter,r.checkNaN(n.right.value)+r.checkNaN(n.left.value),r.dataLabel({v:r.checkNaN(n.right.value)+r.checkNaN(n.left.value)}),{datapoint:i,seriesIndex:l})}</b></div></div>`,a+="</div>",N.value=`<div>${a}</div>`}C.value=!0}function G(){e.nextTick(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(n=>[n[0],n[1],n[2],n[3],n[2]+n[3]]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(i),a=r.createCsvContent(o);r.downloadCsv({csvContent:a,title:t.value.style.title.text||"vue-ui-heatmap"})})}const k=e.computed(()=>{const l=[t.value.translations.year,t.value.translations.age,t.value.translations.female,t.value.translations.male,t.value.translations.total],i=u.dataset.map(a=>[a[0],a[1],a[2].toLocaleString(),a[3].toLocaleString(),(a[2]+a[3]).toLocaleString()]),o={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint};return{head:l,body:i,config:o,colNames:l}}),g=e.ref(!1);function se(l){g.value=l,B.value+=1}function H(){v.value.showTable=!v.value.showTable}function W(){v.value.showTooltip=!v.value.showTooltip}const w=e.ref(!1);function S(){w.value=!w.value}return K({generatePdf:q,generateCsv:G,generateImage:U,toggleTable:H,toggleTooltip:W,toggleAnnotator:S}),(l,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-age-pyramid ${g.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"agePyramid",ref:y,id:`vue-ui-age-pyramid_${c.value}`,style:e.normalizeStyle(`font-family:${t.value.style.fontFamily};width:100%; text-align:center;background:${t.value.style.backgroundColor};${t.value.responsive?"height:100%":""}`),onMouseenter:i[2]||(i[2]=()=>e.unref(P)(!0)),onMouseleave:i[3]||(i[3]=()=>e.unref(P)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(ve.PenAndPaper,{key:0,parent:y.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:w.value,onClose:S},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ee.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:E,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:A,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(re._sfc_main,{key:`title_${V.value}`,config:{title:{cy:"pyramid-div-title",...t.value.style.title},subtitle:{cy:"pyramid-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&m.value&&(e.unref(O)||e.unref(_))?(e.openBlock(),e.createBlock(Y.UserOptions,{ref_key:"details",ref:Z,key:`user_options_${B.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(R),isPrinting:e.unref(M),uid:c.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,hasPdf:t.value.userOptions.buttons.pdf,hasXls:t.value.userOptions.buttons.csv,hasImg:t.value.userOptions.buttons.img,hasTable:t.value.userOptions.buttons.table,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:g.value,isTooltip:v.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:y.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:w.value,onToggleFullscreen:se,onGeneratePdf:e.unref(q),onGenerateCsv:G,onGenerateImage:e.unref(U),onToggleTable:H,onToggleTooltip:W,onToggleAnnotator:S,style:e.normalizeStyle({visibility:e.unref(O)?e.unref(_)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:a})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:a})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:a})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:a})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasXls","hasImg","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),m.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(r.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":g.value,"vue-data-ui-fulscreen--off":!g.value}),viewBox:`0 0 ${d.value.width<=0?10:d.value.width} ${d.value.height<=0?10:d.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(ce._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,ge)):e.createCommentVNode("",!0),e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`age_pyramid_left_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.bars.left.color},null,8,me),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.left.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,xe)],8,be),e.createElementVNode("linearGradient",{id:`age_pyramid_right_${c.value}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%"},[e.createElementVNode("stop",{offset:"0%","stop-color":e.unref(r.setOpacity)(e.unref(r.shiftHue)(t.value.style.layout.bars.right.color,t.value.style.layout.bars.gradient.shiftHue),100-t.value.style.layout.bars.gradient.intensity)},null,8,we),e.createElementVNode("stop",{offset:"100%","stop-color":t.value.style.layout.bars.right.color},null,8,Ce)],8,ke)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(p.value,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:e.unref(r.checkNaN)(o.left.width<=0?1e-4:o.left.width),height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Ne),e.createElementVNode("rect",{x:o.left.x,y:o.left.y,width:o.left.width<=0?1e-4:o.left.width,height:o.left.height<=0?1e-4:o.left.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_left_${c.value})`:o.left.color,rx:t.value.style.layout.bars.borderRadius},null,8,_e),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.underlayer,rx:t.value.style.layout.bars.borderRadius},null,8,Le),e.createElementVNode("rect",{x:o.right.x,y:o.right.y,width:o.right.width<=0?1e-4:o.right.width,height:o.right.height<=0?1e-4:o.right.height,fill:t.value.style.layout.bars.gradient.show?`url(#age_pyramid_right_${c.value})`:o.right.color,rx:t.value.style.layout.bars.borderRadius},null,8,Se)]))),256)),e.createElementVNode("g",null,[t.value.style.layout.dataLabels.sideTitles.show?(e.openBlock(),e.createElementBlock("g",Te,[e.createElementVNode("text",{x:s.value.left,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.left.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"start","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.female),9,Be),e.createElementVNode("text",{x:s.value.right,y:s.value.top+t.value.style.layout.dataLabels.sideTitles.offsetY,fill:t.value.style.layout.dataLabels.sideTitles.useSideColor?t.value.style.layout.bars.right.color:t.value.style.layout.dataLabels.sideTitles.color,"font-size":t.value.style.layout.dataLabels.sideTitles.fontSize,"text-anchor":"end","font-weight":t.value.style.layout.dataLabels.sideTitles.bold?"bold":"normal"},e.toDisplayString(t.value.translations.male),9,Ae)])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.yAxis.show?(e.openBlock(),e.createElementBlock("g",$e,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(te.value,(o,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a%t.value.style.layout.dataLabels.yAxis.showEvery===0?(e.openBlock(),e.createElementBlock("text",{key:0,x:s.value.centerX,y:s.value.top+s.value.height/f.value*a+t.value.style.layout.dataLabels.yAxis.fontSize/3,"text-anchor":"middle","font-size":t.value.style.layout.dataLabels.yAxis.fontSize,fill:t.value.style.layout.dataLabels.yAxis.color,"font-weight":t.value.style.layout.dataLabels.yAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.yAxis.formatter,o,e.unref(r.dataLabel)({v:o}),{datapoint:o,seriesIndex:a})),9,Ee)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),t.value.style.layout.dataLabels.xAxis.show?(e.openBlock(),e.createElementBlock("g",Ve,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",ze,[e.createElementVNode("line",{x1:h.value.right[0].x,x2:h.value.right.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Pe),e.createElementVNode("line",{x1:h.value.left[0].x,x2:h.value.left.at(-1).x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Oe)])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.right,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Fe)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Ie)]))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value.left,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("line",{key:0,x1:o.x,x2:o.x,y1:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/2,y2:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize/4,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,De)):e.createCommentVNode("",!0),e.createElementVNode("text",{x:o.x,y:s.value.bottom+t.value.style.layout.dataLabels.xAxis.fontSize*2,"font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"text-anchor":"middle","font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(e.unref(r.applyDataLabel)(t.value.style.layout.dataLabels.xAxis.formatter,o.value/t.value.style.layout.dataLabels.xAxis.scale,e.unref(r.dataLabel)({v:o.value/t.value.style.layout.dataLabels.xAxis.scale}),{datapoint:o,seriesIndex:a})),9,Me)]))),256)),e.createElementVNode("text",{x:s.value.right,y:d.value.height,"text-anchor":"end","font-size":t.value.style.layout.dataLabels.xAxis.fontSize,fill:t.value.style.layout.dataLabels.xAxis.color,"font-weight":t.value.style.layout.dataLabels.xAxis.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.dataLabels.xAxis.translation),9,Re)])):e.createCommentVNode("",!0)]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.dataset,(o,a)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("rect",{x:s.value.left,y:s.value.top+s.value.height/f.value*a-t.value.style.layout.bars.gap/2,width:s.value.width<=0?1e-4:s.value.width,height:s.value.height/f.value<=0?1e-4:s.value.height/f.value,fill:x.value!==null&&x.value===a?e.unref(r.setOpacity)(t.value.style.highlighter.color,t.value.style.highlighter.opacity):"transparent",onMouseover:n=>ae(a,o),onMouseleave:i[0]||(i[0]=n=>{x.value=null,C.value=!1})},null,40,qe)]))),256)),e.renderSlot(l.$slots,"svg",{svg:d.value},void 0,!0)],14,pe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",Ue,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(M)||e.unref(R)})),void 0,!0)])):e.createCommentVNode("",!0),m.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(ue.default,{key:6,config:{type:"pyramid",style:{backgroundColor:t.value.style.backgroundColor,pyramid:{color:"#CCCCCC"}}}},null,8,["config"])),e.renderSlot(l.$slots,"legend",{legend:p.value},void 0,!0),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"source",ref:$,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ie._sfc_main,{show:v.value.showTooltip&&C.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:y.value,content:N.value,isFullscreen:g.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...L.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),m.value?(e.openBlock(),e.createBlock(de.default,{key:8,hideDetails:"",config:{open:v.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(ne.DataTable,{key:`table_${z.value}`,colNames:k.value.colNames,head:k.value.head,body:k.value.body,config:k.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:i[1]||(i[1]=o=>v.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,fe))}},He=he._export_sfc(Ge,[["__scopeId","data-v-8fdd585f"]]);exports.default=He;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("./html2canvas.esm-BA_v9SIU.cjs"),I=require("./jspdf.es.min-DLYY9DTT.cjs"),u=require("./index-0dnbsm6P.cjs"),o=require("vue"),F=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),f={props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{shapes:[],lastSelectedShape:void 0}}}},data(){return{activeShape:void 0,strokeSize:1,currentPointer:{start:{x:0,y:0},end:{x:0,end:0}},currentTarget:void 0,hoveredShapeId:void 0,isBold:!1,isBulletTextMode:!1,isDash:!1,isDeleteMode:!1,isDrawing:!1,isDrawingNewShape:!0,isDrawMode:!1,isItalic:!1,isMouseDown:!1,isMoveMode:!1,isPrinting:!1,isResizeMode:!1,isSelectMode:!1,isSummaryOpen:!1,isTextMode:!1,isUnderline:!1,isWriting:!1,lastSelectedShape:this.dataset.lastSelectedShape,pointerDownId:-1,pointerPosition:{x:0,y:0},preventEdit:!0,selectedGroup:[],shapes:this.dataset.shapes?this.dataset.shapes:[],shapesOrder:[],step:Math.round(Math.random())*1e5,svgHeight:1e3,svgWidth:1e3,options:{arrow:{color:"grey",filled:!0},circle:{color:"grey",filled:!1,radius:3,strokeWidth:2},rect:{color:"grey",filled:!1,strokeWidth:2,height:12,width:12}},selectedColor:"#000000",showCaret:!1,sizeRatio:1,slottedSvg:void 0,sourceWidth:1,sourceHeight:1,textAlign:"start",textFont:20,transparency:100,transparencyCodes:u.opacity}},watch:{shapes:{handler(e){e.length===0&&(this.lastSelectedShape=void 0)}}},computed:{FINAL_CONFIG(){const e=u.useConfig().vue_ui_annotator;if(!Object.keys(this.config||{}).length)return e;const l=this.treeShake({defaultConfig:e,userConfig:this.config});return this.convertConfigColors(l)},canSelect(){return this.shapes.filter(e=>!["line","group"].includes(e.type)).length>1},colorTransparency(){return this.transparencyCodes[this.transparency>98?98:this.transparency]},cursorClass(){switch(!0){case this.isDeleteMode:return"default";case this.isMoveMode:return"move";case this.isTextMode:return"text";case this.isResizeMode:return"se-resize";default:return""}},records(){return this.shapes},userShapes(){return this.records.map(e=>{switch(!0){case(e&&e.type==="arrow"):const l=e.strokeWidth>3?5:10,s=e.strokeWidth>3?2.5:5;return`
|
|
2
2
|
<defs>
|
|
3
3
|
<marker
|
|
4
4
|
id="${e.id}"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import p from "./html2canvas.esm-d2sM-0Wm.js";
|
|
2
2
|
import { E as _ } from "./jspdf.es.min-C660YX78.js";
|
|
3
|
-
import { z as v, u as w, A, B as M } from "./index-
|
|
3
|
+
import { z as v, u as w, A, B as M } from "./index-DJL-Bkqp.js";
|
|
4
4
|
import { openBlock as d, createElementBlock as n, createElementVNode as r, normalizeStyle as c, toDisplayString as u, normalizeClass as y, createCommentVNode as a, withDirectives as f, vModelCheckbox as g, vModelText as C, renderSlot as O, Fragment as L, renderList as G, createStaticVNode as N, pushScopeId as m, popScopeId as T } from "vue";
|
|
5
5
|
import { _ as R } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
6
6
|
const D = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-0dnbsm6P.cjs"),A=require("./useNestedProp-B5IAA861.cjs"),Y=require("./Title-Dc2F9vf7.cjs"),J=require("./Legend-DSoIWaIm.cjs"),F=require("./usePrinter-CRgTdjvo.cjs"),K=require("./PackageVersion-DLubhuZS.cjs"),Q=require("./PenAndPaper-DmTTxoH_.cjs"),Z=require("./vue-ui-skeleton-DgPl6VyF.cjs"),ee=require("./useUserOptionState-BgepsfED.cjs"),te=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ae=["id"],le={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},re=["xmlns","viewBox"],oe=["width","height"],se={key:1},ne=["x","y","height","width","fill","stroke"],ue=["x","y","height","width","rx","fill","stroke","stroke-width"],ie=["x","y","height","width","fill","stroke","stroke-width"],ce=["x","y","font-size","font-weight","fill"],de=["x","y","height","width","rx","fill","stroke","stroke-width"],he={key:3},ve=["x","y","fill","font-size","font-weight"],me={key:4},ge=["x1","x2","y1","y2","stroke"],fe={key:5,class:"vue-data-ui-watermark"},ye={class:"vue-ui-bullet-legend-item",dir:"auto"},pe={style:{"margin-right":"2px"}},ke={key:7,ref:"source",dir:"auto"},be={__name:"vue-ui-bullet",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(z,{expose:I}){const n=z,{vue_ui_bullet:H}=s.useConfig(),y=e.ref(null),T=e.ref(null),B=e.ref(0),M=e.ref(null),U=e.ref(0),d=e.computed({get:()=>n.dataset.hasOwnProperty("value"),set:a=>a}),v=e.computed(()=>n.dataset.segments?Array.isArray(n.dataset.segments)?n.dataset.segments.length?!0:(console.warn(`VueUiBullet: dataset segments is empty. Provide segments with this datastructure:
|
|
2
2
|
|
|
3
3
|
segments: [
|
|
4
4
|
{
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ref as d, computed as g, onMounted as de, watch as J, onBeforeUnmount as ge, openBlock as r, createElementBlock as o, normalizeClass as K, normalizeStyle as I, unref as u, createBlock as k, createCommentVNode as i, createSlots as fe, withCtx as w, renderSlot as f, normalizeProps as H, guardReactiveProps as M, createVNode as me, Fragment as T, renderList as U, createElementVNode as x, toDisplayString as L } from "vue";
|
|
2
|
-
import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-
|
|
3
|
-
import { u as Z } from "./useNestedProp-
|
|
4
|
-
import { _ as $e } from "./Title-
|
|
5
|
-
import { L as Be } from "./Legend-
|
|
6
|
-
import { u as Oe, U as Ae } from "./usePrinter-
|
|
7
|
-
import { _ as Pe } from "./PackageVersion-
|
|
8
|
-
import { P as Fe } from "./PenAndPaper-
|
|
9
|
-
import Se from "./vue-ui-skeleton-
|
|
2
|
+
import { u as ye, o as pe, e as Q, g as be, c as ke, l as we, D as xe, d as _e, i as $, f as B, X as Ce, t as Le } from "./index-DJL-Bkqp.js";
|
|
3
|
+
import { u as Z } from "./useNestedProp-uEksOW7g.js";
|
|
4
|
+
import { _ as $e } from "./Title-B4ZkvXK-.js";
|
|
5
|
+
import { L as Be } from "./Legend-DCSiQPuL.js";
|
|
6
|
+
import { u as Oe, U as Ae } from "./usePrinter-DdGbL4Nm.js";
|
|
7
|
+
import { _ as Pe } from "./PackageVersion-CiKxfy3h.js";
|
|
8
|
+
import { P as Fe } from "./PenAndPaper-Dkvtj3o8.js";
|
|
9
|
+
import Se from "./vue-ui-skeleton-z4MGfNaM.js";
|
|
10
10
|
import { u as Ie } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as He } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const Me = ["id"], Te = {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-0dnbsm6P.cjs"),ie=require("./useResponsive-BJ7DTGpm.cjs"),_e=require("./Title-Dc2F9vf7.cjs"),de=require("./usePrinter-CRgTdjvo.cjs"),ze=require("./Tooltip-Cd-T5cyc.cjs"),Ve=require("./DataTable-CX55KEac.cjs"),Ee=require("./vue-ui-skeleton-DgPl6VyF.cjs"),Te=require("./Slicer-be7PbWkd.cjs"),Ae=require("./vue-ui-accordion-BFiGf3JH.cjs"),ce=require("./useNestedProp-B5IAA861.cjs"),Fe=require("./PackageVersion-DLubhuZS.cjs"),Ie=require("./PenAndPaper-DmTTxoH_.cjs"),Pe=require("./useUserOptionState-BgepsfED.cjs"),Le=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Re=["id"],Oe=["xmlns","viewBox"],Ue=["x","y","width","height"],De={key:1},Me=["id"],qe=["stop-color"],He=["stop-color"],We=["stop-color"],Ge=["id"],je=["stop-color"],Xe=["stop-color"],Ye=["stop-color"],Je={key:0},Ke=["x1","x2","y1","y2","stroke","stroke-width"],Qe=["x1","x2","y1","y2","stroke","stroke-width"],Ze={key:1},et=["x1","x2","y1","y2","stroke","stroke-width"],tt=["x","y","font-size","fill","font-weight"],lt={key:2},ot=["transform","text-anchor","font-size","fill","font-weight"],at=["x1","x2","y1","y2","stroke","stroke-width"],nt={key:0},ut=["cx","cy","r","fill"],st=["cx","cy","r","fill"],rt={key:1},it=["x1","x2","y1","y2","stroke","stroke-width"],dt=["x1","x2","y1","y2","stroke","stroke-width"],ct=["x","y","height","width","fill","rx"],vt=["x","y","height","width","fill","rx","stroke","stroke-width"],yt=["x","y","height","width","fill","onMouseover"],ht={key:5,class:"vue-data-ui-watermark"},pt=["innerHTML"],ft={__name:"vue-ui-candlestick",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},setup(f,{expose:ve}){const d=f,{vue_ui_candlestick:ye}=u.useConfig(),b=e.computed(()=>!!d.dataset&&d.dataset.length),h=e.ref(u.createUid()),he=e.ref(null),V=e.ref(!1),E=e.ref(""),T=e.ref(void 0),L=e.ref(0),g=e.ref(null),R=e.ref(null),O=e.ref(null),U=e.ref(null),D=e.ref(null),M=e.ref(null),C=e.ref(0),q=e.ref(0),H=e.ref(0),t=e.computed({get:()=>j(),set:l=>l}),{userOptionsVisible:A,setUserOptionsVisibility:W,keepUserOptionState:G}=Pe.useUserOptionState({config:t.value});function j(){const l=ce.useNestedProp({userConfig:d.config,defaultConfig:ye});let a={};return l.theme?a={...ce.useNestedProp({userConfig:u.themes.vue_ui_candlestick[l.theme]||d.config,defaultConfig:l})}:a=l,d.config&&u.hasDeepProperty(d.config,"style.zoom.startIndex")?a.style.zoom.startIndex=d.config.style.zoom.startIndex:a.style.zoom.startIndex=null,d.config&&u.hasDeepProperty(d.config,"style.zoom.endIndex")?a.style.zoom.endIndex=d.config.style.zoom.endIndex:a.style.zoom.endIndex=null,a}e.watch(()=>d.config,l=>{t.value=j(),A.value=!t.value.showOnChartHover,X(),C.value+=1,H.value+=1,q.value+=1},{deep:!0}),e.watch(()=>d.dataset,l=>{c.value.start=0,c.value.end=l.length,C.value+=1},{deep:!0});const i=e.ref({height:t.value.style.height,width:t.value.style.width,xAxisFontSize:t.value.style.layout.grid.xAxis.dataLabels.fontSize,yAxisFontSize:t.value.style.layout.grid.yAxis.dataLabels.fontSize}),N=e.ref(null);e.onMounted(()=>{X()});function X(){if(u.objectIsEmpty(d.dataset)&&u.error({componentName:"VueUiCandlestick",type:"dataset"}),t.value.responsive){const l=ie.throttle(()=>{const{width:a,height:o}=ie.useResponsive({chart:g.value,title:t.value.style.title.text?R.value:null,slicer:U.value,legend:O.value,source:D.value,noTitle:M.value});i.value.width=a,i.value.height=o,i.value.xAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.xAxis.dataLabels.fontSize,threshold:6,fallback:6}),i.value.yAxisFontSize=u.translateSize({relator:Math.min(a,o),adjuster:t.value.style.width,source:t.value.style.layout.grid.yAxis.dataLabels.fontSize,threshold:6,fallback:6})});N.value=new ResizeObserver(l),N.value.observe(g.value.parentNode)}te()}e.onBeforeUnmount(()=>{N.value&&N.value.disconnect()});const{isPrinting:Y,isImaging:J,generatePdf:K,generateImage:Q}=de.usePrinter({elementId:`vue-ui-candlestick_${h.value}`,fileName:t.value.style.title.text||"vue-ui-candlestick"}),pe=e.computed(()=>t.value.userOptions.show&&!t.value.style.title.text),p=e.ref({showTable:t.value.table.show,showTooltip:t.value.style.tooltip.show}),s=e.computed(()=>{const{top:l,right:a,bottom:o,left:n}=t.value.style.layout.padding;return{top:l,right:i.value.width-a,left:n,bottom:i.value.height-o,width:i.value.width-n-a,height:i.value.height-l-o}}),w=e.computed(()=>d.dataset.length),c=e.ref({start:0,end:w.value}),Z=e.computed(()=>d.dataset.slice(c.value.start,c.value.end)),F=e.computed(()=>(d.dataset.forEach((l,a)=>{[null,void 0].includes(l[0])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"period (index 0)",index:a}),[null,void 0].includes(l[1])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"open (index 1)",index:a}),[null,void 0].includes(l[2])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"high (index 2)",index:a}),[null,void 0].includes(l[3])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"low (index 3)",index:a}),[null,void 0].includes(l[4])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"last (index 4)",index:a}),[null,void 0].includes(l[5])&&u.error({componentName:"VueUiCandlestick",type:"datasetAttribute",property:"volume (index 5)",index:a})}),Z.value.map(l=>({period:l[0],open:l[1],high:l[2],low:l[3],last:l[4],volume:l[5]})))),r=e.computed(()=>s.value.width/Z.value.length),ee=e.computed(()=>({max:Math.max(...F.value.map(l=>l.high)),min:0})),m=e.computed(()=>u.calculateNiceScale(ee.value.min,ee.value.max,t.value.style.layout.grid.yAxis.dataLabels.steps));function $(l,a){return{...l,x:u.checkNaN(s.value.left+a*r.value+r.value/2),y:u.checkNaN(s.value.top+(1-l/m.value.max)*s.value.height),value:u.checkNaN(l)}}const v=e.computed(()=>F.value.map((l,a)=>{const o=$(l.open,a),n=$(l.high,a),y=$(l.low,a),_=$(l.last,a),z=l.last>l.open;return{period:l.period,open:o,high:n,low:y,last:_,volume:l.volume,isBullish:z}}));function fe(l){return u.checkNaN(l/m.value.max)}const me=e.computed(()=>m.value.ticks.map(l=>({y:s.value.bottom-s.value.height*fe(l),value:u.checkNaN(l)}))),ge=e.computed(()=>F.value.map(l=>l.period)),I=e.ref(null);function ke(l,a){T.value=l,I.value={datapoint:a,seriesIndex:l,series:v.value,config:t.value};const o=t.value.style.tooltip.customFormat;if(u.isFunction(o)&&u.functionReturnsString(()=>o({seriesIndex:l,datapoint:a,series:v.value,config:t.value})))E.value=o({seriesIndex:l,datapoint:a,series:v.value,config:t.value});else if(t.value.style.tooltip.show){let n="";const{period:y,open:_,high:z,low:ne,last:ue,volume:se,isBullish:re}=v.value[l],{period:gt,open:Ce,high:Ne,low:$e,last:Se,volume:Be}=t.value.translations;n+=`<div><svg style="margin-right:6px" viewBox="0 0 12 12" height="12" width="12"><rect x="0" y="0" height="12" width="12" rx="${t.value.style.layout.candle.borderRadius*3}" stroke="${t.value.style.layout.candle.stroke}" stroke-width="${t.value.style.layout.candle.strokeWidth}"
|
|
2
2
|
fill="${t.value.style.layout.candle.gradient.show?re?`url(#bullish_gradient_${h.value})`:`url(#bearish_gradient_${h.value})`:re?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg>${y}</div>`,n+=`${Be} : <b>${isNaN(se)?"-":Number(se.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()}</b>`,n+=`<div style="margin-top:6px;padding-top:6px;border-top:1px solid ${t.value.style.tooltip.borderColor}">`,n+=`<div>${Ce}: <b>${t.value.style.tooltip.prefix} ${isNaN(_.value)?"-":Number(_.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Ne}: <b>${t.value.style.tooltip.prefix} ${isNaN(z.value)?"-":Number(z.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${$e}: <b>${t.value.style.tooltip.prefix} ${isNaN(ne.value)?"-":Number(ne.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+=`<div>${Se}: <b>${t.value.style.tooltip.prefix} ${isNaN(ue.value)?"-":Number(ue.value.toFixed(t.value.style.tooltip.roundingValue)).toLocaleString()} ${t.value.style.tooltip.suffix}</b></div>`,n+="</div>",E.value=`<div style="text-align:right">${n}</div>`}V.value=!0}function xe(){te()}const k=e.ref(null);async function te(){(t.value.style.zoom.startIndex!==null||t.value.style.zoom.endIndex!==null)&&k.value?(t.value.style.zoom.startIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setStartValue(t.value.style.zoom.startIndex)),t.value.style.zoom.endIndex!==null&&(await e.nextTick(),await e.nextTick(),k.value&&k.value.setEndValue(be(t.value.style.zoom.endIndex+1)))):(c.value={start:0,end:w.value},C.value+=1)}function be(l){const a=w.value;return l>a?a:l<0||t.value.style.zoom.startIndex!==null&&l<t.value.style.zoom.startIndex?t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex+1:1:l}function le(){e.nextTick(()=>{const l=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume],a=v.value.map(y=>[y.period,y.open.value,y.high.value,y.low.value,y.last.value,y.volume]),o=[[t.value.style.title.text],[t.value.style.title.subtitle.text],[[""],[""],[""]]].concat([l]).concat(a),n=u.createCsvContent(o);u.downloadCsv({csvContent:n,title:t.value.style.title.text||"vue-ui-candlestick"})})}const S=e.computed(()=>{const l=v.value.map(n=>[`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12" height="12" width="12" style="margin-right: 6px"><rect x="0" y="0" height="12" width="12" :rx="${t.value.style.layout.candle.borderRadius*3}" fill="${t.value.style.layout.candle.gradient.show?n.isBullish?`url(#bullish_gradient_${h.value}`:`url(#bearish_gradient_${h.value})`:n.isBullish?t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.colors.bearish}"/></svg> ${n.period}`,`${t.value.table.td.prefix} ${isNaN(n.open.value)?"-":Number(n.open.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.high.value)?"-":Number(n.high.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.low.value)?"-":Number(n.low.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${t.value.table.td.prefix} ${isNaN(n.last.value)?"-":Number(n.last.value.toFixed(t.value.table.td.roundingValue)).toLocaleString()} ${t.value.table.td.suffix}`,`${isNaN(n.volume)?"-":n.volume.toLocaleString()}`]),a={th:{backgroundColor:t.value.table.th.backgroundColor,color:t.value.table.th.color,outline:t.value.table.th.outline},td:{backgroundColor:t.value.table.td.backgroundColor,color:t.value.table.td.color,outline:t.value.table.td.outline},breakpoint:t.value.table.responsiveBreakpoint},o=[t.value.translations.period,t.value.translations.open,t.value.translations.high,t.value.translations.low,t.value.translations.last,t.value.translations.volume];return{head:o,body:l,config:a,colNames:o}}),x=e.ref(!1);function we(l){x.value=l,L.value+=1}function oe(){p.value.showTable=!p.value.showTable}function ae(){p.value.showTooltip=!p.value.showTooltip}const B=e.ref(!1);function P(){B.value=!B.value}return ve({generatePdf:K,generateCsv:le,generateImage:Q,toggleTable:oe,toggleTooltip:ae,toggleAnnotator:P}),(l,a)=>(e.openBlock(),e.createElementBlock("div",{ref_key:"candlestickChart",ref:g,class:e.normalizeClass(`vue-ui-candlestick ${x.value?"vue-data-ui-wrapper-fullscreen":""} ${t.value.useCssAnimation?"":"vue-ui-dna"}`),style:e.normalizeStyle(`position:relative;font-family:${t.value.style.fontFamily}; text-align:center;background:${t.value.style.backgroundColor}; ${t.value.responsive?"height: 100%":""}`),id:`vue-ui-candlestick_${h.value}`,onMouseenter:a[4]||(a[4]=()=>e.unref(W)(!0)),onMouseleave:a[5]||(a[5]=()=>e.unref(W)(!1))},[t.value.userOptions.buttons.annotator?(e.openBlock(),e.createBlock(Ie.PenAndPaper,{key:0,parent:g.value,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,active:B.value,onClose:P},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createElementBlock("div",{key:1,ref_key:"noTitle",ref:M,class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},null,512)):e.createCommentVNode("",!0),t.value.style.title.text?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"chartTitle",ref:R,style:"width:100%;background:transparent"},[(e.openBlock(),e.createBlock(_e._sfc_main,{key:`title_${H.value}`,config:{title:{cy:"candlestick-div-title",...t.value.style.title},subtitle:{cy:"candlestick-div-subtitle",...t.value.style.title.subtitle}}},null,8,["config"]))],512)):e.createCommentVNode("",!0),t.value.userOptions.show&&b.value&&(e.unref(G)||e.unref(A))?(e.openBlock(),e.createBlock(de.UserOptions,{ref_key:"details",ref:he,key:`user_options_${L.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isImaging:e.unref(J),isPrinting:e.unref(Y),uid:h.value,hasTooltip:t.value.userOptions.buttons.tooltip&&t.value.style.tooltip.show,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:x.value,isTooltip:p.value.showTooltip,titles:{...t.value.userOptions.buttonTitles},chartElement:g.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:B.value,onToggleFullscreen:we,onGeneratePdf:e.unref(K),onGenerateCsv:le,onGenerateImage:e.unref(Q),onToggleTable:oe,onToggleTooltip:ae,onToggleAnnotator:P,style:e.normalizeStyle({visibility:e.unref(G)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[l.$slots.optionTooltip?{name:"optionTooltip",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTooltip",{},void 0,!0)]),key:"0"}:void 0,l.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionPdf",{},void 0,!0)]),key:"1"}:void 0,l.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionCsv",{},void 0,!0)]),key:"2"}:void 0,l.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionImg",{},void 0,!0)]),key:"3"}:void 0,l.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(l.$slots,"optionTable",{},void 0,!0)]),key:"4"}:void 0,l.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:o,isFullscreen:n})=>[e.renderSlot(l.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:o,isFullscreen:n})),void 0,!0)]),key:"5"}:void 0,l.$slots.optionAnnotator?{name:"optionAnnotator",fn:e.withCtx(({toggleAnnotator:o,isAnnotator:n})=>[e.renderSlot(l.$slots,"optionAnnotator",e.normalizeProps(e.guardReactiveProps({toggleAnnotator:o,isAnnotator:n})),void 0,!0)]),key:"6"}:void 0]),1032,["backgroundColor","color","isImaging","isPrinting","uid","hasTooltip","hasPdf","hasImg","hasXls","hasTable","hasFullscreen","isFullscreen","isTooltip","titles","chartElement","position","hasAnnotator","isAnnotation","onGeneratePdf","onGenerateImage","style"])):e.createCommentVNode("",!0),b.value?(e.openBlock(),e.createElementBlock("svg",{key:4,xmlns:e.unref(u.XMLNS),class:e.normalizeClass({"vue-data-ui-fullscreen--on":x.value,"vue-data-ui-fulscreen--off":!x.value}),viewBox:`0 0 ${i.value.width<=0?10:i.value.width} ${i.value.height<=0?10:i.value.height}`,style:e.normalizeStyle(`max-width:100%;overflow:visible;background:transparent;color:${t.value.style.color}`)},[e.createVNode(Fe._sfc_main),l.$slots["chart-background"]?(e.openBlock(),e.createElementBlock("foreignObject",{key:0,x:s.value.left,y:s.value.top,width:s.value.width,height:s.value.height,style:{pointerEvents:"none"}},[e.renderSlot(l.$slots,"chart-background",{},void 0,!0)],8,Ue)):e.createCommentVNode("",!0),v.value.length>0?(e.openBlock(),e.createElementBlock("g",De,[e.createElementVNode("defs",null,[e.createElementVNode("linearGradient",{id:`bearish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bearish},null,8,qe),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.02)}DE`},null,8,He),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bearish,.05)}66`},null,8,We)],8,Me),e.createElementVNode("linearGradient",{id:`bullish_gradient_${h.value}`,x2:"0%",y2:"100%"},[e.createElementVNode("stop",{offset:"0%","stop-color":t.value.style.layout.candle.colors.bullish},null,8,je),e.createElementVNode("stop",{offset:"50%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.02)}DE`},null,8,Xe),e.createElementVNode("stop",{offset:"100%","stop-color":`${e.unref(u.shiftHue)(t.value.style.layout.candle.colors.bullish,.05)}66`},null,8,Ye)],8,Ge)]),t.value.style.layout.grid.show?(e.openBlock(),e.createElementBlock("g",Je,[e.createElementVNode("line",{x1:s.value.left,x2:s.value.left,y1:s.value.top,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Ke),e.createElementVNode("line",{x1:s.value.left,x2:s.value.right,y1:s.value.bottom,y2:s.value.bottom,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,Qe)])):e.createCommentVNode("",!0),t.value.style.layout.grid.yAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",Ze,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(me.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("line",{key:0,x1:s.value.left,x2:s.value.left-5,y1:o.y,y2:o.y,stroke:t.value.style.layout.grid.stroke,"stroke-width":t.value.style.layout.grid.strokeWidth,"stroke-linecap":"round"},null,8,et)):e.createCommentVNode("",!0),o.value>=m.value.min&&o.value<=m.value.max?(e.openBlock(),e.createElementBlock("text",{key:1,x:s.value.left-8+t.value.style.layout.grid.yAxis.dataLabels.offsetX,y:o.y+i.value.yAxisFontSize/3,"font-size":i.value.yAxisFontSize,"text-anchor":"end",fill:t.value.style.layout.grid.yAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.yAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.prefix)+" "+e.toDisplayString(e.unref(u.canShowValue)(o.value)?o.value.toFixed(t.value.style.layout.grid.yAxis.dataLabels.roundingValue):"")+" "+e.toDisplayString(t.value.style.layout.grid.yAxis.dataLabels.suffix),9,tt)):e.createCommentVNode("",!0)]))),256))])):e.createCommentVNode("",!0),t.value.style.layout.grid.xAxis.dataLabels.show?(e.openBlock(),e.createElementBlock("g",lt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(ge.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("text",{transform:`translate(${s.value.left+r.value*n+r.value/2}, ${s.value.bottom+i.value.xAxisFontSize*2+t.value.style.layout.grid.xAxis.dataLabels.offsetY}), rotate(${t.value.style.layout.grid.xAxis.dataLabels.rotation})`,"text-anchor":t.value.style.layout.grid.xAxis.dataLabels.rotation>0?"start":t.value.style.layout.grid.xAxis.dataLabels.rotation<0?"end":"middle","font-size":i.value.xAxisFontSize,fill:t.value.style.layout.grid.xAxis.dataLabels.color,"font-weight":t.value.style.layout.grid.xAxis.dataLabels.bold?"bold":"normal"},e.toDisplayString(o),9,ot)]))),256))])):e.createCommentVNode("",!0),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("g",null,[e.createElementVNode("line",{x1:o.open.x,x2:o.open.x,y1:o.high.y,y2:o.low.y,stroke:t.value.style.layout.wick.stroke,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,at),t.value.style.layout.wick.extremity.shape==="circle"?(e.openBlock(),e.createElementBlock("g",nt,[e.createElementVNode("circle",{cx:o.high.x,cy:o.high.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,ut),e.createElementVNode("circle",{cx:o.low.x,cy:o.low.y,r:t.value.style.layout.wick.extremity.size==="auto"?r.value/20:t.value.style.layout.wick.extremity.size,fill:t.value.style.layout.wick.extremity.color},null,8,st)])):e.createCommentVNode("",!0),t.value.style.layout.wick.extremity.shape==="line"?(e.openBlock(),e.createElementBlock("g",rt,[e.createElementVNode("line",{x1:o.high.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.high.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.high.y,y2:o.high.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,it),e.createElementVNode("line",{x1:o.low.x-(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,x2:o.low.x+(t.value.style.layout.wick.extremity.size==="auto"?r.value*t.value.style.layout.candle.widthRatio:t.value.style.layout.wick.extremity.size)/2,y1:o.low.y,y2:o.low.y,stroke:t.value.style.layout.wick.extremity.color,"stroke-width":t.value.style.layout.wick.strokeWidth,"stroke-linecap":"round"},null,8,dt)])):e.createCommentVNode("",!0)]))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:t.value.style.layout.candle.gradient.underlayer,rx:t.value.style.layout.candle.borderRadius,stroke:"none"},null,8,ct))),256)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:o.open.x-r.value/2+r.value*(1-t.value.style.layout.candle.widthRatio)/2,y:o.isBullish?o.last.y:o.open.y,height:Math.abs(o.last.y-o.open.y)<=0?1e-4:Math.abs(o.last.y-o.open.y),width:r.value*t.value.style.layout.candle.widthRatio<=0?1e-4:r.value*t.value.style.layout.candle.widthRatio,fill:o.isBullish?t.value.style.layout.candle.gradient.show?`url(#bullish_gradient_${h.value})`:t.value.style.layout.candle.colors.bullish:t.value.style.layout.candle.gradient.show?`url(#bearish_gradient_${h.value})`:t.value.style.layout.candle.colors.bearish,rx:t.value.style.layout.candle.borderRadius,stroke:t.value.style.layout.candle.stroke,"stroke-width":t.value.style.layout.candle.strokeWidth,"stroke-linecap":"round","stroke-linejoin":"round"},null,8,vt))),256))]),e.createElementVNode("g",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(v.value,(o,n)=>(e.openBlock(),e.createElementBlock("rect",{x:s.value.left+n*r.value,y:s.value.top,height:s.value.height<=0?1e-4:s.value.height,width:r.value<=0?1e-4:r.value,fill:T.value===n?e.unref(u.setOpacity)(t.value.style.layout.selector.color,t.value.style.layout.selector.opacity):"transparent",onMouseover:y=>ke(n,o),onMouseleave:a[0]||(a[0]=y=>{T.value=void 0,V.value=!1})},null,40,yt))),256))])])):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"svg",{svg:i.value},void 0,!0)],14,Oe)):e.createCommentVNode("",!0),l.$slots.watermark?(e.openBlock(),e.createElementBlock("div",ht,[e.renderSlot(l.$slots,"watermark",e.normalizeProps(e.guardReactiveProps({isPrinting:e.unref(Y)||e.unref(J)})),void 0,!0)])):e.createCommentVNode("",!0),b.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(Ee.default,{key:6,config:{type:"candlesticks",style:{backgroundColor:t.value.style.backgroundColor,candlesticks:{axis:{color:"#CCCCCC"},candle:{color:"#CCCCCC"}}}}},null,8,["config"])),t.value.style.zoom.show&&b.value?(e.openBlock(),e.createElementBlock("div",{key:7,ref_key:"chartSlicer",ref:U},[(e.openBlock(),e.createBlock(Te.Slicer,{ref_key:"slicerComponent",ref:k,key:`slicer_${C.value}`,background:t.value.style.zoom.color,borderColor:t.value.style.backgroundColor,fontSize:t.value.style.zoom.fontSize,useResetSlot:t.value.style.zoom.useResetSlot,labelLeft:f.dataset[c.value.start]?f.dataset[c.value.start][0]:f.dataset[0][0],labelRight:f.dataset[c.value.end-1]?f.dataset[c.value.end-1][0]:f.dataset.at(-1)[0],textColor:t.value.style.color,inputColor:t.value.style.zoom.color,selectColor:t.value.style.zoom.highlightColor,max:w.value,min:0,valueStart:c.value.start,valueEnd:c.value.end,start:c.value.start,"onUpdate:start":a[1]||(a[1]=o=>c.value.start=o),end:c.value.end,"onUpdate:end":a[2]||(a[2]=o=>c.value.end=o),refreshStartPoint:t.value.style.zoom.startIndex!==null?t.value.style.zoom.startIndex:0,refreshEndPoint:t.value.style.zoom.endIndex!==null?t.value.style.zoom.endIndex+1:w.value,enableRangeHandles:t.value.style.zoom.enableRangeHandles,enableSelectionDrag:t.value.style.zoom.enableSelectionDrag,onReset:xe},{"reset-action":e.withCtx(({reset:o})=>[e.renderSlot(l.$slots,"reset-action",e.normalizeProps(e.guardReactiveProps({reset:o})),void 0,!0)]),_:3},8,["background","borderColor","fontSize","useResetSlot","labelLeft","labelRight","textColor","inputColor","selectColor","max","valueStart","valueEnd","start","end","refreshStartPoint","refreshEndPoint","enableRangeHandles","enableSelectionDrag"]))],512)):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"chartLegend",ref:O},[e.renderSlot(l.$slots,"legend",{legend:v.value},void 0,!0)],512),l.$slots.source?(e.openBlock(),e.createElementBlock("div",{key:8,ref_key:"source",ref:D,dir:"auto"},[e.renderSlot(l.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0),e.createVNode(ze._sfc_main,{show:p.value.showTooltip&&V.value,backgroundColor:t.value.style.tooltip.backgroundColor,color:t.value.style.tooltip.color,borderRadius:t.value.style.tooltip.borderRadius,borderColor:t.value.style.tooltip.borderColor,borderWidth:t.value.style.tooltip.borderWidth,fontSize:t.value.style.tooltip.fontSize,backgroundOpacity:t.value.style.tooltip.backgroundOpacity,position:t.value.style.tooltip.position,offsetY:t.value.style.tooltip.offsetY,parent:g.value,content:E.value,isFullscreen:x.value,isCustom:t.value.style.tooltip.customFormat&&typeof t.value.style.tooltip.customFormat=="function"},{"tooltip-before":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-before",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),"tooltip-after":e.withCtx(()=>[e.renderSlot(l.$slots,"tooltip-after",e.normalizeProps(e.guardReactiveProps({...I.value})),void 0,!0)]),_:3},8,["show","backgroundColor","color","borderRadius","borderColor","borderWidth","fontSize","backgroundOpacity","position","offsetY","parent","content","isFullscreen","isCustom"]),b.value?(e.openBlock(),e.createBlock(Ae.default,{key:9,hideDetails:"",config:{open:p.value.showTable,maxHeight:1e4,body:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color},head:{backgroundColor:t.value.style.backgroundColor,color:t.value.style.color}}},{content:e.withCtx(()=>[(e.openBlock(),e.createBlock(Ve.DataTable,{key:`table_${q.value}`,colNames:S.value.colNames,head:S.value.head,body:S.value.body,config:S.value.config,title:`${t.value.style.title.text}${t.value.style.title.subtitle.text?` : ${t.value.style.title.subtitle.text}`:""}`,onClose:a[3]||(a[3]=o=>p.value.showTable=!1)},{th:e.withCtx(({th:o})=>[e.createTextVNode(e.toDisplayString(o),1)]),td:e.withCtx(({td:o})=>[e.createElementVNode("div",{innerHTML:o},null,8,pt)]),_:1},8,["colNames","head","body","config","title"]))]),_:1},8,["config"])):e.createCommentVNode("",!0)],46,Re))}},mt=Le._export_sfc(ft,[["__scopeId","data-v-744b9b91"]]);exports.default=mt;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { computed as g, ref as n, watch as Se, onMounted as qe, onBeforeUnmount as Je, nextTick as V, openBlock as s, createElementBlock as u, normalizeClass as Ne, normalizeStyle as ee, unref as v, createBlock as _, createCommentVNode as y, createSlots as Ke, withCtx as m, renderSlot as f, normalizeProps as T, guardReactiveProps as I, createVNode as Ae, createElementVNode as r, Fragment as F, renderList as L, toDisplayString as P, createTextVNode as Qe } from "vue";
|
|
2
|
-
import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as j, E as st, s as ut, x as it, y as nt, q as rt, r as dt, F as Ie } from "./index-
|
|
2
|
+
import { u as Ze, c as et, t as tt, C as Te, o as lt, e as z, D as ot, v as U, X as at, w as j, E as st, s as ut, x as it, y as nt, q as rt, r as dt, F as Ie } from "./index-DJL-Bkqp.js";
|
|
3
3
|
import { t as vt, u as yt } from "./useResponsive-CoxXLe23.js";
|
|
4
|
-
import { _ as ct } from "./Title-
|
|
5
|
-
import { u as ht, U as pt } from "./usePrinter-
|
|
6
|
-
import { _ as ft } from "./Tooltip-
|
|
7
|
-
import { D as gt } from "./DataTable-
|
|
8
|
-
import mt from "./vue-ui-skeleton-
|
|
9
|
-
import { S as bt } from "./Slicer-
|
|
10
|
-
import xt from "./vue-ui-accordion
|
|
11
|
-
import { u as Fe } from "./useNestedProp-
|
|
12
|
-
import { _ as kt } from "./PackageVersion-
|
|
13
|
-
import { P as wt } from "./PenAndPaper-
|
|
4
|
+
import { _ as ct } from "./Title-B4ZkvXK-.js";
|
|
5
|
+
import { u as ht, U as pt } from "./usePrinter-DdGbL4Nm.js";
|
|
6
|
+
import { _ as ft } from "./Tooltip-B0LX9lY0.js";
|
|
7
|
+
import { D as gt } from "./DataTable-B2jdS-OG.js";
|
|
8
|
+
import mt from "./vue-ui-skeleton-z4MGfNaM.js";
|
|
9
|
+
import { S as bt } from "./Slicer-3blwRUEA.js";
|
|
10
|
+
import xt from "./vue-ui-accordion-B_eXBJPl.js";
|
|
11
|
+
import { u as Fe } from "./useNestedProp-uEksOW7g.js";
|
|
12
|
+
import { _ as kt } from "./PackageVersion-CiKxfy3h.js";
|
|
13
|
+
import { P as wt } from "./PenAndPaper-Dkvtj3o8.js";
|
|
14
14
|
import { u as $t } from "./useUserOptionState-BIvW1Kz7.js";
|
|
15
15
|
import { _ as Ct } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
16
16
|
const _t = ["id"], zt = ["xmlns", "viewBox"], St = ["x", "y", "width", "height"], Nt = { key: 1 }, At = ["id"], Tt = ["stop-color"], It = ["stop-color"], Ft = ["stop-color"], Lt = ["id"], Rt = ["stop-color"], Ot = ["stop-color"], Vt = ["stop-color"], Pt = { key: 0 }, Ut = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Bt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Et = { key: 1 }, Mt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Dt = ["x", "y", "font-size", "fill", "font-weight"], Wt = { key: 2 }, Gt = ["transform", "text-anchor", "font-size", "fill", "font-weight"], Ht = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], jt = { key: 0 }, Xt = ["cx", "cy", "r", "fill"], Yt = ["cx", "cy", "r", "fill"], qt = { key: 1 }, Jt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Kt = ["x1", "x2", "y1", "y2", "stroke", "stroke-width"], Qt = ["x", "y", "height", "width", "fill", "rx"], Zt = ["x", "y", "height", "width", "fill", "rx", "stroke", "stroke-width"], el = ["x", "y", "height", "width", "fill", "onMouseover"], tl = {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ref as l, useSlots as Ie, onMounted as A, computed as B, watch as E, onBeforeUnmount as ce, nextTick as he, openBlock as u, createElementBlock as v, unref as r, createElementVNode as H, normalizeStyle as p, normalizeClass as Fe, createTextVNode as L, toDisplayString as G, renderSlot as h, Fragment as D, renderList as X, normalizeProps as j, guardReactiveProps as J, createCommentVNode as P, createBlock as fe, createSlots as Be, withCtx as R } from "vue";
|
|
2
|
-
import { u as Pe, c as Re, o as K, e as Q, s as ze, q as Se, r as Ee } from "./index-
|
|
3
|
-
import { u as He } from "./useNestedProp-
|
|
4
|
-
import { u as Ne, U as Ue } from "./usePrinter-
|
|
5
|
-
import Ve from "./vue-ui-skeleton-
|
|
2
|
+
import { u as Pe, c as Re, o as K, e as Q, s as ze, q as Se, r as Ee } from "./index-DJL-Bkqp.js";
|
|
3
|
+
import { u as He } from "./useNestedProp-uEksOW7g.js";
|
|
4
|
+
import { u as Ne, U as Ue } from "./usePrinter-DdGbL4Nm.js";
|
|
5
|
+
import Ve from "./vue-ui-skeleton-z4MGfNaM.js";
|
|
6
6
|
import { u as Me } from "./useUserOptionState-BIvW1Kz7.js";
|
|
7
7
|
import { _ as qe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
8
8
|
const Le = ["id"], Ge = ["height"], De = ["data-cell", "height"], Xe = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-KJL8ra_6.cjs"),ue=require("./useNestedProp-Bu958azG.cjs"),Q=require("./usePrinter-pDOF3CfL.cjs"),se=require("./vue-ui-skeleton-D_YCUi1y.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function ae(o){I.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function re(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>le()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>re()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,fe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-ad42b687"]]);exports.default=ge;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),u=require("./index-0dnbsm6P.cjs"),ue=require("./useNestedProp-B5IAA861.cjs"),Q=require("./usePrinter-CRgTdjvo.cjs"),se=require("./vue-ui-skeleton-DgPl6VyF.cjs"),de=require("./useUserOptionState-BgepsfED.cjs"),ve=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),ce=["id"],pe=["height"],fe=["data-cell","height"],me={key:2,ref:"source",dir:"auto"},he={__name:"vue-ui-carousel-table",props:{config:{type:Object,default(){return{}}},dataset:{type:Object,default(){return{}}}},setup(b,{expose:W}){const r=b,{vue_ui_carousel_table:Y}=u.useConfig(),S=e.ref(u.createUid()),I=e.ref(!1),k=e.ref(!!r.dataset),Z=e.useSlots();e.onMounted(()=>{F()}),e.onMounted(()=>{Z["chart-background"]&&console.warn("VueUiCarouselTable does not support the #chart-background slot.")});function F(){u.objectIsEmpty(r.dataset)?u.error({componentName:"VueUiCarouselTable",type:"dataset"}):((!r.dataset.head||u.objectIsEmpty(r.dataset.head))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"head"}),k.value=!1),(!r.dataset.body||u.objectIsEmpty(r.dataset.body))&&(u.error({componentName:"VueUiCarouselTable",type:"datasetAttribute",property:"body"}),k.value=!1))}const t=e.computed({get:()=>V(),set:o=>o}),{userOptionsVisible:A,setUserOptionsVisibility:P,keepUserOptionState:N}=de.useUserOptionState({config:t.value});function V(){return ue.useNestedProp({userConfig:r.config,defaultConfig:Y})}e.watch(()=>r.config,o=>{t.value=V(),A.value=!t.value.showOnChartHover,F()},{deep:!0}),e.watch(()=>r.dataset,o=>{O()},{deep:!0});const{isPrinting:R,isImaging:M,generatePdf:_,generateImage:q}=Q.usePrinter({elementId:`carousel-table_${S.value}`,fileName:t.value.caption.text||"vue-ui-carousel-table"}),v=e.ref({showAnimation:t.value.animation.use}),l=e.ref(null),U=e.ref(null),C=e.ref(null),T=e.ref(null),$=e.ref(0),B=e.ref(0),x=e.ref(!1),w=e.ref(null),f=e.ref(null),y=e.ref(0);function O(){w.value&&(f.value={elements:w.value.getElementsByTagName("tr"),heights:Array.from(w.value.getElementsByTagName("tr")).map(o=>o.getBoundingClientRect().height)})}e.onMounted(O);const ee=e.computed(()=>!f.value||!f.value.heights.length?0:Math.max(...f.value.heights)+$.value+B.value),te=e.computed(()=>r.dataset.body?t.value.tbody.tr.visible<=r.dataset.body.length?t.value.tbody.tr.visible:r.dataset.body.length:0),oe=e.computed(()=>(t.value.tbody.tr.height+t.value.tbody.tr.td.padding.top+t.value.tbody.tr.td.padding.bottom+t.value.tbody.tr.border.size*2)*te.value+$.value+B.value),d=e.ref(0),m=e.ref(null),s=e.ref(0),h=e.ref(!1),H=e.ref(0);e.onMounted(()=>{C.value&&($.value=C.value.getBoundingClientRect().height),T.value&&(B.value=T.value.getBoundingClientRect().height),v.value.showAnimation&&f.value&&L()}),e.onMounted(()=>{if(l.value){let n=function(){const i=o.getBoundingClientRect().bottom;a.forEach(p=>{p.getBoundingClientRect().top<i?p.style.visibility="hidden":p.style.visibility="visible"})};const o=l.value.querySelector("thead"),a=Array.from(w.value.querySelectorAll("tr"));l.value.addEventListener("scroll",n),n(),e.onBeforeUnmount(()=>{l.value.removeEventListener("scroll",n)})}});function ae(o){I.value=o,H.value+=1}function L(){!m.value&&!h.value&&(t.value.animation.type==="scroll"?m.value=requestAnimationFrame(D):m.value=requestAnimationFrame(G))}function ne(){if(!l.value)return!1;const{scrollTop:o,scrollHeight:a,clientHeight:n}=l.value;return o+n>=a}function D(o){if(h.value)return;s.value||(s.value=o),o-s.value>=t.value.animation.speedMs&&(d.value+=f.value.heights[y.value],(ne()||y.value>=f.value.heights.length)&&(d.value=0,y.value=-1),y.value+=1,l.value&&l.value.scrollTo({top:d.value,behavior:"smooth"}),s.value=o),m.value=requestAnimationFrame(D)}function G(o){if(h.value)return;s.value||(s.value=o);const a=o-s.value,n=t.value.animation.speedMs/4/1e3;a>=n&&(d.value+=n,d.value>=l.value.scrollHeight-l.value.clientHeight&&(d.value=0),l.value&&l.value.scrollTo({top:d.value,behavior:"auto"}),s.value=o),m.value=requestAnimationFrame(G)}function c(){h.value=!0,cancelAnimationFrame(m.value),m.value=null}e.onBeforeUnmount(c);function g(){!h.value||!v.value.showAnimation||(h.value=!1,s.value=0,L())}function le(){t.value.animation.pauseOnHover&&c()}const E=e.ref(null);function re(){c(),clearTimeout(E.value)}function j(){clearTimeout(E.value),E.value=setTimeout(g,1e3)}e.watch(()=>t.value.animation.use,o=>{o?(v.value.showAnimation=!0,g()):(v.value.showAnimation=!1,c())}),e.watch(()=>t.value.animation.type,o=>{c(),d.value=0,y.value=0,l.value.scrollTo({top:0,behavior:"auto"}),g()});const ie=e.computed(()=>t.value.responsiveBreakpoint);e.onMounted(()=>{const o=new ResizeObserver(a=>{a.forEach(n=>{x.value=n.contentRect.width<ie.value}),$.value=C.value?C.value.getBoundingClientRect().height:0,B.value=T.value?T.value.getBoundingClientRect().height:0,y.value=0,e.nextTick(()=>{c(),s.value=0,d.value=0,O(),g()})});l.value&&o.observe(l.value)});function X(){_()}function J(){v.value.showAnimation=!v.value.showAnimation,v.value.showAnimation?g():c()}function K(){e.nextTick(()=>{const o=r.dataset.head.map((i,p)=>[[r.dataset.body[p]]]),a=[[t.value.caption.text],[r.dataset.head.map(i=>[i])]].concat(o),n=u.createCsvContent(a);u.downloadCsv({csvContent:n,title:t.value.caption.text||"vue-ui-carousel-table"})})}return W({pauseAnimation:c,resumeAnimation:g,toggleAnimation:J,generateCsv:K,generatePdf:X,generateImage:q}),(o,a)=>(e.openBlock(),e.createElementBlock("div",{style:{position:"relative",overflow:"visible"},ref_key:"chartContainer",ref:U,onMouseenter:a[5]||(a[5]=()=>e.unref(P)(!0)),onMouseleave:a[6]||(a[6]=()=>e.unref(P)(!1))},[e.createElementVNode("div",{ref_key:"tableContainer",ref:l,id:`carousel-table_${S.value}`,style:e.normalizeStyle({height:e.unref(R)||e.unref(M)?"auto":`${Math.max(oe.value,ee.value)}px`,containerType:"inline-size",position:"relative",overflow:"auto",fontFamily:t.value.fontFamily}),class:e.normalizeClass({"vue-ui-responsive":x.value,"is-playing":t.value.scrollbar.hide||!h.value&&t.value.scrollbar.showOnlyOnHover}),onMouseover:a[0]||(a[0]=n=>le()),onMouseleave:a[1]||(a[1]=n=>g()),onTouchstart:a[2]||(a[2]=n=>re()),onTouchend:a[3]||(a[3]=n=>j()),onTouchcancel:a[4]||(a[4]=n=>j())},[k.value?(e.openBlock(),e.createElementBlock("table",{key:0,class:"vue-data-ui-carousel-table",style:e.normalizeStyle({...t.value.style,border:`${t.value.border.size}px solid ${t.value.border.color}`,width:"100%",borderCollapse:"collapse",backgroundColor:t.value.tbody.backgroundColor})},[e.createElementVNode("caption",{ref_key:"caption",ref:C,class:"vue-data-ui-carousel-table-caption",style:e.normalizeStyle({...t.value.caption.style,fontFamily:"inherit",position:"sticky",top:0,zIndex:2,paddingTop:t.value.caption.padding.top+"px",paddingRight:t.value.caption.padding.right+"px",paddingBottom:t.value.caption.padding.bottom+"px",paddingLeft:t.value.caption.padding.left+"px",boxShadow:x.value?t.value.thead.tr.style.boxShadow:"none",minHeight:"36px",display:o.$slots.caption||t.value.caption.text||t.value.userOptions.show?"":"none"})},[e.createTextVNode(e.toDisplayString(t.value.caption.text&&!o.$slots.caption?t.value.caption.text:"")+" ",1),e.renderSlot(o.$slots,"caption",{},void 0,!0)],4),e.createElementVNode("thead",{style:e.normalizeStyle({...t.value.thead.style,position:"sticky",top:`${o.$slots.caption||t.value.caption.text||t.value.userOptions.show?$.value:0}px`,zIndex:1})},[e.createElementVNode("tr",{ref_key:"tableRow",ref:T,role:"row",style:e.normalizeStyle({...t.value.thead.tr.style,border:t.value.thead.tr.border.size?`${t.value.thead.tr.border.size}px solid ${t.value.thead.tr.border.color}`:"none",boxShadow:x.value?"none":t.value.thead.tr.style.boxShadow}),height:`${t.value.thead.tr.height}px`},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.head,(n,i)=>(e.openBlock(),e.createElementBlock("th",{role:"cell",key:`th_${i}`,style:e.normalizeStyle({...t.value.thead.tr.th.style,border:t.value.thead.tr.th.border.size?`${t.value.thead.tr.th.border.size}px solid ${t.value.thead.tr.th.border.color}`:"none",paddingTop:t.value.thead.tr.th.padding.top+"px",paddingRight:t.value.thead.tr.th.padding.right+"px",paddingBottom:t.value.thead.tr.th.padding.bottom+"px",paddingLeft:t.value.thead.tr.th.padding.left+"px"})},[e.createTextVNode(e.toDisplayString(o.$slots.th?"":n)+" ",1),e.renderSlot(o.$slots,"th",e.normalizeProps(e.guardReactiveProps({th:n,colIndex:i})),void 0,!0)],4))),128))],12,pe)],4),b.dataset.body&&b.dataset.head?(e.openBlock(),e.createElementBlock("tbody",{key:0,ref_key:"tbody",ref:w,style:e.normalizeStyle({clipPath:"inset(0,0,0,0)"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.dataset.body,(n,i)=>(e.openBlock(),e.createElementBlock("tr",{style:e.normalizeStyle({...t.value.tbody.tr.style,border:`${t.value.tbody.tr.border.size}px solid ${t.value.tbody.tr.border.color}`,verticalAlign:"middle"})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n,(p,z)=>(e.openBlock(),e.createElementBlock("td",{role:"cell","data-cell":b.dataset.head[z]||"",style:e.normalizeStyle({...t.value.tbody.tr.td.style,border:`${t.value.tbody.tr.td.border.size}px solid ${t.value.tbody.tr.td.border.color}`,backgroundColor:e.unref(u.setOpacity)(t.value.tbody.tr.td.style.backgroundColor,i%2===0&&t.value.tbody.tr.td.alternateColor?t.value.tbody.tr.td.alternateOpacity*100:100),paddingTop:t.value.tbody.tr.td.padding.top+"px",paddingRight:t.value.tbody.tr.td.padding.right+"px",paddingBottom:t.value.tbody.tr.td.padding.bottom+"px",paddingLeft:t.value.tbody.tr.td.padding.left+"px",verticalAlign:"middle"}),height:`${t.value.tbody.tr.height}px`},[e.createTextVNode(e.toDisplayString(o.$slots.td?"":p)+" ",1),e.renderSlot(o.$slots,"td",e.normalizeProps(e.guardReactiveProps({td:p,rowIndex:i,colIndex:z})),void 0,!0)],12,fe))),256))],4))),256))],4)):e.createCommentVNode("",!0)],4)):e.createCommentVNode("",!0)],46,ce),k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(se.default,{key:0,config:{type:"table"}})),t.value.userOptions.show&&k.value&&(e.unref(N)||e.unref(A))?(e.openBlock(),e.createBlock(Q.UserOptions,{ref:"details",key:`user_option_${H.value}`,backgroundColor:t.value.style.backgroundColor,color:t.value.style.color,isPrinting:e.unref(R),isImaging:e.unref(M),uid:S.value,hasTooltip:!1,hasPdf:t.value.userOptions.buttons.pdf,hasImg:t.value.userOptions.buttons.img,hasXls:t.value.userOptions.buttons.csv,hasTable:!1,hasLabel:!1,hasAnimation:t.value.userOptions.buttons.animation,isAnimation:!v.value.showAnimation,hasFullscreen:t.value.userOptions.buttons.fullscreen,isFullscreen:I.value,chartElement:U.value,position:t.value.userOptions.position,titles:{...t.value.userOptions.buttonTitles},zIndex:3,offsetX:12,onGeneratePdf:X,onGenerateCsv:K,onGenerateImage:e.unref(q),onToggleAnimation:J,onToggleFullscreen:ae,style:e.normalizeStyle({visibility:e.unref(N)?e.unref(A)?"visible":"hidden":"visible"})},e.createSlots({_:2},[o.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,o.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,o.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,o.$slots.optionAnimation?{name:"optionAnimation",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"optionAnimation",{},void 0,!0)]),key:"3"}:void 0,o.$slots.optionFullscreen?{name:"optionFullscreen",fn:e.withCtx(({toggleFullscreen:n,isFullscreen:i})=>[e.renderSlot(o.$slots,"optionFullscreen",e.normalizeProps(e.guardReactiveProps({toggleFullscreen:n,isFullscreen:i})),void 0,!0)]),key:"4"}:void 0]),1032,["backgroundColor","color","isPrinting","isImaging","uid","hasPdf","hasImg","hasXls","hasAnimation","isAnimation","hasFullscreen","isFullscreen","chartElement","position","titles","onGenerateImage","style"])):e.createCommentVNode("",!0),o.$slots.source?(e.openBlock(),e.createElementBlock("div",me,[e.renderSlot(o.$slots,"source",{},void 0,!0)],512)):e.createCommentVNode("",!0)],544))}},ge=ve._export_sfc(he,[["__scopeId","data-v-ad42b687"]]);exports.default=ge;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { useCssVars as Ye, computed as m, ref as T, watch as qe, onMounted as He, openBlock as a, createElementBlock as o, normalizeClass as k, normalizeStyle as h, unref as n, createBlock as K, createCommentVNode as f, createSlots as We, withCtx as X, renderSlot as F, normalizeProps as ue, guardReactiveProps as ne, createVNode as $e, toDisplayString as c, createElementVNode as s, Fragment as g, renderList as _, createTextVNode as J, withKeys as Ke, nextTick as Ce } from "vue";
|
|
2
|
-
import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-
|
|
3
|
-
import { u as nt, U as rt } from "./usePrinter-
|
|
4
|
-
import it from "./vue-ui-skeleton-
|
|
5
|
-
import ct from "./BaseIcon-
|
|
6
|
-
import dt from "./vue-ui-accordion
|
|
7
|
-
import { u as Se } from "./useNestedProp-
|
|
8
|
-
import { _ as vt } from "./PackageVersion-
|
|
9
|
-
import { P as yt } from "./PenAndPaper-
|
|
2
|
+
import { u as Je, c as Qe, t as Ze, a as et, p as P, b as tt, g as re, e as Q, d as ie, o as lt, X as at, s as S, w as Te, i as G, f as z, G as ze, m as Ne, j as ot, k as V, n as H, q as st, r as ut } from "./index-DJL-Bkqp.js";
|
|
3
|
+
import { u as nt, U as rt } from "./usePrinter-DdGbL4Nm.js";
|
|
4
|
+
import it from "./vue-ui-skeleton-z4MGfNaM.js";
|
|
5
|
+
import ct from "./BaseIcon-BmzdBA_n.js";
|
|
6
|
+
import dt from "./vue-ui-accordion-B_eXBJPl.js";
|
|
7
|
+
import { u as Se } from "./useNestedProp-uEksOW7g.js";
|
|
8
|
+
import { _ as vt } from "./PackageVersion-CiKxfy3h.js";
|
|
9
|
+
import { P as yt } from "./PenAndPaper-Dkvtj3o8.js";
|
|
10
10
|
import { u as ht } from "./useUserOptionState-BIvW1Kz7.js";
|
|
11
11
|
import { _ as ft } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
12
12
|
const bt = ["id"], pt = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-KJL8ra_6.cjs"),Z=require("./usePrinter-pDOF3CfL.cjs"),me=require("./vue-ui-skeleton-D_YCUi1y.cjs"),be=require("./BaseIcon-CIjjPDqj.cjs"),ge=require("./vue-ui-accordion-4-dyMgJA.cjs"),ee=require("./useNestedProp-Bu958azG.cjs"),ke=require("./PackageVersion-Dn-t7tbm.cjs"),_e=require("./PenAndPaper-DFXJJink.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Ne={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se=["xmlns","viewBox"],Ce=["width","height"],we={key:1},ze=["fill","font-weight","font-size","x","y"],Ve=["fill","font-weight","font-size","x","y"],$e=["id"],Te=["stop-color"],Fe=["stop-color"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Me=["stop-color"],Ie=["stop-color"],Re=["stop-color"],Xe=["id"],Ae=["stop-color"],je=["stop-color"],Ge=["stop-color"],Ue=["id"],qe=["stop-color"],Ye=["stop-color"],He=["stop-color"],We={key:2},Ke=["x","y","font-size","font-weight","fill"],Je=["x","y","font-size","font-weight","fill"],Qe=["d","stroke"],Ze=["cx","cy","r","fill"],et=["cx","cy","r","fill","stroke","stroke-width","onClick"],tt={key:3},lt=["x","y","font-size","fill","onClick"],at={key:0},ot=["x","y","fill","font-size","font-weight"],nt=["x","y","height","width","fill","rx","onClick"],rt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],st={key:4},ut=["x","y","fill","font-size","onClick"],ct=["d","stroke"],it=["fill","cx","cy","r","onClick"],dt={key:5},yt=["x","y","font-size","font-weight","fill"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["y","height","width"],pt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ft={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},mt={viewBox:"0 0 20 20",height:"16",width:"16"},bt=["fill"],gt={key:7},kt=["y","height","width"],_t={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},xt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},Bt={viewBox:"0 0 20 20",height:"16",width:"16"},Et=["fill"],Nt=["cx","cy","fill"],St=["d","stroke"],Ct=["cx","cy","fill"],wt=["d","stroke"],zt=["cx","cy","fill"],Vt=["cx","cy","fill"],$t=["x","y","fill","font-size","font-weight"],Tt=["x","y","fill","font-size","font-weight"],Ft=["x","text-anchor","y","fill","font-size"],Lt=["x","text-anchor","y","fill","font-size"],Dt=["x","text-anchor","y","fill","font-size"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],Mt=["x","y","font-size","fill"],It=["x","y","font-size","fill"],Rt=["x","y","font-size","fill"],Xt={key:4,class:"vue-data-ui-watermark"},At={key:6,ref:"source",dir:"auto"},jt={style:{"padding-top":"36px",position:"relative"}},Gt={class:"vue-ui-data-table"},Ut={key:0},qt=["data-cell"],Yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ht={key:0},Wt={key:1},Kt=["data-cell"],Jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qt={key:0},Zt={key:1},el=["data-cell"],tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ll={key:0},al={key:1},ol=["data-cell"],nl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rl={key:0},sl={key:1},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il={key:0},dl={key:1},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl={key:0},pl={key:1},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl={key:0},gl={key:1},kl=["data-cell"],_l={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl=["data-cell"],Bl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},El=["data-cell"],Nl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Sl=["data-cell"],Cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wl=["data-cell"],zl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Vl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(te,{expose:le,emit:S}){const k=te;e.useCssVars(a=>({f3fa2852:a.tdo}));const{vue_ui_chestnut:ae}=o.useConfig(),w=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),T=e.ref(null),oe=e.ref(null),I=e.ref(0),t=e.computed({get:()=>A(),set:a=>a}),{userOptionsVisible:F,setUserOptionsVisibility:R,keepUserOptionState:X}=xe.useUserOptionState({config:t.value});function A(){const a=ee.useNestedProp({userConfig:k.config,defaultConfig:ae});return a.theme?{...ee.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=A(),F.value=!t.value.showOnChartHover,K()},{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:U,generateImage:q}=Z.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),ne=e.computed(()=>t.value.userOptions.show),L=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),D=e.ref(null),Y=e.ref(!1),re=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}),f=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(()=>w.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)||L.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)||L.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)||L.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function se(){return m.value}const ue=e.computed(()=>m.value.flatMap(a=>a.branches).length),ce=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ie=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),H=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/ce.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),de=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),ye=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>ye.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:H.value,x2:384*a.value/ie.value*de.value+H.value})));function O(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 p(){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 ve(a){p(),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),S("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,S("selectNut",null)}function P(a){v.value&&v.value.id===a.id?(v.value=null,p(),S("selectBranch",null)):(p(),v.value=a,S("selectBranch",a))}function W(a){b.value&&b.value.id===a.id?(p(),S("selectRoot",null)):(p(),b.value=a,S("selectRoot",a))}function he(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function C(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function pe(){const a=new ResizeObserver(s=>{s.forEach(l=>{Y.value=l.contentRect.width<re.value})});D.value&&a.observe(D.value)}e.onMounted(()=>{K()});function K(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ue.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,pe()}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,Tl)=>y.table)));return{head:a,body:s}});function J(){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 fe(a){V.value=a,I.value+=1}function Q(){z.value.showTable=!z.value.showTable}const $=e.ref(!1);function M(){$.value=!$.value}return le({getData:se,generatePdf:U,generateCsv:J,generateImage:q,toggleTable:Q,toggleAnnotator:M}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:T,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(_e.PenAndPaper,{key:0,parent:T.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",Ne,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value&&(e.unref(X)||e.unref(F))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:oe,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),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:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(q),onToggleTable:Q,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(F)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}: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:"5"}: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&&w.value?(e.openBlock(),e.createElementBlock("svg",{key:3,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(ke._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,Ce)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",we,[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:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,ze)):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:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Ve)):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,Te),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Fe)],8,$e))),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,De),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,Oe)],8,Le))),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,Me),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Re)],8,Pe),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,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ge)],8,Xe),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,qe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,He)],8,Ue)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("text",{x:f.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:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ke),e.createElementVNode("text",{x:f.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:p},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,Je)])):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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),o=require("./index-0dnbsm6P.cjs"),Z=require("./usePrinter-CRgTdjvo.cjs"),me=require("./vue-ui-skeleton-DgPl6VyF.cjs"),be=require("./BaseIcon-DmjD9_x3.cjs"),ge=require("./vue-ui-accordion-BFiGf3JH.cjs"),ee=require("./useNestedProp-B5IAA861.cjs"),ke=require("./PackageVersion-DLubhuZS.cjs"),_e=require("./PenAndPaper-DmTTxoH_.cjs"),xe=require("./useUserOptionState-BgepsfED.cjs"),Be=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),Ee=["id"],Ne={key:1,ref:"noTitle",class:"vue-data-ui-no-title-space",style:"height:36px; width: 100%;background:transparent"},Se=["xmlns","viewBox"],Ce=["width","height"],we={key:1},ze=["fill","font-weight","font-size","x","y"],Ve=["fill","font-weight","font-size","x","y"],$e=["id"],Te=["stop-color"],Fe=["stop-color"],Le=["id"],De=["stop-color"],Oe=["stop-color"],Pe=["id"],Me=["stop-color"],Ie=["stop-color"],Re=["stop-color"],Xe=["id"],Ae=["stop-color"],je=["stop-color"],Ge=["stop-color"],Ue=["id"],qe=["stop-color"],Ye=["stop-color"],He=["stop-color"],We={key:2},Ke=["x","y","font-size","font-weight","fill"],Je=["x","y","font-size","font-weight","fill"],Qe=["d","stroke"],Ze=["cx","cy","r","fill"],et=["cx","cy","r","fill","stroke","stroke-width","onClick"],tt={key:3},lt=["x","y","font-size","fill","onClick"],at={key:0},ot=["x","y","fill","font-size","font-weight"],nt=["x","y","height","width","fill","rx","onClick"],rt=["x","y","height","width","fill","rx","stroke","stroke-width","onClick"],st={key:4},ut=["x","y","fill","font-size","onClick"],ct=["d","stroke"],it=["fill","cx","cy","r","onClick"],dt={key:5},yt=["x","y","font-size","font-weight","fill"],vt=["x1","x2","y1","y2","stroke","stroke-width"],ht=["y","height","width"],pt={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},ft={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},mt={viewBox:"0 0 20 20",height:"16",width:"16"},bt=["fill"],gt={key:7},kt=["y","height","width"],_t={style:{width:"100%",height:"100%",display:"flex","align-items":"center","justify-content":"center","flex-direction":"column"}},xt={style:{display:"flex","align-items":"center","justify-content":"center",gap:"12px","flex-wrap":"wrap","flex-direction":"row"}},Bt={viewBox:"0 0 20 20",height:"16",width:"16"},Et=["fill"],Nt=["cx","cy","fill"],St=["d","stroke"],Ct=["cx","cy","fill"],wt=["d","stroke"],zt=["cx","cy","fill"],Vt=["cx","cy","fill"],$t=["x","y","fill","font-size","font-weight"],Tt=["x","y","fill","font-size","font-weight"],Ft=["x","text-anchor","y","fill","font-size"],Lt=["x","text-anchor","y","fill","font-size"],Dt=["x","text-anchor","y","fill","font-size"],Ot=["x","text-anchor","y","fill","font-size"],Pt=["x","text-anchor","y","fill","font-size"],Mt=["x","y","font-size","fill"],It=["x","y","font-size","fill"],Rt=["x","y","font-size","fill"],Xt={key:4,class:"vue-data-ui-watermark"},At={key:6,ref:"source",dir:"auto"},jt={style:{"padding-top":"36px",position:"relative"}},Gt={class:"vue-ui-data-table"},Ut={key:0},qt=["data-cell"],Yt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Ht={key:0},Wt={key:1},Kt=["data-cell"],Jt={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Qt={key:0},Zt={key:1},el=["data-cell"],tl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},ll={key:0},al={key:1},ol=["data-cell"],nl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},rl={key:0},sl={key:1},ul=["data-cell"],cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},il={key:0},dl={key:1},yl=["data-cell"],vl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},hl={key:0},pl={key:1},fl=["data-cell"],ml={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},bl={key:0},gl={key:1},kl=["data-cell"],_l={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},xl=["data-cell"],Bl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},El=["data-cell"],Nl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Sl=["data-cell"],Cl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},wl=["data-cell"],zl={style:{display:"flex","align-items":"center",gap:"5px","justify-content":"flex-end",width:"100%","padding-right":"3px"}},Vl={__name:"vue-ui-chestnut",props:{config:{type:Object,default(){return{}}},dataset:{type:Array,default(){return[]}}},emits:["selectRoot","selectBranch","selectNut"],setup(te,{expose:le,emit:S}){const k=te;e.useCssVars(a=>({f3fa2852:a.tdo}));const{vue_ui_chestnut:ae}=o.useConfig(),w=e.computed(()=>!!k.dataset&&k.dataset.length),h=e.ref(o.createUid()),T=e.ref(null),oe=e.ref(null),I=e.ref(0),t=e.computed({get:()=>A(),set:a=>a}),{userOptionsVisible:F,setUserOptionsVisibility:R,keepUserOptionState:X}=xe.useUserOptionState({config:t.value});function A(){const a=ee.useNestedProp({userConfig:k.config,defaultConfig:ae});return a.theme?{...ee.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=A(),F.value=!t.value.showOnChartHover,K()},{deep:!0});const{isPrinting:j,isImaging:G,generatePdf:U,generateImage:q}=Z.usePrinter({elementId:`vue-ui-chestnut_${h.value}`,fileName:t.value.style.chart.layout.title.text||"vue-ui-chestnut"}),ne=e.computed(()=>t.value.userOptions.show),L=e.computed(()=>o.convertCustomPalette(t.value.customPalette)),z=e.ref({showTable:t.value.table.show}),D=e.ref(null),Y=e.ref(!1),re=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}),f=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(()=>w.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)||L.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)||L.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)||L.value[y]||o.palette[y]||o.palette[y%o.palette.length],value:i.value>=0?i.value:0}))}))}})));function se(){return m.value}const ue=e.computed(()=>m.value.flatMap(a=>a.branches).length),ce=e.computed(()=>Math.max(...m.value.map(a=>a.branches.map(s=>s.value).reduce((s,l)=>s+l,0)))),ie=e.computed(()=>Math.max(...m.value.flatMap(a=>a.branches.map(s=>s.value)))),H=e.computed(()=>256+r.value.padding.left),B=e.computed(()=>m.value.sort((a,s)=>s.total-a.total).map((a,s)=>{const l=f.value.height/m.value.length/2,n=a.total/ce.value*(l>64?64:l);return{...a,x:f.value.seedX,y:f.value.top+f.value.height/m.value.length*(s+1)-(f.value.height/m.value.length/2+r.value.gap/2),r:n<r.value.branchSize/2?r.value.branchSize/2:n}})),de=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),ye=e.computed(()=>B.value.flatMap(a=>a.branches)),E=e.computed(()=>ye.value.sort((a,s)=>s.value-a.value).map((a,s)=>({...a,y1:s*r.value.branchSize+f.value.top+s*r.value.gap,y2:s*r.value.branchSize+r.value.branchSize,x1:H.value,x2:384*a.value/ie.value*de.value+H.value})));function O(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 p(){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 ve(a){p(),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),S("selectNut",a.breakdown)})}function N(){u.value=null,x.value=null,S("selectNut",null)}function P(a){v.value&&v.value.id===a.id?(v.value=null,p(),S("selectBranch",null)):(p(),v.value=a,S("selectBranch",a))}function W(a){b.value&&b.value.id===a.id?(p(),S("selectRoot",null)):(p(),b.value=a,S("selectRoot",a))}function he(){return f.value.bottom-(u.value.y1+180)<0?0:f.value.bottom}function C(a){return a.proportion*100>t.value.style.chart.layout.nuts.selected.labels.dataLabels.hideUnderValue}function pe(){const a=new ResizeObserver(s=>{s.forEach(l=>{Y.value=l.contentRect.width<re.value})});D.value&&a.observe(D.value)}e.onMounted(()=>{K()});function K(){o.objectIsEmpty(k.dataset)&&o.error({componentName:"VueUiChestnut",type:"dataset"});const a=ue.value*(r.value.branchSize+r.value.gap)+r.value.padding.top+r.value.padding.bottom;r.value.height=a,pe()}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,Tl)=>y.table)));return{head:a,body:s}});function J(){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 fe(a){V.value=a,I.value+=1}function Q(){z.value.showTable=!z.value.showTable}const $=e.ref(!1);function M(){$.value=!$.value}return le({getData:se,generatePdf:U,generateCsv:J,generateImage:q,toggleTable:Q,toggleAnnotator:M}),(a,s)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(`vue-ui-chestnut ${V.value?"vue-data-ui-wrapper-fullscreen":""}`),ref_key:"chestnutChart",ref:T,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(_e.PenAndPaper,{key:0,parent:T.value,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,active:$.value,onClose:M},null,8,["parent","backgroundColor","color","active"])):e.createCommentVNode("",!0),ne.value?(e.openBlock(),e.createElementBlock("div",Ne,null,512)):e.createCommentVNode("",!0),t.value.userOptions.show&&w.value&&(e.unref(X)||e.unref(F))?(e.openBlock(),e.createBlock(Z.UserOptions,{ref_key:"details",ref:oe,key:`user_options_${I.value}`,backgroundColor:t.value.style.chart.backgroundColor,color:t.value.style.chart.color,isImaging:e.unref(G),isPrinting:e.unref(j),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:T.value,position:t.value.userOptions.position,hasAnnotator:t.value.userOptions.buttons.annotator,isAnnotation:$.value,onToggleFullscreen:fe,onGeneratePdf:e.unref(U),onGenerateCsv:J,onGenerateImage:e.unref(q),onToggleTable:Q,onToggleAnnotator:M,style:e.normalizeStyle({visibility:e.unref(X)?e.unref(F)?"visible":"hidden":"visible"})},e.createSlots({_:2},[a.$slots.optionPdf?{name:"optionPdf",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionPdf",{},void 0,!0)]),key:"0"}:void 0,a.$slots.optionCsv?{name:"optionCsv",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionCsv",{},void 0,!0)]),key:"1"}:void 0,a.$slots.optionImg?{name:"optionImg",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionImg",{},void 0,!0)]),key:"2"}:void 0,a.$slots.optionTable?{name:"optionTable",fn:e.withCtx(()=>[e.renderSlot(a.$slots,"optionTable",{},void 0,!0)]),key:"3"}: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:"4"}: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:"5"}: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&&w.value?(e.openBlock(),e.createElementBlock("svg",{key:3,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(ke._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,Ce)):e.createCommentVNode("",!0),u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("g",we,[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:p},e.toDisplayString(t.value.style.chart.layout.title.text),9,ze)):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:p},e.toDisplayString(t.value.style.chart.layout.title.subtitle.text),9,Ve)):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,Te),e.createElementVNode("stop",{offset:"100%","stop-color":l.color},null,8,Fe)],8,$e))),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,De),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,Oe)],8,Le))),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,Me),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.selected.gradientIntensity)},null,8,Ie),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Re)],8,Pe),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,Ae),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)("#FFFFFF",t.value.style.chart.layout.nuts.gradientIntensity)},null,8,je),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)("#FFFFFF",0)},null,8,Ge)],8,Xe),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,qe),e.createElementVNode("stop",{offset:"80%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,60)},null,8,Ye),e.createElementVNode("stop",{offset:"100%","stop-color":e.unref(o.setOpacity)(t.value.style.chart.backgroundColor,0)},null,8,He)],8,Ue)]),t.value.style.chart.layout.grandTotal.show?(e.openBlock(),e.createElementBlock("g",We,[e.createElementVNode("text",{x:f.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:p},e.toDisplayString(t.value.style.chart.layout.grandTotal.text),9,Ke),e.createElementVNode("text",{x:f.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:p},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,Je)])):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
|
|
2
2
|
${l.x1},${l.y1+d}
|
|
3
3
|
C${l.x1-20},${l.y1+d}
|
|
4
4
|
${l.x1-80},${l.y1+d}
|