{"version":3,"sources":["jsdelivr-header.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/node_modules/svg-partial-circle/index.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/src/utils.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/src/ReactMinimalPieChartPath.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/src/propTypes.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/src/ReactMinimalPieChartLabel.js","/npm/@manosim/react-minimal-pie-chart@3.5.2/src/ReactMinimalPieChart.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,ysBCcA,MAjBsB,CAAC,EAAI,EAAI,EAAG,EAAO,K,MAClC,EAAS,EAAM,E,GACN,IAAX,EAAc,MAAO,G,MAEnB,EAAQ,EAAI,KAAK,IAAI,GAAS,EAC9B,EAAQ,EAAI,KAAK,IAAI,GAAS,EAC9B,EAAM,EAAI,KAAK,IAAI,GAAO,EAC1B,EAAM,EAAI,KAAK,IAAI,GAAO,E,MAIzB,CACN,CAAC,IAAK,EAAO,GACb,CAAC,IAAK,EAAG,EAAG,EALC,KAAK,IAAI,IAAW,KAAK,GAAK,IAAM,IACpC,EAAS,EAAI,IAAM,IAIH,EAAK,GAFnC,ECdK,EAAK,KAAK,GAET,SAAS,EAAiB,GAC/B,OAAQ,EAAU,EAAM,GACzB,CAWM,SAAS,EAAT,GAIC,IAAA,OAAA,IAAA,EAAJ,GAAI,EAHN,EAGM,EAHN,cACA,EAEM,EAFN,UACA,EACM,EADN,qBAGA,OAA6B,IAAzB,EACK,SAGL,EAAgB,IACX,EAAuB,EAAI,QAAU,MAI1C,EADgB,IAAM,EAEjB,EAAuB,EAAI,MAAQ,QAGrC,QACR,CAEM,SAAS,EAAa,EAAO,EAAK,GACvC,OAAI,EAAQ,EAAY,EACpB,EAAQ,EAAY,EACjB,CACR,CAEM,SAAS,EAAkB,EAAO,GACvC,OAAQ,EAAQ,EAAc,GAC/B,CC1Bc,SAAS,EAAT,GAU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rB,OAAQ,EAAU,OAClB,QAAS,EAAU,KACnB,QAAS,EAAU,KACnB,kBAAmB,EAAU,OAC7B,gBAAiB,EAAU,OAC3B,OAAQ,EAAU,OAClB,SAAU,EAAU,KACpB,UAAW,EAAU,KACrB,MAAO,EAAU,UAAU,CACzB,EAAU,KACV,EAAU,QACV,EAAU,OAEZ,cAAe,EAAU,OACzB,WAAY,EACZ,YAAa,EAAU,KACvB,WAAY,EAAU,KACtB,QAAS,EAAU,MAGrB,EAAqB,aAAe,CAClC,GAzPwB,GA0PxB,GA1PwB,GA2PxB,MAAO,EACP,WAAY,EACZ,YAAa,IACb,aAAc,EACd,UAAW,IACX,OAhQwB,GAiQxB,SAAS,EACT,SAAS,EACT,kBAAmB,IACnB,gBAAiB,WACjB,OAAO,EACP,cAAe,GACf,iBAAa,EACb,gBAAY,EACZ,aAAS,G","file":"/npm/@manosim/react-minimal-pie-chart@3.5.2/dist/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/@manosim/react-minimal-pie-chart@3.5.2/dist/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","'use strict'\n\n// from http://stackoverflow.com/a/18473154\nconst partialCircle = (cx, cy, r, start, end) => {\n\tconst length = end - start\n\tif (length === 0) return []\n\n\tconst fromX = r * Math.cos(start) + cx\n\tconst fromY = r * Math.sin(start) + cy\n\tconst toX = r * Math.cos(end) + cx\n\tconst toY = r * Math.sin(end) + cy\n\tconst large = Math.abs(length) <= Math.PI ? '0' : '1'\n\tconst sweep = length < 0 ? '0' : '1'\n\n\treturn [\n\t\t['M', fromX, fromY],\n\t\t['A', r, r, 0, large, sweep, toX, toY]\n\t]\n}\n\nmodule.exports = partialCircle\n","const PI = Math.PI;\n\nexport function degreesToRadians(degrees) {\n  return (degrees * PI) / 180;\n}\n\nexport function evaluateViewBoxSize(ratio, baseSize) {\n  // Wide ratio\n  if (ratio > 1) {\n    return `0 0 ${baseSize} ${baseSize / ratio}`;\n  }\n  // Narrow/squared ratio\n  return `0 0 ${baseSize * ratio} ${baseSize}`;\n}\n\nexport function evaluateLabelTextAnchor({\n  labelPosition,\n  lineWidth,\n  labelHorizontalShift,\n} = {}) {\n  // Label in the vertical center\n  if (labelHorizontalShift === 0) {\n    return 'middle';\n  }\n  // Outward label\n  if (labelPosition > 100) {\n    return labelHorizontalShift > 0 ? 'start' : 'end';\n  }\n  // Inward label\n  const innerRadius = 100 - lineWidth;\n  if (labelPosition < innerRadius) {\n    return labelHorizontalShift > 0 ? 'end' : 'start';\n  }\n  // Overlying label\n  return 'middle';\n}\n\nexport function valueBetween(value, min, max) {\n  if (value > max) return max;\n  if (value < min) return min;\n  return value;\n}\n\nexport function extractPercentage(value, percentage) {\n  return (value * percentage) / 100;\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport partialCircle from 'svg-partial-circle';\nimport { degreesToRadians, extractPercentage, valueBetween } from './utils';\n\nfunction makePathCommands(cx, cy, startAngle, lengthAngle, radius) {\n  const patchedLengthAngle = valueBetween(lengthAngle, -359.999, 359.999);\n\n  return partialCircle(\n    cx,\n    cy, // center X and Y\n    radius,\n    degreesToRadians(startAngle),\n    degreesToRadians(startAngle + patchedLengthAngle)\n  )\n    .map(command => command.join(' '))\n    .join(' ');\n}\n\nexport default function ReactMinimalPieChartPath({\n  cx,\n  cy,\n  startAngle,\n  lengthAngle,\n  radius,\n  lineWidth,\n  reveal,\n  title,\n  ...props\n}) {\n  const actualRadio = radius - lineWidth / 2;\n  const pathCommands = makePathCommands(\n    cx,\n    cy,\n    startAngle,\n    lengthAngle,\n    actualRadio\n  );\n  let strokeDasharray;\n  let strokeDashoffset;\n\n  // Animate/hide paths with \"stroke-dasharray\" + \"stroke-dashoffset\"\n  // https://css-tricks.com/svg-line-animation-works/\n  if (typeof reveal === 'number') {\n    strokeDasharray = degreesToRadians(actualRadio) * Math.abs(lengthAngle);\n    strokeDashoffset =\n      strokeDasharray + extractPercentage(strokeDasharray, reveal);\n  }\n\n  return (\n    <path\n      d={pathCommands}\n      strokeWidth={lineWidth}\n      strokeDasharray={strokeDasharray}\n      strokeDashoffset={strokeDashoffset}\n      {...props}\n    >\n      {title && <title>{title}</title>}\n    </path>\n  );\n}\n\nReactMinimalPieChartPath.displayName = 'ReactMinimalPieChartPath';\n\nReactMinimalPieChartPath.propTypes = {\n  cx: PropTypes.number.isRequired,\n  cy: PropTypes.number.isRequired,\n  startAngle: PropTypes.number,\n  lengthAngle: PropTypes.number,\n  radius: PropTypes.number,\n  lineWidth: PropTypes.number,\n  reveal: PropTypes.number,\n  title: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n};\n\nReactMinimalPieChartPath.defaultProps = {\n  startAngle: 0,\n  lengthAngle: 0,\n  lineWidth: 100,\n  radius: 100,\n};\n","import PropTypes from 'prop-types';\n\nexport const dataPropType = PropTypes.arrayOf(\n  PropTypes.shape({\n    title: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n    value: PropTypes.number.isRequired,\n    key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n    color: PropTypes.string,\n  })\n);\n\nexport const stylePropType = PropTypes.objectOf(\n  PropTypes.oneOfType([PropTypes.number, PropTypes.string])\n);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { dataPropType } from './propTypes';\n\nexport default function ReactMinimalPieChartLabel({\n  data, // eslint-disable-line no-unused-vars\n  dataIndex, // eslint-disable-line no-unused-vars\n  color,\n  ...props\n}) {\n  return (\n    <text\n      textAnchor=\"middle\"\n      alignmentBaseline=\"middle\"\n      fill={color}\n      {...props}\n    />\n  );\n}\n\nReactMinimalPieChartLabel.displayName = 'ReactMinimalPieChartLabel';\n\nReactMinimalPieChartLabel.propTypes = {\n  data: dataPropType,\n  dataIndex: PropTypes.number,\n  color: PropTypes.string,\n};\n","import React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport Path from './ReactMinimalPieChartPath';\nimport DefaultLabel from './ReactMinimalPieChartLabel';\nimport { dataPropType, stylePropType } from './propTypes';\nimport {\n  degreesToRadians,\n  evaluateViewBoxSize,\n  evaluateLabelTextAnchor,\n  extractPercentage,\n  valueBetween,\n} from './utils';\n\nconst VIEWBOX_SIZE = 100;\nconst VIEWBOX_HALF_SIZE = VIEWBOX_SIZE / 2;\n\nfunction sumValues(data) {\n  return data.reduce((acc, dataEntry) => acc + dataEntry.value, 0);\n}\n\n// Append \"percentage\", \"degrees\" and \"startOffset\" into each data entry\nfunction extendData({\n  data,\n  lengthAngle: totalAngle,\n  totalValue,\n  paddingAngle,\n}) {\n  const total = totalValue || sumValues(data);\n  const normalizedTotalAngle = valueBetween(totalAngle, -360, 360);\n  const numberOfPaddings =\n    Math.abs(normalizedTotalAngle) === 360 ? data.length : data.length - 1;\n  const degreesTakenByPadding =\n    Math.abs(paddingAngle) * numberOfPaddings * Math.sign(normalizedTotalAngle);\n  const singlePaddingDegrees = degreesTakenByPadding / numberOfPaddings;\n  const degreesTakenByPaths = normalizedTotalAngle - degreesTakenByPadding;\n  let lastSegmentEnd = 0;\n\n  return data.map(dataEntry => {\n    const valueInPercentage = (dataEntry.value / total) * 100;\n    const degrees = extractPercentage(degreesTakenByPaths, valueInPercentage);\n    const startOffset = lastSegmentEnd;\n    lastSegmentEnd = lastSegmentEnd + degrees + singlePaddingDegrees;\n\n    return {\n      percentage: valueInPercentage,\n      degrees,\n      startOffset,\n      ...dataEntry,\n    };\n  });\n}\n\nfunction makeSegmentTransitionStyle(duration, easing, furtherStyles = {}) {\n  // Merge CSS transition necessary for chart animation with the ones provided by \"segmentsStyle\"\n  const transition = [\n    `stroke-dashoffset ${duration}ms ${easing}`,\n    furtherStyles.transition,\n  ]\n    .filter(Boolean)\n    .join(',');\n\n  return {\n    transition,\n  };\n}\n\nfunction renderLabelItem(option, props, value) {\n  if (React.isValidElement(option)) {\n    return React.cloneElement(option, props);\n  }\n\n  let label = value;\n  if (typeof option === 'function') {\n    label = option(props);\n    if (React.isValidElement(label)) {\n      return label;\n    }\n  }\n\n  return <DefaultLabel {...props}>{label}</DefaultLabel>;\n}\n\nfunction renderLabels(data, props) {\n  const labelPosition = extractPercentage(props.radius, props.labelPosition);\n\n  return data.map((dataEntry, index) => {\n    const startAngle = props.startAngle + dataEntry.startOffset;\n    const halfAngle = startAngle + dataEntry.degrees / 2;\n    const halfAngleRadians = degreesToRadians(halfAngle);\n    const dx = Math.cos(halfAngleRadians) * labelPosition;\n    const dy = Math.sin(halfAngleRadians) * labelPosition;\n\n    // This object is passed as props to the \"label\" component\n    const labelProps = {\n      key: `label-${dataEntry.key || index}`,\n      x: props.cx,\n      y: props.cy,\n      dx,\n      dy,\n      textAnchor: evaluateLabelTextAnchor({\n        lineWidth: props.lineWidth,\n        labelPosition: props.labelPosition,\n        labelHorizontalShift: dx,\n      }),\n      data: data,\n      dataIndex: index,\n      color: dataEntry.color,\n      style: props.labelStyle,\n    };\n\n    return renderLabelItem(props.label, labelProps, dataEntry.value);\n  });\n}\n\nfunction renderSegments(data, props, hide) {\n  let style = props.segmentsStyle;\n  let reveal;\n\n  if (props.animate) {\n    const transitionStyle = makeSegmentTransitionStyle(\n      props.animationDuration,\n      props.animationEasing,\n      style\n    );\n    style = Object.assign({}, style, transitionStyle);\n  }\n\n  // Hide/reveal the segment?\n  if (hide === true) {\n    reveal = 0;\n  } else if (typeof props.reveal === 'number') {\n    reveal = props.reveal;\n  } else if (hide === false) {\n    reveal = 100;\n  }\n\n  return data.map((dataEntry, index) => {\n    const startAngle = props.startAngle + dataEntry.startOffset;\n\n    return (\n      <Path\n        key={dataEntry.key || index}\n        cx={props.cx}\n        cy={props.cy}\n        startAngle={startAngle}\n        lengthAngle={dataEntry.degrees}\n        radius={props.radius}\n        lineWidth={extractPercentage(props.radius, props.lineWidth)}\n        reveal={reveal}\n        title={dataEntry.title}\n        style={style}\n        stroke={dataEntry.color}\n        strokeLinecap={props.rounded ? 'round' : undefined}\n        fill=\"none\"\n        onMouseOver={\n          props.onMouseOver && (e => props.onMouseOver(e, props.data, index))\n        }\n        onMouseOut={\n          props.onMouseOut && (e => props.onMouseOut(e, props.data, index))\n        }\n        onClick={props.onClick && (e => props.onClick(e, props.data, index))}\n      />\n    );\n  });\n}\n\nexport default class ReactMinimalPieChart extends Component {\n  constructor(props) {\n    super(props);\n\n    if (this.props.animate === true) {\n      this.hideSegments = true;\n    }\n  }\n\n  componentDidMount() {\n    if (this.props.animate === true && requestAnimationFrame) {\n      this.initialAnimationTimerId = setTimeout(() => {\n        this.initialAnimationTimerId = null;\n        this.initialAnimationRAFId = requestAnimationFrame(() => {\n          (this.initialAnimationRAFId = null), this.startAnimation();\n        });\n      });\n    }\n  }\n\n  componentWillUnmount() {\n    if (this.initialAnimationTimerId) {\n      clearTimeout(this.initialAnimationTimerId);\n    }\n    if (this.initialAnimationRAFId) {\n      cancelAnimationFrame(this.initialAnimationRAFId);\n    }\n  }\n\n  startAnimation() {\n    this.hideSegments = false;\n    this.forceUpdate();\n  }\n\n  render() {\n    if (this.props.data === undefined) {\n      return null;\n    }\n    const extendedData = extendData(this.props);\n\n    return (\n      <div\n        className={this.props.className}\n        style={this.props.style}\n      >\n        <svg\n          viewBox={evaluateViewBoxSize(this.props.ratio, VIEWBOX_SIZE)}\n          width=\"100%\"\n          height=\"100%\"\n          style={{ display: 'block' }}\n        >\n          {renderSegments(extendedData, this.props, this.hideSegments)}\n          {this.props.label && renderLabels(extendedData, this.props)}\n          {this.props.injectSvg && this.props.injectSvg()}\n        </svg>\n        {this.props.children}\n      </div>\n    );\n  }\n}\n\nReactMinimalPieChart.displayName = 'ReactMinimalPieChart';\n\nReactMinimalPieChart.propTypes = {\n  data: dataPropType,\n  cx: PropTypes.number,\n  cy: PropTypes.number,\n  ratio: PropTypes.number,\n  totalValue: PropTypes.number,\n  className: PropTypes.string,\n  style: stylePropType,\n  segmentsStyle: stylePropType,\n  startAngle: PropTypes.number,\n  lengthAngle: PropTypes.number,\n  paddingAngle: PropTypes.number,\n  lineWidth: PropTypes.number,\n  radius: PropTypes.number,\n  rounded: PropTypes.bool,\n  animate: PropTypes.bool,\n  animationDuration: PropTypes.number,\n  animationEasing: PropTypes.string,\n  reveal: PropTypes.number,\n  children: PropTypes.node,\n  injectSvg: PropTypes.func,\n  label: PropTypes.oneOfType([\n    PropTypes.func,\n    PropTypes.element,\n    PropTypes.bool,\n  ]),\n  labelPosition: PropTypes.number,\n  labelStyle: stylePropType,\n  onMouseOver: PropTypes.func,\n  onMouseOut: PropTypes.func,\n  onClick: PropTypes.func,\n};\n\nReactMinimalPieChart.defaultProps = {\n  cx: VIEWBOX_HALF_SIZE,\n  cy: VIEWBOX_HALF_SIZE,\n  ratio: 1,\n  startAngle: 0,\n  lengthAngle: 360,\n  paddingAngle: 0,\n  lineWidth: 100,\n  radius: VIEWBOX_HALF_SIZE,\n  rounded: false,\n  animate: false,\n  animationDuration: 500,\n  animationEasing: 'ease-out',\n  label: false,\n  labelPosition: 50,\n  onMouseOver: undefined,\n  onMouseOut: undefined,\n  onClick: undefined,\n};\n"]}