@undp/data-viz 2.3.9 → 2.3.11
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.js +16 -16
- package/dist/{Axis-D56Gy0se.js → Axis-RyGdzLrG.js} +2 -2
- package/dist/{Axis-D56Gy0se.js.map → Axis-RyGdzLrG.js.map} +1 -1
- package/dist/{AxisTitle-VFq89Olw.js → AxisTitle-DGjX1_2v.js} +2 -2
- package/dist/{AxisTitle-VFq89Olw.js.map → AxisTitle-DGjX1_2v.js.map} +1 -1
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +18 -18
- package/dist/BasicStatCard.js +2 -2
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +13 -13
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +12 -12
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +18 -18
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +15 -15
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +12 -12
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +4 -4
- package/dist/ColorLegend.js +2 -2
- package/dist/ColorLegendWithMouseOver.js +2 -2
- package/dist/CopyTextButton.cjs +1 -1
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +4 -4
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/CsvDownloadButton.js +2 -2
- package/dist/DataCards.cjs +1 -1
- package/dist/DataCards.js +7 -7
- package/dist/DataTable.js +4 -4
- package/dist/{DetailsModal-BMCTgVsk.js → DetailsModal-C3qlUyFK.js} +3 -3
- package/dist/{DetailsModal-BMCTgVsk.js.map → DetailsModal-C3qlUyFK.js.map} +1 -1
- package/dist/{DetailsModal-DHttOA80.cjs → DetailsModal-DIRTulvr.cjs} +2 -2
- package/dist/{DetailsModal-DHttOA80.cjs.map → DetailsModal-DIRTulvr.cjs.map} +1 -1
- package/dist/DifferenceLineChart.js +15 -15
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +10 -10
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +13 -13
- package/dist/{DropdownSelect-D8rFbygC.js → DropdownSelect-B2WTeedJ.js} +2 -2
- package/dist/{DropdownSelect-D8rFbygC.js.map → DropdownSelect-B2WTeedJ.js.map} +1 -1
- package/dist/DualAxisLineChart.js +12 -12
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +18 -18
- package/dist/{EmptyState-dScPFkLy.js → EmptyState-D807L58h.js} +4 -4
- package/dist/{EmptyState-dScPFkLy.js.map → EmptyState-D807L58h.js.map} +1 -1
- package/dist/ExcelDownloadButton.js +2 -2
- package/dist/FootNote.js +2 -2
- package/dist/GeoHubCompareMaps.js +3 -3
- package/dist/GeoHubMap.js +4 -4
- package/dist/GeoHubMapWithLayerSelection.js +5 -5
- package/dist/{GraphContainer-CF6ws3pd.js → GraphContainer-DwMxWRCi.js} +2 -2
- package/dist/{GraphContainer-CF6ws3pd.js.map → GraphContainer-DwMxWRCi.js.map} +1 -1
- package/dist/GraphDescription.js +2 -2
- package/dist/{GraphEl-Bw-9MUym.js → GraphEl-CT3xPv2P.js} +5 -5
- package/dist/{GraphEl-Bw-9MUym.js.map → GraphEl-CT3xPv2P.js.map} +1 -1
- package/dist/{GraphEl-DjElfY07.cjs → GraphEl-DvwOOhF1.cjs} +2 -2
- package/dist/{GraphEl-DjElfY07.cjs.map → GraphEl-DvwOOhF1.cjs.map} +1 -1
- package/dist/GraphFooter.js +2 -2
- package/dist/GraphHeader.js +1 -1
- package/dist/GraphTitle.js +2 -2
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +6 -6
- package/dist/GriddedGraphsFromConfig.js +2 -2
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +10 -10
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +4 -4
- package/dist/HybridMap.cjs +1 -1
- package/dist/HybridMap.cjs.map +1 -1
- package/dist/HybridMap.js +15 -15
- package/dist/ImageDownloadButton.js +2 -2
- package/dist/LineChartWithConfidenceInterval.js +15 -15
- package/dist/LinearColorLegend.js +2 -2
- package/dist/{Modal-Ch9wvKxF.js → Modal-BV4rkoLM.js} +5 -5
- package/dist/{Modal-Ch9wvKxF.js.map → Modal-BV4rkoLM.js.map} +1 -1
- package/dist/{Modal-CaYa_TLE.cjs → Modal-ZX55hLH-.cjs} +5 -5
- package/dist/{Modal-CaYa_TLE.cjs.map → Modal-ZX55hLH-.cjs.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +4 -4
- package/dist/MultiGraphDashboardFromConfig.js +2 -2
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +4 -4
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +2 -2
- package/dist/MultiLineAltChart.js +15 -15
- package/dist/MultiLineChart.js +15 -15
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +12 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +4 -4
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +2 -2
- package/dist/PerformanceIntensiveScrollStory.js +3 -3
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +9 -9
- package/dist/{ReferenceLine-DgtoRgw0.js → ReferenceLine-CNEjAYvv.js} +3 -3
- package/dist/{ReferenceLine-DgtoRgw0.js.map → ReferenceLine-CNEjAYvv.js.map} +1 -1
- package/dist/{RegressionLine-D2aqeBKp.js → RegressionLine-BDrndQxo.js} +4 -4
- package/dist/{RegressionLine-D2aqeBKp.js.map → RegressionLine-BDrndQxo.js.map} +1 -1
- package/dist/SVGDownloadButton.js +2 -2
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +9 -9
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +20 -20
- package/dist/ScrollStory.js +3 -3
- package/dist/SimpleLineChart.js +16 -16
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +6 -6
- package/dist/SingleGraphDashboardFromConfig.js +2 -2
- package/dist/SingleGraphDashboardGeoHubMaps.js +3 -3
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +2 -2
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +6 -6
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +2 -2
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +11 -11
- package/dist/{Source-Cu9OHOBj.js → Source-eILIr4Ov.js} +5 -5
- package/dist/{Source-Cu9OHOBj.js.map → Source-eILIr4Ov.js.map} +1 -1
- package/dist/Source.js +3 -3
- package/dist/SparkLine.js +5 -5
- package/dist/{Spinner--r2RrJV8.js → Spinner-CtJETd5V.js} +2 -2
- package/dist/{Spinner--r2RrJV8.js.map → Spinner-CtJETd5V.js.map} +1 -1
- package/dist/StatCardFromData.js +2 -2
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +9 -9
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +7 -7
- package/dist/ThresholdColorLegendWithMouseOver.js +2 -2
- package/dist/{Tooltip-BRnAz2Gv.js → Tooltip-CohiIbLZ.js} +2 -2
- package/dist/{Tooltip-BRnAz2Gv.js.map → Tooltip-CohiIbLZ.js.map} +1 -1
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +9 -9
- package/dist/{Typography-CdMGooqp.js → Typography-HicNIA61.js} +2 -2
- package/dist/{Typography-CdMGooqp.js.map → Typography-HicNIA61.js.map} +1 -1
- package/dist/UnitChart.js +6 -6
- package/dist/WaterfallChart.cjs +1 -1
- package/dist/WaterfallChart.js +14 -14
- package/dist/{XAxesLabels-rhK7lRjO.js → XAxesLabels-IwjMJkYS.js} +3 -3
- package/dist/{XAxesLabels-rhK7lRjO.js.map → XAxesLabels-IwjMJkYS.js.map} +1 -1
- package/dist/{XTicksAndGridLines-CVZkZkpS.js → XTicksAndGridLines-BDmF9etl.js} +2 -2
- package/dist/{XTicksAndGridLines-CVZkZkpS.js.map → XTicksAndGridLines-BDmF9etl.js.map} +1 -1
- package/dist/{YAxesLabels-QICWVsHf.js → YAxesLabels-DoGvgHdw.js} +3 -3
- package/dist/{YAxesLabels-QICWVsHf.js.map → YAxesLabels-DoGvgHdw.js.map} +1 -1
- package/dist/{YTicksAndGridLines-GnXnSRF2.js → YTicksAndGridLines-C3GW1xFG.js} +2 -2
- package/dist/{YTicksAndGridLines-GnXnSRF2.js.map → YTicksAndGridLines-C3GW1xFG.js.map} +1 -1
- package/dist/{checkIfMultiple-D9fVkeOq.js → checkIfMultiple-B97uOUVq.js} +5 -5
- package/dist/{checkIfMultiple-D9fVkeOq.js.map → checkIfMultiple-B97uOUVq.js.map} +1 -1
- package/dist/{checkIfMultiple-DxnGtm3t.cjs → checkIfMultiple-TOaaUwS7.cjs} +2 -2
- package/dist/{checkIfMultiple-DxnGtm3t.cjs.map → checkIfMultiple-TOaaUwS7.cjs.map} +1 -1
- package/dist/{customArea-ASDaSE4u.js → customArea-Cc2whe6P.js} +3 -3
- package/dist/{customArea-ASDaSE4u.js.map → customArea-Cc2whe6P.js.map} +1 -1
- package/dist/{getSliderMarks-Cvg8zHBU.js → getSliderMarks-vXsR8RrR.js} +2 -2
- package/dist/{getSliderMarks-Cvg8zHBU.js.map → getSliderMarks-vXsR8RrR.js.map} +1 -1
- package/dist/{index-BzNfurbO.js → index-B5ggV1vg.js} +9 -9
- package/dist/{index-BzNfurbO.js.map → index-B5ggV1vg.js.map} +1 -1
- package/dist/{index-CXobQn-E.cjs → index-BDR7MlMo.cjs} +2 -2
- package/dist/{index-CXobQn-E.cjs.map → index-BDR7MlMo.cjs.map} +1 -1
- package/dist/{index-CHPV5EwG-DecW7_qr.js → index-CHPV5EwG-BCLAYDCV.js} +3 -3
- package/dist/{index-CHPV5EwG-DecW7_qr.js.map → index-CHPV5EwG-BCLAYDCV.js.map} +1 -1
- package/dist/{index-Dp_SfsUA.js → index-CKpKc9DR.js} +3 -3
- package/dist/{index-Dp_SfsUA.js.map → index-CKpKc9DR.js.map} +1 -1
- package/dist/{index-B-4y_iGB.js → index-CZ0elhKR.js} +4 -4
- package/dist/{index-B-4y_iGB.js.map → index-CZ0elhKR.js.map} +1 -1
- package/dist/{index-CtMBjvtq.js → index-Co3YGYe1.js} +3 -3
- package/dist/{index-CtMBjvtq.js.map → index-Co3YGYe1.js.map} +1 -1
- package/dist/{index-Cw8sCyo_-n4AacHGk.js → index-D6CYcVc7-BOa7Dpvf.js} +5 -5
- package/dist/{index-Cw8sCyo_-n4AacHGk.js.map → index-D6CYcVc7-BOa7Dpvf.js.map} +1 -1
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs +2 -0
- package/dist/index-D6CYcVc7-CTEcAtiQ.cjs.map +1 -0
- package/dist/{index-CSiFiXPj.js → index-D_dtv_T9.js} +3 -3
- package/dist/{index-CSiFiXPj.js.map → index-D_dtv_T9.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-CG2Ar7l1.js → index-DoS4bGNa-Bgab95kx.js} +2 -2
- package/dist/{index-Dzc_aaI9-CG2Ar7l1.js.map → index-DoS4bGNa-Bgab95kx.js.map} +1 -1
- package/dist/{index-Dzc_aaI9-C3DbPpy3.cjs → index-DoS4bGNa-C3DbPpy3.cjs} +1 -1
- package/dist/{index-Dzc_aaI9-C3DbPpy3.cjs.map → index-DoS4bGNa-C3DbPpy3.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/{linear-CalFSAaO.js → linear-DNXM5Pdl.js} +3 -3
- package/dist/{linear-CalFSAaO.js.map → linear-DNXM5Pdl.js.map} +1 -1
- package/dist/{pow-CaIrlM4J.js → pow-BXYLJHCq.js} +2 -2
- package/dist/{pow-CaIrlM4J.js.map → pow-BXYLJHCq.js.map} +1 -1
- package/dist/{proxy-DRuSUlPL.js → proxy--_f6k3NR.js} +2 -2
- package/dist/{proxy-DRuSUlPL.js.map → proxy--_f6k3NR.js.map} +1 -1
- package/dist/{string-C_xJ4Wg4.js → string-CbaFIsiV.js} +4 -4
- package/dist/{string-C_xJ4Wg4.js.map → string-CbaFIsiV.js.map} +1 -1
- package/dist/style.css +1 -1
- package/dist/{time-CAtex-RV.js → time-vyz6Y89P.js} +2 -2
- package/dist/{time-CAtex-RV.js.map → time-vyz6Y89P.js.map} +1 -1
- package/dist/{use-in-view-Dl5L8LtP.js → use-in-view-DqvKAveg.js} +2 -2
- package/dist/{use-in-view-Dl5L8LtP.js.map → use-in-view-DqvKAveg.js.map} +1 -1
- package/package.json +2 -2
- package/dist/index-Cw8sCyo_-CEcCMKUi.cjs +0 -2
- package/dist/index-Cw8sCyo_-CEcCMKUi.cjs.map +0 -1
package/dist/ThreeDGlobe.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),h=require("react"),nt=require("./Spinner-jTMOLuw_.cjs"),lt=require("react-globe.gl"),ct=require("./index-DQA8q5sC.cjs"),dt=require("three"),Ke=require("./Typography-Cc_iHQB-.cjs"),ut=require("./_commonjsHelpers-BH3jXuIh.cjs"),pt=require("./Tooltip-BLa2EfMs.cjs"),ht=require("./numberFormattingFunction-02t-wJta.cjs"),mt=require("./index-sbKVyHS2.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-DHttOA80.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),Qe=require("./GraphContainer-B1EDxJ0S.cjs");function Rt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const _=Rt(dt);var Ye,et;function St(){if(et)return Ye;et=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),q=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:q}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},R=function(o,l){var v=o.r,a=o.g,j=o.b,q=o.a,P=w(l)?l:q;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return R(j,l)};return Ye=f,Ye}var Et=St();const tt=ut.getDefaultExportFromCjs(Et);function Dt(t){let e;switch(t.type){case"ambient":e=new _.AmbientLight(t.color,t.intensity);break;case"directional":e=new _.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new _.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new _.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:R,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:q,tooltip:P,styles:fe,classNames:U,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:$,onSeriesMouseClick:V,onSeriesMouseOver:ve,resetSelectionOnDoubleClick:ye,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:W,centerLat:Z,atmosphereAltitude:ie,globeCurvatureResolution:J,fogSettings:L,lights:z,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:X,dimmedOpacity:A}=t,[B,be]=h.useState(!1),u=h.useRef(void 0),[H,N]=h.useState(void 0),[we,ne]=h.useState(X===void 0?!(e<680):!X),[le,ce]=h.useState({x:0,y:0}),[S,de]=h.useState(void 0),Y=R?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(S||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[S,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{ce({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:Z,lng:W,altitude:M},1e3)},[M,W,Z]);const E=o||new _.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof _.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),z.map(p=>Dt(p)).forEach((p,D)=>{z[D].type!=="ambient"&&z[D].position==="camera"?(s.add(p),z[D].type!=="point"&&s.add(p.target)):r.add(p)}),L&&(r.fog=new _.Fog(L.color,L.near,L.far))},[z,L]),k=()=>{be(!0),G()};return h.useEffect(()=>{B&&G()},[B,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(lt,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===S?.id||r?.properties?.[a]===H?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(D=>D.id===d)?.x,p=b!=null?Y(b):oe;return tt(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(D=>D.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?Y(d):oe;return tt(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===S?.id?se:j,onGlobeClick:()=>{N(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;(V||$)&&(ct.isEqual(H,s)&&ye&&s?(N(void 0),V?.(void 0)):(N(s),V?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ve?.(s)},atmosphereColor:q,atmosphereAltitude:ie,globeCurvatureResolution:J,globeMaterial:E,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:Z,lng:W});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),k()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",U?.colorLegend),children:we?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx("div",{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]",onClick:()=>{ne(!1)},children:i.jsxRuntimeExports.jsx(mt.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:R?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,R?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:ht.numberFormattingFunction(r,"NA")})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{ne(!0)},children:i.jsxRuntimeExports.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"})})}),S&&P?i.jsxRuntimeExports.jsx(pt.Tooltip,{data:S,body:P,xPos:le.x,yPos:le.y,backgroundStyle:fe?.tooltip,className:U?.tooltip}):null,$&&H!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:$,data:H,setData:N,className:U?.modal}):null]})}function kt(t){const e=i.compilerRuntimeExports.c(97),{data:n,mapData:x,graphTitle:w,colors:R,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:q,padding:P,mapNoDataColor:fe,backgroundColor:U,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:$,dataDownload:V,language:ve,minHeight:ye,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:W,enableZoom:Z,globeMaterial:ie,centerPoint:J,atmosphereColor:L,showColorScale:z,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,highlightedIds:B,highlightedAltitude:be,dimmedOpacity:u,scale:H,globeOffset:N,polygonAltitude:we,globeCurvatureResolution:ne,atmosphereAltitude:le,fogSettings:ce,lights:S,selectedId:de,collapseColorScaleByDefault:Y}=t,E=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":v,k=q===void 0?"threshold":q,r=fe===void 0?te.Colors.light.graphNoData:fe,s=U===void 0?!1:U,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=$===void 0?"ISO3":$,p=V===void 0?!1:V,D=ve===void 0?"en":ve,O=ye===void 0?0:ye,F=T===void 0?"light":T,ue=W===void 0?!0:W,Le=Z===void 0?!0:Z;let je;e[0]!==J?(je=J===void 0?[0,0]:J,e[0]=J,e[1]=je):je=e[1];const Ce=je,ze=L===void 0?"#999":L,Ae=z===void 0?!0:z,Ge=ae===void 0?!0:ae;let Re;e[2]!==B?(Re=B===void 0?[]:B,e[2]=B,e[3]=Re):Re=e[3];const Fe=Re,Be=be===void 0?.1:be,He=u===void 0?.3:u,Ie=H===void 0?1:H;let Se;e[4]!==N?(Se=N===void 0?[0,0]:N,e[4]=N,e[5]=Se):Se=e[5];const _e=Se,Ue=we===void 0?.01:we,$e=ne===void 0?4:ne,Ve=le===void 0?.15:le;let Ee;e[6]!==S?(Ee=S===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:S,e[6]=S,e[7]=Ee):Ee=e[7];const We=Ee,[De,ot]=h.useState(void 0),[I,rt]=h.useState(0),[pe,st]=h.useState(0),Ze=h.useRef(null),it=h.useRef(null);let Ne,ke;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const ge=new ResizeObserver(xe=>{rt(xe[0].target.clientWidth||620),st(xe[0].target.clientHeight||480)});return Ze.current&&ge.observe(Ze.current),()=>ge.disconnect()},ke=[],e[8]=Ne,e[9]=ke):(Ne=e[8],ke=e[9]),h.useEffect(Ne,ke);let Oe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Oe=ge=>{ot(ge)},e[10]=Oe):Oe=e[10];const he=h.useEffectEvent(Oe);let qe;e[11]!==E||e[12]!==he?(qe=()=>{typeof E=="string"?wt.fetchAndParseJSON(E).then(xe=>{if(E==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const at=xe.features.map(zt);he(at)}else he(xe.features)}):he(E.features)},e[11]=E,e[12]=he,e[13]=qe):qe=e[13];let Pe;e[14]!==E?(Pe=[E],e[14]=E,e[15]=Pe):Pe=e[15],h.useEffect(qe,Pe);let Te;e[16]!==a||e[17]!==R?.length||e[18]!==n||e[19]!==k?(Te=a||(k==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(Lt),R?.length||4)),e[16]=a,e[17]=R?.length,e[18]=n,e[19]=k,e[20]=Te):Te=e[20];const me=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[21]!==g?.description||e[22]!==g?.title||e[23]!==n||e[24]!==p||e[25]!==c||e[26]!==w||e[27]!==m?.description||e[28]!==m?.title||e[29]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(qt):n.filter(Ot):null}):null,e[21]=g?.description,e[22]=g?.title,e[23]=n,e[24]=p,e[25]=c,e[26]=w,e[27]=m?.description,e[28]=m?.title,e[29]=l,e[30]=K):K=e[30];let Q;e[31]!==Ve||e[32]!==ze||e[33]!==ue||e[34]!==Ce||e[35]!==g||e[36]!==Y||e[37]!==j||e[38]!==R||e[39]!==n||e[40]!==y||e[41]!==He||e[42]!==me||e[43]!==Le||e[44]!==ce||e[45]!==$e||e[46]!==ie||e[47]!==_e||e[48]!==o||e[49]!==Be||e[50]!==Fe||e[51]!==We||e[52]!==d||e[53]!==r||e[54]!==b||e[55]!==De||e[56]!==O||e[57]!==A||e[58]!==X||e[59]!==Ue||e[60]!==C||e[61]!==Ge||e[62]!==Ie||e[63]!==k||e[64]!==de||e[65]!==Ae||e[66]!==m||e[67]!==pe||e[68]!==I||e[69]!==F||e[70]!==re||e[71]!==l?(Q=i.jsxRuntimeExports.jsx(Qe.GraphArea,{ref:Ze,children:I&&pe&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:_e,polygonData:De,colorDomain:me,width:I,height:pe,colors:R||(k==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${me.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${me.length+1}`]),mapNoDataColor:r,categorical:k==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:ue===!0?1.5:ue===!1?0:ue,enableZoom:Le,globeMaterial:ie,atmosphereColor:ze,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:Fe,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,scale:Ie,polygonAltitude:Ue,centerLat:Ce[0],centerLng:Ce[1],atmosphereAltitude:Ve,globeCurvatureResolution:$e,fogSettings:ce,lights:We,highlightedAltitude:Be,selectedId:de,collapseColorScaleByDefault:Y,dimmedOpacity:He}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,o||(C?O?(l||I)*C>O?(l||I)*C:O:(l||I)*C:pe))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(nt.w,{"aria-label":"Loading graph"})})}),e[31]=Ve,e[32]=ze,e[33]=ue,e[34]=Ce,e[35]=g,e[36]=Y,e[37]=j,e[38]=R,e[39]=n,e[40]=y,e[41]=He,e[42]=me,e[43]=Le,e[44]=ce,e[45]=$e,e[46]=ie,e[47]=_e,e[48]=o,e[49]=Be,e[50]=Fe,e[51]=We,e[52]=d,e[53]=r,e[54]=b,e[55]=De,e[56]=O,e[57]=A,e[58]=X,e[59]=Ue,e[60]=C,e[61]=Ge,e[62]=Ie,e[63]=k,e[64]=de,e[65]=Ae,e[66]=m,e[67]=pe,e[68]=I,e[69]=F,e[70]=re,e[71]=l,e[72]=Q):Q=e[72];let ee;e[73]!==g?.footnote||e[74]!==g?.source||e[75]!==G||e[76]!==f||e[77]!==m?.footnote||e[78]!==m?.source||e[79]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[73]=g?.footnote,e[74]=g?.source,e[75]=G,e[76]=f,e[77]=m?.footnote,e[78]=m?.source,e[79]=l,e[80]=ee):ee=e[80];let Me;return e[81]!==M||e[82]!==s||e[83]!==se||e[84]!==o||e[85]!==D||e[86]!==O||e[87]!==P||e[88]!==C||e[89]!==Je||e[90]!==Xe||e[91]!==K||e[92]!==Q||e[93]!==ee||e[94]!==F||e[95]!==l?(Me=i.jsxRuntimeExports.jsxs(Qe.GraphContainer,{className:Je,style:Xe,id:se,ref:it,"aria-label":M,backgroundColor:s,theme:F,language:D,minHeight:O,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[81]=M,e[82]=s,e[83]=se,e[84]=o,e[85]=D,e[86]=O,e[87]=P,e[88]=C,e[89]=Je,e[90]=Xe,e[91]=K,e[92]=Q,e[93]=ee,e[94]=F,e[95]=l,e[96]=Me):Me=e[96],Me}function Ot(t){return t!==void 0}function qt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function Lt(t){return t.x}function zt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=kt;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index-CHPV5EwG-6v2a2njQ.cjs"),h=require("react"),nt=require("./Spinner-jTMOLuw_.cjs"),lt=require("react-globe.gl"),ct=require("./index-DQA8q5sC.cjs"),dt=require("three"),Ke=require("./Typography-Cc_iHQB-.cjs"),ut=require("./_commonjsHelpers-BH3jXuIh.cjs"),pt=require("./Tooltip-BLa2EfMs.cjs"),ht=require("./numberFormattingFunction-02t-wJta.cjs"),mt=require("./index-sbKVyHS2.cjs"),gt=require("./getCentroidCoordinates-CtBGrNC8.cjs"),xt=require("./DetailsModal-DIRTulvr.cjs"),ft=require("./ordinal-CrsysVE-.cjs"),vt=require("./threshold-DNsSUf8Q.cjs"),yt=require("./GraphHeader.cjs"),bt=require("./GraphFooter.cjs"),wt=require("./fetchAndParseData-QTF6tjij.cjs"),te=require("./Colors.cjs"),jt=require("./getUniqValue-NX8DgwND.cjs"),Ct=require("./getJenks-BzJvhy_H.cjs"),Qe=require("./GraphContainer-B1EDxJ0S.cjs");function Rt(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const x=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,x.get?x:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const _=Rt(dt);var Ye,et;function St(){if(et)return Ye;et=1;var t=function(o){return o.charAt(0)==="#"?o.slice(1):o},e=function(o){var l=o.length===3||o.length===4,v=l?"".concat(o.slice(0,1)).concat(o.slice(0,1)):o.slice(0,2),a=l?"".concat(o.slice(1,2)).concat(o.slice(1,2)):o.slice(2,4),j=l?"".concat(o.slice(2,3)).concat(o.slice(2,3)):o.slice(4,6),q=(l?"".concat(o.slice(3,4)).concat(o.slice(3,4)):o.slice(6,8))||"ff";return{r:v,g:a,b:j,a:q}},n=function(o){return parseInt(o,16)},x=function(o){var l=o.r,v=o.g,a=o.b,j=o.a;return{r:n(l),g:n(v),b:n(a),a:+(n(j)/255).toFixed(2)}},w=function(o){return!isNaN(parseFloat(o))&&isFinite(o)},R=function(o,l){var v=o.r,a=o.g,j=o.b,q=o.a,P=w(l)?l:q;return"rgba(".concat(v,", ").concat(a,", ").concat(j,", ").concat(P,")")},f=function(o,l){var v=t(o),a=e(v),j=x(a);return R(j,l)};return Ye=f,Ye}var Et=St();const tt=ut.getDefaultExportFromCjs(Et);function Dt(t){let e;switch(t.type){case"ambient":e=new _.AmbientLight(t.color,t.intensity);break;case"directional":e=new _.DirectionalLight(t.color,t.intensity),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z===void 0?-1:t.target.z),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;case"point":e=new _.PointLight(t.color,t.intensity,t.distance||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z));break;case"spot":e=new _.SpotLight(t.color,t.intensity,t.distance||0,t.angle||Math.PI/3,t.penumbra||0,t.decay||2),t.position&&(t.position==="camera"?e.position.set(0,0,0):e.position.set(t.position.x,t.position.y,t.position.z)),(t.target||t.position==="camera")&&e.target.position.set(t.target?.x||0,t.target?.y||0,t.target?.z||0),t.castShadow&&(e.castShadow=!0,t.shadow&&(e.shadow.mapSize.width=t.shadow.mapSize.width,e.shadow.mapSize.height=t.shadow.mapSize.height,e.shadow.camera.near=t.shadow.camera.near,e.shadow.camera.far=t.shadow.camera.far));break;default:throw new Error("Unknown light type")}return e}function Nt(t){const{width:e,autoRotate:n,data:x,enableZoom:w,categorical:R,colorDomain:f,colors:c,globeMaterial:o,height:l,polygonData:v,mapProperty:a,mapBorderColor:j,atmosphereColor:q,tooltip:P,styles:fe,classNames:U,mapNoDataColor:oe,colorLegendTitle:C,showColorScale:re,hoverStrokeColor:se,detailsOnClick:$,onSeriesMouseClick:V,onSeriesMouseOver:ve,resetSelectionOnDoubleClick:ye,highlightedIds:T,scale:M,globeOffset:m,polygonAltitude:g,centerLng:W,centerLat:Z,atmosphereAltitude:ie,globeCurvatureResolution:J,fogSettings:L,lights:z,highlightedAltitude:ae,selectedId:y,collapseColorScaleByDefault:X,dimmedOpacity:A}=t,[B,be]=h.useState(!1),u=h.useRef(void 0),[H,N]=h.useState(void 0),[we,ne]=h.useState(X===void 0?!(e<680):!X),[le,ce]=h.useState({x:0,y:0}),[S,de]=h.useState(void 0),Y=R?ft.ordinal().domain(f).range(c):vt.threshold().domain(f).range(c);h.useEffect(()=>{u.current&&(u.current.controls().enableZoom=w)},[w]),h.useEffect(()=>{u.current&&(S||y?u.current.controls().autoRotate=!1:(u.current.controls().autoRotate=n!==0,u.current.controls().autoRotateSpeed=n))},[S,y,n]),h.useEffect(()=>{if(u.current&&y){const r=v.find(b=>b.properties[a]===y),[s,d]=gt.getCentroidCoordinates(r);u.current.pointOfView({lat:d,lng:s,altitude:M},1e3)}},[y,M,v,a]),h.useEffect(()=>{const r=u.current?.renderer().domElement;if(!r)return;const s=d=>{ce({x:d.clientX,y:d.clientY})};return r.addEventListener("mousemove",s),()=>r.removeEventListener("mousemove",s)},[]),h.useEffect(()=>{u.current&&u.current.pointOfView({lat:Z,lng:W,altitude:M},1e3)},[M,W,Z]);const E=o||new _.MeshBasicMaterial({color:"#FFF"}),G=h.useCallback(()=>{if(!u.current)return;const r=u.current.scene(),s=u.current.camera();let d=[];r.traverse(p=>{p instanceof _.Light&&d.push(p)}),d=[...d,...s.children],d.forEach(p=>p.parent?.remove(p)),z.map(p=>Dt(p)).forEach((p,D)=>{z[D].type!=="ambient"&&z[D].position==="camera"?(s.add(p),z[D].type!=="point"&&s.add(p.target)):r.add(p)}),L&&(r.fog=new _.Fog(L.color,L.near,L.far))},[z,L]),k=()=>{be(!0),G()};return h.useEffect(()=>{B&&G()},[B,G]),i.jsxRuntimeExports.jsxs("div",{className:"relative",children:[i.jsxRuntimeExports.jsx(lt,{ref:u,height:l,width:e,globeOffset:m,lineHoverPrecision:0,polygonsData:v,polygonAltitude:r=>T.includes(r?.properties?.[a])||r?.properties?.[a]===y||r?.properties?.[a]===S?.id||r?.properties?.[a]===H?.id?ae:g,polygonCapColor:r=>{const s=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,d=r?.properties?.[a],b=x.find(D=>D.id===d)?.x,p=b!=null?Y(b):oe;return tt(p,`${s}`)},polygonSideColor:r=>{const s=r?.properties?.[a],d=x.find(D=>D.id===s)?.x,b=y?r?.properties?.[a]===y?1:A:T.length!==0?T.includes(r?.properties?.[a])?1:A:1,p=d!=null?Y(d):oe;return tt(p,`${b}`)},polygonStrokeColor:r=>r?.properties?.[a]===S?.id?se:j,onGlobeClick:()=>{N(void 0)},onPolygonClick:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;(V||$)&&(ct.isEqual(H,s)&&ye&&s?(N(void 0),V?.(void 0)):(N(s),V?.(s)))},onPolygonHover:r=>{const s=r?.properties?.[a]?x.find(d=>d.id===r?.properties?.[a]):void 0;de(s),ve?.(s)},atmosphereColor:q,atmosphereAltitude:ie,globeCurvatureResolution:J,globeMaterial:E,backgroundColor:"rgba(0, 0, 0, 0)",polygonsTransitionDuration:100,onGlobeReady:()=>{if(u.current){u.current.pointOfView({lat:Z,lng:W});const r=u.current.scene();setTimeout(()=>{(r.children[3]?.children[0]?.children[4]?.children||[]).forEach(b=>{const p=b.children[1];p.renderOrder=2})},300);const s=u.current.camera();r.add(s),k()}}}),re===!1?null:i.jsxRuntimeExports.jsx("div",{className:i.mo("absolute left-4 bottom-4 map-color-legend",U?.colorLegend),children:we?i.jsxRuntimeExports.jsxs(i.jsxRuntimeExports.Fragment,{children:[i.jsxRuntimeExports.jsx("div",{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]",onClick:()=>{ne(!1)},children:i.jsxRuntimeExports.jsx(mt.X,{})}),i.jsxRuntimeExports.jsxs("div",{className:"color-legend-box p-2 bg-[rgba(240,240,240,0.7)] dark:bg-[rgba(30,30,30,0.7)]",style:{width:R?void 0:"340px"},children:[C&&C!==""?i.jsxRuntimeExports.jsx(Ke._,{size:"xs",marginBottom:"xs",className:"p-0 leading-normal overflow-hidden text-primary-gray-700 dark:text-primary-gray-300",style:{display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical"},children:C}):null,R?i.jsxRuntimeExports.jsx("div",{className:"flex flex-col gap-3",children:f.map((r,s)=>i.jsxRuntimeExports.jsxs("div",{className:"flex gap-2 items-center",children:[i.jsxRuntimeExports.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:c[s%c.length]}}),i.jsxRuntimeExports.jsx(Ke._,{size:"sm",marginBottom:"none",leading:"none",children:r})]},s))}):i.jsxRuntimeExports.jsx("svg",{width:"100%",viewBox:"0 0 320 30",direction:"ltr",children:i.jsxRuntimeExports.jsxs("g",{children:[f.map((r,s)=>i.jsxRuntimeExports.jsxs("g",{className:"cursor-pointer",children:[i.jsxRuntimeExports.jsx("rect",{x:s*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[s],stroke:c[s]}}),i.jsxRuntimeExports.jsx("text",{x:(s+1)*320/c.length,y:25,className:"fill-primary-gray-700 dark:fill-primary-gray-300 text-xs",style:{textAnchor:"middle"},children:ht.numberFormattingFunction(r,"NA")})]},s)),i.jsxRuntimeExports.jsx("g",{children:i.jsxRuntimeExports.jsx("rect",{x:f.length*320/c.length+1,y:1,width:320/c.length-2,height:8,style:{fill:c[f.length],stroke:c[f.length]}})})]})})]})]}):i.jsxRuntimeExports.jsx("button",{type:"button",className:"mb-0 border-0 bg-transparent p-0 self-start",onClick:()=>{ne(!0)},children:i.jsxRuntimeExports.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"})})}),S&&P?i.jsxRuntimeExports.jsx(pt.Tooltip,{data:S,body:P,xPos:le.x,yPos:le.y,backgroundStyle:fe?.tooltip,className:U?.tooltip}):null,$&&H!==void 0?i.jsxRuntimeExports.jsx(xt.DetailsModal,{body:$,data:H,setData:N,className:U?.modal}):null]})}function kt(t){const e=i.compilerRuntimeExports.c(97),{data:n,mapData:x,graphTitle:w,colors:R,sources:f,graphDescription:c,height:o,width:l,footNote:v,colorDomain:a,colorLegendTitle:j,scaleType:q,padding:P,mapNoDataColor:fe,backgroundColor:U,mapBorderColor:oe,relativeHeight:C,tooltip:re,graphID:se,mapProperty:$,dataDownload:V,language:ve,minHeight:ye,theme:T,ariaLabel:M,styles:m,classNames:g,autoRotate:W,enableZoom:Z,globeMaterial:ie,centerPoint:J,atmosphereColor:L,showColorScale:z,resetSelectionOnDoubleClick:ae,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,highlightedIds:B,highlightedAltitude:be,dimmedOpacity:u,scale:H,globeOffset:N,polygonAltitude:we,globeCurvatureResolution:ne,atmosphereAltitude:le,fogSettings:ce,lights:S,selectedId:de,collapseColorScaleByDefault:Y}=t,E=x===void 0?"https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json":x,G=v===void 0?"The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the Secretariat of the United Nations or UNDP concerning the legal status of any country, territory, city or area or its authorities, or concerning the delimitation of its frontiers or boundaries.":v,k=q===void 0?"threshold":q,r=fe===void 0?te.Colors.light.graphNoData:fe,s=U===void 0?!1:U,d=oe===void 0?te.Colors.light.grays["gray-500"]:oe,b=$===void 0?"ISO3":$,p=V===void 0?!1:V,D=ve===void 0?"en":ve,O=ye===void 0?0:ye,F=T===void 0?"light":T,ue=W===void 0?!0:W,Le=Z===void 0?!0:Z;let je;e[0]!==J?(je=J===void 0?[0,0]:J,e[0]=J,e[1]=je):je=e[1];const Ce=je,ze=L===void 0?"#999":L,Ae=z===void 0?!0:z,Ge=ae===void 0?!0:ae;let Re;e[2]!==B?(Re=B===void 0?[]:B,e[2]=B,e[3]=Re):Re=e[3];const Fe=Re,Be=be===void 0?.1:be,He=u===void 0?.3:u,Ie=H===void 0?1:H;let Se;e[4]!==N?(Se=N===void 0?[0,0]:N,e[4]=N,e[5]=Se):Se=e[5];const _e=Se,Ue=we===void 0?.01:we,$e=ne===void 0?4:ne,Ve=le===void 0?.15:le;let Ee;e[6]!==S?(Ee=S===void 0?[{type:"ambient",color:4210752,intensity:.4},{type:"directional",color:16777215,intensity:1,position:{x:5,y:10,z:5}}]:S,e[6]=S,e[7]=Ee):Ee=e[7];const We=Ee,[De,ot]=h.useState(void 0),[I,rt]=h.useState(0),[pe,st]=h.useState(0),Ze=h.useRef(null),it=h.useRef(null);let Ne,ke;e[8]===Symbol.for("react.memo_cache_sentinel")?(Ne=()=>{const ge=new ResizeObserver(xe=>{rt(xe[0].target.clientWidth||620),st(xe[0].target.clientHeight||480)});return Ze.current&&ge.observe(Ze.current),()=>ge.disconnect()},ke=[],e[8]=Ne,e[9]=ke):(Ne=e[8],ke=e[9]),h.useEffect(Ne,ke);let Oe;e[10]===Symbol.for("react.memo_cache_sentinel")?(Oe=ge=>{ot(ge)},e[10]=Oe):Oe=e[10];const he=h.useEffectEvent(Oe);let qe;e[11]!==E||e[12]!==he?(qe=()=>{typeof E=="string"?wt.fetchAndParseJSON(E).then(xe=>{if(E==="https://raw.githubusercontent.com/UNDP-Data/dv-country-geojson/refs/heads/main/worldMap-simplified.json"){const at=xe.features.map(zt);he(at)}else he(xe.features)}):he(E.features)},e[11]=E,e[12]=he,e[13]=qe):qe=e[13];let Pe;e[14]!==E?(Pe=[E],e[14]=E,e[15]=Pe):Pe=e[15],h.useEffect(qe,Pe);let Te;e[16]!==a||e[17]!==R?.length||e[18]!==n||e[19]!==k?(Te=a||(k==="categorical"?jt.getUniqValue(n,"x"):Ct.getJenks(n.map(Lt),R?.length||4)),e[16]=a,e[17]=R?.length,e[18]=n,e[19]=k,e[20]=Te):Te=e[20];const me=Te,Je=g?.graphContainer,Xe=m?.graphContainer;let K;e[21]!==g?.description||e[22]!==g?.title||e[23]!==n||e[24]!==p||e[25]!==c||e[26]!==w||e[27]!==m?.description||e[28]!==m?.title||e[29]!==l?(K=w||c||p?i.jsxRuntimeExports.jsx(yt.GraphHeader,{styles:{title:m?.title,description:m?.description},classNames:{title:g?.title,description:g?.description},graphTitle:w,graphDescription:c,width:l,graphDownload:void 0,dataDownload:p?n.map(Mt).filter(Tt).length>0?n.map(Pt).filter(qt):n.filter(Ot):null}):null,e[21]=g?.description,e[22]=g?.title,e[23]=n,e[24]=p,e[25]=c,e[26]=w,e[27]=m?.description,e[28]=m?.title,e[29]=l,e[30]=K):K=e[30];let Q;e[31]!==Ve||e[32]!==ze||e[33]!==ue||e[34]!==Ce||e[35]!==g||e[36]!==Y||e[37]!==j||e[38]!==R||e[39]!==n||e[40]!==y||e[41]!==He||e[42]!==me||e[43]!==Le||e[44]!==ce||e[45]!==$e||e[46]!==ie||e[47]!==_e||e[48]!==o||e[49]!==Be||e[50]!==Fe||e[51]!==We||e[52]!==d||e[53]!==r||e[54]!==b||e[55]!==De||e[56]!==O||e[57]!==A||e[58]!==X||e[59]!==Ue||e[60]!==C||e[61]!==Ge||e[62]!==Ie||e[63]!==k||e[64]!==de||e[65]!==Ae||e[66]!==m||e[67]!==pe||e[68]!==I||e[69]!==F||e[70]!==re||e[71]!==l?(Q=i.jsxRuntimeExports.jsx(Qe.GraphArea,{ref:Ze,children:I&&pe&&De?i.jsxRuntimeExports.jsx(Nt,{data:n,globeOffset:_e,polygonData:De,colorDomain:me,width:I,height:pe,colors:R||(k==="categorical"?te.Colors[F].sequentialColors[`neutralColorsx0${me.length}`]:te.Colors[F].sequentialColors[`neutralColorsx0${me.length+1}`]),mapNoDataColor:r,categorical:k==="categorical",mapBorderColor:d,tooltip:re,mapProperty:b,styles:m,classNames:g,autoRotate:ue===!0?1.5:ue===!1?0:ue,enableZoom:Le,globeMaterial:ie,atmosphereColor:ze,colorLegendTitle:j,showColorScale:Ae,hoverStrokeColor:F==="light"?te.Colors.light.grays["gray-700"]:te.Colors.light.grays["gray-300"],highlightedIds:Fe,resetSelectionOnDoubleClick:Ge,detailsOnClick:y,onSeriesMouseOver:X,onSeriesMouseClick:A,scale:Ie,polygonAltitude:Ue,centerLat:Ce[0],centerLng:Ce[1],atmosphereAltitude:Ve,globeCurvatureResolution:$e,fogSettings:ce,lights:We,highlightedAltitude:Be,selectedId:de,collapseColorScaleByDefault:Y,dimmedOpacity:He}):i.jsxRuntimeExports.jsx("div",{style:{height:`${Math.max(O,o||(C?O?(l||I)*C>O?(l||I)*C:O:(l||I)*C:pe))}px`},className:"flex items-center justify-center",children:i.jsxRuntimeExports.jsx(nt.w,{"aria-label":"Loading graph"})})}),e[31]=Ve,e[32]=ze,e[33]=ue,e[34]=Ce,e[35]=g,e[36]=Y,e[37]=j,e[38]=R,e[39]=n,e[40]=y,e[41]=He,e[42]=me,e[43]=Le,e[44]=ce,e[45]=$e,e[46]=ie,e[47]=_e,e[48]=o,e[49]=Be,e[50]=Fe,e[51]=We,e[52]=d,e[53]=r,e[54]=b,e[55]=De,e[56]=O,e[57]=A,e[58]=X,e[59]=Ue,e[60]=C,e[61]=Ge,e[62]=Ie,e[63]=k,e[64]=de,e[65]=Ae,e[66]=m,e[67]=pe,e[68]=I,e[69]=F,e[70]=re,e[71]=l,e[72]=Q):Q=e[72];let ee;e[73]!==g?.footnote||e[74]!==g?.source||e[75]!==G||e[76]!==f||e[77]!==m?.footnote||e[78]!==m?.source||e[79]!==l?(ee=f||G?i.jsxRuntimeExports.jsx(bt.GraphFooter,{styles:{footnote:m?.footnote,source:m?.source},classNames:{footnote:g?.footnote,source:g?.source},sources:f,footNote:G,width:l}):null,e[73]=g?.footnote,e[74]=g?.source,e[75]=G,e[76]=f,e[77]=m?.footnote,e[78]=m?.source,e[79]=l,e[80]=ee):ee=e[80];let Me;return e[81]!==M||e[82]!==s||e[83]!==se||e[84]!==o||e[85]!==D||e[86]!==O||e[87]!==P||e[88]!==C||e[89]!==Je||e[90]!==Xe||e[91]!==K||e[92]!==Q||e[93]!==ee||e[94]!==F||e[95]!==l?(Me=i.jsxRuntimeExports.jsxs(Qe.GraphContainer,{className:Je,style:Xe,id:se,ref:it,"aria-label":M,backgroundColor:s,theme:F,language:D,minHeight:O,width:l,height:o,relativeHeight:C,padding:P,children:[K,Q,ee]}),e[81]=M,e[82]=s,e[83]=se,e[84]=o,e[85]=D,e[86]=O,e[87]=P,e[88]=C,e[89]=Je,e[90]=Xe,e[91]=K,e[92]=Q,e[93]=ee,e[94]=F,e[95]=l,e[96]=Me):Me=e[96],Me}function Ot(t){return t!==void 0}function qt(t){return t!==void 0}function Pt(t){return t.data}function Tt(t){return t!==void 0}function Mt(t){return t.data}function Lt(t){return t.x}function zt(t){if(t.geometry.type==="Polygon"){const x=[...t.geometry.coordinates[0]].reverse(),w={...t.geometry,coordinates:[x]};return{...t,geometry:w}}const e=[];t.geometry.coordinates.forEach(x=>{const w=[...x[0]].reverse();e.push([w])});const n={...t.geometry,coordinates:e};return{...t,geometry:n}}exports.ThreeDGlobe=kt;
|
|
2
2
|
//# sourceMappingURL=ThreeDGlobe.cjs.map
|
package/dist/ThreeDGlobe.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { j as i, m as lt, c as ct } from "./index-CHPV5EwG-
|
|
1
|
+
import { j as i, m as lt, c as ct } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as I, useRef as Qe, useEffect as G, useCallback as dt, useEffectEvent as pt } from "react";
|
|
3
|
-
import { w as ht } from "./Spinner
|
|
3
|
+
import { w as ht } from "./Spinner-CtJETd5V.js";
|
|
4
4
|
import mt from "react-globe.gl";
|
|
5
5
|
import { i as ut } from "./index-Bwrro8-q.js";
|
|
6
6
|
import * as $ from "three";
|
|
7
|
-
import { _ as et } from "./Typography-
|
|
7
|
+
import { _ as et } from "./Typography-HicNIA61.js";
|
|
8
8
|
import { g as gt } from "./_commonjsHelpers-ByX85dGu.js";
|
|
9
|
-
import { T as ft } from "./Tooltip-
|
|
9
|
+
import { T as ft } from "./Tooltip-CohiIbLZ.js";
|
|
10
10
|
import { n as vt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
11
|
-
import { X as yt } from "./index-
|
|
11
|
+
import { X as yt } from "./index-CZ0elhKR.js";
|
|
12
12
|
import { g as bt } from "./getCentroidCoordinates-s0OOUjLF.js";
|
|
13
|
-
import { D as xt } from "./DetailsModal-
|
|
13
|
+
import { D as xt } from "./DetailsModal-C3qlUyFK.js";
|
|
14
14
|
import { o as wt } from "./ordinal-CHaxGJ_l.js";
|
|
15
15
|
import { t as Ct } from "./threshold-DFfqcDMa.js";
|
|
16
16
|
import { GraphHeader as Dt } from "./GraphHeader.js";
|
|
@@ -19,7 +19,7 @@ import { f as jt } from "./fetchAndParseData-BAXhgTDM.js";
|
|
|
19
19
|
import { Colors as oe } from "./Colors.js";
|
|
20
20
|
import { g as Nt } from "./getUniqValue-DsqSii6M.js";
|
|
21
21
|
import { g as kt } from "./getJenks-DTCcQSDi.js";
|
|
22
|
-
import { a as Rt, G as Ot } from "./GraphContainer-
|
|
22
|
+
import { a as Rt, G as Ot } from "./GraphContainer-DwMxWRCi.js";
|
|
23
23
|
var Ke, tt;
|
|
24
24
|
function Lt() {
|
|
25
25
|
if (tt) return Ke;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as B, m as E, j as o } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as B, m as E, j as o } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useState as F } from "react";
|
|
3
|
-
import { _ as R } from "./Typography-
|
|
3
|
+
import { _ as R } from "./Typography-HicNIA61.js";
|
|
4
4
|
import { n as T } from "./numberFormattingFunction-14YCbkN2.js";
|
|
5
5
|
function I(S) {
|
|
6
6
|
const e = B.c(52), {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as w, m as k, j as b } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as w, m as k, j as b } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { createPortal as v } from "react-dom";
|
|
3
3
|
import { s as j } from "./string2HTML-DUYZT1L9.js";
|
|
4
4
|
function T(h) {
|
|
@@ -42,4 +42,4 @@ function T(h) {
|
|
|
42
42
|
export {
|
|
43
43
|
T
|
|
44
44
|
};
|
|
45
|
-
//# sourceMappingURL=Tooltip-
|
|
45
|
+
//# sourceMappingURL=Tooltip-CohiIbLZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip-
|
|
1
|
+
{"version":3,"file":"Tooltip-CohiIbLZ.js","sources":["../src/Components/Elements/Tooltip.tsx"],"sourcesContent":["import { cn } from '@undp/design-system-react/cn';\r\nimport { createPortal } from 'react-dom';\r\n\r\nimport { string2HTML } from '@/Utils/string2HTML';\r\n\r\ninterface Props {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n body: string | ((_d: any) => React.ReactNode);\r\n xPos: number;\r\n yPos: number;\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n data: any;\r\n backgroundStyle?: React.CSSProperties;\r\n className?: string;\r\n}\r\n\r\nexport function Tooltip(props: Props) {\r\n const {\r\n body,\r\n xPos,\r\n yPos,\r\n data,\r\n backgroundStyle = {\r\n maxWidth: '24rem',\r\n wordWrap: 'break-word',\r\n },\r\n className,\r\n } = props;\r\n if (\r\n (typeof body === 'function' && (body(data) === null || body(data) === undefined)) ||\r\n body === ''\r\n ) {\r\n return null;\r\n }\r\n return createPortal(\r\n <div className='undp-container'>\r\n <div\r\n className={cn(\r\n 'graph-tooltip block p-2 fixed z-[1000] bg-primary-gray-200 dark:bg-primary-gray-600 border border-primary-gray-300 dark:border-primary-gray-500',\r\n className,\r\n )}\r\n style={{\r\n ...backgroundStyle,\r\n top: `${yPos < window.innerHeight / 2 ? yPos - 10 : yPos + 10}px`,\r\n left: `${xPos > window.innerWidth / 2 ? xPos - 10 : xPos + 10}px`,\r\n transform: `translate(${\r\n xPos > window.innerWidth / 2 ? '-100%' : '0%'\r\n },${yPos > window.innerHeight / 2 ? '-100%' : '0%'})`,\r\n }}\r\n >\r\n <div\r\n className='text-sm leading-normal text-primary-black dark:text-primary-gray-100 m-0'\r\n dangerouslySetInnerHTML={\r\n typeof body === 'string' ? { __html: string2HTML(body, data) } : undefined\r\n }\r\n >\r\n {typeof body === 'function' ? body(data) : null}\r\n </div>\r\n </div>\r\n </div>,\r\n document.body,\r\n );\r\n}\r\n"],"names":["Tooltip","props","$","_c","body","xPos","yPos","data","backgroundStyle","t0","className","t1","undefined","maxWidth","wordWrap","t2","cn","t3","window","innerHeight","t4","innerWidth","t5","t6","top","left","transform","t7","__html","string2HTML","t8","t9","t10","createPortal","jsx","document"],"mappings":";;;AAgBO,SAAAA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAAA,EAAA,EAAA,GACL;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,MAAAA;AAAAA,IAAAC,iBAAAC;AAAAA,IAAAC,WAAAA;AAAAA,EAAAA,IAUIT;AAAM,MAAAU;AAAA,EAAAT,SAAAO,KALRE,IAAAF,MAAAG,SAAA;AAAA,IAAAC,UACY;AAAA,IAAOC,UACP;AAAA,EAAA,IAFZL,GAGCP,OAAAO,GAAAP,OAAAS,KAAAA,IAAAT,EAAA,CAAA;AAHD,QAAAM,IAAAG;AAMF,MACG,OAAOP,KAAS,eAAeA,EAAKG,CAAI,MAAM,QAAQH,EAAKG,CAAI,MAAMK,WACtER,MAAS;AAAE,WAEJ;AACR,MAAAW;AAAA,EAAAb,SAAAQ,KAIgBK,IAAAC,EACT,mJACAN,CACF,GAACR,OAAAQ,GAAAR,OAAAa,KAAAA,IAAAb,EAAA,CAAA;AAGM,QAAAe,IAAA,GAAGX,IAAOY,OAAMC,cAAe,IAAIb,IAAO,KAAKA,IAAO,EAAE,MACvDc,IAAA,GAAGf,IAAOa,OAAMG,aAAc,IAAIhB,IAAO,KAAKA,IAAO,EAAE,MAClDiB,IAAA,aACTjB,IAAOa,OAAMG,aAAc,IAA3B,UAAA,IAA6C,IAC3Cf,IAAOY,OAAMC,cAAe,IAA5B,UAAA,IAA8C;AAAG,MAAAI;AAAA,EAAArB,EAAA,CAAA,MAAAM,KAAAN,EAAA,CAAA,MAAAe,KAAAf,EAAA,CAAA,MAAAkB,KAAAlB,SAAAoB,KANhDC,IAAA;AAAA,IAAA,GACFf;AAAAA,IAAegB,KACbP;AAAAA,IAA4DQ,MAC3DL;AAAAA,IAA2DM,WACtDJ;AAAAA,EAAAA,GAGZpB,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wG-6v2a2njQ.cjs"),$=require("react"),Pt=require("./Typography-Cc_iHQB-.cjs"),Jt=require("./Tooltip-BLa2EfMs.cjs"),Qt=require("./numberFormattingFunction-02t-wJta.cjs"),It=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),_t=require("./DetailsModal-DHttOA80.cjs"),Et=require("./proxy-C4-uo6nS.cjs"),te=require("./use-in-view-C3o_ntMv.cjs"),ee=require("./index-CoobIWNj.cjs"),ne=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./GraphFooter.cjs"),oe=require("./GraphHeader.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),ae=require("./EmptyState-N1eHt3vq.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Gt=require("./GraphContainer-B1EDxJ0S.cjs");function le(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function se(){return this.eachAfter(le)}function ue(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function ce(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function de(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function he(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function fe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function pe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ge(e){for(var t=this,n=me(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function me(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ve(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function xe(){return Array.from(this)}function ye(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function we(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*je(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Ft(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Oe)):t===void 0&&(t=be);for(var n=new wt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new wt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Xt)}function Ce(){return Ft(this).eachBefore(Me)}function be(e){return e.children}function Oe(e){return Array.isArray(e)?e[1]:null}function Me(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Xt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wt(e){this.data=e,this.depth=this.height=0,this.parent=null}wt.prototype=Ft.prototype={constructor:wt,count:se,each:ue,eachAfter:de,eachBefore:ce,find:he,sum:fe,sort:pe,path:ge,ancestors:ve,descendants:xe,leaves:ye,links:we,copy:Ce,[Symbol.iterator]:je};function Vt(e){return e==null?null:Yt(e)}function Yt(e){if(typeof e!="function")throw new Error;return e}function xt(){return 0}function yt(e){return function(){return e}}function Ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Re(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*x}var De={depth:-1},Ht={},Nt={};function Se(e){return e.id}function ke(e){return e.parentId}function Be(){var e=Se,t=ke,n;function i(r){var l=Array.from(r),a=e,d=t,g,x,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>qe(n(b,j,r))),O=p.map(Wt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(Wt(b)),l.push(Nt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)x=l[u],h=l[u]=new wt(x),(c=a(x,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Ht:h)),(c=d(x,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Ht)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===Nt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===Nt);--p)h.data=null}if(v.parent=De,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Xt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Vt(r),i):e},i.parentId=function(r){return arguments.length?(t=Vt(r),i):t},i.path=function(r){return arguments.length?(n=Vt(r),i):n},i}function qe(e){e=`${e}`;let t=e.length;return $t(e,t-1)&&!$t(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Wt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!$t(e,t););return e.slice(0,t)}function $t(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function Ie(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*x}var Ve=(1+Math.sqrt(5))/2;function Ne(e,t,n,i,r,l){for(var a=[],d=t.children,g,x,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=x=d[v].value,x<p&&(p=x),x>O&&(O=x),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=x;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Re(g,n,i,r,m?i+=c*f/m:l):Ie(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const $e=(function e(t){function n(i,r,l,a,d){Ne(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Ve);function Te(){var e=$e,t=!1,n=1,i=1,r=[0],l=xt,a=xt,d=xt,g=xt,x=xt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(Ee),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=x(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Yt(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:yt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:yt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:yt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:yt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(x=typeof o=="function"?o:yt(+o),u):x},u}function Ae(e){const t=y.compilerRuntimeExports.c(73),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:x,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:Z,precision:J}=e,ot=$.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=te.useInView(ot,nt),[it,rt]=$.useState(void 0),[T,at]=$.useState(void 0),[_,lt]=$.useState(void 0),[tt,C]=$.useState(void 0);let w;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==x?(w={top:x,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=x,t[7]=w):w=t[7];const S=w,st=l-S.left-S.right,ut=a-S.top-S.bottom;let A,L,P,z,G,H,W,F,X;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==Z||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==S.left||t[22]!==S.top||t[23]!==T||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==k?.graphObjectValues||t[33]!==f||t[34]!==l){const vt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Ye)],ct=Be().id(Xe).parentId(Fe)(vt);ct.sum(We);const N=Te().size([st,ut]).padding(2)(ct);L=Et.motion.svg,G=`${l}px`,H=`${a}px`,W=`0 0 ${l} ${a}`,F="ltr",X=ot,z=`translate(${S.left},${S.top})`,A=ee.AnimatePresence,P=N.children?.map(s=>y.jsxRuntimeExports.jsxs(Et.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:Z:O.length!==0?O.indexOf(s.data.id)!==-1?.85:Z:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&(T===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[y.jsxRuntimeExports.jsx(Et.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(Ge).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?y.jsxRuntimeExports.jsx(Et.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:y.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:y.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:It.getTextColorBasedOnBgColor(n.filter(ze).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?y.jsxRuntimeExports.jsx(Pt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:It.getTextColorBasedOnBgColor(n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?y.jsxRuntimeExports.jsx(Pt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:It.getTextColorBasedOnBgColor(n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:Qt.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=Z,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=S.left,t[22]=S.top,t[23]=T,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=k?.graphObjectValues,t[33]=f,t[34]=l,t[35]=A,t[36]=L,t[37]=P,t[38]=z,t[39]=G,t[40]=H,t[41]=W,t[42]=F,t[43]=X}else A=t[35],L=t[36],P=t[37],z=t[38],G=t[39],H=t[40],W=t[41],F=t[42],X=t[43];let Y;t[44]!==A||t[45]!==P?(Y=y.jsxRuntimeExports.jsx(A,{children:P}),t[44]=A,t[45]=P,t[46]=Y):Y=t[46];let B;t[47]!==z||t[48]!==Y?(B=y.jsxRuntimeExports.jsx("g",{transform:z,children:Y}),t[47]=z,t[48]=Y,t[49]=B):B=t[49];let K;t[50]!==L||t[51]!==B||t[52]!==G||t[53]!==H||t[54]!==W||t[55]!==F||t[56]!==X?(K=y.jsxRuntimeExports.jsx(L,{width:G,height:H,viewBox:W,direction:F,ref:X,children:B}),t[50]=L,t[51]=B,t[52]=G,t[53]=H,t[54]=W,t[55]=F,t[56]=X,t[57]=K):K=t[57];let q;t[58]!==D?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==k?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?y.jsxRuntimeExports.jsx(Jt.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[58]=D?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=k?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==D?.modal||t[66]!==j||t[67]!==T?(I=j&&T!==void 0?y.jsxRuntimeExports.jsx(_t.DetailsModal,{body:j,data:T,setData:at,className:D?.modal}):null,t[65]=D?.modal,t[66]=j,t[67]=T,t[68]=I):I=t[68];let V;return t[69]!==K||t[70]!==q||t[71]!==I?(V=y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[K,q,I]}),t[69]=K,t[70]=q,t[71]=I,t[72]=V):V=t[72],V}function Le(e){return e.color}function Pe(e){return e.color}function ze(e){return e.color}function Ge(e){return e.color}function He(e){return e.color}function We(e){return e.value}function Fe(e){return e.parent}function Xe(e){return e.id}function Ye(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Ke(e){const t=y.compilerRuntimeExports.c(83),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:x,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:Z,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:T,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:w,animate:S,dimmedOpacity:st,precision:ut}=e,A=l===void 0?"":l,L=d===void 0?"":d,P=x===void 0?0:x,z=u===void 0?0:u,G=v===void 0?0:v,H=o===void 0?0:o,W=R===void 0?!1:R,F=b===void 0?!0:b,X=D===void 0?!0:D,Y=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const K=B,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,vt=rt===void 0?!0:rt,ct=T===void 0?0:T,N=at===void 0?"light":at,s=lt===void 0?!0:lt,U=S===void 0?!1:S,Rt=st===void 0?.3:st,Dt=ut===void 0?2:ut,[jt,Kt]=$.useState(0),[Ct,Ut]=$.useState(0),[St,Zt]=$.useState(void 0),kt=$.useRef(null),Tt=$.useRef(null);let bt,Ot;t[2]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const At=new ResizeObserver(Lt=>{Kt(Lt[0].target.clientWidth||620),Ut(Lt[0].target.clientHeight||480)});return kt.current&&At.observe(kt.current),()=>At.disconnect()},Ot=[],t[2]=bt,t[3]=Ot):(bt=t[2],Ot=t[3]),$.useEffect(bt,Ot);const Bt=w?.graphContainer,qt=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?y.jsxRuntimeExports.jsx(oe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Tt:void 0,dataDownload:I?n.map(on).filter(nn).length>0?n.map(en).filter(tn):n.filter(_e):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==w?.colorLegend||t[16]!==f||t[17]!==p||t[18]!==r||t[19]!==n||t[20]!==X||t[21]!==vt||t[22]!==N||t[23]!==c?(ht=X&&n.filter(Qe).length!==0&&n.length>0?y.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[N].categoricalColors.colors,colorDomain:f||zt.uniqBy(n,"color",!0),setSelectedColor:Zt,showNAColor:vt,className:w?.colorLegend}):null,t[15]=w?.colorLegend,t[16]=f,t[17]=p,t[18]=r,t[19]=n,t[20]=X,t[21]=vt,t[22]=N,t[23]=c,t[24]=ht):ht=t[24];let ft;t[25]!==n.length?(ft=n.length===0&&y.jsxRuntimeExports.jsx(ae.EmptyState,{}),t[25]=n.length,t[26]=ft):ft=t[26];let pt;t[27]!==U||t[28]!==H||t[29]!==w||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==tt||t[34]!==Rt||t[35]!==K||t[36]!==V||t[37]!==P||t[38]!==ot||t[39]!==k||t[40]!==Dt||t[41]!==L||t[42]!==s||t[43]!==z||t[44]!==St||t[45]!==F||t[46]!==Y||t[47]!==C||t[48]!==A||t[49]!==Ct||t[50]!==jt||t[51]!==N||t[52]!==M||t[53]!==G?(pt=jt&&Ct&&n.length>0?y.jsxRuntimeExports.jsx(Ae,{data:n.filter(Je),colors:n.filter(Ze).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[N].categoricalColors.colors,colorDomain:n.filter(Ue).length===0?[]:f||zt.uniqBy(n,"color",!0),width:jt,height:Ct,leftMargin:P,rightMargin:z,topMargin:G,bottomMargin:H,showLabels:F,showValues:Y,suffix:A,prefix:L,selectedColor:St,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:ot,highlightedDataPoints:K,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:w,language:V,animate:U===!0?{duration:.5,once:!0,amount:.5}:U||{duration:0,once:!0,amount:0},dimmedOpacity:Rt,precision:Dt}):null,t[27]=U,t[28]=H,t[29]=w,t[30]=f,t[31]=r,t[32]=n,t[33]=tt,t[34]=Rt,t[35]=K,t[36]=V,t[37]=P,t[38]=ot,t[39]=k,t[40]=Dt,t[41]=L,t[42]=s,t[43]=z,t[44]=St,t[45]=F,t[46]=Y,t[47]=C,t[48]=A,t[49]=Ct,t[50]=jt,t[51]=N,t[52]=M,t[53]=G,t[54]=pt):pt=t[54];let gt;t[55]!==ft||t[56]!==pt?(gt=y.jsxRuntimeExports.jsxs(Gt.GraphArea,{ref:kt,children:[ft,pt]}),t[55]=ft,t[56]=pt,t[57]=gt):gt=t[57];let mt;t[58]!==w?.footnote||t[59]!==w?.source||t[60]!==m||t[61]!==a||t[62]!==C?.footnote||t[63]!==C?.source||t[64]!==c?(mt=a||m?y.jsxRuntimeExports.jsx(ie.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[58]=w?.footnote,t[59]=w?.source,t[60]=m,t[61]=a,t[62]=C?.footnote,t[63]=C?.source,t[64]=c,t[65]=mt):mt=t[65];let Mt;return t[66]!==_||t[67]!==W||t[68]!==Z||t[69]!==h||t[70]!==V||t[71]!==ct||t[72]!==O||t[73]!==j||t[74]!==Bt||t[75]!==qt||t[76]!==dt||t[77]!==ht||t[78]!==gt||t[79]!==mt||t[80]!==N||t[81]!==c?(Mt=y.jsxRuntimeExports.jsxs(Gt.GraphContainer,{className:Bt,style:qt,id:Z,ref:Tt,"aria-label":_,backgroundColor:W,theme:N,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,gt,mt]}),t[66]=_,t[67]=W,t[68]=Z,t[69]=h,t[70]=V,t[71]=ct,t[72]=O,t[73]=j,t[74]=Bt,t[75]=qt,t[76]=dt,t[77]=ht,t[78]=gt,t[79]=mt,t[80]=N,t[81]=c,t[82]=Mt):Mt=t[82],Mt}function Ue(e){return e.color}function Ze(e){return e.color}function Je(e){return!ne.checkIfNullOrUndefined(e.size)}function Qe(e){return e.color}function _e(e){return e!==void 0}function tn(e){return e!==void 0}function en(e){return e.data}function nn(e){return e!==void 0}function on(e){return e.data}exports.TreeMapGraph=Ke;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index-CHPV5EwG-6v2a2njQ.cjs"),$=require("react"),Pt=require("./Typography-Cc_iHQB-.cjs"),Jt=require("./Tooltip-BLa2EfMs.cjs"),Qt=require("./numberFormattingFunction-02t-wJta.cjs"),It=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),et=require("./Colors.cjs"),_t=require("./DetailsModal-DIRTulvr.cjs"),Et=require("./proxy-C4-uo6nS.cjs"),te=require("./use-in-view-C3o_ntMv.cjs"),ee=require("./index-CoobIWNj.cjs"),ne=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),ie=require("./GraphFooter.cjs"),oe=require("./GraphHeader.cjs"),re=require("./ColorLegendWithMouseOver.cjs"),ae=require("./EmptyState-N1eHt3vq.cjs"),zt=require("./uniqBy-O05lp2S5.cjs"),Gt=require("./GraphContainer-B1EDxJ0S.cjs");function le(e){var t=0,n=e.children,i=n&&n.length;if(!i)t=1;else for(;--i>=0;)t+=n[i].value;e.value=t}function se(){return this.eachAfter(le)}function ue(e,t){let n=-1;for(const i of this)e.call(t,i,++n,this);return this}function ce(e,t){for(var n=this,i=[n],r,l,a=-1;n=i.pop();)if(e.call(t,n,++a,this),r=n.children)for(l=r.length-1;l>=0;--l)i.push(r[l]);return this}function de(e,t){for(var n=this,i=[n],r=[],l,a,d,g=-1;n=i.pop();)if(r.push(n),l=n.children)for(a=0,d=l.length;a<d;++a)i.push(l[a]);for(;n=r.pop();)e.call(t,n,++g,this);return this}function he(e,t){let n=-1;for(const i of this)if(e.call(t,i,++n,this))return i}function fe(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,i=t.children,r=i&&i.length;--r>=0;)n+=i[r].value;t.value=n})}function pe(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function ge(e){for(var t=this,n=me(t,e),i=[t];t!==n;)t=t.parent,i.push(t);for(var r=i.length;e!==n;)i.splice(r,0,e),e=e.parent;return i}function me(e,t){if(e===t)return e;var n=e.ancestors(),i=t.ancestors(),r=null;for(e=n.pop(),t=i.pop();e===t;)r=e,e=n.pop(),t=i.pop();return r}function ve(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function xe(){return Array.from(this)}function ye(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function we(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*je(){var e=this,t,n=[e],i,r,l;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,i=e.children)for(r=0,l=i.length;r<l;++r)n.push(i[r]);while(n.length)}function Ft(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=Oe)):t===void 0&&(t=be);for(var n=new wt(e),i,r=[n],l,a,d,g;i=r.pop();)if((a=t(i.data))&&(g=(a=Array.from(a)).length))for(i.children=a,d=g-1;d>=0;--d)r.push(l=a[d]=new wt(a[d])),l.parent=i,l.depth=i.depth+1;return n.eachBefore(Xt)}function Ce(){return Ft(this).eachBefore(Me)}function be(e){return e.children}function Oe(e){return Array.isArray(e)?e[1]:null}function Me(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function Xt(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function wt(e){this.data=e,this.depth=this.height=0,this.parent=null}wt.prototype=Ft.prototype={constructor:wt,count:se,each:ue,eachAfter:de,eachBefore:ce,find:he,sum:fe,sort:pe,path:ge,ancestors:ve,descendants:xe,leaves:ye,links:we,copy:Ce,[Symbol.iterator]:je};function Vt(e){return e==null?null:Yt(e)}function Yt(e){if(typeof e!="function")throw new Error;return e}function xt(){return 0}function yt(e){return function(){return e}}function Ee(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function Re(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(i-t)/e.value;++d<g;)a=l[d],a.y0=n,a.y1=r,a.x0=t,a.x1=t+=a.value*x}var De={depth:-1},Ht={},Nt={};function Se(e){return e.id}function ke(e){return e.parentId}function Be(){var e=Se,t=ke,n;function i(r){var l=Array.from(r),a=e,d=t,g,x,u,v,o,h,c,m,f=new Map;if(n!=null){const p=l.map((b,j)=>qe(n(b,j,r))),O=p.map(Wt),R=new Set(p).add("");for(const b of O)R.has(b)||(R.add(b),p.push(b),O.push(Wt(b)),l.push(Nt));a=(b,j)=>p[j],d=(b,j)=>O[j]}for(u=0,g=l.length;u<g;++u)x=l[u],h=l[u]=new wt(x),(c=a(x,u,r))!=null&&(c+="")&&(m=h.id=c,f.set(m,f.has(m)?Ht:h)),(c=d(x,u,r))!=null&&(c+="")&&(h.parent=c);for(u=0;u<g;++u)if(h=l[u],c=h.parent){if(o=f.get(c),!o)throw new Error("missing: "+c);if(o===Ht)throw new Error("ambiguous: "+c);o.children?o.children.push(h):o.children=[h],h.parent=o}else{if(v)throw new Error("multiple roots");v=h}if(!v)throw new Error("no root");if(n!=null){for(;v.data===Nt&&v.children.length===1;)v=v.children[0],--g;for(let p=l.length-1;p>=0&&(h=l[p],h.data===Nt);--p)h.data=null}if(v.parent=De,v.eachBefore(function(p){p.depth=p.parent.depth+1,--g}).eachBefore(Xt),v.parent=null,g>0)throw new Error("cycle");return v}return i.id=function(r){return arguments.length?(e=Vt(r),i):e},i.parentId=function(r){return arguments.length?(t=Vt(r),i):t},i.path=function(r){return arguments.length?(n=Vt(r),i):n},i}function qe(e){e=`${e}`;let t=e.length;return $t(e,t-1)&&!$t(e,t-2)&&(e=e.slice(0,-1)),e[0]==="/"?e:`/${e}`}function Wt(e){let t=e.length;if(t<2)return"";for(;--t>1&&!$t(e,t););return e.slice(0,t)}function $t(e,t){if(e[t]==="/"){let n=0;for(;t>0&&e[--t]==="\\";)++n;if((n&1)===0)return!0}return!1}function Ie(e,t,n,i,r){for(var l=e.children,a,d=-1,g=l.length,x=e.value&&(r-n)/e.value;++d<g;)a=l[d],a.x0=t,a.x1=i,a.y0=n,a.y1=n+=a.value*x}var Ve=(1+Math.sqrt(5))/2;function Ne(e,t,n,i,r,l){for(var a=[],d=t.children,g,x,u=0,v=0,o=d.length,h,c,m=t.value,f,p,O,R,b,j,M;u<o;){h=r-n,c=l-i;do f=d[v++].value;while(!f&&v<o);for(p=O=f,j=Math.max(c/h,h/c)/(m*e),M=f*f*j,b=Math.max(O/M,M/p);v<o;++v){if(f+=x=d[v].value,x<p&&(p=x),x>O&&(O=x),M=f*f*j,R=Math.max(O/M,M/p),R>b){f-=x;break}b=R}a.push(g={value:f,dice:h<c,children:d.slice(u,v)}),g.dice?Re(g,n,i,r,m?i+=c*f/m:l):Ie(g,n,i,m?n+=h*f/m:r,l),m-=f,u=v}return a}const $e=(function e(t){function n(i,r,l,a,d){Ne(t,i,r,l,a,d)}return n.ratio=function(i){return e((i=+i)>1?i:1)},n})(Ve);function Te(){var e=$e,t=!1,n=1,i=1,r=[0],l=xt,a=xt,d=xt,g=xt,x=xt;function u(o){return o.x0=o.y0=0,o.x1=n,o.y1=i,o.eachBefore(v),r=[0],t&&o.eachBefore(Ee),o}function v(o){var h=r[o.depth],c=o.x0+h,m=o.y0+h,f=o.x1-h,p=o.y1-h;f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),o.x0=c,o.y0=m,o.x1=f,o.y1=p,o.children&&(h=r[o.depth+1]=l(o)/2,c+=x(o)-h,m+=a(o)-h,f-=d(o)-h,p-=g(o)-h,f<c&&(c=f=(c+f)/2),p<m&&(m=p=(m+p)/2),e(o,c,m,f,p))}return u.round=function(o){return arguments.length?(t=!!o,u):t},u.size=function(o){return arguments.length?(n=+o[0],i=+o[1],u):[n,i]},u.tile=function(o){return arguments.length?(e=Yt(o),u):e},u.padding=function(o){return arguments.length?u.paddingInner(o).paddingOuter(o):u.paddingInner()},u.paddingInner=function(o){return arguments.length?(l=typeof o=="function"?o:yt(+o),u):l},u.paddingOuter=function(o){return arguments.length?u.paddingTop(o).paddingRight(o).paddingBottom(o).paddingLeft(o):u.paddingTop()},u.paddingTop=function(o){return arguments.length?(a=typeof o=="function"?o:yt(+o),u):a},u.paddingRight=function(o){return arguments.length?(d=typeof o=="function"?o:yt(+o),u):d},u.paddingBottom=function(o){return arguments.length?(g=typeof o=="function"?o:yt(+o),u):g},u.paddingLeft=function(o){return arguments.length?(x=typeof o=="function"?o:yt(+o),u):x},u}function Ae(e){const t=y.compilerRuntimeExports.c(73),{data:n,colors:i,leftMargin:r,width:l,height:a,colorDomain:d,rightMargin:g,topMargin:x,bottomMargin:u,showLabels:v,tooltip:o,onSeriesMouseOver:h,selectedColor:c,showValues:m,suffix:f,prefix:p,highlightedDataPoints:O,onSeriesMouseClick:R,resetSelectionOnDoubleClick:b,detailsOnClick:j,language:M,styles:k,classNames:D,animate:E,dimmedOpacity:Z,precision:J}=e,ot=$.useRef(null);let nt;t[0]!==E.amount||t[1]!==E.once?(nt={once:E.once,amount:E.amount},t[0]=E.amount,t[1]=E.once,t[2]=nt):nt=t[2];const Q=te.useInView(ot,nt),[it,rt]=$.useState(void 0),[T,at]=$.useState(void 0),[_,lt]=$.useState(void 0),[tt,C]=$.useState(void 0);let w;t[3]!==u||t[4]!==r||t[5]!==g||t[6]!==x?(w={top:x,bottom:u,left:r,right:g},t[3]=u,t[4]=r,t[5]=g,t[6]=x,t[7]=w):w=t[7];const S=w,st=l-S.left-S.right,ut=a-S.top-S.bottom;let A,L,P,z,G,H,W,F,X;if(t[8]!==E.duration||t[9]!==D?.graphObjectValues||t[10]!==d||t[11]!==i||t[12]!==n||t[13]!==j||t[14]!==Z||t[15]!==ut||t[16]!==st||t[17]!==a||t[18]!==O||t[19]!==Q||t[20]!==M||t[21]!==S.left||t[22]!==S.top||t[23]!==T||t[24]!==R||t[25]!==h||t[26]!==J||t[27]!==p||t[28]!==b||t[29]!==c||t[30]!==v||t[31]!==m||t[32]!==k?.graphObjectValues||t[33]!==f||t[34]!==l){const vt=[{id:"root",parent:void 0,value:void 0,data:void 0},...n.map(Ye)],ct=Be().id(Xe).parentId(Fe)(vt);ct.sum(We);const N=Te().size([st,ut]).padding(2)(ct);L=Et.motion.svg,G=`${l}px`,H=`${a}px`,W=`0 0 ${l} ${a}`,F="ltr",X=ot,z=`translate(${S.left},${S.top})`,A=ee.AnimatePresence,P=N.children?.map(s=>y.jsxRuntimeExports.jsxs(Et.motion.g,{className:"undp-viz-g-with-hover",variants:{initial:{opacity:0,x:s.x0,y:s.y0},whileInView:{opacity:c?s.data.data.color&&i[d.indexOf(s.data.data.color)]===c?1:Z:O.length!==0?O.indexOf(s.data.id)!==-1?.85:Z:.85,x:s.x0,y:s.y0,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},onMouseEnter:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX),h?.(s.data.data)},onClick:()=>{(R||j)&&(T===s.data.id&&b?(at(void 0),R?.(void 0)):(at(s.data.id),R?.(s.data.data)))},onMouseMove:U=>{rt(s.data.data),C(U.clientY),lt(U.clientX)},onMouseLeave:()=>{rt(void 0),lt(void 0),C(void 0),h?.(void 0)},children:[y.jsxRuntimeExports.jsx(Et.motion.rect,{x:0,y:0,exit:{width:0,height:0,opacity:0,transition:{duration:E.duration}},variants:{initial:{width:0,height:0,fill:n.filter(He).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray},whileInView:{width:s.x1-s.x0,height:s.y1-s.y0,fill:n.filter(Ge).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial"}),s.x1-s.x0>50&&s.y1-s.y0>25&&(v||m)?y.jsxRuntimeExports.jsx(Et.motion.g,{variants:{initial:{opacity:0},whileInView:{opacity:1,transition:{duration:E.duration}}},initial:"initial",animate:Q?"whileInView":"initial",exit:{opacity:0,transition:{duration:E.duration}},children:y.jsxRuntimeExports.jsx("foreignObject",{y:0,x:0,width:s.x1-s.x0,height:s.y1-s.y0,children:y.jsxRuntimeExports.jsxs("div",{className:"flex flex-col gap-0.5 p-2 w-full",style:{color:It.getTextColorBasedOnBgColor(n.filter(ze).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray)},children:[v?y.jsxRuntimeExports.jsx(Pt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full treemap-label",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{WebkitLineClamp:s.y1-s.y0>50?s.y1-s.y0>100?s.y1-s.y0>150?void 0:3:2:1,display:"-webkit-box",WebkitBoxOrient:"vertical",overflow:"hidden",color:It.getTextColorBasedOnBgColor(n.filter(Pe).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:s.data.id}):null,m?y.jsxRuntimeExports.jsx(Pt._,{marginBottom:"none",size:"sm",leading:"none",className:y.mo("w-full font-bold treemap-value",M==="ar"||M==="he"?"text-right":"text-left",D?.graphObjectValues),style:{color:It.getTextColorBasedOnBgColor(n.filter(Le).length===0?i[0]:s.data.data.color?i[d.indexOf(s.data.data.color)]:et.Colors.gray),...k?.graphObjectValues||{}},children:Qt.numberFormattingFunction(s.data.value,"NA",J,p,f)}):null]})})}):null]},s.data.id)),t[8]=E.duration,t[9]=D?.graphObjectValues,t[10]=d,t[11]=i,t[12]=n,t[13]=j,t[14]=Z,t[15]=ut,t[16]=st,t[17]=a,t[18]=O,t[19]=Q,t[20]=M,t[21]=S.left,t[22]=S.top,t[23]=T,t[24]=R,t[25]=h,t[26]=J,t[27]=p,t[28]=b,t[29]=c,t[30]=v,t[31]=m,t[32]=k?.graphObjectValues,t[33]=f,t[34]=l,t[35]=A,t[36]=L,t[37]=P,t[38]=z,t[39]=G,t[40]=H,t[41]=W,t[42]=F,t[43]=X}else A=t[35],L=t[36],P=t[37],z=t[38],G=t[39],H=t[40],W=t[41],F=t[42],X=t[43];let Y;t[44]!==A||t[45]!==P?(Y=y.jsxRuntimeExports.jsx(A,{children:P}),t[44]=A,t[45]=P,t[46]=Y):Y=t[46];let B;t[47]!==z||t[48]!==Y?(B=y.jsxRuntimeExports.jsx("g",{transform:z,children:Y}),t[47]=z,t[48]=Y,t[49]=B):B=t[49];let K;t[50]!==L||t[51]!==B||t[52]!==G||t[53]!==H||t[54]!==W||t[55]!==F||t[56]!==X?(K=y.jsxRuntimeExports.jsx(L,{width:G,height:H,viewBox:W,direction:F,ref:X,children:B}),t[50]=L,t[51]=B,t[52]=G,t[53]=H,t[54]=W,t[55]=F,t[56]=X,t[57]=K):K=t[57];let q;t[58]!==D?.tooltip||t[59]!==_||t[60]!==tt||t[61]!==it||t[62]!==k?.tooltip||t[63]!==o?(q=it&&o&&_&&tt?y.jsxRuntimeExports.jsx(Jt.Tooltip,{data:it,body:o,xPos:_,yPos:tt,backgroundStyle:k?.tooltip,className:D?.tooltip}):null,t[58]=D?.tooltip,t[59]=_,t[60]=tt,t[61]=it,t[62]=k?.tooltip,t[63]=o,t[64]=q):q=t[64];let I;t[65]!==D?.modal||t[66]!==j||t[67]!==T?(I=j&&T!==void 0?y.jsxRuntimeExports.jsx(_t.DetailsModal,{body:j,data:T,setData:at,className:D?.modal}):null,t[65]=D?.modal,t[66]=j,t[67]=T,t[68]=I):I=t[68];let V;return t[69]!==K||t[70]!==q||t[71]!==I?(V=y.jsxRuntimeExports.jsxs(y.jsxRuntimeExports.Fragment,{children:[K,q,I]}),t[69]=K,t[70]=q,t[71]=I,t[72]=V):V=t[72],V}function Le(e){return e.color}function Pe(e){return e.color}function ze(e){return e.color}function Ge(e){return e.color}function He(e){return e.color}function We(e){return e.value}function Fe(e){return e.parent}function Xe(e){return e.id}function Ye(e){return{id:e.label,value:e.size,parent:"root",data:e}}function Ke(e){const t=y.compilerRuntimeExports.c(83),{data:n,graphTitle:i,colors:r,suffix:l,sources:a,prefix:d,graphDescription:g,leftMargin:x,rightMargin:u,topMargin:v,bottomMargin:o,height:h,width:c,footNote:m,colorDomain:f,colorLegendTitle:p,padding:O,backgroundColor:R,showLabels:b,relativeHeight:j,tooltip:M,onSeriesMouseOver:k,showColorScale:D,showValues:E,graphID:Z,highlightedDataPoints:J,onSeriesMouseClick:ot,graphDownload:nt,dataDownload:Q,language:it,showNAColor:rt,minHeight:T,theme:at,ariaLabel:_,resetSelectionOnDoubleClick:lt,detailsOnClick:tt,styles:C,classNames:w,animate:S,dimmedOpacity:st,precision:ut}=e,A=l===void 0?"":l,L=d===void 0?"":d,P=x===void 0?0:x,z=u===void 0?0:u,G=v===void 0?0:v,H=o===void 0?0:o,W=R===void 0?!1:R,F=b===void 0?!0:b,X=D===void 0?!0:D,Y=E===void 0?!0:E;let B;t[0]!==J?(B=J===void 0?[]:J,t[0]=J,t[1]=B):B=t[1];const K=B,q=nt===void 0?!1:nt,I=Q===void 0?!1:Q,V=it===void 0?"en":it,vt=rt===void 0?!0:rt,ct=T===void 0?0:T,N=at===void 0?"light":at,s=lt===void 0?!0:lt,U=S===void 0?!1:S,Rt=st===void 0?.3:st,Dt=ut===void 0?2:ut,[jt,Kt]=$.useState(0),[Ct,Ut]=$.useState(0),[St,Zt]=$.useState(void 0),kt=$.useRef(null),Tt=$.useRef(null);let bt,Ot;t[2]===Symbol.for("react.memo_cache_sentinel")?(bt=()=>{const At=new ResizeObserver(Lt=>{Kt(Lt[0].target.clientWidth||620),Ut(Lt[0].target.clientHeight||480)});return kt.current&&At.observe(kt.current),()=>At.disconnect()},Ot=[],t[2]=bt,t[3]=Ot):(bt=t[2],Ot=t[3]),$.useEffect(bt,Ot);const Bt=w?.graphContainer,qt=C?.graphContainer;let dt;t[4]!==w?.description||t[5]!==w?.title||t[6]!==n||t[7]!==I||t[8]!==g||t[9]!==q||t[10]!==i||t[11]!==C?.description||t[12]!==C?.title||t[13]!==c?(dt=i||g||q||I?y.jsxRuntimeExports.jsx(oe.GraphHeader,{styles:{title:C?.title,description:C?.description},classNames:{title:w?.title,description:w?.description},graphTitle:i,graphDescription:g,width:c,graphDownload:q?Tt:void 0,dataDownload:I?n.map(on).filter(nn).length>0?n.map(en).filter(tn):n.filter(_e):null}):null,t[4]=w?.description,t[5]=w?.title,t[6]=n,t[7]=I,t[8]=g,t[9]=q,t[10]=i,t[11]=C?.description,t[12]=C?.title,t[13]=c,t[14]=dt):dt=t[14];let ht;t[15]!==w?.colorLegend||t[16]!==f||t[17]!==p||t[18]!==r||t[19]!==n||t[20]!==X||t[21]!==vt||t[22]!==N||t[23]!==c?(ht=X&&n.filter(Qe).length!==0&&n.length>0?y.jsxRuntimeExports.jsx(re.ColorLegendWithMouseOver,{width:c,colorLegendTitle:p,colors:r||et.Colors[N].categoricalColors.colors,colorDomain:f||zt.uniqBy(n,"color",!0),setSelectedColor:Zt,showNAColor:vt,className:w?.colorLegend}):null,t[15]=w?.colorLegend,t[16]=f,t[17]=p,t[18]=r,t[19]=n,t[20]=X,t[21]=vt,t[22]=N,t[23]=c,t[24]=ht):ht=t[24];let ft;t[25]!==n.length?(ft=n.length===0&&y.jsxRuntimeExports.jsx(ae.EmptyState,{}),t[25]=n.length,t[26]=ft):ft=t[26];let pt;t[27]!==U||t[28]!==H||t[29]!==w||t[30]!==f||t[31]!==r||t[32]!==n||t[33]!==tt||t[34]!==Rt||t[35]!==K||t[36]!==V||t[37]!==P||t[38]!==ot||t[39]!==k||t[40]!==Dt||t[41]!==L||t[42]!==s||t[43]!==z||t[44]!==St||t[45]!==F||t[46]!==Y||t[47]!==C||t[48]!==A||t[49]!==Ct||t[50]!==jt||t[51]!==N||t[52]!==M||t[53]!==G?(pt=jt&&Ct&&n.length>0?y.jsxRuntimeExports.jsx(Ae,{data:n.filter(Je),colors:n.filter(Ze).length===0?r?[r]:[et.Colors.primaryColors["blue-600"]]:r||et.Colors[N].categoricalColors.colors,colorDomain:n.filter(Ue).length===0?[]:f||zt.uniqBy(n,"color",!0),width:jt,height:Ct,leftMargin:P,rightMargin:z,topMargin:G,bottomMargin:H,showLabels:F,showValues:Y,suffix:A,prefix:L,selectedColor:St,tooltip:M,onSeriesMouseOver:k,onSeriesMouseClick:ot,highlightedDataPoints:K,resetSelectionOnDoubleClick:s,detailsOnClick:tt,styles:C,classNames:w,language:V,animate:U===!0?{duration:.5,once:!0,amount:.5}:U||{duration:0,once:!0,amount:0},dimmedOpacity:Rt,precision:Dt}):null,t[27]=U,t[28]=H,t[29]=w,t[30]=f,t[31]=r,t[32]=n,t[33]=tt,t[34]=Rt,t[35]=K,t[36]=V,t[37]=P,t[38]=ot,t[39]=k,t[40]=Dt,t[41]=L,t[42]=s,t[43]=z,t[44]=St,t[45]=F,t[46]=Y,t[47]=C,t[48]=A,t[49]=Ct,t[50]=jt,t[51]=N,t[52]=M,t[53]=G,t[54]=pt):pt=t[54];let gt;t[55]!==ft||t[56]!==pt?(gt=y.jsxRuntimeExports.jsxs(Gt.GraphArea,{ref:kt,children:[ft,pt]}),t[55]=ft,t[56]=pt,t[57]=gt):gt=t[57];let mt;t[58]!==w?.footnote||t[59]!==w?.source||t[60]!==m||t[61]!==a||t[62]!==C?.footnote||t[63]!==C?.source||t[64]!==c?(mt=a||m?y.jsxRuntimeExports.jsx(ie.GraphFooter,{styles:{footnote:C?.footnote,source:C?.source},classNames:{footnote:w?.footnote,source:w?.source},sources:a,footNote:m,width:c}):null,t[58]=w?.footnote,t[59]=w?.source,t[60]=m,t[61]=a,t[62]=C?.footnote,t[63]=C?.source,t[64]=c,t[65]=mt):mt=t[65];let Mt;return t[66]!==_||t[67]!==W||t[68]!==Z||t[69]!==h||t[70]!==V||t[71]!==ct||t[72]!==O||t[73]!==j||t[74]!==Bt||t[75]!==qt||t[76]!==dt||t[77]!==ht||t[78]!==gt||t[79]!==mt||t[80]!==N||t[81]!==c?(Mt=y.jsxRuntimeExports.jsxs(Gt.GraphContainer,{className:Bt,style:qt,id:Z,ref:Tt,"aria-label":_,backgroundColor:W,theme:N,language:V,minHeight:ct,width:c,height:h,relativeHeight:j,padding:O,children:[dt,ht,gt,mt]}),t[66]=_,t[67]=W,t[68]=Z,t[69]=h,t[70]=V,t[71]=ct,t[72]=O,t[73]=j,t[74]=Bt,t[75]=qt,t[76]=dt,t[77]=ht,t[78]=gt,t[79]=mt,t[80]=N,t[81]=c,t[82]=Mt):Mt=t[82],Mt}function Ue(e){return e.color}function Ze(e){return e.color}function Je(e){return!ne.checkIfNullOrUndefined(e.size)}function Qe(e){return e.color}function _e(e){return e!==void 0}function tn(e){return e!==void 0}function en(e){return e.data}function nn(e){return e!==void 0}function on(e){return e.data}exports.TreeMapGraph=Ke;
|
|
2
2
|
//# sourceMappingURL=TreeMapGraph.cjs.map
|
package/dist/TreeMapGraph.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { c as Xt, j as b, m as Ht } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as Xt, j as b, m as Ht } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as Lt, useState as it, useEffect as _t } from "react";
|
|
3
|
-
import { _ as Gt } from "./Typography-
|
|
4
|
-
import { T as te } from "./Tooltip-
|
|
3
|
+
import { _ as Gt } from "./Typography-HicNIA61.js";
|
|
4
|
+
import { T as te } from "./Tooltip-CohiIbLZ.js";
|
|
5
5
|
import { n as ee } from "./numberFormattingFunction-14YCbkN2.js";
|
|
6
6
|
import { g as $t } from "./getTextColorBasedOnBgColor-CDY808zi.js";
|
|
7
7
|
import { Colors as tt } from "./Colors.js";
|
|
8
|
-
import { D as ne } from "./DetailsModal-
|
|
9
|
-
import { m as Dt } from "./proxy
|
|
10
|
-
import { u as ie } from "./use-in-view-
|
|
11
|
-
import { A as oe } from "./index-
|
|
8
|
+
import { D as ne } from "./DetailsModal-C3qlUyFK.js";
|
|
9
|
+
import { m as Dt } from "./proxy--_f6k3NR.js";
|
|
10
|
+
import { u as ie } from "./use-in-view-DqvKAveg.js";
|
|
11
|
+
import { A as oe } from "./index-Co3YGYe1.js";
|
|
12
12
|
import { c as re } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
13
13
|
import { GraphFooter as ae } from "./GraphFooter.js";
|
|
14
14
|
import { GraphHeader as le } from "./GraphHeader.js";
|
|
15
15
|
import { ColorLegendWithMouseOver as se } from "./ColorLegendWithMouseOver.js";
|
|
16
|
-
import { E as ce } from "./EmptyState-
|
|
16
|
+
import { E as ce } from "./EmptyState-D807L58h.js";
|
|
17
17
|
import { u as Wt } from "./uniqBy-BHy4I8PK.js";
|
|
18
|
-
import { a as ue, G as de } from "./GraphContainer-
|
|
18
|
+
import { a as ue, G as de } from "./GraphContainer-DwMxWRCi.js";
|
|
19
19
|
function fe(e) {
|
|
20
20
|
var t = 0, n = e.children, i = n && n.length;
|
|
21
21
|
if (!i) t = 1;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as d, m as x, a as
|
|
1
|
+
import { _ as d, m as x, a as c, b as f } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
const u = f("mt-0 ml-0 mr-0", {
|
|
3
3
|
variants: {
|
|
4
4
|
size: {
|
|
@@ -260,4 +260,4 @@ export {
|
|
|
260
260
|
_ as R,
|
|
261
261
|
N as _
|
|
262
262
|
};
|
|
263
|
-
//# sourceMappingURL=Typography-
|
|
263
|
+
//# sourceMappingURL=Typography-HicNIA61.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography-CdMGooqp.js","sources":["../node_modules/@undp/design-system-react/dist/Typography.js"],"sourcesContent":["import { j as b } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as d } from \"./compiler-runtime-Cu50tn6L.js\";\nimport { c as f } from \"./index-CHPV5EwG.js\";\nimport { c as g } from \"./utils-D_Pof5Gy.js\";\nconst p = f(\"mt-0 ml-0 mr-0\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-sm\",\n base: \"text-base\",\n \"base-responsive\": \"text-base md:text-xl\",\n lg: \"text-lg\",\n xl: \"text-xl\"\n },\n leading: {\n none: \"leading-none\",\n xs: \"leading-[1.25]\",\n sm: \"leading-[1.375]\",\n base: \"leading-[1.4]\",\n lg: \"leading-[1.625]\",\n xl: \"leading-[2]\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n decoration: {\n normal: \"normal\",\n italic: \"italic\",\n underline: \"underline\",\n \"line-through\": \"line-through\"\n },\n marginBottom: {\n none: \"mb-0\",\n \"3xs\": \"mb-1\",\n \"2xs\": \"mb-2\",\n xs: \"mb-3\",\n sm: \"mb-4\",\n base: \"mb-5\",\n lg: \"mb-6\",\n xl: \"mb-7\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n size: \"base-responsive\",\n leading: \"base\",\n weight: \"normal\",\n decoration: \"normal\",\n marginBottom: \"base\",\n alignment: \"left\"\n }\n});\nfunction _(s) {\n const e = d.c(22);\n let t, l, n, m, i, o, a, r, x;\n e[0] !== s ? ({\n children: l,\n className: n,\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t,\n ...a\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o, e[7] = a, e[8] = r, e[9] = x) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6], a = e[7], r = e[8], x = e[9]);\n let c;\n e[10] !== t || e[11] !== n || e[12] !== m || e[13] !== i || e[14] !== o || e[15] !== r || e[16] !== x ? (c = g(p({\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t\n }), n), e[10] = t, e[11] = n, e[12] = m, e[13] = i, e[14] = o, e[15] = r, e[16] = x, e[17] = c) : c = e[17];\n let h;\n return e[18] !== l || e[19] !== a || e[20] !== c ? (h = /* @__PURE__ */ b.jsx(\"p\", { ...a, className: c, children: l }), e[18] = l, e[19] = a, e[20] = c, e[21] = h) : h = e[21], h;\n}\nconst u = f(\"mt-0 ml-0 mr-0 p-0 uppercase font-heading\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n size: {\n base: \"text-[2.938rem] md:text-[5.125rem] lg:text-[6.25rem] tracking-[0.06rem] leading-[1.08]\",\n sm: \"text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1]\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n size: \"base\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction C(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n size: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(u({\n marginBottom: m,\n size: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h1\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst w = f(\"mt-0 ml-0 mr-0 p-0 text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction E(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(w({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h2\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst v = f(\"mt-0 ml-0 mr-0 p-0 text-[1.875rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"semibold\",\n alignment: \"left\"\n }\n});\nfunction R(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(v({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h3\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst B = f(\"mt-0 ml-0 mr-0 p-0 text-[1.563rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction A(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(B({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h4\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst N = f(\"mt-0 ml-0 mr-0 p-0 text-[1.25rem] md:text-[1.563rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction P(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(N({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h5\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst V = f(\"mt-0 ml-0 mr-0 p-0 text-base leading-[1.15] uppercase tracking-[0.48px] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction D(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(V({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h6\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst k = f(\"mt-0 ml-0 mr-0 p-0 text-xl md:text-2xl leading-[1.1] block font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\"\n }\n});\nfunction F(s) {\n const e = d.c(14);\n let t, l, n, m, i;\n e[0] !== s ? ({\n children: t,\n className: l,\n marginBottom: n,\n weight: i,\n ...m\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5]);\n let o;\n e[6] !== l || e[7] !== n || e[8] !== i ? (o = g(k({\n marginBottom: n,\n weight: i\n }), l), e[6] = l, e[7] = n, e[8] = i, e[9] = o) : o = e[9];\n let a;\n return e[10] !== t || e[11] !== m || e[12] !== o ? (a = /* @__PURE__ */ b.jsx(\"cite\", { ...m, className: o, children: t }), e[10] = t, e[11] = m, e[12] = o, e[13] = a) : a = e[13], a;\n}\nconst j = f(\"mt-0 ml-0 mr-0 font-mono mt-0 text-base bg-primary-gray-200 dark:bg-primary-gray-600 px-2 pb-2 text-primary-black dark:text-primary-white\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction G(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g(j({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"code\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nconst $ = f(\"mt-0 ml-0 mr-0 text-[1.625rem] md:text-[2.188rem] leading-[1.1] md:leading-[1.25] font-sans\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction I(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g($({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"blockquote\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nfunction J(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n const i = m ? `font-${m}` : \"font-normal\";\n let o;\n e[5] !== l || e[6] !== i ? (o = g(\"undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white\", \"cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]\", i, l), e[5] = l, e[6] = i, e[7] = o) : o = e[7];\n let a;\n return e[8] !== t || e[9] !== n || e[10] !== o ? (a = /* @__PURE__ */ b.jsx(\"a\", { ...n, className: o, children: t }), e[8] = t, e[9] = n, e[10] = o, e[11] = a) : a = e[11], a;\n}\nexport {\n J as A,\n I as Blockquote,\n F as Cite,\n G as Code,\n C as H1,\n E as H2,\n R as H3,\n A as H4,\n P as H5,\n D as H6,\n _ as P\n};\n//# sourceMappingURL=Typography.js.map\n"],"names":["p","f","_","e","d","t","l","n","m","i","o","a","x","c","g","b","E","v","R","N","P","J"],"mappings":";AAIA,MAAMA,IAAIC,EAAE,kBAAkB;AAAA,EAC5B,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,MAAM;AAAA,MACN,WAAW;AAAA,IACjB;AAAA,IACI,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,gBAAgB;AAAA,IACtB;AAAA,IACI,cAAc;AAAA,MACZ,MAAM;AAAA,MACN,OAAO;AAAA,MACP,OAAO;AAAA,MACP,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,WAAW;AAAA,MACT,MAAM;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,IACd;AAAA,EACA;AAAA,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AE,EAAE,IAAIQ,KAAKA,IAAIR,EAAE,EAAE,GAAGQ;AAChL;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"Typography-HicNIA61.js","sources":["../node_modules/@undp/design-system-react/dist/Typography.js"],"sourcesContent":["import { j as b } from \"./jsx-runtime-BzflLqGi.js\";\nimport { c as d } from \"./compiler-runtime-Cu50tn6L.js\";\nimport { c as f } from \"./index-CHPV5EwG.js\";\nimport { c as g } from \"./utils-D_Pof5Gy.js\";\nconst p = f(\"mt-0 ml-0 mr-0\", {\n variants: {\n size: {\n xs: \"text-xs\",\n sm: \"text-sm\",\n base: \"text-base\",\n \"base-responsive\": \"text-base md:text-xl\",\n lg: \"text-lg\",\n xl: \"text-xl\"\n },\n leading: {\n none: \"leading-none\",\n xs: \"leading-[1.25]\",\n sm: \"leading-[1.375]\",\n base: \"leading-[1.4]\",\n lg: \"leading-[1.625]\",\n xl: \"leading-[2]\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n decoration: {\n normal: \"normal\",\n italic: \"italic\",\n underline: \"underline\",\n \"line-through\": \"line-through\"\n },\n marginBottom: {\n none: \"mb-0\",\n \"3xs\": \"mb-1\",\n \"2xs\": \"mb-2\",\n xs: \"mb-3\",\n sm: \"mb-4\",\n base: \"mb-5\",\n lg: \"mb-6\",\n xl: \"mb-7\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n size: \"base-responsive\",\n leading: \"base\",\n weight: \"normal\",\n decoration: \"normal\",\n marginBottom: \"base\",\n alignment: \"left\"\n }\n});\nfunction _(s) {\n const e = d.c(22);\n let t, l, n, m, i, o, a, r, x;\n e[0] !== s ? ({\n children: l,\n className: n,\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t,\n ...a\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o, e[7] = a, e[8] = r, e[9] = x) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6], a = e[7], r = e[8], x = e[9]);\n let c;\n e[10] !== t || e[11] !== n || e[12] !== m || e[13] !== i || e[14] !== o || e[15] !== r || e[16] !== x ? (c = g(p({\n size: r,\n leading: i,\n marginBottom: o,\n weight: x,\n decoration: m,\n alignment: t\n }), n), e[10] = t, e[11] = n, e[12] = m, e[13] = i, e[14] = o, e[15] = r, e[16] = x, e[17] = c) : c = e[17];\n let h;\n return e[18] !== l || e[19] !== a || e[20] !== c ? (h = /* @__PURE__ */ b.jsx(\"p\", { ...a, className: c, children: l }), e[18] = l, e[19] = a, e[20] = c, e[21] = h) : h = e[21], h;\n}\nconst u = f(\"mt-0 ml-0 mr-0 p-0 uppercase font-heading\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n size: {\n base: \"text-[2.938rem] md:text-[5.125rem] lg:text-[6.25rem] tracking-[0.06rem] leading-[1.08]\",\n sm: \"text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1]\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n size: \"base\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction C(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n size: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(u({\n marginBottom: m,\n size: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h1\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst w = f(\"mt-0 ml-0 mr-0 p-0 text-[2.5rem] md:text-[2.813rem] lg:text-[3.438rem] leading-[1.1] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction E(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(w({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h2\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst v = f(\"mt-0 ml-0 mr-0 p-0 text-[1.875rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"semibold\",\n alignment: \"left\"\n }\n});\nfunction R(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(v({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h3\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst B = f(\"mt-0 ml-0 mr-0 p-0 text-[1.563rem] md:text-[2.188rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction A(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(B({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h4\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst N = f(\"mt-0 ml-0 mr-0 p-0 text-[1.25rem] md:text-[1.563rem] leading-[1.15] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\",\n alignment: \"left\"\n }\n});\nfunction P(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(N({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h5\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst V = f(\"mt-0 ml-0 mr-0 p-0 text-base leading-[1.15] uppercase tracking-[0.48px] font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n },\n alignment: {\n left: \"text-left\",\n right: \"text-right\",\n center: \"text-center\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"bold\",\n alignment: \"left\"\n }\n});\nfunction D(s) {\n const e = d.c(16);\n let t, l, n, m, i, o;\n e[0] !== s ? ({\n children: l,\n className: n,\n marginBottom: m,\n weight: o,\n alignment: t,\n ...i\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i, e[6] = o) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5], o = e[6]);\n let a;\n e[7] !== t || e[8] !== n || e[9] !== m || e[10] !== o ? (a = g(V({\n marginBottom: m,\n weight: o,\n alignment: t\n }), n), e[7] = t, e[8] = n, e[9] = m, e[10] = o, e[11] = a) : a = e[11];\n let r;\n return e[12] !== l || e[13] !== i || e[14] !== a ? (r = /* @__PURE__ */ b.jsx(\"h6\", { ...i, className: a, children: l }), e[12] = l, e[13] = i, e[14] = a, e[15] = r) : r = e[15], r;\n}\nconst k = f(\"mt-0 ml-0 mr-0 p-0 text-xl md:text-2xl leading-[1.1] block font-sans\", {\n variants: {\n marginBottom: {\n none: \"mb-0\",\n \"2xs\": \"mb-1\",\n xs: \"mb-2\",\n sm: \"mb-3\",\n \"base-responsive\": \"mb-3 md:mb-4\",\n base: \"mb-4\",\n lg: \"mb-5\",\n xl: \"mb-6\"\n },\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n marginBottom: \"base-responsive\",\n weight: \"normal\"\n }\n});\nfunction F(s) {\n const e = d.c(14);\n let t, l, n, m, i;\n e[0] !== s ? ({\n children: t,\n className: l,\n marginBottom: n,\n weight: i,\n ...m\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m, e[5] = i) : (t = e[1], l = e[2], n = e[3], m = e[4], i = e[5]);\n let o;\n e[6] !== l || e[7] !== n || e[8] !== i ? (o = g(k({\n marginBottom: n,\n weight: i\n }), l), e[6] = l, e[7] = n, e[8] = i, e[9] = o) : o = e[9];\n let a;\n return e[10] !== t || e[11] !== m || e[12] !== o ? (a = /* @__PURE__ */ b.jsx(\"cite\", { ...m, className: o, children: t }), e[10] = t, e[11] = m, e[12] = o, e[13] = a) : a = e[13], a;\n}\nconst j = f(\"mt-0 ml-0 mr-0 font-mono mt-0 text-base bg-primary-gray-200 dark:bg-primary-gray-600 px-2 pb-2 text-primary-black dark:text-primary-white\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction G(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g(j({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"code\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nconst $ = f(\"mt-0 ml-0 mr-0 text-[1.625rem] md:text-[2.188rem] leading-[1.1] md:leading-[1.25] font-sans\", {\n variants: {\n weight: {\n light: \"font-light\",\n normal: \"font-normal\",\n medium: \"font-medium\",\n semibold: \"font-semibold\",\n bold: \"font-bold\",\n extrabold: \"font-extrabold\"\n }\n },\n defaultVariants: {\n weight: \"normal\"\n }\n});\nfunction I(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n let i;\n e[5] !== l || e[6] !== m ? (i = g($({\n weight: m\n }), l), e[5] = l, e[6] = m, e[7] = i) : i = e[7];\n let o;\n return e[8] !== t || e[9] !== n || e[10] !== i ? (o = /* @__PURE__ */ b.jsx(\"blockquote\", { ...n, className: i, children: t }), e[8] = t, e[9] = n, e[10] = i, e[11] = o) : o = e[11], o;\n}\nfunction J(s) {\n const e = d.c(12);\n let t, l, n, m;\n e[0] !== s ? ({\n children: t,\n className: l,\n weight: m,\n ...n\n } = s, e[0] = s, e[1] = t, e[2] = l, e[3] = n, e[4] = m) : (t = e[1], l = e[2], n = e[3], m = e[4]);\n const i = m ? `font-${m}` : \"font-normal\";\n let o;\n e[5] !== l || e[6] !== i ? (o = g(\"undp-link light text-primary-black dark:text-primary-white dark:text-primary-white bg-double-red dark:bg-double-white\", \"cursor-pointer no-underline focus-visible:outline-hidden focus-visible:shadow-[0_0_0_#0468b1]\", i, l), e[5] = l, e[6] = i, e[7] = o) : o = e[7];\n let a;\n return e[8] !== t || e[9] !== n || e[10] !== o ? (a = /* @__PURE__ */ b.jsx(\"a\", { ...n, className: o, children: t }), e[8] = t, e[9] = n, e[10] = o, e[11] = a) : a = e[11], a;\n}\nexport {\n J as A,\n I as Blockquote,\n F as Cite,\n G as Code,\n C as H1,\n E as H2,\n R as H3,\n A as H4,\n P as H5,\n D as H6,\n _ as P\n};\n//# sourceMappingURL=Typography.js.map\n"],"names":["p","f","_","e","d","t","l","n","m","i","o","a","x","c","g","b","E","v","R","N","P","J"],"mappings":";AAIA,MAAMA,IAAIC,EAAE,kBAAkB;AAAA,EAC5B,UAAU;AAAA,IACR,MAAM;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,mBAAmB;AAAA,MACnB,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,SAAS;AAAA,MACP,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,MAAM;AAAA,MACN,IAAI;AAAA,MACJ,IAAI;AAAA,IACV;AAAA,IACI,QAAQ;AAAA,MACN,OAAO;AAAA,MACP,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,UAAU;AAAA,MACV,MAAM;AAAA,MACN,WAAW;AAAA,IACjB;AAAA,IACI,YAAY;AAAA,MACV,QAAQ;AAAA,MACR,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,gBAAgB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AC1S,MAAIQ;AACJ,SAAOR,EAAE,CAAC,MAAME,KAAKF,EAAE,CAAC,MAAMI,KAAKJ,EAAE,EAAE,MAAMO,KAAKC,IAAoBI,gBAAAA,EAAE,IAAI,KAAK,EAAE,GAAGR,GAAG,WAAWG,GAAG,UAAUL,GAAG,GAAGF,EAAE,CAAC,IAAIE,GAAGF,EAAE,CAAC,IAAII,GAAGJ,EAAE,EAAE,IAAIO,GAAGP,EAAE,EAAE,IAAIQ,KAAKA,IAAIR,EAAE,EAAE,GAAGQ;AAChL;","x_google_ignoreList":[0]}
|
package/dist/UnitChart.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { c as Pt, j as i } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as Pt, j as i } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as yt } from "react";
|
|
3
3
|
import { s as Rt } from "./index-CeVNqhMO.js";
|
|
4
|
-
import { _ as Bt, E as qt } from "./Typography-
|
|
4
|
+
import { _ as Bt, E as qt } from "./Typography-HicNIA61.js";
|
|
5
5
|
import { GraphFooter as Ot } from "./GraphFooter.js";
|
|
6
6
|
import { GraphHeader as Ut } from "./GraphHeader.js";
|
|
7
7
|
import { Colors as Jt } from "./Colors.js";
|
|
8
8
|
import { n as Kt } from "./numberFormattingFunction-14YCbkN2.js";
|
|
9
|
-
import { G as Qt, a as Xt } from "./GraphContainer-
|
|
10
|
-
import { m as Yt } from "./proxy
|
|
11
|
-
import { u as Zt } from "./use-in-view-
|
|
12
|
-
import { A as _t } from "./index-
|
|
9
|
+
import { G as Qt, a as Xt } from "./GraphContainer-DwMxWRCi.js";
|
|
10
|
+
import { m as Yt } from "./proxy--_f6k3NR.js";
|
|
11
|
+
import { u as Zt } from "./use-in-view-DqvKAveg.js";
|
|
12
|
+
import { A as _t } from "./index-Co3YGYe1.js";
|
|
13
13
|
function ve(a) {
|
|
14
14
|
const t = Pt.c(127), {
|
|
15
15
|
data: r,
|
package/dist/WaterfallChart.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-02t-wJta.cjs"),le=require("./Tooltip-BLa2EfMs.cjs"),zt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),yt=require("./Colors.cjs"),ae=require("./AxisTitle-DV4n0RxE.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),ue=require("./ReferenceLine-M9aP3dj-.cjs"),de=require("./YTicksAndGridLines-UzVC5eBM.cjs"),me=require("./XAxesLabels-C6o9jJal.cjs"),xe=require("./DetailsModal-DHttOA80.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),he=require("./linear-CgUCbw9F.cjs"),fe=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),ge=require("./use-in-view-C3o_ntMv.cjs"),pe=require("./index-CoobIWNj.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-N1eHt3vq.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,o=0,w=0;for(const x of i)t+=x||0,t>o&&(o=t),t<w&&(w=t);return{max:o,min:w}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:o,rightMargin:w,topMargin:x,bottomMargin:Gt,data:h,width:Ct,height:S,barColor:f,suffix:wt,prefix:jt,barPadding:Qt,showLabels:Wt,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ot,tooltip:T,onSeriesMouseOver:Et,refValues:Ft,selectedColor:V,maxValue:Mt,minValue:At,highlightedDataPoints:I,onSeriesMouseClick:Rt,labelOrder:v,maxBarThickness:kt,minBarThickness:Lt,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ht,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Tt,customLayers:R,naLabel:Ut,hideAxisLine:Zt}=i,k=o===void 0?20:o,Nt=w===void 0?20:w,lt=x===void 0?20:x,P=Gt===void 0?25:Gt,qt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ge.useInView(qt,z),at=rt?k+30:k;let ct;t[3]!==P||t[4]!==Nt||t[5]!==at||t[6]!==lt?(ct={top:lt,bottom:P,left:at,right:Nt},t[3]=P,t[4]=Nt,t[5]=at,t[6]=lt,t[7]=ct):ct=t[7];const n=ct,{max:l,min:_t}=we(h.map(De)),Yt=zt.checkIfNullOrUndefined(Mt)?l:Mt,b=zt.checkIfNullOrUndefined(At)?_t:At,[ut,G]=M.useState(void 0),[W,F]=M.useState(void 0),[H,dt]=M.useState(void 0),[U,mt]=M.useState(void 0),L=Ct-n.left-n.right,$t=S-n.top-n.bottom;let $;if(t[8]!==h||t[9]!==v){const e=new Set,O=h.map((ot,nt)=>{const D=v?`${ot.label}`:`${nt}`;return e.add(D),{...ot,id:D}}),E=v?v.filter(ot=>!e.has(ot)):[];$=[...O,...E.map(Be)],t[8]=h,t[9]=v,t[10]=$}else $=t[10];const Y=$;let X;t[11]!==Y||t[12]!==v?(X=v??Y.map($e),t[11]=Y,t[12]=v,t[13]=X):X=t[13];const xt=X,r=he.linear().domain([b,Yt]).range([$t,0]).nice(),u=fe.band().domain(xt).range([0,Lt?Math.max(L,Lt*xt.length):kt?Math.min(L,kt*xt.length):L]).paddingInner(Qt),ht=r.ticks(Ht);let y=0;const Xt=Y.map(e=>{const O=y;return y=y+(e.size||0),{...e,start:O,end:y}}),ft=a?.xAxis?.axis,p=a?.yAxis?.labels;let J;t[14]!==p||t[15]!==ft?(J={axis:ft,label:p},t[14]=p,t[15]=ft,t[16]=J):J=t[16];const j=m?.xAxis?.axis,K=m?.yAxis?.labels;let Q;t[17]!==j||t[18]!==K?(Q={axis:j,label:K},t[17]=j,t[18]=K,t[19]=Q):Q=t[19];const gt=0-k-15,Z=$t/2,pt=m?.yAxis?.title,vt=a?.yAxis?.title;let _;t[20]!==rt||t[21]!==gt||t[22]!==Z||t[23]!==pt||t[24]!==vt?(_=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:gt,y:Z,style:pt,className:vt,text:rt,rotate90:!0}),t[20]=rt,t[21]=gt,t[22]=Z,t[23]=pt,t[24]=vt,t[25]=_):_=t[25];let B;t[26]!==R?(B=R.filter(Te).map(Le),t[26]=R,t[27]=B):B=t[27];const Jt=pe.AnimatePresence,tt=Xt.map((e,O)=>zt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{G(e),mt(E.clientY),dt(E.clientX),Et?.(e)},onClick:()=>{(Rt||N)&&(re.isEqual(W,e)?(F(void 0),Rt?.(void 0)):(F(e),Rt?.(e)))},onMouseMove:E=>{G(e),mt(E.clientY),dt(E.clientX)},onMouseLeave:()=>{G(void 0),dt(void 0),mt(void 0),Et?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(ke).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Wt?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:n.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Ut,Tt,jt,wt)}):null]},e.label)),Kt=Ft?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ft.map((e,O)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+n.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},O))}):null;let et;t[28]!==Jt||t[29]!==tt||t[30]!==Kt?(et=s.jsxRuntimeExports.jsxs(Jt,{children:[tt,Kt]}),t[28]=Jt,t[29]=tt,t[30]=Kt,t[31]=et):et=t[31];let Bt;t[32]!==R?(Bt=R.filter(Ee).map(Oe),t[32]=R,t[33]=Bt):Bt=t[33];let it;t[34]!==a?.tooltip||t[35]!==H||t[36]!==U||t[37]!==ut||t[38]!==m?.tooltip||t[39]!==T?(it=ut&&T&&H&&U?s.jsxRuntimeExports.jsx(le.Tooltip,{data:ut,body:T,xPos:H,yPos:U,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=H,t[36]=U,t[37]=ut,t[38]=m?.tooltip,t[39]=T,t[40]=it):it=t[40];let bt;return t[41]!==a?.modal||t[42]!==N||t[43]!==W||t[44]!==F?(bt=N&&W!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:N,data:W,setData:F,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=W,t[44]=F,t[45]=bt):bt=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:qt,width:`${Ct}px`,height:`${S}px`,viewBox:`0 0 ${Ct} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${n.left},${n.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+n.right,hideAxisLine:Zt,label:st?oe.numberFormattingFunction(b<0?0:b,Ut,Tt,jt,wt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:J,styles:Q}),st?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:ht.filter(qe),y:ht.filter(Ne).map(e=>r(e)),x1:0-k,x2:L+n.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:wt,prefix:jt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Tt}):null,_,B,et,Bt]})}),it,bt]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(101),{data:o,graphTitle:w,colors:x,suffix:Gt,sources:h,prefix:Ct,graphDescription:S,barPadding:f,showValues:wt,showTicks:jt,truncateBy:Qt,height:Wt,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:T,padding:Et,backgroundColor:Ft,topMargin:V,bottomMargin:Mt,leftMargin:At,rightMargin:I,showLabels:Rt,relativeHeight:v,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,showColorScale:rt,graphID:Ht,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Tt,labelOrder:R,language:Ut,showNAColor:Zt,minHeight:k,theme:Nt,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:qt,ariaLabel:z,detailsOnClick:q,barAxisTitle:at,noOfTicks:ct,styles:n,classNames:l,filterNA:_t,animate:Yt,dimmedOpacity:b,precision:ut,customLayers:G,naLabel:W,hideAxisLine:F}=i,H=Gt===void 0?"":Gt,dt=Ct===void 0?"":Ct,U=f===void 0?.25:f,mt=wt===void 0?!0:wt,L=jt===void 0?!0:jt,$t=Qt===void 0?999:Qt;let $;t[0]!==T?($=T===void 0?[]:T,t[0]=T,t[1]=$):$=t[1];const Y=$,X=Ft===void 0?!1:Ft,xt=Rt===void 0?!0:Rt,r=rt===void 0?!0:rt,u=c===void 0?!1:c,ht=Tt===void 0?!1:Tt,y=Ut===void 0?"en":Ut,Xt=Zt===void 0?!0:Zt,ft=k===void 0?0:k,p=Nt===void 0?"light":Nt,J=ct===void 0?5:ct,j=_t===void 0?!0:_t,K=Yt===void 0?!1:Yt,Q=b===void 0?.3:b,gt=ut===void 0?2:ut;let Z;t[2]!==G?(Z=G===void 0?[]:G,t[2]=G,t[3]=Z):Z=t[3];const pt=Z,vt=W===void 0?"NA":W,_=F===void 0?!1:F,[B,Jt]=M.useState(0),[tt,Kt]=M.useState(0),[et,Bt]=M.useState(void 0),it=M.useRef(null),bt=M.useRef(null);let e,O;t[4]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{const C=new ResizeObserver(ee=>{Jt(ee[0].target.clientWidth||620),Kt(ee[0].target.clientHeight||480)});return it.current&&C.observe(it.current),()=>C.disconnect()},O=[],t[4]=e,t[5]=O):(e=t[4],O=t[5]),M.useEffect(e,O);const E=l?.graphContainer,ot=n?.graphContainer;let nt;t[6]!==l?.description||t[7]!==l?.title||t[8]!==o||t[9]!==ht||t[10]!==S||t[11]!==u||t[12]!==w||t[13]!==n?.description||t[14]!==n?.title||t[15]!==d?(nt=w||S||u||ht?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:l?.title,description:l?.description},graphTitle:w,graphDescription:S,width:d,graphDownload:u?bt:void 0,dataDownload:ht?o.map(He).filter(Fe).length>0?o.map(We).filter(Ge):o.filter(ze):null}):null,t[6]=l?.description,t[7]=l?.title,t[8]=o,t[9]=ht,t[10]=S,t[11]=u,t[12]=w,t[13]=n?.description,t[14]=n?.title,t[15]=d,t[16]=nt):nt=t[16];let D;t[17]!==l?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==o||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(D=r&&o.filter(Pe).length!==0&&o.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||yt.Colors[p].categoricalColors.colors,colorDomain:g||se.uniqBy(o,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:l?.colorLegend}):null,t[17]=l?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=o,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=D):D=t[26];let Dt;t[27]!==o||t[28]!==j?(Dt=o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[27]=o,t[28]=j,t[29]=Dt):Dt=t[29];let St;t[30]!==K||t[31]!==at||t[32]!==U||t[33]!==Mt||t[34]!==l||t[35]!==g||t[36]!==x||t[37]!==pt||t[38]!==o||t[39]!==q||t[40]!==Q||t[41]!==j||t[42]!==_||t[43]!==Y||t[44]!==R||t[45]!==y||t[46]!==At||t[47]!==lt||t[48]!==P||t[49]!==m||t[50]!==qt||t[51]!==a||t[52]!==vt||t[53]!==J||t[54]!==A||t[55]!==Lt||t[56]!==gt||t[57]!==dt||t[58]!==N||t[59]!==I||t[60]!==et||t[61]!==xt||t[62]!==L||t[63]!==mt||t[64]!==n||t[65]!==H||t[66]!==tt||t[67]!==B||t[68]!==p||t[69]!==kt||t[70]!==V||t[71]!==$t?(St=B&&tt&&o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:_,data:o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).filter((C,ee)=>P?ee<P:!0),barColor:o.filter(Ie).length===0?x?[x]:[yt.Colors.primaryColors["blue-600"]]:x||yt.Colors[p].categoricalColors.colors,colorDomain:o.filter(Ve).length===0?[]:g||se.uniqBy(o,"color",!0),selectedColor:et,width:B,height:tt,suffix:H,prefix:dt,barPadding:U,showValues:mt,showTicks:L,leftMargin:At,rightMargin:I,topMargin:V,bottomMargin:Mt,truncateBy:$t,showLabels:xt,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:Y,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:qt,detailsOnClick:q,barAxisTitle:at,noOfTicks:J,classNames:l,styles:n,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Q,precision:gt,customLayers:pt,naLabel:vt}):null,t[30]=K,t[31]=at,t[32]=U,t[33]=Mt,t[34]=l,t[35]=g,t[36]=x,t[37]=pt,t[38]=o,t[39]=q,t[40]=Q,t[41]=j,t[42]=_,t[43]=Y,t[44]=R,t[45]=y,t[46]=At,t[47]=lt,t[48]=P,t[49]=m,t[50]=qt,t[51]=a,t[52]=vt,t[53]=J,t[54]=A,t[55]=Lt,t[56]=gt,t[57]=dt,t[58]=N,t[59]=I,t[60]=et,t[61]=xt,t[62]=L,t[63]=mt,t[64]=n,t[65]=H,t[66]=tt,t[67]=B,t[68]=p,t[69]=kt,t[70]=V,t[71]=$t,t[72]=St):St=t[72];let Vt;t[73]!==Dt||t[74]!==St?(Vt=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:it,children:[Dt,St]}),t[73]=Dt,t[74]=St,t[75]=Vt):Vt=t[75];let It;t[76]!==l?.footnote||t[77]!==l?.source||t[78]!==st||t[79]!==h||t[80]!==n?.footnote||t[81]!==n?.source||t[82]!==d?(It=h||st?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:l?.footnote,source:l?.source}}):null,t[76]=l?.footnote,t[77]=l?.source,t[78]=st,t[79]=h,t[80]=n?.footnote,t[81]=n?.source,t[82]=d,t[83]=It):It=t[83];let te;return t[84]!==z||t[85]!==X||t[86]!==Ht||t[87]!==Wt||t[88]!==y||t[89]!==ft||t[90]!==Et||t[91]!==v||t[92]!==E||t[93]!==ot||t[94]!==nt||t[95]!==D||t[96]!==Vt||t[97]!==It||t[98]!==p||t[99]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:E,style:ot,id:Ht,ref:bt,"aria-label":z,backgroundColor:X,theme:p,language:y,minHeight:ft,width:d,height:Wt,relativeHeight:v,padding:Et,children:[nt,D,Vt,It]}),t[84]=z,t[85]=X,t[86]=Ht,t[87]=Wt,t[88]=y,t[89]=ft,t[90]=Et,t[91]=v,t[92]=E,t[93]=ot,t[94]=nt,t[95]=D,t[96]=Vt,t[97]=It,t[98]=p,t[99]=d,t[100]=te):te=t[100],te}function Ve(i){return i.color}function Ie(i){return i.color}function Pe(i){return i.color}function ze(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("./index-CHPV5EwG-6v2a2njQ.cjs"),M=require("react"),re=require("./index-DQA8q5sC.cjs"),oe=require("./numberFormattingFunction-02t-wJta.cjs"),le=require("./Tooltip-BLa2EfMs.cjs"),zt=require("./checkIfNullOrUndefined-BCW3Y1ML.cjs"),yt=require("./Colors.cjs"),ae=require("./AxisTitle-DV4n0RxE.cjs"),ce=require("./Axis-Jt_tmhxS.cjs"),ue=require("./ReferenceLine-M9aP3dj-.cjs"),de=require("./YTicksAndGridLines-UzVC5eBM.cjs"),me=require("./XAxesLabels-C6o9jJal.cjs"),xe=require("./DetailsModal-DIRTulvr.cjs"),Pt=require("./getTextColorBasedOnBgColor-nqY-bsM_.cjs"),he=require("./linear-CgUCbw9F.cjs"),fe=require("./band-VYfcZeJ2.cjs"),ie=require("./proxy-C4-uo6nS.cjs"),ge=require("./use-in-view-C3o_ntMv.cjs"),pe=require("./index-CoobIWNj.cjs"),ve=require("./ColorLegendWithMouseOver.cjs"),be=require("./EmptyState-N1eHt3vq.cjs"),ne=require("./GraphContainer-B1EDxJ0S.cjs"),ye=require("./GraphFooter.cjs"),Ce=require("./GraphHeader.cjs"),se=require("./uniqBy-O05lp2S5.cjs");function we(i){let t=0,o=0,w=0;for(const x of i)t+=x||0,t>o&&(o=t),t<w&&(w=t);return{max:o,min:w}}function je(i){const t=s.compilerRuntimeExports.c(46),{leftMargin:o,rightMargin:w,topMargin:x,bottomMargin:Gt,data:h,width:Ct,height:S,barColor:f,suffix:wt,prefix:jt,barPadding:Qt,showLabels:Wt,showValues:d,showTicks:st,colorDomain:g,truncateBy:Ot,tooltip:T,onSeriesMouseOver:Et,refValues:Ft,selectedColor:V,maxValue:Mt,minValue:At,highlightedDataPoints:I,onSeriesMouseClick:Rt,labelOrder:v,maxBarThickness:kt,minBarThickness:Lt,detailsOnClick:N,barAxisTitle:rt,noOfTicks:Ht,styles:m,classNames:a,dimmedOpacity:A,animate:c,precision:Tt,customLayers:R,naLabel:Ut,hideAxisLine:Zt}=i,k=o===void 0?20:o,Nt=w===void 0?20:w,lt=x===void 0?20:x,P=Gt===void 0?25:Gt,qt=M.useRef(null);let z;t[0]!==c.amount||t[1]!==c.once?(z={once:c.once,amount:c.amount},t[0]=c.amount,t[1]=c.once,t[2]=z):z=t[2];const q=ge.useInView(qt,z),at=rt?k+30:k;let ct;t[3]!==P||t[4]!==Nt||t[5]!==at||t[6]!==lt?(ct={top:lt,bottom:P,left:at,right:Nt},t[3]=P,t[4]=Nt,t[5]=at,t[6]=lt,t[7]=ct):ct=t[7];const n=ct,{max:l,min:_t}=we(h.map(De)),Yt=zt.checkIfNullOrUndefined(Mt)?l:Mt,b=zt.checkIfNullOrUndefined(At)?_t:At,[ut,G]=M.useState(void 0),[W,F]=M.useState(void 0),[H,dt]=M.useState(void 0),[U,mt]=M.useState(void 0),L=Ct-n.left-n.right,$t=S-n.top-n.bottom;let $;if(t[8]!==h||t[9]!==v){const e=new Set,O=h.map((ot,nt)=>{const D=v?`${ot.label}`:`${nt}`;return e.add(D),{...ot,id:D}}),E=v?v.filter(ot=>!e.has(ot)):[];$=[...O,...E.map(Be)],t[8]=h,t[9]=v,t[10]=$}else $=t[10];const Y=$;let X;t[11]!==Y||t[12]!==v?(X=v??Y.map($e),t[11]=Y,t[12]=v,t[13]=X):X=t[13];const xt=X,r=he.linear().domain([b,Yt]).range([$t,0]).nice(),u=fe.band().domain(xt).range([0,Lt?Math.max(L,Lt*xt.length):kt?Math.min(L,kt*xt.length):L]).paddingInner(Qt),ht=r.ticks(Ht);let y=0;const Xt=Y.map(e=>{const O=y;return y=y+(e.size||0),{...e,start:O,end:y}}),ft=a?.xAxis?.axis,p=a?.yAxis?.labels;let J;t[14]!==p||t[15]!==ft?(J={axis:ft,label:p},t[14]=p,t[15]=ft,t[16]=J):J=t[16];const j=m?.xAxis?.axis,K=m?.yAxis?.labels;let Q;t[17]!==j||t[18]!==K?(Q={axis:j,label:K},t[17]=j,t[18]=K,t[19]=Q):Q=t[19];const gt=0-k-15,Z=$t/2,pt=m?.yAxis?.title,vt=a?.yAxis?.title;let _;t[20]!==rt||t[21]!==gt||t[22]!==Z||t[23]!==pt||t[24]!==vt?(_=s.jsxRuntimeExports.jsx(ae.AxisTitle,{x:gt,y:Z,style:pt,className:vt,text:rt,rotate90:!0}),t[20]=rt,t[21]=gt,t[22]=Z,t[23]=pt,t[24]=vt,t[25]=_):_=t[25];let B;t[26]!==R?(B=R.filter(Te).map(Le),t[26]=R,t[27]=B):B=t[27];const Jt=pe.AnimatePresence,tt=Xt.map((e,O)=>zt.checkIfNullOrUndefined(u(e.id))?null:s.jsxRuntimeExports.jsxs(ie.motion.g,{className:"undp-viz-g-with-hover",initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85},whileInView:{opacity:V?e.color&&f[g.indexOf(e.color)]===V?1:A:I.length!==0?I.indexOf(e.label)!==-1?.85:A:.85,transition:{duration:c.duration}}},exit:{opacity:0,transition:{duration:c.duration}},onMouseEnter:E=>{G(e),mt(E.clientY),dt(E.clientX),Et?.(e)},onClick:()=>{(Rt||N)&&(re.isEqual(W,e)?(F(void 0),Rt?.(void 0)):(F(e),Rt?.(e)))},onMouseMove:E=>{G(e),mt(E.clientY),dt(E.clientX)},onMouseLeave:()=>{G(void 0),dt(void 0),mt(void 0),Et?.(void 0)},children:[e.size?s.jsxRuntimeExports.jsx(ie.motion.rect,{width:u.bandwidth(),initial:"initial",animate:q?"whileInView":"initial",variants:{initial:{height:0,x:u(`${e.id}`),y:r(e.start),fill:h.filter(ke).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray},whileInView:{height:Math.abs(r(e.start)-r(e.end)),y:r(Math.max(e.start,e.end)),x:u(`${e.id}`),fill:h.filter(Re).length===0?f[0]:e.color?f[g.indexOf(e.color)]:yt.Colors.gray,transition:{duration:c.duration}}},exit:{height:0,y:r(e.start),transition:{duration:c.duration}}}):null,Wt?s.jsxRuntimeExports.jsx(me.XAxesLabels,{value:`${e.label}`.length<Ot?`${e.label}`:`${`${e.label}`.substring(0,Ot)}...`,y:r(0)+5,x:u(`${e.id}`),width:u.bandwidth(),height:n.bottom,style:m?.xAxis?.labels,className:a?.xAxis?.labels,alignment:"top",animate:c,isInView:q}):null,d&&Math.abs(r(e.start)-r(e.end))>16?s.jsxRuntimeExports.jsx(ie.motion.text,{style:{textAnchor:"middle",...m?.graphObjectValues||{}},className:s.mo("graph-value text-sm",a?.graphObjectValues),dy:"0.33em",variants:{initial:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,opacity:0,fill:h.filter(Ae).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray)},whileInView:{x:u(`${e.id}`)+u.bandwidth()/2,y:(r(e.start)+r(e.end))/2,fill:h.filter(Me).length===0?Pt.getTextColorBasedOnBgColor(f[0]):e.color?Pt.getTextColorBasedOnBgColor(f[g.indexOf(e.color)]):Pt.getTextColorBasedOnBgColor(yt.Colors.gray),opacity:1,transition:{duration:c.duration}}},initial:"initial",animate:q?"whileInView":"initial",exit:{opacity:0,transition:{duration:c.duration}},children:oe.numberFormattingFunction(e.size?Math.abs(e.size):e.size,Ut,Tt,jt,wt)}):null]},e.label)),Kt=Ft?s.jsxRuntimeExports.jsx(s.jsxRuntimeExports.Fragment,{children:Ft.map((e,O)=>s.jsxRuntimeExports.jsx(ue.RefLineY,{text:e.text,color:e.color,y:r(e.value),x1:0-k,x2:L+n.right,classNames:e.classNames,styles:e.styles,animate:c,isInView:q},O))}):null;let et;t[28]!==Jt||t[29]!==tt||t[30]!==Kt?(et=s.jsxRuntimeExports.jsxs(Jt,{children:[tt,Kt]}),t[28]=Jt,t[29]=tt,t[30]=Kt,t[31]=et):et=t[31];let Bt;t[32]!==R?(Bt=R.filter(Ee).map(Oe),t[32]=R,t[33]=Bt):Bt=t[33];let it;t[34]!==a?.tooltip||t[35]!==H||t[36]!==U||t[37]!==ut||t[38]!==m?.tooltip||t[39]!==T?(it=ut&&T&&H&&U?s.jsxRuntimeExports.jsx(le.Tooltip,{data:ut,body:T,xPos:H,yPos:U,backgroundStyle:m?.tooltip,className:a?.tooltip}):null,t[34]=a?.tooltip,t[35]=H,t[36]=U,t[37]=ut,t[38]=m?.tooltip,t[39]=T,t[40]=it):it=t[40];let bt;return t[41]!==a?.modal||t[42]!==N||t[43]!==W||t[44]!==F?(bt=N&&W!==void 0?s.jsxRuntimeExports.jsx(xe.DetailsModal,{body:N,data:W,setData:F,className:a?.modal}):null,t[41]=a?.modal,t[42]=N,t[43]=W,t[44]=F,t[45]=bt):bt=t[45],s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[s.jsxRuntimeExports.jsx(ie.motion.svg,{ref:qt,width:`${Ct}px`,height:`${S}px`,viewBox:`0 0 ${Ct} ${S}`,direction:"ltr",children:s.jsxRuntimeExports.jsxs("g",{transform:`translate(${n.left},${n.top})`,children:[s.jsxRuntimeExports.jsx(ce.Axis,{y1:r(b<0?0:b),y2:r(b<0?0:b),x1:0-k,x2:L+n.right,hideAxisLine:Zt,label:st?oe.numberFormattingFunction(b<0?0:b,Ut,Tt,jt,wt):void 0,labelPos:{x:0-k,dx:0,dy:Yt<0?"1em":-5,y:r(b<0?0:b)},classNames:J,styles:Q}),st?s.jsxRuntimeExports.jsx(de.YTicksAndGridLines,{values:ht.filter(qe),y:ht.filter(Ne).map(e=>r(e)),x1:0-k,x2:L+n.right,styles:{gridLines:m?.yAxis?.gridLines,labels:m?.yAxis?.labels},classNames:{gridLines:a?.yAxis?.gridLines,labels:a?.yAxis?.labels},suffix:wt,prefix:jt,labelType:"secondary",showGridLines:!0,labelPos:"vertical",precision:Tt}):null,_,B,et,Bt]})}),it,bt]})}function Oe(i){return i.layer}function Ee(i){return i.position==="after"}function Me(i){return i.color}function Ae(i){return i.color}function Re(i){return i.color}function ke(i){return i.color}function Le(i){return i.layer}function Te(i){return i.position==="before"}function Ne(i){return i!==0}function qe(i){return i!==0}function $e(i){return`${i.id}`}function Be(i){return{id:i,label:i,color:null,size:null}}function De(i){return i.size}function Se(i){const t=s.compilerRuntimeExports.c(101),{data:o,graphTitle:w,colors:x,suffix:Gt,sources:h,prefix:Ct,graphDescription:S,barPadding:f,showValues:wt,showTicks:jt,truncateBy:Qt,height:Wt,width:d,footNote:st,colorDomain:g,colorLegendTitle:Ot,highlightedDataPoints:T,padding:Et,backgroundColor:Ft,topMargin:V,bottomMargin:Mt,leftMargin:At,rightMargin:I,showLabels:Rt,relativeHeight:v,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,showColorScale:rt,graphID:Ht,maxValue:m,minValue:a,onSeriesMouseClick:A,graphDownload:c,dataDownload:Tt,labelOrder:R,language:Ut,showNAColor:Zt,minHeight:k,theme:Nt,maxBarThickness:lt,maxNumberOfBars:P,minBarThickness:qt,ariaLabel:z,detailsOnClick:q,barAxisTitle:at,noOfTicks:ct,styles:n,classNames:l,filterNA:_t,animate:Yt,dimmedOpacity:b,precision:ut,customLayers:G,naLabel:W,hideAxisLine:F}=i,H=Gt===void 0?"":Gt,dt=Ct===void 0?"":Ct,U=f===void 0?.25:f,mt=wt===void 0?!0:wt,L=jt===void 0?!0:jt,$t=Qt===void 0?999:Qt;let $;t[0]!==T?($=T===void 0?[]:T,t[0]=T,t[1]=$):$=t[1];const Y=$,X=Ft===void 0?!1:Ft,xt=Rt===void 0?!0:Rt,r=rt===void 0?!0:rt,u=c===void 0?!1:c,ht=Tt===void 0?!1:Tt,y=Ut===void 0?"en":Ut,Xt=Zt===void 0?!0:Zt,ft=k===void 0?0:k,p=Nt===void 0?"light":Nt,J=ct===void 0?5:ct,j=_t===void 0?!0:_t,K=Yt===void 0?!1:Yt,Q=b===void 0?.3:b,gt=ut===void 0?2:ut;let Z;t[2]!==G?(Z=G===void 0?[]:G,t[2]=G,t[3]=Z):Z=t[3];const pt=Z,vt=W===void 0?"NA":W,_=F===void 0?!1:F,[B,Jt]=M.useState(0),[tt,Kt]=M.useState(0),[et,Bt]=M.useState(void 0),it=M.useRef(null),bt=M.useRef(null);let e,O;t[4]===Symbol.for("react.memo_cache_sentinel")?(e=()=>{const C=new ResizeObserver(ee=>{Jt(ee[0].target.clientWidth||620),Kt(ee[0].target.clientHeight||480)});return it.current&&C.observe(it.current),()=>C.disconnect()},O=[],t[4]=e,t[5]=O):(e=t[4],O=t[5]),M.useEffect(e,O);const E=l?.graphContainer,ot=n?.graphContainer;let nt;t[6]!==l?.description||t[7]!==l?.title||t[8]!==o||t[9]!==ht||t[10]!==S||t[11]!==u||t[12]!==w||t[13]!==n?.description||t[14]!==n?.title||t[15]!==d?(nt=w||S||u||ht?s.jsxRuntimeExports.jsx(Ce.GraphHeader,{styles:{title:n?.title,description:n?.description},classNames:{title:l?.title,description:l?.description},graphTitle:w,graphDescription:S,width:d,graphDownload:u?bt:void 0,dataDownload:ht?o.map(He).filter(Fe).length>0?o.map(We).filter(Ge):o.filter(ze):null}):null,t[6]=l?.description,t[7]=l?.title,t[8]=o,t[9]=ht,t[10]=S,t[11]=u,t[12]=w,t[13]=n?.description,t[14]=n?.title,t[15]=d,t[16]=nt):nt=t[16];let D;t[17]!==l?.colorLegend||t[18]!==g||t[19]!==Ot||t[20]!==x||t[21]!==o||t[22]!==r||t[23]!==Xt||t[24]!==p||t[25]!==d?(D=r&&o.filter(Pe).length!==0&&o.length>0?s.jsxRuntimeExports.jsx(ve.ColorLegendWithMouseOver,{width:d,colorLegendTitle:Ot,colors:x||yt.Colors[p].categoricalColors.colors,colorDomain:g||se.uniqBy(o,"color",!0),setSelectedColor:Bt,showNAColor:Xt,className:l?.colorLegend}):null,t[17]=l?.colorLegend,t[18]=g,t[19]=Ot,t[20]=x,t[21]=o,t[22]=r,t[23]=Xt,t[24]=p,t[25]=d,t[26]=D):D=t[26];let Dt;t[27]!==o||t[28]!==j?(Dt=o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length===0&&s.jsxRuntimeExports.jsx(be.EmptyState,{}),t[27]=o,t[28]=j,t[29]=Dt):Dt=t[29];let St;t[30]!==K||t[31]!==at||t[32]!==U||t[33]!==Mt||t[34]!==l||t[35]!==g||t[36]!==x||t[37]!==pt||t[38]!==o||t[39]!==q||t[40]!==Q||t[41]!==j||t[42]!==_||t[43]!==Y||t[44]!==R||t[45]!==y||t[46]!==At||t[47]!==lt||t[48]!==P||t[49]!==m||t[50]!==qt||t[51]!==a||t[52]!==vt||t[53]!==J||t[54]!==A||t[55]!==Lt||t[56]!==gt||t[57]!==dt||t[58]!==N||t[59]!==I||t[60]!==et||t[61]!==xt||t[62]!==L||t[63]!==mt||t[64]!==n||t[65]!==H||t[66]!==tt||t[67]!==B||t[68]!==p||t[69]!==kt||t[70]!==V||t[71]!==$t?(St=B&&tt&&o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).length>0?s.jsxRuntimeExports.jsx(je,{hideAxisLine:_,data:o.filter(C=>j?!zt.checkIfNullOrUndefined(C.size):C).filter((C,ee)=>P?ee<P:!0),barColor:o.filter(Ie).length===0?x?[x]:[yt.Colors.primaryColors["blue-600"]]:x||yt.Colors[p].categoricalColors.colors,colorDomain:o.filter(Ve).length===0?[]:g||se.uniqBy(o,"color",!0),selectedColor:et,width:B,height:tt,suffix:H,prefix:dt,barPadding:U,showValues:mt,showTicks:L,leftMargin:At,rightMargin:I,topMargin:V,bottomMargin:Mt,truncateBy:$t,showLabels:xt,tooltip:kt,onSeriesMouseOver:Lt,refValues:N,maxValue:m,minValue:a,highlightedDataPoints:Y,onSeriesMouseClick:A,labelOrder:R,rtl:y==="he"||y==="ar",maxBarThickness:lt,minBarThickness:qt,detailsOnClick:q,barAxisTitle:at,noOfTicks:J,classNames:l,styles:n,animate:K===!0?{duration:.5,once:!0,amount:.5}:K||{duration:0,once:!0,amount:0},dimmedOpacity:Q,precision:gt,customLayers:pt,naLabel:vt}):null,t[30]=K,t[31]=at,t[32]=U,t[33]=Mt,t[34]=l,t[35]=g,t[36]=x,t[37]=pt,t[38]=o,t[39]=q,t[40]=Q,t[41]=j,t[42]=_,t[43]=Y,t[44]=R,t[45]=y,t[46]=At,t[47]=lt,t[48]=P,t[49]=m,t[50]=qt,t[51]=a,t[52]=vt,t[53]=J,t[54]=A,t[55]=Lt,t[56]=gt,t[57]=dt,t[58]=N,t[59]=I,t[60]=et,t[61]=xt,t[62]=L,t[63]=mt,t[64]=n,t[65]=H,t[66]=tt,t[67]=B,t[68]=p,t[69]=kt,t[70]=V,t[71]=$t,t[72]=St):St=t[72];let Vt;t[73]!==Dt||t[74]!==St?(Vt=s.jsxRuntimeExports.jsxs(ne.GraphArea,{ref:it,children:[Dt,St]}),t[73]=Dt,t[74]=St,t[75]=Vt):Vt=t[75];let It;t[76]!==l?.footnote||t[77]!==l?.source||t[78]!==st||t[79]!==h||t[80]!==n?.footnote||t[81]!==n?.source||t[82]!==d?(It=h||st?s.jsxRuntimeExports.jsx(ye.GraphFooter,{sources:h,footNote:st,width:d,styles:{footnote:n?.footnote,source:n?.source},classNames:{footnote:l?.footnote,source:l?.source}}):null,t[76]=l?.footnote,t[77]=l?.source,t[78]=st,t[79]=h,t[80]=n?.footnote,t[81]=n?.source,t[82]=d,t[83]=It):It=t[83];let te;return t[84]!==z||t[85]!==X||t[86]!==Ht||t[87]!==Wt||t[88]!==y||t[89]!==ft||t[90]!==Et||t[91]!==v||t[92]!==E||t[93]!==ot||t[94]!==nt||t[95]!==D||t[96]!==Vt||t[97]!==It||t[98]!==p||t[99]!==d?(te=s.jsxRuntimeExports.jsxs(ne.GraphContainer,{className:E,style:ot,id:Ht,ref:bt,"aria-label":z,backgroundColor:X,theme:p,language:y,minHeight:ft,width:d,height:Wt,relativeHeight:v,padding:Et,children:[nt,D,Vt,It]}),t[84]=z,t[85]=X,t[86]=Ht,t[87]=Wt,t[88]=y,t[89]=ft,t[90]=Et,t[91]=v,t[92]=E,t[93]=ot,t[94]=nt,t[95]=D,t[96]=Vt,t[97]=It,t[98]=p,t[99]=d,t[100]=te):te=t[100],te}function Ve(i){return i.color}function Ie(i){return i.color}function Pe(i){return i.color}function ze(i){return i!==void 0}function Ge(i){return i!==void 0}function We(i){return i.data}function Fe(i){return i!==void 0}function He(i){return i.data}exports.WaterfallChart=Se;
|
|
2
2
|
//# sourceMappingURL=WaterfallChart.cjs.map
|
package/dist/WaterfallChart.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { c as re, j as s, m as ae } from "./index-CHPV5EwG-
|
|
1
|
+
import { c as re, j as s, m as ae } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
2
|
import { useRef as oe, useState as bt, useEffect as le } from "react";
|
|
3
3
|
import { i as ce } from "./index-Bwrro8-q.js";
|
|
4
4
|
import { n as ne } from "./numberFormattingFunction-14YCbkN2.js";
|
|
5
|
-
import { T as me } from "./Tooltip-
|
|
5
|
+
import { T as me } from "./Tooltip-CohiIbLZ.js";
|
|
6
6
|
import { c as Gt } from "./checkIfNullOrUndefined-DmfiKkNw.js";
|
|
7
7
|
import { Colors as yt } from "./Colors.js";
|
|
8
|
-
import { A as ue } from "./AxisTitle-
|
|
9
|
-
import { A as fe } from "./Axis-
|
|
10
|
-
import { a as de } from "./ReferenceLine-
|
|
11
|
-
import { Y as he } from "./YTicksAndGridLines-
|
|
12
|
-
import { X as pe } from "./XAxesLabels-
|
|
13
|
-
import { D as ge } from "./DetailsModal-
|
|
8
|
+
import { A as ue } from "./AxisTitle-DGjX1_2v.js";
|
|
9
|
+
import { A as fe } from "./Axis-RyGdzLrG.js";
|
|
10
|
+
import { a as de } from "./ReferenceLine-CNEjAYvv.js";
|
|
11
|
+
import { Y as he } from "./YTicksAndGridLines-C3GW1xFG.js";
|
|
12
|
+
import { X as pe } from "./XAxesLabels-IwjMJkYS.js";
|
|
13
|
+
import { D as ge } from "./DetailsModal-C3qlUyFK.js";
|
|
14
14
|
import { g as Wt } from "./getTextColorBasedOnBgColor-CDY808zi.js";
|
|
15
|
-
import { a as xe } from "./linear-
|
|
15
|
+
import { a as xe } from "./linear-DNXM5Pdl.js";
|
|
16
16
|
import { b as ve } from "./band-DYty33LD.js";
|
|
17
|
-
import { m as ie } from "./proxy
|
|
18
|
-
import { u as be } from "./use-in-view-
|
|
19
|
-
import { A as ye } from "./index-
|
|
17
|
+
import { m as ie } from "./proxy--_f6k3NR.js";
|
|
18
|
+
import { u as be } from "./use-in-view-DqvKAveg.js";
|
|
19
|
+
import { A as ye } from "./index-Co3YGYe1.js";
|
|
20
20
|
import { ColorLegendWithMouseOver as we } from "./ColorLegendWithMouseOver.js";
|
|
21
|
-
import { E as Ae } from "./EmptyState-
|
|
22
|
-
import { a as Me, G as Oe } from "./GraphContainer-
|
|
21
|
+
import { E as Ae } from "./EmptyState-D807L58h.js";
|
|
22
|
+
import { a as Me, G as Oe } from "./GraphContainer-DwMxWRCi.js";
|
|
23
23
|
import { GraphFooter as Ce } from "./GraphFooter.js";
|
|
24
24
|
import { GraphHeader as $e } from "./GraphHeader.js";
|
|
25
25
|
import { u as se } from "./uniqBy-BHy4I8PK.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as R, m as X, j as p } from "./index-CHPV5EwG-
|
|
2
|
-
import { m as $ } from "./proxy
|
|
1
|
+
import { c as R, m as X, j as p } from "./index-CHPV5EwG-BCLAYDCV.js";
|
|
2
|
+
import { m as $ } from "./proxy--_f6k3NR.js";
|
|
3
3
|
function L(V) {
|
|
4
4
|
const t = R.c(35), {
|
|
5
5
|
value: y,
|
|
@@ -60,4 +60,4 @@ function L(V) {
|
|
|
60
60
|
export {
|
|
61
61
|
L as X
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=XAxesLabels-
|
|
63
|
+
//# sourceMappingURL=XAxesLabels-IwjMJkYS.js.map
|