@undp/data-viz 1.5.8 → 1.5.9
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 +13 -13
- package/dist/{Axis-Ddg-seDi.js → Axis-4gUOL8B7.js} +2 -2
- package/dist/{Axis-Ddg-seDi.js.map → Axis-4gUOL8B7.js.map} +1 -1
- package/dist/{Axis-DE7dSn1_.cjs → Axis-CkNn1wit.cjs} +2 -2
- package/dist/{Axis-DE7dSn1_.cjs.map → Axis-CkNn1wit.cjs.map} +1 -1
- package/dist/{AxisTitle-CK9YeovX.cjs → AxisTitle-Wkz-xeQL.cjs} +2 -2
- package/dist/{AxisTitle-CK9YeovX.cjs.map → AxisTitle-Wkz-xeQL.cjs.map} +1 -1
- package/dist/{AxisTitle-BmHLMRJZ.js → AxisTitle-v6_xcXZ-.js} +2 -2
- package/dist/{AxisTitle-BmHLMRJZ.js.map → AxisTitle-v6_xcXZ-.js.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +16 -16
- package/dist/BasicStatCard.cjs +1 -1
- package/dist/BasicStatCard.js +2 -2
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +42 -42
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.cjs.map +1 -1
- package/dist/BiVariateChoroplethMap.d.ts +2 -0
- package/dist/BiVariateChoroplethMap.js +257 -264
- package/dist/BiVariateChoroplethMap.js.map +1 -1
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +14 -14
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +45 -45
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.cjs.map +1 -1
- package/dist/ChoroplethMap.d.ts +2 -0
- package/dist/ChoroplethMap.js +296 -304
- package/dist/ChoroplethMap.js.map +1 -1
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +3 -3
- package/dist/ColorLegend.cjs +1 -1
- package/dist/ColorLegend.js +2 -2
- package/dist/ColorLegendWithMouseOver.cjs +1 -1
- package/dist/ColorLegendWithMouseOver.js +2 -2
- package/dist/CopyTextButton.cjs +4 -4
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +27 -27
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.cjs +1 -1
- package/dist/CsvDownloadButton.js +2 -2
- package/dist/DataCards.cjs +3 -3
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +16 -16
- package/dist/DataCards.js.map +1 -1
- package/dist/DataTable.cjs +1 -1
- package/dist/DataTable.js +3 -3
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +12 -12
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +20 -20
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.cjs.map +1 -1
- package/dist/DotDensityMap.d.ts +2 -0
- package/dist/DotDensityMap.js +282 -289
- package/dist/DotDensityMap.js.map +1 -1
- package/dist/{DropdownSelect-CtOKZHD0.js → DropdownSelect-6kjXM6oW.js} +2 -2
- package/dist/DropdownSelect-6kjXM6oW.js.map +1 -0
- package/dist/{DropdownSelect-DBDM64B5.cjs → DropdownSelect-vt8yiB-g.cjs} +5 -5
- package/dist/DropdownSelect-vt8yiB-g.cjs.map +1 -0
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +9 -9
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +50 -50
- package/dist/{EmptyState-DdTp-Mdn.js → EmptyState-36lXXyui.js} +4 -4
- package/dist/{EmptyState-DdTp-Mdn.js.map → EmptyState-36lXXyui.js.map} +1 -1
- package/dist/{EmptyState-d8_8SxeW.cjs → EmptyState-B8IpKGcL.cjs} +2 -2
- package/dist/{EmptyState-d8_8SxeW.cjs.map → EmptyState-B8IpKGcL.cjs.map} +1 -1
- package/dist/ExcelDownloadButton.cjs +1 -1
- package/dist/ExcelDownloadButton.js +2 -2
- package/dist/FootNote.cjs +1 -1
- package/dist/FootNote.js +2 -2
- package/dist/GeoHubCompareMaps.cjs +1 -1
- package/dist/GeoHubCompareMaps.cjs.map +1 -1
- package/dist/GeoHubCompareMaps.js +65 -80
- package/dist/GeoHubCompareMaps.js.map +1 -1
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.cjs.map +1 -1
- package/dist/GeoHubMap.js +95 -125
- package/dist/GeoHubMap.js.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.cjs.map +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +73 -88
- package/dist/GeoHubMapWithLayerSelection.js.map +1 -1
- package/dist/GraphDescription.cjs +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/{GraphEl-CqWzvOyr.js → GraphEl-2IiUDxjR.js} +15 -12
- package/dist/GraphEl-2IiUDxjR.js.map +1 -0
- package/dist/GraphEl-qrlfGPe3.cjs +2 -0
- package/dist/GraphEl-qrlfGPe3.cjs.map +1 -0
- package/dist/GraphFooter.cjs +1 -1
- package/dist/GraphFooter.js +1 -1
- package/dist/GraphHeader.cjs +1 -1
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.cjs +1 -1
- package/dist/GraphTitle.js +2 -2
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.d.ts +1 -0
- package/dist/GriddedGraphs.js +5 -5
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.d.ts +1 -0
- package/dist/GriddedGraphsFromConfig.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +19 -19
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +3 -3
- package/dist/ImageDownloadButton.cjs +1 -1
- package/dist/ImageDownloadButton.js +2 -2
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +12 -12
- package/dist/LinearColorLegend.cjs +1 -1
- package/dist/LinearColorLegend.js +2 -2
- package/dist/{Modal-DVVwpKhP.js → Modal-Cg8daIlV.js} +198 -187
- package/dist/Modal-Cg8daIlV.js.map +1 -0
- package/dist/Modal-CuuJdWkD.cjs +46 -0
- package/dist/Modal-CuuJdWkD.cjs.map +1 -0
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.d.ts +1 -0
- package/dist/MultiGraphDashboard.js +3 -3
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/MultiGraphDashboardFromConfig.js +2 -2
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +12 -12
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +12 -12
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +26 -26
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.d.ts +1 -0
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.d.ts +1 -0
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +7 -7
- package/dist/{ReferenceLine-CfAW3vKJ.js → ReferenceLine-CPMaAX0r.js} +3 -3
- package/dist/{ReferenceLine-CfAW3vKJ.js.map → ReferenceLine-CPMaAX0r.js.map} +1 -1
- package/dist/{ReferenceLine-CFVBBN__.cjs → ReferenceLine-D04j-zeV.cjs} +2 -2
- package/dist/{ReferenceLine-CFVBBN__.cjs.map → ReferenceLine-D04j-zeV.cjs.map} +1 -1
- package/dist/{RegressionLine-C2--oMQq.js → RegressionLine-CW7iViH2.js} +4 -4
- package/dist/{RegressionLine-C2--oMQq.js.map → RegressionLine-CW7iViH2.js.map} +1 -1
- package/dist/{RegressionLine-Dj0GSiAp.cjs → RegressionLine-D-49RaHa.cjs} +2 -2
- package/dist/{RegressionLine-Dj0GSiAp.cjs.map → RegressionLine-D-49RaHa.cjs.map} +1 -1
- package/dist/SVGDownloadButton.cjs +1 -1
- package/dist/SVGDownloadButton.js +2 -2
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +27 -27
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +17 -17
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.d.ts +1 -0
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +13 -13
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.d.ts +1 -0
- package/dist/SingleGraphDashboard.js +6 -6
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardFromConfig.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMaps.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMaps.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMaps.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphs.js +14 -13
- package/dist/SingleGraphDashboardThreeDGraphs.js.map +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.d.ts +1 -0
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +26 -26
- package/dist/Source.cjs +1 -1
- package/dist/Source.js +2 -2
- package/dist/SparkLine.cjs +1 -1
- package/dist/SparkLine.js +2 -2
- package/dist/{Spinner-C85UF28E.js → Spinner-Bpz70q_g.js} +2 -2
- package/dist/{Spinner-C85UF28E.js.map → Spinner-Bpz70q_g.js.map} +1 -1
- package/dist/{Spinner-DA6Z5E4n.cjs → Spinner-C6wLp85s.cjs} +2 -2
- package/dist/{Spinner-DA6Z5E4n.cjs.map → Spinner-C6wLp85s.cjs.map} +1 -1
- package/dist/StatCardFromData.cjs +1 -1
- package/dist/StatCardFromData.js +2 -2
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +29 -29
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.cjs.map +1 -1
- package/dist/ThreeDGlobe.d.ts +2 -0
- package/dist/ThreeDGlobe.js +220 -228
- package/dist/ThreeDGlobe.js.map +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.cjs +1 -1
- package/dist/ThresholdColorLegendWithMouseOver.js +2 -2
- package/dist/{Tooltip-CVCGWyzw.js → Tooltip-6LIdPQGC.js} +2 -2
- package/dist/{Tooltip-CVCGWyzw.js.map → Tooltip-6LIdPQGC.js.map} +1 -1
- package/dist/{Tooltip-De16GWhY.cjs → Tooltip-Cpv0QohJ.cjs} +2 -2
- package/dist/{Tooltip-De16GWhY.cjs.map → Tooltip-Cpv0QohJ.cjs.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +24 -24
- package/dist/Types.d.ts +1 -0
- package/dist/{Typography-k-kOjICQ.cjs → Typography-BDULiwlF.cjs} +2 -2
- package/dist/{Typography-k-kOjICQ.cjs.map → Typography-BDULiwlF.cjs.map} +1 -1
- package/dist/{Typography-Ctgfl1J5.js → Typography-LmZ9LEpe.js} +2 -2
- package/dist/{Typography-Ctgfl1J5.js.map → Typography-LmZ9LEpe.js.map} +1 -1
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +5 -5
- package/dist/{XAxesLabels-Drf7M3YK.cjs → XAxesLabels-CLZnBgSr.cjs} +2 -2
- package/dist/{XAxesLabels-Drf7M3YK.cjs.map → XAxesLabels-CLZnBgSr.cjs.map} +1 -1
- package/dist/{XAxesLabels-loO78vUO.js → XAxesLabels-SOSmso5J.js} +3 -3
- package/dist/{XAxesLabels-loO78vUO.js.map → XAxesLabels-SOSmso5J.js.map} +1 -1
- package/dist/{XTicksAndGridLines-Bn9u5gOM.js → XTicksAndGridLines-DuydSnZ_.js} +2 -2
- package/dist/{XTicksAndGridLines-Bn9u5gOM.js.map → XTicksAndGridLines-DuydSnZ_.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CCzXIV8d.cjs → XTicksAndGridLines-RKy7BVCO.cjs} +2 -2
- package/dist/{XTicksAndGridLines-CCzXIV8d.cjs.map → XTicksAndGridLines-RKy7BVCO.cjs.map} +1 -1
- package/dist/{YAxesLabels-DECkMgq8.js → YAxesLabels-DlDyLvhi.js} +3 -3
- package/dist/{YAxesLabels-DECkMgq8.js.map → YAxesLabels-DlDyLvhi.js.map} +1 -1
- package/dist/{YAxesLabels-yRFFdx1s.cjs → YAxesLabels-Dqd259-t.cjs} +2 -2
- package/dist/{YAxesLabels-yRFFdx1s.cjs.map → YAxesLabels-Dqd259-t.cjs.map} +1 -1
- package/dist/{YTicksAndGridLines-B6ah7CRf.js → YTicksAndGridLines-7t4MKtGw.js} +2 -2
- package/dist/{YTicksAndGridLines-B6ah7CRf.js.map → YTicksAndGridLines-7t4MKtGw.js.map} +1 -1
- package/dist/{YTicksAndGridLines-DBDuz6vb.cjs → YTicksAndGridLines-qGpRo_t1.cjs} +2 -2
- package/dist/{YTicksAndGridLines-DBDuz6vb.cjs.map → YTicksAndGridLines-qGpRo_t1.cjs.map} +1 -1
- package/dist/checkIfMultiple-Dko_cBvE.cjs +12 -0
- package/dist/checkIfMultiple-Dko_cBvE.cjs.map +1 -0
- package/dist/{checkIfMultiple-ChTJk2Tk.js → checkIfMultiple-u2SmbiCf.js} +11 -11
- package/dist/checkIfMultiple-u2SmbiCf.js.map +1 -0
- package/dist/{customArea-CK768gCn.cjs → customArea-1G1S78s_.cjs} +2 -2
- package/dist/{customArea-CK768gCn.cjs.map → customArea-1G1S78s_.cjs.map} +1 -1
- package/dist/{customArea-B-dWU0zZ.js → customArea-x4L4xwLl.js} +3 -3
- package/dist/{customArea-B-dWU0zZ.js.map → customArea-x4L4xwLl.js.map} +1 -1
- package/dist/getSliderMarks-CUxPy36E.cjs +6 -0
- package/dist/getSliderMarks-CUxPy36E.cjs.map +1 -0
- package/dist/{getSliderMarks-9cNoRkDx.js → getSliderMarks-_pYOWEtO.js} +3 -3
- package/dist/getSliderMarks-_pYOWEtO.js.map +1 -0
- package/dist/{index-BYzIB5V6.cjs → index-BHe3wsWF.cjs} +2 -2
- package/dist/{index-BYzIB5V6.cjs.map → index-BHe3wsWF.cjs.map} +1 -1
- package/dist/{index-DKCxu1Gh.js → index-Bw_eHBVN.js} +3 -3
- package/dist/{index-DKCxu1Gh.js.map → index-Bw_eHBVN.js.map} +1 -1
- package/dist/{index-BW_-wD2k.cjs → index-C0bpbS4F.cjs} +2 -2
- package/dist/{index-BW_-wD2k.cjs.map → index-C0bpbS4F.cjs.map} +1 -1
- package/dist/{index-37q0ULNQ.js → index-CE9pmfxt.js} +17 -17
- package/dist/{index-37q0ULNQ.js.map → index-CE9pmfxt.js.map} +1 -1
- package/dist/{index-CVlCtJbC.cjs → index-CEJwW3lL.cjs} +2 -2
- package/dist/{index-CVlCtJbC.cjs.map → index-CEJwW3lL.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-BPSP-7Jg.js → index-CHPV5EwG-DBWUSD9b.js} +539 -543
- package/dist/index-CHPV5EwG-DBWUSD9b.js.map +1 -0
- package/dist/index-CHPV5EwG-DjM48pIC.cjs +44 -0
- package/dist/index-CHPV5EwG-DjM48pIC.cjs.map +1 -0
- package/dist/{index-BW8iNx7E.cjs → index-Cm8NIdOO.cjs} +2 -2
- package/dist/{index-BW8iNx7E.cjs.map → index-Cm8NIdOO.cjs.map} +1 -1
- package/dist/{index-tvAyXPPW-DBlMKnNB.js → index-Cw8sCyo_-BuI_jX5Z.js} +3 -3
- package/dist/{index-tvAyXPPW-DBlMKnNB.js.map → index-Cw8sCyo_-BuI_jX5Z.js.map} +1 -1
- package/dist/index-Cw8sCyo_-gxT8ADyn.cjs +2 -0
- package/dist/index-Cw8sCyo_-gxT8ADyn.cjs.map +1 -0
- package/dist/{index-CNvov0eg.js → index-Cwgh7i7X.js} +3 -3
- package/dist/{index-CNvov0eg.js.map → index-Cwgh7i7X.js.map} +1 -1
- package/dist/{index-DG3YrCr5-D3FrrXj8.js → index-Dzc_aaI9-BKklH89r.js} +2 -2
- package/dist/{index-DG3YrCr5-D3FrrXj8.js.map → index-Dzc_aaI9-BKklH89r.js.map} +1 -1
- package/dist/{index-DG3YrCr5-v7rayV3N.cjs → index-Dzc_aaI9-RIk2GRHD.cjs} +2 -2
- package/dist/{index-DG3YrCr5-v7rayV3N.cjs.map → index-Dzc_aaI9-RIk2GRHD.cjs.map} +1 -1
- package/dist/{index-BmCqpO1B.js → index-zZjQEHlm.js} +2 -2
- package/dist/{index-BmCqpO1B.js.map → index-zZjQEHlm.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +9 -0
- package/dist/index.js +1 -1
- package/dist/{proxy-CkpFesk1.js → proxy-BYIC9BuT.js} +2 -2
- package/dist/{proxy-CkpFesk1.js.map → proxy-BYIC9BuT.js.map} +1 -1
- package/dist/{proxy-BHRoeZgd.cjs → proxy-CKadx4lC.cjs} +2 -2
- package/dist/{proxy-BHRoeZgd.cjs.map → proxy-CKadx4lC.cjs.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{use-in-view-sQJZ_xDO.cjs → use-in-view-CEwlc_dd.cjs} +2 -2
- package/dist/{use-in-view-sQJZ_xDO.cjs.map → use-in-view-CEwlc_dd.cjs.map} +1 -1
- package/dist/{use-in-view-yS6jzJAp.js → use-in-view-DR-UTB96.js} +2 -2
- package/dist/{use-in-view-yS6jzJAp.js.map → use-in-view-DR-UTB96.js.map} +1 -1
- package/package.json +4 -4
- package/dist/DropdownSelect-CtOKZHD0.js.map +0 -1
- package/dist/DropdownSelect-DBDM64B5.cjs.map +0 -1
- package/dist/GraphEl-C6yjl1VM.cjs +0 -2
- package/dist/GraphEl-C6yjl1VM.cjs.map +0 -1
- package/dist/GraphEl-CqWzvOyr.js.map +0 -1
- package/dist/Modal-DVVwpKhP.js.map +0 -1
- package/dist/Modal-tXZlLE5s.cjs +0 -46
- package/dist/Modal-tXZlLE5s.cjs.map +0 -1
- package/dist/checkIfMultiple-BXbHUCWM.cjs +0 -12
- package/dist/checkIfMultiple-BXbHUCWM.cjs.map +0 -1
- package/dist/checkIfMultiple-ChTJk2Tk.js.map +0 -1
- package/dist/getSliderMarks-9cNoRkDx.js.map +0 -1
- package/dist/getSliderMarks-CRIbTGYV.cjs +0 -6
- package/dist/getSliderMarks-CRIbTGYV.cjs.map +0 -1
- package/dist/index-CHPV5EwG-BPSP-7Jg.js.map +0 -1
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs +0 -44
- package/dist/index-CHPV5EwG-DDoeWRVt.cjs.map +0 -1
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs +0 -2
- package/dist/index-tvAyXPPW-DPOG-C2i.cjs.map +0 -1
package/dist/GeoHubMap.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { j as e, m as
|
|
2
|
-
import
|
|
3
|
-
import { Z
|
|
1
|
+
import { j as e, m as A } from "./index-CHPV5EwG-DBWUSD9b.js";
|
|
2
|
+
import W, { useState as C, useRef as M, useEffect as L, useMemo as E } from "react";
|
|
3
|
+
import { Z, H as F } from "./DropdownSelect-6kjXM6oW.js";
|
|
4
4
|
import w from "maplibre-gl";
|
|
5
|
-
import * as
|
|
5
|
+
import * as _ from "pmtiles";
|
|
6
6
|
/* empty css */
|
|
7
7
|
import { f as z } from "./fetchAndParseData-sapWbnYk.js";
|
|
8
8
|
import { f as V } from "./filterData-9nEcQ-Jp.js";
|
|
9
|
-
import { X as
|
|
10
|
-
import { s as
|
|
11
|
-
import { s as
|
|
12
|
-
import { GraphHeader as
|
|
9
|
+
import { X as $ } from "./index-zZjQEHlm.js";
|
|
10
|
+
import { s as P } from "./string2HTML-oFCROsus.js";
|
|
11
|
+
import { s as R } from "./select-DKy99ogv.js";
|
|
12
|
+
import { GraphHeader as I } from "./GraphHeader.js";
|
|
13
13
|
import { GraphFooter as J } from "./GraphFooter.js";
|
|
14
14
|
function X(k) {
|
|
15
15
|
const {
|
|
@@ -17,62 +17,62 @@ function X(k) {
|
|
|
17
17
|
height: n,
|
|
18
18
|
width: r,
|
|
19
19
|
relativeHeight: a,
|
|
20
|
-
center:
|
|
21
|
-
zoomLevel:
|
|
20
|
+
center: b,
|
|
21
|
+
zoomLevel: y,
|
|
22
22
|
minHeight: c,
|
|
23
23
|
includeLayers: u,
|
|
24
|
-
excludeLayers:
|
|
24
|
+
excludeLayers: g,
|
|
25
25
|
mapLegend: l
|
|
26
|
-
} = k, [o, v] =
|
|
26
|
+
} = k, [o, v] = C(0), [j, h] = C(0), [H, S] = C(!0), d = M(null), p = M(null), s = M(null);
|
|
27
27
|
return L(() => {
|
|
28
|
-
const
|
|
28
|
+
const i = new ResizeObserver((m) => {
|
|
29
29
|
v(r || m[0].target.clientWidth || 620), h(n || m[0].target.clientHeight || 480);
|
|
30
30
|
});
|
|
31
|
-
return d.current && (h(d.current.clientHeight || 480), v(d.current.clientWidth || 620), r ||
|
|
31
|
+
return d.current && (h(d.current.clientHeight || 480), v(d.current.clientWidth || 620), r || i.observe(d.current)), () => i.disconnect();
|
|
32
32
|
}, [r, n]), L(() => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const f = new
|
|
33
|
+
p.current && o && !s.current && z(t).then((i) => {
|
|
34
|
+
R(p.current).selectAll("div").remove();
|
|
35
|
+
const f = new _.Protocol();
|
|
36
36
|
w.addProtocol("pmtiles", f.tile);
|
|
37
37
|
const x = {
|
|
38
38
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
39
|
-
container:
|
|
40
|
-
style: u.length === 0 &&
|
|
41
|
-
...
|
|
42
|
-
layers: V(
|
|
39
|
+
container: p.current,
|
|
40
|
+
style: u.length === 0 && g.length === 0 ? i : {
|
|
41
|
+
...i,
|
|
42
|
+
layers: V(i.layers, [
|
|
43
43
|
{
|
|
44
44
|
column: "id",
|
|
45
45
|
includeValues: u,
|
|
46
|
-
excludeValues:
|
|
46
|
+
excludeValues: g
|
|
47
47
|
}
|
|
48
48
|
])
|
|
49
49
|
},
|
|
50
50
|
attributionControl: !0
|
|
51
51
|
};
|
|
52
|
-
|
|
52
|
+
b && (x.center = b), y && (x.zoom = y), s.current = new w.Map(x), s.current.addControl(
|
|
53
53
|
new w.NavigationControl({
|
|
54
54
|
visualizePitch: !0,
|
|
55
55
|
showZoom: !0,
|
|
56
56
|
showCompass: !0
|
|
57
57
|
}),
|
|
58
58
|
"bottom-right"
|
|
59
|
-
),
|
|
59
|
+
), s.current.addControl(new w.ScaleControl(), "bottom-left");
|
|
60
60
|
});
|
|
61
|
-
}, [o,
|
|
62
|
-
|
|
61
|
+
}, [o, b, y, u, g, t]), L(() => {
|
|
62
|
+
s.current && z(t).then((i) => {
|
|
63
63
|
const m = {
|
|
64
|
-
...
|
|
65
|
-
layers: V(
|
|
64
|
+
...i,
|
|
65
|
+
layers: V(i.layers, [
|
|
66
66
|
{
|
|
67
67
|
column: "id",
|
|
68
68
|
includeValues: u,
|
|
69
|
-
excludeValues:
|
|
69
|
+
excludeValues: g
|
|
70
70
|
}
|
|
71
71
|
])
|
|
72
72
|
};
|
|
73
|
-
|
|
73
|
+
s.current.setStyle(m);
|
|
74
74
|
});
|
|
75
|
-
}, [
|
|
75
|
+
}, [g, u, t]), /* @__PURE__ */ e.jsx(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
78
78
|
className: "flex flex-col grow justify-center leading-0",
|
|
@@ -92,7 +92,7 @@ function X(k) {
|
|
|
92
92
|
/* @__PURE__ */ e.jsx(
|
|
93
93
|
"div",
|
|
94
94
|
{
|
|
95
|
-
ref:
|
|
95
|
+
ref: p,
|
|
96
96
|
className: "map maplibre-show-control",
|
|
97
97
|
style: { width: "100%", height: "100%" }
|
|
98
98
|
}
|
|
@@ -101,34 +101,19 @@ function X(k) {
|
|
|
101
101
|
/* @__PURE__ */ e.jsx(
|
|
102
102
|
"div",
|
|
103
103
|
{
|
|
104
|
-
|
|
105
|
-
backgroundColor: "rgba(240,240,240, 0.7)",
|
|
106
|
-
border: "1px solid var(--gray-400)",
|
|
107
|
-
borderRadius: "999px",
|
|
108
|
-
width: "24px",
|
|
109
|
-
height: "24px",
|
|
110
|
-
padding: "3px",
|
|
111
|
-
cursor: "pointer",
|
|
112
|
-
zIndex: 10,
|
|
113
|
-
position: "absolute",
|
|
114
|
-
right: "-0.75rem",
|
|
115
|
-
top: "-0.75rem"
|
|
116
|
-
},
|
|
104
|
+
className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",
|
|
117
105
|
onClick: () => {
|
|
118
|
-
|
|
106
|
+
S(!1);
|
|
119
107
|
},
|
|
120
|
-
children: /* @__PURE__ */ e.jsx(
|
|
108
|
+
children: /* @__PURE__ */ e.jsx($, {})
|
|
121
109
|
}
|
|
122
110
|
),
|
|
123
111
|
/* @__PURE__ */ e.jsx(
|
|
124
112
|
"div",
|
|
125
113
|
{
|
|
126
|
-
className: "p-2",
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
},
|
|
130
|
-
dangerouslySetInnerHTML: typeof l == "string" ? { __html: $(l) } : void 0,
|
|
131
|
-
children: R.isValidElement(l) ? l : null
|
|
114
|
+
className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",
|
|
115
|
+
dangerouslySetInnerHTML: typeof l == "string" ? { __html: P(l) } : void 0,
|
|
116
|
+
children: W.isValidElement(l) ? l : null
|
|
132
117
|
}
|
|
133
118
|
)
|
|
134
119
|
] }) : /* @__PURE__ */ e.jsx(
|
|
@@ -137,9 +122,9 @@ function X(k) {
|
|
|
137
122
|
type: "button",
|
|
138
123
|
className: "mb-0 border-0 bg-transparent p-0 self-start",
|
|
139
124
|
onClick: () => {
|
|
140
|
-
|
|
125
|
+
S(!0);
|
|
141
126
|
},
|
|
142
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-
|
|
127
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" })
|
|
143
128
|
}
|
|
144
129
|
) }) : null
|
|
145
130
|
]
|
|
@@ -154,39 +139,39 @@ function q(k) {
|
|
|
154
139
|
height: n,
|
|
155
140
|
width: r,
|
|
156
141
|
relativeHeight: a,
|
|
157
|
-
center:
|
|
158
|
-
zoomLevel:
|
|
142
|
+
center: b,
|
|
143
|
+
zoomLevel: y,
|
|
159
144
|
minHeight: c,
|
|
160
145
|
includeLayers: u,
|
|
161
|
-
excludeLayers:
|
|
146
|
+
excludeLayers: g,
|
|
162
147
|
mapLegend: l
|
|
163
|
-
} = k, [o, v] =
|
|
148
|
+
} = k, [o, v] = C(0), [j, h] = C(0), [H, S] = C(!0), d = M(null), p = M(null);
|
|
164
149
|
return L(() => {
|
|
165
|
-
const
|
|
166
|
-
v(r ||
|
|
150
|
+
const s = new ResizeObserver((i) => {
|
|
151
|
+
v(r || i[0].target.clientWidth || 620), h(n || i[0].target.clientHeight || 480);
|
|
167
152
|
});
|
|
168
|
-
return d.current && (h(d.current.clientHeight || 480), v(d.current.clientWidth || 620), r ||
|
|
153
|
+
return d.current && (h(d.current.clientHeight || 480), v(d.current.clientWidth || 620), r || s.observe(d.current)), () => s.disconnect();
|
|
169
154
|
}, [r, n]), L(() => {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
const m = new
|
|
155
|
+
p.current && o && z(t).then((s) => {
|
|
156
|
+
R(p.current).selectAll("div").remove();
|
|
157
|
+
const m = new _.Protocol();
|
|
173
158
|
w.addProtocol("pmtiles", m.tile);
|
|
174
159
|
const f = {
|
|
175
160
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
176
|
-
container:
|
|
177
|
-
style: u.length === 0 &&
|
|
178
|
-
...
|
|
179
|
-
layers: V(
|
|
161
|
+
container: p.current,
|
|
162
|
+
style: u.length === 0 && g.length === 0 ? s : {
|
|
163
|
+
...s,
|
|
164
|
+
layers: V(s.layers, [
|
|
180
165
|
{
|
|
181
166
|
column: "id",
|
|
182
167
|
includeValues: u,
|
|
183
|
-
excludeValues:
|
|
168
|
+
excludeValues: g
|
|
184
169
|
}
|
|
185
170
|
])
|
|
186
171
|
},
|
|
187
172
|
attributionControl: !0
|
|
188
173
|
};
|
|
189
|
-
|
|
174
|
+
b && (f.center = b), y && (f.zoom = y);
|
|
190
175
|
const x = new w.Map(f);
|
|
191
176
|
x.addControl(
|
|
192
177
|
new w.NavigationControl({
|
|
@@ -197,7 +182,7 @@ function q(k) {
|
|
|
197
182
|
"bottom-right"
|
|
198
183
|
), x.addControl(new w.ScaleControl(), "bottom-left");
|
|
199
184
|
});
|
|
200
|
-
}, [o, t,
|
|
185
|
+
}, [o, t, b, y, u, g]), /* @__PURE__ */ e.jsx(
|
|
201
186
|
"div",
|
|
202
187
|
{
|
|
203
188
|
className: "flex flex-col grow justify-center leading-0",
|
|
@@ -217,7 +202,7 @@ function q(k) {
|
|
|
217
202
|
/* @__PURE__ */ e.jsx(
|
|
218
203
|
"div",
|
|
219
204
|
{
|
|
220
|
-
ref:
|
|
205
|
+
ref: p,
|
|
221
206
|
className: "map maplibre-show-control",
|
|
222
207
|
style: { width: "100%", height: "100%" }
|
|
223
208
|
}
|
|
@@ -226,34 +211,19 @@ function q(k) {
|
|
|
226
211
|
/* @__PURE__ */ e.jsx(
|
|
227
212
|
"div",
|
|
228
213
|
{
|
|
229
|
-
|
|
230
|
-
backgroundColor: "rgba(240,240,240, 0.7)",
|
|
231
|
-
border: "1px solid var(--gray-400)",
|
|
232
|
-
borderRadius: "999px",
|
|
233
|
-
width: "24px",
|
|
234
|
-
height: "24px",
|
|
235
|
-
padding: "3px",
|
|
236
|
-
cursor: "pointer",
|
|
237
|
-
zIndex: 10,
|
|
238
|
-
position: "absolute",
|
|
239
|
-
right: "-0.75rem",
|
|
240
|
-
top: "-0.75rem"
|
|
241
|
-
},
|
|
214
|
+
className: "color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]",
|
|
242
215
|
onClick: () => {
|
|
243
|
-
|
|
216
|
+
S(!1);
|
|
244
217
|
},
|
|
245
|
-
children: /* @__PURE__ */ e.jsx(
|
|
218
|
+
children: /* @__PURE__ */ e.jsx($, {})
|
|
246
219
|
}
|
|
247
220
|
),
|
|
248
221
|
/* @__PURE__ */ e.jsx(
|
|
249
222
|
"div",
|
|
250
223
|
{
|
|
251
|
-
className: "p-2",
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
},
|
|
255
|
-
dangerouslySetInnerHTML: typeof l == "string" ? { __html: $(l) } : void 0,
|
|
256
|
-
children: R.isValidElement(l) ? l : null
|
|
224
|
+
className: "color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",
|
|
225
|
+
dangerouslySetInnerHTML: typeof l == "string" ? { __html: P(l) } : void 0,
|
|
226
|
+
children: W.isValidElement(l) ? l : null
|
|
257
227
|
}
|
|
258
228
|
)
|
|
259
229
|
] }) : /* @__PURE__ */ e.jsx(
|
|
@@ -262,9 +232,9 @@ function q(k) {
|
|
|
262
232
|
type: "button",
|
|
263
233
|
className: "mb-0 border-0 bg-transparent p-0 self-start",
|
|
264
234
|
onClick: () => {
|
|
265
|
-
|
|
235
|
+
S(!0);
|
|
266
236
|
},
|
|
267
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-
|
|
237
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500", children: "Show Legend" })
|
|
268
238
|
}
|
|
269
239
|
) }) : null
|
|
270
240
|
]
|
|
@@ -273,38 +243,38 @@ function q(k) {
|
|
|
273
243
|
}
|
|
274
244
|
);
|
|
275
245
|
}
|
|
276
|
-
function
|
|
246
|
+
function ie(k) {
|
|
277
247
|
const {
|
|
278
248
|
mapStyle: t,
|
|
279
249
|
graphTitle: n,
|
|
280
250
|
height: r,
|
|
281
251
|
width: a,
|
|
282
|
-
relativeHeight:
|
|
283
|
-
sources:
|
|
252
|
+
relativeHeight: b,
|
|
253
|
+
sources: y,
|
|
284
254
|
graphDescription: c,
|
|
285
255
|
footNote: u,
|
|
286
|
-
padding:
|
|
256
|
+
padding: g,
|
|
287
257
|
backgroundColor: l = !1,
|
|
288
258
|
center: o,
|
|
289
259
|
zoomLevel: v,
|
|
290
260
|
graphID: j,
|
|
291
261
|
language: h = "en",
|
|
292
262
|
minHeight: H = 0,
|
|
293
|
-
theme:
|
|
263
|
+
theme: S = "light",
|
|
294
264
|
includeLayers: d = [],
|
|
295
|
-
excludeLayers:
|
|
296
|
-
ariaLabel:
|
|
297
|
-
uiMode:
|
|
265
|
+
excludeLayers: p = [],
|
|
266
|
+
ariaLabel: s,
|
|
267
|
+
uiMode: i = "normal",
|
|
298
268
|
styles: m,
|
|
299
269
|
classNames: f,
|
|
300
270
|
mapLegend: x
|
|
301
|
-
} = k, [D, O] =
|
|
271
|
+
} = k, [D, O] = C(
|
|
302
272
|
typeof t == "string" ? t : t[0].style
|
|
303
273
|
);
|
|
304
274
|
L(() => {
|
|
305
275
|
O(typeof t == "string" ? t : t[0].style);
|
|
306
276
|
}, [t]);
|
|
307
|
-
const G =
|
|
277
|
+
const G = E(
|
|
308
278
|
() => ({
|
|
309
279
|
ignoreCase: !0,
|
|
310
280
|
ignoreAccents: !0,
|
|
@@ -315,12 +285,12 @@ function se(k) {
|
|
|
315
285
|
return /* @__PURE__ */ e.jsx(
|
|
316
286
|
"div",
|
|
317
287
|
{
|
|
318
|
-
className: `${
|
|
288
|
+
className: `${S || "light"} flex ${a ? "w-fit grow-0" : "w-full grow"}`,
|
|
319
289
|
dir: h === "he" || h === "ar" ? "rtl" : void 0,
|
|
320
290
|
children: /* @__PURE__ */ e.jsx(
|
|
321
291
|
"div",
|
|
322
292
|
{
|
|
323
|
-
className:
|
|
293
|
+
className: A(
|
|
324
294
|
`${l ? l === !0 ? "bg-primary-gray-200 dark:bg-primary-gray-650 " : "" : "bg-transparent "}ml-auto mr-auto flex flex-col grow h-inherit ${h || "en"}`,
|
|
325
295
|
a ? "w-fit" : "w-full",
|
|
326
296
|
f?.graphContainer
|
|
@@ -330,15 +300,15 @@ function se(k) {
|
|
|
330
300
|
...l && l !== !0 ? { backgroundColor: l } : {}
|
|
331
301
|
},
|
|
332
302
|
id: j,
|
|
333
|
-
"aria-label":
|
|
303
|
+
"aria-label": s || `${n ? `The graph shows ${n}. ` : ""}This is a map.${c ? ` ${c}` : ""}`,
|
|
334
304
|
children: /* @__PURE__ */ e.jsx(
|
|
335
305
|
"div",
|
|
336
306
|
{
|
|
337
307
|
className: "flex grow",
|
|
338
|
-
style: { padding: l ?
|
|
308
|
+
style: { padding: l ? g || "1rem" : g || 0 },
|
|
339
309
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col w-full gap-4 grow justify-between", children: [
|
|
340
310
|
n || c ? /* @__PURE__ */ e.jsx(
|
|
341
|
-
|
|
311
|
+
I,
|
|
342
312
|
{
|
|
343
313
|
styles: {
|
|
344
314
|
title: m?.title,
|
|
@@ -354,22 +324,22 @@ function se(k) {
|
|
|
354
324
|
}
|
|
355
325
|
) : null,
|
|
356
326
|
typeof t == "string" ? null : /* @__PURE__ */ e.jsx(
|
|
357
|
-
|
|
327
|
+
Z,
|
|
358
328
|
{
|
|
359
|
-
options: t.map((
|
|
329
|
+
options: t.map((N) => ({ label: N.name, value: N.style })),
|
|
360
330
|
isClearable: !1,
|
|
361
331
|
size: "sm",
|
|
362
|
-
variant:
|
|
332
|
+
variant: i,
|
|
363
333
|
isRtl: h === "he" || h === "ar",
|
|
364
334
|
isSearchable: !0,
|
|
365
|
-
filterOption:
|
|
335
|
+
filterOption: F(G),
|
|
366
336
|
defaultValue: {
|
|
367
337
|
label: t[0].name,
|
|
368
338
|
value: t[0].style
|
|
369
339
|
},
|
|
370
340
|
controlShouldRenderValue: !0,
|
|
371
|
-
onChange: (
|
|
372
|
-
|
|
341
|
+
onChange: (N) => {
|
|
342
|
+
N && O(N.value);
|
|
373
343
|
}
|
|
374
344
|
}
|
|
375
345
|
),
|
|
@@ -381,10 +351,10 @@ function se(k) {
|
|
|
381
351
|
zoomLevel: v,
|
|
382
352
|
width: a,
|
|
383
353
|
height: r,
|
|
384
|
-
relativeHeight:
|
|
354
|
+
relativeHeight: b,
|
|
385
355
|
minHeight: H,
|
|
386
356
|
includeLayers: d,
|
|
387
|
-
excludeLayers:
|
|
357
|
+
excludeLayers: p,
|
|
388
358
|
mapLegend: x
|
|
389
359
|
}
|
|
390
360
|
) : /* @__PURE__ */ e.jsx(
|
|
@@ -395,16 +365,16 @@ function se(k) {
|
|
|
395
365
|
zoomLevel: v,
|
|
396
366
|
width: a,
|
|
397
367
|
height: r,
|
|
398
|
-
relativeHeight:
|
|
368
|
+
relativeHeight: b,
|
|
399
369
|
minHeight: H,
|
|
400
370
|
includeLayers: d,
|
|
401
|
-
excludeLayers:
|
|
371
|
+
excludeLayers: p,
|
|
402
372
|
mapLegend: (x || []).find(
|
|
403
|
-
(
|
|
373
|
+
(N) => N.mapStyleName === t.find((T) => T.style === D)?.name
|
|
404
374
|
)?.legend
|
|
405
375
|
}
|
|
406
376
|
),
|
|
407
|
-
|
|
377
|
+
y || u ? /* @__PURE__ */ e.jsx(
|
|
408
378
|
J,
|
|
409
379
|
{
|
|
410
380
|
styles: { footnote: m?.footnote, source: m?.source },
|
|
@@ -412,7 +382,7 @@ function se(k) {
|
|
|
412
382
|
footnote: f?.footnote,
|
|
413
383
|
source: f?.source
|
|
414
384
|
},
|
|
415
|
-
sources:
|
|
385
|
+
sources: y,
|
|
416
386
|
footNote: u,
|
|
417
387
|
width: a
|
|
418
388
|
}
|
|
@@ -426,6 +396,6 @@ function se(k) {
|
|
|
426
396
|
);
|
|
427
397
|
}
|
|
428
398
|
export {
|
|
429
|
-
|
|
399
|
+
ie as GeoHubMap
|
|
430
400
|
};
|
|
431
401
|
//# sourceMappingURL=GeoHubMap.js.map
|
package/dist/GeoHubMap.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GeoHubMap.js","sources":["../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubMultipleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubSingleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n mapLegend?: string | React.ReactNode;\r\n}\r\n\r\nexport function GeoHubMultipleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapRef = useRef<any>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth && !mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n mapRef.current = new maplibreGl.Map(mapObj);\r\n mapRef.current.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n mapRef.current.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, center, zoomLevel, includeLayers, excludeLayers, mapStyle]);\r\n useEffect(() => {\r\n if (mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapStyleObj: any = {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n };\r\n mapRef.current.setStyle(mapStyleObj);\r\n });\r\n }\r\n }, [excludeLayers, includeLayers, mapStyle]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\r\n height: Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n border: '1px solid var(--gray-400)',\r\n borderRadius: '999px',\r\n width: '24px',\r\n height: '24px',\r\n padding: '3px',\r\n cursor: 'pointer',\r\n zIndex: 10,\r\n position: 'absolute',\r\n right: '-0.75rem',\r\n top: '-0.75rem',\r\n }}\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='p-2'\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n }}\r\n dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n mapLegend?: string | React.ReactNode;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n}\r\n\r\nexport function GeoHubSingleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n const map = new maplibreGl.Map(mapObj);\r\n map.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n map.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, mapStyle, center, zoomLevel, includeLayers, excludeLayers]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\r\n height: Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n border: '1px solid var(--gray-400)',\r\n borderRadius: '999px',\r\n width: '24px',\r\n height: '24px',\r\n padding: '3px',\r\n cursor: 'pointer',\r\n zIndex: 10,\r\n position: 'absolute',\r\n right: '-0.75rem',\r\n top: '-0.75rem',\r\n }}\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='p-2'\r\n style={{\r\n backgroundColor: 'rgba(240,240,240, 0.7)',\r\n }}\r\n dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-550 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import React, { useEffect, useMemo, useState } from 'react';\r\nimport { DropdownSelect, createFilter } from '@undp/design-system-react/DropdownSelect';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { GeoHubMultipleMap } from './GeoHubMultipleMap';\r\nimport { GeoHubSingleMap } from './GeoHubSingleMap';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ClassNameObject,\r\n Languages,\r\n MapLegendDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** URL for mapStyle JSON. If the type is string, otherwise it creates and dropdown and provide end user to select the map style they would like to */\r\n mapStyle: string | { style: string; name: string }[];\r\n /** Defines the legend for the map. If the mapStyle is string, mapLegend can be string or ReactNode. mapLegend with type string is show as innerHTML. If the mapStyle is not string, mapLegend is of type { mapStyleName: string; legend: string | React.ReactNode }[] where mapStyleName corresponds to the each name in the mapStyle. */\r\n mapLegend?: string | React.ReactNode | MapLegendDataType[];\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\r\n /** List of layer IDs to be included in the visualization. If this is present only these layers are included. */\r\n includeLayers?: string[];\r\n /** List of layer IDs to be excluded from the visualization */\r\n excludeLayers?: string[];\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Theme for the UI elements */\r\n uiMode?: 'light' | 'normal';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */\r\nexport function GeoHubMap(props: Props) {\r\n const {\r\n mapStyle,\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n center,\r\n zoomLevel,\r\n graphID,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n includeLayers = [],\r\n excludeLayers = [],\r\n ariaLabel,\r\n uiMode = 'normal',\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n\r\n const [selectedMapStyle, setSelectedMapStyle] = useState(\r\n typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style,\r\n );\r\n\r\n useEffect(() => {\r\n setSelectedMapStyle(typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style);\r\n }, [mapStyle]);\r\n\r\n const filterConfig = useMemo(\r\n () => ({\r\n ignoreCase: true,\r\n ignoreAccents: true,\r\n trim: true,\r\n }),\r\n [],\r\n );\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a map.${graphDescription ? ` ${graphDescription}` : ''}`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n />\r\n ) : null}\r\n {typeof mapStyle === 'string' ? null : (\r\n <DropdownSelect\r\n options={mapStyle.map(d => ({ label: d.name, value: d.style }))}\r\n isClearable={false}\r\n size='sm'\r\n variant={uiMode}\r\n isRtl={language === 'he' || language === 'ar'}\r\n isSearchable\r\n filterOption={createFilter(filterConfig)}\r\n defaultValue={{\r\n label: mapStyle[0].name,\r\n value: mapStyle[0].style,\r\n }}\r\n controlShouldRenderValue\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onChange={(el: any) => {\r\n if (el) setSelectedMapStyle(el.value);\r\n }}\r\n />\r\n )}\r\n {typeof mapStyle === 'string' ? (\r\n <GeoHubSingleMap\r\n mapStyle={mapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={mapLegend as string | React.ReactNode | undefined}\r\n />\r\n ) : (\r\n <GeoHubMultipleMap\r\n mapStyle={selectedMapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={\r\n ((mapLegend || []) as MapLegendDataType[]).find(\r\n d =>\r\n d.mapStyleName === mapStyle.find(el => el.style === selectedMapStyle)?.name,\r\n )?.legend\r\n }\r\n />\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["GeoHubMultipleMap","props","mapStyle","height","width","relativeHeight","center","zoomLevel","minHeight","includeLayers","excludeLayers","mapLegend","svgWidth","setSvgWidth","useState","svgHeight","setSvgHeight","showLegend","setShowLegend","graphDiv","useRef","mapContainer","mapRef","useEffect","resizeObserver","entries","fetchAndParseJSON","d","select","protocol","pmtiles","maplibreGl","mapObj","filterData","mapStyleObj","jsx","jsxs","Fragment","X","string2HTML","React","GeoHubSingleMap","map","GeoHubMap","graphTitle","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","theme","ariaLabel","uiMode","styles","classNames","selectedMapStyle","setSelectedMapStyle","filterConfig","useMemo","cn","GraphHeader","DropdownSelect","createFilter","el","GraphFooter"],"mappings":";;;;;;;;;;;;;AAyBO,SAASA,EAAkBC,GAAc;AAC9C,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,IACEV,GAEE,CAACW,GAAUC,CAAW,IAAIC,EAAS,CAAC,GACpC,CAACC,GAAWC,CAAY,IAAIF,EAAS,CAAC,GACtC,CAACG,GAAYC,CAAa,IAAIJ,EAAS,EAAI,GAC3CK,IAAWC,EAAuB,IAAI,GACtCC,IAAeD,EAAuB,IAAI,GAE1CE,IAASF,EAAY,IAAI;AAC/B,SAAAG,EAAU,MAAM;AACd,UAAMC,IAAiB,IAAI,eAAe,CAAAC,MAAW;AACnD,MAAAZ,EAAYT,KAASqB,EAAQ,CAAC,EAAE,OAAO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","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/GeoHubSingleMap.tsx","../src/Components/Graphs/Maps/GeoHubMaps/SimpleMap/index.tsx"],"sourcesContent":["import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n mapLegend?: string | React.ReactNode;\r\n}\r\n\r\nexport function GeoHubMultipleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapRef = useRef<any>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth && !mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n mapRef.current = new maplibreGl.Map(mapObj);\r\n mapRef.current.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n mapRef.current.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, center, zoomLevel, includeLayers, excludeLayers, mapStyle]);\r\n useEffect(() => {\r\n if (mapRef.current) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapStyleObj: any = {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n };\r\n mapRef.current.setStyle(mapStyleObj);\r\n });\r\n }\r\n }, [excludeLayers, includeLayers, mapStyle]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\r\n height: Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import { useRef, useEffect, useState } from 'react';\r\nimport maplibreGl from 'maplibre-gl';\r\nimport * as pmtiles from 'pmtiles';\r\nimport 'maplibre-gl/dist/maplibre-gl.css';\r\nimport { select } from 'd3-selection';\r\nimport React from 'react';\r\n\r\nimport { fetchAndParseJSON } from '@/Utils/fetchAndParseData';\r\nimport { filterData } from '@/Utils/transformData/filterData';\r\nimport { X } from '@/Components/Icons';\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n mapStyle: string;\r\n center?: [number, number];\r\n zoomLevel?: number;\r\n width?: number;\r\n height?: number;\r\n relativeHeight?: number;\r\n minHeight: number;\r\n mapLegend?: string | React.ReactNode;\r\n includeLayers: string[];\r\n excludeLayers: string[];\r\n}\r\n\r\nexport function GeoHubSingleMap(props: Props) {\r\n const {\r\n mapStyle,\r\n height,\r\n width,\r\n relativeHeight,\r\n center,\r\n zoomLevel,\r\n minHeight,\r\n includeLayers,\r\n excludeLayers,\r\n mapLegend,\r\n } = props;\r\n const [svgWidth, setSvgWidth] = useState(0);\r\n const [svgHeight, setSvgHeight] = useState(0);\r\n const [showLegend, setShowLegend] = useState(true);\r\n const graphDiv = useRef<HTMLDivElement>(null);\r\n const mapContainer = useRef<HTMLDivElement>(null);\r\n useEffect(() => {\r\n const resizeObserver = new ResizeObserver(entries => {\r\n setSvgWidth(width || entries[0].target.clientWidth || 620);\r\n setSvgHeight(height || entries[0].target.clientHeight || 480);\r\n });\r\n if (graphDiv.current) {\r\n setSvgHeight(graphDiv.current.clientHeight || 480);\r\n setSvgWidth(graphDiv.current.clientWidth || 620);\r\n if (!width) resizeObserver.observe(graphDiv.current);\r\n }\r\n return () => resizeObserver.disconnect();\r\n }, [width, height]);\r\n useEffect(() => {\r\n if (mapContainer.current && svgWidth) {\r\n fetchAndParseJSON(mapStyle).then(d => {\r\n const mapDiv = select(mapContainer.current);\r\n mapDiv.selectAll('div').remove();\r\n const protocol = new pmtiles.Protocol();\r\n maplibreGl.addProtocol('pmtiles', protocol.tile);\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const mapObj: any = {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n container: mapContainer.current as any,\r\n style:\r\n includeLayers.length === 0 && excludeLayers.length === 0\r\n ? d\r\n : {\r\n ...d,\r\n layers: filterData(d.layers, [\r\n {\r\n column: 'id',\r\n includeValues: includeLayers,\r\n excludeValues: excludeLayers,\r\n },\r\n ]),\r\n },\r\n attributionControl: true,\r\n };\r\n if (center) {\r\n mapObj.center = center;\r\n }\r\n if (zoomLevel) {\r\n mapObj.zoom = zoomLevel;\r\n }\r\n const map = new maplibreGl.Map(mapObj);\r\n map.addControl(\r\n new maplibreGl.NavigationControl({\r\n visualizePitch: true,\r\n showZoom: true,\r\n showCompass: true,\r\n }),\r\n 'bottom-right',\r\n );\r\n map.addControl(new maplibreGl.ScaleControl(), 'bottom-left');\r\n });\r\n }\r\n }, [svgWidth, mapStyle, center, zoomLevel, includeLayers, excludeLayers]);\r\n return (\r\n <div\r\n className='flex flex-col grow justify-center leading-0'\r\n ref={graphDiv}\r\n aria-label='Map area'\r\n >\r\n {(width || svgWidth) && (height || svgHeight) ? (\r\n <div\r\n style={{\r\n width: width || svgWidth,\r\n height: Math.max(\r\n minHeight,\r\n height ||\r\n (relativeHeight\r\n ? minHeight\r\n ? (width || svgWidth) * relativeHeight > minHeight\r\n ? (width || svgWidth) * relativeHeight\r\n : minHeight\r\n : (width || svgWidth) * relativeHeight\r\n : svgHeight),\r\n ),\r\n }}\r\n >\r\n <div\r\n ref={mapContainer}\r\n className='map maplibre-show-control'\r\n style={{ width: '100%', height: '100%' }}\r\n />\r\n {mapLegend ? (\r\n <div className='absolute left-[22px] bottom-13'>\r\n {showLegend ? (\r\n <>\r\n <div\r\n className='color-legend-close-button bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)] border border-[var(--gray-400)] rounded-full w-6 h-6 p-[3px] cursor-pointer z-10 absolute right-[-0.75rem] top-[-0.75rem]'\r\n onClick={() => {\r\n setShowLegend(false);\r\n }}\r\n >\r\n <X />\r\n </div>\r\n <div\r\n className='color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]'\r\n dangerouslySetInnerHTML={\r\n typeof mapLegend === 'string' ? { __html: string2HTML(mapLegend) } : undefined\r\n }\r\n >\r\n {React.isValidElement(mapLegend) ? mapLegend : null}\r\n </div>\r\n </>\r\n ) : (\r\n <button\r\n type='button'\r\n className='mb-0 border-0 bg-transparent p-0 self-start'\r\n onClick={() => {\r\n setShowLegend(true);\r\n }}\r\n >\r\n <div className='show-color-legend-button items-start text-sm font-medium cursor-pointer p-2 mb-0 flex text-primary-black dark:text-primary-gray-300 bg-primary-gray-300 dark:bg-primary-gray-600 border-primary-gray-400 dark:border-primary-gray-500'>\r\n Show Legend\r\n </div>\r\n </button>\r\n )}\r\n </div>\r\n ) : null}\r\n </div>\r\n ) : null}\r\n </div>\r\n );\r\n}\r\n","import React, { useEffect, useMemo, useState } from 'react';\r\nimport { DropdownSelect, createFilter } from '@undp/design-system-react/DropdownSelect';\r\nimport { cn } from '@undp/design-system-react/cn';\r\n\r\nimport { GeoHubMultipleMap } from './GeoHubMultipleMap';\r\nimport { GeoHubSingleMap } from './GeoHubSingleMap';\r\n\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport {\r\n ClassNameObject,\r\n Languages,\r\n MapLegendDataType,\r\n SourcesDataType,\r\n StyleObject,\r\n} from '@/Types';\r\n\r\ninterface Props {\r\n // Titles, Labels, and Sources\r\n /** Title of the graph */\r\n graphTitle?: string | React.ReactNode;\r\n /** Description of the graph */\r\n graphDescription?: string | React.ReactNode;\r\n /** Footnote for the graph */\r\n footNote?: string | React.ReactNode;\r\n /** Source data for the graph */\r\n sources?: SourcesDataType[];\r\n /** Accessibility label */\r\n ariaLabel?: string;\r\n\r\n // Colors and Styling\r\n /** Background color of the graph */\r\n backgroundColor?: string | boolean;\r\n /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n styles?: StyleObject;\r\n /** Custom class names */\r\n classNames?: ClassNameObject;\r\n\r\n // Size and Spacing\r\n /** Width of the graph */\r\n width?: number;\r\n /** Height of the graph */\r\n height?: number;\r\n /** Minimum height of the graph */\r\n minHeight?: number;\r\n /** Relative height scaling factor. This overwrites the height props */\r\n relativeHeight?: number;\r\n /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n padding?: string;\r\n\r\n // Graph Parameters\r\n /** URL for mapStyle JSON. If the type is string, otherwise it creates and dropdown and provide end user to select the map style they would like to */\r\n mapStyle: string | { style: string; name: string }[];\r\n /** Defines the legend for the map. If the mapStyle is string, mapLegend can be string or ReactNode. mapLegend with type string is show as innerHTML. If the mapStyle is not string, mapLegend is of type { mapStyleName: string; legend: string | React.ReactNode }[] where mapStyleName corresponds to the each name in the mapStyle. */\r\n mapLegend?: string | React.ReactNode | MapLegendDataType[];\r\n /** Starting center point of the map */\r\n center?: [number, number];\r\n /** Starting zoom level of the map */\r\n zoomLevel?: number;\r\n /** List of layer IDs to be included in the visualization. If this is present only these layers are included. */\r\n includeLayers?: string[];\r\n /** List of layer IDs to be excluded from the visualization */\r\n excludeLayers?: string[];\r\n\r\n // Configuration and Options\r\n /** Language setting */\r\n language?: Languages;\r\n /** Color theme */\r\n theme?: 'light' | 'dark';\r\n /** Theme for the UI elements */\r\n uiMode?: 'light' | 'normal';\r\n /** Unique ID for the graph */\r\n graphID?: string;\r\n}\r\n\r\n/** For using these maps you will have to install [`maplibre`](https://maplibre.org/maplibre-gl-js/docs/#npm) and [pmtiles](https://www.npmjs.com/package/pmtiles) package to your project */\r\nexport function GeoHubMap(props: Props) {\r\n const {\r\n mapStyle,\r\n graphTitle,\r\n height,\r\n width,\r\n relativeHeight,\r\n sources,\r\n graphDescription,\r\n footNote,\r\n padding,\r\n backgroundColor = false,\r\n center,\r\n zoomLevel,\r\n graphID,\r\n language = 'en',\r\n minHeight = 0,\r\n theme = 'light',\r\n includeLayers = [],\r\n excludeLayers = [],\r\n ariaLabel,\r\n uiMode = 'normal',\r\n styles,\r\n classNames,\r\n mapLegend,\r\n } = props;\r\n\r\n const [selectedMapStyle, setSelectedMapStyle] = useState(\r\n typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style,\r\n );\r\n\r\n useEffect(() => {\r\n setSelectedMapStyle(typeof mapStyle === 'string' ? mapStyle : mapStyle[0].style);\r\n }, [mapStyle]);\r\n\r\n const filterConfig = useMemo(\r\n () => ({\r\n ignoreCase: true,\r\n ignoreAccents: true,\r\n trim: true,\r\n }),\r\n [],\r\n );\r\n return (\r\n <div\r\n className={`${theme || 'light'} flex ${width ? 'w-fit grow-0' : 'w-full grow'}`}\r\n dir={language === 'he' || language === 'ar' ? 'rtl' : undefined}\r\n >\r\n <div\r\n className={cn(\r\n `${\r\n !backgroundColor\r\n ? 'bg-transparent '\r\n : backgroundColor === true\r\n ? 'bg-primary-gray-200 dark:bg-primary-gray-650 '\r\n : ''\r\n }ml-auto mr-auto flex flex-col grow h-inherit ${language || 'en'}`,\r\n width ? 'w-fit' : 'w-full',\r\n classNames?.graphContainer,\r\n )}\r\n style={{\r\n ...(styles?.graphContainer || {}),\r\n ...(backgroundColor && backgroundColor !== true ? { backgroundColor } : {}),\r\n }}\r\n id={graphID}\r\n aria-label={\r\n ariaLabel ||\r\n `${\r\n graphTitle ? `The graph shows ${graphTitle}. ` : ''\r\n }This is a map.${graphDescription ? ` ${graphDescription}` : ''}`\r\n }\r\n >\r\n <div\r\n className='flex grow'\r\n style={{ padding: backgroundColor ? padding || '1rem' : padding || 0 }}\r\n >\r\n <div className='flex flex-col w-full gap-4 grow justify-between'>\r\n {graphTitle || graphDescription ? (\r\n <GraphHeader\r\n styles={{\r\n title: styles?.title,\r\n description: styles?.description,\r\n }}\r\n classNames={{\r\n title: classNames?.title,\r\n description: classNames?.description,\r\n }}\r\n graphTitle={graphTitle}\r\n graphDescription={graphDescription}\r\n width={width}\r\n />\r\n ) : null}\r\n {typeof mapStyle === 'string' ? null : (\r\n <DropdownSelect\r\n options={mapStyle.map(d => ({ label: d.name, value: d.style }))}\r\n isClearable={false}\r\n size='sm'\r\n variant={uiMode}\r\n isRtl={language === 'he' || language === 'ar'}\r\n isSearchable\r\n filterOption={createFilter(filterConfig)}\r\n defaultValue={{\r\n label: mapStyle[0].name,\r\n value: mapStyle[0].style,\r\n }}\r\n controlShouldRenderValue\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n onChange={(el: any) => {\r\n if (el) setSelectedMapStyle(el.value);\r\n }}\r\n />\r\n )}\r\n {typeof mapStyle === 'string' ? (\r\n <GeoHubSingleMap\r\n mapStyle={mapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={mapLegend as string | React.ReactNode | undefined}\r\n />\r\n ) : (\r\n <GeoHubMultipleMap\r\n mapStyle={selectedMapStyle}\r\n center={center}\r\n zoomLevel={zoomLevel}\r\n width={width}\r\n height={height}\r\n relativeHeight={relativeHeight}\r\n minHeight={minHeight}\r\n includeLayers={includeLayers}\r\n excludeLayers={excludeLayers}\r\n mapLegend={\r\n ((mapLegend || []) as MapLegendDataType[]).find(\r\n d =>\r\n d.mapStyleName === mapStyle.find(el => el.style === selectedMapStyle)?.name,\r\n )?.legend\r\n }\r\n />\r\n )}\r\n {sources || footNote ? (\r\n <GraphFooter\r\n styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n classNames={{\r\n footnote: classNames?.footnote,\r\n source: classNames?.source,\r\n }}\r\n sources={sources}\r\n footNote={footNote}\r\n width={width}\r\n />\r\n ) : null}\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n );\r\n}\r\n"],"names":["GeoHubMultipleMap","props","mapStyle","height","width","relativeHeight","center","zoomLevel","minHeight","includeLayers","excludeLayers","mapLegend","svgWidth","setSvgWidth","useState","svgHeight","setSvgHeight","showLegend","setShowLegend","graphDiv","useRef","mapContainer","mapRef","useEffect","resizeObserver","entries","fetchAndParseJSON","d","select","protocol","pmtiles","maplibreGl","mapObj","filterData","mapStyleObj","jsx","jsxs","Fragment","X","string2HTML","React","GeoHubSingleMap","map","GeoHubMap","graphTitle","sources","graphDescription","footNote","padding","backgroundColor","graphID","language","theme","ariaLabel","uiMode","styles","classNames","selectedMapStyle","setSelectedMapStyle","filterConfig","useMemo","cn","GraphHeader","DropdownSelect","createFilter","el","GraphFooter"],"mappings":";;;;;;;;;;;;;AAyBO,SAASA,EAAkBC,GAAc;AAC9C,QAAM;AAAA,IACJ,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,OAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,WAAAC;AAAA,EAAA,IACEV,GAEE,CAACW,GAAUC,CAAW,IAAIC,EAAS,CAAC,GACpC,CAACC,GAAWC,CAAY,IAAIF,EAAS,CAAC,GACtC,CAACG,GAAYC,CAAa,IAAIJ,EAAS,EAAI,GAC3CK,IAAWC,EAAuB,IAAI,GACtCC,IAAeD,EAAuB,IAAI,GAE1CE,IAASF,EAAY,IAAI;AAC/B,SAAAG,EAAU,MAAM;AACd,UAAMC,IAAiB,IAAI,eAAe,CAAAC,MAAW;AACnD,MAAAZ,EAAYT,KAASqB,EAAQ,CAAC,EAAE,OAAO,eAAe,GAAG,GACzDT,EAAab,KAAUsB,EAAQ,CAAC,EAAE,OAAO,gBAAgB,GAAG;AAAA,IAC9D,CAAC;AACD,WAAIN,EAAS,YACXH,EAAaG,EAAS,QAAQ,gBAAgB,GAAG,GACjDN,EAAYM,EAAS,QAAQ,eAAe,GAAG,GAC1Cf,KAAOoB,EAAe,QAAQL,EAAS,OAAO,IAE9C,MAAMK,EAAe,WAAA;AAAA,EAC9B,GAAG,CAACpB,GAAOD,CAAM,CAAC,GAClBoB,EAAU,MAAM;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