{"version":3,"file":"RadarChart-B_q8tgUz.cjs","names":["curveLinear","line","noop","noop"],"sources":["../node_modules/d3-shape/src/curve/radial.js","../node_modules/d3-shape/src/lineRadial.js","../node_modules/d3-shape/src/noop.js","../node_modules/d3-shape/src/curve/cardinal.js","../node_modules/d3-shape/src/curve/cardinalClosed.js","../node_modules/d3-shape/src/curve/linearClosed.js","../src/Components/Graphs/RadarChart/Graph.tsx","../src/Components/Graphs/RadarChart/index.tsx"],"sourcesContent":["import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n  this._curve = curve;\n}\n\nRadial.prototype = {\n  areaStart: function() {\n    this._curve.areaStart();\n  },\n  areaEnd: function() {\n    this._curve.areaEnd();\n  },\n  lineStart: function() {\n    this._curve.lineStart();\n  },\n  lineEnd: function() {\n    this._curve.lineEnd();\n  },\n  point: function(a, r) {\n    this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n  }\n};\n\nexport default function curveRadial(curve) {\n\n  function radial(context) {\n    return new Radial(curve(context));\n  }\n\n  radial._curve = curve;\n\n  return radial;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n  var c = l.curve;\n\n  l.angle = l.x, delete l.x;\n  l.radius = l.y, delete l.y;\n\n  l.curve = function(_) {\n    return arguments.length ? c(curveRadial(_)) : c()._curve;\n  };\n\n  return l;\n}\n\nexport default function() {\n  return lineRadial(line().curve(curveRadialLinear));\n}\n","export default function() {}\n","export function point(that, x, y) {\n  that._context.bezierCurveTo(\n    that._x1 + that._k * (that._x2 - that._x0),\n    that._y1 + that._k * (that._y2 - that._y0),\n    that._x2 + that._k * (that._x1 - x),\n    that._y2 + that._k * (that._y1 - y),\n    that._x2,\n    that._y2\n  );\n}\n\nexport function Cardinal(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n  areaStart: function() {\n    this._line = 0;\n  },\n  areaEnd: function() {\n    this._line = NaN;\n  },\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 =\n    this._y0 = this._y1 = this._y2 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 2: this._context.lineTo(this._x2, this._y2); break;\n      case 3: point(this, this._x1, this._y1); break;\n    }\n    if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n    this._line = 1 - this._line;\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n      case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n      case 2: this._point = 3; // falls through\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(tension) {\n\n  function cardinal(context) {\n    return new Cardinal(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n  this._context = context;\n  this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n    this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n    this._point = 0;\n  },\n  lineEnd: function() {\n    switch (this._point) {\n      case 1: {\n        this._context.moveTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 2: {\n        this._context.lineTo(this._x3, this._y3);\n        this._context.closePath();\n        break;\n      }\n      case 3: {\n        this.point(this._x3, this._y3);\n        this.point(this._x4, this._y4);\n        this.point(this._x5, this._y5);\n        break;\n      }\n    }\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    switch (this._point) {\n      case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n      case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n      case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n      default: point(this, x, y); break;\n    }\n    this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n    this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n  }\n};\n\nexport default (function custom(tension) {\n\n  function cardinal(context) {\n    return new CardinalClosed(context, tension);\n  }\n\n  cardinal.tension = function(tension) {\n    return custom(+tension);\n  };\n\n  return cardinal;\n})(0);\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n  this._context = context;\n}\n\nLinearClosed.prototype = {\n  areaStart: noop,\n  areaEnd: noop,\n  lineStart: function() {\n    this._point = 0;\n  },\n  lineEnd: function() {\n    if (this._point) this._context.closePath();\n  },\n  point: function(x, y) {\n    x = +x, y = +y;\n    if (this._point) this._context.lineTo(x, y);\n    else this._point = 1, this._context.moveTo(x, y);\n  }\n};\n\nexport default function(context) {\n  return new LinearClosed(context);\n}\n","import { cn } from '@undp/design-system-react/cn';\r\nimport { scaleLinear } from 'd3-scale';\r\nimport { curveCardinalClosed, curveLinearClosed, lineRadial } from 'd3-shape';\r\nimport isEqual from 'fast-deep-equal';\r\nimport { AnimatePresence, motion, useInView } from 'motion/react';\r\nimport { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { DetailsModal } from '@/Components/Elements/DetailsModal';\r\nimport { Tooltip } from '@/Components/Elements/Tooltip';\r\nimport type {\r\n  AnimateDataType,\r\n  ClassNameObject,\r\n  CustomLayerDataType,\r\n  PadZerosTypes,\r\n  RadarChartDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { checkIfNullOrUndefined } from '@/Utils/checkIfNullOrUndefined';\r\nimport { numberFormattingFunction } from '@/Utils/numberFormattingFunction';\r\n\r\ninterface Props {\r\n  radius: number;\r\n  lineColors: string[];\r\n  axisLabels: (string | number)[];\r\n  data: RadarChartDataType[];\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  tooltip?: string | ((_d: any) => React.ReactNode);\r\n  selectedColor?: string;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseClick?: (_d: any) => void;\r\n  colorDomain: string[];\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  strokeWidth: number;\r\n  styles?: StyleObject;\r\n  classNames?: ClassNameObject;\r\n  showValues: boolean;\r\n  showDots: boolean;\r\n  topMargin: number;\r\n  bottomMargin: number;\r\n  leftMargin: number;\r\n  rightMargin: number;\r\n  curveType: 'linear' | 'curve';\r\n  noOfTicks: number;\r\n  maxValue?: number;\r\n  minValue?: number;\r\n  fillShape: boolean;\r\n  resetSelectionOnDoubleClick: boolean;\r\n  highlightedLines?: (string | number)[];\r\n  animate: AnimateDataType;\r\n  dimmedOpacity: number;\r\n  precision: number;\r\n  customLayers: CustomLayerDataType[];\r\n  locale: string;\r\n  padZeros: PadZerosTypes;\r\n}\r\n\r\nexport function Graph(props: Props) {\r\n  const {\r\n    data,\r\n    radius,\r\n    lineColors,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    onSeriesMouseClick,\r\n    colorDomain,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    selectedColor,\r\n    axisLabels,\r\n    strokeWidth,\r\n    showValues,\r\n    showDots,\r\n    rightMargin,\r\n    topMargin,\r\n    bottomMargin,\r\n    leftMargin,\r\n    curveType,\r\n    noOfTicks,\r\n    minValue,\r\n    maxValue,\r\n    resetSelectionOnDoubleClick,\r\n    fillShape,\r\n    highlightedLines,\r\n    animate,\r\n    dimmedOpacity,\r\n    precision,\r\n    customLayers,\r\n    locale,\r\n    padZeros,\r\n  } = props;\r\n  const svgRef = useRef(null);\r\n  const isInView = useInView(svgRef, {\r\n    once: animate.once,\r\n    amount: animate.amount,\r\n  });\r\n  const curve = curveType === 'linear' ? curveLinearClosed : curveCardinalClosed;\r\n  const margin = {\r\n    top: topMargin,\r\n    bottom: bottomMargin,\r\n    left: leftMargin,\r\n    right: rightMargin,\r\n  };\r\n  const radiusWithoutMargin = Math.min(\r\n    (2 * radius - leftMargin - rightMargin) / 2,\r\n    (2 * radius - topMargin - bottomMargin) / 2,\r\n  );\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseOverData, setMouseOverData] = useState<any>(undefined);\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  const [mouseClickData, setMouseClickData] = useState<any>(undefined);\r\n  const [eventX, setEventX] = useState<number | undefined>(undefined);\r\n  const [eventY, setEventY] = useState<number | undefined>(undefined);\r\n  const angleScale = scaleLinear()\r\n    .domain([0, data[0].values.length])\r\n    .range([0, 2 * Math.PI]);\r\n\r\n  const maxVal = !checkIfNullOrUndefined(maxValue)\r\n    ? (maxValue as number)\r\n    : Math.max(\r\n          ...data.map((d) =>\r\n            Math.max(...(d.values.filter((l) => !checkIfNullOrUndefined(l)) as number[])),\r\n          ),\r\n        ) < 0\r\n      ? 0\r\n      : Math.max(\r\n          ...data.map((d) =>\r\n            Math.max(...(d.values.filter((l) => !checkIfNullOrUndefined(l)) as number[])),\r\n          ),\r\n        );\r\n\r\n  const minVal = !checkIfNullOrUndefined(minValue)\r\n    ? (minValue as number)\r\n    : Math.min(\r\n          ...data.map((d) =>\r\n            Math.min(...(d.values.filter((l) => !checkIfNullOrUndefined(l)) as number[])),\r\n          ),\r\n        ) >= 0\r\n      ? 0\r\n      : Math.min(\r\n          ...data.map((d) =>\r\n            Math.min(...(d.values.filter((l) => !checkIfNullOrUndefined(l)) as number[])),\r\n          ),\r\n        );\r\n  const scale = scaleLinear().domain([minVal, maxVal]).range([0, radiusWithoutMargin]).nice();\r\n  const ticksArray = scale.ticks(noOfTicks);\r\n  const lineShape = lineRadial<number>()\r\n    .radius((d) => scale(d))\r\n    .angle((_, i) => angleScale(i))\r\n    .curve(curve);\r\n  return (\r\n    <>\r\n      <motion.svg\r\n        width={`${radius * 2}px`}\r\n        height={`${radius * 2}px`}\r\n        viewBox={`0 0 ${radius * 2} ${radius * 2}`}\r\n        direction='ltr'\r\n        ref={svgRef}\r\n        className='mx-auto'\r\n      >\r\n        <g transform={`translate(${margin.left},${margin.top})`}>\r\n          {customLayers.filter((d) => d.position === 'before').map((d) => d.layer)}\r\n          <g transform={`translate(${radiusWithoutMargin},${radiusWithoutMargin})`}>\r\n            {axisLabels.map((d, i) => (\r\n              // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n              <g key={i}>\r\n                <line\r\n                  x1={0}\r\n                  y1={0}\r\n                  x2={Math.cos(angleScale(i) - Math.PI / 2) * radiusWithoutMargin}\r\n                  y2={Math.sin(angleScale(i) - Math.PI / 2) * radiusWithoutMargin}\r\n                  className={cn('stroke-1 stroke-stroke-lg', classNames?.xAxis?.axis)}\r\n                  style={styles?.xAxis?.axis}\r\n                />\r\n                <text\r\n                  x={Math.cos(angleScale(i) - Math.PI / 2) * (radiusWithoutMargin + 6)}\r\n                  y={Math.sin(angleScale(i) - Math.PI / 2) * (radiusWithoutMargin + 6)}\r\n                  style={{\r\n                    textAnchor:\r\n                      Math.cos(angleScale(i) - Math.PI / 2) < 0\r\n                        ? 'end'\r\n                        : Math.cos(angleScale(i) - Math.PI / 2) < 0.00001\r\n                          ? 'middle'\r\n                          : 'start',\r\n                    ...(styles?.xAxis?.labels || ''),\r\n                  }}\r\n                  dy={\r\n                    Math.sin(angleScale(i) - Math.PI / 2) < 0\r\n                      ? 0\r\n                      : Math.sin(angleScale(i) - Math.PI / 2) < 0.00001\r\n                        ? 5\r\n                        : 10\r\n                  }\r\n                  className={cn('fill-content-primary text-xs', classNames?.xAxis?.labels)}\r\n                >\r\n                  {d}\r\n                </text>\r\n              </g>\r\n            ))}\r\n            {ticksArray.map((d, i) => (\r\n              // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n              <g key={i}>\r\n                <path\r\n                  d={lineShape(Array(axisLabels.length).fill(d)) || ''}\r\n                  className={cn('stroke-stroke-lg', classNames?.xAxis?.gridLines)}\r\n                  style={{\r\n                    ...styles?.xAxis?.gridLines,\r\n                    fill: 'none',\r\n                  }}\r\n                />\r\n                <foreignObject\r\n                  x={-25}\r\n                  y={\r\n                    Math.sin(-Math.PI / 2) * scale(d) > -0.0001\r\n                      ? Math.sin(-Math.PI / 2) * scale(d) - 7\r\n                      : Math.sin(-Math.PI / 2) * scale(d) - 5\r\n                  }\r\n                  width={50}\r\n                  height={12}\r\n                >\r\n                  <div className='flex justify-center'>\r\n                    <p\r\n                      className={cn(\r\n                        'fill-content-secondary text-xs m-0 py-0 px-1.5 text-center leading-xs bg-background',\r\n                        classNames?.xAxis?.labels,\r\n                      )}\r\n                      style={styles?.xAxis?.labels}\r\n                    >\r\n                      {numberFormattingFunction(\r\n                        d,\r\n                        undefined,\r\n                        precision,\r\n                        undefined,\r\n                        undefined,\r\n                        locale,\r\n                        padZeros,\r\n                      )}\r\n                    </p>\r\n                  </div>\r\n                </foreignObject>\r\n              </g>\r\n            ))}\r\n            <AnimatePresence>\r\n              {data.map((d, i) => (\r\n                <motion.g\r\n                  key={d.label || i}\r\n                  variants={{\r\n                    initial: {\r\n                      opacity: mouseOverData\r\n                        ? d.label === mouseOverData.label\r\n                          ? 1\r\n                          : dimmedOpacity\r\n                        : selectedColor\r\n                          ? d.color\r\n                            ? lineColors[colorDomain.indexOf(d.color)] === selectedColor\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : dimmedOpacity\r\n                          : highlightedLines\r\n                            ? d.label\r\n                              ? highlightedLines.indexOf(d.label) !== -1\r\n                                ? 1\r\n                                : 0.3\r\n                              : 0.3\r\n                            : 1,\r\n                    },\r\n                    whileInView: {\r\n                      opacity: mouseOverData\r\n                        ? d.label === mouseOverData.label\r\n                          ? 1\r\n                          : dimmedOpacity\r\n                        : selectedColor\r\n                          ? d.color\r\n                            ? lineColors[colorDomain.indexOf(d.color)] === selectedColor\r\n                              ? 1\r\n                              : dimmedOpacity\r\n                            : dimmedOpacity\r\n                          : highlightedLines\r\n                            ? d.label\r\n                              ? highlightedLines.indexOf(d.label) !== -1\r\n                                ? 1\r\n                                : dimmedOpacity\r\n                              : dimmedOpacity\r\n                            : 1,\r\n                      transition: { duration: animate.duration },\r\n                    },\r\n                  }}\r\n                  initial='initial'\r\n                  animate={isInView ? 'whileInView' : 'initial'}\r\n                  exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                  onMouseEnter={(event) => {\r\n                    setMouseOverData(d);\r\n                    setEventY(event.clientY);\r\n                    setEventX(event.clientX);\r\n                    onSeriesMouseOver?.(d);\r\n                  }}\r\n                  onMouseMove={(event) => {\r\n                    setMouseOverData(d);\r\n                    setEventY(event.clientY);\r\n                    setEventX(event.clientX);\r\n                  }}\r\n                  onMouseLeave={() => {\r\n                    setMouseOverData(undefined);\r\n                    setEventX(undefined);\r\n                    setEventY(undefined);\r\n                    onSeriesMouseOver?.(undefined);\r\n                  }}\r\n                  onClick={() => {\r\n                    if (onSeriesMouseClick || detailsOnClick) {\r\n                      if (isEqual(mouseClickData, d) && resetSelectionOnDoubleClick) {\r\n                        setMouseClickData(undefined);\r\n                        onSeriesMouseClick?.(undefined);\r\n                      } else {\r\n                        setMouseClickData(d);\r\n                        onSeriesMouseClick?.(d);\r\n                      }\r\n                    }\r\n                  }}\r\n                >\r\n                  <motion.path\r\n                    d={lineShape(d.values) || ''}\r\n                    variants={{\r\n                      initial: {\r\n                        d: lineShape(d.values.map((_el) => 0)) || '',\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d.color)],\r\n                        fill: fillShape\r\n                          ? data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d.color)]\r\n                          : 'none',\r\n                        strokeWidth,\r\n                      },\r\n                      whileInView: {\r\n                        d: lineShape(d.values) || '',\r\n                        transition: { duration: animate.duration },\r\n                        stroke:\r\n                          data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d.color)],\r\n                        fill: fillShape\r\n                          ? data.filter((el) => el.color).length === 0\r\n                            ? lineColors[0]\r\n                            : !d.color\r\n                              ? Colors.gray\r\n                              : lineColors[colorDomain.indexOf(d.color)]\r\n                          : 'none',\r\n                        strokeWidth,\r\n                      },\r\n                    }}\r\n                    initial='initial'\r\n                    animate={isInView ? 'whileInView' : 'initial'}\r\n                    exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                    style={{\r\n                      fillOpacity: 0.1,\r\n                    }}\r\n                  />\r\n                  <g>\r\n                    {d.values.map((el, j) => (\r\n                      // biome-ignore lint/suspicious/noArrayIndexKey: index is the unique identifier\r\n                      <g key={j}>\r\n                        {!checkIfNullOrUndefined(el) ? (\r\n                          <>\r\n                            {showDots ? (\r\n                              <motion.circle\r\n                                r={4}\r\n                                variants={{\r\n                                  initial: {\r\n                                    cx: 0,\r\n                                    cy: 0,\r\n                                    opacity: 0,\r\n                                    fill:\r\n                                      data.filter((el) => el.color).length === 0\r\n                                        ? lineColors[0]\r\n                                        : !d.color\r\n                                          ? Colors.gray\r\n                                          : lineColors[colorDomain.indexOf(d.color)],\r\n                                  },\r\n                                  whileInView: {\r\n                                    cx: Math.cos(angleScale(j) - Math.PI / 2) * scale(el),\r\n                                    cy: Math.sin(angleScale(j) - Math.PI / 2) * scale(el),\r\n                                    opacity: 1,\r\n                                    transition: { duration: animate.duration },\r\n                                    fill:\r\n                                      data.filter((el) => el.color).length === 0\r\n                                        ? lineColors[0]\r\n                                        : !d.color\r\n                                          ? Colors.gray\r\n                                          : lineColors[colorDomain.indexOf(d.color)],\r\n                                  },\r\n                                }}\r\n                                initial='initial'\r\n                                animate={isInView ? 'whileInView' : 'initial'}\r\n                                exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                              />\r\n                            ) : null}\r\n                            {showValues ? (\r\n                              <motion.text\r\n                                style={{\r\n                                  ...(styles?.graphObjectValues || {}),\r\n                                }}\r\n                                dy={\r\n                                  Math.sin(angleScale(j) - Math.PI / 2) < 0\r\n                                    ? 10\r\n                                    : Math.sin(angleScale(j) - Math.PI / 2) < 0.00001\r\n                                      ? 0\r\n                                      : 0\r\n                                }\r\n                                className={cn(\r\n                                  'graph-value text-xs font-bold',\r\n                                  classNames?.graphObjectValues,\r\n                                )}\r\n                                variants={{\r\n                                  initial: {\r\n                                    opacity: 0,\r\n                                    x: Math.cos(angleScale(j) - Math.PI / 2) * (scale(el) + 6),\r\n                                    y: Math.sin(angleScale(j) - Math.PI / 2) * (scale(el) + 6),\r\n                                    fill: lineColors[i],\r\n                                    textAnchor:\r\n                                      Math.cos(angleScale(j) - Math.PI / 2) < 0\r\n                                        ? 'end'\r\n                                        : Math.cos(angleScale(j) - Math.PI / 2) < 0.00001\r\n                                          ? 'middle'\r\n                                          : 'start',\r\n                                  },\r\n                                  whileInView: {\r\n                                    opacity: 1,\r\n                                    x: Math.cos(angleScale(j) - Math.PI / 2) * (scale(el) + 6),\r\n                                    y: Math.sin(angleScale(j) - Math.PI / 2) * (scale(el) + 6),\r\n                                    fill: lineColors[i],\r\n                                    textAnchor:\r\n                                      Math.cos(angleScale(j) - Math.PI / 2) < 0\r\n                                        ? 'end'\r\n                                        : Math.cos(angleScale(j) - Math.PI / 2) < 0.00001\r\n                                          ? 'middle'\r\n                                          : 'start',\r\n                                    transition: { duration: animate.duration },\r\n                                  },\r\n                                }}\r\n                                initial='initial'\r\n                                animate={isInView ? 'whileInView' : 'initial'}\r\n                                exit={{ opacity: 0, transition: { duration: animate.duration } }}\r\n                              >\r\n                                {numberFormattingFunction(\r\n                                  el,\r\n                                  undefined,\r\n                                  precision,\r\n                                  undefined,\r\n                                  undefined,\r\n                                  locale,\r\n                                  padZeros,\r\n                                )}\r\n                              </motion.text>\r\n                            ) : null}\r\n                          </>\r\n                        ) : null}\r\n                      </g>\r\n                    ))}\r\n                  </g>\r\n                </motion.g>\r\n              ))}\r\n            </AnimatePresence>\r\n          </g>\r\n          {customLayers.filter((d) => d.position === 'after').map((d) => d.layer)}\r\n        </g>\r\n      </motion.svg>\r\n      {mouseOverData && tooltip && eventX && eventY ? (\r\n        <Tooltip\r\n          data={mouseOverData}\r\n          body={tooltip}\r\n          xPos={eventX}\r\n          yPos={eventY}\r\n          backgroundStyle={styles?.tooltip}\r\n          className={classNames?.tooltip}\r\n        />\r\n      ) : null}\r\n      {detailsOnClick && mouseClickData !== undefined ? (\r\n        <DetailsModal\r\n          body={detailsOnClick}\r\n          data={mouseClickData}\r\n          setData={setMouseClickData}\r\n          className={classNames?.modal}\r\n        />\r\n      ) : null}\r\n    </>\r\n  );\r\n}\r\n","import { useRef, useState } from 'react';\r\nimport { Colors } from '@/Components/ColorPalette';\r\nimport { ColorLegendWithMouseOver } from '@/Components/Elements/ColorLegendWithMouseOver';\r\nimport { EmptyState } from '@/Components/Elements/EmptyState';\r\nimport { GraphArea, GraphContainer } from '@/Components/Elements/GraphContainer';\r\nimport { GraphFooter } from '@/Components/Elements/GraphFooter';\r\nimport { GraphHeader } from '@/Components/Elements/GraphHeader';\r\nimport { useElementSize } from '@/hooks/useElementSize';\r\nimport type {\r\n  AnimateDataType,\r\n  ClassNameObject,\r\n  CustomLayerDataType,\r\n  Languages,\r\n  NumberFormatOptions,\r\n  RadarChartDataType,\r\n  SourcesDataType,\r\n  StyleObject,\r\n} from '@/Types';\r\nimport { uniqBy } from '@/Utils/uniqBy';\r\nimport { Graph } from './Graph';\r\n\r\ninterface Props {\r\n  // Data\r\n  /** Array of data objects */\r\n  data: RadarChartDataType[];\r\n\r\n  // Titles, Labels, and Sources\r\n  /** Title of the graph */\r\n  graphTitle?: string | React.ReactNode;\r\n  /** Description of the graph */\r\n  graphDescription?: string | React.ReactNode;\r\n  /** Footnote for the graph */\r\n  footNote?: string | React.ReactNode;\r\n  /** Source data for the graph */\r\n  sources?: SourcesDataType[];\r\n  /** Accessibility label */\r\n  ariaLabel?: string;\r\n\r\n  // Colors and Styling\r\n  /** Color or array of colors for each line */\r\n  colors?: string | string[];\r\n  /** Domain of colors for the graph */\r\n  colorDomain?: string[];\r\n  /** Title for the color legend */\r\n  colorLegendTitle?: string;\r\n  /** Background color of the graph */\r\n  backgroundColor?: string | boolean;\r\n  /** Custom styles for the graph. Each object should be a valid React CSS style object. */\r\n  styles?: StyleObject;\r\n  /** Custom class names */\r\n  classNames?: ClassNameObject;\r\n\r\n  // Size and Spacing\r\n  /** Width of the graph */\r\n  width?: number;\r\n  /** Height of the graph */\r\n  height?: number;\r\n  /** Minimum height of the graph */\r\n  minHeight?: number;\r\n  /** Relative height scaling factor. This overwrites the height props */\r\n  relativeHeight?: number;\r\n  /** Padding around the graph. Defaults to 0 if no backgroundColor is mentioned else defaults to 1rem */\r\n  padding?: string;\r\n  /** Radius of the radar chart */\r\n  radius?: number;\r\n  /** Left margin of the graph */\r\n  leftMargin?: number;\r\n  /** Right margin of the graph */\r\n  rightMargin?: number;\r\n  /** Top margin of the graph */\r\n  topMargin?: number;\r\n  /** Bottom margin of the graph */\r\n  bottomMargin?: number;\r\n\r\n  // Values and Ticks\r\n  /** Maximum value for the chart */\r\n  maxValue?: number;\r\n  /** Minimum value for the chart */\r\n  minValue?: number;\r\n\r\n  // Graph Parameters\r\n  /** Toggle visibility of values */\r\n  showValues?: boolean;\r\n  /** Toggle visibility of dots on the line */\r\n  showDots?: boolean;\r\n  /** Stroke width of the line */\r\n  strokeWidth?: number;\r\n  /** Toggle is the shape is filled or not */\r\n  fillShape?: boolean;\r\n  /** No. of ticks on the x-axis  */\r\n  noOfTicks?: number;\r\n  /** Toggle visibility of color scale. This is only applicable if the data props hae color parameter */\r\n  showColorScale?: boolean;\r\n  /** Toggle visibility of NA color in the color scale. This is only applicable if the data props hae color parameter and showColorScale prop is true */\r\n  showNAColor?: boolean;\r\n  /** Data points to highlight. Use the label value from data to highlight the data point */\r\n  highlightedLines?: (string | number)[];\r\n  /** Defines the opacity of the non-highlighted data */\r\n  dimmedOpacity?: number;\r\n  /** Toggles if the graph animates in when loaded.  */\r\n  animate?: boolean | AnimateDataType;\r\n  /** Labels for the axes  */\r\n  axisLabels: (string | number)[];\r\n  /** Curve type for the line */\r\n  curveType?: 'linear' | 'curve';\r\n  /** Reset selection on double-click. Only applicable when used in a dashboard context with filters. */\r\n  resetSelectionOnDoubleClick?: boolean;\r\n  /** Configuration options for controlling number formatting, localization, precision, and zero padding. */\r\n  numberDisplayOptions?: Omit<NumberFormatOptions, 'suffix' | 'prefix'>;\r\n  /** Optional SVG <g> element or function that renders custom content behind or in front of the graph. */\r\n  customLayers?: CustomLayerDataType[];\r\n  /** Enable graph download option as png */\r\n  graphDownload?: boolean;\r\n  /** Enable data download option as a csv */\r\n  dataDownload?: boolean;\r\n\r\n  // Interactions and Callbacks\r\n  /** Tooltip content. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  tooltip?: string | ((_d: any) => React.ReactNode);\r\n  /** Details displayed on the modal when user clicks of a data point. If the type is string then this uses the [handlebar](../?path=/docs/misc-handlebars-templates-and-custom-helpers--docs) template to display the data */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  detailsOnClick?: string | ((_d: any) => React.ReactNode);\r\n  /** Callback for mouse over event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseOver?: (_d: any) => void;\r\n  /** Callback for mouse click event */\r\n  // biome-ignore lint/suspicious/noExplicitAny: undefined data type\r\n  onSeriesMouseClick?: (_d: any) => void;\r\n\r\n  // Configuration and Options\r\n  /** Language setting  */\r\n  language?: Languages;\r\n  /** Color theme */\r\n  theme?: 'light' | 'dark';\r\n  /** Unique ID for the graph */\r\n  graphID?: string;\r\n}\r\n\r\nexport function RadarChart(props: Props) {\r\n  const {\r\n    graphTitle,\r\n    colors,\r\n    sources,\r\n    graphDescription,\r\n    footNote,\r\n    radius,\r\n    data,\r\n    showColorScale = true,\r\n    padding,\r\n    backgroundColor = false,\r\n    tooltip,\r\n    onSeriesMouseOver,\r\n    graphID,\r\n    onSeriesMouseClick,\r\n    topMargin = 75,\r\n    bottomMargin = 75,\r\n    leftMargin = 75,\r\n    rightMargin = 75,\r\n    graphDownload = false,\r\n    dataDownload = false,\r\n    colorDomain,\r\n    language = 'en',\r\n    theme = 'light',\r\n    highlightedLines,\r\n    width,\r\n    height,\r\n    minHeight = 0,\r\n    strokeWidth = 2,\r\n    relativeHeight,\r\n    ariaLabel,\r\n    colorLegendTitle,\r\n    detailsOnClick,\r\n    styles,\r\n    classNames,\r\n    showNAColor = true,\r\n    axisLabels,\r\n    showDots = true,\r\n    showValues = false,\r\n    curveType = 'curve',\r\n    noOfTicks = 5,\r\n    minValue,\r\n    maxValue,\r\n    fillShape = false,\r\n    resetSelectionOnDoubleClick = true,\r\n    animate = false,\r\n    dimmedOpacity = 0.3,\r\n    customLayers = [],\r\n    numberDisplayOptions,\r\n  } = props;\r\n  const { graphDiv, graphRadius } = useElementSize<HTMLDivElement>();\r\n  const graphParentDiv = useRef<HTMLDivElement>(null);\r\n  const [selectedColor, setSelectedColor] = useState<string | undefined>(undefined);\r\n  return (\r\n    <GraphContainer\r\n      className={classNames?.graphContainer}\r\n      style={styles?.graphContainer}\r\n      id={graphID}\r\n      ref={graphParentDiv}\r\n      aria-label={ariaLabel}\r\n      backgroundColor={backgroundColor}\r\n      theme={theme}\r\n      language={language}\r\n      minHeight={minHeight}\r\n      width={width}\r\n      height={height}\r\n      relativeHeight={relativeHeight}\r\n      padding={padding}\r\n    >\r\n      {graphTitle || graphDescription || graphDownload || dataDownload ? (\r\n        <GraphHeader\r\n          styles={{\r\n            title: styles?.title,\r\n            description: styles?.description,\r\n          }}\r\n          classNames={{\r\n            title: classNames?.title,\r\n            description: classNames?.description,\r\n          }}\r\n          graphTitle={graphTitle}\r\n          graphDescription={graphDescription}\r\n          width={width}\r\n          graphDownload={graphDownload ? graphParentDiv : undefined}\r\n          dataDownload={\r\n            dataDownload\r\n              ? data.map((d) => d.data).filter((d) => d !== undefined).length > 0\r\n                ? data.map((d) => d.data).filter((d) => d !== undefined)\r\n                : data.filter((d) => d !== undefined)\r\n              : null\r\n          }\r\n        />\r\n      ) : null}\r\n      {showColorScale && data.filter((el) => el.color).length !== 0 && data.length > 0 ? (\r\n        <ColorLegendWithMouseOver\r\n          width={width}\r\n          colorLegendTitle={colorLegendTitle}\r\n          colors={(colors as string[] | undefined) || Colors[theme].categoricalColors.colors}\r\n          colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n          setSelectedColor={setSelectedColor}\r\n          showNAColor={showNAColor}\r\n          className={classNames?.colorLegend}\r\n          isCenter\r\n        />\r\n      ) : null}\r\n      <GraphArea ref={graphDiv}>\r\n        {data.length === 0 && <EmptyState />}\r\n        {graphRadius && data.length > 0 ? (\r\n          <Graph\r\n            data={data}\r\n            lineColors={\r\n              data.filter((el) => el.color).length === 0\r\n                ? colors\r\n                  ? [colors as string]\r\n                  : [Colors.primaryColors['blue-600']]\r\n                : (colors as string[] | undefined) || Colors[theme].categoricalColors.colors\r\n            }\r\n            radius={Math.min(graphRadius, radius ?? Infinity)}\r\n            tooltip={tooltip}\r\n            colorDomain={colorDomain || (uniqBy(data, 'color', true) as string[])}\r\n            onSeriesMouseOver={onSeriesMouseOver}\r\n            onSeriesMouseClick={onSeriesMouseClick}\r\n            styles={styles}\r\n            detailsOnClick={detailsOnClick}\r\n            selectedColor={selectedColor}\r\n            axisLabels={axisLabels}\r\n            strokeWidth={strokeWidth}\r\n            showValues={showValues}\r\n            showDots={showDots}\r\n            topMargin={topMargin}\r\n            bottomMargin={bottomMargin}\r\n            leftMargin={leftMargin}\r\n            rightMargin={rightMargin}\r\n            curveType={curveType}\r\n            noOfTicks={noOfTicks}\r\n            minValue={minValue}\r\n            maxValue={maxValue}\r\n            fillShape={fillShape}\r\n            highlightedLines={highlightedLines}\r\n            resetSelectionOnDoubleClick={resetSelectionOnDoubleClick}\r\n            animate={\r\n              animate === true\r\n                ? { duration: 0.5, once: true, amount: 0.5 }\r\n                : animate || { duration: 0, once: true, amount: 0 }\r\n            }\r\n            dimmedOpacity={dimmedOpacity}\r\n            precision={numberDisplayOptions?.precision ?? 2}\r\n            customLayers={customLayers}\r\n            locale={numberDisplayOptions?.locale || 'en'}\r\n            padZeros={numberDisplayOptions?.padZeros || 'none'}\r\n          />\r\n        ) : null}\r\n      </GraphArea>\r\n      {sources || footNote ? (\r\n        <GraphFooter\r\n          styles={{ footnote: styles?.footnote, source: styles?.source }}\r\n          classNames={{\r\n            footnote: classNames?.footnote,\r\n            source: classNames?.source,\r\n          }}\r\n          sources={sources}\r\n          footNote={footNote}\r\n          width={width}\r\n        />\r\n      ) : null}\r\n    </GraphContainer>\r\n  );\r\n}\r\n"],"x_google_ignoreList":[0,1,2,3,4,5],"mappings":"+xBAEA,IAAW,EAAoB,EAAYA,EAAAA,CAAW,EAEtD,SAAS,EAAO,EAAO,CACrB,KAAK,OAAS,CAChB,CAEA,EAAO,UAAY,CACjB,UAAW,UAAW,CACpB,KAAK,OAAO,UAAU,CACxB,EACA,QAAS,UAAW,CAClB,KAAK,OAAO,QAAQ,CACtB,EACA,UAAW,UAAW,CACpB,KAAK,OAAO,UAAU,CACxB,EACA,QAAS,UAAW,CAClB,KAAK,OAAO,QAAQ,CACtB,EACA,MAAO,SAAS,EAAG,EAAG,CACpB,KAAK,OAAO,MAAM,EAAI,KAAK,IAAI,CAAC,EAAG,EAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CACrD,CACF,EA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