@undp/data-viz 2.0.9 → 2.1.1
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.d.ts +2 -0
- package/dist/AreaChart.js +4 -4
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.cjs.map +1 -1
- package/dist/BarGraph.d.ts +2 -0
- package/dist/BarGraph.js +1699 -1577
- package/dist/BarGraph.js.map +1 -1
- package/dist/BasicStatCard.d.ts +2 -0
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.cjs.map +1 -1
- package/dist/BeeSwarmChart.d.ts +2 -0
- package/dist/BeeSwarmChart.js +258 -267
- package/dist/BeeSwarmChart.js.map +1 -1
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +252 -245
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.cjs.map +1 -1
- package/dist/BulletChart.d.ts +2 -0
- package/dist/BulletChart.js +566 -536
- package/dist/BulletChart.js.map +1 -1
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.cjs.map +1 -1
- package/dist/ButterflyChart.d.ts +2 -0
- package/dist/ButterflyChart.js +388 -378
- package/dist/ButterflyChart.js.map +1 -1
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +297 -291
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.d.ts +2 -0
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/DataCards.d.ts +2 -0
- package/dist/DataCards.js +1 -1
- package/dist/DataTable.d.ts +2 -0
- package/dist/DetailsModal-0Ry5nXiC.js +32 -0
- package/dist/DetailsModal-0Ry5nXiC.js.map +1 -0
- package/dist/DetailsModal-BN0HDFlV.cjs +2 -0
- package/dist/DetailsModal-BN0HDFlV.cjs.map +1 -0
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.d.ts +2 -0
- package/dist/DifferenceLineChart.js +4 -4
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.cjs.map +1 -1
- package/dist/DonutChart.d.ts +2 -0
- package/dist/DonutChart.js +185 -190
- package/dist/DonutChart.js.map +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +252 -244
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.d.ts +2 -0
- package/dist/DualAxisLineChart.js +4 -4
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.cjs.map +1 -1
- package/dist/DumbbellChart.d.ts +2 -0
- package/dist/DumbbellChart.js +563 -525
- package/dist/DumbbellChart.js.map +1 -1
- package/dist/GeoHubCompareMaps.d.ts +2 -0
- package/dist/GeoHubMap.d.ts +2 -0
- package/dist/GeoHubMapWithLayerSelection.d.ts +2 -0
- package/dist/{GraphEl-BcKU0bG1.cjs → GraphEl-B16EYkko.cjs} +2 -2
- package/dist/{GraphEl-BcKU0bG1.cjs.map → GraphEl-B16EYkko.cjs.map} +1 -1
- package/dist/{GraphEl-CGq1EWRn.js → GraphEl-DEzobeOM.js} +3 -3
- package/dist/{GraphEl-CGq1EWRn.js.map → GraphEl-DEzobeOM.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.cjs.map +1 -1
- package/dist/GriddedGraphs.d.ts +2 -0
- package/dist/GriddedGraphs.js +19 -19
- package/dist/GriddedGraphs.js.map +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +2 -0
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.cjs.map +1 -1
- package/dist/HeatMap.d.ts +2 -0
- package/dist/HeatMap.js +112 -117
- package/dist/HeatMap.js.map +1 -1
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.d.ts +2 -0
- package/dist/Histogram.js +3 -3
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.d.ts +2 -0
- package/dist/HybridMap.js +366 -359
- package/dist/HybridMap.js.map +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.d.ts +2 -0
- package/dist/LineChartWithConfidenceInterval.js +4 -4
- package/dist/{Modal-DGcuAHyK.js → Modal-bMQA6bL_.js} +5 -5
- package/dist/{Modal-DGcuAHyK.js.map → Modal-bMQA6bL_.js.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.cjs.map +1 -1
- package/dist/MultiGraphDashboard.d.ts +2 -0
- package/dist/MultiGraphDashboard.js +10 -10
- package/dist/MultiGraphDashboard.js.map +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.d.ts +2 -0
- package/dist/MultiGraphDashboardWideToLongFormat.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.d.ts +2 -0
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.cjs.map +1 -1
- package/dist/MultiLineAltChart.d.ts +2 -0
- package/dist/MultiLineAltChart.js +453 -425
- package/dist/MultiLineAltChart.js.map +1 -1
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.d.ts +2 -0
- package/dist/MultiLineChart.js +4 -4
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.cjs.map +1 -1
- package/dist/ParetoChart.d.ts +2 -0
- package/dist/ParetoChart.js +188 -193
- package/dist/ParetoChart.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +2 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +16 -16
- package/dist/PerformanceIntensiveMultiGraphDashboard.js.map +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +2 -0
- package/dist/PerformanceIntensiveScrollStory.d.ts +2 -0
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.cjs.map +1 -1
- package/dist/RadarChart.d.ts +2 -0
- package/dist/RadarChart.js +158 -163
- package/dist/RadarChart.js.map +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.cjs.map +1 -1
- package/dist/SankeyChart.d.ts +2 -0
- package/dist/SankeyChart.js +172 -177
- package/dist/SankeyChart.js.map +1 -1
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.cjs.map +1 -1
- package/dist/ScatterPlot.d.ts +2 -0
- package/dist/ScatterPlot.js +494 -483
- package/dist/ScatterPlot.js.map +1 -1
- package/dist/ScrollStory.d.ts +2 -0
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.d.ts +2 -0
- package/dist/SimpleLineChart.js +4 -4
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.cjs.map +1 -1
- package/dist/SingleGraphDashboard.d.ts +2 -0
- package/dist/SingleGraphDashboard.js +24 -24
- package/dist/SingleGraphDashboard.js.map +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +2 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +2 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +46 -46
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +2 -0
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.cjs.map +1 -1
- package/dist/SlopeChart.d.ts +2 -0
- package/dist/SlopeChart.js +182 -187
- package/dist/SlopeChart.js.map +1 -1
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.d.ts +2 -0
- package/dist/SparkLine.js +4 -4
- package/dist/StatCardFromData.d.ts +2 -0
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.cjs.map +1 -1
- package/dist/StripChart.d.ts +2 -0
- package/dist/StripChart.js +249 -258
- package/dist/StripChart.js.map +1 -1
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +142 -147
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/Tooltip-Dj5eVppQ.js +45 -0
- package/dist/Tooltip-Dj5eVppQ.js.map +1 -0
- package/dist/Tooltip-uUdw6wJL.cjs +2 -0
- package/dist/Tooltip-uUdw6wJL.cjs.map +1 -0
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.cjs.map +1 -1
- package/dist/TreeMapGraph.d.ts +2 -0
- package/dist/TreeMapGraph.js +159 -164
- package/dist/TreeMapGraph.js.map +1 -1
- package/dist/Types.d.ts +2 -0
- package/dist/UnitChart.d.ts +2 -0
- package/dist/{band-CyHaVft5.js → band-DHUZ2X7J.js} +3 -3
- package/dist/{band-CyHaVft5.js.map → band-DHUZ2X7J.js.map} +1 -1
- package/dist/{checkIfMultiple-Y9iKaV_u.js → checkIfMultiple-CIRtG0KE.js} +2 -2
- package/dist/{checkIfMultiple-Y9iKaV_u.js.map → checkIfMultiple-CIRtG0KE.js.map} +1 -1
- package/dist/index-CF5hnGvG.cjs +2 -0
- package/dist/index-CF5hnGvG.cjs.map +1 -0
- package/dist/index-DPGq3eIL.js +330 -0
- package/dist/index-DPGq3eIL.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -1
- package/dist/{init-BJFW6EwE.js → init-BhZylTFx.js} +3 -3
- package/dist/{init-BJFW6EwE.js.map → init-BhZylTFx.js.map} +1 -1
- package/dist/{linear-BwnDd9KF.js → linear-BqltdMeF.js} +2 -2
- package/dist/{linear-BwnDd9KF.js.map → linear-BqltdMeF.js.map} +1 -1
- package/dist/{ordinal-P77xw8aL.js → ordinal-BJ6O_LC5.js} +2 -2
- package/dist/{ordinal-P77xw8aL.js.map → ordinal-BJ6O_LC5.js.map} +1 -1
- package/dist/{pow-DE4c7dbW.js → pow-CM2aze4M.js} +3 -3
- package/dist/{pow-DE4c7dbW.js.map → pow-CM2aze4M.js.map} +1 -1
- package/dist/{threshold-Bgr20hik.js → threshold-DFfqcDMa.js} +2 -2
- package/dist/{threshold-Bgr20hik.js.map → threshold-DFfqcDMa.js.map} +1 -1
- package/dist/{time-DCCfQk3V.js → time-BUL-dwnK.js} +3 -3
- package/dist/{time-DCCfQk3V.js.map → time-BUL-dwnK.js.map} +1 -1
- package/package.json +4 -4
- package/dist/Tooltip-4dJo4_AF.cjs +0 -2
- package/dist/Tooltip-4dJo4_AF.cjs.map +0 -1
- package/dist/Tooltip-CwWUegPB.js +0 -43
- package/dist/Tooltip-CwWUegPB.js.map +0 -1
- package/dist/index-B2LQV7Tk.js +0 -335
- package/dist/index-B2LQV7Tk.js.map +0 -1
- package/dist/index-xRHRLDIp.cjs +0 -2
- package/dist/index-xRHRLDIp.cjs.map +0 -1
- package/dist/sort-BIvMlUH1.js +0 -34
- package/dist/sort-BIvMlUH1.js.map +0 -1
- package/dist/sort-O96oMZLb.cjs +0 -2
- package/dist/sort-O96oMZLb.cjs.map +0 -1
package/dist/SankeyChart.js
CHANGED
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import { c as Le, j as m, m as
|
|
2
|
-
import { useRef as ae, useState as St, useEffectEvent as
|
|
1
|
+
import { c as Le, j as m, m as Yt } from "./index-CHPV5EwG-Curnpaqc.js";
|
|
2
|
+
import { useRef as ae, useState as St, useEffectEvent as De, useEffect as de } from "react";
|
|
3
3
|
import { s as pe } from "./index-CeVNqhMO.js";
|
|
4
4
|
import { o as me } from "./index-BZQYSqar.js";
|
|
5
|
-
import { i as
|
|
6
|
-
import {
|
|
7
|
-
import { j as Yt } from "./Typography-PxtFcnJb.js";
|
|
5
|
+
import { i as Ce } from "./index-Bwrro8-q.js";
|
|
6
|
+
import { j as _t } from "./Typography-PxtFcnJb.js";
|
|
8
7
|
import { n as ye } from "./numberFormattingFunction-14YCbkN2.js";
|
|
9
|
-
import { T as
|
|
10
|
-
import {
|
|
11
|
-
import { u as
|
|
8
|
+
import { T as Te } from "./Tooltip-Dj5eVppQ.js";
|
|
9
|
+
import { D as Pe } from "./DetailsModal-0Ry5nXiC.js";
|
|
10
|
+
import { u as ze } from "./use-in-view-Cxa7y1TH.js";
|
|
12
11
|
import { m as oe } from "./proxy-BxkFHwUw.js";
|
|
13
|
-
import { A as
|
|
14
|
-
import { GraphHeader as
|
|
12
|
+
import { A as Ee } from "./index-BqfRwk1n.js";
|
|
13
|
+
import { GraphHeader as Be } from "./GraphHeader.js";
|
|
15
14
|
import { GraphFooter as Ae } from "./GraphFooter.js";
|
|
16
15
|
import { Colors as xe } from "./Colors.js";
|
|
17
|
-
import { g as
|
|
18
|
-
import { E as
|
|
16
|
+
import { g as Ie } from "./generateRandomString-za3IQGfQ.js";
|
|
17
|
+
import { E as He } from "./EmptyState-BZo1BbAn.js";
|
|
19
18
|
import { u as Bt } from "./uniqBy-BHy4I8PK.js";
|
|
20
|
-
import { a as
|
|
19
|
+
import { a as We, G as Re } from "./GraphContainer-CRqzdKu2.js";
|
|
21
20
|
function ve(e, t) {
|
|
22
21
|
let o;
|
|
23
22
|
if (t === void 0)
|
|
@@ -54,14 +53,14 @@ function ie(e, t) {
|
|
|
54
53
|
}
|
|
55
54
|
return o;
|
|
56
55
|
}
|
|
57
|
-
function
|
|
56
|
+
function Ge(e) {
|
|
58
57
|
return e.target.depth;
|
|
59
58
|
}
|
|
60
59
|
function qe(e, t) {
|
|
61
60
|
return e.sourceLinks.length ? e.depth : t - 1;
|
|
62
61
|
}
|
|
63
62
|
function re(e) {
|
|
64
|
-
return e.targetLinks.length ? e.depth : e.sourceLinks.length ? Me(e.sourceLinks,
|
|
63
|
+
return e.targetLinks.length ? e.depth : e.sourceLinks.length ? Me(e.sourceLinks, Ge) - 1 : 0;
|
|
65
64
|
}
|
|
66
65
|
function Ut(e) {
|
|
67
66
|
return function() {
|
|
@@ -107,7 +106,7 @@ function le() {
|
|
|
107
106
|
let e = 0, t = 0, o = 1, r = 1, a = 24, y = 8, h, g = Fe, x = qe, b, j, $ = Xe, P = Ye, k = 6;
|
|
108
107
|
function d() {
|
|
109
108
|
const n = { nodes: $.apply(null, arguments), links: P.apply(null, arguments) };
|
|
110
|
-
return
|
|
109
|
+
return S(n), W(n), w(n), O(n), q(n), we(n), n;
|
|
111
110
|
}
|
|
112
111
|
d.update = function(n) {
|
|
113
112
|
return we(n), n;
|
|
@@ -134,7 +133,7 @@ function le() {
|
|
|
134
133
|
}, d.iterations = function(n) {
|
|
135
134
|
return arguments.length ? (k = +n, d) : k;
|
|
136
135
|
};
|
|
137
|
-
function
|
|
136
|
+
function S({ nodes: n, links: l }) {
|
|
138
137
|
for (const [u, i] of n.entries())
|
|
139
138
|
i.index = u, i.sourceLinks = [], i.targetLinks = [];
|
|
140
139
|
const s = new Map(n.map((u, i) => [g(u, i, n), u]));
|
|
@@ -147,7 +146,7 @@ function le() {
|
|
|
147
146
|
for (const { sourceLinks: u, targetLinks: i } of n)
|
|
148
147
|
u.sort(j), i.sort(j);
|
|
149
148
|
}
|
|
150
|
-
function
|
|
149
|
+
function W({ nodes: n }) {
|
|
151
150
|
for (const l of n)
|
|
152
151
|
l.value = l.fixedValue === void 0 ? Math.max(ie(l.sourceLinks, se), ie(l.targetLinks, se)) : l.fixedValue;
|
|
153
152
|
}
|
|
@@ -187,7 +186,7 @@ function le() {
|
|
|
187
186
|
i.sort(b);
|
|
188
187
|
return u;
|
|
189
188
|
}
|
|
190
|
-
function
|
|
189
|
+
function I(n) {
|
|
191
190
|
const l = Me(n, (s) => (r - t - (s.length - 1) * h) / ie(s, se));
|
|
192
191
|
for (const s of n) {
|
|
193
192
|
let u = t;
|
|
@@ -201,50 +200,50 @@ function le() {
|
|
|
201
200
|
const f = s[i];
|
|
202
201
|
f.y0 += u * (i + 1), f.y1 += u * (i + 1);
|
|
203
202
|
}
|
|
204
|
-
|
|
203
|
+
X(s);
|
|
205
204
|
}
|
|
206
205
|
}
|
|
207
206
|
function q(n) {
|
|
208
207
|
const l = B(n);
|
|
209
|
-
h = Math.min(y, (r - t) / (ve(l, (s) => s.length) - 1)),
|
|
208
|
+
h = Math.min(y, (r - t) / (ve(l, (s) => s.length) - 1)), I(l);
|
|
210
209
|
for (let s = 0; s < k; ++s) {
|
|
211
210
|
const u = Math.pow(0.99, s), i = Math.max(1 - u, (s + 1) / k);
|
|
212
|
-
F(l, u, i),
|
|
211
|
+
F(l, u, i), R(l, u, i);
|
|
213
212
|
}
|
|
214
213
|
}
|
|
215
|
-
function
|
|
214
|
+
function R(n, l, s) {
|
|
216
215
|
for (let u = 1, i = n.length; u < i; ++u) {
|
|
217
216
|
const f = n[u];
|
|
218
217
|
for (const v of f) {
|
|
219
|
-
let
|
|
220
|
-
for (const { source:
|
|
221
|
-
let
|
|
222
|
-
|
|
218
|
+
let D = 0, z = 0;
|
|
219
|
+
for (const { source: H, value: Y } of v.targetLinks) {
|
|
220
|
+
let _ = Y * (v.layer - H.layer);
|
|
221
|
+
D += V(H, v) * _, z += _;
|
|
223
222
|
}
|
|
224
223
|
if (!(z > 0)) continue;
|
|
225
|
-
let
|
|
226
|
-
v.y0 +=
|
|
224
|
+
let C = (D / z - v.y0) * l;
|
|
225
|
+
v.y0 += C, v.y1 += C, kt(v);
|
|
227
226
|
}
|
|
228
|
-
b === void 0 && f.sort(Zt),
|
|
227
|
+
b === void 0 && f.sort(Zt), G(f, s);
|
|
229
228
|
}
|
|
230
229
|
}
|
|
231
230
|
function F(n, l, s) {
|
|
232
231
|
for (let u = n.length, i = u - 2; i >= 0; --i) {
|
|
233
232
|
const f = n[i];
|
|
234
233
|
for (const v of f) {
|
|
235
|
-
let
|
|
236
|
-
for (const { target:
|
|
237
|
-
let
|
|
238
|
-
|
|
234
|
+
let D = 0, z = 0;
|
|
235
|
+
for (const { target: H, value: Y } of v.sourceLinks) {
|
|
236
|
+
let _ = Y * (H.layer - v.layer);
|
|
237
|
+
D += L(v, H) * _, z += _;
|
|
239
238
|
}
|
|
240
239
|
if (!(z > 0)) continue;
|
|
241
|
-
let
|
|
242
|
-
v.y0 +=
|
|
240
|
+
let C = (D / z - v.y0) * l;
|
|
241
|
+
v.y0 += C, v.y1 += C, kt(v);
|
|
243
242
|
}
|
|
244
|
-
b === void 0 && f.sort(Zt),
|
|
243
|
+
b === void 0 && f.sort(Zt), G(f, s);
|
|
245
244
|
}
|
|
246
245
|
}
|
|
247
|
-
function
|
|
246
|
+
function G(n, l) {
|
|
248
247
|
const s = n.length >> 1, u = n[s];
|
|
249
248
|
K(n, u.y0 - h, s - 1, l), N(n, u.y1 + h, s + 1, l), K(n, r, n.length - 1, l), N(n, t, 0, l);
|
|
250
249
|
}
|
|
@@ -268,7 +267,7 @@ function le() {
|
|
|
268
267
|
s.sort(ke);
|
|
269
268
|
}
|
|
270
269
|
}
|
|
271
|
-
function
|
|
270
|
+
function X(n) {
|
|
272
271
|
if (j === void 0)
|
|
273
272
|
for (const { sourceLinks: l, targetLinks: s } of n)
|
|
274
273
|
l.sort(be), s.sort(ke);
|
|
@@ -285,7 +284,7 @@ function le() {
|
|
|
285
284
|
}
|
|
286
285
|
return s;
|
|
287
286
|
}
|
|
288
|
-
function
|
|
287
|
+
function L(n, l) {
|
|
289
288
|
let s = l.y0 - (l.targetLinks.length - 1) * h / 2;
|
|
290
289
|
for (const { source: u, width: i } of l.targetLinks) {
|
|
291
290
|
if (u === n) break;
|
|
@@ -299,7 +298,7 @@ function le() {
|
|
|
299
298
|
}
|
|
300
299
|
return d;
|
|
301
300
|
}
|
|
302
|
-
var ue = Math.PI, ce = 2 * ue,
|
|
301
|
+
var ue = Math.PI, ce = 2 * ue, Dt = 1e-6, _e = ce - Dt;
|
|
303
302
|
function fe() {
|
|
304
303
|
this._x0 = this._y0 = // start of current subpath
|
|
305
304
|
this._x1 = this._y1 = null, this._ = "";
|
|
@@ -330,18 +329,18 @@ fe.prototype = Se.prototype = {
|
|
|
330
329
|
if (a < 0) throw new Error("negative radius: " + a);
|
|
331
330
|
if (this._x1 === null)
|
|
332
331
|
this._ += "M" + (this._x1 = e) + "," + (this._y1 = t);
|
|
333
|
-
else if ($ >
|
|
332
|
+
else if ($ > Dt) if (!(Math.abs(j * g - x * b) > Dt) || !a)
|
|
334
333
|
this._ += "L" + (this._x1 = e) + "," + (this._y1 = t);
|
|
335
334
|
else {
|
|
336
|
-
var P = o - y, k = r - h, d = g * g + x * x,
|
|
337
|
-
Math.abs(B - 1) >
|
|
335
|
+
var P = o - y, k = r - h, d = g * g + x * x, S = P * P + k * k, W = Math.sqrt(d), w = Math.sqrt($), O = a * Math.tan((ue - Math.acos((d + $ - S) / (2 * W * w))) / 2), B = O / w, I = O / W;
|
|
336
|
+
Math.abs(B - 1) > Dt && (this._ += "L" + (e + B * b) + "," + (t + B * j)), this._ += "A" + a + "," + a + ",0,0," + +(j * P > b * k) + "," + (this._x1 = e + I * g) + "," + (this._y1 = t + I * x);
|
|
338
337
|
}
|
|
339
338
|
},
|
|
340
339
|
arc: function(e, t, o, r, a, y) {
|
|
341
340
|
e = +e, t = +t, o = +o, y = !!y;
|
|
342
341
|
var h = o * Math.cos(r), g = o * Math.sin(r), x = e + h, b = t + g, j = 1 ^ y, $ = y ? r - a : a - r;
|
|
343
342
|
if (o < 0) throw new Error("negative radius: " + o);
|
|
344
|
-
this._x1 === null ? this._ += "M" + x + "," + b : (Math.abs(this._x1 - x) >
|
|
343
|
+
this._x1 === null ? this._ += "M" + x + "," + b : (Math.abs(this._x1 - x) > Dt || Math.abs(this._y1 - b) > Dt) && (this._ += "L" + x + "," + b), o && ($ < 0 && ($ = $ % ce + ce), $ > _e ? this._ += "A" + o + "," + o + ",0,1," + j + "," + (e - h) + "," + (t - g) + "A" + o + "," + o + ",0,1," + j + "," + (this._x1 = x) + "," + (this._y1 = b) : $ > Dt && (this._ += "A" + o + "," + o + ",0," + +($ >= ue) + "," + j + "," + (this._x1 = e + o * Math.cos(a)) + "," + (this._y1 = t + o * Math.sin(a))));
|
|
345
344
|
},
|
|
346
345
|
rect: function(e, t, o, r) {
|
|
347
346
|
this._ += "M" + (this._x0 = this._x1 = +e) + "," + (this._y0 = this._y1 = +t) + "h" + +o + "v" + +r + "h" + -o + "Z";
|
|
@@ -355,23 +354,23 @@ function $e(e) {
|
|
|
355
354
|
return e;
|
|
356
355
|
};
|
|
357
356
|
}
|
|
358
|
-
function
|
|
357
|
+
function Ue(e) {
|
|
359
358
|
return e[0];
|
|
360
359
|
}
|
|
361
|
-
function
|
|
360
|
+
function Ze(e) {
|
|
362
361
|
return e[1];
|
|
363
362
|
}
|
|
364
|
-
var
|
|
365
|
-
function
|
|
363
|
+
var Qe = Array.prototype.slice;
|
|
364
|
+
function Je(e) {
|
|
366
365
|
return e.source;
|
|
367
366
|
}
|
|
368
|
-
function
|
|
367
|
+
function Ke(e) {
|
|
369
368
|
return e.target;
|
|
370
369
|
}
|
|
371
|
-
function
|
|
372
|
-
var t =
|
|
370
|
+
function tn(e) {
|
|
371
|
+
var t = Je, o = Ke, r = Ue, a = Ze, y = null;
|
|
373
372
|
function h() {
|
|
374
|
-
var g, x =
|
|
373
|
+
var g, x = Qe.call(arguments), b = t.apply(this, x), j = o.apply(this, x);
|
|
375
374
|
if (y || (y = g = Se()), e(y, +r.apply(this, (x[0] = b, x)), +a.apply(this, x), +r.apply(this, (x[0] = j, x)), +a.apply(this, x)), g) return y = null, g + "" || null;
|
|
376
375
|
}
|
|
377
376
|
return h.source = function(g) {
|
|
@@ -386,23 +385,23 @@ function en(e) {
|
|
|
386
385
|
return arguments.length ? (y = g ?? null, h) : y;
|
|
387
386
|
}, h;
|
|
388
387
|
}
|
|
389
|
-
function
|
|
388
|
+
function en(e, t, o, r, a) {
|
|
390
389
|
e.moveTo(t, o), e.bezierCurveTo(t = (t + r) / 2, o, t, a, r, a);
|
|
391
390
|
}
|
|
392
|
-
function
|
|
393
|
-
return en
|
|
391
|
+
function nn() {
|
|
392
|
+
return tn(en);
|
|
394
393
|
}
|
|
395
|
-
function
|
|
394
|
+
function on(e) {
|
|
396
395
|
return [e.source.x1, e.y0];
|
|
397
396
|
}
|
|
398
|
-
function
|
|
397
|
+
function rn(e) {
|
|
399
398
|
return [e.target.x0, e.y1];
|
|
400
399
|
}
|
|
401
|
-
function
|
|
402
|
-
return
|
|
400
|
+
function sn() {
|
|
401
|
+
return nn().source(on).target(rn);
|
|
403
402
|
}
|
|
404
|
-
function
|
|
405
|
-
const t = Le.c(
|
|
403
|
+
function ln(e) {
|
|
404
|
+
const t = Le.c(136), {
|
|
406
405
|
data: o,
|
|
407
406
|
showLabels: r,
|
|
408
407
|
leftMargin: a,
|
|
@@ -416,22 +415,22 @@ function an(e) {
|
|
|
416
415
|
onSeriesMouseOver: P,
|
|
417
416
|
suffix: k,
|
|
418
417
|
prefix: d,
|
|
419
|
-
showValues:
|
|
420
|
-
onSeriesMouseClick:
|
|
418
|
+
showValues: S,
|
|
419
|
+
onSeriesMouseClick: W,
|
|
421
420
|
nodePadding: w,
|
|
422
421
|
nodeWidth: O,
|
|
423
422
|
id: B,
|
|
424
|
-
highlightedSourceDataPoints:
|
|
423
|
+
highlightedSourceDataPoints: I,
|
|
425
424
|
highlightedTargetDataPoints: q,
|
|
426
|
-
defaultLinkOpacity:
|
|
425
|
+
defaultLinkOpacity: R,
|
|
427
426
|
sourceTitle: F,
|
|
428
|
-
targetTitle:
|
|
427
|
+
targetTitle: G,
|
|
429
428
|
animate: N,
|
|
430
429
|
sortNodes: K,
|
|
431
430
|
resetSelectionOnDoubleClick: kt,
|
|
432
|
-
detailsOnClick:
|
|
431
|
+
detailsOnClick: X,
|
|
433
432
|
styles: V,
|
|
434
|
-
classNames:
|
|
433
|
+
classNames: L,
|
|
435
434
|
precision: n,
|
|
436
435
|
customLayers: l
|
|
437
436
|
} = e, s = ae(null);
|
|
@@ -440,78 +439,78 @@ function an(e) {
|
|
|
440
439
|
once: N.once,
|
|
441
440
|
amount: N.amount
|
|
442
441
|
}, t[0] = N.amount, t[1] = N.once, t[2] = u) : u = t[2];
|
|
443
|
-
const i =
|
|
444
|
-
let
|
|
445
|
-
t[3] !== j || t[4] !== a || t[5] !== y || t[6] !== b ? (
|
|
442
|
+
const i = ze(s, u), [f, v] = St(void 0), [D, z] = St(void 0), [C, H] = St(void 0), [Y, _] = St(void 0), [Ot, Nt] = St(void 0);
|
|
443
|
+
let M;
|
|
444
|
+
t[3] !== j || t[4] !== a || t[5] !== y || t[6] !== b ? (M = {
|
|
446
445
|
top: b,
|
|
447
446
|
bottom: j,
|
|
448
447
|
left: a,
|
|
449
448
|
right: y
|
|
450
|
-
}, t[3] = j, t[4] = a, t[5] = y, t[6] = b, t[7] =
|
|
451
|
-
const p =
|
|
449
|
+
}, t[3] = j, t[4] = a, t[5] = y, t[6] = b, t[7] = M) : M = t[7];
|
|
450
|
+
const p = M, jt = g - p.left - p.right, wt = x - p.top - p.bottom;
|
|
452
451
|
let tt, st, lt, U, at, ut, Z, Q, ct, ft, J, et, nt, ot, ht, gt;
|
|
453
|
-
if (t[8] !== N.duration || t[9] !==
|
|
454
|
-
const
|
|
455
|
-
nodes:
|
|
456
|
-
links:
|
|
457
|
-
} =
|
|
452
|
+
if (t[8] !== N.duration || t[9] !== L?.graphObjectValues || t[10] !== l || t[11] !== o || t[12] !== R || t[13] !== X || t[14] !== wt || t[15] !== jt || t[16] !== x || t[17] !== I || t[18] !== q || t[19] !== B || t[20] !== i || t[21] !== a || t[22] !== p.left || t[23] !== p.right || t[24] !== p.top || t[25] !== D || t[26] !== w || t[27] !== O || t[28] !== W || t[29] !== P || t[30] !== n || t[31] !== d || t[32] !== kt || t[33] !== y || t[34] !== C || t[35] !== r || t[36] !== S || t[37] !== K || t[38] !== F || t[39] !== V?.graphObjectValues || t[40] !== k || t[41] !== G || t[42] !== h || t[43] !== g) {
|
|
453
|
+
const At = K === "mostReadable" ? le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re) : K === "none" ? le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re).nodeSort(yn).linkSort(mn) : le().nodeWidth(O).nodePadding(w).size([jt, wt]).nodeAlign(re).nodeSort(K === "desc" ? pn : dn), {
|
|
454
|
+
nodes: T,
|
|
455
|
+
links: Ct
|
|
456
|
+
} = At(o), Tt = sn();
|
|
458
457
|
st = oe.svg, ht = `${g}px`, gt = `${x}px`, lt = `0 0 ${g} ${x}`, t[60] === Symbol.for("react.memo_cache_sentinel") ? (U = {
|
|
459
458
|
marginLeft: "auto",
|
|
460
459
|
marginRight: "auto"
|
|
461
460
|
}, t[60] = U) : U = t[60], at = "ltr", ut = s, t[61] !== p.left || t[62] !== p.top || t[63] !== F ? (Z = F ? /* @__PURE__ */ m.jsx("text", { x: p.left, y: p.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
|
|
462
461
|
textAnchor: "start"
|
|
463
|
-
}, children: F }) : null, t[61] = p.left, t[62] = p.top, t[63] = F, t[64] = Z) : Z = t[64], t[65] !== p.right || t[66] !== p.top || t[67] !==
|
|
462
|
+
}, children: F }) : null, t[61] = p.left, t[62] = p.top, t[63] = F, t[64] = Z) : Z = t[64], t[65] !== p.right || t[66] !== p.top || t[67] !== G || t[68] !== g ? (Q = G ? /* @__PURE__ */ m.jsx("text", { x: g - p.right, y: p.top - 10, className: "text-base font-bold fill-primary-gray-700 dark:fill-primary-gray-100", style: {
|
|
464
463
|
textAnchor: "end"
|
|
465
|
-
}, children:
|
|
464
|
+
}, children: G }) : null, t[65] = p.right, t[66] = p.top, t[67] = G, t[68] = g, t[69] = Q) : Q = t[69], ft = `translate(${p.left},${p.top})`, t[70] !== l ? (J = l.filter(gn).map(hn), t[70] = l, t[71] = J) : J = t[71];
|
|
466
465
|
let Lt;
|
|
467
|
-
t[72] !==
|
|
468
|
-
|
|
466
|
+
t[72] !== L?.graphObjectValues || t[73] !== a || t[74] !== w || t[75] !== n || t[76] !== d || t[77] !== r || t[78] !== S || t[79] !== V?.graphObjectValues || t[80] !== k || t[81] !== h ? (Lt = (c, xt) => /* @__PURE__ */ m.jsx("g", { onMouseEnter: () => {
|
|
467
|
+
H(c);
|
|
469
468
|
}, onMouseLeave: () => {
|
|
470
|
-
|
|
469
|
+
H(void 0);
|
|
471
470
|
}, children: /* @__PURE__ */ m.jsxs("g", { transform: `translate(${c.x0},${c.y0})`, children: [
|
|
472
471
|
/* @__PURE__ */ m.jsx("rect", { x: 0, y: 0, width: (c.x1 || 0) - (c.x0 || 0), height: (c.y1 || 0) - (c.y0 || 0), style: {
|
|
473
472
|
fill: c.color
|
|
474
473
|
} }),
|
|
475
|
-
r ||
|
|
474
|
+
r || S ? /* @__PURE__ */ m.jsx("foreignObject", { y: 0 - w / 2, x: 0 - a, width: a, height: (c.y1 || 0) - (c.y0 || 0) + w, children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col gap-0.5 justify-center py-0 px-1.5", style: {
|
|
476
475
|
height: `${(c.y1 || 0) - (c.y0 || 0) + w}px`,
|
|
477
476
|
overflow: "visible"
|
|
478
477
|
}, children: [
|
|
479
|
-
r ? /* @__PURE__ */ m.jsx(
|
|
478
|
+
r ? /* @__PURE__ */ m.jsx(_t, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Yt("sankey-right-label text-right", L?.graphObjectValues), style: {
|
|
480
479
|
hyphens: "auto",
|
|
481
480
|
color: c.color,
|
|
482
481
|
...V?.graphObjectValues
|
|
483
482
|
}, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
|
|
484
|
-
|
|
483
|
+
S ? /* @__PURE__ */ m.jsx(_t, { marginBottom: "none", size: "sm", leading: "none", className: Yt("sankey-right-value text-right font-bold", L?.graphObjectValues), style: {
|
|
485
484
|
hyphens: "auto",
|
|
486
485
|
color: c.color,
|
|
487
486
|
...V?.graphObjectValues
|
|
488
487
|
}, children: ye(c.value, "NA", n, d, k) }) : null
|
|
489
488
|
] }) }) : null
|
|
490
|
-
] }) }, xt), t[72] =
|
|
489
|
+
] }) }, xt), t[72] = L?.graphObjectValues, t[73] = a, t[74] = w, t[75] = n, t[76] = d, t[77] = r, t[78] = S, t[79] = V?.graphObjectValues, t[80] = k, t[81] = h, t[82] = Lt) : Lt = t[82], et = T.filter(fn).map(Lt);
|
|
491
490
|
let bt;
|
|
492
|
-
t[83] !==
|
|
493
|
-
|
|
491
|
+
t[83] !== L?.graphObjectValues || t[84] !== w || t[85] !== O || t[86] !== n || t[87] !== d || t[88] !== y || t[89] !== r || t[90] !== S || t[91] !== V?.graphObjectValues || t[92] !== k || t[93] !== h ? (bt = (c, xt) => /* @__PURE__ */ m.jsx("g", { onMouseEnter: () => {
|
|
492
|
+
H(c);
|
|
494
493
|
}, onMouseLeave: () => {
|
|
495
|
-
|
|
494
|
+
H(void 0);
|
|
496
495
|
}, children: /* @__PURE__ */ m.jsxs("g", { transform: `translate(${c.x0},${c.y0})`, children: [
|
|
497
496
|
/* @__PURE__ */ m.jsx("rect", { x: 0, y: 0, width: (c.x1 || 0) - (c.x0 || 0), height: (c.y1 || 0) - (c.y0 || 0), style: {
|
|
498
497
|
fill: c.color
|
|
499
498
|
} }),
|
|
500
|
-
r ||
|
|
499
|
+
r || S ? /* @__PURE__ */ m.jsx("foreignObject", { y: 0 - w / 2, x: O, width: y - O, height: (c.y1 || 0) - (c.y0 || 0) + w, children: /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col gap-0.5 justify-center py-0 px-1.5", style: {
|
|
501
500
|
height: `${(c.y1 || 0) - (c.y0 || 0) + w}px`
|
|
502
501
|
}, children: [
|
|
503
|
-
r ? /* @__PURE__ */ m.jsx(
|
|
502
|
+
r ? /* @__PURE__ */ m.jsx(_t, { marginBottom: S ? "3xs" : "none", size: "sm", leading: "none", className: Yt("sankey-left-label text-left", L?.graphObjectValues), style: {
|
|
504
503
|
hyphens: "auto",
|
|
505
504
|
color: c.color,
|
|
506
505
|
...V?.graphObjectValues
|
|
507
506
|
}, children: `${c.label}`.length < h ? `${c.label}` : `${`${c.label}`.substring(0, h)}...` }) : null,
|
|
508
|
-
|
|
507
|
+
S ? /* @__PURE__ */ m.jsx(_t, { size: "sm", leading: "none", marginBottom: "none", className: Yt("sankey-left-value text-left font-bold", L?.graphObjectValues), style: {
|
|
509
508
|
hyphens: "auto",
|
|
510
509
|
color: c.color,
|
|
511
510
|
...V?.graphObjectValues
|
|
512
511
|
}, children: ye(c.value, "NA", n, d, k) }) : null
|
|
513
512
|
] }) }) : null
|
|
514
|
-
] }) }, xt), t[83] =
|
|
513
|
+
] }) }, xt), t[83] = L?.graphObjectValues, t[84] = w, t[85] = O, t[86] = n, t[87] = d, t[88] = y, t[89] = r, t[90] = S, t[91] = V?.graphObjectValues, t[92] = k, t[93] = h, t[94] = bt) : bt = t[94], nt = T.filter(cn).map(bt);
|
|
515
514
|
let Mt;
|
|
516
515
|
t[95] !== B ? (Mt = (c, xt) => /* @__PURE__ */ m.jsxs("linearGradient", { id: `${B}-gradient-${xt}`, x1: "0%", y1: "0%", x2: "100%", y2: "0%", gradientUnits: "userSpaceOnUse", children: [
|
|
517
516
|
/* @__PURE__ */ m.jsx("stop", { offset: "0%", style: {
|
|
@@ -522,20 +521,20 @@ function an(e) {
|
|
|
522
521
|
stopColor: c.target.color,
|
|
523
522
|
stopOpacity: 1
|
|
524
523
|
} })
|
|
525
|
-
] }, xt), t[95] = B, t[96] = Mt) : Mt = t[96], ot = /* @__PURE__ */ m.jsx("defs", { children:
|
|
526
|
-
v(c.data), Nt(vt.clientY),
|
|
524
|
+
] }, xt), t[95] = B, t[96] = Mt) : Mt = t[96], ot = /* @__PURE__ */ m.jsx("defs", { children: Ct.map(Mt) }), tt = Ee, ct = Ct.map((c, xt) => /* @__PURE__ */ m.jsx(oe.g, { className: "undp-viz-g-with-hover", onMouseEnter: (vt) => {
|
|
525
|
+
v(c.data), Nt(vt.clientY), _(vt.clientX), P?.(c);
|
|
527
526
|
}, onMouseMove: (vt) => {
|
|
528
|
-
v(c.data), Nt(vt.clientY),
|
|
527
|
+
v(c.data), Nt(vt.clientY), _(vt.clientX);
|
|
529
528
|
}, onClick: () => {
|
|
530
|
-
(
|
|
529
|
+
(W || X) && (Ce(D, c.data) && kt ? (z(void 0), W?.(void 0)) : (z(c.data), W?.(c.data)));
|
|
531
530
|
}, onMouseLeave: () => {
|
|
532
|
-
v(void 0),
|
|
531
|
+
v(void 0), _(void 0), Nt(void 0), P?.(void 0);
|
|
533
532
|
}, variants: {
|
|
534
533
|
initial: {
|
|
535
|
-
opacity:
|
|
534
|
+
opacity: C ? c.source.name === C.name || c.target.name === C.name ? 0.85 : R : (I.length !== 0 || q.length !== 0) && (I.indexOf(c.source.label) !== -1 || q.indexOf(c.target.label) !== -1) ? 0.85 : R
|
|
536
535
|
},
|
|
537
536
|
whileInView: {
|
|
538
|
-
opacity:
|
|
537
|
+
opacity: C ? c.source.name === C.name || c.target.name === C.name ? 0.85 : R : (I.length !== 0 || q.length !== 0) && (I.indexOf(c.source.label) !== -1 || q.indexOf(c.target.label) !== -1) ? 0.85 : R,
|
|
539
538
|
transition: {
|
|
540
539
|
duration: N.duration
|
|
541
540
|
}
|
|
@@ -545,7 +544,7 @@ function an(e) {
|
|
|
545
544
|
transition: {
|
|
546
545
|
duration: N.duration
|
|
547
546
|
}
|
|
548
|
-
}, children: /* @__PURE__ */ m.jsx(oe.path, { d:
|
|
547
|
+
}, children: /* @__PURE__ */ m.jsx(oe.path, { d: Tt(c) || "", style: {
|
|
549
548
|
stroke: `url(#${B}-gradient-${xt})`,
|
|
550
549
|
strokeWidth: c.width,
|
|
551
550
|
fill: "none"
|
|
@@ -566,13 +565,13 @@ function an(e) {
|
|
|
566
565
|
duration: N.duration
|
|
567
566
|
}
|
|
568
567
|
}
|
|
569
|
-
}, initial: "initial", animate: i ? "whileInView" : "initial" }, `${c.source}-${c.target}`) }, `${c.source}-${c.target}`)), t[8] = N.duration, t[9] =
|
|
568
|
+
}, initial: "initial", animate: i ? "whileInView" : "initial" }, `${c.source}-${c.target}`) }, `${c.source}-${c.target}`)), t[8] = N.duration, t[9] = L?.graphObjectValues, t[10] = l, t[11] = o, t[12] = R, t[13] = X, t[14] = wt, t[15] = jt, t[16] = x, t[17] = I, t[18] = q, t[19] = B, t[20] = i, t[21] = a, t[22] = p.left, t[23] = p.right, t[24] = p.top, t[25] = D, t[26] = w, t[27] = O, t[28] = W, t[29] = P, t[30] = n, t[31] = d, t[32] = kt, t[33] = y, t[34] = C, t[35] = r, t[36] = S, t[37] = K, t[38] = F, t[39] = V?.graphObjectValues, t[40] = k, t[41] = G, t[42] = h, t[43] = g, t[44] = tt, t[45] = st, t[46] = lt, t[47] = U, t[48] = at, t[49] = ut, t[50] = Z, t[51] = Q, t[52] = ct, t[53] = ft, t[54] = J, t[55] = et, t[56] = nt, t[57] = ot, t[58] = ht, t[59] = gt;
|
|
570
569
|
} else
|
|
571
570
|
tt = t[44], st = t[45], lt = t[46], U = t[47], at = t[48], ut = t[49], Z = t[50], Q = t[51], ct = t[52], ft = t[53], J = t[54], et = t[55], nt = t[56], ot = t[57], ht = t[58], gt = t[59];
|
|
572
571
|
let dt;
|
|
573
572
|
t[97] !== tt || t[98] !== ct ? (dt = /* @__PURE__ */ m.jsx("g", { children: /* @__PURE__ */ m.jsx(tt, { children: ct }) }), t[97] = tt, t[98] = ct, t[99] = dt) : dt = t[99];
|
|
574
573
|
let pt;
|
|
575
|
-
t[100] !== l ? (pt = l.filter(
|
|
574
|
+
t[100] !== l ? (pt = l.filter(un).map(an), t[100] = l, t[101] = pt) : pt = t[101];
|
|
576
575
|
let mt;
|
|
577
576
|
t[102] !== dt || t[103] !== pt || t[104] !== ft || t[105] !== J || t[106] !== et || t[107] !== nt || t[108] !== ot ? (mt = /* @__PURE__ */ m.jsxs("g", { transform: ft, children: [
|
|
578
577
|
J,
|
|
@@ -589,51 +588,47 @@ function an(e) {
|
|
|
589
588
|
mt
|
|
590
589
|
] }), t[110] = st, t[111] = lt, t[112] = U, t[113] = at, t[114] = ut, t[115] = Z, t[116] = Q, t[117] = mt, t[118] = ht, t[119] = gt, t[120] = it) : it = t[120];
|
|
591
590
|
let yt;
|
|
592
|
-
t[121] !==
|
|
591
|
+
t[121] !== L?.tooltip || t[122] !== Y || t[123] !== Ot || t[124] !== f || t[125] !== V?.tooltip || t[126] !== $ ? (yt = f && $ && Y && Ot ? /* @__PURE__ */ m.jsx(Te, { data: f, body: $, xPos: Y, yPos: Ot, backgroundStyle: V?.tooltip, className: L?.tooltip }) : null, t[121] = L?.tooltip, t[122] = Y, t[123] = Ot, t[124] = f, t[125] = V?.tooltip, t[126] = $, t[127] = yt) : yt = t[127];
|
|
593
592
|
let rt;
|
|
594
|
-
t[128] !==
|
|
595
|
-
z(void 0);
|
|
596
|
-
}, children: /* @__PURE__ */ m.jsx("div", { className: "graph-modal-content m-0", dangerouslySetInnerHTML: typeof I == "string" ? {
|
|
597
|
-
__html: ze(I, S)
|
|
598
|
-
} : void 0, children: typeof I == "function" ? I(S) : null }) }) : null, t[128] = I, t[129] = S, t[130] = rt) : rt = t[130];
|
|
593
|
+
t[128] !== L?.modal || t[129] !== X || t[130] !== D ? (rt = X && D !== void 0 ? /* @__PURE__ */ m.jsx(Pe, { body: X, data: D, setData: z, className: L?.modal }) : null, t[128] = L?.modal, t[129] = X, t[130] = D, t[131] = rt) : rt = t[131];
|
|
599
594
|
let $t;
|
|
600
|
-
return t[
|
|
595
|
+
return t[132] !== it || t[133] !== yt || t[134] !== rt ? ($t = /* @__PURE__ */ m.jsxs(m.Fragment, { children: [
|
|
601
596
|
it,
|
|
602
597
|
yt,
|
|
603
598
|
rt
|
|
604
|
-
] }), t[
|
|
599
|
+
] }), t[132] = it, t[133] = yt, t[134] = rt, t[135] = $t) : $t = t[135], $t;
|
|
605
600
|
}
|
|
606
|
-
function
|
|
601
|
+
function an(e) {
|
|
607
602
|
return e.layer;
|
|
608
603
|
}
|
|
609
|
-
function
|
|
604
|
+
function un(e) {
|
|
610
605
|
return e.position === "after";
|
|
611
606
|
}
|
|
612
|
-
function
|
|
607
|
+
function cn(e) {
|
|
613
608
|
return e.type === "target";
|
|
614
609
|
}
|
|
615
|
-
function
|
|
610
|
+
function fn(e) {
|
|
616
611
|
return e.type === "source";
|
|
617
612
|
}
|
|
618
|
-
function
|
|
613
|
+
function hn(e) {
|
|
619
614
|
return e.layer;
|
|
620
615
|
}
|
|
621
|
-
function
|
|
616
|
+
function gn(e) {
|
|
622
617
|
return e.position === "before";
|
|
623
618
|
}
|
|
624
|
-
function
|
|
619
|
+
function dn(e, t) {
|
|
625
620
|
return (e.value || 0) - (t.value || 0);
|
|
626
621
|
}
|
|
627
|
-
function
|
|
622
|
+
function pn(e, t) {
|
|
628
623
|
return (t.value || 0) - (e.value || 0);
|
|
629
624
|
}
|
|
630
|
-
function
|
|
625
|
+
function mn() {
|
|
631
626
|
return null;
|
|
632
627
|
}
|
|
633
|
-
function
|
|
628
|
+
function yn() {
|
|
634
629
|
return null;
|
|
635
630
|
}
|
|
636
|
-
function
|
|
631
|
+
function Xn(e) {
|
|
637
632
|
const t = Le.c(93), {
|
|
638
633
|
data: o,
|
|
639
634
|
graphTitle: r,
|
|
@@ -648,22 +643,22 @@ function Yn(e) {
|
|
|
648
643
|
height: P,
|
|
649
644
|
width: k,
|
|
650
645
|
footNote: d,
|
|
651
|
-
padding:
|
|
652
|
-
backgroundColor:
|
|
646
|
+
padding: S,
|
|
647
|
+
backgroundColor: W,
|
|
653
648
|
tooltip: w,
|
|
654
649
|
onSeriesMouseOver: O,
|
|
655
650
|
suffix: B,
|
|
656
|
-
prefix:
|
|
651
|
+
prefix: I,
|
|
657
652
|
relativeHeight: q,
|
|
658
|
-
showValues:
|
|
653
|
+
showValues: R,
|
|
659
654
|
graphID: F,
|
|
660
|
-
onSeriesMouseClick:
|
|
655
|
+
onSeriesMouseClick: G,
|
|
661
656
|
graphDownload: N,
|
|
662
657
|
dataDownload: K,
|
|
663
658
|
fillContainer: kt,
|
|
664
|
-
language:
|
|
659
|
+
language: X,
|
|
665
660
|
minHeight: V,
|
|
666
|
-
theme:
|
|
661
|
+
theme: L,
|
|
667
662
|
ariaLabel: n,
|
|
668
663
|
sourceColors: l,
|
|
669
664
|
targetColors: s,
|
|
@@ -671,49 +666,49 @@ function Yn(e) {
|
|
|
671
666
|
targetColorDomain: i,
|
|
672
667
|
nodePadding: f,
|
|
673
668
|
nodeWidth: v,
|
|
674
|
-
highlightedSourceDataPoints:
|
|
669
|
+
highlightedSourceDataPoints: D,
|
|
675
670
|
highlightedTargetDataPoints: z,
|
|
676
|
-
defaultLinkOpacity:
|
|
677
|
-
sourceTitle:
|
|
678
|
-
targetTitle:
|
|
679
|
-
sortNodes:
|
|
671
|
+
defaultLinkOpacity: C,
|
|
672
|
+
sourceTitle: H,
|
|
673
|
+
targetTitle: Y,
|
|
674
|
+
sortNodes: _,
|
|
680
675
|
resetSelectionOnDoubleClick: Ot,
|
|
681
676
|
detailsOnClick: Nt,
|
|
682
|
-
styles:
|
|
677
|
+
styles: M,
|
|
683
678
|
classNames: p,
|
|
684
679
|
animate: jt,
|
|
685
680
|
precision: wt,
|
|
686
681
|
customLayers: tt
|
|
687
|
-
} = e, st = h === void 0 ? !0 : h, lt = g === void 0 ? 75 : g, U = x === void 0 ? 75 : x, at = b === void 0 ? 30 : b, ut = j === void 0 ? 10 : j, Z = $ === void 0 ? 999 : $, Q =
|
|
682
|
+
} = e, st = h === void 0 ? !0 : h, lt = g === void 0 ? 75 : g, U = x === void 0 ? 75 : x, at = b === void 0 ? 30 : b, ut = j === void 0 ? 10 : j, Z = $ === void 0 ? 999 : $, Q = W === void 0 ? !1 : W, ct = B === void 0 ? "" : B, ft = I === void 0 ? "" : I, J = R === void 0 ? !0 : R, et = N === void 0 ? !1 : N, nt = K === void 0 ? !1 : K, ot = kt === void 0 ? !0 : kt, ht = X === void 0 ? "en" : X, gt = V === void 0 ? 0 : V, dt = L === void 0 ? "light" : L, pt = f === void 0 ? 5 : f, mt = v === void 0 ? 5 : v;
|
|
688
683
|
let it;
|
|
689
|
-
t[0] !==
|
|
684
|
+
t[0] !== D ? (it = D === void 0 ? [] : D, t[0] = D, t[1] = it) : it = t[1];
|
|
690
685
|
const yt = it;
|
|
691
686
|
let rt;
|
|
692
687
|
t[2] !== z ? (rt = z === void 0 ? [] : z, t[2] = z, t[3] = rt) : rt = t[3];
|
|
693
|
-
const $t = rt,
|
|
688
|
+
const $t = rt, At = C === void 0 ? 0.3 : C, T = _ === void 0 ? "mostReadable" : _, Ct = Ot === void 0 ? !0 : Ot, Tt = jt === void 0 ? !1 : jt, Lt = wt === void 0 ? 2 : wt;
|
|
694
689
|
let bt;
|
|
695
690
|
t[4] !== tt ? (bt = tt === void 0 ? [] : tt, t[4] = tt, t[5] = bt) : bt = t[5];
|
|
696
|
-
const Mt = bt, [c, xt] = St(0), [vt, Oe] = St(0), [
|
|
691
|
+
const Mt = bt, [c, xt] = St(0), [vt, Oe] = St(0), [It, Ne] = St(void 0), Qt = ae(null), he = ae(null);
|
|
697
692
|
let Ht;
|
|
698
693
|
t[6] === Symbol.for("react.memo_cache_sentinel") ? (Ht = (Vt) => {
|
|
699
694
|
Ne(Vt);
|
|
700
695
|
}, t[6] = Ht) : Ht = t[6];
|
|
701
|
-
const Jt =
|
|
696
|
+
const Jt = De(Ht);
|
|
702
697
|
let Wt;
|
|
703
|
-
t[7] !== o || t[8] !==
|
|
698
|
+
t[7] !== o || t[8] !== T || t[9] !== u || t[10] !== l || t[11] !== i || t[12] !== s || t[13] !== Jt ? (Wt = () => {
|
|
704
699
|
const Vt = Bt(o, "source", !0).map((E) => ({
|
|
705
700
|
name: `source_${E}`,
|
|
706
701
|
type: "source",
|
|
707
702
|
label: `${E}`,
|
|
708
703
|
color: typeof l == "string" || !l ? l || xe.graphMainColor : l[(u || Bt(o, "source", !0)).findIndex((A) => `${A}` == `${E}`) > l.length ? l.length - 1 : (u || Bt(o, "source", !0)).findIndex((A) => `${A}` == `${E}`)],
|
|
709
|
-
totalValue: pe(o.filter((A) => `${A.source}` == `${E}`).map(
|
|
710
|
-
})),
|
|
704
|
+
totalValue: pe(o.filter((A) => `${A.source}` == `${E}`).map(Mn))
|
|
705
|
+
})), Xt = T === "asc" || T === "desc" ? me(Vt, ["totalValue"], [T]) : Vt, ge = Bt(o, "target", !0).map((E) => ({
|
|
711
706
|
name: `target_${E}`,
|
|
712
707
|
type: "target",
|
|
713
708
|
label: `${E}`,
|
|
714
709
|
color: typeof s == "string" || !s ? s || xe.graphMainColor : s[(i || Bt(o, "target", !0)).findIndex((A) => `${A}` == `${E}`) > s.length ? s.length - 1 : (i || Bt(o, "target", !0)).findIndex((A) => `${A}` == `${E}`)],
|
|
715
|
-
totalValue: pe(o.filter((A) => `${A.target}` == `${E}`).map(
|
|
716
|
-
})), Ve =
|
|
710
|
+
totalValue: pe(o.filter((A) => `${A.target}` == `${E}`).map(Ln))
|
|
711
|
+
})), Ve = T === "asc" || T === "desc" ? me(ge, ["totalValue"], [T]) : ge, ne = [...Xt, ...Ve];
|
|
717
712
|
Jt({
|
|
718
713
|
nodes: ne,
|
|
719
714
|
links: o.map((E) => ({
|
|
@@ -725,78 +720,78 @@ function Yn(e) {
|
|
|
725
720
|
}
|
|
726
721
|
}))
|
|
727
722
|
});
|
|
728
|
-
}, t[7] = o, t[8] =
|
|
723
|
+
}, t[7] = o, t[8] = T, t[9] = u, t[10] = l, t[11] = i, t[12] = s, t[13] = Jt, t[14] = Wt) : Wt = t[14];
|
|
729
724
|
let Rt;
|
|
730
|
-
t[15] !== o || t[16] !==
|
|
731
|
-
let Gt,
|
|
725
|
+
t[15] !== o || t[16] !== T || t[17] !== u || t[18] !== l || t[19] !== i || t[20] !== s ? (Rt = [o, T, u, l, i, s], t[15] = o, t[16] = T, t[17] = u, t[18] = l, t[19] = i, t[20] = s, t[21] = Rt) : Rt = t[21], de(Wt, Rt);
|
|
726
|
+
let Gt, qt;
|
|
732
727
|
t[22] === Symbol.for("react.memo_cache_sentinel") ? (Gt = () => {
|
|
733
|
-
const Vt = new ResizeObserver((
|
|
734
|
-
xt(
|
|
728
|
+
const Vt = new ResizeObserver((Xt) => {
|
|
729
|
+
xt(Xt[0].target.clientWidth || 620), Oe(Xt[0].target.clientHeight || 480);
|
|
735
730
|
});
|
|
736
731
|
return Qt.current && Vt.observe(Qt.current), () => Vt.disconnect();
|
|
737
|
-
},
|
|
738
|
-
const Kt = p?.graphContainer, te =
|
|
732
|
+
}, qt = [], t[22] = Gt, t[23] = qt) : (Gt = t[22], qt = t[23]), de(Gt, qt);
|
|
733
|
+
const Kt = p?.graphContainer, te = M?.graphContainer, ee = ot ? void 0 : k;
|
|
739
734
|
let Pt;
|
|
740
|
-
t[24] !== p?.description || t[25] !== p?.title || t[26] !== o || t[27] !== nt || t[28] !== y || t[29] !== et || t[30] !== r || t[31] !==
|
|
741
|
-
title:
|
|
742
|
-
description:
|
|
735
|
+
t[24] !== p?.description || t[25] !== p?.title || t[26] !== o || t[27] !== nt || t[28] !== y || t[29] !== et || t[30] !== r || t[31] !== M?.description || t[32] !== M?.title || t[33] !== k ? (Pt = r || y || et || nt ? /* @__PURE__ */ m.jsx(Be, { styles: {
|
|
736
|
+
title: M?.title,
|
|
737
|
+
description: M?.description
|
|
743
738
|
}, classNames: {
|
|
744
739
|
title: p?.title,
|
|
745
740
|
description: p?.description
|
|
746
|
-
}, graphTitle: r, graphDescription: y, width: k, graphDownload: et ? he : void 0, dataDownload: nt ? o.map(
|
|
741
|
+
}, graphTitle: r, graphDescription: y, width: k, graphDownload: et ? he : void 0, dataDownload: nt ? o.map($n).filter(wn).length > 0 ? o.map(jn).filter(bn) : o.filter(kn) : null }) : null, t[24] = p?.description, t[25] = p?.title, t[26] = o, t[27] = nt, t[28] = y, t[29] = et, t[30] = r, t[31] = M?.description, t[32] = M?.title, t[33] = k, t[34] = Pt) : Pt = t[34];
|
|
747
742
|
let zt;
|
|
748
|
-
t[35] !==
|
|
743
|
+
t[35] !== Tt || t[36] !== ut || t[37] !== p || t[38] !== Mt || t[39] !== o.length || t[40] !== At || t[41] !== Nt || t[42] !== ot || t[43] !== yt || t[44] !== $t || t[45] !== lt || t[46] !== pt || t[47] !== mt || t[48] !== G || t[49] !== O || t[50] !== Lt || t[51] !== ft || t[52] !== Ct || t[53] !== U || t[54] !== It || t[55] !== st || t[56] !== J || t[57] !== T || t[58] !== H || t[59] !== M || t[60] !== ct || t[61] !== vt || t[62] !== c || t[63] !== Y || t[64] !== w || t[65] !== at || t[66] !== Z || t[67] !== k ? (zt = o.length === 0 ? /* @__PURE__ */ m.jsx(He, {}) : /* @__PURE__ */ m.jsx(We, { ref: Qt, children: c && vt && It ? /* @__PURE__ */ m.jsx(ln, { data: It, nodePadding: pt, nodeWidth: mt, width: ot || !k || c < k ? c : k, height: vt, showLabels: st, leftMargin: lt, rightMargin: U, topMargin: at, bottomMargin: ut, truncateBy: Z, tooltip: w, onSeriesMouseOver: O, showValues: J, suffix: ct, prefix: ft, onSeriesMouseClick: G, id: Ie(8), highlightedSourceDataPoints: yt.map(vn), highlightedTargetDataPoints: $t.map(xn), defaultLinkOpacity: At, sourceTitle: H, targetTitle: Y, sortNodes: T, resetSelectionOnDoubleClick: Ct, styles: M, classNames: p, detailsOnClick: Nt, animate: Tt === !0 ? {
|
|
749
744
|
duration: 0.5,
|
|
750
745
|
once: !0,
|
|
751
746
|
amount: 0.5
|
|
752
|
-
} :
|
|
747
|
+
} : Tt || {
|
|
753
748
|
duration: 0,
|
|
754
749
|
once: !0,
|
|
755
750
|
amount: 0
|
|
756
|
-
}, precision: Lt, customLayers: Mt }) : null }), t[35] =
|
|
751
|
+
}, precision: Lt, customLayers: Mt }) : null }), t[35] = Tt, t[36] = ut, t[37] = p, t[38] = Mt, t[39] = o.length, t[40] = At, t[41] = Nt, t[42] = ot, t[43] = yt, t[44] = $t, t[45] = lt, t[46] = pt, t[47] = mt, t[48] = G, t[49] = O, t[50] = Lt, t[51] = ft, t[52] = Ct, t[53] = U, t[54] = It, t[55] = st, t[56] = J, t[57] = T, t[58] = H, t[59] = M, t[60] = ct, t[61] = vt, t[62] = c, t[63] = Y, t[64] = w, t[65] = at, t[66] = Z, t[67] = k, t[68] = zt) : zt = t[68];
|
|
757
752
|
let Et;
|
|
758
|
-
t[69] !== p?.footnote || t[70] !== p?.source || t[71] !== d || t[72] !== a || t[73] !==
|
|
759
|
-
footnote:
|
|
760
|
-
source:
|
|
753
|
+
t[69] !== p?.footnote || t[70] !== p?.source || t[71] !== d || t[72] !== a || t[73] !== M?.footnote || t[74] !== M?.source || t[75] !== k ? (Et = a || d ? /* @__PURE__ */ m.jsx(Ae, { styles: {
|
|
754
|
+
footnote: M?.footnote,
|
|
755
|
+
source: M?.source
|
|
761
756
|
}, classNames: {
|
|
762
757
|
footnote: p?.footnote,
|
|
763
758
|
source: p?.source
|
|
764
|
-
}, sources: a, footNote: d, width: k }) : null, t[69] = p?.footnote, t[70] = p?.source, t[71] = d, t[72] = a, t[73] =
|
|
765
|
-
let
|
|
766
|
-
return t[77] !== n || t[78] !== Q || t[79] !== F || t[80] !== P || t[81] !== ht || t[82] !== gt || t[83] !==
|
|
759
|
+
}, sources: a, footNote: d, width: k }) : null, t[69] = p?.footnote, t[70] = p?.source, t[71] = d, t[72] = a, t[73] = M?.footnote, t[74] = M?.source, t[75] = k, t[76] = Et) : Et = t[76];
|
|
760
|
+
let Ft;
|
|
761
|
+
return t[77] !== n || t[78] !== Q || t[79] !== F || t[80] !== P || t[81] !== ht || t[82] !== gt || t[83] !== S || t[84] !== q || t[85] !== Kt || t[86] !== te || t[87] !== ee || t[88] !== Pt || t[89] !== zt || t[90] !== Et || t[91] !== dt ? (Ft = /* @__PURE__ */ m.jsxs(Re, { className: Kt, style: te, id: F, ref: he, "aria-label": n, backgroundColor: Q, theme: dt, language: ht, minHeight: gt, width: ee, height: P, relativeHeight: q, padding: S, children: [
|
|
767
762
|
Pt,
|
|
768
763
|
zt,
|
|
769
764
|
Et
|
|
770
|
-
] }), t[77] = n, t[78] = Q, t[79] = F, t[80] = P, t[81] = ht, t[82] = gt, t[83] =
|
|
765
|
+
] }), t[77] = n, t[78] = Q, t[79] = F, t[80] = P, t[81] = ht, t[82] = gt, t[83] = S, t[84] = q, t[85] = Kt, t[86] = te, t[87] = ee, t[88] = Pt, t[89] = zt, t[90] = Et, t[91] = dt, t[92] = Ft) : Ft = t[92], Ft;
|
|
766
|
+
}
|
|
767
|
+
function xn(e) {
|
|
768
|
+
return `${e}`;
|
|
771
769
|
}
|
|
772
770
|
function vn(e) {
|
|
773
771
|
return `${e}`;
|
|
774
772
|
}
|
|
775
773
|
function kn(e) {
|
|
776
|
-
return
|
|
774
|
+
return e !== void 0;
|
|
777
775
|
}
|
|
778
776
|
function bn(e) {
|
|
779
777
|
return e !== void 0;
|
|
780
778
|
}
|
|
781
779
|
function jn(e) {
|
|
782
|
-
return e !== void 0;
|
|
783
|
-
}
|
|
784
|
-
function wn(e) {
|
|
785
780
|
return e.data;
|
|
786
781
|
}
|
|
787
|
-
function
|
|
782
|
+
function wn(e) {
|
|
788
783
|
return e !== void 0;
|
|
789
784
|
}
|
|
790
|
-
function
|
|
785
|
+
function $n(e) {
|
|
791
786
|
return e.data;
|
|
792
787
|
}
|
|
793
|
-
function
|
|
788
|
+
function Ln(e) {
|
|
794
789
|
return e.value;
|
|
795
790
|
}
|
|
796
|
-
function
|
|
791
|
+
function Mn(e) {
|
|
797
792
|
return e.value;
|
|
798
793
|
}
|
|
799
794
|
export {
|
|
800
|
-
|
|
795
|
+
Xn as SankeyChart
|
|
801
796
|
};
|
|
802
797
|
//# sourceMappingURL=SankeyChart.js.map
|