@undp/data-viz 2.3.3 → 2.3.5
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/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +1 -1
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.js +1 -1
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +2 -2
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +1 -1
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +1 -1
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.js +2 -2
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.js +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +1 -1
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +3 -3
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +1 -1
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +1 -1
- package/dist/{EmptyState-DX0t62iF.cjs → EmptyState-N1eHt3vq.cjs} +2 -2
- package/dist/{EmptyState-DX0t62iF.cjs.map → EmptyState-N1eHt3vq.cjs.map} +1 -1
- package/dist/{EmptyState-Pj-emXt5.js → EmptyState-dScPFkLy.js} +2 -2
- package/dist/{EmptyState-Pj-emXt5.js.map → EmptyState-dScPFkLy.js.map} +1 -1
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +1 -1
- package/dist/{GraphEl-DDXkYObU.js → GraphEl-Bw-9MUym.js} +8 -7
- package/dist/GraphEl-Bw-9MUym.js.map +1 -0
- package/dist/{GraphEl-CWjTuiYd.cjs → GraphEl-DjElfY07.cjs} +2 -2
- package/dist/GraphEl-DjElfY07.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +1 -1
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +1 -1
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +2 -2
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +1 -1
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +1 -1
- package/dist/{Source-B3i0Bx2R.cjs → Source-24M277ZQ.cjs} +2 -2
- package/dist/{Source-B3i0Bx2R.cjs.map → Source-24M277ZQ.cjs.map} +1 -1
- package/dist/{Source-_STIejqs.js → Source-Cu9OHOBj.js} +2 -2
- package/dist/{Source-_STIejqs.js.map → Source-Cu9OHOBj.js.map} +1 -1
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +2 -2
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.js +1 -1
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +2 -2
- package/dist/Types.d.ts +1 -0
- package/dist/Typography-Cc_iHQB-.cjs +2 -0
- package/dist/Typography-Cc_iHQB-.cjs.map +1 -0
- package/dist/{Typography-iR8PEgdt.js → Typography-CdMGooqp.js} +4 -4
- package/dist/Typography-CdMGooqp.js.map +1 -0
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +1 -1
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.js +1 -1
- package/dist/index-BzNfurbO.js +378 -0
- package/dist/index-BzNfurbO.js.map +1 -0
- package/dist/index-CXobQn-E.cjs +2 -0
- package/dist/index-CXobQn-E.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/package.json +3 -3
- package/dist/GraphEl-CWjTuiYd.cjs.map +0 -1
- package/dist/GraphEl-DDXkYObU.js.map +0 -1
- package/dist/Typography-DrJ7IOdw.cjs +0 -2
- package/dist/Typography-DrJ7IOdw.cjs.map +0 -1
- package/dist/Typography-iR8PEgdt.js.map +0 -1
- package/dist/index-BE-lvE4c.js +0 -337
- package/dist/index-BE-lvE4c.js.map +0 -1
- package/dist/index-DlrGwLQA.cjs +0 -2
- package/dist/index-DlrGwLQA.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography-CdMGooqp.js","sources":["../node_modules/@undp/design-system-react/dist/Typography.js"],"sourcesContent":["import { j as b } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as d } from \"./compiler-runtime-Cu50tn6L.js\";\nimport { c as f } from \"./index-CHPV5EwG.js\";\nimport { c as g } from \"./utils-D_Pof5Gy.js\";\nconst p = f(\"mt-0 ml-0 mr-0\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-sm\",\n base: \"text-base\",\n \"base-responsive\": \"text-base md:text-xl\",\n lg: \"text-lg\",\n xl: \"text-xl\"\n },\n leading: {\n none: \"leading-none\",\n xs: \"leading-[1.25]\",\n sm: \"leading-[1.375]\",\n base: \"leading-[1.4]\",\n lg: \"leading-[1.625]\",\n xl: \"leading-[2]\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n decoration: {\n normal: \"normal\",\n italic: \"italic\",\n underline: \"underline\",\n \"line-through\": \"line-through\"\n },\n marginBottom: {\n none: \"mb-0\",\n \"3xs\": \"mb-1\",\n \"2xs\": \"mb-2\",\n xs: \"mb-3\",\n sm: \"mb-4\",\n base: \"mb-5\",\n lg: \"mb-6\",\n xl: \"mb-7\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n size: \"base-responsive\",\n leading: \"base\",\n weight: \"normal\",\n decoration: \"normal\",\n marginBottom: \"base\",\n alignment: \"left\"\n }\n});\nfunction _(s) {\n const e = d.c(22);\n let t, l, n, m, i, o, a, r, x;\n e[0] !== s ? ({\n children: l,\n className: n,\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t,\n ...a\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o, e[7] = a, e[8] = r, e[9] = x) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6], a = e[7], r = e[8], x = e[9]);\n let c;\n e[10] !== t || e[11] !== n || e[12] !== m || e[13] !== i || e[14] !== o || e[15] !== r || e[16] !== x ? (c = g(p({\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t\n }), n), e[10] = t, e[11] = n, e[12] = m, e[13] = i, e[14] = o, e[15] = r, e[16] = x, e[17] = c) : c = e[17];\n let h;\n return e[18] !== l || e[19] !== a || e[20] !== c ? (h = /* @__PURE__ */ b.jsx(\"p\", { ...a, className: c, children: l }), e[18] = l, e[19] = a, e[20] = c, e[21] = h) : h = e[21], h;\n}\nconst u = f(\"mt-0 ml-0 mr-0 p-0 uppercase font-heading\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n size: {\n base: \"text-[2.938rem] md:text-[5.125rem] lg:text-[6.25rem] tracking-[0.06rem] leading-[1.08]\",\n sm: \"text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1]\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n size: \"base\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction C(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n size: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(u({\n marginBottom: m,\n size: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h1\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst w = f(\"mt-0 ml-0 mr-0 p-0 text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction E(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(w({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h2\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst v = f(\"mt-0 ml-0 mr-0 p-0 text-[1.875rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"semibold\",\n alignment: \"left\"\n }\n});\nfunction R(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(v({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h3\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst B = f(\"mt-0 ml-0 mr-0 p-0 text-[1.563rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction A(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(B({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h4\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst N = f(\"mt-0 ml-0 mr-0 p-0 text-[1.25rem] md:text-[1.563rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction P(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(N({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h5\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst V = f(\"mt-0 ml-0 mr-0 p-0 text-base leading-[1.15] uppercase tracking-[0.48px] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction D(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(V({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h6\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst k = f(\"mt-0 ml-0 mr-0 p-0 text-xl md:text-2xl leading-[1.1] block font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\"\n }\n});\nfunction F(s) {\n const e = d.c(14);\n let t, l, n, m, i;\n e[0] !== s ? ({\n children: t,\n className: l,\n marginBottom: n,\n weight: i,\n ...m\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5]);\n let o;\n e[6] !== l || e[7] !== n || e[8] !== i ? (o = g(k({\n marginBottom: n,\n weight: i\n }), l), e[6] = l, e[7] = n, e[8] = i, e[9] = o) : o = e[9];\n let a;\n return e[10] !== t || e[11] !== m || e[12] !== o ? (a = /* @__PURE__ */ b.jsx(\"cite\", { ...m, className: o, children: t }), e[10] = t, e[11] = m, e[12] = o, e[13] = a) : a = e[13], a;\n}\nconst j = f(\"mt-0 ml-0 mr-0 font-mono mt-0 text-base bg-primary-gray-200 dark:bg-primary-gray-600 px-2 pb-2 text-primary-black dark:text-primary-white\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction G(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g(j({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"code\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nconst $ = f(\"mt-0 ml-0 mr-0 text-[1.625rem] md:text-[2.188rem] leading-[1.1] md:leading-[1.25] font-sans\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction I(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g($({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"blockquote\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nfunction J(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n const i = m ? `font-${m}` : \"font-normal\";\n let o;\n e[5] !== l || e[6] !== i ? (o = g(\"undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white\", \"cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]\", i, l), e[5] = l, e[6] = i, e[7] = o) : o = e[7];\n let a;\n return e[8] !== t || e[9] !== n || e[10] !== o ? (a = /* @__PURE__ */ b.jsx(\"a\", { ...n, className: o, children: t }), e[8] = t, e[9] = n, e[10] = o, e[11] = a) : a = e[11], a;\n}\nexport {\n J as A,\n I as Blockquote,\n F as Cite,\n G as Code,\n C as H1,\n E as H2,\n R as H3,\n A as H4,\n P as H5,\n D as H6,\n _ as P\n};\n//# sourceMappingURL=Typography.js.map\n"],"names":["p","f","_","e","d","t","l","n","m","i","o","a","x","c","g","b","E","v","R","N","P","J"],"mappings":";AAIA,MAAMA,IAAIC,EAAE,kBAAkB;AAAA,EAC5B,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,MAAM;AAAA,MACN,WAAW;AAAA,IACjB;AAAA,IACI,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,gBAAgB;AAAA,IACtB;AAAA,IACI,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,WAAW;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,IACd;AAAA,EACA;AAAA,EACE,iBAAiB;AAAA,IACf,MAAM;AAAA,IACN,SAAS;AAAA,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AAChL;","x_google_ignoreList":[0]}
|
package/dist/UnitChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),wt=require("react"),At=require("./index-CSNtgibC.cjs"),Tt=require("./Typography-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),wt=require("react"),At=require("./index-CSNtgibC.cjs"),Tt=require("./Typography-Cc_iHQB-.cjs"),Bt=require("./GraphFooter.cjs"),Ot=require("./GraphHeader.cjs"),Ut=require("./Colors.cjs"),Jt=require("./numberFormattingFunction-02t-wJta.cjs"),It=require("./GraphContainer-B1EDxJ0S.cjs"),Kt=require("./proxy-C4-uo6nS.cjs"),Qt=require("./use-in-view-C3o_ntMv.cjs"),Xt=require("./index-CoobIWNj.cjs");function Yt(n){const t=i.compilerRuntimeExports.c(127),{data:r,size:yt,graphTitle:v,sources:it,colors:Ct,graphDescription:j,totalNoOfDots:Rt,unitPadding:Et,gridSize:kt,footNote:rt,padding:dt,backgroundColor:bt,graphID:pt,graphDownload:Dt,language:Nt,showColorScale:qt,showStrokeForWhiteDots:St,note:w,dataDownload:zt,theme:Ft,width:e,height:g,minHeight:Gt,relativeHeight:l,ariaLabel:ht,styles:o,classNames:s,animate:Ht,precision:Vt}=n,Y=yt===void 0?200:yt,y=Ct===void 0?Ut.Colors.light.categoricalColors.colors:Ct,Z=Rt===void 0?100:Rt,Pt=Et===void 0?3:Et,x=kt===void 0?10:kt,mt=bt===void 0?!1:bt,C=Dt===void 0?!1:Dt,ft=Nt===void 0?"en":Nt,_=qt===void 0?!0:qt,tt=St===void 0?!0:St,et=zt===void 0?!1:zt,gt=Ft===void 0?"light":Ft,a=Gt===void 0?0:Gt,nt=Ht===void 0?!1:Ht,ot=Vt===void 0?2:Vt,$t=wt.useRef(null);let st;t[0]!==nt?(st=nt===!0?{duration:.5,once:!0,amount:.5}:nt||{duration:0,once:!0,amount:0},t[0]=nt,t[1]=st):st=t[1];const d=st;let lt;t[2]!==d.amount||t[3]!==d.once?(lt={once:d.once,amount:d.amount},t[2]=d.amount,t[3]=d.once,t[4]=lt):lt=t[4];const xt=Qt.useInView($t,lt);let at;t[5]!==r?(at=At.sum(r.map(ie)),t[5]=r,t[6]=at):at=t[6];const vt=at,Mt=wt.useRef(null),Wt=wt.useRef(null),c=Y/x,R=(c-Pt*2)/2;if(R<=0)return console.error("The size of single unit is less than or equal to zero. Check values for ((dimension / gridSize) - (padding * 2)) / 2 is not less than or equal to 0."),null;let E,k,b,D,N,q,S,z,F,G,H,V,$,M,T,I,P,W,L,A,B,O,h,m,f,U;if(t[7]!==d.duration||t[8]!==ht||t[9]!==mt||t[10]!==s?.description||t[11]!==s?.graphContainer||t[12]!==s?.title||t[13]!==y||t[14]!==r||t[15]!==et||t[16]!==j||t[17]!==C||t[18]!==pt||t[19]!==v||t[20]!==c||t[21]!==x||t[22]!==g||t[23]!==xt||t[24]!==ft||t[25]!==a||t[26]!==w||t[27]!==dt||t[28]!==ot||t[29]!==R||t[30]!==l||t[31]!==_||t[32]!==tt||t[33]!==Y||t[34]!==o?.description||t[35]!==o?.graphContainer||t[36]!==o?.title||t[37]!==gt||t[38]!==Z||t[39]!==vt||t[40]!==e){const jt=[];r.forEach((u,p)=>{const Lt=Math.round(u.value/vt*Z);for(let ut=0;ut<Lt;ut=ut+1,ut)jt.push({color:y[p]})}),b=It.GraphContainer,G=s?.graphContainer,H=o?.graphContainer,V=pt,$=Mt,M=ht,T=mt,I=gt,P=ft,W=a,L=e,A=g,B=l,O=dt,t[67]!==s?.description||t[68]!==s?.title||t[69]!==r||t[70]!==et||t[71]!==j||t[72]!==C||t[73]!==v||t[74]!==o?.description||t[75]!==o?.title||t[76]!==e?(h=v||j||C?i.jsxRuntimeExports.jsx(Ot.GraphHeader,{styles:{title:o?.title,description:o?.description},classNames:{title:s?.title,description:s?.description},graphTitle:v,graphDescription:j,width:e,graphDownload:C?Mt:void 0,dataDownload:et?r.map(oe).filter(ee).length>0?r.map(te).filter(_t):r.filter(Zt):null}):null,t[67]=s?.description,t[68]=s?.title,t[69]=r,t[70]=et,t[71]=j,t[72]=C,t[73]=v,t[74]=o?.description,t[75]=o?.title,t[76]=e,t[77]=h):h=t[77],t[78]!==w||t[79]!==e?(m=w?i.jsxRuntimeExports.jsx(Tt.E,{marginBottom:"2xs",className:"text-primary-gray-700 dark:text-primary-gray-100 font-bold",style:{width:e?`${e}px`:"100%"},children:w}):null,t[78]=w,t[79]=e,t[80]=m):m=t[80],t[81]!==y||t[82]!==r||t[83]!==ot||t[84]!==_||t[85]!==e?(f=_?i.jsxRuntimeExports.jsx("div",{className:"mb-4 leading-0",style:{width:e?`${e}px`:"100%"},"aria-label":"Color legend",children:i.jsxRuntimeExports.jsx("div",{className:"flex mb-0 flex-wrap gap-x-4 gap-y-1",children:r.map((u,p)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-3 h-3 rounded-full",style:{backgroundColor:y[p]}}),i.jsxRuntimeExports.jsxs(Tt._,{marginBottom:"none",size:"sm",className:"text-primary-gray-700 dark:text-primary-gray-100",children:[u.label,":"," ",i.jsxRuntimeExports.jsx("span",{className:"font-bold",children:Jt.numberFormattingFunction(u.value,"NA",ot)})]})]},p))})}):null,t[81]=y,t[82]=r,t[83]=ot,t[84]=_,t[85]=e,t[86]=f):f=t[86],k=It.GraphArea,F=Wt,D=`${e||Y}px`,N=`${Math.max(a,g?l&&e?a?e*l>a?e*l:a:e*l:g:Math.floor((Z-1)/x)*c+c/2+R+5)}px`,q=$t,S="ltr",z=`0 0 ${e||Y} ${Math.max(a,g?l&&e?a?e*l>a?e*l:a:e*l:g:Math.floor((Z-1)/x)*c+c/2+R+5)}`,E=Xt.AnimatePresence,U=i.jsxRuntimeExports.jsx("g",{children:jt.map((u,p)=>i.jsxRuntimeExports.jsx(Kt.motion.circle,{style:{strokeWidth:1},variants:{initial:{fill:"#fff",opacity:0,...tt?{}:{stroke:u.color},strokeWidth:1},whileInView:{fill:u.color,opacity:1,...tt?{}:{stroke:u.color},strokeWidth:1,cx:p%x*c+c/2,cy:Math.floor(p/x)*c+c/2,transition:{duration:0,delay:d.duration/jt.length*p}}},initial:"initial",animate:xt?"whileInView":"initial",className:(u.color.toLowerCase()==="#fff"||u.color.toLowerCase()==="#ffffff"||u.color.toLowerCase()==="white")&&tt?"stroke-primary-gray-400 dark:stroke-primary-gray-500":"",r:R},p))}),t[7]=d.duration,t[8]=ht,t[9]=mt,t[10]=s?.description,t[11]=s?.graphContainer,t[12]=s?.title,t[13]=y,t[14]=r,t[15]=et,t[16]=j,t[17]=C,t[18]=pt,t[19]=v,t[20]=c,t[21]=x,t[22]=g,t[23]=xt,t[24]=ft,t[25]=a,t[26]=w,t[27]=dt,t[28]=ot,t[29]=R,t[30]=l,t[31]=_,t[32]=tt,t[33]=Y,t[34]=o?.description,t[35]=o?.graphContainer,t[36]=o?.title,t[37]=gt,t[38]=Z,t[39]=vt,t[40]=e,t[41]=E,t[42]=k,t[43]=b,t[44]=D,t[45]=N,t[46]=q,t[47]=S,t[48]=z,t[49]=F,t[50]=G,t[51]=H,t[52]=V,t[53]=$,t[54]=M,t[55]=T,t[56]=I,t[57]=P,t[58]=W,t[59]=L,t[60]=A,t[61]=B,t[62]=O,t[63]=h,t[64]=m,t[65]=f,t[66]=U}else E=t[41],k=t[42],b=t[43],D=t[44],N=t[45],q=t[46],S=t[47],z=t[48],F=t[49],G=t[50],H=t[51],V=t[52],$=t[53],M=t[54],T=t[55],I=t[56],P=t[57],W=t[58],L=t[59],A=t[60],B=t[61],O=t[62],h=t[63],m=t[64],f=t[65],U=t[66];let J;t[87]!==E||t[88]!==U?(J=i.jsxRuntimeExports.jsx(E,{children:U}),t[87]=E,t[88]=U,t[89]=J):J=t[89];let K;t[90]!==D||t[91]!==N||t[92]!==q||t[93]!==S||t[94]!==z||t[95]!==J?(K=i.jsxRuntimeExports.jsx("svg",{width:D,height:N,ref:q,direction:S,viewBox:z,children:J}),t[90]=D,t[91]=N,t[92]=q,t[93]=S,t[94]=z,t[95]=J,t[96]=K):K=t[96];let Q;t[97]!==k||t[98]!==F||t[99]!==K?(Q=i.jsxRuntimeExports.jsx(k,{ref:F,children:K}),t[97]=k,t[98]=F,t[99]=K,t[100]=Q):Q=t[100];let X;t[101]!==rt||t[102]!==it||t[103]!==o?.footnote||t[104]!==o?.source||t[105]!==e?(X=it||rt?i.jsxRuntimeExports.jsx(Bt.GraphFooter,{styles:{footnote:o?.footnote,source:o?.source},sources:it,footNote:rt,width:e}):null,t[101]=rt,t[102]=it,t[103]=o?.footnote,t[104]=o?.source,t[105]=e,t[106]=X):X=t[106];let ct;return t[107]!==b||t[108]!==G||t[109]!==H||t[110]!==V||t[111]!==$||t[112]!==M||t[113]!==T||t[114]!==I||t[115]!==P||t[116]!==W||t[117]!==L||t[118]!==A||t[119]!==B||t[120]!==O||t[121]!==h||t[122]!==m||t[123]!==f||t[124]!==Q||t[125]!==X?(ct=i.jsxRuntimeExports.jsxs(b,{className:G,style:H,id:V,ref:$,"aria-label":M,backgroundColor:T,theme:I,language:P,minHeight:W,width:L,height:A,relativeHeight:B,padding:O,children:[h,m,f,Q,X]}),t[107]=b,t[108]=G,t[109]=H,t[110]=V,t[111]=$,t[112]=M,t[113]=T,t[114]=I,t[115]=P,t[116]=W,t[117]=L,t[118]=A,t[119]=B,t[120]=O,t[121]=h,t[122]=m,t[123]=f,t[124]=Q,t[125]=X,t[126]=ct):ct=t[126],ct}function Zt(n){return n!==void 0}function _t(n){return n!==void 0}function te(n){return n.data}function ee(n){return n!==void 0}function oe(n){return n.data}function ie(n){return n.value}exports.UnitChart=Yt;
|
|
2
2
|
//# sourceMappingURL=UnitChart.cjs.map
|
package/dist/UnitChart.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { c as Pt, j as i } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
2
|
import { useRef as yt } from "react";
|
|
3
3
|
import { s as Rt } from "./index-CeVNqhMO.js";
|
|
4
|
-
import { _ as Bt, E as qt } from "./Typography-
|
|
4
|
+
import { _ as Bt, E as qt } from "./Typography-CdMGooqp.js";
|
|
5
5
|
import { GraphFooter as Ot } from "./GraphFooter.js";
|
|
6
6
|
import { GraphHeader as Ut } from "./GraphHeader.js";
|
|
7
7
|
import { Colors as Jt } from "./Colors.js";
|
package/dist/WaterfallChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-02t-wJta.cjs"),le=require("./Tooltip-BLa2EfMs.cjs"),zt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),yt=require("./Colors.cjs"),ae=require("./AxisTitle-DV4n0RxE.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),ue=require("./ReferenceLine-M9aP3dj-.cjs"),de=require("./YTicksAndGridLines-UzVC5eBM.cjs"),me=require("./XAxesLabels-C6o9jJal.cjs"),xe=require("./DetailsModal-DHttOA80.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),he=require("./linear-CgUCbw9F.cjs"),fe=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),ge=require("./use-in-view-C3o_ntMv.cjs"),pe=require("./index-CoobIWNj.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-DX0t62iF.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,o=0,w=0;for(const x of i)t+=x||0,t>o&&(o=t),t<w&&(w=t);return{max:o,min:w}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:o,rightMargin:w,topMargin:x,bottomMargin:Gt,data:h,width:Ct,height:S,barColor:f,suffix:wt,prefix:jt,barPadding:Qt,showLabels:Wt,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ot,tooltip:T,onSeriesMouseOver:Et,refValues:Ft,selectedColor:V,maxValue:Mt,minValue:At,highlightedDataPoints:I,onSeriesMouseClick:Rt,labelOrder:v,maxBarThickness:kt,minBarThickness:Lt,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ht,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Tt,customLayers:R,naLabel:Ut,hideAxisLine:Zt}=i,k=o===void 0?20:o,Nt=w===void 0?20:w,lt=x===void 0?20:x,P=Gt===void 0?25:Gt,qt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ge.useInView(qt,z),at=rt?k+30:k;let ct;t[3]!==P||t[4]!==Nt||t[5]!==at||t[6]!==lt?(ct={top:lt,bottom:P,left:at,right:Nt},t[3]=P,t[4]=Nt,t[5]=at,t[6]=lt,t[7]=ct):ct=t[7];const n=ct,{max:l,min:_t}=we(h.map(De)),Yt=zt.checkIfNullOrUndefined(Mt)?l:Mt,b=zt.checkIfNullOrUndefined(At)?_t:At,[ut,G]=M.useState(void 0),[W,F]=M.useState(void 0),[H,dt]=M.useState(void 0),[U,mt]=M.useState(void 0),L=Ct-n.left-n.right,$t=S-n.top-n.bottom;let $;if(t[8]!==h||t[9]!==v){const e=new Set,O=h.map((ot,nt)=>{const D=v?`${ot.label}`:`${nt}`;return e.add(D),{...ot,id:D}}),E=v?v.filter(ot=>!e.has(ot)):[];$=[...O,...E.map(Be)],t[8]=h,t[9]=v,t[10]=$}else $=t[10];const Y=$;let X;t[11]!==Y||t[12]!==v?(X=v??Y.map($e),t[11]=Y,t[12]=v,t[13]=X):X=t[13];const xt=X,r=he.linear().domain([b,Yt]).range([$t,0]).nice(),u=fe.band().domain(xt).range([0,Lt?Math.max(L,Lt*xt.length):kt?Math.min(L,kt*xt.length):L]).paddingInner(Qt),ht=r.ticks(Ht);let y=0;const Xt=Y.map(e=>{const O=y;return y=y+(e.size||0),{...e,start:O,end:y}}),ft=a?.xAxis?.axis,p=a?.yAxis?.labels;let J;t[14]!==p||t[15]!==ft?(J={axis:ft,label:p},t[14]=p,t[15]=ft,t[16]=J):J=t[16];const j=m?.xAxis?.axis,K=m?.yAxis?.labels;let Q;t[17]!==j||t[18]!==K?(Q={axis:j,label:K},t[17]=j,t[18]=K,t[19]=Q):Q=t[19];const gt=0-k-15,Z=$t/2,pt=m?.yAxis?.title,vt=a?.yAxis?.title;let _;t[20]!==rt||t[21]!==gt||t[22]!==Z||t[23]!==pt||t[24]!==vt?(_=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:gt,y:Z,style:pt,className:vt,text:rt,rotate90:!0}),t[20]=rt,t[21]=gt,t[22]=Z,t[23]=pt,t[24]=vt,t[25]=_):_=t[25];let B;t[26]!==R?(B=R.filter(Te).map(Le),t[26]=R,t[27]=B):B=t[27];const Jt=pe.AnimatePresence,tt=Xt.map((e,O)=>zt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{G(e),mt(E.clientY),dt(E.clientX),Et?.(e)},onClick:()=>{(Rt||N)&&(re.isEqual(W,e)?(F(void 0),Rt?.(void 0)):(F(e),Rt?.(e)))},onMouseMove:E=>{G(e),mt(E.clientY),dt(E.clientX)},onMouseLeave:()=>{G(void 0),dt(void 0),mt(void 0),Et?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(ke).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Wt?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:n.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Ut,Tt,jt,wt)}):null]},e.label)),Kt=Ft?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ft.map((e,O)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+n.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},O))}):null;let et;t[28]!==Jt||t[29]!==tt||t[30]!==Kt?(et=s.jsxRuntimeExports.jsxs(Jt,{children:[tt,Kt]}),t[28]=Jt,t[29]=tt,t[30]=Kt,t[31]=et):et=t[31];let Bt;t[32]!==R?(Bt=R.filter(Ee).map(Oe),t[32]=R,t[33]=Bt):Bt=t[33];let it;t[34]!==a?.tooltip||t[35]!==H||t[36]!==U||t[37]!==ut||t[38]!==m?.tooltip||t[39]!==T?(it=ut&&T&&H&&U?s.jsxRuntimeExports.jsx(le.Tooltip,{data:ut,body:T,xPos:H,yPos:U,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=H,t[36]=U,t[37]=ut,t[38]=m?.tooltip,t[39]=T,t[40]=it):it=t[40];let bt;return t[41]!==a?.modal||t[42]!==N||t[43]!==W||t[44]!==F?(bt=N&&W!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:N,data:W,setData:F,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=W,t[44]=F,t[45]=bt):bt=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:qt,width:`${Ct}px`,height:`${S}px`,viewBox:`0 0 ${Ct} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${n.left},${n.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+n.right,hideAxisLine:Zt,label:st?oe.numberFormattingFunction(b<0?0:b,Ut,Tt,jt,wt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:J,styles:Q}),st?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:ht.filter(qe),y:ht.filter(Ne).map(e=>r(e)),x1:0-k,x2:L+n.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:wt,prefix:jt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Tt}):null,_,B,et,Bt]})}),it,bt]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(101),{data:o,graphTitle:w,colors:x,suffix:Gt,sources:h,prefix:Ct,graphDescription:S,barPadding:f,showValues:wt,showTicks:jt,truncateBy:Qt,height:Wt,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:T,padding:Et,backgroundColor:Ft,topMargin:V,bottomMargin:Mt,leftMargin:At,rightMargin:I,showLabels:Rt,relativeHeight:v,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,showColorScale:rt,graphID:Ht,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Tt,labelOrder:R,language:Ut,showNAColor:Zt,minHeight:k,theme:Nt,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:qt,ariaLabel:z,detailsOnClick:q,barAxisTitle:at,noOfTicks:ct,styles:n,classNames:l,filterNA:_t,animate:Yt,dimmedOpacity:b,precision:ut,customLayers:G,naLabel:W,hideAxisLine:F}=i,H=Gt===void 0?"":Gt,dt=Ct===void 0?"":Ct,U=f===void 0?.25:f,mt=wt===void 0?!0:wt,L=jt===void 0?!0:jt,$t=Qt===void 0?999:Qt;let $;t[0]!==T?($=T===void 0?[]:T,t[0]=T,t[1]=$):$=t[1];const Y=$,X=Ft===void 0?!1:Ft,xt=Rt===void 0?!0:Rt,r=rt===void 0?!0:rt,u=c===void 0?!1:c,ht=Tt===void 0?!1:Tt,y=Ut===void 0?"en":Ut,Xt=Zt===void 0?!0:Zt,ft=k===void 0?0:k,p=Nt===void 0?"light":Nt,J=ct===void 0?5:ct,j=_t===void 0?!0:_t,K=Yt===void 0?!1:Yt,Q=b===void 0?.3:b,gt=ut===void 0?2:ut;let Z;t[2]!==G?(Z=G===void 0?[]:G,t[2]=G,t[3]=Z):Z=t[3];const pt=Z,vt=W===void 0?"NA":W,_=F===void 0?!1:F,[B,Jt]=M.useState(0),[tt,Kt]=M.useState(0),[et,Bt]=M.useState(void 0),it=M.useRef(null),bt=M.useRef(null);let e,O;t[4]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{const C=new ResizeObserver(ee=>{Jt(ee[0].target.clientWidth||620),Kt(ee[0].target.clientHeight||480)});return it.current&&C.observe(it.current),()=>C.disconnect()},O=[],t[4]=e,t[5]=O):(e=t[4],O=t[5]),M.useEffect(e,O);const E=l?.graphContainer,ot=n?.graphContainer;let nt;t[6]!==l?.description||t[7]!==l?.title||t[8]!==o||t[9]!==ht||t[10]!==S||t[11]!==u||t[12]!==w||t[13]!==n?.description||t[14]!==n?.title||t[15]!==d?(nt=w||S||u||ht?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:l?.title,description:l?.description},graphTitle:w,graphDescription:S,width:d,graphDownload:u?bt:void 0,dataDownload:ht?o.map(He).filter(Fe).length>0?o.map(We).filter(Ge):o.filter(ze):null}):null,t[6]=l?.description,t[7]=l?.title,t[8]=o,t[9]=ht,t[10]=S,t[11]=u,t[12]=w,t[13]=n?.description,t[14]=n?.title,t[15]=d,t[16]=nt):nt=t[16];let D;t[17]!==l?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==o||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(D=r&&o.filter(Pe).length!==0&&o.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||yt.Colors[p].categoricalColors.colors,colorDomain:g||se.uniqBy(o,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:l?.colorLegend}):null,t[17]=l?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=o,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=D):D=t[26];let Dt;t[27]!==o||t[28]!==j?(Dt=o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[27]=o,t[28]=j,t[29]=Dt):Dt=t[29];let St;t[30]!==K||t[31]!==at||t[32]!==U||t[33]!==Mt||t[34]!==l||t[35]!==g||t[36]!==x||t[37]!==pt||t[38]!==o||t[39]!==q||t[40]!==Q||t[41]!==j||t[42]!==_||t[43]!==Y||t[44]!==R||t[45]!==y||t[46]!==At||t[47]!==lt||t[48]!==P||t[49]!==m||t[50]!==qt||t[51]!==a||t[52]!==vt||t[53]!==J||t[54]!==A||t[55]!==Lt||t[56]!==gt||t[57]!==dt||t[58]!==N||t[59]!==I||t[60]!==et||t[61]!==xt||t[62]!==L||t[63]!==mt||t[64]!==n||t[65]!==H||t[66]!==tt||t[67]!==B||t[68]!==p||t[69]!==kt||t[70]!==V||t[71]!==$t?(St=B&&tt&&o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:_,data:o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).filter((C,ee)=>P?ee<P:!0),barColor:o.filter(Ie).length===0?x?[x]:[yt.Colors.primaryColors["blue-600"]]:x||yt.Colors[p].categoricalColors.colors,colorDomain:o.filter(Ve).length===0?[]:g||se.uniqBy(o,"color",!0),selectedColor:et,width:B,height:tt,suffix:H,prefix:dt,barPadding:U,showValues:mt,showTicks:L,leftMargin:At,rightMargin:I,topMargin:V,bottomMargin:Mt,truncateBy:$t,showLabels:xt,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:Y,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:qt,detailsOnClick:q,barAxisTitle:at,noOfTicks:J,classNames:l,styles:n,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Q,precision:gt,customLayers:pt,naLabel:vt}):null,t[30]=K,t[31]=at,t[32]=U,t[33]=Mt,t[34]=l,t[35]=g,t[36]=x,t[37]=pt,t[38]=o,t[39]=q,t[40]=Q,t[41]=j,t[42]=_,t[43]=Y,t[44]=R,t[45]=y,t[46]=At,t[47]=lt,t[48]=P,t[49]=m,t[50]=qt,t[51]=a,t[52]=vt,t[53]=J,t[54]=A,t[55]=Lt,t[56]=gt,t[57]=dt,t[58]=N,t[59]=I,t[60]=et,t[61]=xt,t[62]=L,t[63]=mt,t[64]=n,t[65]=H,t[66]=tt,t[67]=B,t[68]=p,t[69]=kt,t[70]=V,t[71]=$t,t[72]=St):St=t[72];let Vt;t[73]!==Dt||t[74]!==St?(Vt=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:it,children:[Dt,St]}),t[73]=Dt,t[74]=St,t[75]=Vt):Vt=t[75];let It;t[76]!==l?.footnote||t[77]!==l?.source||t[78]!==st||t[79]!==h||t[80]!==n?.footnote||t[81]!==n?.source||t[82]!==d?(It=h||st?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:l?.footnote,source:l?.source}}):null,t[76]=l?.footnote,t[77]=l?.source,t[78]=st,t[79]=h,t[80]=n?.footnote,t[81]=n?.source,t[82]=d,t[83]=It):It=t[83];let te;return t[84]!==z||t[85]!==X||t[86]!==Ht||t[87]!==Wt||t[88]!==y||t[89]!==ft||t[90]!==Et||t[91]!==v||t[92]!==E||t[93]!==ot||t[94]!==nt||t[95]!==D||t[96]!==Vt||t[97]!==It||t[98]!==p||t[99]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:E,style:ot,id:Ht,ref:bt,"aria-label":z,backgroundColor:X,theme:p,language:y,minHeight:ft,width:d,height:Wt,relativeHeight:v,padding:Et,children:[nt,D,Vt,It]}),t[84]=z,t[85]=X,t[86]=Ht,t[87]=Wt,t[88]=y,t[89]=ft,t[90]=Et,t[91]=v,t[92]=E,t[93]=ot,t[94]=nt,t[95]=D,t[96]=Vt,t[97]=It,t[98]=p,t[99]=d,t[100]=te):te=t[100],te}function Ve(i){return i.color}function Ie(i){return i.color}function Pe(i){return i.color}function ze(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-02t-wJta.cjs"),le=require("./Tooltip-BLa2EfMs.cjs"),zt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),yt=require("./Colors.cjs"),ae=require("./AxisTitle-DV4n0RxE.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),ue=require("./ReferenceLine-M9aP3dj-.cjs"),de=require("./YTicksAndGridLines-UzVC5eBM.cjs"),me=require("./XAxesLabels-C6o9jJal.cjs"),xe=require("./DetailsModal-DHttOA80.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),he=require("./linear-CgUCbw9F.cjs"),fe=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),ge=require("./use-in-view-C3o_ntMv.cjs"),pe=require("./index-CoobIWNj.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-N1eHt3vq.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,o=0,w=0;for(const x of i)t+=x||0,t>o&&(o=t),t<w&&(w=t);return{max:o,min:w}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:o,rightMargin:w,topMargin:x,bottomMargin:Gt,data:h,width:Ct,height:S,barColor:f,suffix:wt,prefix:jt,barPadding:Qt,showLabels:Wt,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ot,tooltip:T,onSeriesMouseOver:Et,refValues:Ft,selectedColor:V,maxValue:Mt,minValue:At,highlightedDataPoints:I,onSeriesMouseClick:Rt,labelOrder:v,maxBarThickness:kt,minBarThickness:Lt,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ht,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Tt,customLayers:R,naLabel:Ut,hideAxisLine:Zt}=i,k=o===void 0?20:o,Nt=w===void 0?20:w,lt=x===void 0?20:x,P=Gt===void 0?25:Gt,qt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ge.useInView(qt,z),at=rt?k+30:k;let ct;t[3]!==P||t[4]!==Nt||t[5]!==at||t[6]!==lt?(ct={top:lt,bottom:P,left:at,right:Nt},t[3]=P,t[4]=Nt,t[5]=at,t[6]=lt,t[7]=ct):ct=t[7];const n=ct,{max:l,min:_t}=we(h.map(De)),Yt=zt.checkIfNullOrUndefined(Mt)?l:Mt,b=zt.checkIfNullOrUndefined(At)?_t:At,[ut,G]=M.useState(void 0),[W,F]=M.useState(void 0),[H,dt]=M.useState(void 0),[U,mt]=M.useState(void 0),L=Ct-n.left-n.right,$t=S-n.top-n.bottom;let $;if(t[8]!==h||t[9]!==v){const e=new Set,O=h.map((ot,nt)=>{const D=v?`${ot.label}`:`${nt}`;return e.add(D),{...ot,id:D}}),E=v?v.filter(ot=>!e.has(ot)):[];$=[...O,...E.map(Be)],t[8]=h,t[9]=v,t[10]=$}else $=t[10];const Y=$;let X;t[11]!==Y||t[12]!==v?(X=v??Y.map($e),t[11]=Y,t[12]=v,t[13]=X):X=t[13];const xt=X,r=he.linear().domain([b,Yt]).range([$t,0]).nice(),u=fe.band().domain(xt).range([0,Lt?Math.max(L,Lt*xt.length):kt?Math.min(L,kt*xt.length):L]).paddingInner(Qt),ht=r.ticks(Ht);let y=0;const Xt=Y.map(e=>{const O=y;return y=y+(e.size||0),{...e,start:O,end:y}}),ft=a?.xAxis?.axis,p=a?.yAxis?.labels;let J;t[14]!==p||t[15]!==ft?(J={axis:ft,label:p},t[14]=p,t[15]=ft,t[16]=J):J=t[16];const j=m?.xAxis?.axis,K=m?.yAxis?.labels;let Q;t[17]!==j||t[18]!==K?(Q={axis:j,label:K},t[17]=j,t[18]=K,t[19]=Q):Q=t[19];const gt=0-k-15,Z=$t/2,pt=m?.yAxis?.title,vt=a?.yAxis?.title;let _;t[20]!==rt||t[21]!==gt||t[22]!==Z||t[23]!==pt||t[24]!==vt?(_=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:gt,y:Z,style:pt,className:vt,text:rt,rotate90:!0}),t[20]=rt,t[21]=gt,t[22]=Z,t[23]=pt,t[24]=vt,t[25]=_):_=t[25];let B;t[26]!==R?(B=R.filter(Te).map(Le),t[26]=R,t[27]=B):B=t[27];const Jt=pe.AnimatePresence,tt=Xt.map((e,O)=>zt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{G(e),mt(E.clientY),dt(E.clientX),Et?.(e)},onClick:()=>{(Rt||N)&&(re.isEqual(W,e)?(F(void 0),Rt?.(void 0)):(F(e),Rt?.(e)))},onMouseMove:E=>{G(e),mt(E.clientY),dt(E.clientX)},onMouseLeave:()=>{G(void 0),dt(void 0),mt(void 0),Et?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(ke).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Wt?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:n.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Ut,Tt,jt,wt)}):null]},e.label)),Kt=Ft?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ft.map((e,O)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+n.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},O))}):null;let et;t[28]!==Jt||t[29]!==tt||t[30]!==Kt?(et=s.jsxRuntimeExports.jsxs(Jt,{children:[tt,Kt]}),t[28]=Jt,t[29]=tt,t[30]=Kt,t[31]=et):et=t[31];let Bt;t[32]!==R?(Bt=R.filter(Ee).map(Oe),t[32]=R,t[33]=Bt):Bt=t[33];let it;t[34]!==a?.tooltip||t[35]!==H||t[36]!==U||t[37]!==ut||t[38]!==m?.tooltip||t[39]!==T?(it=ut&&T&&H&&U?s.jsxRuntimeExports.jsx(le.Tooltip,{data:ut,body:T,xPos:H,yPos:U,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=H,t[36]=U,t[37]=ut,t[38]=m?.tooltip,t[39]=T,t[40]=it):it=t[40];let bt;return t[41]!==a?.modal||t[42]!==N||t[43]!==W||t[44]!==F?(bt=N&&W!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:N,data:W,setData:F,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=W,t[44]=F,t[45]=bt):bt=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:qt,width:`${Ct}px`,height:`${S}px`,viewBox:`0 0 ${Ct} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${n.left},${n.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+n.right,hideAxisLine:Zt,label:st?oe.numberFormattingFunction(b<0?0:b,Ut,Tt,jt,wt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:J,styles:Q}),st?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:ht.filter(qe),y:ht.filter(Ne).map(e=>r(e)),x1:0-k,x2:L+n.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:wt,prefix:jt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Tt}):null,_,B,et,Bt]})}),it,bt]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(101),{data:o,graphTitle:w,colors:x,suffix:Gt,sources:h,prefix:Ct,graphDescription:S,barPadding:f,showValues:wt,showTicks:jt,truncateBy:Qt,height:Wt,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:T,padding:Et,backgroundColor:Ft,topMargin:V,bottomMargin:Mt,leftMargin:At,rightMargin:I,showLabels:Rt,relativeHeight:v,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,showColorScale:rt,graphID:Ht,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Tt,labelOrder:R,language:Ut,showNAColor:Zt,minHeight:k,theme:Nt,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:qt,ariaLabel:z,detailsOnClick:q,barAxisTitle:at,noOfTicks:ct,styles:n,classNames:l,filterNA:_t,animate:Yt,dimmedOpacity:b,precision:ut,customLayers:G,naLabel:W,hideAxisLine:F}=i,H=Gt===void 0?"":Gt,dt=Ct===void 0?"":Ct,U=f===void 0?.25:f,mt=wt===void 0?!0:wt,L=jt===void 0?!0:jt,$t=Qt===void 0?999:Qt;let $;t[0]!==T?($=T===void 0?[]:T,t[0]=T,t[1]=$):$=t[1];const Y=$,X=Ft===void 0?!1:Ft,xt=Rt===void 0?!0:Rt,r=rt===void 0?!0:rt,u=c===void 0?!1:c,ht=Tt===void 0?!1:Tt,y=Ut===void 0?"en":Ut,Xt=Zt===void 0?!0:Zt,ft=k===void 0?0:k,p=Nt===void 0?"light":Nt,J=ct===void 0?5:ct,j=_t===void 0?!0:_t,K=Yt===void 0?!1:Yt,Q=b===void 0?.3:b,gt=ut===void 0?2:ut;let Z;t[2]!==G?(Z=G===void 0?[]:G,t[2]=G,t[3]=Z):Z=t[3];const pt=Z,vt=W===void 0?"NA":W,_=F===void 0?!1:F,[B,Jt]=M.useState(0),[tt,Kt]=M.useState(0),[et,Bt]=M.useState(void 0),it=M.useRef(null),bt=M.useRef(null);let e,O;t[4]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{const C=new ResizeObserver(ee=>{Jt(ee[0].target.clientWidth||620),Kt(ee[0].target.clientHeight||480)});return it.current&&C.observe(it.current),()=>C.disconnect()},O=[],t[4]=e,t[5]=O):(e=t[4],O=t[5]),M.useEffect(e,O);const E=l?.graphContainer,ot=n?.graphContainer;let nt;t[6]!==l?.description||t[7]!==l?.title||t[8]!==o||t[9]!==ht||t[10]!==S||t[11]!==u||t[12]!==w||t[13]!==n?.description||t[14]!==n?.title||t[15]!==d?(nt=w||S||u||ht?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:l?.title,description:l?.description},graphTitle:w,graphDescription:S,width:d,graphDownload:u?bt:void 0,dataDownload:ht?o.map(He).filter(Fe).length>0?o.map(We).filter(Ge):o.filter(ze):null}):null,t[6]=l?.description,t[7]=l?.title,t[8]=o,t[9]=ht,t[10]=S,t[11]=u,t[12]=w,t[13]=n?.description,t[14]=n?.title,t[15]=d,t[16]=nt):nt=t[16];let D;t[17]!==l?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==o||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(D=r&&o.filter(Pe).length!==0&&o.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||yt.Colors[p].categoricalColors.colors,colorDomain:g||se.uniqBy(o,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:l?.colorLegend}):null,t[17]=l?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=o,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=D):D=t[26];let Dt;t[27]!==o||t[28]!==j?(Dt=o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[27]=o,t[28]=j,t[29]=Dt):Dt=t[29];let St;t[30]!==K||t[31]!==at||t[32]!==U||t[33]!==Mt||t[34]!==l||t[35]!==g||t[36]!==x||t[37]!==pt||t[38]!==o||t[39]!==q||t[40]!==Q||t[41]!==j||t[42]!==_||t[43]!==Y||t[44]!==R||t[45]!==y||t[46]!==At||t[47]!==lt||t[48]!==P||t[49]!==m||t[50]!==qt||t[51]!==a||t[52]!==vt||t[53]!==J||t[54]!==A||t[55]!==Lt||t[56]!==gt||t[57]!==dt||t[58]!==N||t[59]!==I||t[60]!==et||t[61]!==xt||t[62]!==L||t[63]!==mt||t[64]!==n||t[65]!==H||t[66]!==tt||t[67]!==B||t[68]!==p||t[69]!==kt||t[70]!==V||t[71]!==$t?(St=B&&tt&&o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:_,data:o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).filter((C,ee)=>P?ee<P:!0),barColor:o.filter(Ie).length===0?x?[x]:[yt.Colors.primaryColors["blue-600"]]:x||yt.Colors[p].categoricalColors.colors,colorDomain:o.filter(Ve).length===0?[]:g||se.uniqBy(o,"color",!0),selectedColor:et,width:B,height:tt,suffix:H,prefix:dt,barPadding:U,showValues:mt,showTicks:L,leftMargin:At,rightMargin:I,topMargin:V,bottomMargin:Mt,truncateBy:$t,showLabels:xt,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:Y,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:qt,detailsOnClick:q,barAxisTitle:at,noOfTicks:J,classNames:l,styles:n,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Q,precision:gt,customLayers:pt,naLabel:vt}):null,t[30]=K,t[31]=at,t[32]=U,t[33]=Mt,t[34]=l,t[35]=g,t[36]=x,t[37]=pt,t[38]=o,t[39]=q,t[40]=Q,t[41]=j,t[42]=_,t[43]=Y,t[44]=R,t[45]=y,t[46]=At,t[47]=lt,t[48]=P,t[49]=m,t[50]=qt,t[51]=a,t[52]=vt,t[53]=J,t[54]=A,t[55]=Lt,t[56]=gt,t[57]=dt,t[58]=N,t[59]=I,t[60]=et,t[61]=xt,t[62]=L,t[63]=mt,t[64]=n,t[65]=H,t[66]=tt,t[67]=B,t[68]=p,t[69]=kt,t[70]=V,t[71]=$t,t[72]=St):St=t[72];let Vt;t[73]!==Dt||t[74]!==St?(Vt=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:it,children:[Dt,St]}),t[73]=Dt,t[74]=St,t[75]=Vt):Vt=t[75];let It;t[76]!==l?.footnote||t[77]!==l?.source||t[78]!==st||t[79]!==h||t[80]!==n?.footnote||t[81]!==n?.source||t[82]!==d?(It=h||st?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:l?.footnote,source:l?.source}}):null,t[76]=l?.footnote,t[77]=l?.source,t[78]=st,t[79]=h,t[80]=n?.footnote,t[81]=n?.source,t[82]=d,t[83]=It):It=t[83];let te;return t[84]!==z||t[85]!==X||t[86]!==Ht||t[87]!==Wt||t[88]!==y||t[89]!==ft||t[90]!==Et||t[91]!==v||t[92]!==E||t[93]!==ot||t[94]!==nt||t[95]!==D||t[96]!==Vt||t[97]!==It||t[98]!==p||t[99]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:E,style:ot,id:Ht,ref:bt,"aria-label":z,backgroundColor:X,theme:p,language:y,minHeight:ft,width:d,height:Wt,relativeHeight:v,padding:Et,children:[nt,D,Vt,It]}),t[84]=z,t[85]=X,t[86]=Ht,t[87]=Wt,t[88]=y,t[89]=ft,t[90]=Et,t[91]=v,t[92]=E,t[93]=ot,t[94]=nt,t[95]=D,t[96]=Vt,t[97]=It,t[98]=p,t[99]=d,t[100]=te):te=t[100],te}function Ve(i){return i.color}function Ie(i){return i.color}function Pe(i){return i.color}function ze(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
|
|
2
2
|
//# sourceMappingURL=WaterfallChart.cjs.map
|
package/dist/WaterfallChart.js
CHANGED
|
@@ -18,7 +18,7 @@ import { m as ie } from "./proxy-DRuSUlPL.js";
|
|
|
18
18
|
import { u as be } from "./use-in-view-Dl5L8LtP.js";
|
|
19
19
|
import { A as ye } from "./index-CtMBjvtq.js";
|
|
20
20
|
import { ColorLegendWithMouseOver as we } from "./ColorLegendWithMouseOver.js";
|
|
21
|
-
import { E as Ae } from "./EmptyState-
|
|
21
|
+
import { E as Ae } from "./EmptyState-dScPFkLy.js";
|
|
22
22
|
import { a as Me, G as Oe } from "./GraphContainer-CF6ws3pd.js";
|
|
23
23
|
import { GraphFooter as Ce } from "./GraphFooter.js";
|
|
24
24
|
import { GraphHeader as $e } from "./GraphHeader.js";
|
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
import { c as Yt, j as x, m as Ft } from "./index-CHPV5EwG-DecW7_qr.js";
|
|
2
|
+
import { useRef as Bt, useState as rt, useEffect as Tt } from "react";
|
|
3
|
+
import { o as Xt } from "./index-BZQYSqar.js";
|
|
4
|
+
import { w as qt } from "./Spinner--r2RrJV8.js";
|
|
5
|
+
import { _ as Ht } from "./Typography-CdMGooqp.js";
|
|
6
|
+
import { T as It } from "./Tooltip-BRnAz2Gv.js";
|
|
7
|
+
import { n as Ut } from "./numberFormattingFunction-14YCbkN2.js";
|
|
8
|
+
import { g as Gt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
|
|
9
|
+
import { Colors as At } from "./Colors.js";
|
|
10
|
+
import { c as Lt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
11
|
+
import { D as Jt } from "./DetailsModal-BMCTgVsk.js";
|
|
12
|
+
import { s as Kt } from "./pow-CaIrlM4J.js";
|
|
13
|
+
import { f as Qt, b as Zt, a as _t, c as te, d as ee } from "./y-BqfogMAB.js";
|
|
14
|
+
import { GraphFooter as oe } from "./GraphFooter.js";
|
|
15
|
+
import { GraphHeader as ne } from "./GraphHeader.js";
|
|
16
|
+
import { ColorLegendWithMouseOver as ie } from "./ColorLegendWithMouseOver.js";
|
|
17
|
+
import { E as re } from "./EmptyState-dScPFkLy.js";
|
|
18
|
+
import { u as Wt } from "./uniqBy-BHy4I8PK.js";
|
|
19
|
+
import { a as le, G as se } from "./GraphContainer-CF6ws3pd.js";
|
|
20
|
+
function Et(i, t) {
|
|
21
|
+
let n, l;
|
|
22
|
+
if (t === void 0)
|
|
23
|
+
for (const s of i)
|
|
24
|
+
s != null && (n === void 0 ? s >= s && (n = l = s) : (n > s && (n = s), l < s && (l = s)));
|
|
25
|
+
else {
|
|
26
|
+
let s = -1;
|
|
27
|
+
for (let h of i)
|
|
28
|
+
(h = t(h, ++s, i)) != null && (n === void 0 ? h >= h && (n = l = h) : (n > h && (n = h), l < h && (l = h)));
|
|
29
|
+
}
|
|
30
|
+
return [n, l];
|
|
31
|
+
}
|
|
32
|
+
function H(i) {
|
|
33
|
+
return function() {
|
|
34
|
+
return i;
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
function ae(i, t, n, l) {
|
|
38
|
+
var s = H(0.1), h = !0, z = H(Math.min((n - i) / 2, (l - t) / 2)), a, V, P, u, N, f, O, g, E, A;
|
|
39
|
+
typeof i != "function" && (i = H(i == null ? -100 : +i)), typeof n != "function" && (n = H(n == null ? 100 : +n)), typeof t != "function" && (t = H(t == null ? -100 : +t)), typeof l != "function" && (l = H(l == null ? 100 : +l));
|
|
40
|
+
function G(e, o, W, r, B) {
|
|
41
|
+
return (e - o) * Math.min(2, Math.abs(e - o) / e) * W * B;
|
|
42
|
+
}
|
|
43
|
+
function d(e) {
|
|
44
|
+
for (var o = 0, W = a.length, r; o < W; ++o)
|
|
45
|
+
r = a[o], r.x < u[o] + g[o] || r.x > N[o] - g[o] || r.y < f[o] + g[o] || r.y > O[o] - g[o] ? (r.vx += G(E[o], r.x, V[o], g[o], e), r.vy += G(A[o], r.y, P[o], g[o], e)) : r.y < f[o] + g[o] || r.y > O[o] - g[o], h && (r.x >= N[o] && (r.vx += N[o] - r.x), r.x <= u[o] && (r.vx += u[o] - r.x), r.y >= O[o] && (r.vy += O[o] - r.y), r.y <= f[o] && (r.vy += f[o] - r.y));
|
|
46
|
+
}
|
|
47
|
+
function k() {
|
|
48
|
+
if (a) {
|
|
49
|
+
var e, o = a.length;
|
|
50
|
+
for (V = new Array(o), P = new Array(o), u = new Array(o), f = new Array(o), N = new Array(o), O = new Array(o), A = new Array(o), E = new Array(o), g = new Array(o), e = 0; e < o; ++e)
|
|
51
|
+
V[e] = isNaN(u[e] = +i(a[e], e, a)) || isNaN(N[e] = +n(a[e], e, a)) ? 0 : +s(a[e], e, a), P[e] = isNaN(f[e] = +t(a[e], e, a)) || isNaN(O[e] = +l(a[e], e, a)) ? 0 : +s(a[e], e, a), E[e] = u[e] + (N[e] - u[e]) / 2, A[e] = f[e] + (O[e] - f[e]) / 2, g[e] = +z(a[e], e, a);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return d.initialize = function(e) {
|
|
55
|
+
a = e, k();
|
|
56
|
+
}, d.x0 = function(e) {
|
|
57
|
+
return arguments.length ? (i = typeof e == "function" ? e : H(+e), k(), d) : i;
|
|
58
|
+
}, d.x1 = function(e) {
|
|
59
|
+
return arguments.length ? (n = typeof e == "function" ? e : H(+e), k(), d) : n;
|
|
60
|
+
}, d.y0 = function(e) {
|
|
61
|
+
return arguments.length ? (t = typeof e == "function" ? e : H(+e), k(), d) : t;
|
|
62
|
+
}, d.y1 = function(e) {
|
|
63
|
+
return arguments.length ? (l = typeof e == "function" ? e : H(+e), k(), d) : l;
|
|
64
|
+
}, d.strength = function(e) {
|
|
65
|
+
return arguments.length ? (s = typeof e == "function" ? e : H(+e), k(), d) : s;
|
|
66
|
+
}, d.border = function(e) {
|
|
67
|
+
return arguments.length ? (z = typeof e == "function" ? e : H(+e), k(), d) : z;
|
|
68
|
+
}, d.hardBoundary = function(e) {
|
|
69
|
+
return arguments.length ? (h = e, d) : h;
|
|
70
|
+
}, d;
|
|
71
|
+
}
|
|
72
|
+
const ce = (i) => {
|
|
73
|
+
const t = Yt.c(105), {
|
|
74
|
+
data: n,
|
|
75
|
+
colors: l,
|
|
76
|
+
leftMargin: s,
|
|
77
|
+
width: h,
|
|
78
|
+
height: z,
|
|
79
|
+
colorDomain: a,
|
|
80
|
+
selectedColor: V,
|
|
81
|
+
rightMargin: P,
|
|
82
|
+
topMargin: u,
|
|
83
|
+
bottomMargin: N,
|
|
84
|
+
showLabels: f,
|
|
85
|
+
tooltip: O,
|
|
86
|
+
onSeriesMouseOver: g,
|
|
87
|
+
showValues: E,
|
|
88
|
+
suffix: A,
|
|
89
|
+
prefix: G,
|
|
90
|
+
highlightedDataPoints: d,
|
|
91
|
+
onSeriesMouseClick: k,
|
|
92
|
+
maxRadiusValue: e,
|
|
93
|
+
radius: o,
|
|
94
|
+
resetSelectionOnDoubleClick: W,
|
|
95
|
+
detailsOnClick: r,
|
|
96
|
+
styles: B,
|
|
97
|
+
classNames: S,
|
|
98
|
+
dimmedOpacity: Q,
|
|
99
|
+
precision: T
|
|
100
|
+
} = i, kt = Bt(null), [bt, wt] = rt(void 0), [F, Z] = rt(void 0), [R, $t] = rt(void 0), [lt, st] = rt(void 0), [at, jt] = rt(void 0), [ct, C] = rt(null);
|
|
101
|
+
let p;
|
|
102
|
+
t[0] !== N || t[1] !== s || t[2] !== P || t[3] !== u ? (p = {
|
|
103
|
+
top: u,
|
|
104
|
+
bottom: N,
|
|
105
|
+
left: s,
|
|
106
|
+
right: P
|
|
107
|
+
}, t[0] = N, t[1] = s, t[2] = P, t[3] = u, t[4] = p) : p = t[4];
|
|
108
|
+
const _ = p, X = h - _.left - _.right, q = z - _.top - _.bottom;
|
|
109
|
+
let ft;
|
|
110
|
+
t[5] !== n ? (ft = n.filter(fe).length === 0 ? n : Xt(n.filter(ue), "radius", "asc"), t[5] = n, t[6] = ft) : ft = t[6];
|
|
111
|
+
const I = ft;
|
|
112
|
+
let ut;
|
|
113
|
+
t[7] !== n || t[8] !== e || t[9] !== o ? (ut = n.filter(he).length !== n.length ? Kt().domain([0, Lt(e) ? Math.max(...n.map(me).filter(ge)) : e]).range([0.25, o]).nice() : void 0, t[7] = n, t[8] = e, t[9] = o, t[10] = ut) : ut = t[10];
|
|
114
|
+
const m = ut;
|
|
115
|
+
let ht;
|
|
116
|
+
t[11] !== I || t[12] !== q || t[13] !== X || t[14] !== o || t[15] !== m ? (ht = () => {
|
|
117
|
+
(() => {
|
|
118
|
+
const v = I.map(de);
|
|
119
|
+
Qt(v).force("y", Zt((j) => q / 2).strength(1)).force("x", _t((j) => X / 2).strength(1)).force("collide", te((j) => m ? m(j.size || 0) + 1 : o + 1)).force("charge", ee().strength(-15)).force("boundary", ae(0, 0, X, q).strength(0.2).border(50)).alphaDecay(0.05).tick(1e4).on("tick", () => {
|
|
120
|
+
C(v);
|
|
121
|
+
}).on("end", () => {
|
|
122
|
+
C(v);
|
|
123
|
+
const j = Et(v, (b) => b.x - (m ? m(b.size || 0) + 1 : o + 1))[0] || 0, y = Et(v, (b) => b.y - (m ? m(b.size || 0) + 1 : o + 1))[0] || 0, Y = Et(v, (b) => b.x + (m ? m(b.size || 0) + 1 : o + 1))[1] || 0, L = Et(v, (b) => b.y + (m ? m(b.size || 0) + 1 : o + 1))[1] || 0;
|
|
124
|
+
$t([j, y, j < 0 ? Y - j : Y, y < 0 ? L - y : L]);
|
|
125
|
+
});
|
|
126
|
+
})();
|
|
127
|
+
}, t[11] = I, t[12] = q, t[13] = X, t[14] = o, t[15] = m, t[16] = ht) : ht = t[16];
|
|
128
|
+
let mt;
|
|
129
|
+
t[17] !== n || t[18] !== I || t[19] !== q || t[20] !== X || t[21] !== e || t[22] !== o || t[23] !== m ? (mt = [n, o, q, X, e, I, m], t[17] = n, t[18] = I, t[19] = q, t[20] = X, t[21] = e, t[22] = o, t[23] = m, t[24] = mt) : mt = t[24], Tt(ht, mt);
|
|
130
|
+
let gt;
|
|
131
|
+
t[25] !== g ? (gt = (c, v) => {
|
|
132
|
+
wt(v), jt(c.clientY), st(c.clientX), g?.(v);
|
|
133
|
+
}, t[25] = g, t[26] = gt) : gt = t[26];
|
|
134
|
+
const tt = gt;
|
|
135
|
+
let dt;
|
|
136
|
+
t[27] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (dt = (c, v) => {
|
|
137
|
+
wt(v), jt(c.clientY), st(c.clientX);
|
|
138
|
+
}, t[27] = dt) : dt = t[27];
|
|
139
|
+
const Ot = dt;
|
|
140
|
+
let pt;
|
|
141
|
+
t[28] !== r || t[29] !== F || t[30] !== k || t[31] !== W ? (pt = (c) => {
|
|
142
|
+
(k || r) && (F === c.label && W ? (Z(void 0), k?.(void 0)) : (Z(c.label), k?.(c)));
|
|
143
|
+
}, t[28] = r, t[29] = F, t[30] = k, t[31] = W, t[32] = pt) : pt = t[32];
|
|
144
|
+
const U = pt;
|
|
145
|
+
let et;
|
|
146
|
+
t[33] !== g ? (et = () => {
|
|
147
|
+
wt(void 0), st(void 0), jt(void 0), g?.(void 0);
|
|
148
|
+
}, t[33] = g, t[34] = et) : et = t[34];
|
|
149
|
+
const ot = et;
|
|
150
|
+
let vt;
|
|
151
|
+
t[35] !== a || t[36] !== l || t[37] !== n ? (vt = (c) => n.filter(pe).length === 0 ? l[0] : c.color ? l[a.indexOf(c.color)] : At.gray, t[35] = a, t[36] = l, t[37] = n, t[38] = vt) : vt = t[38];
|
|
152
|
+
const $ = vt;
|
|
153
|
+
let xt;
|
|
154
|
+
t[39] !== a || t[40] !== l || t[41] !== Q || t[42] !== d || t[43] !== V ? (xt = (c) => V ? c.color && l[a.indexOf(c.color)] === V ? 1 : Q : d.length !== 0 ? d.indexOf(c.label) !== -1 ? 0.85 : Q : 0.85, t[39] = a, t[40] = l, t[41] = Q, t[42] = d, t[43] = V, t[44] = xt) : xt = t[44];
|
|
155
|
+
const nt = xt;
|
|
156
|
+
if (!ct) {
|
|
157
|
+
const c = `${h}px`, v = `${z}px`;
|
|
158
|
+
let D;
|
|
159
|
+
t[45] !== c || t[46] !== v ? (D = {
|
|
160
|
+
width: c,
|
|
161
|
+
height: v
|
|
162
|
+
}, t[45] = c, t[46] = v, t[47] = D) : D = t[47];
|
|
163
|
+
let j;
|
|
164
|
+
t[48] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (j = /* @__PURE__ */ x.jsx("div", { className: "flex m-auto items-center justify-center p-0 leading-none text-base h-40", children: /* @__PURE__ */ x.jsx(qt, {}) }), t[48] = j) : j = t[48];
|
|
165
|
+
let y;
|
|
166
|
+
return t[49] !== D ? (y = /* @__PURE__ */ x.jsx("div", { style: D, children: j }), t[49] = D, t[50] = y) : y = t[50], y;
|
|
167
|
+
}
|
|
168
|
+
if (R) {
|
|
169
|
+
const c = `${h}px`, v = `${z}px`, D = `${R[0] > 0 ? 0 : R[0]} ${R[1] > 0 ? 0 : R[1]} ${h < R[2] ? R[2] : h} ${z < R[3] ? R[3] : z}`, j = `translate(${_.left},${_.top})`;
|
|
170
|
+
let y;
|
|
171
|
+
if (t[51] !== S?.graphObjectValues || t[52] !== ct || t[53] !== $ || t[54] !== nt || t[55] !== U || t[56] !== tt || t[57] !== ot || t[58] !== T || t[59] !== G || t[60] !== o || t[61] !== m || t[62] !== f || t[63] !== E || t[64] !== B?.graphObjectValues || t[65] !== A) {
|
|
172
|
+
let it;
|
|
173
|
+
t[67] !== S?.graphObjectValues || t[68] !== $ || t[69] !== nt || t[70] !== U || t[71] !== tt || t[72] !== ot || t[73] !== T || t[74] !== G || t[75] !== o || t[76] !== m || t[77] !== f || t[78] !== E || t[79] !== B?.graphObjectValues || t[80] !== A ? (it = (w) => {
|
|
174
|
+
const Ct = $(w), St = nt(w), M = m ? m(w.size || 0) : o, yt = M > 20 && (f || E);
|
|
175
|
+
return /* @__PURE__ */ x.jsxs("g", { className: "undp-viz-g-with-hover", opacity: St, transform: `translate(${w.x},${w.y})`, onMouseEnter: (K) => tt(K, w), onMouseMove: (K) => Ot(K, w), onClick: () => U(w), onMouseLeave: ot, children: [
|
|
176
|
+
/* @__PURE__ */ x.jsx("circle", { cx: 0, cy: 0, r: M, fill: Ct }),
|
|
177
|
+
(yt || E) && w.size !== void 0 && w.size !== null && M >= 15 && /* @__PURE__ */ x.jsx("g", { children: /* @__PURE__ */ x.jsx("foreignObject", { y: 0 - M, x: 0 - M, width: 2 * M, height: 2 * M, children: /* @__PURE__ */ x.jsxs("div", { className: "flex flex-col justify-center items-center h-full py-0 px-3", style: {
|
|
178
|
+
display: "flex",
|
|
179
|
+
flexDirection: "column",
|
|
180
|
+
justifyContent: "center",
|
|
181
|
+
alignItems: "center",
|
|
182
|
+
height: "100%",
|
|
183
|
+
padding: "0 0.75rem"
|
|
184
|
+
}, children: [
|
|
185
|
+
f && /* @__PURE__ */ x.jsx(Ht, { className: Ft("text-center leading-[1.25] overflow-hidden m-0 circle-packing-label", S?.graphObjectValues), marginBottom: "none", style: {
|
|
186
|
+
fontSize: `${Math.min(Math.max(Math.round(M / 4), 12), Math.max(Math.round(M * 12 / `${w.label}`.length), 12), 14)}px`,
|
|
187
|
+
WebkitLineClamp: M * 2 < 60 ? 1 : M * 2 < 75 ? 2 : M * 2 < 100 ? 3 : void 0,
|
|
188
|
+
display: "-webkit-box",
|
|
189
|
+
WebkitBoxOrient: "vertical",
|
|
190
|
+
color: Gt(Ct),
|
|
191
|
+
hyphens: "auto",
|
|
192
|
+
...B?.graphObjectValues || {}
|
|
193
|
+
}, children: w.label }),
|
|
194
|
+
E && /* @__PURE__ */ x.jsx(Ht, { className: "text-center font-bold leading-[1.25] w-full m-0 circle-packing-value", marginBottom: "none", style: {
|
|
195
|
+
fontSize: `${Math.min(Math.max(Math.round(M / 4), 14), 14)}px`,
|
|
196
|
+
color: Gt(Ct)
|
|
197
|
+
}, children: Ut(w.size, "NA", T, G, A) })
|
|
198
|
+
] }) }) })
|
|
199
|
+
] }, w.label);
|
|
200
|
+
}, t[67] = S?.graphObjectValues, t[68] = $, t[69] = nt, t[70] = U, t[71] = tt, t[72] = ot, t[73] = T, t[74] = G, t[75] = o, t[76] = m, t[77] = f, t[78] = E, t[79] = B?.graphObjectValues, t[80] = A, t[81] = it) : it = t[81], y = ct.map(it), t[51] = S?.graphObjectValues, t[52] = ct, t[53] = $, t[54] = nt, t[55] = U, t[56] = tt, t[57] = ot, t[58] = T, t[59] = G, t[60] = o, t[61] = m, t[62] = f, t[63] = E, t[64] = B?.graphObjectValues, t[65] = A, t[66] = y;
|
|
201
|
+
} else
|
|
202
|
+
y = t[66];
|
|
203
|
+
let Y;
|
|
204
|
+
t[82] !== j || t[83] !== y ? (Y = /* @__PURE__ */ x.jsx("g", { transform: j, children: y }), t[82] = j, t[83] = y, t[84] = Y) : Y = t[84];
|
|
205
|
+
let L;
|
|
206
|
+
t[85] !== c || t[86] !== v || t[87] !== D || t[88] !== Y ? (L = /* @__PURE__ */ x.jsx("svg", { width: c, height: v, viewBox: D, direction: "ltr", ref: kt, children: Y }), t[85] = c, t[86] = v, t[87] = D, t[88] = Y, t[89] = L) : L = t[89];
|
|
207
|
+
let b;
|
|
208
|
+
t[90] !== S?.tooltip || t[91] !== lt || t[92] !== at || t[93] !== bt || t[94] !== B?.tooltip || t[95] !== O ? (b = bt && O && lt && at && /* @__PURE__ */ x.jsx(It, { data: bt, body: O, xPos: lt, yPos: at, backgroundStyle: B?.tooltip, className: S?.tooltip }), t[90] = S?.tooltip, t[91] = lt, t[92] = at, t[93] = bt, t[94] = B?.tooltip, t[95] = O, t[96] = b) : b = t[96];
|
|
209
|
+
let J;
|
|
210
|
+
t[97] !== S?.modal || t[98] !== r || t[99] !== F ? (J = r && F !== void 0 ? /* @__PURE__ */ x.jsx(Jt, { body: r, data: F, setData: Z, className: S?.modal }) : null, t[97] = S?.modal, t[98] = r, t[99] = F, t[100] = J) : J = t[100];
|
|
211
|
+
let Mt;
|
|
212
|
+
return t[101] !== L || t[102] !== b || t[103] !== J ? (Mt = /* @__PURE__ */ x.jsxs(x.Fragment, { children: [
|
|
213
|
+
L,
|
|
214
|
+
b,
|
|
215
|
+
J
|
|
216
|
+
] }), t[101] = L, t[102] = b, t[103] = J, t[104] = Mt) : Mt = t[104], Mt;
|
|
217
|
+
}
|
|
218
|
+
return null;
|
|
219
|
+
};
|
|
220
|
+
function fe(i) {
|
|
221
|
+
return !Lt(i.size);
|
|
222
|
+
}
|
|
223
|
+
function ue(i) {
|
|
224
|
+
return !Lt(i.size);
|
|
225
|
+
}
|
|
226
|
+
function he(i) {
|
|
227
|
+
return i.size === void 0 || i.size === null;
|
|
228
|
+
}
|
|
229
|
+
function me(i) {
|
|
230
|
+
return i.size;
|
|
231
|
+
}
|
|
232
|
+
function ge(i) {
|
|
233
|
+
return i != null;
|
|
234
|
+
}
|
|
235
|
+
function de(i) {
|
|
236
|
+
return {
|
|
237
|
+
...i,
|
|
238
|
+
...i.data && {
|
|
239
|
+
data: {
|
|
240
|
+
...i.data
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
};
|
|
244
|
+
}
|
|
245
|
+
function pe(i) {
|
|
246
|
+
return i.color;
|
|
247
|
+
}
|
|
248
|
+
function ve(i, t, n, l) {
|
|
249
|
+
const s = i.filter((u) => u != null), h = l === !1 ? Math.sqrt(t * n / Math.PI) : Math.min(t, n) / 2, z = s.reduce((u, N) => u + N, 0), a = Math.max(...s), V = (u) => u <= 5 ? 0.9 : u <= 10 ? 0.85 : u <= 20 ? 0.8 : 0.7, P = (u) => u <= 200 ? 0.85 : u <= 250 ? 0.95 : 1;
|
|
250
|
+
return h * Math.sqrt(a / z) * (l ? P(h) : 1) * (l ? V(s.length) : 1);
|
|
251
|
+
}
|
|
252
|
+
function Ie(i) {
|
|
253
|
+
const t = Yt.c(84), {
|
|
254
|
+
data: n,
|
|
255
|
+
graphTitle: l,
|
|
256
|
+
colors: s,
|
|
257
|
+
suffix: h,
|
|
258
|
+
sources: z,
|
|
259
|
+
prefix: a,
|
|
260
|
+
graphDescription: V,
|
|
261
|
+
leftMargin: P,
|
|
262
|
+
rightMargin: u,
|
|
263
|
+
height: N,
|
|
264
|
+
width: f,
|
|
265
|
+
footNote: O,
|
|
266
|
+
colorDomain: g,
|
|
267
|
+
colorLegendTitle: E,
|
|
268
|
+
padding: A,
|
|
269
|
+
backgroundColor: G,
|
|
270
|
+
topMargin: d,
|
|
271
|
+
bottomMargin: k,
|
|
272
|
+
showLabels: e,
|
|
273
|
+
relativeHeight: o,
|
|
274
|
+
tooltip: W,
|
|
275
|
+
onSeriesMouseOver: r,
|
|
276
|
+
showColorScale: B,
|
|
277
|
+
showValues: S,
|
|
278
|
+
graphID: Q,
|
|
279
|
+
highlightedDataPoints: T,
|
|
280
|
+
onSeriesMouseClick: kt,
|
|
281
|
+
graphDownload: bt,
|
|
282
|
+
dataDownload: wt,
|
|
283
|
+
language: F,
|
|
284
|
+
showNAColor: Z,
|
|
285
|
+
minHeight: R,
|
|
286
|
+
theme: $t,
|
|
287
|
+
ariaLabel: lt,
|
|
288
|
+
radius: st,
|
|
289
|
+
maxRadiusValue: at,
|
|
290
|
+
resetSelectionOnDoubleClick: jt,
|
|
291
|
+
detailsOnClick: ct,
|
|
292
|
+
styles: C,
|
|
293
|
+
classNames: p,
|
|
294
|
+
dimmedOpacity: _,
|
|
295
|
+
precision: X,
|
|
296
|
+
circularBoundary: q
|
|
297
|
+
} = i, ft = h === void 0 ? "" : h, I = a === void 0 ? "" : a, ut = P === void 0 ? 0 : P, m = u === void 0 ? 0 : u, ht = G === void 0 ? !1 : G, mt = d === void 0 ? 0 : d, gt = k === void 0 ? 0 : k, tt = e === void 0 ? !0 : e, dt = B === void 0 ? !0 : B;
|
|
298
|
+
let Ot;
|
|
299
|
+
t[0] !== T ? (Ot = T === void 0 ? [] : T, t[0] = T, t[1] = Ot) : Ot = t[1];
|
|
300
|
+
const pt = Ot, U = bt === void 0 ? !1 : bt, et = wt === void 0 ? !1 : wt, ot = F === void 0 ? "en" : F, vt = R === void 0 ? 0 : R, $ = $t === void 0 ? "light" : $t, xt = jt === void 0 ? !0 : jt, nt = _ === void 0 ? 0.3 : _, c = X === void 0 ? 2 : X, v = q === void 0 ? !0 : q, [D, j] = rt(0), [y, Y] = rt(0), [L, b] = rt(void 0), J = Bt(null), Mt = Bt(null);
|
|
301
|
+
let it, w;
|
|
302
|
+
t[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (it = () => {
|
|
303
|
+
const Pt = new ResizeObserver((Rt) => {
|
|
304
|
+
j(Rt[0].target.clientWidth || 620), Y(Rt[0].target.clientHeight || 480);
|
|
305
|
+
});
|
|
306
|
+
return J.current && Pt.observe(J.current), () => Pt.disconnect();
|
|
307
|
+
}, w = [], t[2] = it, t[3] = w) : (it = t[2], w = t[3]), Tt(it, w);
|
|
308
|
+
const Ct = p?.graphContainer, St = C?.graphContainer;
|
|
309
|
+
let M;
|
|
310
|
+
t[4] !== p?.description || t[5] !== p?.title || t[6] !== n || t[7] !== et || t[8] !== V || t[9] !== U || t[10] !== l || t[11] !== C?.description || t[12] !== C?.title || t[13] !== f ? (M = l || V || U || et ? /* @__PURE__ */ x.jsx(ne, { styles: {
|
|
311
|
+
title: C?.title,
|
|
312
|
+
description: C?.description
|
|
313
|
+
}, classNames: {
|
|
314
|
+
title: p?.title,
|
|
315
|
+
description: p?.description
|
|
316
|
+
}, graphTitle: l, graphDescription: V, width: f, graphDownload: U ? Mt : void 0, dataDownload: et ? n.map(ze).filter(De).length > 0 ? n.map(Oe).filter(je) : n.filter(we) : null }) : null, t[4] = p?.description, t[5] = p?.title, t[6] = n, t[7] = et, t[8] = V, t[9] = U, t[10] = l, t[11] = C?.description, t[12] = C?.title, t[13] = f, t[14] = M) : M = t[14];
|
|
317
|
+
let yt;
|
|
318
|
+
t[15] !== p?.colorLegend || t[16] !== g || t[17] !== E || t[18] !== s || t[19] !== n || t[20] !== dt || t[21] !== Z || t[22] !== $ || t[23] !== f ? (yt = dt && n.filter(Ce).length !== 0 && n.length > 0 ? /* @__PURE__ */ x.jsx(ie, { width: f, colorLegendTitle: E, colors: s || At[$].categoricalColors.colors, colorDomain: g || Wt(n, "color", !0), setSelectedColor: b, showNAColor: Z ?? !0, isCenter: !0, className: p?.colorLegend }) : null, t[15] = p?.colorLegend, t[16] = g, t[17] = E, t[18] = s, t[19] = n, t[20] = dt, t[21] = Z, t[22] = $, t[23] = f, t[24] = yt) : yt = t[24];
|
|
319
|
+
let K;
|
|
320
|
+
t[25] !== n.length ? (K = n.length === 0 && /* @__PURE__ */ x.jsx(re, {}), t[25] = n.length, t[26] = K) : K = t[26];
|
|
321
|
+
let Dt;
|
|
322
|
+
t[27] !== gt || t[28] !== v || t[29] !== p || t[30] !== g || t[31] !== s || t[32] !== n || t[33] !== ct || t[34] !== nt || t[35] !== pt || t[36] !== ut || t[37] !== at || t[38] !== kt || t[39] !== r || t[40] !== c || t[41] !== I || t[42] !== st || t[43] !== xt || t[44] !== m || t[45] !== L || t[46] !== tt || t[47] !== S || t[48] !== C || t[49] !== ft || t[50] !== y || t[51] !== D || t[52] !== $ || t[53] !== W || t[54] !== mt ? (Dt = D && y && n.length > 0 ? /* @__PURE__ */ x.jsx(ce, { data: n, colors: n.filter(Me).length === 0 ? s ? [s] : [At.primaryColors["blue-600"]] : s || At[$].categoricalColors.colors, colorDomain: n.filter(be).length === 0 ? [] : g || Wt(n, "color", !0), width: D, height: y, leftMargin: ut, rightMargin: m, topMargin: mt, bottomMargin: gt, showLabels: tt, showValues: S !== !1 ? n.filter(ye).length !== 0 : S, selectedColor: L, suffix: ft, prefix: I, tooltip: W, onSeriesMouseOver: r, highlightedDataPoints: pt, onSeriesMouseClick: kt, theme: $, radius: st || ve(n.map(xe), D, y, v), maxRadiusValue: at, resetSelectionOnDoubleClick: xt, detailsOnClick: ct, styles: C, classNames: p, dimmedOpacity: nt, precision: c }) : null, t[27] = gt, t[28] = v, t[29] = p, t[30] = g, t[31] = s, t[32] = n, t[33] = ct, t[34] = nt, t[35] = pt, t[36] = ut, t[37] = at, t[38] = kt, t[39] = r, t[40] = c, t[41] = I, t[42] = st, t[43] = xt, t[44] = m, t[45] = L, t[46] = tt, t[47] = S, t[48] = C, t[49] = ft, t[50] = y, t[51] = D, t[52] = $, t[53] = W, t[54] = mt, t[55] = Dt) : Dt = t[55];
|
|
323
|
+
let zt;
|
|
324
|
+
t[56] !== K || t[57] !== Dt ? (zt = /* @__PURE__ */ x.jsxs(le, { ref: J, children: [
|
|
325
|
+
K,
|
|
326
|
+
Dt
|
|
327
|
+
] }), t[56] = K, t[57] = Dt, t[58] = zt) : zt = t[58];
|
|
328
|
+
let Nt;
|
|
329
|
+
t[59] !== p?.footnote || t[60] !== p?.source || t[61] !== O || t[62] !== z || t[63] !== C?.footnote || t[64] !== C?.source || t[65] !== f ? (Nt = z || O ? /* @__PURE__ */ x.jsx(oe, { styles: {
|
|
330
|
+
footnote: C?.footnote,
|
|
331
|
+
source: C?.source
|
|
332
|
+
}, classNames: {
|
|
333
|
+
footnote: p?.footnote,
|
|
334
|
+
source: p?.source
|
|
335
|
+
}, sources: z, footNote: O, width: f }) : null, t[59] = p?.footnote, t[60] = p?.source, t[61] = O, t[62] = z, t[63] = C?.footnote, t[64] = C?.source, t[65] = f, t[66] = Nt) : Nt = t[66];
|
|
336
|
+
let Vt;
|
|
337
|
+
return t[67] !== lt || t[68] !== ht || t[69] !== Q || t[70] !== N || t[71] !== ot || t[72] !== vt || t[73] !== A || t[74] !== o || t[75] !== Ct || t[76] !== St || t[77] !== M || t[78] !== yt || t[79] !== zt || t[80] !== Nt || t[81] !== $ || t[82] !== f ? (Vt = /* @__PURE__ */ x.jsxs(se, { className: Ct, style: St, id: Q, ref: Mt, "aria-label": lt, backgroundColor: ht, theme: $, language: ot, minHeight: vt, width: f, height: N, relativeHeight: o, padding: A, children: [
|
|
338
|
+
M,
|
|
339
|
+
yt,
|
|
340
|
+
zt,
|
|
341
|
+
Nt
|
|
342
|
+
] }), t[67] = lt, t[68] = ht, t[69] = Q, t[70] = N, t[71] = ot, t[72] = vt, t[73] = A, t[74] = o, t[75] = Ct, t[76] = St, t[77] = M, t[78] = yt, t[79] = zt, t[80] = Nt, t[81] = $, t[82] = f, t[83] = Vt) : Vt = t[83], Vt;
|
|
343
|
+
}
|
|
344
|
+
function xe(i) {
|
|
345
|
+
return i.size;
|
|
346
|
+
}
|
|
347
|
+
function ye(i) {
|
|
348
|
+
return i.size;
|
|
349
|
+
}
|
|
350
|
+
function be(i) {
|
|
351
|
+
return i.color;
|
|
352
|
+
}
|
|
353
|
+
function Me(i) {
|
|
354
|
+
return i.color;
|
|
355
|
+
}
|
|
356
|
+
function Ce(i) {
|
|
357
|
+
return i.color;
|
|
358
|
+
}
|
|
359
|
+
function we(i) {
|
|
360
|
+
return i !== void 0;
|
|
361
|
+
}
|
|
362
|
+
function je(i) {
|
|
363
|
+
return i !== void 0;
|
|
364
|
+
}
|
|
365
|
+
function Oe(i) {
|
|
366
|
+
return i.data;
|
|
367
|
+
}
|
|
368
|
+
function De(i) {
|
|
369
|
+
return i !== void 0;
|
|
370
|
+
}
|
|
371
|
+
function ze(i) {
|
|
372
|
+
return i.data;
|
|
373
|
+
}
|
|
374
|
+
export {
|
|
375
|
+
Ie as C,
|
|
376
|
+
Et as e
|
|
377
|
+
};
|
|
378
|
+
//# sourceMappingURL=index-BzNfurbO.js.map
|