@tabler/charts 0.2.0 → 0.3.0
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/README.md +74 -4
- package/dist/{annotations-D0YQ0IoA.js → annotations-BQ8l-qHs.js} +3 -3
- package/dist/{annotations-D0YQ0IoA.js.map → annotations-BQ8l-qHs.js.map} +1 -1
- package/dist/{annotations-DdRdeBUB.cjs → annotations-CpCWA29b.cjs} +3 -3
- package/dist/{annotations-DdRdeBUB.cjs.map → annotations-CpCWA29b.cjs.map} +1 -1
- package/dist/annotations.cjs +2 -2
- package/dist/annotations.js +2 -2
- package/dist/{area-d11XePuw.d.ts → area-DEFQm_SQ.d.ts} +2 -2
- package/dist/{area-4eRs3c0K.cjs → area-DYdQ_sMV.cjs} +3 -3
- package/dist/{area-4eRs3c0K.cjs.map → area-DYdQ_sMV.cjs.map} +1 -1
- package/dist/{area-0-L1bG9B.js → area-WdtfqvhX.js} +3 -3
- package/dist/{area-0-L1bG9B.js.map → area-WdtfqvhX.js.map} +1 -1
- package/dist/{area-CJX9219z.d.cts → area-h_FvieFb.d.cts} +2 -2
- package/dist/area.cjs +1 -1
- package/dist/area.d.cts +1 -1
- package/dist/area.d.ts +1 -1
- package/dist/area.js +1 -1
- package/dist/axis-MMaVoSWB.js +235 -0
- package/dist/axis-MMaVoSWB.js.map +1 -0
- package/dist/axis-YfAerNBA.cjs +300 -0
- package/dist/axis-YfAerNBA.cjs.map +1 -0
- package/dist/{bar-BNZ3GhIw.js → bar-BOcRcArc.js} +74 -56
- package/dist/bar-BOcRcArc.js.map +1 -0
- package/dist/{bar-Da6dE_nI.cjs → bar-CVkOJ7WA.cjs} +76 -58
- package/dist/bar-CVkOJ7WA.cjs.map +1 -0
- package/dist/{bar-B5n2oq9-.js → bar-CgpC2EpX.js} +2 -2
- package/dist/{bar-B5n2oq9-.js.map → bar-CgpC2EpX.js.map} +1 -1
- package/dist/{bar-XwzM6Pb0.d.ts → bar-D9B_arKf.d.ts} +1 -1
- package/dist/{bar-BDLR4p9c.d.cts → bar-DZCQ-kyf.d.cts} +2 -2
- package/dist/{bar-LYIF8MEz.cjs → bar-wVykm1us.cjs} +2 -2
- package/dist/{bar-LYIF8MEz.cjs.map → bar-wVykm1us.cjs.map} +1 -1
- package/dist/bar.cjs +1 -1
- package/dist/bar.d.cts +1 -1
- package/dist/bar.d.ts +1 -1
- package/dist/bar.js +1 -1
- package/dist/calendar-BSvO8nRb.d.cts +106 -0
- package/dist/calendar-BXgIX5H1.js +502 -0
- package/dist/calendar-BXgIX5H1.js.map +1 -0
- package/dist/calendar-Bq3vFzPl.d.ts +106 -0
- package/dist/calendar-DAFXjV99.cjs +507 -0
- package/dist/calendar-DAFXjV99.cjs.map +1 -0
- package/dist/calendar.cjs +3 -0
- package/dist/calendar.d.cts +3 -0
- package/dist/calendar.d.ts +3 -0
- package/dist/calendar.js +1 -0
- package/dist/{candlestick-D0xKkdqd.d.ts → candlestick-B3WcLzph.d.ts} +1 -1
- package/dist/{candlestick-Dq7qp-F0.d.cts → candlestick-BcomxeVG.d.cts} +1 -1
- package/dist/{candlestick-BHQkQfxH.js → candlestick-BtT9glp9.js} +16 -14
- package/dist/{candlestick-BHQkQfxH.js.map → candlestick-BtT9glp9.js.map} +1 -1
- package/dist/{candlestick-CYCQXgky.cjs → candlestick-CSmRuZ4v.cjs} +16 -14
- package/dist/{candlestick-CYCQXgky.cjs.map → candlestick-CSmRuZ4v.cjs.map} +1 -1
- package/dist/candlestick.cjs +3 -3
- package/dist/candlestick.d.cts +1 -1
- package/dist/candlestick.d.ts +1 -1
- package/dist/candlestick.js +3 -3
- package/dist/{cartesian-CI2x6N7N.js → cartesian-BrPqb5Qn.js} +122 -248
- package/dist/cartesian-BrPqb5Qn.js.map +1 -0
- package/dist/{cartesian-DV02PsBe.cjs → cartesian-DRSXHxWe.cjs} +146 -308
- package/dist/cartesian-DRSXHxWe.cjs.map +1 -0
- package/dist/{chart-DWn9v6qw.js → chart-B6TTY4Kr.js} +94 -62
- package/dist/chart-B6TTY4Kr.js.map +1 -0
- package/dist/{chart-QilhWP8Z.d.ts → chart-CYrrUCi3.d.ts} +193 -56
- package/dist/{chart-kqFMEwDo.d.cts → chart-CbPzP5Dp.d.cts} +193 -56
- package/dist/{chart-e2VqomCI.cjs → chart-D_lyOy-M.cjs} +106 -68
- package/dist/chart-D_lyOy-M.cjs.map +1 -0
- package/dist/{core-PAX5ogLk.d.cts → core-9BnLEW4K.d.cts} +24 -20
- package/dist/{core-DRUCk67j.d.ts → core-C3qEppSm.d.ts} +7 -6
- package/dist/{core-BKRQvPAT.js → core-CQ0FaJ4G.js} +112 -65
- package/dist/core-CQ0FaJ4G.js.map +1 -0
- package/dist/{core-DIOC61up.cjs → core-D2PSked3.cjs} +113 -66
- package/dist/core-D2PSked3.cjs.map +1 -0
- package/dist/core.cjs +41 -31
- package/dist/core.d.cts +20 -17
- package/dist/core.d.ts +20 -17
- package/dist/core.js +27 -23
- package/dist/{dates-C2RzY3rE.js → dates-DLe2Ww64.js} +2 -2
- package/dist/{dates-C2RzY3rE.js.map → dates-DLe2Ww64.js.map} +1 -1
- package/dist/{dates-DurEr9WT.cjs → dates-DerXTb1J.cjs} +2 -2
- package/dist/{dates-DurEr9WT.cjs.map → dates-DerXTb1J.cjs.map} +1 -1
- package/dist/decimate.cjs +1 -1
- package/dist/decimate.js +1 -1
- package/dist/{dom-D_g13XWY.cjs → dom-C33zvtPo.cjs} +3 -7
- package/dist/dom-C33zvtPo.cjs.map +1 -0
- package/dist/{dom-CuceR8gt.js → dom-CTse6Rvd.js} +3 -7
- package/dist/dom-CTse6Rvd.js.map +1 -0
- package/dist/{export-chart-mYgEfK-L.cjs → export-chart-CPtXmZvi.cjs} +17 -12
- package/dist/export-chart-CPtXmZvi.cjs.map +1 -0
- package/dist/{export-chart-83UYH48t.js → export-chart-DoeiAyR2.js} +17 -12
- package/dist/export-chart-DoeiAyR2.js.map +1 -0
- package/dist/export.cjs +2 -2
- package/dist/export.d.cts +1 -1
- package/dist/export.d.ts +1 -1
- package/dist/export.js +2 -2
- package/dist/{fade-GGxcBdss.js → fade-CDrQjnDz.js} +56 -78
- package/dist/fade-CDrQjnDz.js.map +1 -0
- package/dist/{fade-DVTkhrFU.cjs → fade-CRqcKMWY.cjs} +56 -78
- package/dist/fade-CRqcKMWY.cjs.map +1 -0
- package/dist/{features-BMxkqCyS.js → features-B55rwpQC.js} +4 -2
- package/dist/features-B55rwpQC.js.map +1 -0
- package/dist/{features-DCXEvoya.cjs → features-DEDP5CEQ.cjs} +9 -1
- package/dist/features-DEDP5CEQ.cjs.map +1 -0
- package/dist/fit-BPyPRnsK.js +16 -0
- package/dist/fit-BPyPRnsK.js.map +1 -0
- package/dist/fit-D4MIIQQz.cjs +21 -0
- package/dist/fit-D4MIIQQz.cjs.map +1 -0
- package/dist/funnel-BdcfUkb5.d.ts +50 -0
- package/dist/funnel-CFEEulw_.cjs +244 -0
- package/dist/funnel-CFEEulw_.cjs.map +1 -0
- package/dist/funnel-CYCv8cq2.js +239 -0
- package/dist/funnel-CYCv8cq2.js.map +1 -0
- package/dist/funnel-CarOh8w_.d.cts +50 -0
- package/dist/funnel.cjs +3 -0
- package/dist/funnel.d.cts +3 -0
- package/dist/funnel.d.ts +3 -0
- package/dist/funnel.js +1 -0
- package/dist/{gauge-DXkjXNCD.cjs → gauge-6HfDcLMJ.cjs} +28 -28
- package/dist/gauge-6HfDcLMJ.cjs.map +1 -0
- package/dist/{gauge-ts0kqN1-.js → gauge-DiTk5aWO.js} +28 -28
- package/dist/gauge-DiTk5aWO.js.map +1 -0
- package/dist/{gauge-BSist7My.d.cts → gauge-Ds9k1UV2.d.cts} +1 -1
- package/dist/{gauge-0VJuAHWF.d.ts → gauge-Zy25jfps.d.ts} +1 -1
- package/dist/gauge.cjs +1 -1
- package/dist/gauge.d.cts +1 -1
- package/dist/gauge.d.ts +1 -1
- package/dist/gauge.js +1 -1
- package/dist/{heatmap-19BGJTKF.js → heatmap-C1v8bwpq.js} +35 -33
- package/dist/heatmap-C1v8bwpq.js.map +1 -0
- package/dist/{heatmap-Dp_oyEe0.d.cts → heatmap-CJ-0dfhJ.d.cts} +1 -1
- package/dist/{heatmap-CXhlrLTl.cjs → heatmap-Dcc_bsoQ.cjs} +39 -37
- package/dist/heatmap-Dcc_bsoQ.cjs.map +1 -0
- package/dist/{heatmap-59lmClj9.d.ts → heatmap-Jp5sHRTo.d.ts} +1 -1
- package/dist/heatmap.cjs +1 -1
- package/dist/heatmap.d.cts +1 -1
- package/dist/heatmap.d.ts +1 -1
- package/dist/heatmap.js +1 -1
- package/dist/{hydrate-OA6R2_Pn.js → hydrate-BB3MlR36.js} +2 -2
- package/dist/{hydrate-OA6R2_Pn.js.map → hydrate-BB3MlR36.js.map} +1 -1
- package/dist/{hydrate-CmN1k8Mo.cjs → hydrate-m0I5m6ue.cjs} +2 -2
- package/dist/{hydrate-CmN1k8Mo.cjs.map → hydrate-m0I5m6ue.cjs.map} +1 -1
- package/dist/hydrate.cjs +2 -2
- package/dist/hydrate.js +2 -2
- package/dist/index.cjs +55 -42
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -18
- package/dist/index.d.ts +21 -18
- package/dist/index.js +41 -34
- package/dist/index.js.map +1 -1
- package/dist/interaction-DXYSjgnP.cjs +32 -0
- package/dist/interaction-DXYSjgnP.cjs.map +1 -0
- package/dist/interaction-En1KlwFO.js +21 -0
- package/dist/interaction-En1KlwFO.js.map +1 -0
- package/dist/{layout-JY2aR-yE.cjs → layout-Cfg9x1k2.cjs} +32 -1
- package/dist/layout-Cfg9x1k2.cjs.map +1 -0
- package/dist/{layout-DmrrLjwN.js → layout-DqAte3H8.js} +27 -2
- package/dist/layout-DqAte3H8.js.map +1 -0
- package/dist/{line-DtSh7HQU.d.ts → line-Bpr5uVLQ.d.ts} +1 -1
- package/dist/{line-DO66LtwH.js → line-CxR4tg1Q.js} +46 -34
- package/dist/line-CxR4tg1Q.js.map +1 -0
- package/dist/{line-Dbt6KFRK.cjs → line-YiCuhVMI.cjs} +46 -34
- package/dist/line-YiCuhVMI.cjs.map +1 -0
- package/dist/{line-_rNdeKmS.d.cts → line-vyWO030v.d.cts} +2 -3
- package/dist/line.cjs +3 -3
- package/dist/line.d.cts +1 -1
- package/dist/line.d.ts +1 -1
- package/dist/line.js +3 -3
- package/dist/log.cjs +1 -1
- package/dist/log.js +1 -1
- package/dist/map-49FcfdmJ.d.cts +156 -0
- package/dist/map-BMC61J-P.d.ts +156 -0
- package/dist/map-BqrZ80vT.cjs +818 -0
- package/dist/map-BqrZ80vT.cjs.map +1 -0
- package/dist/map-C15NC7kW.js +807 -0
- package/dist/map-C15NC7kW.js.map +1 -0
- package/dist/map.cjs +4 -0
- package/dist/map.d.cts +3 -0
- package/dist/map.d.ts +3 -0
- package/dist/map.js +1 -0
- package/dist/maps/world.cjs +875 -0
- package/dist/maps/world.cjs.map +1 -0
- package/dist/maps/world.d.cts +2 -0
- package/dist/maps/world.d.ts +2 -0
- package/dist/maps/world.js +874 -0
- package/dist/maps/world.js.map +1 -0
- package/dist/{morph-9_LJL0ra.cjs → morph-3I1Nf_tR.cjs} +2 -2
- package/dist/{morph-9_LJL0ra.cjs.map → morph-3I1Nf_tR.cjs.map} +1 -1
- package/dist/{morph-DnRxuwR-.js → morph-GfBab-b3.js} +2 -2
- package/dist/{morph-DnRxuwR-.js.map → morph-GfBab-b3.js.map} +1 -1
- package/dist/morph.cjs +2 -2
- package/dist/morph.js +2 -2
- package/dist/{others-J7NCAMA0.js → others-DBIGE6jr.js} +11 -3
- package/dist/others-DBIGE6jr.js.map +1 -0
- package/dist/others-DBO4Kjwl.d.ts +29 -0
- package/dist/{others-DWdK7vKp.cjs → others-WfjCsjqT.cjs} +14 -6
- package/dist/others-WfjCsjqT.cjs.map +1 -0
- package/dist/others-ls5eKtZ4.d.cts +31 -0
- package/dist/{parliament-Cru4IcuM.js → parliament-BKN6ikBJ.js} +30 -29
- package/dist/parliament-BKN6ikBJ.js.map +1 -0
- package/dist/{parliament-CgsVnWEe.d.cts → parliament-C7V8UJj1.d.cts} +1 -1
- package/dist/{parliament-CLCI7tUO.d.ts → parliament-Cz9n_DoK.d.ts} +1 -1
- package/dist/{parliament-x5hcFaQ3.cjs → parliament-DhxAaIZ3.cjs} +30 -29
- package/dist/parliament-DhxAaIZ3.cjs.map +1 -0
- package/dist/parliament.cjs +1 -1
- package/dist/parliament.d.cts +1 -1
- package/dist/parliament.d.ts +1 -1
- package/dist/parliament.js +1 -1
- package/dist/{patterns-CufKZYhm.js → patterns-BMUINoka.js} +2 -2
- package/dist/{patterns-CufKZYhm.js.map → patterns-BMUINoka.js.map} +1 -1
- package/dist/{patterns-D3-wQagb.cjs → patterns-Dw7OMD_2.cjs} +2 -2
- package/dist/{patterns-D3-wQagb.cjs.map → patterns-Dw7OMD_2.cjs.map} +1 -1
- package/dist/patterns.cjs +2 -2
- package/dist/patterns.d.cts +1 -1
- package/dist/patterns.d.ts +1 -1
- package/dist/patterns.js +2 -2
- package/dist/{percentage-bar-ybNS3goo.cjs → percentage-bar-BChkTRoz.cjs} +37 -35
- package/dist/percentage-bar-BChkTRoz.cjs.map +1 -0
- package/dist/{percentage-bar-B6tNOqNn.js → percentage-bar-CaInxrL8.js} +37 -35
- package/dist/percentage-bar-CaInxrL8.js.map +1 -0
- package/dist/{percentage-bar-tepMr7Hd.d.cts → percentage-bar-R1--2grK.d.cts} +10 -14
- package/dist/{percentage-bar-nhTeakD_.d.ts → percentage-bar-cSeiLdwU.d.ts} +10 -14
- package/dist/percentage-bar.cjs +1 -1
- package/dist/percentage-bar.d.cts +1 -1
- package/dist/percentage-bar.d.ts +1 -1
- package/dist/percentage-bar.js +1 -1
- package/dist/{pie-CFptILSm.d.ts → pie-BQQkvy1N.d.ts} +7 -13
- package/dist/{pie-CVsc-6qD.js → pie-Bd8wyrtY.js} +45 -44
- package/dist/pie-Bd8wyrtY.js.map +1 -0
- package/dist/{pie-BpjvSPnz.cjs → pie-BseZlCgP.cjs} +45 -44
- package/dist/pie-BseZlCgP.cjs.map +1 -0
- package/dist/{pie-BXg2gNpb.d.cts → pie-vD5-g8je.d.cts} +7 -13
- package/dist/pie.cjs +1 -1
- package/dist/pie.d.cts +1 -1
- package/dist/pie.d.ts +1 -1
- package/dist/pie.js +1 -1
- package/dist/{point-shapes--_gmdTyK.cjs → point-shapes-BRawRM78.cjs} +23 -22
- package/dist/point-shapes-BRawRM78.cjs.map +1 -0
- package/dist/{point-shapes-DD2Ektzm.js → point-shapes-DI6GhcI7.js} +18 -23
- package/dist/point-shapes-DI6GhcI7.js.map +1 -0
- package/dist/point-shapes.cjs +6 -4
- package/dist/point-shapes.cjs.map +1 -1
- package/dist/point-shapes.d.cts +2 -2
- package/dist/point-shapes.d.ts +2 -2
- package/dist/point-shapes.js +7 -5
- package/dist/point-shapes.js.map +1 -1
- package/dist/{radar-D1-lItDy.d.cts → radar-7I6hsY_h.d.cts} +1 -1
- package/dist/{radar-BR-mumDd.js → radar-D6XqkFWQ.js} +21 -22
- package/dist/radar-D6XqkFWQ.js.map +1 -0
- package/dist/{radar-HPDrIdzc.cjs → radar-DjISDnSf.cjs} +22 -23
- package/dist/radar-DjISDnSf.cjs.map +1 -0
- package/dist/{radar-BC9Skgpj.d.ts → radar-vLxilcr4.d.ts} +1 -1
- package/dist/radar.cjs +1 -1
- package/dist/radar.d.cts +1 -1
- package/dist/radar.d.ts +1 -1
- package/dist/radar.js +1 -1
- package/dist/{rect-DSVmUZrD.js → rect-CZTNvMlf.js} +2 -2
- package/dist/{rect-DSVmUZrD.js.map → rect-CZTNvMlf.js.map} +1 -1
- package/dist/{rect-D6VhynBM.cjs → rect-DPr9QRxl.cjs} +2 -2
- package/dist/{rect-D6VhynBM.cjs.map → rect-DPr9QRxl.cjs.map} +1 -1
- package/dist/{sankey-fCoo1cpz.cjs → sankey-0CSp_Er9.cjs} +72 -71
- package/dist/sankey-0CSp_Er9.cjs.map +1 -0
- package/dist/{sankey-D_v7KxnJ.d.ts → sankey-7As41Fo4.d.ts} +1 -1
- package/dist/{sankey-D6JeZfK5.js → sankey-Dp4CuLVe.js} +72 -71
- package/dist/sankey-Dp4CuLVe.js.map +1 -0
- package/dist/{sankey-Dk7jUt8x.d.cts → sankey-DqiuxUx7.d.cts} +1 -1
- package/dist/sankey.cjs +1 -1
- package/dist/sankey.d.cts +1 -1
- package/dist/sankey.d.ts +1 -1
- package/dist/sankey.js +1 -1
- package/dist/{scatter-CXEsioOJ.d.ts → scatter-BXkXGgM_.d.ts} +7 -1
- package/dist/{scatter-DVqB_fP9.cjs → scatter-Bwkblr4L.cjs} +40 -38
- package/dist/scatter-Bwkblr4L.cjs.map +1 -0
- package/dist/{scatter-C0TWjFpW.js → scatter-DCMAtt5L.js} +38 -36
- package/dist/scatter-DCMAtt5L.js.map +1 -0
- package/dist/{scatter-DZeEIfyo.d.cts → scatter-DL0zAV09.d.cts} +7 -1
- package/dist/scatter.cjs +1 -1
- package/dist/scatter.d.cts +1 -1
- package/dist/scatter.d.ts +1 -1
- package/dist/scatter.js +1 -1
- package/dist/{sparkline-cbvRkWqS.d.ts → sparkline-BElUSd0r.d.ts} +1 -1
- package/dist/{sparkline-B39NA0Mi.cjs → sparkline-BMSuEPHP.cjs} +13 -15
- package/dist/sparkline-BMSuEPHP.cjs.map +1 -0
- package/dist/{sparkline-XO_TqCNP.js → sparkline-NDmq90kP.js} +13 -15
- package/dist/sparkline-NDmq90kP.js.map +1 -0
- package/dist/{sparkline-DAP6jtzw.d.cts → sparkline-RYly7bR0.d.cts} +1 -1
- package/dist/sparkline.cjs +1 -1
- package/dist/sparkline.d.cts +1 -1
- package/dist/sparkline.d.ts +1 -1
- package/dist/sparkline.js +1 -1
- package/dist/{stack-BgPzoQmv.cjs → stack-BO4624CY.cjs} +2 -2
- package/dist/{stack-BgPzoQmv.cjs.map → stack-BO4624CY.cjs.map} +1 -1
- package/dist/{stack-Dagxq7l2.d.cts → stack-BTWYIwLO.d.cts} +1 -1
- package/dist/{stack-2H2Gfs1Q.js → stack-jVKvg2x_.js} +2 -2
- package/dist/{stack-2H2Gfs1Q.js.map → stack-jVKvg2x_.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-axis-BjZ1bYTK.cjs → time-axis-B3VekUfX.cjs} +4 -3
- package/dist/{time-axis-BjZ1bYTK.cjs.map → time-axis-B3VekUfX.cjs.map} +1 -1
- package/dist/{time-axis-FLONo54E.js → time-axis-CLjqOakA.js} +3 -2
- package/dist/{time-axis-FLONo54E.js.map → time-axis-CLjqOakA.js.map} +1 -1
- package/dist/time.cjs +3 -3
- package/dist/time.js +3 -3
- package/dist/{treemap-BAkhmVQc.d.cts → treemap-25vHO_UK.d.cts} +12 -2
- package/dist/{treemap-BNpxFBao.d.ts → treemap-BCXUbixd.d.ts} +12 -2
- package/dist/{treemap-CQdavQ9u.js → treemap-C4glsx-g.js} +20 -25
- package/dist/treemap-C4glsx-g.js.map +1 -0
- package/dist/{treemap-BWpEUlDh.cjs → treemap-CZk8kKFD.cjs} +21 -26
- package/dist/treemap-CZk8kKFD.cjs.map +1 -0
- package/dist/treemap.cjs +1 -1
- package/dist/treemap.d.cts +1 -1
- package/dist/treemap.d.ts +1 -1
- package/dist/treemap.js +1 -1
- package/dist/{value-labels-BBuSi4i0.js → value-labels-C7GrhOXJ.js} +25 -5
- package/dist/value-labels-C7GrhOXJ.js.map +1 -0
- package/dist/{value-labels-BV9keAuL.cjs → value-labels-DzaKIWKp.cjs} +25 -5
- package/dist/value-labels-DzaKIWKp.cjs.map +1 -0
- package/dist/value-labels.cjs +2 -2
- package/dist/value-labels.d.cts +1 -1
- package/dist/value-labels.d.ts +1 -1
- package/dist/value-labels.js +2 -2
- package/package.json +93 -233
- package/dist/bar-BNZ3GhIw.js.map +0 -1
- package/dist/bar-Da6dE_nI.cjs.map +0 -1
- package/dist/cartesian-CI2x6N7N.js.map +0 -1
- package/dist/cartesian-DV02PsBe.cjs.map +0 -1
- package/dist/chart-DWn9v6qw.js.map +0 -1
- package/dist/chart-e2VqomCI.cjs.map +0 -1
- package/dist/core-BKRQvPAT.js.map +0 -1
- package/dist/core-DIOC61up.cjs.map +0 -1
- package/dist/dom-CuceR8gt.js.map +0 -1
- package/dist/dom-D_g13XWY.cjs.map +0 -1
- package/dist/export-chart-83UYH48t.js.map +0 -1
- package/dist/export-chart-mYgEfK-L.cjs.map +0 -1
- package/dist/fade-DVTkhrFU.cjs.map +0 -1
- package/dist/fade-GGxcBdss.js.map +0 -1
- package/dist/features-BMxkqCyS.js.map +0 -1
- package/dist/features-DCXEvoya.cjs.map +0 -1
- package/dist/gauge-DXkjXNCD.cjs.map +0 -1
- package/dist/gauge-ts0kqN1-.js.map +0 -1
- package/dist/heatmap-19BGJTKF.js.map +0 -1
- package/dist/heatmap-CXhlrLTl.cjs.map +0 -1
- package/dist/layout-DmrrLjwN.js.map +0 -1
- package/dist/layout-JY2aR-yE.cjs.map +0 -1
- package/dist/line-DO66LtwH.js.map +0 -1
- package/dist/line-Dbt6KFRK.cjs.map +0 -1
- package/dist/others-DWdK7vKp.cjs.map +0 -1
- package/dist/others-J7NCAMA0.js.map +0 -1
- package/dist/parliament-Cru4IcuM.js.map +0 -1
- package/dist/parliament-x5hcFaQ3.cjs.map +0 -1
- package/dist/percentage-bar-B6tNOqNn.js.map +0 -1
- package/dist/percentage-bar-ybNS3goo.cjs.map +0 -1
- package/dist/pie-BpjvSPnz.cjs.map +0 -1
- package/dist/pie-CVsc-6qD.js.map +0 -1
- package/dist/point-shapes--_gmdTyK.cjs.map +0 -1
- package/dist/point-shapes-DD2Ektzm.js.map +0 -1
- package/dist/radar-BR-mumDd.js.map +0 -1
- package/dist/radar-HPDrIdzc.cjs.map +0 -1
- package/dist/sankey-D6JeZfK5.js.map +0 -1
- package/dist/sankey-fCoo1cpz.cjs.map +0 -1
- package/dist/scatter-C0TWjFpW.js.map +0 -1
- package/dist/scatter-DVqB_fP9.cjs.map +0 -1
- package/dist/sparkline-B39NA0Mi.cjs.map +0 -1
- package/dist/sparkline-XO_TqCNP.js.map +0 -1
- package/dist/treemap-BWpEUlDh.cjs.map +0 -1
- package/dist/treemap-CQdavQ9u.js.map +0 -1
- package/dist/value-labels-BBuSi4i0.js.map +0 -1
- package/dist/value-labels-BV9keAuL.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_format = require("./format-CAE5ruy6.cjs");
|
|
2
|
-
const require_layout = require("./layout-
|
|
2
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
3
3
|
const require_arc = require("./arc-CYhI62kO.cjs");
|
|
4
4
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
5
5
|
const require_clean = require("./clean-Die2iCNc.cjs");
|
|
@@ -191,10 +191,9 @@ function renderParliament(options, ctx) {
|
|
|
191
191
|
},
|
|
192
192
|
items: [item],
|
|
193
193
|
seriesIndex: party.index,
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
y: 0
|
|
194
|
+
highlight: {
|
|
195
|
+
kind: "halo",
|
|
196
|
+
d
|
|
198
197
|
}
|
|
199
198
|
};
|
|
200
199
|
};
|
|
@@ -219,7 +218,6 @@ function renderParliament(options, ctx) {
|
|
|
219
218
|
return best ? hitFor(best.party, best.seat) : null;
|
|
220
219
|
}
|
|
221
220
|
};
|
|
222
|
-
ctx.onHitTest(interaction);
|
|
223
221
|
const circle = (seat, key, cls) => {
|
|
224
222
|
const [x, y] = at(seat);
|
|
225
223
|
return require_vnode.h("circle", {
|
|
@@ -231,28 +229,31 @@ function renderParliament(options, ctx) {
|
|
|
231
229
|
};
|
|
232
230
|
const groups = parties.map((party) => require_vnode.h("g", require_named.groupAttrs(party.data, party.index), seatsOf[party.position].map((seat, i) => circle(seat, i, "tc-seat"))));
|
|
233
231
|
const centerValue = showCenter ? center?.value ?? value(total) : "";
|
|
234
|
-
return
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
232
|
+
return {
|
|
233
|
+
content: [require_vnode.h("g", {
|
|
234
|
+
class: "tc-parliament",
|
|
235
|
+
style: `transform:translate(${require_layout.round(cx)}px,${require_layout.round(cy)}px)`
|
|
236
|
+
}, require_vnode.h("g", { class: "tc-parliament-seats" }, groups, vacant.length > 0 && require_vnode.h("g", {
|
|
237
|
+
key: "vacant",
|
|
238
|
+
class: "tc-parliament-vacant"
|
|
239
|
+
}, vacant.map((seat, i) => circle(seat, i, "tc-seat tc-seat-vacant"))))), showCenter && require_vnode.h("g", {
|
|
240
|
+
class: "tc-parliament-center",
|
|
241
|
+
"aria-hidden": "true"
|
|
242
|
+
}, centerLabel && require_vnode.h("text", {
|
|
243
|
+
class: "tc-parliament-label",
|
|
244
|
+
x: require_layout.round(cx),
|
|
245
|
+
y: require_layout.round(cy),
|
|
246
|
+
dy: open ? "-2.5em" : "1.6em",
|
|
247
|
+
"text-anchor": "middle"
|
|
248
|
+
}, centerLabel), require_vnode.h("text", {
|
|
249
|
+
class: "tc-parliament-value",
|
|
250
|
+
x: require_layout.round(cx),
|
|
251
|
+
y: require_layout.round(cy),
|
|
252
|
+
dy: open ? "-0.4em" : centerLabel ? "0" : "0.35em",
|
|
253
|
+
"text-anchor": "middle"
|
|
254
|
+
}, centerValue))],
|
|
255
|
+
interaction
|
|
256
|
+
};
|
|
256
257
|
}
|
|
257
258
|
function parliamentTable(options, ctx) {
|
|
258
259
|
const parties = partiesOf(options, ctx.hidden);
|
|
@@ -304,4 +305,4 @@ Object.defineProperty(exports, "parliament", {
|
|
|
304
305
|
}
|
|
305
306
|
});
|
|
306
307
|
|
|
307
|
-
//# sourceMappingURL=parliament-
|
|
308
|
+
//# sourceMappingURL=parliament-DhxAaIZ3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"parliament-DhxAaIZ3.cjs","names":["keyOf","innerRect","insets","DEG","round","formatNumber","getNumberFormat","h","groupAttrs","cleanData","records","named","finite","legendItems"],"sources":["../src/charts/parliament.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext, RenderResult } from '../chart.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { type InsetsInput, innerRect, insets, round } from '../layout.ts'\nimport { DEG } from '../shapes/arc.ts'\nimport { type ClassValue, h } from '../vnode.ts'\nimport { cleanData, finite, named, records } from './clean.ts'\nimport { groupAttrs, keyOf, legendItems } from './named.ts'\n\n/** One party (or group) of a parliament. */\nexport interface ParliamentParty {\n name: string\n /** Seats won; a fraction is rounded, a negative count is zero. */\n seats: number\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the party group. */\n class?: ClassValue\n /** Start hidden (toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface ParliamentOptions {\n /** Parties in their order along the benches, from the left. */\n data: readonly ParliamentParty[]\n /**\n * Seats in the house. Defaults to the parties' sum; more than that leaves\n * vacant seats, drawn empty after the last party.\n */\n total?: number\n /** Rows of seats. Defaults to the fewest rows that seat everyone comfortably. */\n rows?: number\n /** Where the benches start, in degrees clockwise from 12 o'clock. Defaults to `-angle / 2`. */\n startAngle?: number\n /** Degrees the benches span, `0…360`. Defaults to `180` (a hemicycle). */\n angle?: number\n /** Radius of the innermost row relative to the outermost, `0…0.95`. Defaults to `0.45`. */\n innerRadius?: number\n /** Space between seats as a share of their pitch, `0…0.9`. Defaults to `0.35`. */\n gap?: number\n /** Format of the seat counts (tooltip, table, center). */\n format?: NumberFormat\n /**\n * Text in the middle: the number of seats by default; `false` hides it, or\n * give your own `value` / `label` (the label sits above the value).\n */\n center?: false | { value?: string; label?: string }\n /** Extra space around the chart, in pixels. */\n padding?: InsetsInput\n}\n\n/** The most seats a house can have: enough for any parliament, few enough to draw. */\nconst MAX_SEATS = 5000\n\ninterface Party {\n data: ParliamentParty\n index: number\n seats: number\n /** Slot among the visible parties, from the left. */\n position: number\n}\n\n/** A seat in units of the outer radius, before the chart is placed. */\ninterface Seat {\n x: number\n y: number\n angle: number\n row: number\n}\n\ninterface Layout {\n seats: Seat[]\n /** Radius of a seat, in units of the outer radius. */\n dot: number\n /** Outline of the benches, in units of the outer radius. */\n box: { x0: number; y0: number; x1: number; y1: number }\n}\n\nfunction partiesOf(options: ParliamentOptions, hidden: ReadonlySet<string>): Party[] {\n return options.data\n .map((data, index) => ({\n data,\n index,\n seats: Math.min(MAX_SEATS, Math.max(0, Math.round(data.seats || 0))),\n }))\n .filter((party) => !hidden.has(keyOf(party.data)))\n .map((party, position) => ({ ...party, position }))\n}\n\n/** Seats of the house: the visible parties', and the vacant ones up to `total`. */\nfunction seatCounts(\n options: ParliamentOptions,\n parties: readonly Party[],\n): { taken: number; total: number } {\n const taken = Math.min(\n MAX_SEATS,\n parties.reduce((sum, party) => sum + party.seats, 0),\n )\n const wanted = Math.min(MAX_SEATS, Math.round(options.total ?? 0))\n // biome-ignore lint/complexity/useMathMinMax: the ternary also turns a NaN `total` into 0, Math.max would not\n return { taken, total: Math.max(taken, wanted > 0 ? wanted : 0) }\n}\n\n/** Seats per row, proportional to each row's length so the angular pitch is the same everywhere. */\nfunction distribute(total: number, radii: readonly number[]): number[] {\n const sum = radii.reduce((a, r) => a + r, 0)\n const counts = radii.map((r) => Math.floor((total * r) / sum))\n let left = total - counts.reduce((a, n) => a + n, 0)\n // The remainder goes to the rows that lost most in rounding, outer rows first.\n const order = radii\n .map((r, i) => ({ i, lost: (total * r) / sum - (counts[i] as number) }))\n .sort((a, b) => b.lost - a.lost || b.i - a.i)\n for (const { i } of order) {\n if (left <= 0) break\n counts[i] = (counts[i] as number) + 1\n left--\n }\n return counts\n}\n\n/**\n * The seats of `total` places on `rows` concentric arcs (the fewest rows\n * that fit when not given), sorted by angle so parties take contiguous\n * wedges, in units of the outer radius.\n */\nfunction layoutSeats(\n total: number,\n rows: number | undefined,\n start: number,\n span: number,\n inner: number,\n gap: number,\n): Layout {\n const box = { x0: 0, y0: 0, x1: 0, y1: 0 }\n if (total <= 0) return { seats: [], dot: 0, box }\n const depth = 1 - inner\n // On a closed ring the last seat would land on the first: one step less.\n const closed = span >= Math.PI * 2 - 1e-9\n const radiiOf = (n: number) =>\n Array.from({ length: n }, (_, i) => (n > 1 ? inner + (i * depth) / (n - 1) : 1))\n // Pitch between rows; a single row is as deep as the ring is.\n const pitchOf = (n: number) => (n > 1 ? depth / (n - 1) : depth)\n // How many seats `n` rows hold at the row pitch along each arc.\n const capacity = (n: number) => {\n const pitch = pitchOf(n)\n return radiiOf(n).reduce((sum, r) => sum + Math.floor((r * span) / pitch) + (closed ? 0 : 1), 0)\n }\n let n = rows && rows > 0 ? Math.min(Math.round(rows), total) : 1\n if (!rows) while (n < total && capacity(n) < total) n++\n const radii = radiiOf(n)\n const pitch = pitchOf(n)\n const counts = distribute(total, radii)\n const seats: Seat[] = []\n // Seats are as far apart as the tightest row's neighbors, or the rows.\n let spacing = n > 1 ? pitch : Number.POSITIVE_INFINITY\n radii.forEach((r, row) => {\n const count = counts[row] as number\n const step = count > 1 ? span / (closed ? count : count - 1) : 0\n if (count > 1) spacing = Math.min(spacing, r * step)\n for (let k = 0; k < count; k++) {\n const angle = count > 1 ? start + k * step : start + span / 2\n seats.push({ x: r * Math.sin(angle), y: -r * Math.cos(angle), angle, row })\n }\n })\n seats.sort((a, b) => a.angle - b.angle || a.row - b.row)\n const dot = (Number.isFinite(spacing) ? spacing : depth) * (1 - gap) * 0.5\n for (const seat of seats) {\n box.x0 = Math.min(box.x0, seat.x - dot)\n box.x1 = Math.max(box.x1, seat.x + dot)\n box.y0 = Math.min(box.y0, seat.y - dot)\n box.y1 = Math.max(box.y1, seat.y + dot)\n }\n return { seats, dot, box }\n}\n\nfunction renderParliament(options: ParliamentOptions, ctx: RenderContext): RenderResult {\n const { width, height, locale } = ctx\n const area = innerRect(width, height, insets(options.padding, 0))\n const span = Math.min(360, Math.max(0, options.angle ?? 180)) * DEG\n const start = (options.startAngle ?? -(span / DEG) / 2) * DEG\n const inner = Math.min(0.95, Math.max(0, options.innerRadius ?? 0.45))\n const gap = Math.min(0.9, Math.max(0, options.gap ?? 0.35))\n const parties = partiesOf(options, ctx.hidden)\n const { taken, total } = seatCounts(options, parties)\n const layout = layoutSeats(total, options.rows, start, span, inner, gap)\n\n // The text in the middle: inside the open side of a hemicycle, else around the center.\n const center = options.center\n const showCenter = center !== false\n const centerLabel = showCenter ? center?.label : undefined\n const open = span <= Math.PI + 1e-9 && Math.abs(start + span / 2) < 1e-9\n const em = ctx.fontSize\n // (The value is 1.75em tall; on the open side its label sits above it.)\n const textTop = showCenter ? (open ? -(centerLabel ? 3.4 : 2.1) * em : -1.4 * em) : 0\n const textBottom = showCenter ? (open ? 0 : (centerLabel ? 2 : 0.7) * em) : 0\n\n // Radius that fits the benches and the text: the text does not scale, so converge.\n let outer = Math.min(area.width, area.height) / 2\n let box = { x0: 0, y0: 0, x1: 0, y1: 0 }\n for (let i = 0; i < 4 && outer > 0; i++) {\n box = {\n x0: Math.min(layout.box.x0 * outer, 0),\n y0: Math.min(layout.box.y0 * outer, textTop),\n x1: Math.max(layout.box.x1 * outer, 0),\n y1: Math.max(layout.box.y1 * outer, textBottom),\n }\n const scale = Math.min(area.width / (box.x1 - box.x0), area.height / (box.y1 - box.y0))\n if (Math.abs(scale - 1) < 1e-3) break\n outer = Math.max(0, outer * scale)\n }\n const cx = area.x + (area.width - (box.x1 - box.x0)) / 2 - box.x0\n const cy = area.y + (area.height - (box.y1 - box.y0)) / 2 - box.y0\n const dot = round(layout.dot * outer)\n const at = (seat: Seat) => [cx + seat.x * outer, cy + seat.y * outer] as const\n\n // Parties take the seats in order from the left; the vacant ones come last.\n let next = 0\n const seatsOf = parties.map((party) => {\n const from = next\n next += party.seats\n return layout.seats.slice(from, next)\n })\n const vacant = layout.seats.slice(taken, total)\n const drawn = parties.filter((party) => party.seats > 0)\n\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n const hitFor = (party: Party, seat?: Seat): Hit => {\n const seats = seatsOf[party.position] as Seat[]\n let x = 0\n let y = 0\n if (seat) [x, y] = at(seat)\n else {\n for (const s of seats) {\n const [sx, sy] = at(s)\n x += sx / seats.length\n y += sy / seats.length\n }\n }\n const item: HitItem = {\n name: party.data.name,\n seriesIndex: party.index,\n value: party.seats,\n text: `${value(party.seats)} (${share.format(total > 0 ? party.seats / total : 0)})`,\n x,\n y,\n }\n if (party.data.color) item.color = party.data.color\n // A halo around every seat of the party.\n const r = dot + 3\n const d = seats\n .map((s) => {\n const [sx, sy] = at(s)\n return `M${round(sx + r)},${round(sy)}A${r},${r},0,1,1,${round(sx - r)},${round(sy)}A${r},${r},0,1,1,${round(sx + r)},${round(sy)}Z`\n })\n .join('')\n return {\n index: drawn.indexOf(party),\n label: party.data.name,\n title: '',\n x,\n area: { x: cx - outer, y: cy - outer, width: outer * 2, height: outer * 2 },\n items: [item],\n seriesIndex: party.index,\n highlight: { kind: 'halo', d },\n }\n }\n\n const interaction: Interaction = {\n count: drawn.length,\n hitIndex: (position) => {\n const party = drawn[position]\n return party ? hitFor(party) : null\n },\n hitTest(px, py) {\n const reach = dot + 2\n let best: { party: Party; seat: Seat; d: number } | undefined\n for (const party of drawn) {\n for (const seat of seatsOf[party.position] as Seat[]) {\n const [x, y] = at(seat)\n const d = Math.hypot(px - x, py - y)\n if (d <= reach && (!best || d < best.d)) best = { party, seat, d }\n }\n }\n return best ? hitFor(best.party, best.seat) : null\n },\n }\n\n const circle = (seat: Seat, key: number, cls: string) => {\n const [x, y] = at(seat)\n return h('circle', {\n key,\n class: cls,\n r: dot,\n style: `transform:translate(${round(x - cx)}px,${round(y - cy)}px)`,\n })\n }\n const groups = parties.map((party) =>\n h(\n 'g',\n groupAttrs(party.data, party.index),\n (seatsOf[party.position] as Seat[]).map((seat, i) => circle(seat, i, 'tc-seat')),\n ),\n )\n\n const centerValue = showCenter ? (center?.value ?? value(total)) : ''\n\n const content = [\n // Seats sit in their own group: the entrance animation transforms it, not the translated parent.\n h(\n 'g',\n { class: 'tc-parliament', style: `transform:translate(${round(cx)}px,${round(cy)}px)` },\n h(\n 'g',\n { class: 'tc-parliament-seats' },\n groups,\n vacant.length > 0 &&\n h(\n 'g',\n { key: 'vacant', class: 'tc-parliament-vacant' },\n vacant.map((seat, i) => circle(seat, i, 'tc-seat tc-seat-vacant')),\n ),\n ),\n ),\n showCenter &&\n h(\n 'g',\n { class: 'tc-parliament-center', 'aria-hidden': 'true' },\n centerLabel &&\n h(\n 'text',\n {\n class: 'tc-parliament-label',\n x: round(cx),\n y: round(cy),\n dy: open ? '-2.5em' : '1.6em',\n 'text-anchor': 'middle',\n },\n centerLabel,\n ),\n h(\n 'text',\n {\n class: 'tc-parliament-value',\n x: round(cx),\n y: round(cy),\n dy: open ? '-0.4em' : centerLabel ? '0' : '0.35em',\n 'text-anchor': 'middle',\n },\n centerValue,\n ),\n ),\n ]\n return { content, interaction }\n}\n\nfunction parliamentTable(options: ParliamentOptions, ctx: RenderContext): DataTable {\n const parties = partiesOf(options, ctx.hidden)\n const { total } = seatCounts(options, parties)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n return {\n columns: ['', 'Seats', 'Share'],\n rows: parties.map((party) => [\n party.data.name,\n value(party.seats),\n share.format(total > 0 ? party.seats / total : 0),\n ]),\n }\n}\n\n/**\n * Parliament chart: the seats of a house as dots on concentric benches, a\n * hemicycle by default, each party a wedge of them in data order from the\n * left, with the number of seats in the middle.\n *\n * ```ts\n * new Chart('#el', {\n * type: parliament,\n * data: [{ name: 'Left', seats: 135 }, { name: 'Right', seats: 57 }, { name: 'Other', seats: 7 }],\n * })\n * ```\n */\nexport const parliament: ChartType<ParliamentOptions> = {\n name: 'parliament',\n clean: cleanData((data) => records(data, (r) => ({ ...named(r), seats: finite(r.seats) ?? 0 }))),\n render: renderParliament,\n legend: (options) => legendItems(options.data),\n table: parliamentTable,\n}\n"],"mappings":";;;;;;;;AA0DA,MAAM,YAAY;AA0BlB,SAAS,UAAU,SAA4B,QAAsC;CACnF,OAAO,QAAQ,KACZ,KAAK,MAAM,WAAW;EACrB;EACA;EACA,OAAO,KAAK,IAAI,WAAW,KAAK,IAAI,GAAG,KAAK,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC;CACrE,EAAE,CAAC,CACF,QAAQ,UAAU,CAAC,OAAO,IAAIA,cAAAA,MAAM,MAAM,IAAI,CAAC,CAAC,CAAC,CACjD,KAAK,OAAO,cAAc;EAAE,GAAG;EAAO;CAAS,EAAE;AACtD;;AAGA,SAAS,WACP,SACA,SACkC;CAClC,MAAM,QAAQ,KAAK,IACjB,WACA,QAAQ,QAAQ,KAAK,UAAU,MAAM,MAAM,OAAO,CAAC,CACrD;CACA,MAAM,SAAS,KAAK,IAAI,WAAW,KAAK,MAAM,QAAQ,SAAS,CAAC,CAAC;CAEjE,OAAO;EAAE;EAAO,OAAO,KAAK,IAAI,OAAO,SAAS,IAAI,SAAS,CAAC;CAAE;AAClE;;AAGA,SAAS,WAAW,OAAe,OAAoC;CACrE,MAAM,MAAM,MAAM,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC;CAC3C,MAAM,SAAS,MAAM,KAAK,MAAM,KAAK,MAAO,QAAQ,IAAK,GAAG,CAAC;CAC7D,IAAI,OAAO,QAAQ,OAAO,QAAQ,GAAG,MAAM,IAAI,GAAG,CAAC;CAEnD,MAAM,QAAQ,MACX,KAAK,GAAG,OAAO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U,UAAU,SAAS,IAAI,MAAM;CAC7C,MAAM,EAAE,UAAU,WAAW,SAAS,OAAO;CAC7C,MAAM,QAAQC,eAAAA,aAAa,QAAQ,QAAQ,IAAI,MAAM;CACrD,MAAM,QAAQC,eAAAA,gBAAgB,IAAI,QAAQ;EAAE,OAAO;EAAW,uBAAuB;CAAE,CAAC;CACxF,OAAO;EACL,SAAS;GAAC;GAAI;GAAS;EAAO;EAC9B,MAAM,QAAQ,KAAK,UAAU;GAC3B,MAAM,KAAK;GACX,MAAM,MAAM,KAAK;GACjB,MAAM,OAAO,QAAQ,IAAI,MAAM,QAAQ,QAAQ,CAAC;EAClD,CAAC;CACH;AACF;;;;;;;;;;;;;AAcA,MAAa,aAA2C;CACtD,MAAM;CACN,OAAOG,cAAAA,WAAW,SAASC,cAAAA,QAAQ,OAAO,OAAO;EAAE,GAAGC,cAAAA,MAAM,CAAC;EAAG,OAAOC,cAAAA,OAAO,EAAE,KAAK,KAAK;CAAE,EAAE,CAAC;CAC/F,QAAQ;CACR,SAAS,YAAYC,cAAAA,YAAY,QAAQ,IAAI;CAC7C,OAAO;AACT"}
|
package/dist/parliament.cjs
CHANGED
package/dist/parliament.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Standalone entry: `import { parliament } from '@tabler/charts/parliament'`. */
|
|
2
|
-
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-
|
|
2
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-C7V8UJj1.cjs";
|
|
3
3
|
export { type ParliamentOptions, type ParliamentParty, parliament };
|
package/dist/parliament.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/** Standalone entry: `import { parliament } from '@tabler/charts/parliament'`. */
|
|
2
|
-
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-
|
|
2
|
+
import { n as ParliamentParty, r as parliament, t as ParliamentOptions } from "./parliament-Cz9n_DoK.js";
|
|
3
3
|
export { type ParliamentOptions, type ParliamentParty, parliament };
|
package/dist/parliament.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as parliament } from "./parliament-
|
|
1
|
+
export { t as parliament } from "./parliament-BKN6ikBJ.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { l as resolveLegend } from "./chart-B6TTY4Kr.js";
|
|
2
2
|
import { t as h } from "./vnode-_EMUqysL.js";
|
|
3
3
|
// src/charts/patterns.ts
|
|
4
4
|
/**
|
|
@@ -81,4 +81,4 @@ function patternFills(config, id) {
|
|
|
81
81
|
}
|
|
82
82
|
export { patternFills as n, patternVars as r, patternDefs as t };
|
|
83
83
|
|
|
84
|
-
//# sourceMappingURL=patterns-
|
|
84
|
+
//# sourceMappingURL=patterns-BMUINoka.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns-
|
|
1
|
+
{"version":3,"file":"patterns-BMUINoka.js","names":[],"sources":["../src/charts/patterns.ts"],"sourcesContent":["/**\n * Pattern fills, so series do not depend on color alone (color vision\n * deficiency, grayscale print, forced colors). Every legend entry gets an\n * 8×8 tile: its series color with lines or dots in `--tc-pattern-color` (the\n * surface by default) over it, one shape per color slot. The chart root\n * carries `--tc-pattern-{n}: url(#…)` and the slot classes map it to\n * `--tc-series-pattern`, which the stylesheet uses as the fill of bars,\n * areas, slices, rings and bubbles (lines get dashes instead) when\n * `patterns` is `true`, or with `'auto'` (the default) in forced colors.\n */\nimport { type ChartConfig, resolveLegend } from '../chart.ts'\nimport type { LegendItem } from '../legend.ts'\nimport { h, type VNode } from '../vnode.ts'\n\n/** Tile shapes by color slot: lines as strokes, dots as round-capped stubs. */\nconst TILES = [\n // Diagonal /, with the corners filled in so tiles join up.\n 'M-2,2L2,-2M0,8L8,0M6,10L10,6',\n // Dots.\n 'M2,2h.01M6,6h.01',\n // Diagonal \.\n 'M-2,6L2,10M0,0L8,8M6,-2L10,2',\n // Horizontal.\n 'M0,4H8',\n // Cross-hatch.\n 'M0,8L8,0M0,0L8,8',\n // Vertical.\n 'M4,0V8',\n // Grid.\n 'M0,4H8M4,0V8',\n // Dashes.\n 'M1,2H4M5,6H8',\n]\n\n/** Slots with a pattern of their own; series 9+ share the one of the \"other\" color. */\nconst SLOTS = TILES.length\n\n/** The pattern of a slot (0-based): its id suffix and slot class. */\nconst slot = (index: number): [string, string] =>\n index < SLOTS ? [`${index + 1}`, `tc-series-${index + 1}`] : ['other', '']\n\n/** `<pattern>` elements for the legend entries of a chart. */\nexport function patternDefs(items: readonly LegendItem[], id: string): VNode[] {\n const out = new Map<string, VNode>()\n for (const item of items) {\n const [n, cls] = slot(item.index)\n if (out.has(n)) continue\n out.set(\n n,\n h(\n 'pattern',\n {\n key: n,\n id: `${id}-pattern-${n}`,\n class: ['tc-pattern', 'tc-series', cls],\n width: 8,\n height: 8,\n patternUnits: 'userSpaceOnUse',\n // A map, so a color from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': item.color },\n },\n h('rect', { class: 'tc-pattern-bg', width: 8, height: 8 }),\n h('path', { class: 'tc-pattern-ink', d: TILES[item.index % SLOTS] as string }),\n ),\n )\n }\n return [...out.values()]\n}\n\n/** The `--tc-pattern-{n}` references for the chart root. */\nexport function patternVars(items: readonly LegendItem[], id: string): Record<string, string> {\n const vars: Record<string, string> = {}\n for (const item of items) {\n const [n] = slot(item.index)\n vars[`--tc-pattern-${n}`] = `url(#${id}-pattern-${n})`\n }\n return vars\n}\n\n/**\n * The pattern fills of a chart: its root class (`tc-patterned` with\n * `patterns: true`, `tc-patterns-auto` for forced colors), the root's\n * `--tc-pattern-{n}` references and the `<defs>` with the patterns;\n * `undefined` for a chart without legend entries.\n */\nexport function patternFills(\n config: ChartConfig<object>,\n id: string,\n): [string, Record<string, string>, VNode] | undefined {\n const { items } = resolveLegend(config)\n if (!items.length) return undefined\n return [\n config.patterns === true ? 'tc-patterned' : 'tc-patterns-auto',\n patternVars(items, id),\n h('defs',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YAAY,OAAO,EAAE;EACrB,EAAE,QAAQ,EAAE,KAAK,WAAW,GAAG,YAAY,OAAO,EAAE,CAAC;CACvD;AACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const require_chart = require("./chart-
|
|
1
|
+
const require_chart = require("./chart-D_lyOy-M.cjs");
|
|
2
2
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
3
3
|
// src/charts/patterns.ts
|
|
4
4
|
/**
|
|
@@ -98,4 +98,4 @@ Object.defineProperty(exports, "patternVars", {
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
//# sourceMappingURL=patterns-
|
|
101
|
+
//# sourceMappingURL=patterns-Dw7OMD_2.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patterns-
|
|
1
|
+
{"version":3,"file":"patterns-Dw7OMD_2.cjs","names":["h","resolveLegend"],"sources":["../src/charts/patterns.ts"],"sourcesContent":["/**\n * Pattern fills, so series do not depend on color alone (color vision\n * deficiency, grayscale print, forced colors). Every legend entry gets an\n * 8×8 tile: its series color with lines or dots in `--tc-pattern-color` (the\n * surface by default) over it, one shape per color slot. The chart root\n * carries `--tc-pattern-{n}: url(#…)` and the slot classes map it to\n * `--tc-series-pattern`, which the stylesheet uses as the fill of bars,\n * areas, slices, rings and bubbles (lines get dashes instead) when\n * `patterns` is `true`, or with `'auto'` (the default) in forced colors.\n */\nimport { type ChartConfig, resolveLegend } from '../chart.ts'\nimport type { LegendItem } from '../legend.ts'\nimport { h, type VNode } from '../vnode.ts'\n\n/** Tile shapes by color slot: lines as strokes, dots as round-capped stubs. */\nconst TILES = [\n // Diagonal /, with the corners filled in so tiles join up.\n 'M-2,2L2,-2M0,8L8,0M6,10L10,6',\n // Dots.\n 'M2,2h.01M6,6h.01',\n // Diagonal \.\n 'M-2,6L2,10M0,0L8,8M6,-2L10,2',\n // Horizontal.\n 'M0,4H8',\n // Cross-hatch.\n 'M0,8L8,0M0,0L8,8',\n // Vertical.\n 'M4,0V8',\n // Grid.\n 'M0,4H8M4,0V8',\n // Dashes.\n 'M1,2H4M5,6H8',\n]\n\n/** Slots with a pattern of their own; series 9+ share the one of the \"other\" color. */\nconst SLOTS = TILES.length\n\n/** The pattern of a slot (0-based): its id suffix and slot class. */\nconst slot = (index: number): [string, string] =>\n index < SLOTS ? [`${index + 1}`, `tc-series-${index + 1}`] : ['other', '']\n\n/** `<pattern>` elements for the legend entries of a chart. */\nexport function patternDefs(items: readonly LegendItem[], id: string): VNode[] {\n const out = new Map<string, VNode>()\n for (const item of items) {\n const [n, cls] = slot(item.index)\n if (out.has(n)) continue\n out.set(\n n,\n h(\n 'pattern',\n {\n key: n,\n id: `${id}-pattern-${n}`,\n class: ['tc-pattern', 'tc-series', cls],\n width: 8,\n height: 8,\n patternUnits: 'userSpaceOnUse',\n // A map, so a color from data cannot inject CSS (see normalizeStyle).\n style: { '--tc-series-color': item.color },\n },\n h('rect', { class: 'tc-pattern-bg', width: 8, height: 8 }),\n h('path', { class: 'tc-pattern-ink', d: TILES[item.index % SLOTS] as string }),\n ),\n )\n }\n return [...out.values()]\n}\n\n/** The `--tc-pattern-{n}` references for the chart root. */\nexport function patternVars(items: readonly LegendItem[], id: string): Record<string, string> {\n const vars: Record<string, string> = {}\n for (const item of items) {\n const [n] = slot(item.index)\n vars[`--tc-pattern-${n}`] = `url(#${id}-pattern-${n})`\n }\n return vars\n}\n\n/**\n * The pattern fills of a chart: its root class (`tc-patterned` with\n * `patterns: true`, `tc-patterns-auto` for forced colors), the root's\n * `--tc-pattern-{n}` references and the `<defs>` with the patterns;\n * `undefined` for a chart without legend entries.\n */\nexport function patternFills(\n config: ChartConfig<object>,\n id: string,\n): [string, Record<string, string>, VNode] | undefined {\n const { items } = resolveLegend(config)\n if (!items.length) return undefined\n return [\n config.patterns === true ? 'tc-patterned' : 'tc-patterns-auto',\n patternVars(items, id),\n h('defs', { key: 'patterns' }, patternDefs(items, id)),\n ]\n}\n"],"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AAO,EAAE;EACrBD,cAAAA,EAAE,QAAQ,EAAE,KAAK,WAAW,GAAG,YAAY,OAAO,EAAE,CAAC;CACvD;AACF"}
|
package/dist/patterns.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_patterns = require("./patterns-
|
|
2
|
+
const require_patterns = require("./patterns-Dw7OMD_2.cjs");
|
|
3
3
|
// src/patterns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Standalone entry: `import '@tabler/charts/patterns'` enables pattern fills
|
|
6
6
|
* (`patterns: true`, and in forced colors by default) on the core.
|
|
7
7
|
*/
|
|
8
|
-
require("./features-
|
|
8
|
+
require("./features-DEDP5CEQ.cjs").register({ patterns: require_patterns.patternFills });
|
|
9
9
|
exports.patternDefs = require_patterns.patternDefs;
|
|
10
10
|
exports.patternFills = require_patterns.patternFills;
|
|
11
11
|
exports.patternVars = require_patterns.patternVars;
|
package/dist/patterns.d.cts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Standalone entry: `import '@tabler/charts/patterns'` enables pattern fills
|
|
3
3
|
* (`patterns: true`, and in forced colors by default) on the core.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { it as patternVars, nt as patternDefs, rt as patternFills } from "./chart-CbPzP5Dp.cjs";
|
|
6
6
|
export { patternDefs, patternFills, patternVars };
|
package/dist/patterns.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Standalone entry: `import '@tabler/charts/patterns'` enables pattern fills
|
|
3
3
|
* (`patterns: true`, and in forced colors by default) on the core.
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { $ as patternFills, Q as patternDefs, et as patternVars } from "./chart-CYrrUCi3.js";
|
|
6
6
|
export { patternDefs, patternFills, patternVars };
|
package/dist/patterns.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as patternFills, r as patternVars, t as patternDefs } from "./patterns-
|
|
2
|
-
import { i as register } from "./features-
|
|
1
|
+
import { n as patternFills, r as patternVars, t as patternDefs } from "./patterns-BMUINoka.js";
|
|
2
|
+
import { i as register } from "./features-B55rwpQC.js";
|
|
3
3
|
// src/patterns.ts
|
|
4
4
|
/**
|
|
5
5
|
* Standalone entry: `import '@tabler/charts/patterns'` enables pattern fills
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
const require_format = require("./format-CAE5ruy6.cjs");
|
|
2
|
-
const require_layout = require("./layout-
|
|
2
|
+
const require_layout = require("./layout-Cfg9x1k2.cjs");
|
|
3
3
|
const require_vnode = require("./vnode-ClAiw28x.cjs");
|
|
4
4
|
const require_clean = require("./clean-Die2iCNc.cjs");
|
|
5
5
|
const require_named = require("./named-BBASc8dW.cjs");
|
|
6
|
-
const require_others = require("./others-
|
|
6
|
+
const require_others = require("./others-WfjCsjqT.cjs");
|
|
7
7
|
// src/charts/percentage-bar.ts
|
|
8
8
|
/** Height of the chart when neither `height` nor `aspectRatio` is set: a strip. */
|
|
9
9
|
const HEIGHT = 16;
|
|
10
|
-
/** The segments of the data: nine at most by default, the one for the rest included. */
|
|
11
|
-
const group = (options) => require_others.groupSlices(options.data, options.maxSlices, options.othersLabel);
|
|
12
10
|
/** The visible segments in their order along the bar, and their sum. */
|
|
13
11
|
function segmentsOf(options, hidden) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
if (options.order === "size") segments.sort((a, b) => Number(a.index >= count) - Number(b.index >= count) || b.value - a.value || a.index - b.index);
|
|
12
|
+
const segments = options.slices.filter((segment) => !hidden.has(require_named.keyOf(segment.data)));
|
|
13
|
+
if (options.order === "size") segments.sort((a, b) => Number(!!a.others) - Number(!!b.others) || b.value - a.value || a.index - b.index);
|
|
17
14
|
return {
|
|
18
15
|
segments,
|
|
19
16
|
total: segments.reduce((sum, segment) => sum + segment.value, 0)
|
|
@@ -31,10 +28,12 @@ function renderPercentageBar(options, ctx) {
|
|
|
31
28
|
const length = segment.value / total * area.width;
|
|
32
29
|
const left = position === 0 ? 0 : gap / 2;
|
|
33
30
|
const right = position === drawn.length - 1 ? 0 : gap / 2;
|
|
31
|
+
const boxWidth = Math.max(0, length - left - right);
|
|
32
|
+
const start = offset + left;
|
|
34
33
|
const box = {
|
|
35
|
-
x:
|
|
34
|
+
x: ctx.rtl ? area.x * 2 + area.width - start - boxWidth : start,
|
|
36
35
|
y: area.y,
|
|
37
|
-
width:
|
|
36
|
+
width: boxWidth,
|
|
38
37
|
height: area.height
|
|
39
38
|
};
|
|
40
39
|
offset += length;
|
|
@@ -68,15 +67,15 @@ function renderPercentageBar(options, ctx) {
|
|
|
68
67
|
area,
|
|
69
68
|
items: [item],
|
|
70
69
|
seriesIndex: segment.index,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
y: 0
|
|
70
|
+
highlight: {
|
|
71
|
+
kind: "halo",
|
|
72
|
+
d: `M${n(box.x + 1)},${n(box.y + 1)}h${n(box.width - 2)}v${n(box.height - 2)}h${n(2 - box.width)}Z`
|
|
75
73
|
}
|
|
76
74
|
};
|
|
77
75
|
};
|
|
78
76
|
const interaction = {
|
|
79
77
|
count: drawn.length,
|
|
78
|
+
reversed: ctx.rtl === true,
|
|
80
79
|
hitIndex: (position) => drawn[position] ? hitFor(position) : null,
|
|
81
80
|
hitTest(px, py) {
|
|
82
81
|
if (py < area.y || py > area.y + area.height) return null;
|
|
@@ -84,26 +83,28 @@ function renderPercentageBar(options, ctx) {
|
|
|
84
83
|
return position < 0 ? null : hitFor(position);
|
|
85
84
|
}
|
|
86
85
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
return {
|
|
87
|
+
content: require_vnode.h("g", { class: "tc-percentage-bar" }, drawn.length === 0 && require_vnode.h("rect", {
|
|
88
|
+
key: "track",
|
|
89
|
+
class: "tc-percentage-bar-track",
|
|
90
|
+
x: require_layout.round(area.x),
|
|
91
|
+
y: require_layout.round(area.y),
|
|
92
|
+
width: require_layout.round(area.width),
|
|
93
|
+
height: require_layout.round(area.height),
|
|
94
|
+
rx: require_layout.round(Math.min(radius, area.width / 2, area.height / 2))
|
|
95
|
+
}), segments.map((segment) => {
|
|
96
|
+
const box = boxes[drawn.indexOf(segment)];
|
|
97
|
+
return require_vnode.h("g", require_named.groupAttrs(segment.data, segment.index), box && require_vnode.h("rect", {
|
|
98
|
+
class: "tc-segment",
|
|
99
|
+
x: require_layout.round(box.x),
|
|
100
|
+
y: require_layout.round(box.y),
|
|
101
|
+
width: require_layout.round(box.width),
|
|
102
|
+
height: require_layout.round(box.height),
|
|
103
|
+
rx: require_layout.round(Math.min(radius, box.width / 2, box.height / 2))
|
|
104
|
+
}));
|
|
105
|
+
})),
|
|
106
|
+
interaction
|
|
107
|
+
};
|
|
107
108
|
}
|
|
108
109
|
function percentageBarTable(options, ctx) {
|
|
109
110
|
const { segments, total } = segmentsOf(options, ctx.hidden);
|
|
@@ -147,8 +148,9 @@ const percentageBar = {
|
|
|
147
148
|
height: config.height ?? (config.aspectRatio ? void 0 : HEIGHT)
|
|
148
149
|
};
|
|
149
150
|
},
|
|
151
|
+
prepare: require_others.withSlices,
|
|
150
152
|
render: renderPercentageBar,
|
|
151
|
-
legend:
|
|
153
|
+
legend: require_others.slicesLegend,
|
|
152
154
|
table: percentageBarTable,
|
|
153
155
|
valueLabels: { marks: "cell" }
|
|
154
156
|
};
|
|
@@ -159,4 +161,4 @@ Object.defineProperty(exports, "percentageBar", {
|
|
|
159
161
|
}
|
|
160
162
|
});
|
|
161
163
|
|
|
162
|
-
//# sourceMappingURL=percentage-bar-
|
|
164
|
+
//# sourceMappingURL=percentage-bar-BChkTRoz.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"percentage-bar-BChkTRoz.cjs","names":["keyOf","innerRect","insets","formatNumber","getNumberFormat","round","h","groupAttrs","cleanItems","withSlices","slicesLegend"],"sources":["../src/charts/percentage-bar.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext, RenderResult, TableContext } from '../chart.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { type InsetsInput, innerRect, insets, round } from '../layout.ts'\nimport { type ClassValue, h } from '../vnode.ts'\nimport { cleanItems } from './clean.ts'\nimport { groupAttrs, keyOf } from './named.ts'\nimport {\n type Grouped,\n type SliceGrouping,\n slicesLegend,\n type WithSlices,\n withSlices,\n} from './others.ts'\n\n/** One segment of a percentage bar. */\nexport interface PercentageBarSegment {\n name: string\n /** Non-negative value; negative values count as zero. */\n value: number\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the segment group. */\n class?: ClassValue\n /** Start hidden (toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface PercentageBarOptions extends SliceGrouping {\n data: readonly PercentageBarSegment[]\n /**\n * Order of the segments along the bar: as in the data (`'data'`, the\n * default) or the largest first (`'size'`). Colors follow the data either\n * way, and Others always comes last.\n */\n order?: 'data' | 'size'\n /** Space between segments in pixels, drawn as surface. Defaults to `2`. */\n gap?: number\n /** Corner radius of the segments. Defaults to `4`. */\n radius?: number\n /** Format of the values (tooltip, table). */\n format?: NumberFormat\n /** Extra space around the bar, in pixels. */\n padding?: InsetsInput\n}\n\n/** Height of the chart when neither `height` nor `aspectRatio` is set: a strip. */\nconst HEIGHT = 16\n\ntype Segment = Grouped<PercentageBarSegment>\n\n/**\n * The chart model of a percentage bar: its options, with the segments of the\n * data (nine at most by default, the one for the rest included).\n */\nexport type PercentageBarModel = WithSlices<PercentageBarOptions>\n\n/** The visible segments in their order along the bar, and their sum. */\nfunction segmentsOf(\n options: PercentageBarModel,\n hidden: ReadonlySet<string>,\n): { segments: Segment[]; total: number } {\n const segments = options.slices.filter((segment) => !hidden.has(keyOf(segment.data)))\n if (options.order === 'size') {\n // (Others stays last, whatever its size.)\n segments.sort(\n (a, b) => Number(!!a.others) - Number(!!b.others) || b.value - a.value || a.index - b.index,\n )\n }\n return { segments, total: segments.reduce((sum, segment) => sum + segment.value, 0) }\n}\n\nfunction renderPercentageBar(options: PercentageBarModel, ctx: RenderContext): RenderResult {\n const { width, height, locale } = ctx\n const gap = Math.max(0, options.gap ?? 2)\n const radius = Math.max(0, options.radius ?? 4)\n const area = innerRect(width, height, insets(options.padding, 0))\n const { segments, total } = segmentsOf(options, ctx.hidden)\n const drawn = segments.filter((segment) => segment.value > 0)\n\n // Every segment gives up half a gap on each side but the ends of the bar.\n let offset = area.x\n const boxes = drawn.map((segment, position) => {\n const length = (segment.value / total) * area.width\n const left = position === 0 ? 0 : gap / 2\n const right = position === drawn.length - 1 ? 0 : gap / 2\n const boxWidth = Math.max(0, length - left - right)\n const start = offset + left\n const box = {\n // Right to left, the bar starts from the right: every segment takes its mirror place.\n x: ctx.rtl ? area.x * 2 + area.width - start - boxWidth : start,\n y: area.y,\n width: boxWidth,\n height: area.height,\n }\n offset += length\n return box\n })\n\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n const hitFor = (position: number): Hit => {\n const segment = drawn[position] as Segment\n const box = boxes[position] as (typeof boxes)[number]\n const x = box.x + box.width / 2\n const item: HitItem = {\n name: segment.data.name,\n seriesIndex: segment.index,\n value: segment.value,\n text: `${value(segment.value)} (${share.format(segment.value / total)})`,\n x,\n y: box.y + box.height / 2,\n box,\n }\n if (segment.data.color) item.color = segment.data.color\n const n = round\n return {\n index: position,\n label: segment.data.name,\n title: '',\n x,\n area,\n items: [item],\n seriesIndex: segment.index,\n // A ring just inside the hovered segment.\n highlight: {\n kind: 'halo',\n d: `M${n(box.x + 1)},${n(box.y + 1)}h${n(box.width - 2)}v${n(box.height - 2)}h${n(2 - box.width)}Z`,\n },\n }\n }\n\n const interaction: Interaction = {\n count: drawn.length,\n reversed: ctx.rtl === true,\n hitIndex: (position) => (drawn[position] ? hitFor(position) : null),\n hitTest(px, py) {\n if (py < area.y || py > area.y + area.height) return null\n const position = boxes.findIndex(\n (box) => px >= box.x - gap / 2 && px <= box.x + box.width + gap / 2,\n )\n return position < 0 ? null : hitFor(position)\n },\n }\n\n const content = h(\n 'g',\n { class: 'tc-percentage-bar' },\n // Empty: the track alone, so the chart keeps its place.\n drawn.length === 0 &&\n h('rect', {\n key: 'track',\n class: 'tc-percentage-bar-track',\n x: round(area.x),\n y: round(area.y),\n width: round(area.width),\n height: round(area.height),\n rx: round(Math.min(radius, area.width / 2, area.height / 2)),\n }),\n segments.map((segment) => {\n const box = boxes[drawn.indexOf(segment)]\n return h(\n 'g',\n groupAttrs(segment.data, segment.index),\n box &&\n h('rect', {\n class: 'tc-segment',\n x: round(box.x),\n y: round(box.y),\n width: round(box.width),\n height: round(box.height),\n rx: round(Math.min(radius, box.width / 2, box.height / 2)),\n }),\n )\n }),\n )\n return { content, interaction }\n}\n\nfunction percentageBarTable(options: PercentageBarModel, ctx: TableContext): DataTable {\n const { segments, total } = segmentsOf(options, ctx.hidden)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n return {\n columns: ['', 'Value', 'Share'],\n rows: segments.map((segment) => [\n segment.data.name,\n value(segment.value),\n share.format(total > 0 ? segment.value / total : 0),\n ]),\n }\n}\n\n/**\n * Percentage bar: parts of a whole as segments of one horizontal bar, each as\n * wide as its share (a donut's ring unrolled, for a strip under a number).\n * The chart is a strip 16 pixels tall unless `height` or `aspectRatio` is set.\n *\n * ```ts\n * new Chart('#el', {\n * type: percentageBar,\n * data: [{ name: 'Paid', value: 62 }, { name: 'Open', value: 27 }, { name: 'Overdue', value: 11 }],\n * })\n * ```\n */\nexport const percentageBar: ChartType<PercentageBarOptions, PercentageBarModel> = {\n name: 'percentage-bar',\n // (The options come with the whole config: its size is defaulted here.)\n clean: (options) => {\n const config = options as PercentageBarOptions & { height?: unknown; aspectRatio?: unknown }\n return {\n ...config,\n data: cleanItems(config.data),\n height: config.height ?? (config.aspectRatio ? undefined : HEIGHT),\n }\n },\n prepare: withSlices,\n render: renderPercentageBar,\n legend: slicesLegend,\n table: percentageBarTable,\n valueLabels: { marks: 'cell' },\n}\n"],"mappings":";;;;;;;;AAqDA,MAAM,SAAS;;AAWf,SAAS,WACP,SACA,QACwC;CACxC,MAAM,WAAW,QAAQ,OAAO,QAAQ,YAAY,CAAC,OAAO,IAAIA,cAAAA,MAAM,QAAQ,IAAI,CAAC,CAAC;CACpF,IAAI,QAAQ,UAAU,QAEpB,SAAS,MACN,GAAG,MAAM,OAAO,CAAC,CAAC,EAAE,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,MAAM,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,KACxF;CAEF,OAAO;EAAE;EAAU,OAAO,SAAS,QAAQ,KAAK,YAAY,MAAM,QAAQ,OAAO,CAAC;CAAE;AACtF;AAEA,SAAS,oBAAoB,SAA6B,KAAkC;CAC1F,MAAM,EAAE,OAAO,QAAQ,WAAW;CAClC,MAAM,MAAM,KAAK,IAAI,GAAG,QAAQ,OAAO,CAAC;CACxC,MAAM,SAAS,KAAK,IAAI,GAAG,QAAQ,UAAU,CAAC;CAC9C,MAAM,OAAOC,eAAAA,UAAU,OAAO,QAAQC,eAAAA,OAAO,QAAQ,SAAS,CAAC,CAAC;CAChE,MAAM,EAAE,UAAU,UAAU,WAAW,SAAS,IAAI,MAAM;CAC1D,M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AAQA,eAAAA,MAAM,IAAI,MAAM;IACxB,IAAIA,eAAAA,MAAM,KAAK,IAAI,QAAQ,IAAI,QAAQ,GAAG,IAAI,SAAS,CAAC,CAAC;GAC3D,CAAC,CACL;EACF,CAAC,CAEY;EAAG;CAAY;AAChC;AAEA,SAAS,mBAAmB,SAA6B,KAA8B;CACrF,MAAM,EAAE,UAAU,UAAU,WAAW,SAAS,IAAI,MAAM;CAC1D,MAAM,QAAQF,eAAAA,aAAa,QAAQ,QAAQ,IAAI,MAAM;CACrD,MAAM,QAAQC,eAAAA,gBAAgB,IAAI,QAAQ;EAAE,OAAO;EAAW,uBAAuB;CAAE,CAAC;CACxF,OAAO;EACL,SAAS;GAAC;GAAI;GAAS;EAAO;EAC9B,MAAM,SAAS,KAAK,YAAY;GAC9B,QAAQ,KAAK;GACb,MAAM,QAAQ,KAAK;GACnB,MAAM,OAAO,QAAQ,IAAI,QAAQ,QAAQ,QAAQ,CAAC;EACpD,CAAC;CACH;AACF;;;;;;;;;;;;;AAcA,MAAa,gBAAqE;CAChF,MAAM;CAEN,QAAQ,YAAY;EAClB,MAAM,SAAS;EACf,OAAO;GACL,GAAG;GACH,MAAMI,cAAAA,WAAW,OAAO,IAAI;GAC5B,QAAQ,OAAO,WAAW,OAAO,cAAc,KAAA,IAAY;EAC7D;CACF;CACA,SAASC,eAAAA;CACT,QAAQ;CACR,QAAQC,eAAAA;CACR,OAAO;CACP,aAAa,EAAE,OAAO,OAAO;AAC/B"}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { o as getNumberFormat, r as formatNumber } from "./format-it1kepFG.js";
|
|
2
|
-
import { i as insets,
|
|
2
|
+
import { i as insets, r as innerRect, s as round } from "./layout-DqAte3H8.js";
|
|
3
3
|
import { t as h } from "./vnode-_EMUqysL.js";
|
|
4
4
|
import { n as cleanItems } from "./clean-CkoQobGv.js";
|
|
5
5
|
import { n as keyOf, t as groupAttrs } from "./named-BOiBah6I.js";
|
|
6
|
-
import { n as
|
|
6
|
+
import { n as withSlices, t as slicesLegend } from "./others-DBIGE6jr.js";
|
|
7
7
|
// src/charts/percentage-bar.ts
|
|
8
8
|
/** Height of the chart when neither `height` nor `aspectRatio` is set: a strip. */
|
|
9
9
|
const HEIGHT = 16;
|
|
10
|
-
/** The segments of the data: nine at most by default, the one for the rest included. */
|
|
11
|
-
const group = (options) => groupSlices(options.data, options.maxSlices, options.othersLabel);
|
|
12
10
|
/** The visible segments in their order along the bar, and their sum. */
|
|
13
11
|
function segmentsOf(options, hidden) {
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
if (options.order === "size") segments.sort((a, b) => Number(a.index >= count) - Number(b.index >= count) || b.value - a.value || a.index - b.index);
|
|
12
|
+
const segments = options.slices.filter((segment) => !hidden.has(keyOf(segment.data)));
|
|
13
|
+
if (options.order === "size") segments.sort((a, b) => Number(!!a.others) - Number(!!b.others) || b.value - a.value || a.index - b.index);
|
|
17
14
|
return {
|
|
18
15
|
segments,
|
|
19
16
|
total: segments.reduce((sum, segment) => sum + segment.value, 0)
|
|
@@ -31,10 +28,12 @@ function renderPercentageBar(options, ctx) {
|
|
|
31
28
|
const length = segment.value / total * area.width;
|
|
32
29
|
const left = position === 0 ? 0 : gap / 2;
|
|
33
30
|
const right = position === drawn.length - 1 ? 0 : gap / 2;
|
|
31
|
+
const boxWidth = Math.max(0, length - left - right);
|
|
32
|
+
const start = offset + left;
|
|
34
33
|
const box = {
|
|
35
|
-
x:
|
|
34
|
+
x: ctx.rtl ? area.x * 2 + area.width - start - boxWidth : start,
|
|
36
35
|
y: area.y,
|
|
37
|
-
width:
|
|
36
|
+
width: boxWidth,
|
|
38
37
|
height: area.height
|
|
39
38
|
};
|
|
40
39
|
offset += length;
|
|
@@ -68,15 +67,15 @@ function renderPercentageBar(options, ctx) {
|
|
|
68
67
|
area,
|
|
69
68
|
items: [item],
|
|
70
69
|
seriesIndex: segment.index,
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
y: 0
|
|
70
|
+
highlight: {
|
|
71
|
+
kind: "halo",
|
|
72
|
+
d: `M${n(box.x + 1)},${n(box.y + 1)}h${n(box.width - 2)}v${n(box.height - 2)}h${n(2 - box.width)}Z`
|
|
75
73
|
}
|
|
76
74
|
};
|
|
77
75
|
};
|
|
78
76
|
const interaction = {
|
|
79
77
|
count: drawn.length,
|
|
78
|
+
reversed: ctx.rtl === true,
|
|
80
79
|
hitIndex: (position) => drawn[position] ? hitFor(position) : null,
|
|
81
80
|
hitTest(px, py) {
|
|
82
81
|
if (py < area.y || py > area.y + area.height) return null;
|
|
@@ -84,26 +83,28 @@ function renderPercentageBar(options, ctx) {
|
|
|
84
83
|
return position < 0 ? null : hitFor(position);
|
|
85
84
|
}
|
|
86
85
|
};
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
86
|
+
return {
|
|
87
|
+
content: h("g", { class: "tc-percentage-bar" }, drawn.length === 0 && h("rect", {
|
|
88
|
+
key: "track",
|
|
89
|
+
class: "tc-percentage-bar-track",
|
|
90
|
+
x: round(area.x),
|
|
91
|
+
y: round(area.y),
|
|
92
|
+
width: round(area.width),
|
|
93
|
+
height: round(area.height),
|
|
94
|
+
rx: round(Math.min(radius, area.width / 2, area.height / 2))
|
|
95
|
+
}), segments.map((segment) => {
|
|
96
|
+
const box = boxes[drawn.indexOf(segment)];
|
|
97
|
+
return h("g", groupAttrs(segment.data, segment.index), box && h("rect", {
|
|
98
|
+
class: "tc-segment",
|
|
99
|
+
x: round(box.x),
|
|
100
|
+
y: round(box.y),
|
|
101
|
+
width: round(box.width),
|
|
102
|
+
height: round(box.height),
|
|
103
|
+
rx: round(Math.min(radius, box.width / 2, box.height / 2))
|
|
104
|
+
}));
|
|
105
|
+
})),
|
|
106
|
+
interaction
|
|
107
|
+
};
|
|
107
108
|
}
|
|
108
109
|
function percentageBarTable(options, ctx) {
|
|
109
110
|
const { segments, total } = segmentsOf(options, ctx.hidden);
|
|
@@ -147,11 +148,12 @@ const percentageBar = {
|
|
|
147
148
|
height: config.height ?? (config.aspectRatio ? void 0 : HEIGHT)
|
|
148
149
|
};
|
|
149
150
|
},
|
|
151
|
+
prepare: withSlices,
|
|
150
152
|
render: renderPercentageBar,
|
|
151
|
-
legend:
|
|
153
|
+
legend: slicesLegend,
|
|
152
154
|
table: percentageBarTable,
|
|
153
155
|
valueLabels: { marks: "cell" }
|
|
154
156
|
};
|
|
155
157
|
export { percentageBar as t };
|
|
156
158
|
|
|
157
|
-
//# sourceMappingURL=percentage-bar-
|
|
159
|
+
//# sourceMappingURL=percentage-bar-CaInxrL8.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"percentage-bar-CaInxrL8.js","names":[],"sources":["../src/charts/percentage-bar.ts"],"sourcesContent":["import type { DataTable } from '../a11y.ts'\nimport type { ChartType, RenderContext, RenderResult, TableContext } from '../chart.ts'\nimport { formatNumber, getNumberFormat, type NumberFormat } from '../format.ts'\nimport type { Hit, HitItem, Interaction } from '../interaction.ts'\nimport { type InsetsInput, innerRect, insets, round } from '../layout.ts'\nimport { type ClassValue, h } from '../vnode.ts'\nimport { cleanItems } from './clean.ts'\nimport { groupAttrs, keyOf } from './named.ts'\nimport {\n type Grouped,\n type SliceGrouping,\n slicesLegend,\n type WithSlices,\n withSlices,\n} from './others.ts'\n\n/** One segment of a percentage bar. */\nexport interface PercentageBarSegment {\n name: string\n /** Non-negative value; negative values count as zero. */\n value: number\n /** Stable identity for keyed updates and legend toggles. Defaults to `name`. */\n id?: string\n /**\n * Custom color; overrides the palette slot via `--tc-series-color`.\n * Values that could inject CSS (`;`, quotes, `url()` …) are ignored, so colors from user data are safe.\n */\n color?: string\n /** Extra classes on the segment group. */\n class?: ClassValue\n /** Start hidden (toggle it back from the legend). */\n hidden?: boolean\n}\n\nexport interface PercentageBarOptions extends SliceGrouping {\n data: readonly PercentageBarSegment[]\n /**\n * Order of the segments along the bar: as in the data (`'data'`, the\n * default) or the largest first (`'size'`). Colors follow the data either\n * way, and Others always comes last.\n */\n order?: 'data' | 'size'\n /** Space between segments in pixels, drawn as surface. Defaults to `2`. */\n gap?: number\n /** Corner radius of the segments. Defaults to `4`. */\n radius?: number\n /** Format of the values (tooltip, table). */\n format?: NumberFormat\n /** Extra space around the bar, in pixels. */\n padding?: InsetsInput\n}\n\n/** Height of the chart when neither `height` nor `aspectRatio` is set: a strip. */\nconst HEIGHT = 16\n\ntype Segment = Grouped<PercentageBarSegment>\n\n/**\n * The chart model of a percentage bar: its options, with the segments of the\n * data (nine at most by default, the one for the rest included).\n */\nexport type PercentageBarModel = WithSlices<PercentageBarOptions>\n\n/** The visible segments in their order along the bar, and their sum. */\nfunction segmentsOf(\n options: PercentageBarModel,\n hidden: ReadonlySet<string>,\n): { segments: Segment[]; total: number } {\n const segments = options.slices.filter((segment) => !hidden.has(keyOf(segment.data)))\n if (options.order === 'size') {\n // (Others stays last, whatever its size.)\n segments.sort(\n (a, b) => Number(!!a.others) - Number(!!b.others) || b.value - a.value || a.index - b.index,\n )\n }\n return { segments, total: segments.reduce((sum, segment) => sum + segment.value, 0) }\n}\n\nfunction renderPercentageBar(options: PercentageBarModel, ctx: RenderContext): RenderResult {\n const { width, height, locale } = ctx\n const gap = Math.max(0, options.gap ?? 2)\n const radius = Math.max(0, options.radius ?? 4)\n const area = innerRect(width, height, insets(options.padding, 0))\n const { segments, total } = segmentsOf(options, ctx.hidden)\n const drawn = segments.filter((segment) => segment.value > 0)\n\n // Every segment gives up half a gap on each side but the ends of the bar.\n let offset = area.x\n const boxes = drawn.map((segment, position) => {\n const length = (segment.value / total) * area.width\n const left = position === 0 ? 0 : gap / 2\n const right = position === drawn.length - 1 ? 0 : gap / 2\n const boxWidth = Math.max(0, length - left - right)\n const start = offset + left\n const box = {\n // Right to left, the bar starts from the right: every segment takes its mirror place.\n x: ctx.rtl ? area.x * 2 + area.width - start - boxWidth : start,\n y: area.y,\n width: boxWidth,\n height: area.height,\n }\n offset += length\n return box\n })\n\n const value = formatNumber(options.format, locale)\n const share = getNumberFormat(locale, { style: 'percent', maximumFractionDigits: 1 })\n const hitFor = (position: number): Hit => {\n const segment = drawn[position] as Segment\n const box = boxes[position] as (typeof boxes)[number]\n const x = box.x + box.width / 2\n const item: HitItem = {\n name: segment.data.name,\n seriesIndex: segment.index,\n value: segment.value,\n text: `${value(segment.value)} (${share.format(segment.value / total)})`,\n x,\n y: box.y + box.height / 2,\n box,\n }\n if (segment.data.color) item.color = segment.data.color\n const n = round\n return {\n index: position,\n label: segment.data.name,\n title: '',\n x,\n area,\n items: [item],\n seriesIndex: segment.index,\n // A ring just inside the hovered segment.\n highlight: {\n kind: 'halo',\n d: `M${n(box.x + 1)},${n(box.y + 1)}h${n(box.width - 2)}v${n(box.height - 2)}h${n(2 - box.width)}Z`,\n },\n }\n }\n\n const interaction: Interaction = {\n count: drawn.length,\n reversed: ctx.rtl === true,\n hitIndex: (position) => (drawn[position] ? hitFor(position) : null),\n hitTest(px, py) {\n if (py < area.y || py > area.y + area.height) return null\n const position = boxes.findIndex(\n (box) => px >= box.x - gap / 2 && px <= box.x + box.width + gap / 2,\n )\n return position < 0 ? null : hitFor(position)\n },\n }\n\n const content = h(\n 'g',\n { class: 'tc-percentage-bar' },\n // Empty: the track alone, so the chart keeps its place.\n drawn.length === 0 &&\n h('rect', {\n key: 'track',\n class: 'tc-percentage-bar-track',\n x: round(area.x),\n y: round(area.y),\n width: round(area.width),\n height: round(area.height),\n rx: round(Math.min(radius, area.width / 2, area.height / 2)),\n }),\n segments.map((segment) => {\n const box = boxes[drawn.indexOf(segment)]\n return h(\n 'g',\n groupAttrs(segment.data, segment.index),\n box &&\n h('rect', {\n class: 'tc-segment',\n x: round(box.x),\n y: round(box.y),\n width: round(box.width),\n height: round(box.height),\n rx: round(Math.min(radius, box.width / 2, box.height / 2)),\n }),\n )\n }),\n )\n return { content, interaction }\n}\n\nfunction percentageBarTable(options: PercentageBarModel, ctx: TableContext): DataTable {\n const { segments, total } = segmentsOf(options, ctx.hidden)\n const value = formatNumber(options.format, ctx.locale)\n const share = getNumberFormat(ctx.locale, { style: 'percent', maximumFractionDigits: 1 })\n return {\n columns: ['', 'Value', 'Share'],\n rows: segments.map((segment) => [\n segment.data.name,\n value(segment.value),\n share.format(total > 0 ? segment.value / total : 0),\n ]),\n }\n}\n\n/**\n * Percentage bar: parts of a whole as segments of one horizontal bar, each as\n * wide as its share (a donut's ring unrolled, for a strip under a number).\n * The chart is a strip 16 pixels tall unless `height` or `aspectRatio` is set.\n *\n * ```ts\n * new Chart('#el', {\n * type: percentageBar,\n * data: [{ name: 'Paid', value: 62 }, { name: 'Open', value: 27 }, { name: 'Overdue', value: 11 }],\n * })\n * ```\n */\nexport const percentageBar: ChartType<PercentageBarOptions, PercentageBarModel> = {\n name: 'percentage-bar',\n // (The options come with the whole config: its size is defaulted here.)\n clean: (options) => {\n const config = options as PercentageBarOptions & { height?: unknown; aspectRatio?: unknown }\n return {\n ...config,\n data: cleanItems(config.data),\n height: config.height ?? (config.aspectRatio ? undefined : HEIGHT),\n }\n },\n prepare: withSlices,\n render: renderPercentageBar,\n legend: slicesLegend,\n table: percentageBarTable,\n valueLabels: { marks: 'cell' },\n}\n"],"mappings":";;;;;;;;AAqDA,MAAM,SAAS;;AAWf,SAAS,WACP,SACA,QACwC;CACxC,MAAM,WAAW,QAAQ,OAAO,QAAQ,YAAY,CAAC,OAAO,IAAI,MAAM,QAAQ,IAAI,CAAC,CAAC;CACpF,IAAI,QAAQ,UAAU,QAEpB,SAAS,MACN,GAAG,MAAM,OAAO,CAAC,CAAC,EAAE,MAAM,IAAI,OAAO,CAAC,CAAC,EAAE,MAAM,KAAK,EAAE,QAAQ,EA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