-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcomponent---src-pages-central-programs-js-8688326fb14f3b844599.js.map
1 lines (1 loc) · 333 KB
/
component---src-pages-central-programs-js-8688326fb14f3b844599.js.map
1
{"version":3,"file":"component---src-pages-central-programs-js-8688326fb14f3b844599.js","mappings":"8GAEIA,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,MAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,mKACD,oBAEJL,EAAQ,EAAUE,G,0BCjBdJ,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,MAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,wJACD,UAEJL,EAAQ,EAAUE,G,0BCjBdJ,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,MAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,kHACD,UAEJL,EAAQ,EAAUE,G,yBCjBdJ,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,MAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAuBF,EAAMG,cAAc,OAAQ,CACnFC,EAAG,gJACD,uBAEJL,EAAQ,EAAUE,G,0BCjBdJ,EAAyB,EAAQ,MAEjCC,EAA0B,EAAQ,MAKtCC,EAAQ,OAAU,EAElB,IAAIC,EAAQF,EAAwB,EAAQ,QAIxCG,GAAW,EAFMJ,EAAuB,EAAQ,QAElBK,SAAu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D,CAAWhtB,GAAG,oBACZ,gBAAC4D,EAAA,EAAD,KACE,gBAACC,EAAA,EAAD,KACE,sBAAIpiB,UAAU,aACX6mC,EAAQqE,cAAcN,QADzB,KAEGxjC,EAAKyjC,KAAKC,aAAaC,iBAF1B,KAIA,gBAAC,GAAD,CACE3jC,KAAM8gC,EACN9qB,aAAcypB,EAAQqE","sources":["webpack://openousd/./node_modules/@material-ui/icons/AddCircleOutline.js","webpack://openousd/./node_modules/@material-ui/icons/Create.js","webpack://openousd/./node_modules/@material-ui/icons/Person.js","webpack://openousd/./node_modules/@material-ui/icons/RemoveCircleOutline.js","webpack://openousd/./node_modules/@material-ui/icons/SaveAlt.js","webpack://openousd/./node_modules/react-bootstrap/esm/Fade.js","webpack://openousd/./node_modules/react-bootstrap/node_modules/dom-helpers/esm/scrollbarSize.js","webpack://openousd/./node_modules/@restart/hooks/esm/useWillUnmount.js","webpack://openousd/./node_modules/@restart/hooks/esm/useUpdatedRef.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/activeElement.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/addClass.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/hasClass.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/removeClass.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/getComputedStyle.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/ownerWindow.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/hyphenate.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/hyphenateStyle.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/isTransform.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/css.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/scrollbarSize.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/isWindow.js","webpack://openousd/./node_modules/react-overlays/node_modules/dom-helpers/esm/isDocument.js","webpack://openousd/./node_modules/react-overlays/esm/isOverflowing.js","webpack://openousd/./node_modules/react-overlays/esm/manageAriaHidden.js","webpack://openousd/./node_modules/react-overlays/esm/ModalManager.js","webpack://openousd/./node_modules/react-overlays/esm/Modal.js","webpack://openousd/./node_modules/react-overlays/esm/useWaitForDOMRef.js","webpack://openousd/./node_modules/react-bootstrap/esm/BootstrapModalManager.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalBody.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalContext.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalDialog.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalFooter.js","webpack://openousd/./node_modules/react-bootstrap/esm/CloseButton.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalHeader.js","webpack://openousd/./node_modules/react-bootstrap/esm/divWithClassName.js","webpack://openousd/./node_modules/react-bootstrap/esm/Modal.js","webpack://openousd/./node_modules/react-bootstrap/esm/ModalTitle.js","webpack://openousd/./node_modules/@restart/hooks/esm/useTimeout.js","webpack://openousd/./node_modules/react-overlays/esm/Overlay.js","webpack://openousd/./node_modules/react-bootstrap/esm/Overlay.js","webpack://openousd/./node_modules/react-bootstrap/esm/OverlayTrigger.js","webpack://openousd/./node_modules/react-bootstrap/node_modules/dom-helpers/esm/contains.js","webpack://openousd/./node_modules/react-bootstrap/esm/Tooltip.js","webpack://openousd/./src/components/help-icon.js","webpack://openousd/./src/components/central-programs-table.js","webpack://openousd/./node_modules/d3-shape/src/arc.js","webpack://openousd/./node_modules/@nivo/arcs/dist/nivo-arcs.es.js","webpack://openousd/./node_modules/d3-shape/src/descending.js","webpack://openousd/./node_modules/d3-shape/src/identity.js","webpack://openousd/./node_modules/@nivo/pie/dist/nivo-pie.es.js","webpack://openousd/./node_modules/d3-shape/src/pie.js","webpack://openousd/./node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js","webpack://openousd/./src/components/pie-chart.js","webpack://openousd/./src/pages/central-programs.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13 7h-2v4H7v2h4v4h2v-4h4v-2h-4V7zm-1-5C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"\n}), 'AddCircleOutline');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z\"\n}), 'Create');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z\"\n}), 'Person');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M7 11v2h10v-2H7zm5-9C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8z\"\n}), 'RemoveCircleOutline');\n\nexports.default = _default;","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\");\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\n\nvar React = _interopRequireWildcard(require(\"react\"));\n\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\n\nvar _default = (0, _createSvgIcon.default)( /*#__PURE__*/React.createElement(\"path\", {\n d: \"M19 12v7H5v-7H3v7c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-7h-2zm-6 .67l2.59-2.58L17 11.5l-5 5-5-5 1.41-1.41L11 12.67V3h2z\"\n}), 'SaveAlt');\n\nexports.default = _default;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"children\"];\n\nvar _fadeStyles;\n\nimport classNames from 'classnames';\nimport React, { useCallback } from 'react';\nimport Transition, { ENTERED, ENTERING } from 'react-transition-group/Transition';\nimport transitionEndListener from './transitionEndListener';\nimport triggerBrowserReflow from './triggerBrowserReflow';\nvar defaultProps = {\n in: false,\n timeout: 300,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false\n};\nvar fadeStyles = (_fadeStyles = {}, _fadeStyles[ENTERING] = 'show', _fadeStyles[ENTERED] = 'show', _fadeStyles);\nvar Fade = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var handleEnter = useCallback(function (node) {\n triggerBrowserReflow(node);\n if (props.onEnter) props.onEnter(node);\n }, [props]);\n return /*#__PURE__*/React.createElement(Transition, _extends({\n ref: ref,\n addEndListener: transitionEndListener\n }, props, {\n onEnter: handleEnter\n }), function (status, innerProps) {\n return /*#__PURE__*/React.cloneElement(children, _extends({}, innerProps, {\n className: classNames('fade', className, children.props.className, fadeStyles[status])\n }));\n });\n});\nFade.defaultProps = defaultProps;\nFade.displayName = 'Fade';\nexport default Fade;","import canUseDOM from './canUseDOM';\nvar size;\nexport default function scrollbarSize(recalc) {\n if (!size && size !== 0 || recalc) {\n if (canUseDOM) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n }\n }\n\n return size;\n}","import useUpdatedRef from './useUpdatedRef';\nimport { useEffect } from 'react';\n/**\n * Attach a callback that fires when a component unmounts\n *\n * @param fn Handler to run when the component unmounts\n * @category effects\n */\n\nexport default function useWillUnmount(fn) {\n var onUnmount = useUpdatedRef(fn);\n useEffect(function () {\n return function () {\n return onUnmount.current();\n };\n }, []);\n}","import { useRef } from 'react';\n/**\n * Returns a ref that is immediately updated with the new value\n *\n * @param value The Ref value\n * @category refs\n */\n\nexport default function useUpdatedRef(value) {\n var valueRef = useRef(value);\n valueRef.current = value;\n return valueRef;\n}","import ownerDocument from './ownerDocument';\n/**\n * Returns the actively focused element safely.\n *\n * @param doc the document to check\n */\n\nexport default function activeElement(doc) {\n if (doc === void 0) {\n doc = ownerDocument();\n }\n\n // Support: IE 9 only\n // IE9 throws an \"Unspecified error\" accessing document.activeElement from an <iframe>\n try {\n var active = doc.activeElement; // IE11 returns a seemingly empty object in some cases when accessing\n // document.activeElement from an <iframe>\n\n if (!active || !active.nodeName) return null;\n return active;\n } catch (e) {\n /* ie throws if no active element */\n return doc.body;\n }\n}","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","import ownerWindow from './ownerWindow';\n/**\n * Returns one or all computed style properties of an element.\n * \n * @param node the element\n * @param psuedoElement the style property\n */\n\nexport default function getComputedStyle(node, psuedoElement) {\n return ownerWindow(node).getComputedStyle(node, psuedoElement);\n}","import ownerDocument from './ownerDocument';\n/**\n * Returns the owner window of a given element.\n * \n * @param node the element\n */\n\nexport default function ownerWindow(node) {\n var doc = ownerDocument(node);\n return doc && doc.defaultView || window;\n}","var rUpper = /([A-Z])/g;\nexport default function hyphenate(string) {\n return string.replace(rUpper, '-$1').toLowerCase();\n}","/**\n * Copyright 2013-2014, Facebook, Inc.\n * All rights reserved.\n * https://github.com/facebook/react/blob/2aeb8a2a6beb00617a4217f7f8284924fa2ad819/src/vendor/core/hyphenateStyleName.js\n */\nimport hyphenate from './hyphenate';\nvar msPattern = /^ms-/;\nexport default function hyphenateStyleName(string) {\n return hyphenate(string).replace(msPattern, '-ms-');\n}","var supportedTransforms = /^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i;\nexport default function isTransform(value) {\n return !!(value && supportedTransforms.test(value));\n}","import getComputedStyle from './getComputedStyle';\nimport hyphenate from './hyphenateStyle';\nimport isTransform from './isTransform';\n\nfunction style(node, property) {\n var css = '';\n var transforms = '';\n\n if (typeof property === 'string') {\n return node.style.getPropertyValue(hyphenate(property)) || getComputedStyle(node).getPropertyValue(hyphenate(property));\n }\n\n Object.keys(property).forEach(function (key) {\n var value = property[key];\n\n if (!value && value !== 0) {\n node.style.removeProperty(hyphenate(key));\n } else if (isTransform(key)) {\n transforms += key + \"(\" + value + \") \";\n } else {\n css += hyphenate(key) + \": \" + value + \";\";\n }\n });\n\n if (transforms) {\n css += \"transform: \" + transforms + \";\";\n }\n\n node.style.cssText += \";\" + css;\n}\n\nexport default style;","import canUseDOM from './canUseDOM';\nvar size;\nexport default function scrollbarSize(recalc) {\n if (!size && size !== 0 || recalc) {\n if (canUseDOM) {\n var scrollDiv = document.createElement('div');\n scrollDiv.style.position = 'absolute';\n scrollDiv.style.top = '-9999px';\n scrollDiv.style.width = '50px';\n scrollDiv.style.height = '50px';\n scrollDiv.style.overflow = 'scroll';\n document.body.appendChild(scrollDiv);\n size = scrollDiv.offsetWidth - scrollDiv.clientWidth;\n document.body.removeChild(scrollDiv);\n }\n }\n\n return size;\n}","import isDocument from './isDocument';\nexport default function isWindow(node) {\n if ('window' in node && node.window === node) return node;\n if (isDocument(node)) return node.defaultView || false;\n return false;\n}","export default function isDocument(element) {\n return 'nodeType' in element && element.nodeType === document.DOCUMENT_NODE;\n}","import isWindow from 'dom-helpers/isWindow';\nimport ownerDocument from 'dom-helpers/ownerDocument';\n\nfunction isBody(node) {\n return node && node.tagName.toLowerCase() === 'body';\n}\n\nfunction bodyIsOverflowing(node) {\n var doc = isWindow(node) ? ownerDocument() : ownerDocument(node);\n var win = isWindow(node) || doc.defaultView;\n return doc.body.clientWidth < win.innerWidth;\n}\n\nexport default function isOverflowing(container) {\n var win = isWindow(container);\n return win || isBody(container) ? bodyIsOverflowing(container) : container.scrollHeight > container.clientHeight;\n}","var BLACKLIST = ['template', 'script', 'style'];\n\nvar isHidable = function isHidable(_ref) {\n var nodeType = _ref.nodeType,\n tagName = _ref.tagName;\n return nodeType === 1 && BLACKLIST.indexOf(tagName.toLowerCase()) === -1;\n};\n\nvar siblings = function siblings(container, exclude, cb) {\n [].forEach.call(container.children, function (node) {\n if (exclude.indexOf(node) === -1 && isHidable(node)) {\n cb(node);\n }\n });\n};\n\nexport function ariaHidden(hide, node) {\n if (!node) return;\n\n if (hide) {\n node.setAttribute('aria-hidden', 'true');\n } else {\n node.removeAttribute('aria-hidden');\n }\n}\nexport function hideSiblings(container, _ref2) {\n var dialog = _ref2.dialog,\n backdrop = _ref2.backdrop;\n siblings(container, [dialog, backdrop], function (node) {\n return ariaHidden(true, node);\n });\n}\nexport function showSiblings(container, _ref3) {\n var dialog = _ref3.dialog,\n backdrop = _ref3.backdrop;\n siblings(container, [dialog, backdrop], function (node) {\n return ariaHidden(false, node);\n });\n}","import addClass from 'dom-helpers/addClass';\nimport removeClass from 'dom-helpers/removeClass';\nimport css from 'dom-helpers/css';\nimport getScrollbarSize from 'dom-helpers/scrollbarSize';\nimport isOverflowing from './isOverflowing';\nimport { ariaHidden, hideSiblings, showSiblings } from './manageAriaHidden';\n\nfunction findIndexOf(arr, cb) {\n var idx = -1;\n arr.some(function (d, i) {\n if (cb(d, i)) {\n idx = i;\n return true;\n }\n\n return false;\n });\n return idx;\n}\n/**\n * Proper state management for containers and the modals in those containers.\n *\n * @internal Used by the Modal to ensure proper styling of containers.\n */\n\n\nvar ModalManager = /*#__PURE__*/function () {\n function ModalManager(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$hideSiblingNodes = _ref.hideSiblingNodes,\n hideSiblingNodes = _ref$hideSiblingNodes === void 0 ? true : _ref$hideSiblingNodes,\n _ref$handleContainerO = _ref.handleContainerOverflow,\n handleContainerOverflow = _ref$handleContainerO === void 0 ? true : _ref$handleContainerO;\n\n this.hideSiblingNodes = void 0;\n this.handleContainerOverflow = void 0;\n this.modals = void 0;\n this.containers = void 0;\n this.data = void 0;\n this.scrollbarSize = void 0;\n this.hideSiblingNodes = hideSiblingNodes;\n this.handleContainerOverflow = handleContainerOverflow;\n this.modals = [];\n this.containers = [];\n this.data = [];\n this.scrollbarSize = getScrollbarSize();\n }\n\n var _proto = ModalManager.prototype;\n\n _proto.isContainerOverflowing = function isContainerOverflowing(modal) {\n var data = this.data[this.containerIndexFromModal(modal)];\n return data && data.overflowing;\n };\n\n _proto.containerIndexFromModal = function containerIndexFromModal(modal) {\n return findIndexOf(this.data, function (d) {\n return d.modals.indexOf(modal) !== -1;\n });\n };\n\n _proto.setContainerStyle = function setContainerStyle(containerState, container) {\n var style = {\n overflow: 'hidden'\n }; // we are only interested in the actual `style` here\n // because we will override it\n\n containerState.style = {\n overflow: container.style.overflow,\n paddingRight: container.style.paddingRight\n };\n\n if (containerState.overflowing) {\n // use computed style, here to get the real padding\n // to add our scrollbar width\n style.paddingRight = parseInt(css(container, 'paddingRight') || '0', 10) + this.scrollbarSize + \"px\";\n }\n\n css(container, style);\n };\n\n _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {\n Object.assign(container.style, containerState.style);\n };\n\n _proto.add = function add(modal, container, className) {\n var modalIdx = this.modals.indexOf(modal);\n var containerIdx = this.containers.indexOf(container);\n\n if (modalIdx !== -1) {\n return modalIdx;\n }\n\n modalIdx = this.modals.length;\n this.modals.push(modal);\n\n if (this.hideSiblingNodes) {\n hideSiblings(container, modal);\n }\n\n if (containerIdx !== -1) {\n this.data[containerIdx].modals.push(modal);\n return modalIdx;\n }\n\n var data = {\n modals: [modal],\n // right now only the first modal of a container will have its classes applied\n classes: className ? className.split(/\\s+/) : [],\n overflowing: isOverflowing(container)\n };\n\n if (this.handleContainerOverflow) {\n this.setContainerStyle(data, container);\n }\n\n data.classes.forEach(addClass.bind(null, container));\n this.containers.push(container);\n this.data.push(data);\n return modalIdx;\n };\n\n _proto.remove = function remove(modal) {\n var modalIdx = this.modals.indexOf(modal);\n\n if (modalIdx === -1) {\n return;\n }\n\n var containerIdx = this.containerIndexFromModal(modal);\n var data = this.data[containerIdx];\n var container = this.containers[containerIdx];\n data.modals.splice(data.modals.indexOf(modal), 1);\n this.modals.splice(modalIdx, 1); // if that was the last modal in a container,\n // clean up the container\n\n if (data.modals.length === 0) {\n data.classes.forEach(removeClass.bind(null, container));\n\n if (this.handleContainerOverflow) {\n this.removeContainerStyle(data, container);\n }\n\n if (this.hideSiblingNodes) {\n showSiblings(container, modal);\n }\n\n this.containers.splice(containerIdx, 1);\n this.data.splice(containerIdx, 1);\n } else if (this.hideSiblingNodes) {\n // otherwise make sure the next top modal is visible to a SR\n var _data$modals = data.modals[data.modals.length - 1],\n backdrop = _data$modals.backdrop,\n dialog = _data$modals.dialog;\n ariaHidden(false, dialog);\n ariaHidden(false, backdrop);\n }\n };\n\n _proto.isTopModal = function isTopModal(modal) {\n return !!this.modals.length && this.modals[this.modals.length - 1] === modal;\n };\n\n return ModalManager;\n}();\n\nexport default ModalManager;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\n/* eslint-disable @typescript-eslint/no-use-before-define, react/prop-types */\n\nimport activeElement from 'dom-helpers/activeElement';\nimport contains from 'dom-helpers/contains';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nimport listen from 'dom-helpers/listen';\nimport React, { useState, useRef, useCallback, useImperativeHandle, forwardRef, useEffect } from 'react';\nimport ReactDOM from 'react-dom';\nimport useMounted from '@restart/hooks/useMounted';\nimport useWillUnmount from '@restart/hooks/useWillUnmount';\nimport usePrevious from '@restart/hooks/usePrevious';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport ModalManager from './ModalManager';\nimport useWaitForDOMRef from './useWaitForDOMRef';\nvar manager;\n\nfunction getManager() {\n if (!manager) manager = new ModalManager();\n return manager;\n}\n\nfunction useModalManager(provided) {\n var modalManager = provided || getManager();\n var modal = useRef({\n dialog: null,\n backdrop: null\n });\n return Object.assign(modal.current, {\n add: function add(container, className) {\n return modalManager.add(modal.current, container, className);\n },\n remove: function remove() {\n return modalManager.remove(modal.current);\n },\n isTopModal: function isTopModal() {\n return modalManager.isTopModal(modal.current);\n },\n setDialogRef: useCallback(function (ref) {\n modal.current.dialog = ref;\n }, []),\n setBackdropRef: useCallback(function (ref) {\n modal.current.backdrop = ref;\n }, [])\n });\n}\n\nvar Modal = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$show = _ref.show,\n show = _ref$show === void 0 ? false : _ref$show,\n _ref$role = _ref.role,\n role = _ref$role === void 0 ? 'dialog' : _ref$role,\n className = _ref.className,\n style = _ref.style,\n children = _ref.children,\n _ref$backdrop = _ref.backdrop,\n backdrop = _ref$backdrop === void 0 ? true : _ref$backdrop,\n _ref$keyboard = _ref.keyboard,\n keyboard = _ref$keyboard === void 0 ? true : _ref$keyboard,\n onBackdropClick = _ref.onBackdropClick,\n onEscapeKeyDown = _ref.onEscapeKeyDown,\n transition = _ref.transition,\n backdropTransition = _ref.backdropTransition,\n _ref$autoFocus = _ref.autoFocus,\n autoFocus = _ref$autoFocus === void 0 ? true : _ref$autoFocus,\n _ref$enforceFocus = _ref.enforceFocus,\n enforceFocus = _ref$enforceFocus === void 0 ? true : _ref$enforceFocus,\n _ref$restoreFocus = _ref.restoreFocus,\n restoreFocus = _ref$restoreFocus === void 0 ? true : _ref$restoreFocus,\n restoreFocusOptions = _ref.restoreFocusOptions,\n renderDialog = _ref.renderDialog,\n _ref$renderBackdrop = _ref.renderBackdrop,\n renderBackdrop = _ref$renderBackdrop === void 0 ? function (props) {\n return /*#__PURE__*/React.createElement(\"div\", props);\n } : _ref$renderBackdrop,\n providedManager = _ref.manager,\n containerRef = _ref.container,\n containerClassName = _ref.containerClassName,\n onShow = _ref.onShow,\n _ref$onHide = _ref.onHide,\n onHide = _ref$onHide === void 0 ? function () {} : _ref$onHide,\n onExit = _ref.onExit,\n onExited = _ref.onExited,\n onExiting = _ref.onExiting,\n onEnter = _ref.onEnter,\n onEntering = _ref.onEntering,\n onEntered = _ref.onEntered,\n rest = _objectWithoutPropertiesLoose(_ref, [\"show\", \"role\", \"className\", \"style\", \"children\", \"backdrop\", \"keyboard\", \"onBackdropClick\", \"onEscapeKeyDown\", \"transition\", \"backdropTransition\", \"autoFocus\", \"enforceFocus\", \"restoreFocus\", \"restoreFocusOptions\", \"renderDialog\", \"renderBackdrop\", \"manager\", \"container\", \"containerClassName\", \"onShow\", \"onHide\", \"onExit\", \"onExited\", \"onExiting\", \"onEnter\", \"onEntering\", \"onEntered\"]);\n\n var container = useWaitForDOMRef(containerRef);\n var modal = useModalManager(providedManager);\n var isMounted = useMounted();\n var prevShow = usePrevious(show);\n\n var _useState = useState(!show),\n exited = _useState[0],\n setExited = _useState[1];\n\n var lastFocusRef = useRef(null);\n useImperativeHandle(ref, function () {\n return modal;\n }, [modal]);\n\n if (canUseDOM && !prevShow && show) {\n lastFocusRef.current = activeElement();\n }\n\n if (!transition && !show && !exited) {\n setExited(true);\n } else if (show && exited) {\n setExited(false);\n }\n\n var handleShow = useEventCallback(function () {\n modal.add(container, containerClassName);\n removeKeydownListenerRef.current = listen(document, 'keydown', handleDocumentKeyDown);\n removeFocusListenerRef.current = listen(document, 'focus', // the timeout is necessary b/c this will run before the new modal is mounted\n // and so steals focus from it\n function () {\n return setTimeout(handleEnforceFocus);\n }, true);\n\n if (onShow) {\n onShow();\n } // autofocus after onShow to not trigger a focus event for previous\n // modals before this one is shown.\n\n\n if (autoFocus) {\n var currentActiveElement = activeElement(document);\n\n if (modal.dialog && currentActiveElement && !contains(modal.dialog, currentActiveElement)) {\n lastFocusRef.current = currentActiveElement;\n modal.dialog.focus();\n }\n }\n });\n var handleHide = useEventCallback(function () {\n modal.remove();\n removeKeydownListenerRef.current == null ? void 0 : removeKeydownListenerRef.current();\n removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();\n\n if (restoreFocus) {\n var _lastFocusRef$current; // Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)\n\n\n (_lastFocusRef$current = lastFocusRef.current) == null ? void 0 : _lastFocusRef$current.focus == null ? void 0 : _lastFocusRef$current.focus(restoreFocusOptions);\n lastFocusRef.current = null;\n }\n }); // TODO: try and combine these effects: https://github.com/react-bootstrap/react-overlays/pull/794#discussion_r409954120\n // Show logic when:\n // - show is `true` _and_ `container` has resolved\n\n useEffect(function () {\n if (!show || !container) return;\n handleShow();\n }, [show, container,\n /* should never change: */\n handleShow]); // Hide cleanup logic when:\n // - `exited` switches to true\n // - component unmounts;\n\n useEffect(function () {\n if (!exited) return;\n handleHide();\n }, [exited, handleHide]);\n useWillUnmount(function () {\n handleHide();\n }); // --------------------------------\n\n var handleEnforceFocus = useEventCallback(function () {\n if (!enforceFocus || !isMounted() || !modal.isTopModal()) {\n return;\n }\n\n var currentActiveElement = activeElement();\n\n if (modal.dialog && currentActiveElement && !contains(modal.dialog, currentActiveElement)) {\n modal.dialog.focus();\n }\n });\n var handleBackdropClick = useEventCallback(function (e) {\n if (e.target !== e.currentTarget) {\n return;\n }\n\n onBackdropClick == null ? void 0 : onBackdropClick(e);\n\n if (backdrop === true) {\n onHide();\n }\n });\n var handleDocumentKeyDown = useEventCallback(function (e) {\n if (keyboard && e.keyCode === 27 && modal.isTopModal()) {\n onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);\n\n if (!e.defaultPrevented) {\n onHide();\n }\n }\n });\n var removeFocusListenerRef = useRef();\n var removeKeydownListenerRef = useRef();\n\n var handleHidden = function handleHidden() {\n setExited(true);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n onExited == null ? void 0 : onExited.apply(void 0, args);\n };\n\n var Transition = transition;\n\n if (!container || !(show || Transition && !exited)) {\n return null;\n }\n\n var dialogProps = _extends({\n role: role,\n ref: modal.setDialogRef,\n // apparently only works on the dialog role element\n 'aria-modal': role === 'dialog' ? true : undefined\n }, rest, {\n style: style,\n className: className,\n tabIndex: -1\n });\n\n var dialog = renderDialog ? renderDialog(dialogProps) : /*#__PURE__*/React.createElement(\"div\", dialogProps, /*#__PURE__*/React.cloneElement(children, {\n role: 'document'\n }));\n\n if (Transition) {\n dialog = /*#__PURE__*/React.createElement(Transition, {\n appear: true,\n unmountOnExit: true,\n \"in\": !!show,\n onExit: onExit,\n onExiting: onExiting,\n onExited: handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered\n }, dialog);\n }\n\n var backdropElement = null;\n\n if (backdrop) {\n var BackdropTransition = backdropTransition;\n backdropElement = renderBackdrop({\n ref: modal.setBackdropRef,\n onClick: handleBackdropClick\n });\n\n if (BackdropTransition) {\n backdropElement = /*#__PURE__*/React.createElement(BackdropTransition, {\n appear: true,\n \"in\": !!show\n }, backdropElement);\n }\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/ReactDOM.createPortal( /*#__PURE__*/React.createElement(React.Fragment, null, backdropElement, dialog), container));\n});\nModal.displayName = 'Modal';\nexport default Object.assign(Modal, {\n Manager: ModalManager\n});","import ownerDocument from 'dom-helpers/ownerDocument';\nimport { useState, useEffect } from 'react';\nexport var resolveContainerRef = function resolveContainerRef(ref) {\n var _ref;\n\n if (typeof document === 'undefined') return null;\n if (ref == null) return ownerDocument().body;\n if (typeof ref === 'function') ref = ref();\n if (ref && 'current' in ref) ref = ref.current;\n if ((_ref = ref) != null && _ref.nodeType) return ref || null;\n return null;\n};\nexport default function useWaitForDOMRef(ref, onResolved) {\n var _useState = useState(function () {\n return resolveContainerRef(ref);\n }),\n resolvedRef = _useState[0],\n setRef = _useState[1];\n\n if (!resolvedRef) {\n var earlyRef = resolveContainerRef(ref);\n if (earlyRef) setRef(earlyRef);\n }\n\n useEffect(function () {\n if (onResolved && resolvedRef) {\n onResolved(resolvedRef);\n }\n }, [onResolved, resolvedRef]);\n useEffect(function () {\n var nextRef = resolveContainerRef(ref);\n\n if (nextRef !== resolvedRef) {\n setRef(nextRef);\n }\n }, [ref, resolvedRef]);\n return resolvedRef;\n}","import _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport css from 'dom-helpers/css';\nimport qsa from 'dom-helpers/querySelectorAll';\nimport getScrollbarSize from 'dom-helpers/scrollbarSize';\nimport ModalManager from 'react-overlays/ModalManager';\nvar Selector = {\n FIXED_CONTENT: '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top',\n STICKY_CONTENT: '.sticky-top',\n NAVBAR_TOGGLER: '.navbar-toggler'\n};\n\nvar BootstrapModalManager = /*#__PURE__*/function (_ModalManager) {\n _inheritsLoose(BootstrapModalManager, _ModalManager);\n\n function BootstrapModalManager() {\n return _ModalManager.apply(this, arguments) || this;\n }\n\n var _proto = BootstrapModalManager.prototype;\n\n _proto.adjustAndStore = function adjustAndStore(prop, element, adjust) {\n var _css;\n\n var actual = element.style[prop]; // TODO: DOMStringMap and CSSStyleDeclaration aren't strictly compatible\n // @ts-ignore\n\n element.dataset[prop] = actual;\n css(element, (_css = {}, _css[prop] = parseFloat(css(element, prop)) + adjust + \"px\", _css));\n };\n\n _proto.restore = function restore(prop, element) {\n var value = element.dataset[prop];\n\n if (value !== undefined) {\n var _css2;\n\n delete element.dataset[prop];\n css(element, (_css2 = {}, _css2[prop] = value, _css2));\n }\n };\n\n _proto.setContainerStyle = function setContainerStyle(containerState, container) {\n var _this = this;\n\n _ModalManager.prototype.setContainerStyle.call(this, containerState, container);\n\n if (!containerState.overflowing) return;\n var size = getScrollbarSize();\n qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {\n return _this.adjustAndStore('paddingRight', el, size);\n });\n qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {\n return _this.adjustAndStore('marginRight', el, -size);\n });\n qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {\n return _this.adjustAndStore('marginRight', el, size);\n });\n };\n\n _proto.removeContainerStyle = function removeContainerStyle(containerState, container) {\n var _this2 = this;\n\n _ModalManager.prototype.removeContainerStyle.call(this, containerState, container);\n\n qsa(container, Selector.FIXED_CONTENT).forEach(function (el) {\n return _this2.restore('paddingRight', el);\n });\n qsa(container, Selector.STICKY_CONTENT).forEach(function (el) {\n return _this2.restore('marginRight', el);\n });\n qsa(container, Selector.NAVBAR_TOGGLER).forEach(function (el) {\n return _this2.restore('marginRight', el);\n });\n };\n\n return BootstrapModalManager;\n}(ModalManager);\n\nexport { BootstrapModalManager as default };","import createWithBsPrefix from './createWithBsPrefix';\nexport default createWithBsPrefix('modal-body');","import React from 'react';\nvar ModalContext = /*#__PURE__*/React.createContext({\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n onHide: function onHide() {}\n});\nexport default ModalContext;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"className\", \"contentClassName\", \"centered\", \"size\", \"children\", \"scrollable\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar ModalDialog = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n contentClassName = _ref.contentClassName,\n centered = _ref.centered,\n size = _ref.size,\n children = _ref.children,\n scrollable = _ref.scrollable,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');\n var dialogClass = bsPrefix + \"-dialog\";\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, props, {\n ref: ref,\n className: classNames(dialogClass, className, size && bsPrefix + \"-\" + size, centered && dialogClass + \"-centered\", scrollable && dialogClass + \"-scrollable\")\n }), /*#__PURE__*/React.createElement(\"div\", {\n className: classNames(bsPrefix + \"-content\", contentClassName)\n }, children));\n});\nModalDialog.displayName = 'ModalDialog';\nexport default ModalDialog;","import createWithBsPrefix from './createWithBsPrefix';\nexport default createWithBsPrefix('modal-footer');","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"label\", \"onClick\", \"className\"];\nimport React from 'react';\nimport classNames from 'classnames';\nvar defaultProps = {\n label: 'Close'\n};\nvar CloseButton = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var label = _ref.label,\n onClick = _ref.onClick,\n className = _ref.className,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"button\", _extends({\n ref: ref,\n type: \"button\",\n className: classNames('close', className),\n onClick: onClick\n }, props), /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, \"\\xD7\"), /*#__PURE__*/React.createElement(\"span\", {\n className: \"sr-only\"\n }, label));\n});\nCloseButton.displayName = 'CloseButton';\nCloseButton.defaultProps = defaultProps;\nexport default CloseButton;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"closeLabel\", \"closeButton\", \"onHide\", \"className\", \"children\"];\nimport classNames from 'classnames';\nimport React, { useContext } from 'react';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport { useBootstrapPrefix } from './ThemeProvider';\nimport CloseButton from './CloseButton';\nimport ModalContext from './ModalContext';\nvar defaultProps = {\n closeLabel: 'Close',\n closeButton: false\n};\nvar ModalHeader = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n closeLabel = _ref.closeLabel,\n closeButton = _ref.closeButton,\n onHide = _ref.onHide,\n className = _ref.className,\n children = _ref.children,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'modal-header');\n var context = useContext(ModalContext);\n var handleClick = useEventCallback(function () {\n if (context) context.onHide();\n if (onHide) onHide();\n });\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, props, {\n className: classNames(className, bsPrefix)\n }), children, closeButton && /*#__PURE__*/React.createElement(CloseButton, {\n label: closeLabel,\n onClick: handleClick\n }));\n});\nModalHeader.displayName = 'ModalHeader';\nModalHeader.defaultProps = defaultProps;\nexport default ModalHeader;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport classNames from 'classnames';\nexport default (function (className) {\n return /*#__PURE__*/React.forwardRef(function (p, ref) {\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, p, {\n ref: ref,\n className: classNames(p.className, className)\n }));\n });\n});","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar _excluded = [\"bsPrefix\", \"className\", \"style\", \"dialogClassName\", \"contentClassName\", \"children\", \"dialogAs\", \"aria-labelledby\", \"show\", \"animation\", \"backdrop\", \"keyboard\", \"onEscapeKeyDown\", \"onShow\", \"onHide\", \"container\", \"autoFocus\", \"enforceFocus\", \"restoreFocus\", \"restoreFocusOptions\", \"onEntered\", \"onExit\", \"onExiting\", \"onEnter\", \"onEntering\", \"onExited\", \"backdropClassName\", \"manager\"];\nimport classNames from 'classnames';\nimport addEventListener from 'dom-helpers/addEventListener';\nimport canUseDOM from 'dom-helpers/canUseDOM';\nimport ownerDocument from 'dom-helpers/ownerDocument';\nimport removeEventListener from 'dom-helpers/removeEventListener';\nimport getScrollbarSize from 'dom-helpers/scrollbarSize';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport useEventCallback from '@restart/hooks/useEventCallback';\nimport useWillUnmount from '@restart/hooks/useWillUnmount';\nimport transitionEnd from 'dom-helpers/transitionEnd';\nimport React, { useCallback, useImperativeHandle, useMemo, useRef, useState } from 'react';\nimport BaseModal from 'react-overlays/Modal';\nimport warning from 'warning';\nimport BootstrapModalManager from './BootstrapModalManager';\nimport Fade from './Fade';\nimport ModalBody from './ModalBody';\nimport ModalContext from './ModalContext';\nimport ModalDialog from './ModalDialog';\nimport ModalFooter from './ModalFooter';\nimport ModalHeader from './ModalHeader';\nimport ModalTitle from './ModalTitle';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar manager;\nvar defaultProps = {\n show: false,\n backdrop: true,\n keyboard: true,\n autoFocus: true,\n enforceFocus: true,\n restoreFocus: true,\n animation: true,\n dialogAs: ModalDialog\n};\n/* eslint-disable no-use-before-define, react/no-multi-comp */\n\nfunction DialogTransition(props) {\n return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {\n timeout: null\n }));\n}\n\nfunction BackdropTransition(props) {\n return /*#__PURE__*/React.createElement(Fade, _extends({}, props, {\n timeout: null\n }));\n}\n/* eslint-enable no-use-before-define */\n\n\nvar Modal = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n className = _ref.className,\n style = _ref.style,\n dialogClassName = _ref.dialogClassName,\n contentClassName = _ref.contentClassName,\n children = _ref.children,\n Dialog = _ref.dialogAs,\n ariaLabelledby = _ref['aria-labelledby'],\n show = _ref.show,\n animation = _ref.animation,\n backdrop = _ref.backdrop,\n keyboard = _ref.keyboard,\n onEscapeKeyDown = _ref.onEscapeKeyDown,\n onShow = _ref.onShow,\n onHide = _ref.onHide,\n container = _ref.container,\n autoFocus = _ref.autoFocus,\n enforceFocus = _ref.enforceFocus,\n restoreFocus = _ref.restoreFocus,\n restoreFocusOptions = _ref.restoreFocusOptions,\n onEntered = _ref.onEntered,\n onExit = _ref.onExit,\n onExiting = _ref.onExiting,\n onEnter = _ref.onEnter,\n onEntering = _ref.onEntering,\n onExited = _ref.onExited,\n backdropClassName = _ref.backdropClassName,\n propsManager = _ref.manager,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var _useState = useState({}),\n modalStyle = _useState[0],\n setStyle = _useState[1];\n\n var _useState2 = useState(false),\n animateStaticModal = _useState2[0],\n setAnimateStaticModal = _useState2[1];\n\n var waitingForMouseUpRef = useRef(false);\n var ignoreBackdropClickRef = useRef(false);\n var removeStaticModalAnimationRef = useRef(null); // TODO: what's this type\n\n var _useCallbackRef = useCallbackRef(),\n modal = _useCallbackRef[0],\n setModalRef = _useCallbackRef[1];\n\n var handleHide = useEventCallback(onHide);\n bsPrefix = useBootstrapPrefix(bsPrefix, 'modal');\n useImperativeHandle(ref, function () {\n return {\n get _modal() {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Accessing `_modal` is not supported and will be removed in a future release') : void 0;\n return modal;\n }\n\n };\n }, [modal]);\n var modalContext = useMemo(function () {\n return {\n onHide: handleHide\n };\n }, [handleHide]);\n\n function getModalManager() {\n if (propsManager) return propsManager;\n if (!manager) manager = new BootstrapModalManager();\n return manager;\n }\n\n function updateDialogStyle(node) {\n if (!canUseDOM) return;\n var containerIsOverflowing = getModalManager().isContainerOverflowing(modal);\n var modalIsOverflowing = node.scrollHeight > ownerDocument(node).documentElement.clientHeight;\n setStyle({\n paddingRight: containerIsOverflowing && !modalIsOverflowing ? getScrollbarSize() : undefined,\n paddingLeft: !containerIsOverflowing && modalIsOverflowing ? getScrollbarSize() : undefined\n });\n }\n\n var handleWindowResize = useEventCallback(function () {\n if (modal) {\n updateDialogStyle(modal.dialog);\n }\n });\n useWillUnmount(function () {\n removeEventListener(window, 'resize', handleWindowResize);\n\n if (removeStaticModalAnimationRef.current) {\n removeStaticModalAnimationRef.current();\n }\n }); // We prevent the modal from closing during a drag by detecting where the\n // the click originates from. If it starts in the modal and then ends outside\n // don't close.\n\n var handleDialogMouseDown = function handleDialogMouseDown() {\n waitingForMouseUpRef.current = true;\n };\n\n var handleMouseUp = function handleMouseUp(e) {\n if (waitingForMouseUpRef.current && modal && e.target === modal.dialog) {\n ignoreBackdropClickRef.current = true;\n }\n\n waitingForMouseUpRef.current = false;\n };\n\n var handleStaticModalAnimation = function handleStaticModalAnimation() {\n setAnimateStaticModal(true);\n removeStaticModalAnimationRef.current = transitionEnd(modal.dialog, function () {\n setAnimateStaticModal(false);\n });\n };\n\n var handleStaticBackdropClick = function handleStaticBackdropClick(e) {\n if (e.target !== e.currentTarget) {\n return;\n }\n\n handleStaticModalAnimation();\n };\n\n var handleClick = function handleClick(e) {\n if (backdrop === 'static') {\n handleStaticBackdropClick(e);\n return;\n }\n\n if (ignoreBackdropClickRef.current || e.target !== e.currentTarget) {\n ignoreBackdropClickRef.current = false;\n return;\n }\n\n onHide == null ? void 0 : onHide();\n };\n\n var handleEscapeKeyDown = function handleEscapeKeyDown(e) {\n if (!keyboard && backdrop === 'static') {\n // Call preventDefault to stop modal from closing in react-overlays,\n // then play our animation.\n e.preventDefault();\n handleStaticModalAnimation();\n } else if (keyboard && onEscapeKeyDown) {\n onEscapeKeyDown(e);\n }\n };\n\n var handleEnter = function handleEnter(node, isAppearing) {\n if (node) {\n node.style.display = 'block';\n updateDialogStyle(node);\n }\n\n onEnter == null ? void 0 : onEnter(node, isAppearing);\n };\n\n var handleExit = function handleExit(node) {\n removeStaticModalAnimationRef.current == null ? void 0 : removeStaticModalAnimationRef.current();\n onExit == null ? void 0 : onExit(node);\n };\n\n var handleEntering = function handleEntering(node, isAppearing) {\n onEntering == null ? void 0 : onEntering(node, isAppearing); // FIXME: This should work even when animation is disabled.\n\n addEventListener(window, 'resize', handleWindowResize);\n };\n\n var handleExited = function handleExited(node) {\n if (node) node.style.display = ''; // RHL removes it sometimes\n\n onExited == null ? void 0 : onExited(node); // FIXME: This should work even when animation is disabled.\n\n removeEventListener(window, 'resize', handleWindowResize);\n };\n\n var renderBackdrop = useCallback(function (backdropProps) {\n return /*#__PURE__*/React.createElement(\"div\", _extends({}, backdropProps, {\n className: classNames(bsPrefix + \"-backdrop\", backdropClassName, !animation && 'show')\n }));\n }, [animation, backdropClassName, bsPrefix]);\n\n var baseModalStyle = _extends({}, style, modalStyle); // Sets `display` always block when `animation` is false\n\n\n if (!animation) {\n baseModalStyle.display = 'block';\n }\n\n var renderDialog = function renderDialog(dialogProps) {\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n role: \"dialog\"\n }, dialogProps, {\n style: baseModalStyle,\n className: classNames(className, bsPrefix, animateStaticModal && bsPrefix + \"-static\"),\n onClick: backdrop ? handleClick : undefined,\n onMouseUp: handleMouseUp,\n \"aria-labelledby\": ariaLabelledby\n }), /*#__PURE__*/React.createElement(Dialog, _extends({}, props, {\n onMouseDown: handleDialogMouseDown,\n className: dialogClassName,\n contentClassName: contentClassName\n }), children));\n };\n\n return /*#__PURE__*/React.createElement(ModalContext.Provider, {\n value: modalContext\n }, /*#__PURE__*/React.createElement(BaseModal, {\n show: show,\n ref: setModalRef,\n backdrop: backdrop,\n container: container,\n keyboard: true // Always set true - see handleEscapeKeyDown\n ,\n autoFocus: autoFocus,\n enforceFocus: enforceFocus,\n restoreFocus: restoreFocus,\n restoreFocusOptions: restoreFocusOptions,\n onEscapeKeyDown: handleEscapeKeyDown,\n onShow: onShow,\n onHide: onHide,\n onEnter: handleEnter,\n onEntering: handleEntering,\n onEntered: onEntered,\n onExit: handleExit,\n onExiting: onExiting,\n onExited: handleExited,\n manager: getModalManager(),\n containerClassName: bsPrefix + \"-open\",\n transition: animation ? DialogTransition : undefined,\n backdropTransition: animation ? BackdropTransition : undefined,\n renderBackdrop: renderBackdrop,\n renderDialog: renderDialog\n }));\n});\nModal.displayName = 'Modal';\nModal.defaultProps = defaultProps;\nModal.Body = ModalBody;\nModal.Header = ModalHeader;\nModal.Title = ModalTitle;\nModal.Footer = ModalFooter;\nModal.Dialog = ModalDialog;\nModal.TRANSITION_DURATION = 300;\nModal.BACKDROP_TRANSITION_DURATION = 150;\nexport default Modal;","import createWithBsPrefix from './createWithBsPrefix';\nimport divWithClassName from './divWithClassName';\nvar DivStyledAsH4 = divWithClassName('h4');\nexport default createWithBsPrefix('modal-title', {\n Component: DivStyledAsH4\n});","import { useMemo, useRef } from 'react';\nimport useMounted from './useMounted';\nimport useWillUnmount from './useWillUnmount';\n/*\n * Browsers including Internet Explorer, Chrome, Safari, and Firefox store the\n * delay as a 32-bit signed integer internally. This causes an integer overflow\n * when using delays larger than 2,147,483,647 ms (about 24.8 days),\n * resulting in the timeout being executed immediately.\n *\n * via: https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout\n */\n\nvar MAX_DELAY_MS = Math.pow(2, 31) - 1;\n\nfunction setChainedTimeout(handleRef, fn, timeoutAtMs) {\n var delayMs = timeoutAtMs - Date.now();\n handleRef.current = delayMs <= MAX_DELAY_MS ? setTimeout(fn, delayMs) : setTimeout(function () {\n return setChainedTimeout(handleRef, fn, timeoutAtMs);\n }, MAX_DELAY_MS);\n}\n/**\n * Returns a controller object for setting a timeout that is properly cleaned up\n * once the component unmounts. New timeouts cancel and replace existing ones.\n *\n *\n *\n * ```tsx\n * const { set, clear } = useTimeout();\n * const [hello, showHello] = useState(false);\n * //Display hello after 5 seconds\n * set(() => showHello(true), 5000);\n * return (\n * <div className=\"App\">\n * {hello ? <h3>Hello</h3> : null}\n * </div>\n * );\n * ```\n */\n\n\nexport default function useTimeout() {\n var isMounted = useMounted(); // types are confused between node and web here IDK\n\n var handleRef = useRef();\n useWillUnmount(function () {\n return clearTimeout(handleRef.current);\n });\n return useMemo(function () {\n var clear = function clear() {\n return clearTimeout(handleRef.current);\n };\n\n function set(fn, delayMs) {\n if (delayMs === void 0) {\n delayMs = 0;\n }\n\n if (!isMounted()) return;\n clear();\n\n if (delayMs <= MAX_DELAY_MS) {\n // For simplicity, if the timeout is short, just set a normal timeout.\n handleRef.current = setTimeout(fn, delayMs);\n } else {\n setChainedTimeout(handleRef, fn, Date.now() + delayMs);\n }\n }\n\n return {\n set: set,\n clear: clear\n };\n }, []);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport PropTypes from 'prop-types';\nimport React, { useState } from 'react';\nimport ReactDOM from 'react-dom';\nimport useCallbackRef from '@restart/hooks/useCallbackRef';\nimport useMergedRefs from '@restart/hooks/useMergedRefs';\nimport { placements } from './popper';\nimport usePopper from './usePopper';\nimport useRootClose from './useRootClose';\nimport useWaitForDOMRef from './useWaitForDOMRef';\nimport mergeOptionsWithPopperConfig from './mergeOptionsWithPopperConfig';\n/**\n * Built on top of `Popper.js`, the overlay component is\n * great for custom tooltip overlays.\n */\n\nvar Overlay = /*#__PURE__*/React.forwardRef(function (props, outerRef) {\n var flip = props.flip,\n offset = props.offset,\n placement = props.placement,\n _props$containerPaddi = props.containerPadding,\n containerPadding = _props$containerPaddi === void 0 ? 5 : _props$containerPaddi,\n _props$popperConfig = props.popperConfig,\n popperConfig = _props$popperConfig === void 0 ? {} : _props$popperConfig,\n Transition = props.transition;\n\n var _useCallbackRef = useCallbackRef(),\n rootElement = _useCallbackRef[0],\n attachRef = _useCallbackRef[1];\n\n var _useCallbackRef2 = useCallbackRef(),\n arrowElement = _useCallbackRef2[0],\n attachArrowRef = _useCallbackRef2[1];\n\n var mergedRef = useMergedRefs(attachRef, outerRef);\n var container = useWaitForDOMRef(props.container);\n var target = useWaitForDOMRef(props.target);\n\n var _useState = useState(!props.show),\n exited = _useState[0],\n setExited = _useState[1];\n\n var _usePopper = usePopper(target, rootElement, mergeOptionsWithPopperConfig({\n placement: placement,\n enableEvents: !!props.show,\n containerPadding: containerPadding || 5,\n flip: flip,\n offset: offset,\n arrowElement: arrowElement,\n popperConfig: popperConfig\n })),\n styles = _usePopper.styles,\n attributes = _usePopper.attributes,\n popper = _objectWithoutPropertiesLoose(_usePopper, [\"styles\", \"attributes\"]);\n\n if (props.show) {\n if (exited) setExited(false);\n } else if (!props.transition && !exited) {\n setExited(true);\n }\n\n var handleHidden = function handleHidden() {\n setExited(true);\n\n if (props.onExited) {\n props.onExited.apply(props, arguments);\n }\n }; // Don't un-render the overlay while it's transitioning out.\n\n\n var mountOverlay = props.show || Transition && !exited;\n useRootClose(rootElement, props.onHide, {\n disabled: !props.rootClose || props.rootCloseDisabled,\n clickTrigger: props.rootCloseEvent\n });\n\n if (!mountOverlay) {\n // Don't bother showing anything if we don't have to.\n return null;\n }\n\n var child = props.children(_extends({}, popper, {\n show: !!props.show,\n props: _extends({}, attributes.popper, {\n style: styles.popper,\n ref: mergedRef\n }),\n arrowProps: _extends({}, attributes.arrow, {\n style: styles.arrow,\n ref: attachArrowRef\n })\n }));\n\n if (Transition) {\n var onExit = props.onExit,\n onExiting = props.onExiting,\n onEnter = props.onEnter,\n onEntering = props.onEntering,\n onEntered = props.onEntered;\n child = /*#__PURE__*/React.createElement(Transition, {\n \"in\": props.show,\n appear: true,\n onExit: onExit,\n onExiting: onExiting,\n onExited: handleHidden,\n onEnter: onEnter,\n onEntering: onEntering,\n onEntered: onEntered\n }, child);\n }\n\n return container ? /*#__PURE__*/ReactDOM.createPortal(child, container) : null;\n});\nOverlay.displayName = 'Overlay';\nOverlay.propTypes = {\n /**\n * Set the visibility of the Overlay\n */\n show: PropTypes.bool,\n\n /** Specify where the overlay element is positioned in relation to the target element */\n placement: PropTypes.oneOf(placements),\n\n /**\n * A DOM Element, Ref to an element, or function that returns either. The `target` element is where\n * the overlay is positioned relative to.\n */\n target: PropTypes.any,\n\n /**\n * A DOM Element, Ref to an element, or function that returns either. The `container` will have the Portal children\n * appended to it.\n */\n container: PropTypes.any,\n\n /**\n * Enables the Popper.js `flip` modifier, allowing the Overlay to\n * automatically adjust it's placement in case of overlap with the viewport or toggle.\n * Refer to the [flip docs](https://popper.js.org/popper-documentation.html#modifiers..flip.enabled) for more info\n */\n flip: PropTypes.bool,\n\n /**\n * A render prop that returns an element to overlay and position. See\n * the [react-popper documentation](https://github.com/FezVrasta/react-popper#children) for more info.\n *\n * @type {Function ({\n * show: boolean,\n * placement: Placement,\n * update: () => void,\n * forceUpdate: () => void,\n * props: {\n * ref: (?HTMLElement) => void,\n * style: { [string]: string | number },\n * aria-labelledby: ?string\n * [string]: string | number,\n * },\n * arrowProps: {\n * ref: (?HTMLElement) => void,\n * style: { [string]: string | number },\n * [string]: string | number,\n * },\n * }) => React.Element}\n */\n children: PropTypes.func.isRequired,\n\n /**\n * Control how much space there is between the edge of the boundary element and overlay.\n * A convenience shortcut to setting `popperConfig.modfiers.preventOverflow.padding`\n */\n containerPadding: PropTypes.number,\n\n /**\n * A set of popper options and props passed directly to react-popper's Popper component.\n */\n popperConfig: PropTypes.object,\n\n /**\n * Specify whether the overlay should trigger `onHide` when the user clicks outside the overlay\n */\n rootClose: PropTypes.bool,\n\n /**\n * Specify event for toggling overlay\n */\n rootCloseEvent: PropTypes.oneOf(['click', 'mousedown']),\n\n /**\n * Specify disabled for disable RootCloseWrapper\n */\n rootCloseDisabled: PropTypes.bool,\n\n /**\n * A Callback fired by the Overlay when it wishes to be hidden.\n *\n * __required__ when `rootClose` is `true`.\n *\n * @type func\n */\n onHide: function onHide(props) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n if (props.rootClose) {\n var _PropTypes$func;\n\n return (_PropTypes$func = PropTypes.func).isRequired.apply(_PropTypes$func, [props].concat(args));\n }\n\n return PropTypes.func.apply(PropTypes, [props].concat(args));\n },\n\n /**\n * A `react-transition-group@2.0.0` `<Transition/>` component\n * used to animate the overlay as it changes visibility.\n */\n // @ts-ignore\n transition: PropTypes.elementType,\n\n /**\n * Callback fired before the Overlay transitions in\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition in\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning in\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired right before the Overlay transitions out\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired as the Overlay begins to transition out\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the Overlay finishes transitioning out\n */\n onExited: PropTypes.func\n};\nexport default Overlay;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"transition\", \"popperConfig\"],\n _excluded2 = [\"props\", \"arrowProps\", \"show\", \"update\", \"forceUpdate\", \"placement\", \"state\"];\nimport React, { useRef } from 'react';\nimport classNames from 'classnames';\nimport BaseOverlay from 'react-overlays/Overlay';\nimport safeFindDOMNode from 'react-overlays/safeFindDOMNode';\nimport usePopperMarginModifiers from './usePopperMarginModifiers';\nimport Fade from './Fade';\nvar defaultProps = {\n transition: Fade,\n rootClose: false,\n show: false,\n placement: 'top'\n};\n\nfunction wrapRefs(props, arrowProps) {\n var ref = props.ref;\n var aRef = arrowProps.ref;\n\n props.ref = ref.__wrapped || (ref.__wrapped = function (r) {\n return ref(safeFindDOMNode(r));\n });\n\n arrowProps.ref = aRef.__wrapped || (aRef.__wrapped = function (r) {\n return aRef(safeFindDOMNode(r));\n });\n}\n\nfunction Overlay(_ref) {\n var overlay = _ref.children,\n transition = _ref.transition,\n _ref$popperConfig = _ref.popperConfig,\n popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,\n outerProps = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var popperRef = useRef({});\n\n var _usePopperMarginModif = usePopperMarginModifiers(),\n ref = _usePopperMarginModif[0],\n marginModifiers = _usePopperMarginModif[1];\n\n var actualTransition = transition === true ? Fade : transition || null;\n return /*#__PURE__*/React.createElement(BaseOverlay, _extends({}, outerProps, {\n ref: ref,\n popperConfig: _extends({}, popperConfig, {\n modifiers: marginModifiers.concat(popperConfig.modifiers || [])\n }),\n transition: actualTransition\n }), function (_ref2) {\n var _state$modifiersData$;\n\n var overlayProps = _ref2.props,\n arrowProps = _ref2.arrowProps,\n show = _ref2.show,\n update = _ref2.update,\n _ = _ref2.forceUpdate,\n placement = _ref2.placement,\n state = _ref2.state,\n props = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n wrapRefs(overlayProps, arrowProps);\n var popper = Object.assign(popperRef.current, {\n state: state,\n scheduleUpdate: update,\n placement: placement,\n outOfBoundaries: (state == null ? void 0 : (_state$modifiersData$ = state.modifiersData.hide) == null ? void 0 : _state$modifiersData$.isReferenceHidden) || false\n });\n if (typeof overlay === 'function') return overlay(_extends({}, props, overlayProps, {\n placement: placement,\n show: show\n }, !transition && show && {\n className: 'show'\n }, {\n popper: popper,\n arrowProps: arrowProps\n }));\n return /*#__PURE__*/React.cloneElement(overlay, _extends({}, props, overlayProps, {\n placement: placement,\n arrowProps: arrowProps,\n popper: popper,\n className: classNames(overlay.props.className, !transition && show && 'show'),\n style: _extends({}, overlay.props.style, overlayProps.style)\n }));\n });\n}\n\nOverlay.defaultProps = defaultProps;\nexport default Overlay;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nvar _excluded = [\"trigger\", \"overlay\", \"children\", \"popperConfig\", \"show\", \"defaultShow\", \"onToggle\", \"delay\", \"placement\", \"flip\"];\nimport contains from 'dom-helpers/contains';\nimport React, { cloneElement, useCallback, useRef } from 'react';\nimport useTimeout from '@restart/hooks/useTimeout';\nimport safeFindDOMNode from 'react-overlays/safeFindDOMNode';\nimport warning from 'warning';\nimport { useUncontrolledProp } from 'uncontrollable';\nimport Overlay from './Overlay';\n\nvar RefHolder = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(RefHolder, _React$Component);\n\n function RefHolder() {\n return _React$Component.apply(this, arguments) || this;\n }\n\n var _proto = RefHolder.prototype;\n\n _proto.render = function render() {\n return this.props.children;\n };\n\n return RefHolder;\n}(React.Component);\n\nfunction normalizeDelay(delay) {\n return delay && typeof delay === 'object' ? delay : {\n show: delay,\n hide: delay\n };\n} // Simple implementation of mouseEnter and mouseLeave.\n// React's built version is broken: https://github.com/facebook/react/issues/4251\n// for cases when the trigger is disabled and mouseOut/Over can cause flicker\n// moving from one child element to another.\n\n\nfunction handleMouseOverOut( // eslint-disable-next-line @typescript-eslint/no-shadow\nhandler, args, relatedNative) {\n var e = args[0];\n var target = e.currentTarget;\n var related = e.relatedTarget || e.nativeEvent[relatedNative];\n\n if ((!related || related !== target) && !contains(target, related)) {\n handler.apply(void 0, args);\n }\n}\n\nvar defaultProps = {\n defaultShow: false,\n trigger: ['hover', 'focus']\n};\n\nfunction OverlayTrigger(_ref) {\n var trigger = _ref.trigger,\n overlay = _ref.overlay,\n children = _ref.children,\n _ref$popperConfig = _ref.popperConfig,\n popperConfig = _ref$popperConfig === void 0 ? {} : _ref$popperConfig,\n propsShow = _ref.show,\n _ref$defaultShow = _ref.defaultShow,\n defaultShow = _ref$defaultShow === void 0 ? false : _ref$defaultShow,\n onToggle = _ref.onToggle,\n propsDelay = _ref.delay,\n placement = _ref.placement,\n _ref$flip = _ref.flip,\n flip = _ref$flip === void 0 ? placement && placement.indexOf('auto') !== -1 : _ref$flip,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var triggerNodeRef = useRef(null);\n var timeout = useTimeout();\n var hoverStateRef = useRef('');\n\n var _useUncontrolledProp = useUncontrolledProp(propsShow, defaultShow, onToggle),\n show = _useUncontrolledProp[0],\n setShow = _useUncontrolledProp[1];\n\n var delay = normalizeDelay(propsDelay);\n\n var _ref2 = typeof children !== 'function' ? React.Children.only(children).props : {},\n onFocus = _ref2.onFocus,\n onBlur = _ref2.onBlur,\n onClick = _ref2.onClick;\n\n var getTarget = useCallback(function () {\n return safeFindDOMNode(triggerNodeRef.current);\n }, []);\n var handleShow = useCallback(function () {\n timeout.clear();\n hoverStateRef.current = 'show';\n\n if (!delay.show) {\n setShow(true);\n return;\n }\n\n timeout.set(function () {\n if (hoverStateRef.current === 'show') setShow(true);\n }, delay.show);\n }, [delay.show, setShow, timeout]);\n var handleHide = useCallback(function () {\n timeout.clear();\n hoverStateRef.current = 'hide';\n\n if (!delay.hide) {\n setShow(false);\n return;\n }\n\n timeout.set(function () {\n if (hoverStateRef.current === 'hide') setShow(false);\n }, delay.hide);\n }, [delay.hide, setShow, timeout]);\n var handleFocus = useCallback(function () {\n handleShow();\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n onFocus == null ? void 0 : onFocus.apply(void 0, args);\n }, [handleShow, onFocus]);\n var handleBlur = useCallback(function () {\n handleHide();\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n onBlur == null ? void 0 : onBlur.apply(void 0, args);\n }, [handleHide, onBlur]);\n var handleClick = useCallback(function () {\n setShow(!show);\n if (onClick) onClick.apply(void 0, arguments);\n }, [onClick, setShow, show]);\n var handleMouseOver = useCallback(function () {\n for (var _len3 = arguments.length, args = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n args[_key3] = arguments[_key3];\n }\n\n handleMouseOverOut(handleShow, args, 'fromElement');\n }, [handleShow]);\n var handleMouseOut = useCallback(function () {\n for (var _len4 = arguments.length, args = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n args[_key4] = arguments[_key4];\n }\n\n handleMouseOverOut(handleHide, args, 'toElement');\n }, [handleHide]);\n var triggers = trigger == null ? [] : [].concat(trigger);\n var triggerProps = {};\n\n if (triggers.indexOf('click') !== -1) {\n triggerProps.onClick = handleClick;\n }\n\n if (triggers.indexOf('focus') !== -1) {\n triggerProps.onFocus = handleFocus;\n triggerProps.onBlur = handleBlur;\n }\n\n if (triggers.indexOf('hover') !== -1) {\n process.env.NODE_ENV !== \"production\" ? warning(triggers.length > 1, '[react-bootstrap] Specifying only the `\"hover\"` trigger limits the visibility of the overlay to just mouse users. Consider also including the `\"focus\"` trigger so that touch and keyboard only users can see the overlay as well.') : void 0;\n triggerProps.onMouseOver = handleMouseOver;\n triggerProps.onMouseOut = handleMouseOut;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, typeof children === 'function' ? children(_extends({}, triggerProps, {\n ref: triggerNodeRef\n })) : /*#__PURE__*/React.createElement(RefHolder, {\n ref: triggerNodeRef\n }, /*#__PURE__*/cloneElement(children, triggerProps)), /*#__PURE__*/React.createElement(Overlay, _extends({}, props, {\n show: show,\n onHide: handleHide,\n flip: flip,\n placement: placement,\n popperConfig: popperConfig,\n target: getTarget\n }), overlay));\n}\n\nOverlayTrigger.defaultProps = defaultProps;\nexport default OverlayTrigger;","/* eslint-disable no-bitwise, no-cond-assign */\n\n/**\n * Checks if an element contains another given element.\n * \n * @param context the context element\n * @param node the element to check\n */\nexport default function contains(context, node) {\n // HTML DOM and SVG DOM may have different support levels,\n // so we need to check on context instead of a document root element.\n if (context.contains) return context.contains(node);\n if (context.compareDocumentPosition) return context === node || !!(context.compareDocumentPosition(node) & 16);\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"bsPrefix\", \"placement\", \"className\", \"style\", \"children\", \"arrowProps\", \"popper\", \"show\"];\nimport classNames from 'classnames';\nimport React from 'react';\nimport isRequiredForA11y from 'prop-types-extra/lib/isRequiredForA11y';\nimport { useBootstrapPrefix } from './ThemeProvider';\nvar defaultProps = {\n placement: 'right'\n};\nvar Tooltip = /*#__PURE__*/React.forwardRef(function (_ref, ref) {\n var bsPrefix = _ref.bsPrefix,\n placement = _ref.placement,\n className = _ref.className,\n style = _ref.style,\n children = _ref.children,\n arrowProps = _ref.arrowProps,\n _ = _ref.popper,\n _2 = _ref.show,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');\n\n var _ref2 = (placement == null ? void 0 : placement.split('-')) || [],\n primaryPlacement = _ref2[0];\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref,\n style: style,\n role: \"tooltip\",\n \"x-placement\": primaryPlacement,\n className: classNames(className, bsPrefix, \"bs-tooltip-\" + primaryPlacement)\n }, props), /*#__PURE__*/React.createElement(\"div\", _extends({\n className: \"arrow\"\n }, arrowProps)), /*#__PURE__*/React.createElement(\"div\", {\n className: bsPrefix + \"-inner\"\n }, children));\n});\nTooltip.defaultProps = defaultProps;\nTooltip.displayName = 'Tooltip';\nexport default Tooltip;","import React from 'react';\nimport PropTypes from 'prop-types';\nimport OverlayTrigger from 'react-bootstrap/OverlayTrigger'\nimport Tooltip from 'react-bootstrap/Tooltip'\nimport HelpOutline from '@material-ui/icons/HelpOutline';\nimport './icon.scss'\n\n// TODO style the tooltip\nconst HelpIcon = ({tooltipText, placement = 'top'}) => {\n\n function renderTooltip(props) {\n // show={props.show.toString() is needed due to a bug in react-bootstrap\n // without it we get a 'Warning: Received true for a non-boolean attribute show.' error\n return <Tooltip {...props} show={props.show.toString()}>{tooltipText}</Tooltip>;\n }\n\n return (\n <OverlayTrigger\n placement={placement}\n delay={{ show: 250, hide: 400 }}\n overlay={renderTooltip}\n >\n <HelpOutline className=\"icon\"/>\n </OverlayTrigger>\n )}\n \n HelpIcon.propTypes = {\n tooltipText: PropTypes.string.isRequired\n }\n \n export default HelpIcon","import React, { useState } from \"react\"\nimport { Link } from \"gatsby-plugin-intl\"\nimport PropTypes from \"prop-types\"\nimport BootstrapTable from \"react-bootstrap-table-next\"\n// import paginationFactory from 'react-bootstrap-table2-paginator'\nimport ToolkitProvider, {\n Search,\n CSVExport,\n} from \"react-bootstrap-table2-toolkit\"\nimport \"./tables.scss\"\nimport DownloadIcon from \"@material-ui/icons/SaveAlt\"\nimport CreateIcon from \"@material-ui/icons/Create\"\nimport AddCircleOutlineIcon from \"@material-ui/icons/AddCircleOutline\"\nimport RemoveCircleOutlineIcon from \"@material-ui/icons/RemoveCircleOutline\"\nimport { trackCustomEvent } from \"gatsby-plugin-google-analytics\"\nimport { Button, Modal, Row, Col } from \"react-bootstrap\"\nimport HelpIcon from \"./help-icon\"\nimport { getSortCaret, sort, totalRowClass } from \"./table-utilities\"\nimport {\n getColumnsByDataField,\n formatToUSD,\n formatFTE,\n commaFormattedInteger,\n} from \"../utilities/content-utilities\"\n\nconst { SearchBar, ClearSearchButton } = Search\nconst { ExportCSVButton } = CSVExport\n\nconst formatRemainingBudgetCell = (percent, rowIndex) => {\n let classes = \"\"\n\n if (percent < -3) {\n classes = \"over-budget\"\n }\n\n if (rowIndex !== 0) {\n return <span className={classes}>{percent}%</span>\n }\n}\n\nconst createFirstRow = (data, totalLabel) => {\n const initialObject = {\n name: totalLabel,\n spending: 0,\n budget: 0,\n eoy_total_fte: 0,\n eoy_total_positions: 0,\n code: null,\n }\n return data.reduce((returnObject, currentItem) => {\n returnObject.spending += +currentItem.spending\n returnObject.budget += +currentItem.budget\n returnObject.staff += +currentItem.staff\n returnObject.eoy_total_fte += +currentItem.eoy_total_fte\n returnObject.eoy_total_positions += +currentItem.eoy_total_positions\n return returnObject\n }, initialObject)\n}\n\nconst columnsFormatter = (cell, row, rowIndex, totalLabel) => {\n if (cell === totalLabel) {\n return <span className=\"strong\">{row.name}</span>\n }\n return (\n <span>\n <Link to={\"/central-programs/\" + row.fields.slug}>{row.name}</Link>\n </span>\n )\n}\n\nconst sortPrograms = (a, b, order, dataField, rowA, rowB, totalLabel) => {\n return sort(a, b, order, dataField, rowA, rowB, \"name\", totalLabel)\n}\n\nconst trackTableCellClickEvent = (e, column, columnIndex, row, rowIndex) => {\n if (columnIndex === 0) {\n trackCustomEvent({\n category: \"Central Programs Table\",\n action: \"Click Program\",\n label: row.name,\n })\n }\n}\n\nconst trackSortEvent = (fieldName) => {\n trackCustomEvent({\n category: \"Central Programs Table\",\n action: \"Sort Column\",\n label: fieldName,\n })\n}\n\nconst ModalColumnToggle = ({\n columns,\n onColumnToggle,\n toggles,\n labelContent,\n columnLabels,\n}) => {\n const [show, setShow] = useState(false)\n\n const handleClose = () => setShow(false)\n const handleShow = () => {\n setShow(true)\n trackCustomEvent({\n category: \"Central Programs Table\",\n action: \"Edit Columns\",\n label: \"Open\",\n })\n }\n\n const handleColumnToggle = (column) => {\n onColumnToggle(column.dataField)\n\n const action = column.toggle ? \"Hide Column\" : \"Show Column\"\n\n trackCustomEvent({\n category: \"Central Programs Table\",\n action: action,\n label: column.text,\n })\n }\n\n let columnsGroupedBy = { visible: [], hidden: [] }\n\n columns.reduce((r, col) => {\n if (col.text !== \"Program\") {\n col.toggle = toggles[col.dataField]\n if (col.toggle) {\n r.visible.push(col)\n } else {\n r.hidden.push(col)\n }\n }\n return r\n }, columnsGroupedBy)\n\n const ColumnOption = ({ column }) => (\n <Button\n className={`column-option py-3 py-md-2 ${\n column.toggle ? \"visible\" : \"hidden\"\n }`}\n variant=\"light\"\n key={column.dataField}\n data-toggle=\"button\"\n onClick={() => handleColumnToggle(column)}\n >\n {column.toggle ? <RemoveCircleOutlineIcon /> : <AddCircleOutlineIcon />}\n <span className=\"ml-2\">{columnLabels[column.dataField].displayName}</span>\n </Button>\n )\n\n return (\n <div className=\"d-md-flex justify-content-end\">\n <Button className=\"cta mb-3 my-md-0\" onClick={handleShow}>\n <CreateIcon className=\"pr-1\" />\n {labelContent.labels.showHideColumnsLabel}\n </Button>\n <Modal\n show={show}\n onHide={handleClose}\n id=\"show-hide-columns-modal\"\n size=\"sm\"\n centered\n >\n <Modal.Header closeButton />\n <Modal.Body className=\"py-1 pl-5\">\n <div\n className={`heading strong py-2 ${\n columnsGroupedBy.visible.length > 0 ? \"\" : \"d-none\"\n }`}\n >\n {labelContent.labels.currentlyShownColumnsLabel}\n </div>\n {columnsGroupedBy.visible.map((column) => (\n <ColumnOption column={column} key={column.dataField} />\n ))}\n <div\n className={`heading strong py-2 ${\n columnsGroupedBy.hidden.length > 0 ? \"\" : \"d-none\"\n }`}\n >\n {labelContent.labels.columnsNotShownLabel}\n </div>\n {columnsGroupedBy.hidden.map((column) => (\n <ColumnOption column={column} key={column.dataField} />\n ))}\n </Modal.Body>\n <Modal.Footer className=\"pt-3 pr-4\">\n {/*<Button variant=\"primary\" className=\"cta\" size=\"sm\" onClick={handleClose}>\n Close\n </Button>*/}\n </Modal.Footer>\n </Modal>\n </div>\n )\n}\n\nconst CentralProgramsTable = ({ data, labelContent, codes }) => {\n const totalLabel = labelContent.labels.totalLabel\n const firstRow = createFirstRow(data, totalLabel)\n\n //pre-sort column data so we don't need to search the array every time\n let columnLabelsByDatafield = getColumnsByDataField(labelContent.columns)\n\n // creates new array\n data = data.concat([firstRow])\n\n const columns = [\n {\n formatter: (cell, row, rowIndex) =>\n columnsFormatter(cell, row, rowIndex, totalLabel),\n dataField: \"name\",\n text: \"Program\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header\">\n {columnLabelsByDatafield[column.dataField].displayName}{\" \"}\n {components.sortElement}\n </div>\n )\n },\n sortCaret: getSortCaret,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n events: {\n onClick: (e, column, columnIndex, row, rowIndex) =>\n trackTableCellClickEvent(e, column, columnIndex, row, rowIndex),\n },\n },\n {\n dataField: \"category\",\n text: \"Category\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-left\">\n {columnLabelsByDatafield[column.dataField].displayName}{\" \"}\n {components.sortElement}\n </div>\n )\n },\n sortCaret: getSortCaret,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n hidden: true,\n align: \"left\",\n },\n {\n dataField: \"spending\",\n formatter: (cell, row) => formatToUSD(row.spending),\n text: \"Spending\",\n // TODO improve tooltip text for all of these\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName}\n </div>\n )\n },\n sortCaret: getSortCaret,\n searchable: false,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n },\n {\n dataField: \"budget\",\n formatter: (cell, row) => formatToUSD(row.budget),\n text: \"Budget\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName}\n </div>\n )\n },\n sortCaret: getSortCaret,\n searchable: false,\n sort: true,\n hidden: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n },\n {\n dataField: \"eoy_total_fte\",\n formatter: (cell, row) => formatFTE(row.eoy_total_fte),\n text: \"Staff\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName} *{\" \"}\n <HelpIcon\n tooltipText={\n columnLabelsByDatafield[column.dataField].helperText.helperText\n }\n placement=\"bottom\"\n />\n </div>\n )\n },\n headerStyle: (colum, colIndex) => {\n return { minWidth: \"110px\" }\n },\n sortCaret: getSortCaret,\n searchable: false,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n csvExport: false,\n },\n {\n dataField: \"eoy_total_positions\",\n formatter: (cell, row) => commaFormattedInteger(row.eoy_total_positions),\n text: \"Staff Postions\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName} *{\" \"}\n <HelpIcon\n tooltipText={\n columnLabelsByDatafield[column.dataField].helperText.helperText\n }\n placement=\"bottom\"\n />\n </div>\n )\n },\n headerStyle: (colum, colIndex) => {\n return { minWidth: \"110px\" }\n },\n sortCaret: getSortCaret,\n searchable: false,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n hidden: true,\n csvExport: false,\n },\n {\n dataField: \"remaining_budget_percent\",\n formatter: (cell, row, rowIndex) =>\n formatRemainingBudgetCell(row.remaining_budget_percent, rowIndex),\n text: \"Remaining Budget\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName}\n </div>\n )\n },\n sortCaret: getSortCaret,\n searchable: false,\n sort: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n },\n {\n dataField: \"code\",\n text: \"OUSD Code\",\n headerFormatter: (column, colIndex, components) => {\n return (\n <div className=\"table-header text-right\">\n {components.sortElement}{\" \"}\n {columnLabelsByDatafield[column.dataField].displayName}{\" \"}\n <HelpIcon\n tooltipText={\n columnLabelsByDatafield[column.dataField].helperText.helperText\n }\n placement=\"bottom\"\n />\n </div>\n )\n },\n sortCaret: getSortCaret,\n searchable: true,\n sort: true,\n hidden: true,\n onSort: (field, order) => trackSortEvent(field),\n sortFunc: (a, b, order, dataField, rowA, rowB) =>\n sortPrograms(a, b, order, dataField, rowA, rowB, totalLabel),\n type: \"number\",\n align: \"right\",\n },\n ]\n\n return (\n <ToolkitProvider\n keyField=\"code\"\n data={data}\n columns={columns}\n className=\"table\"\n exportCSV={{ fileName: `openousd-central-programs.csv` }}\n bootstrap4\n search\n columnToggle\n >\n {(props) => (\n <div>\n <Row>\n <Col md={8}>\n <SearchBar\n {...props.searchProps}\n placeholder={`${labelContent.labels.searchLabel}`}\n className=\"table-search-bar mb-4\"\n />\n <ClearSearchButton {...props.searchProps} className=\"clear-btn\" />\n </Col>\n <Col>\n <ModalColumnToggle\n labelContent={labelContent}\n columnLabels={columnLabelsByDatafield}\n {...props.columnToggleProps}\n />\n </Col>\n </Row>\n <BootstrapTable\n // turning off pagination for now\n // pagination={paginationFactory()}\n wrapperClasses=\"table-responsive\"\n classes=\"\"\n bordered={false}\n {...props.baseProps}\n rowClasses={(row, rowIndex) => totalRowClass(row.name, totalLabel)}\n defaultSorted={[{ dataField: \"name\", order: \"asc\" }]}\n />\n <div className=\"footnote mb-3 mt-2\">\n {labelContent.footnote.footnote}\n </div>\n <div>\n <ExportCSVButton {...props.csvProps} className=\"btn-link download\">\n <DownloadIcon />\n {labelContent.labels.downloadDataLabel}\n </ExportCSVButton>\n </div>\n </div>\n )}\n </ToolkitProvider>\n )\n}\n\nCentralProgramsTable.propTypes = {\n data: PropTypes.arrayOf(PropTypes.object),\n}\n\nCentralProgramsTable.defaultProps = {\n data: [],\n}\n\nexport default CentralProgramsTable\n","import { path } from \"d3-path\";\nimport constant from \"./constant.js\";\nimport { abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau } from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0,\n y10 = y1 - y0,\n x32 = x3 - x2,\n y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n} // Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\n\n\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00; // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function () {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n if (!context) context = buffer = path(); // Ensure that the outer radius is always larger than the inner radius.\n\n if (r1 < r0) r = r1, r1 = r0, r0 = r; // Is it a point?\n\n if (!(r1 > epsilon)) context.moveTo(0, 0); // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n } // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1; // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10); // Apply rounded corners?\n\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc; // Restrict the corner radius according to the sector angle.\n\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n } // Is the sector collapsed to a line?\n\n\n if (!(da1 > epsilon)) context.moveTo(x01, y01); // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n } // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10); // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); // Have the corners merged?\n\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw); // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n } // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n context.closePath();\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function () {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function (_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function (_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function (_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function (_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function (_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function (_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function (_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function (_) {\n return arguments.length ? (context = _ == null ? null : _, arc) : context;\n };\n\n return arc;\n}","import { useMemo, createElement, useCallback } from 'react';\nimport { radiansToDegrees, positionFromAngle, degreesToRadians, midAngle, useMotionConfig, useTheme, usePropertyAccessor, textPropsByEngine, getDistance, getAngle } from '@nivo/core';\nimport { useInheritedColor } from '@nivo/colors';\nimport { to, useTransition, animated, useSpring } from '@react-spring/web';\nimport { jsx, jsxs } from 'react/jsx-runtime';\nimport { line, arc } from 'd3-shape';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nvar getNormalizedAngle = function getNormalizedAngle(angle) {\n var normalizedAngle = angle % (Math.PI * 2);\n\n if (normalizedAngle < 0) {\n normalizedAngle += Math.PI * 2;\n }\n\n return normalizedAngle;\n};\n\nvar filterDataBySkipAngle = function filterDataBySkipAngle(data, skipAngle) {\n return data.filter(function (datum) {\n return Math.abs(radiansToDegrees(datum.arc.endAngle - datum.arc.startAngle)) >= skipAngle;\n });\n};\n\nvar useFilteredDataBySkipAngle = function useFilteredDataBySkipAngle(data, skipAngle) {\n return useMemo(function () {\n return filterDataBySkipAngle(data, skipAngle);\n }, [data, skipAngle]);\n};\n\nvar svgEllipticalArcCommand = function svgEllipticalArcCommand(radius, largeArcFlag, sweepFlag, x, y) {\n return ['A', radius, radius, 0, largeArcFlag, sweepFlag, x, y].join(' ');\n};\n\nvar generateSvgArc = function generateSvgArc(radius, originalStartAngle, originalEndAngle) {\n var startAngle = Math.min(originalStartAngle, originalEndAngle);\n var endAngle = Math.max(originalStartAngle, originalEndAngle);\n var start = positionFromAngle(degreesToRadians(endAngle), radius);\n var end = positionFromAngle(degreesToRadians(startAngle), radius);\n\n if (endAngle - startAngle >= 360) {\n var mid = positionFromAngle(degreesToRadians(startAngle + 180), radius);\n return [\"M \".concat(start.x, \" \").concat(start.y), svgEllipticalArcCommand(radius, 1, 1, mid.x, mid.y), \"M \".concat(start.x, \" \").concat(start.y), svgEllipticalArcCommand(radius, 1, 0, mid.x, mid.y)].join(' ');\n }\n\n var largeArcFlag = endAngle - startAngle <= 180 ? 0 : 1;\n return [\"M \".concat(start.x, \" \").concat(start.y), svgEllipticalArcCommand(radius, largeArcFlag, 0, end.x, end.y)].join(' ');\n};\n\nvar arcTransitionModes = ['startAngle', 'middleAngle', 'endAngle', 'innerRadius', 'centerRadius', 'outerRadius', 'pushIn', 'pushOut'];\nvar arcTransitionModeById = {\n startAngle: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n endAngle: arc.startAngle\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n startAngle: arc.endAngle\n });\n }\n },\n middleAngle: {\n enter: function enter(arc) {\n var middleAngle = arc.startAngle + (arc.endAngle - arc.startAngle) / 2;\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n startAngle: middleAngle,\n endAngle: middleAngle\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n var middleAngle = arc.startAngle + (arc.endAngle - arc.startAngle) / 2;\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n startAngle: middleAngle,\n endAngle: middleAngle\n });\n }\n },\n endAngle: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n startAngle: arc.endAngle\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n endAngle: arc.startAngle\n });\n }\n },\n innerRadius: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n outerRadius: arc.innerRadius\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.outerRadius\n });\n }\n },\n centerRadius: {\n enter: function enter(arc) {\n var centerRadius = arc.innerRadius + (arc.outerRadius - arc.innerRadius) / 2;\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: centerRadius,\n outerRadius: centerRadius\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n var centerRadius = arc.innerRadius + (arc.outerRadius - arc.innerRadius) / 2;\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: centerRadius,\n outerRadius: centerRadius\n });\n }\n },\n outerRadius: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.outerRadius\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n outerRadius: arc.innerRadius\n });\n }\n },\n pushIn: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.innerRadius - arc.outerRadius + arc.innerRadius,\n outerRadius: arc.innerRadius\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.outerRadius,\n outerRadius: arc.outerRadius + arc.outerRadius - arc.innerRadius\n });\n }\n },\n pushOut: {\n enter: function enter(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.outerRadius,\n outerRadius: arc.outerRadius + arc.outerRadius - arc.innerRadius\n });\n },\n update: function update(arc) {\n return arc;\n },\n leave: function leave(arc) {\n return _objectSpread2(_objectSpread2({}, arc), {}, {\n innerRadius: arc.innerRadius - arc.outerRadius + arc.innerRadius,\n outerRadius: arc.innerRadius\n });\n }\n }\n};\n\nvar useArcTransitionMode = function useArcTransitionMode(mode, extraTransition) {\n return useMemo(function () {\n var transitionMode = arcTransitionModeById[mode];\n return {\n enter: function enter(datum) {\n return _objectSpread2(_objectSpread2({\n progress: 0\n }, transitionMode.enter(datum.arc)), extraTransition ? extraTransition.enter(datum) : {});\n },\n update: function update(datum) {\n return _objectSpread2(_objectSpread2({\n progress: 1\n }, transitionMode.update(datum.arc)), extraTransition ? extraTransition.update(datum) : {});\n },\n leave: function leave(datum) {\n return _objectSpread2(_objectSpread2({\n progress: 0\n }, transitionMode.leave(datum.arc)), extraTransition ? extraTransition.leave(datum) : {});\n }\n };\n }, [mode, extraTransition]);\n};\n\nvar computeArcCenter = function computeArcCenter(arc, offset) {\n var angle = midAngle(arc) - Math.PI / 2;\n var radius = arc.innerRadius + (arc.outerRadius - arc.innerRadius) * offset;\n return positionFromAngle(angle, radius);\n};\n\nvar interpolateArcCenter = function interpolateArcCenter(offset) {\n return function (startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue) {\n return to([startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue], function (startAngle, endAngle, innerRadius, outerRadius) {\n var centroid = computeArcCenter({\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: innerRadius,\n outerRadius: outerRadius\n }, offset);\n return \"translate(\".concat(centroid.x, \",\").concat(centroid.y, \")\");\n });\n };\n};\n\nvar useArcCentersTransition = function useArcCentersTransition(data) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0.5;\n var mode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'innerRadius';\n var extra = arguments.length > 3 ? arguments[3] : undefined;\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n\n var phases = useArcTransitionMode(mode, extra);\n var transition = useTransition(data, {\n keys: function keys(datum) {\n return datum.id;\n },\n initial: phases.update,\n from: phases.enter,\n enter: phases.update,\n update: phases.update,\n leave: phases.leave,\n config: springConfig,\n immediate: !animate\n });\n return {\n transition: transition,\n interpolate: interpolateArcCenter(offset)\n };\n};\n\nvar useArcCenters = function useArcCenters(_ref) {\n var data = _ref.data,\n _ref$offset = _ref.offset,\n offset = _ref$offset === void 0 ? 0.5 : _ref$offset,\n _ref$skipAngle = _ref.skipAngle,\n skipAngle = _ref$skipAngle === void 0 ? 0 : _ref$skipAngle,\n _ref$computeExtraProp = _ref.computeExtraProps,\n computeExtraProps = _ref$computeExtraProp === void 0 ? function () {\n return {};\n } : _ref$computeExtraProp;\n return useMemo(function () {\n return filterDataBySkipAngle(data, skipAngle).map(function (datum) {\n var position = computeArcCenter(datum.arc, offset);\n return _objectSpread2(_objectSpread2({}, computeExtraProps(datum)), {}, {\n x: position.x,\n y: position.y,\n data: datum\n });\n });\n }, [data, offset, skipAngle, computeExtraProps]);\n};\n\nvar staticStyle = {\n pointerEvents: 'none'\n};\n\nvar ArcLabel = function ArcLabel(_ref) {\n var label = _ref.label,\n style = _ref.style;\n var theme = useTheme();\n return jsx(animated.g, {\n transform: style.transform,\n opacity: style.progress,\n style: staticStyle,\n children: jsx(animated.text, {\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n fill: style.textColor\n }),\n children: label\n })\n });\n};\n\nvar ArcLabelsLayer = function ArcLabelsLayer(_ref) {\n var center = _ref.center,\n data = _ref.data,\n transitionMode = _ref.transitionMode,\n labelAccessor = _ref.label,\n radiusOffset = _ref.radiusOffset,\n skipAngle = _ref.skipAngle,\n textColor = _ref.textColor,\n _ref$component = _ref.component,\n component = _ref$component === void 0 ? ArcLabel : _ref$component;\n var getLabel = usePropertyAccessor(labelAccessor);\n var theme = useTheme();\n var getTextColor = useInheritedColor(textColor, theme);\n var filteredData = useMemo(function () {\n return data.filter(function (datum) {\n return Math.abs(radiansToDegrees(datum.arc.endAngle - datum.arc.startAngle)) >= skipAngle;\n });\n }, [data, skipAngle]);\n\n var _useArcCentersTransit = useArcCentersTransition(filteredData, radiusOffset, transitionMode),\n transition = _useArcCentersTransit.transition,\n interpolate = _useArcCentersTransit.interpolate;\n\n var Label = component;\n return jsx(\"g\", {\n transform: \"translate(\".concat(center[0], \",\").concat(center[1], \")\"),\n children: transition(function (transitionProps, datum) {\n return createElement(Label, {\n key: datum.id,\n datum: datum,\n label: getLabel(datum),\n style: _objectSpread2(_objectSpread2({}, transitionProps), {}, {\n transform: interpolate(transitionProps.startAngle, transitionProps.endAngle, transitionProps.innerRadius, transitionProps.outerRadius),\n textColor: getTextColor(datum)\n })\n });\n })\n });\n};\n\nvar drawCanvasArcLabels = function drawCanvasArcLabels(ctx, labels, theme) {\n ctx.textAlign = 'center';\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n labels.forEach(function (label) {\n ctx.fillStyle = label.textColor;\n ctx.fillText(\"\".concat(label.label), label.x, label.y);\n });\n};\n\nvar useArcLabels = function useArcLabels(_ref) {\n var data = _ref.data,\n offset = _ref.offset,\n skipAngle = _ref.skipAngle,\n label = _ref.label,\n textColor = _ref.textColor;\n var getLabel = usePropertyAccessor(label);\n var theme = useTheme();\n var getTextColor = useInheritedColor(textColor, theme);\n var computeExtraProps = useCallback(function (datum) {\n return {\n label: getLabel(datum),\n textColor: getTextColor(datum)\n };\n }, [getLabel, getTextColor]);\n return useArcCenters({\n data: data,\n offset: offset,\n skipAngle: skipAngle,\n computeExtraProps: computeExtraProps\n });\n};\n\nvar computeArcLinkTextAnchor = function computeArcLinkTextAnchor(arc) {\n var centerAngle = getNormalizedAngle(arc.startAngle + (arc.endAngle - arc.startAngle) / 2 - Math.PI / 2);\n\n if (centerAngle < Math.PI / 2 || centerAngle > Math.PI * 1.5) {\n return 'start';\n }\n\n return 'end';\n};\n\nvar computeArcLink = function computeArcLink(arc, offset, diagonalLength, straightLength) {\n var centerAngle = getNormalizedAngle(arc.startAngle + (arc.endAngle - arc.startAngle) / 2 - Math.PI / 2);\n var point0 = positionFromAngle(centerAngle, arc.outerRadius + offset);\n var point1 = positionFromAngle(centerAngle, arc.outerRadius + offset + diagonalLength);\n var side;\n var point2;\n\n if (centerAngle < Math.PI / 2 || centerAngle > Math.PI * 1.5) {\n side = 'after';\n point2 = {\n x: point1.x + straightLength,\n y: point1.y\n };\n } else {\n side = 'before';\n point2 = {\n x: point1.x - straightLength,\n y: point1.y\n };\n }\n\n return {\n side: side,\n points: [point0, point1, point2]\n };\n};\n\nvar lineGenerator = line().x(function (d) {\n return d.x;\n}).y(function (d) {\n return d.y;\n});\n\nvar useTransitionPhases = function useTransitionPhases(_ref) {\n var offset = _ref.offset,\n diagonalLength = _ref.diagonalLength,\n straightLength = _ref.straightLength,\n textOffset = _ref.textOffset,\n getLinkColor = _ref.getLinkColor,\n getTextColor = _ref.getTextColor;\n return useMemo(function () {\n return {\n enter: function enter(datum) {\n return {\n startAngle: datum.arc.startAngle,\n endAngle: datum.arc.endAngle,\n innerRadius: datum.arc.innerRadius,\n outerRadius: datum.arc.outerRadius,\n offset: offset,\n diagonalLength: 0,\n straightLength: 0,\n textOffset: textOffset,\n linkColor: getLinkColor(datum),\n textColor: getTextColor(datum),\n opacity: 0\n };\n },\n update: function update(d) {\n return {\n startAngle: d.arc.startAngle,\n endAngle: d.arc.endAngle,\n innerRadius: d.arc.innerRadius,\n outerRadius: d.arc.outerRadius,\n offset: offset,\n diagonalLength: diagonalLength,\n straightLength: straightLength,\n textOffset: textOffset,\n linkColor: getLinkColor(d),\n textColor: getTextColor(d),\n opacity: 1\n };\n },\n leave: function leave(d) {\n return {\n startAngle: d.arc.startAngle,\n endAngle: d.arc.endAngle,\n innerRadius: d.arc.innerRadius,\n outerRadius: d.arc.outerRadius,\n offset: offset,\n diagonalLength: 0,\n straightLength: 0,\n textOffset: textOffset,\n linkColor: getLinkColor(d),\n textColor: getTextColor(d),\n opacity: 0\n };\n }\n };\n }, [diagonalLength, straightLength, textOffset, getLinkColor, getTextColor]);\n};\n\nvar interpolateLink = function interpolateLink(startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue, offsetValue, diagonalLengthValue, straightLengthValue) {\n return to([startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue, offsetValue, diagonalLengthValue, straightLengthValue], function (startAngle, endAngle, innerRadius, outerRadius, offset, diagonalLengthAnimated, straightLengthAnimated) {\n var _computeArcLink = computeArcLink({\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: innerRadius,\n outerRadius: outerRadius\n }, offset, diagonalLengthAnimated, straightLengthAnimated),\n points = _computeArcLink.points;\n\n return lineGenerator(points);\n });\n};\n\nvar interpolateTextAnchor = function interpolateTextAnchor(startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue) {\n return to([startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue], function (startAngle, endAngle, innerRadius, outerRadius) {\n return computeArcLinkTextAnchor({\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: innerRadius,\n outerRadius: outerRadius\n });\n });\n};\n\nvar interpolateTextPosition = function interpolateTextPosition(startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue, offsetValue, diagonalLengthValue, straightLengthValue, textOffsetValue) {\n return to([startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue, offsetValue, diagonalLengthValue, straightLengthValue, textOffsetValue], function (startAngle, endAngle, innerRadius, outerRadius, offset, diagonalLengthAnimated, straightLengthAnimated, textOffset) {\n var _computeArcLink2 = computeArcLink({\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: innerRadius,\n outerRadius: outerRadius\n }, offset, diagonalLengthAnimated, straightLengthAnimated),\n points = _computeArcLink2.points,\n side = _computeArcLink2.side;\n\n var position = points[2];\n\n if (side === 'before') {\n position.x -= textOffset;\n } else {\n position.x += textOffset;\n }\n\n return \"translate(\".concat(position.x, \",\").concat(position.y, \")\");\n });\n};\n\nvar useArcLinkLabelsTransition = function useArcLinkLabelsTransition(_ref2) {\n var data = _ref2.data,\n _ref2$offset = _ref2.offset,\n offset = _ref2$offset === void 0 ? 0 : _ref2$offset,\n diagonalLength = _ref2.diagonalLength,\n straightLength = _ref2.straightLength,\n _ref2$skipAngle = _ref2.skipAngle,\n skipAngle = _ref2$skipAngle === void 0 ? 0 : _ref2$skipAngle,\n textOffset = _ref2.textOffset,\n linkColor = _ref2.linkColor,\n textColor = _ref2.textColor;\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n\n var theme = useTheme();\n var getLinkColor = useInheritedColor(linkColor, theme);\n var getTextColor = useInheritedColor(textColor, theme);\n var filteredData = useFilteredDataBySkipAngle(data, skipAngle);\n var transitionPhases = useTransitionPhases({\n offset: offset,\n diagonalLength: diagonalLength,\n straightLength: straightLength,\n textOffset: textOffset,\n getLinkColor: getLinkColor,\n getTextColor: getTextColor\n });\n var transition = useTransition(filteredData, {\n keys: function keys(datum) {\n return datum.id;\n },\n initial: transitionPhases.update,\n from: transitionPhases.enter,\n enter: transitionPhases.update,\n update: transitionPhases.update,\n leave: transitionPhases.leave,\n config: springConfig,\n immediate: !animate\n });\n return {\n transition: transition,\n interpolateLink: interpolateLink,\n interpolateTextAnchor: interpolateTextAnchor,\n interpolateTextPosition: interpolateTextPosition\n };\n};\n\nvar ArcLinkLabel = function ArcLinkLabel(_ref) {\n var label = _ref.label,\n style = _ref.style;\n var theme = useTheme();\n return jsxs(animated.g, {\n opacity: style.opacity,\n children: [jsx(animated.path, {\n fill: \"none\",\n stroke: style.linkColor,\n strokeWidth: style.thickness,\n d: style.path\n }), jsx(animated.text, {\n transform: style.textPosition,\n textAnchor: style.textAnchor,\n dominantBaseline: \"central\",\n style: _objectSpread2(_objectSpread2({}, theme.labels.text), {}, {\n fill: style.textColor\n }),\n children: label\n })]\n });\n};\n\nvar ArcLinkLabelsLayer = function ArcLinkLabelsLayer(_ref) {\n var center = _ref.center,\n data = _ref.data,\n labelAccessor = _ref.label,\n skipAngle = _ref.skipAngle,\n offset = _ref.offset,\n diagonalLength = _ref.diagonalLength,\n straightLength = _ref.straightLength,\n strokeWidth = _ref.strokeWidth,\n textOffset = _ref.textOffset,\n textColor = _ref.textColor,\n linkColor = _ref.linkColor,\n _ref$component = _ref.component,\n component = _ref$component === void 0 ? ArcLinkLabel : _ref$component;\n var getLabel = usePropertyAccessor(labelAccessor);\n\n var _useArcLinkLabelsTran = useArcLinkLabelsTransition({\n data: data,\n skipAngle: skipAngle,\n offset: offset,\n diagonalLength: diagonalLength,\n straightLength: straightLength,\n textOffset: textOffset,\n linkColor: linkColor,\n textColor: textColor\n }),\n transition = _useArcLinkLabelsTran.transition,\n interpolateLink = _useArcLinkLabelsTran.interpolateLink,\n interpolateTextAnchor = _useArcLinkLabelsTran.interpolateTextAnchor,\n interpolateTextPosition = _useArcLinkLabelsTran.interpolateTextPosition;\n\n var Label = component;\n return jsx(\"g\", {\n transform: \"translate(\".concat(center[0], \",\").concat(center[1], \")\"),\n children: transition(function (transitionProps, datum) {\n return createElement(Label, {\n key: datum.id,\n datum: datum,\n label: getLabel(datum),\n style: _objectSpread2(_objectSpread2({}, transitionProps), {}, {\n thickness: strokeWidth,\n path: interpolateLink(transitionProps.startAngle, transitionProps.endAngle, transitionProps.innerRadius, transitionProps.outerRadius, transitionProps.offset, transitionProps.diagonalLength, transitionProps.straightLength),\n textAnchor: interpolateTextAnchor(transitionProps.startAngle, transitionProps.endAngle, transitionProps.innerRadius, transitionProps.outerRadius),\n textPosition: interpolateTextPosition(transitionProps.startAngle, transitionProps.endAngle, transitionProps.innerRadius, transitionProps.outerRadius, transitionProps.offset, transitionProps.diagonalLength, transitionProps.straightLength, transitionProps.textOffset)\n })\n });\n })\n });\n};\n\nvar drawCanvasArcLinkLabels = function drawCanvasArcLinkLabels(ctx, labels, theme, strokeWidth) {\n ctx.textBaseline = 'middle';\n ctx.font = \"\".concat(theme.labels.text.fontSize, \"px \").concat(theme.labels.text.fontFamily);\n labels.forEach(function (label) {\n ctx.fillStyle = label.textColor;\n ctx.textAlign = textPropsByEngine.canvas.align[label.textAnchor];\n ctx.fillText(\"\".concat(label.label), label.x, label.y);\n ctx.beginPath();\n ctx.strokeStyle = label.linkColor;\n ctx.lineWidth = strokeWidth;\n label.points.forEach(function (point, index) {\n if (index === 0) ctx.moveTo(point.x, point.y);else ctx.lineTo(point.x, point.y);\n });\n ctx.stroke();\n });\n};\n\nvar useArcLinks = function useArcLinks(_ref) {\n var data = _ref.data,\n _ref$skipAngle = _ref.skipAngle,\n skipAngle = _ref$skipAngle === void 0 ? 0 : _ref$skipAngle,\n _ref$offset = _ref.offset,\n offset = _ref$offset === void 0 ? 0.5 : _ref$offset,\n diagonalLength = _ref.diagonalLength,\n straightLength = _ref.straightLength,\n _ref$computeExtraProp = _ref.computeExtraProps,\n computeExtraProps = _ref$computeExtraProp === void 0 ? function () {\n return {};\n } : _ref$computeExtraProp;\n var links = useMemo(function () {\n return data.filter(function (datum) {\n return Math.abs(radiansToDegrees(datum.arc.endAngle - datum.arc.startAngle)) >= skipAngle;\n }).map(function (datum) {\n return _objectSpread2(_objectSpread2({}, computeArcLink(datum.arc, offset, diagonalLength, straightLength)), {}, {\n data: datum\n });\n });\n }, [data, skipAngle, offset, diagonalLength, straightLength]);\n return useMemo(function () {\n return links.map(function (link) {\n return _objectSpread2(_objectSpread2({}, computeExtraProps(link)), link);\n });\n }, [links, computeExtraProps]);\n};\n\nvar useArcLinkLabels = function useArcLinkLabels(_ref) {\n var data = _ref.data,\n skipAngle = _ref.skipAngle,\n offset = _ref.offset,\n diagonalLength = _ref.diagonalLength,\n straightLength = _ref.straightLength,\n _ref$textOffset = _ref.textOffset,\n textOffset = _ref$textOffset === void 0 ? 0 : _ref$textOffset,\n label = _ref.label,\n linkColor = _ref.linkColor,\n textColor = _ref.textColor;\n var getLabel = usePropertyAccessor(label);\n var theme = useTheme();\n var getLinkColor = useInheritedColor(linkColor, theme);\n var getTextColor = useInheritedColor(textColor, theme);\n var computeExtraProps = useCallback(function (link) {\n var position = {\n x: link.points[2].x,\n y: link.points[2].y\n };\n var textAnchor;\n\n if (link.side === 'before') {\n position.x -= textOffset;\n textAnchor = 'end';\n } else {\n position.x += textOffset;\n textAnchor = 'start';\n }\n\n return _objectSpread2(_objectSpread2({}, position), {}, {\n label: getLabel(link.data),\n linkColor: getLinkColor(link.data),\n textAnchor: textAnchor,\n textColor: getTextColor(link.data)\n });\n }, [getLabel, getLinkColor, getTextColor, textOffset]);\n return useArcLinks({\n data: data,\n skipAngle: skipAngle,\n offset: offset,\n diagonalLength: diagonalLength,\n straightLength: straightLength,\n computeExtraProps: computeExtraProps\n });\n};\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nvar ArcLine = function ArcLine(_ref) {\n var animatedProps = _ref.animated,\n rest = _objectWithoutProperties(_ref, [\"animated\"]);\n\n return jsx(animated.path, _objectSpread2({\n d: to([animatedProps.radius, animatedProps.startAngle, animatedProps.endAngle], function (radius, start, end) {\n return generateSvgArc(radius, start, end);\n })\n }, rest));\n};\n\nvar ArcShape = function ArcShape(_ref) {\n var datum = _ref.datum,\n style = _ref.style,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave;\n var handleClick = useCallback(function (event) {\n return onClick === null || onClick === void 0 ? void 0 : onClick(datum, event);\n }, [onClick, datum]);\n var handleMouseEnter = useCallback(function (event) {\n return onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(datum, event);\n }, [onMouseEnter, datum]);\n var handleMouseMove = useCallback(function (event) {\n return onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(datum, event);\n }, [onMouseMove, datum]);\n var handleMouseLeave = useCallback(function (event) {\n return onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(datum, event);\n }, [onMouseLeave, datum]);\n return jsx(animated.path, {\n d: style.path,\n opacity: style.opacity,\n fill: datum.fill || style.color,\n stroke: style.borderColor,\n strokeWidth: style.borderWidth,\n onClick: onClick ? handleClick : undefined,\n onMouseEnter: onMouseEnter ? handleMouseEnter : undefined,\n onMouseMove: onMouseMove ? handleMouseMove : undefined,\n onMouseLeave: onMouseLeave ? handleMouseLeave : undefined\n });\n};\n\nvar interpolateArc = function interpolateArc(startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue, arcGenerator) {\n return to([startAngleValue, endAngleValue, innerRadiusValue, outerRadiusValue], function (startAngle, endAngle, innerRadius, outerRadius) {\n return arcGenerator({\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: Math.max(0, innerRadius),\n outerRadius: Math.max(0, outerRadius)\n });\n });\n};\n\nvar useArcsTransition = function useArcsTransition(data) {\n var mode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'innerRadius';\n var extra = arguments.length > 2 ? arguments[2] : undefined;\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n\n var phases = useArcTransitionMode(mode, extra);\n var transition = useTransition(data, {\n keys: function keys(datum) {\n return datum.id;\n },\n initial: phases.update,\n from: phases.enter,\n enter: phases.update,\n update: phases.update,\n leave: phases.leave,\n config: springConfig,\n immediate: !animate\n });\n return {\n transition: transition,\n interpolate: interpolateArc\n };\n};\n\nvar ArcsLayer = function ArcsLayer(_ref) {\n var center = _ref.center,\n data = _ref.data,\n arcGenerator = _ref.arcGenerator,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n transitionMode = _ref.transitionMode,\n _ref$component = _ref.component,\n component = _ref$component === void 0 ? ArcShape : _ref$component;\n var theme = useTheme();\n var getBorderColor = useInheritedColor(borderColor, theme);\n\n var _useArcsTransition = useArcsTransition(data, transitionMode, {\n enter: function enter(datum) {\n return {\n opacity: 0,\n color: datum.color,\n borderColor: getBorderColor(datum)\n };\n },\n update: function update(datum) {\n return {\n opacity: 1,\n color: datum.color,\n borderColor: getBorderColor(datum)\n };\n },\n leave: function leave(datum) {\n return {\n opacity: 0,\n color: datum.color,\n borderColor: getBorderColor(datum)\n };\n }\n }),\n transition = _useArcsTransition.transition,\n interpolate = _useArcsTransition.interpolate;\n\n var Arc = component;\n return jsx(\"g\", {\n transform: \"translate(\".concat(center[0], \",\").concat(center[1], \")\"),\n children: transition(function (transitionProps, datum) {\n return createElement(Arc, {\n key: datum.id,\n datum: datum,\n style: _objectSpread2(_objectSpread2({}, transitionProps), {}, {\n borderWidth: borderWidth,\n path: interpolate(transitionProps.startAngle, transitionProps.endAngle, transitionProps.innerRadius, transitionProps.outerRadius, arcGenerator)\n }),\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave\n });\n })\n });\n};\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar computeArcBoundingBox = function computeArcBoundingBox(centerX, centerY, radius, startAngle, endAngle) {\n var includeCenter = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : true;\n var points = [];\n var p0 = positionFromAngle(degreesToRadians(startAngle), radius);\n points.push([p0.x, p0.y]);\n var p1 = positionFromAngle(degreesToRadians(endAngle), radius);\n points.push([p1.x, p1.y]);\n\n for (var angle = Math.round(Math.min(startAngle, endAngle)); angle <= Math.round(Math.max(startAngle, endAngle)); angle++) {\n if (angle % 90 === 0) {\n var p = positionFromAngle(degreesToRadians(angle), radius);\n points.push([p.x, p.y]);\n }\n }\n\n points = points.map(function (_ref) {\n var _ref2 = _slicedToArray(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n return [centerX + x, centerY + y];\n });\n\n if (includeCenter) {\n points.push([centerX, centerY]);\n }\n\n var xs = points.map(function (_ref3) {\n var _ref4 = _slicedToArray(_ref3, 1),\n x = _ref4[0];\n\n return x;\n });\n var ys = points.map(function (_ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n y = _ref6[1];\n\n return y;\n });\n var x0 = Math.min.apply(Math, _toConsumableArray(xs));\n var x1 = Math.max.apply(Math, _toConsumableArray(xs));\n var y0 = Math.min.apply(Math, _toConsumableArray(ys));\n var y1 = Math.max.apply(Math, _toConsumableArray(ys));\n return {\n points: points,\n x: x0,\n y: y0,\n width: x1 - x0,\n height: y1 - y0\n };\n};\n\nvar isCursorInRing = function isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY) {\n var distance = getDistance(cursorX, cursorY, centerX, centerY);\n return distance < radius && distance > innerRadius;\n};\n\nvar findArcUnderCursor = function findArcUnderCursor(centerX, centerY, radius, innerRadius, arcs, cursorX, cursorY) {\n if (!isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY)) {\n return undefined;\n }\n\n var cursorAngle = getAngle(cursorX, cursorY, centerX, centerY);\n return arcs.find(function (_ref) {\n var startAngle = _ref.startAngle,\n endAngle = _ref.endAngle;\n return cursorAngle >= startAngle && cursorAngle < endAngle;\n });\n};\n\nvar useAnimatedArc = function useAnimatedArc(datumWithArc, arcGenerator) {\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.config;\n\n var animatedValues = useSpring({\n startAngle: datumWithArc.arc.startAngle,\n endAngle: datumWithArc.arc.endAngle,\n innerRadius: datumWithArc.arc.innerRadius,\n outerRadius: datumWithArc.arc.outerRadius,\n config: springConfig,\n immediate: !animate\n });\n return _objectSpread2(_objectSpread2({}, animatedValues), {}, {\n path: interpolateArc(animatedValues.startAngle, animatedValues.endAngle, animatedValues.innerRadius, animatedValues.outerRadius, arcGenerator)\n });\n};\n\nvar useArcGenerator = function useArcGenerator() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$cornerRadius = _ref.cornerRadius,\n cornerRadius = _ref$cornerRadius === void 0 ? 0 : _ref$cornerRadius,\n _ref$padAngle = _ref.padAngle,\n padAngle = _ref$padAngle === void 0 ? 0 : _ref$padAngle;\n\n return useMemo(function () {\n return arc().innerRadius(function (arc) {\n return arc.innerRadius;\n }).outerRadius(function (arc) {\n return arc.outerRadius;\n }).cornerRadius(cornerRadius).padAngle(padAngle);\n }, [cornerRadius, padAngle]);\n};\n\nexport { ArcLabelsLayer, ArcLine, ArcLinkLabelsLayer, ArcShape, ArcsLayer, arcTransitionModeById, arcTransitionModes, computeArcBoundingBox, computeArcCenter, computeArcLink, computeArcLinkTextAnchor, drawCanvasArcLabels, drawCanvasArcLinkLabels, findArcUnderCursor, interpolateArc, interpolateArcCenter, isCursorInRing, useAnimatedArc, useArcCenters, useArcCentersTransition, useArcGenerator, useArcLabels, useArcLinkLabels, useArcLinkLabelsTransition, useArcLinks, useArcTransitionMode, useArcsTransition };","export default function (a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}","export default function (d) {\n return d;\n}","import { useMemo, useState, useCallback, createElement, Fragment as Fragment$1, useRef, useEffect } from 'react';\nimport { usePropertyAccessor, useValueFormatter, degreesToRadians, radiansToDegrees, Container, useDimensions, bindDefs, SvgWrapper, ResponsiveWrapper, useTheme, getRelativeCursor } from '@nivo/core';\nimport { useArcGenerator, computeArcBoundingBox, ArcsLayer, ArcLinkLabelsLayer, ArcLabelsLayer, useArcLabels, useArcLinkLabels, drawCanvasArcLinkLabels, drawCanvasArcLabels, findArcUnderCursor } from '@nivo/arcs';\nimport { BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport { jsx, Fragment } from 'react/jsx-runtime';\nimport { pie } from 'd3-shape';\nimport { useOrdinalColorScale, useInheritedColor } from '@nivo/colors';\nimport { BasicTooltip, useTooltip } from '@nivo/tooltip';\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nfunction ownKeys(object, enumerableOnly) {\n var keys = Object.keys(object);\n\n if (Object.getOwnPropertySymbols) {\n var symbols = Object.getOwnPropertySymbols(object);\n if (enumerableOnly) symbols = symbols.filter(function (sym) {\n return Object.getOwnPropertyDescriptor(object, sym).enumerable;\n });\n keys.push.apply(keys, symbols);\n }\n\n return keys;\n}\n\nfunction _objectSpread2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n\n if (i % 2) {\n ownKeys(Object(source), true).forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n } else if (Object.getOwnPropertyDescriptors) {\n Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));\n } else {\n ownKeys(Object(source)).forEach(function (key) {\n Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));\n });\n }\n }\n\n return target;\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose(source, excluded);\n\n var key, i;\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nvar PieLegends = function PieLegends(_ref) {\n var width = _ref.width,\n height = _ref.height,\n legends = _ref.legends,\n data = _ref.data,\n toggleSerie = _ref.toggleSerie;\n return jsx(Fragment, {\n children: legends.map(function (legend, i) {\n var _legend$data;\n\n return jsx(BoxLegendSvg, _objectSpread2(_objectSpread2({}, legend), {}, {\n containerWidth: width,\n containerHeight: height,\n data: (_legend$data = legend.data) !== null && _legend$data !== void 0 ? _legend$data : data,\n toggleSerie: legend.toggleSerie ? toggleSerie : undefined\n }), i);\n })\n });\n};\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n}\n\nfunction _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (typeof Symbol === \"undefined\" || !(Symbol.iterator in Object(arr))) return;\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();\n}\n\nvar PieTooltip = function PieTooltip(_ref) {\n var datum = _ref.datum;\n return jsx(BasicTooltip, {\n id: datum.id,\n value: datum.formattedValue,\n enableChip: true,\n color: datum.color\n });\n};\n\nvar _window$devicePixelRa;\n\nvar defaultProps = {\n id: 'id',\n value: 'value',\n sortByValue: false,\n innerRadius: 0,\n padAngle: 0,\n cornerRadius: 0,\n layers: ['arcLinkLabels', 'arcs', 'arcLabels', 'legends'],\n startAngle: 0,\n endAngle: 360,\n fit: true,\n activeInnerRadiusOffset: 0,\n activeOuterRadiusOffset: 0,\n borderWidth: 0,\n borderColor: {\n from: 'color',\n modifiers: [['darker', 1]]\n },\n enableArcLabels: true,\n arcLabel: 'formattedValue',\n arcLabelsSkipAngle: 0,\n arcLabelsRadiusOffset: 0.5,\n arcLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n enableArcLinkLabels: true,\n arcLinkLabel: 'id',\n arcLinkLabelsSkipAngle: 0,\n arcLinkLabelsOffset: 0,\n arcLinkLabelsDiagonalLength: 16,\n arcLinkLabelsStraightLength: 24,\n arcLinkLabelsThickness: 1,\n arcLinkLabelsTextOffset: 6,\n arcLinkLabelsTextColor: {\n theme: 'labels.text.fill'\n },\n arcLinkLabelsColor: {\n theme: 'axis.ticks.line.stroke'\n },\n colors: {\n scheme: 'nivo'\n },\n defs: [],\n fill: [],\n isInteractive: true,\n animate: true,\n motionConfig: 'gentle',\n transitionMode: 'innerRadius',\n tooltip: PieTooltip,\n legends: [],\n role: 'img',\n pixelRatio: typeof window !== 'undefined' ? (_window$devicePixelRa = window.devicePixelRatio) !== null && _window$devicePixelRa !== void 0 ? _window$devicePixelRa : 1 : 1\n};\n\nvar useNormalizedData = function useNormalizedData(_ref) {\n var data = _ref.data,\n _ref$id = _ref.id,\n id = _ref$id === void 0 ? defaultProps.id : _ref$id,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? defaultProps.value : _ref$value,\n valueFormat = _ref.valueFormat,\n _ref$colors = _ref.colors,\n colors = _ref$colors === void 0 ? defaultProps.colors : _ref$colors;\n var getId = usePropertyAccessor(id);\n var getValue = usePropertyAccessor(value);\n var formatValue = useValueFormatter(valueFormat);\n var getColor = useOrdinalColorScale(colors, 'id');\n return useMemo(function () {\n return data.map(function (datum) {\n var _datum$label;\n\n var datumId = getId(datum);\n var datumValue = getValue(datum);\n var normalizedDatum = {\n id: datumId,\n label: (_datum$label = datum.label) !== null && _datum$label !== void 0 ? _datum$label : datumId,\n hidden: false,\n value: datumValue,\n formattedValue: formatValue(datumValue),\n data: datum\n };\n return _objectSpread2(_objectSpread2({}, normalizedDatum), {}, {\n color: getColor(normalizedDatum)\n });\n });\n }, [data, getId, getValue, formatValue, getColor]);\n};\n\nvar usePieArcs = function usePieArcs(_ref2) {\n var data = _ref2.data,\n startAngle = _ref2.startAngle,\n endAngle = _ref2.endAngle,\n innerRadius = _ref2.innerRadius,\n outerRadius = _ref2.outerRadius,\n padAngle = _ref2.padAngle,\n sortByValue = _ref2.sortByValue,\n activeId = _ref2.activeId,\n activeInnerRadiusOffset = _ref2.activeInnerRadiusOffset,\n activeOuterRadiusOffset = _ref2.activeOuterRadiusOffset,\n hiddenIds = _ref2.hiddenIds;\n var pie$1 = useMemo(function () {\n var innerPie = pie().value(function (d) {\n return d.value;\n }).startAngle(degreesToRadians(startAngle)).endAngle(degreesToRadians(endAngle)).padAngle(degreesToRadians(padAngle));\n\n if (!sortByValue) {\n innerPie.sortValues(null);\n }\n\n return innerPie;\n }, [startAngle, endAngle, padAngle, sortByValue]);\n return useMemo(function () {\n var hiddenData = data.filter(function (item) {\n return !hiddenIds.includes(item.id);\n });\n var dataWithArc = pie$1(hiddenData).map(function (arc) {\n var angle = Math.abs(arc.endAngle - arc.startAngle);\n return _objectSpread2(_objectSpread2({}, arc.data), {}, {\n arc: {\n index: arc.index,\n startAngle: arc.startAngle,\n endAngle: arc.endAngle,\n innerRadius: activeId === arc.data.id ? innerRadius - activeInnerRadiusOffset : innerRadius,\n outerRadius: activeId === arc.data.id ? outerRadius + activeOuterRadiusOffset : outerRadius,\n thickness: outerRadius - innerRadius,\n padAngle: arc.padAngle,\n angle: angle,\n angleDeg: radiansToDegrees(angle)\n }\n });\n });\n var legendData = data.map(function (item) {\n return _objectSpread2(_objectSpread2({}, item), {}, {\n hidden: hiddenIds.includes(item.id)\n });\n });\n return {\n dataWithArc: dataWithArc,\n legendData: legendData\n };\n }, [pie$1, data, hiddenIds, activeId, innerRadius, activeInnerRadiusOffset, outerRadius, activeOuterRadiusOffset]);\n};\n\nvar usePie = function usePie(_ref3) {\n var data = _ref3.data,\n radius = _ref3.radius,\n innerRadius = _ref3.innerRadius,\n _ref3$startAngle = _ref3.startAngle,\n startAngle = _ref3$startAngle === void 0 ? defaultProps.startAngle : _ref3$startAngle,\n _ref3$endAngle = _ref3.endAngle,\n endAngle = _ref3$endAngle === void 0 ? defaultProps.endAngle : _ref3$endAngle,\n _ref3$padAngle = _ref3.padAngle,\n padAngle = _ref3$padAngle === void 0 ? defaultProps.padAngle : _ref3$padAngle,\n _ref3$sortByValue = _ref3.sortByValue,\n sortByValue = _ref3$sortByValue === void 0 ? defaultProps.sortByValue : _ref3$sortByValue,\n _ref3$cornerRadius = _ref3.cornerRadius,\n cornerRadius = _ref3$cornerRadius === void 0 ? defaultProps.cornerRadius : _ref3$cornerRadius,\n _ref3$activeInnerRadi = _ref3.activeInnerRadiusOffset,\n activeInnerRadiusOffset = _ref3$activeInnerRadi === void 0 ? defaultProps.activeInnerRadiusOffset : _ref3$activeInnerRadi,\n _ref3$activeOuterRadi = _ref3.activeOuterRadiusOffset,\n activeOuterRadiusOffset = _ref3$activeOuterRadi === void 0 ? defaultProps.activeOuterRadiusOffset : _ref3$activeOuterRadi;\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n activeId = _useState2[0],\n setActiveId = _useState2[1];\n\n var _useState3 = useState([]),\n _useState4 = _slicedToArray(_useState3, 2),\n hiddenIds = _useState4[0],\n setHiddenIds = _useState4[1];\n\n var pieArcs = usePieArcs({\n data: data,\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: innerRadius,\n outerRadius: radius,\n padAngle: padAngle,\n sortByValue: sortByValue,\n activeId: activeId,\n activeInnerRadiusOffset: activeInnerRadiusOffset,\n activeOuterRadiusOffset: activeOuterRadiusOffset,\n hiddenIds: hiddenIds\n });\n var toggleSerie = useCallback(function (id) {\n setHiddenIds(function (state) {\n return state.indexOf(id) > -1 ? state.filter(function (item) {\n return item !== id;\n }) : [].concat(_toConsumableArray(state), [id]);\n });\n }, []);\n var arcGenerator = useArcGenerator({\n cornerRadius: cornerRadius,\n padAngle: degreesToRadians(padAngle)\n });\n return _objectSpread2(_objectSpread2({}, pieArcs), {}, {\n arcGenerator: arcGenerator,\n setActiveId: setActiveId,\n toggleSerie: toggleSerie\n });\n};\n\nvar usePieFromBox = function usePieFromBox(_ref4) {\n var data = _ref4.data,\n width = _ref4.width,\n height = _ref4.height,\n _ref4$innerRadius = _ref4.innerRadius,\n innerRadiusRatio = _ref4$innerRadius === void 0 ? defaultProps.innerRadius : _ref4$innerRadius,\n _ref4$startAngle = _ref4.startAngle,\n startAngle = _ref4$startAngle === void 0 ? defaultProps.startAngle : _ref4$startAngle,\n _ref4$endAngle = _ref4.endAngle,\n endAngle = _ref4$endAngle === void 0 ? defaultProps.endAngle : _ref4$endAngle,\n _ref4$padAngle = _ref4.padAngle,\n padAngle = _ref4$padAngle === void 0 ? defaultProps.padAngle : _ref4$padAngle,\n _ref4$sortByValue = _ref4.sortByValue,\n sortByValue = _ref4$sortByValue === void 0 ? defaultProps.sortByValue : _ref4$sortByValue,\n _ref4$cornerRadius = _ref4.cornerRadius,\n cornerRadius = _ref4$cornerRadius === void 0 ? defaultProps.cornerRadius : _ref4$cornerRadius,\n _ref4$fit = _ref4.fit,\n fit = _ref4$fit === void 0 ? defaultProps.fit : _ref4$fit,\n _ref4$activeInnerRadi = _ref4.activeInnerRadiusOffset,\n activeInnerRadiusOffset = _ref4$activeInnerRadi === void 0 ? defaultProps.activeInnerRadiusOffset : _ref4$activeInnerRadi,\n _ref4$activeOuterRadi = _ref4.activeOuterRadiusOffset,\n activeOuterRadiusOffset = _ref4$activeOuterRadi === void 0 ? defaultProps.activeOuterRadiusOffset : _ref4$activeOuterRadi;\n\n var _useState5 = useState(null),\n _useState6 = _slicedToArray(_useState5, 2),\n activeId = _useState6[0],\n setActiveId = _useState6[1];\n\n var _useState7 = useState([]),\n _useState8 = _slicedToArray(_useState7, 2),\n hiddenIds = _useState8[0],\n setHiddenIds = _useState8[1];\n\n var computedProps = useMemo(function () {\n var radius = Math.min(width, height) / 2;\n var innerRadius = radius * Math.min(innerRadiusRatio, 1);\n var centerX = width / 2;\n var centerY = height / 2;\n var boundingBox;\n\n if (fit) {\n var _computeArcBoundingBo = computeArcBoundingBox(centerX, centerY, radius, startAngle - 90, endAngle - 90),\n points = _computeArcBoundingBo.points,\n box = _objectWithoutProperties(_computeArcBoundingBo, [\"points\"]);\n\n var ratio = Math.min(width / box.width, height / box.height);\n var adjustedBox = {\n width: box.width * ratio,\n height: box.height * ratio\n };\n adjustedBox.x = (width - adjustedBox.width) / 2;\n adjustedBox.y = (height - adjustedBox.height) / 2;\n centerX = (centerX - box.x) / box.width * box.width * ratio + adjustedBox.x;\n centerY = (centerY - box.y) / box.height * box.height * ratio + adjustedBox.y;\n boundingBox = {\n box: box,\n ratio: ratio,\n points: points\n };\n radius = radius * ratio;\n innerRadius = innerRadius * ratio;\n }\n\n return {\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius,\n debug: boundingBox\n };\n }, [width, height, innerRadiusRatio, startAngle, endAngle, fit, cornerRadius]);\n var pieArcs = usePieArcs({\n data: data,\n startAngle: startAngle,\n endAngle: endAngle,\n innerRadius: computedProps.innerRadius,\n outerRadius: computedProps.radius,\n padAngle: padAngle,\n sortByValue: sortByValue,\n activeId: activeId,\n activeInnerRadiusOffset: activeInnerRadiusOffset,\n activeOuterRadiusOffset: activeOuterRadiusOffset,\n hiddenIds: hiddenIds\n });\n var toggleSerie = useCallback(function (id) {\n setHiddenIds(function (state) {\n return state.indexOf(id) > -1 ? state.filter(function (item) {\n return item !== id;\n }) : [].concat(_toConsumableArray(state), [id]);\n });\n }, []);\n var arcGenerator = useArcGenerator({\n cornerRadius: cornerRadius,\n padAngle: degreesToRadians(padAngle)\n });\n return _objectSpread2(_objectSpread2({\n arcGenerator: arcGenerator,\n setActiveId: setActiveId,\n toggleSerie: toggleSerie\n }, pieArcs), computedProps);\n};\n\nvar usePieLayerContext = function usePieLayerContext(_ref5) {\n var dataWithArc = _ref5.dataWithArc,\n arcGenerator = _ref5.arcGenerator,\n centerX = _ref5.centerX,\n centerY = _ref5.centerY,\n radius = _ref5.radius,\n innerRadius = _ref5.innerRadius;\n return useMemo(function () {\n return {\n dataWithArc: dataWithArc,\n arcGenerator: arcGenerator,\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius\n };\n }, [dataWithArc, arcGenerator, centerX, centerY, radius, innerRadius]);\n};\n\nvar Arcs = function Arcs(_ref) {\n var center = _ref.center,\n data = _ref.data,\n arcGenerator = _ref.arcGenerator,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n isInteractive = _ref.isInteractive,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n setActiveId = _ref.setActiveId,\n tooltip = _ref.tooltip,\n transitionMode = _ref.transitionMode;\n\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n\n var handleClick = useMemo(function () {\n if (!isInteractive) return undefined;\n return function (datum, event) {\n onClick === null || onClick === void 0 ? void 0 : onClick(datum, event);\n };\n }, [isInteractive, onClick]);\n var handleMouseEnter = useMemo(function () {\n if (!isInteractive) return undefined;\n return function (datum, event) {\n showTooltipFromEvent(createElement(tooltip, {\n datum: datum\n }), event);\n setActiveId(datum.id);\n onMouseEnter === null || onMouseEnter === void 0 ? void 0 : onMouseEnter(datum, event);\n };\n }, [isInteractive, showTooltipFromEvent, setActiveId, onMouseEnter]);\n var handleMouseMove = useMemo(function () {\n if (!isInteractive) return undefined;\n return function (datum, event) {\n showTooltipFromEvent(createElement(tooltip, {\n datum: datum\n }), event);\n onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(datum, event);\n };\n }, [isInteractive, showTooltipFromEvent, onMouseMove]);\n var handleMouseLeave = useMemo(function () {\n if (!isInteractive) return undefined;\n return function (datum, event) {\n hideTooltip();\n setActiveId(null);\n onMouseLeave === null || onMouseLeave === void 0 ? void 0 : onMouseLeave(datum, event);\n };\n }, [isInteractive, hideTooltip, setActiveId, onMouseLeave]);\n return jsx(ArcsLayer, {\n center: center,\n data: data,\n arcGenerator: arcGenerator,\n borderWidth: borderWidth,\n borderColor: borderColor,\n transitionMode: transitionMode,\n onClick: handleClick,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseMove,\n onMouseLeave: handleMouseLeave\n });\n};\n\nvar InnerPie = function InnerPie(_ref) {\n var data = _ref.data,\n _ref$id = _ref.id,\n id = _ref$id === void 0 ? defaultProps.id : _ref$id,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? defaultProps.value : _ref$value,\n valueFormat = _ref.valueFormat,\n _ref$sortByValue = _ref.sortByValue,\n sortByValue = _ref$sortByValue === void 0 ? defaultProps.sortByValue : _ref$sortByValue,\n _ref$layers = _ref.layers,\n layers = _ref$layers === void 0 ? defaultProps.layers : _ref$layers,\n _ref$startAngle = _ref.startAngle,\n startAngle = _ref$startAngle === void 0 ? defaultProps.startAngle : _ref$startAngle,\n _ref$endAngle = _ref.endAngle,\n endAngle = _ref$endAngle === void 0 ? defaultProps.endAngle : _ref$endAngle,\n _ref$padAngle = _ref.padAngle,\n padAngle = _ref$padAngle === void 0 ? defaultProps.padAngle : _ref$padAngle,\n _ref$fit = _ref.fit,\n fit = _ref$fit === void 0 ? defaultProps.fit : _ref$fit,\n _ref$innerRadius = _ref.innerRadius,\n innerRadiusRatio = _ref$innerRadius === void 0 ? defaultProps.innerRadius : _ref$innerRadius,\n _ref$cornerRadius = _ref.cornerRadius,\n cornerRadius = _ref$cornerRadius === void 0 ? defaultProps.cornerRadius : _ref$cornerRadius,\n _ref$activeInnerRadiu = _ref.activeInnerRadiusOffset,\n activeInnerRadiusOffset = _ref$activeInnerRadiu === void 0 ? defaultProps.activeInnerRadiusOffset : _ref$activeInnerRadiu,\n _ref$activeOuterRadiu = _ref.activeOuterRadiusOffset,\n activeOuterRadiusOffset = _ref$activeOuterRadiu === void 0 ? defaultProps.activeOuterRadiusOffset : _ref$activeOuterRadiu,\n width = _ref.width,\n height = _ref.height,\n partialMargin = _ref.margin,\n _ref$colors = _ref.colors,\n colors = _ref$colors === void 0 ? defaultProps.colors : _ref$colors,\n _ref$borderWidth = _ref.borderWidth,\n borderWidth = _ref$borderWidth === void 0 ? defaultProps.borderWidth : _ref$borderWidth,\n _ref$borderColor = _ref.borderColor,\n borderColor = _ref$borderColor === void 0 ? defaultProps.borderColor : _ref$borderColor,\n _ref$enableArcLabels = _ref.enableArcLabels,\n enableArcLabels = _ref$enableArcLabels === void 0 ? defaultProps.enableArcLabels : _ref$enableArcLabels,\n _ref$arcLabel = _ref.arcLabel,\n arcLabel = _ref$arcLabel === void 0 ? defaultProps.arcLabel : _ref$arcLabel,\n _ref$arcLabelsSkipAng = _ref.arcLabelsSkipAngle,\n arcLabelsSkipAngle = _ref$arcLabelsSkipAng === void 0 ? defaultProps.arcLabelsSkipAngle : _ref$arcLabelsSkipAng,\n _ref$arcLabelsTextCol = _ref.arcLabelsTextColor,\n arcLabelsTextColor = _ref$arcLabelsTextCol === void 0 ? defaultProps.arcLabelsTextColor : _ref$arcLabelsTextCol,\n _ref$arcLabelsRadiusO = _ref.arcLabelsRadiusOffset,\n arcLabelsRadiusOffset = _ref$arcLabelsRadiusO === void 0 ? defaultProps.arcLabelsRadiusOffset : _ref$arcLabelsRadiusO,\n arcLabelsComponent = _ref.arcLabelsComponent,\n _ref$enableArcLinkLab = _ref.enableArcLinkLabels,\n enableArcLinkLabels = _ref$enableArcLinkLab === void 0 ? defaultProps.enableArcLinkLabels : _ref$enableArcLinkLab,\n _ref$arcLinkLabel = _ref.arcLinkLabel,\n arcLinkLabel = _ref$arcLinkLabel === void 0 ? defaultProps.arcLinkLabel : _ref$arcLinkLabel,\n _ref$arcLinkLabelsSki = _ref.arcLinkLabelsSkipAngle,\n arcLinkLabelsSkipAngle = _ref$arcLinkLabelsSki === void 0 ? defaultProps.arcLinkLabelsSkipAngle : _ref$arcLinkLabelsSki,\n _ref$arcLinkLabelsOff = _ref.arcLinkLabelsOffset,\n arcLinkLabelsOffset = _ref$arcLinkLabelsOff === void 0 ? defaultProps.arcLinkLabelsOffset : _ref$arcLinkLabelsOff,\n _ref$arcLinkLabelsDia = _ref.arcLinkLabelsDiagonalLength,\n arcLinkLabelsDiagonalLength = _ref$arcLinkLabelsDia === void 0 ? defaultProps.arcLinkLabelsDiagonalLength : _ref$arcLinkLabelsDia,\n _ref$arcLinkLabelsStr = _ref.arcLinkLabelsStraightLength,\n arcLinkLabelsStraightLength = _ref$arcLinkLabelsStr === void 0 ? defaultProps.arcLinkLabelsStraightLength : _ref$arcLinkLabelsStr,\n _ref$arcLinkLabelsThi = _ref.arcLinkLabelsThickness,\n arcLinkLabelsThickness = _ref$arcLinkLabelsThi === void 0 ? defaultProps.arcLinkLabelsThickness : _ref$arcLinkLabelsThi,\n _ref$arcLinkLabelsTex = _ref.arcLinkLabelsTextOffset,\n arcLinkLabelsTextOffset = _ref$arcLinkLabelsTex === void 0 ? defaultProps.arcLinkLabelsTextOffset : _ref$arcLinkLabelsTex,\n _ref$arcLinkLabelsTex2 = _ref.arcLinkLabelsTextColor,\n arcLinkLabelsTextColor = _ref$arcLinkLabelsTex2 === void 0 ? defaultProps.arcLinkLabelsTextColor : _ref$arcLinkLabelsTex2,\n _ref$arcLinkLabelsCol = _ref.arcLinkLabelsColor,\n arcLinkLabelsColor = _ref$arcLinkLabelsCol === void 0 ? defaultProps.arcLinkLabelsColor : _ref$arcLinkLabelsCol,\n arcLinkLabelComponent = _ref.arcLinkLabelComponent,\n _ref$defs = _ref.defs,\n defs = _ref$defs === void 0 ? defaultProps.defs : _ref$defs,\n _ref$fill = _ref.fill,\n fill = _ref$fill === void 0 ? defaultProps.fill : _ref$fill,\n _ref$isInteractive = _ref.isInteractive,\n isInteractive = _ref$isInteractive === void 0 ? defaultProps.isInteractive : _ref$isInteractive,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n _ref$tooltip = _ref.tooltip,\n tooltip = _ref$tooltip === void 0 ? defaultProps.tooltip : _ref$tooltip,\n _ref$transitionMode = _ref.transitionMode,\n transitionMode = _ref$transitionMode === void 0 ? defaultProps.transitionMode : _ref$transitionMode,\n _ref$legends = _ref.legends,\n legends = _ref$legends === void 0 ? defaultProps.legends : _ref$legends,\n _ref$role = _ref.role,\n role = _ref$role === void 0 ? defaultProps.role : _ref$role;\n\n var _useDimensions = useDimensions(width, height, partialMargin),\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight,\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight;\n\n var normalizedData = useNormalizedData({\n data: data,\n id: id,\n value: value,\n valueFormat: valueFormat,\n colors: colors\n });\n\n var _usePieFromBox = usePieFromBox({\n data: normalizedData,\n width: innerWidth,\n height: innerHeight,\n fit: fit,\n innerRadius: innerRadiusRatio,\n startAngle: startAngle,\n endAngle: endAngle,\n padAngle: padAngle,\n sortByValue: sortByValue,\n cornerRadius: cornerRadius,\n activeInnerRadiusOffset: activeInnerRadiusOffset,\n activeOuterRadiusOffset: activeOuterRadiusOffset\n }),\n dataWithArc = _usePieFromBox.dataWithArc,\n legendData = _usePieFromBox.legendData,\n arcGenerator = _usePieFromBox.arcGenerator,\n centerX = _usePieFromBox.centerX,\n centerY = _usePieFromBox.centerY,\n radius = _usePieFromBox.radius,\n innerRadius = _usePieFromBox.innerRadius,\n setActiveId = _usePieFromBox.setActiveId,\n toggleSerie = _usePieFromBox.toggleSerie;\n\n var boundDefs = bindDefs(defs, dataWithArc, fill);\n var layerById = {\n arcLinkLabels: null,\n arcs: null,\n arcLabels: null,\n legends: null\n };\n\n if (enableArcLinkLabels && layers.includes('arcLinkLabels')) {\n layerById.arcLinkLabels = jsx(ArcLinkLabelsLayer, {\n center: [centerX, centerY],\n data: dataWithArc,\n label: arcLinkLabel,\n skipAngle: arcLinkLabelsSkipAngle,\n offset: arcLinkLabelsOffset,\n diagonalLength: arcLinkLabelsDiagonalLength,\n straightLength: arcLinkLabelsStraightLength,\n strokeWidth: arcLinkLabelsThickness,\n textOffset: arcLinkLabelsTextOffset,\n textColor: arcLinkLabelsTextColor,\n linkColor: arcLinkLabelsColor,\n component: arcLinkLabelComponent\n }, \"arcLinkLabels\");\n }\n\n if (layers.includes('arcs')) {\n layerById.arcs = jsx(Arcs, {\n center: [centerX, centerY],\n data: dataWithArc,\n arcGenerator: arcGenerator,\n borderWidth: borderWidth,\n borderColor: borderColor,\n isInteractive: isInteractive,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseMove: onMouseMove,\n onMouseLeave: onMouseLeave,\n setActiveId: setActiveId,\n tooltip: tooltip,\n transitionMode: transitionMode\n }, \"arcs\");\n }\n\n if (enableArcLabels && layers.includes('arcLabels')) {\n layerById.arcLabels = jsx(ArcLabelsLayer, {\n center: [centerX, centerY],\n data: dataWithArc,\n label: arcLabel,\n radiusOffset: arcLabelsRadiusOffset,\n skipAngle: arcLabelsSkipAngle,\n textColor: arcLabelsTextColor,\n transitionMode: transitionMode,\n component: arcLabelsComponent\n }, \"arcLabels\");\n }\n\n if (legends.length > 0 && layers.includes('legends')) {\n layerById.legends = jsx(PieLegends, {\n width: innerWidth,\n height: innerHeight,\n data: legendData,\n legends: legends,\n toggleSerie: toggleSerie\n }, \"legends\");\n }\n\n var layerContext = usePieLayerContext({\n dataWithArc: dataWithArc,\n arcGenerator: arcGenerator,\n centerX: centerX,\n centerY: centerY,\n radius: radius,\n innerRadius: innerRadius\n });\n return jsx(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: boundDefs,\n role: role,\n children: layers.map(function (layer, i) {\n if (layerById[layer] !== undefined) {\n return layerById[layer];\n }\n\n if (typeof layer === 'function') {\n return jsx(Fragment$1, {\n children: createElement(layer, layerContext)\n }, i);\n }\n\n return null;\n })\n });\n};\n\nvar Pie = function Pie(_ref2) {\n var _ref2$isInteractive = _ref2.isInteractive,\n isInteractive = _ref2$isInteractive === void 0 ? defaultProps.isInteractive : _ref2$isInteractive,\n _ref2$animate = _ref2.animate,\n animate = _ref2$animate === void 0 ? defaultProps.animate : _ref2$animate,\n _ref2$motionConfig = _ref2.motionConfig,\n motionConfig = _ref2$motionConfig === void 0 ? defaultProps.motionConfig : _ref2$motionConfig,\n theme = _ref2.theme,\n renderWrapper = _ref2.renderWrapper,\n otherProps = _objectWithoutProperties(_ref2, [\"isInteractive\", \"animate\", \"motionConfig\", \"theme\", \"renderWrapper\"]);\n\n return jsx(Container, {\n animate: animate,\n isInteractive: isInteractive,\n motionConfig: motionConfig,\n renderWrapper: renderWrapper,\n theme: theme,\n children: jsx(InnerPie, _objectSpread2({\n isInteractive: isInteractive\n }, otherProps))\n });\n};\n\nvar ResponsivePie = function ResponsivePie(props) {\n return jsx(ResponsiveWrapper, {\n children: function children(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return jsx(Pie, _objectSpread2({\n width: width,\n height: height\n }, props));\n }\n });\n};\n\nvar InnerPieCanvas = function InnerPieCanvas(_ref) {\n var data = _ref.data,\n _ref$id = _ref.id,\n id = _ref$id === void 0 ? defaultProps.id : _ref$id,\n _ref$value = _ref.value,\n value = _ref$value === void 0 ? defaultProps.value : _ref$value,\n valueFormat = _ref.valueFormat,\n _ref$sortByValue = _ref.sortByValue,\n sortByValue = _ref$sortByValue === void 0 ? defaultProps.sortByValue : _ref$sortByValue,\n _ref$startAngle = _ref.startAngle,\n startAngle = _ref$startAngle === void 0 ? defaultProps.startAngle : _ref$startAngle,\n _ref$endAngle = _ref.endAngle,\n endAngle = _ref$endAngle === void 0 ? defaultProps.endAngle : _ref$endAngle,\n _ref$padAngle = _ref.padAngle,\n padAngle = _ref$padAngle === void 0 ? defaultProps.padAngle : _ref$padAngle,\n _ref$fit = _ref.fit,\n fit = _ref$fit === void 0 ? defaultProps.fit : _ref$fit,\n _ref$innerRadius = _ref.innerRadius,\n innerRadiusRatio = _ref$innerRadius === void 0 ? defaultProps.innerRadius : _ref$innerRadius,\n _ref$cornerRadius = _ref.cornerRadius,\n cornerRadius = _ref$cornerRadius === void 0 ? defaultProps.cornerRadius : _ref$cornerRadius,\n _ref$activeInnerRadiu = _ref.activeInnerRadiusOffset,\n activeInnerRadiusOffset = _ref$activeInnerRadiu === void 0 ? defaultProps.activeInnerRadiusOffset : _ref$activeInnerRadiu,\n _ref$activeOuterRadiu = _ref.activeOuterRadiusOffset,\n activeOuterRadiusOffset = _ref$activeOuterRadiu === void 0 ? defaultProps.activeOuterRadiusOffset : _ref$activeOuterRadiu,\n width = _ref.width,\n height = _ref.height,\n partialMargin = _ref.margin,\n _ref$pixelRatio = _ref.pixelRatio,\n pixelRatio = _ref$pixelRatio === void 0 ? 1 : _ref$pixelRatio,\n _ref$colors = _ref.colors,\n colors = _ref$colors === void 0 ? defaultProps.colors : _ref$colors,\n _ref$borderWidth = _ref.borderWidth,\n borderWidth = _ref$borderWidth === void 0 ? defaultProps.borderWidth : _ref$borderWidth,\n _ref$borderColor = _ref.borderColor,\n borderColor = _ref$borderColor === void 0 ? defaultProps.borderColor : _ref$borderColor,\n _ref$enableArcLabels = _ref.enableArcLabels,\n enableArcLabels = _ref$enableArcLabels === void 0 ? defaultProps.enableArcLabels : _ref$enableArcLabels,\n _ref$arcLabel = _ref.arcLabel,\n arcLabel = _ref$arcLabel === void 0 ? defaultProps.arcLabel : _ref$arcLabel,\n _ref$arcLabelsSkipAng = _ref.arcLabelsSkipAngle,\n arcLabelsSkipAngle = _ref$arcLabelsSkipAng === void 0 ? defaultProps.arcLabelsSkipAngle : _ref$arcLabelsSkipAng,\n _ref$arcLabelsTextCol = _ref.arcLabelsTextColor,\n arcLabelsTextColor = _ref$arcLabelsTextCol === void 0 ? defaultProps.arcLabelsTextColor : _ref$arcLabelsTextCol,\n _ref$arcLabelsRadiusO = _ref.arcLabelsRadiusOffset,\n arcLabelsRadiusOffset = _ref$arcLabelsRadiusO === void 0 ? defaultProps.arcLabelsRadiusOffset : _ref$arcLabelsRadiusO,\n _ref$enableArcLinkLab = _ref.enableArcLinkLabels,\n enableArcLinkLabels = _ref$enableArcLinkLab === void 0 ? defaultProps.enableArcLinkLabels : _ref$enableArcLinkLab,\n _ref$arcLinkLabel = _ref.arcLinkLabel,\n arcLinkLabel = _ref$arcLinkLabel === void 0 ? defaultProps.arcLinkLabel : _ref$arcLinkLabel,\n _ref$arcLinkLabelsSki = _ref.arcLinkLabelsSkipAngle,\n arcLinkLabelsSkipAngle = _ref$arcLinkLabelsSki === void 0 ? defaultProps.arcLinkLabelsSkipAngle : _ref$arcLinkLabelsSki,\n _ref$arcLinkLabelsOff = _ref.arcLinkLabelsOffset,\n arcLinkLabelsOffset = _ref$arcLinkLabelsOff === void 0 ? defaultProps.arcLinkLabelsOffset : _ref$arcLinkLabelsOff,\n _ref$arcLinkLabelsDia = _ref.arcLinkLabelsDiagonalLength,\n arcLinkLabelsDiagonalLength = _ref$arcLinkLabelsDia === void 0 ? defaultProps.arcLinkLabelsDiagonalLength : _ref$arcLinkLabelsDia,\n _ref$arcLinkLabelsStr = _ref.arcLinkLabelsStraightLength,\n arcLinkLabelsStraightLength = _ref$arcLinkLabelsStr === void 0 ? defaultProps.arcLinkLabelsStraightLength : _ref$arcLinkLabelsStr,\n _ref$arcLinkLabelsThi = _ref.arcLinkLabelsThickness,\n arcLinkLabelsThickness = _ref$arcLinkLabelsThi === void 0 ? defaultProps.arcLinkLabelsThickness : _ref$arcLinkLabelsThi,\n _ref$arcLinkLabelsTex = _ref.arcLinkLabelsTextOffset,\n arcLinkLabelsTextOffset = _ref$arcLinkLabelsTex === void 0 ? defaultProps.arcLinkLabelsTextOffset : _ref$arcLinkLabelsTex,\n _ref$arcLinkLabelsTex2 = _ref.arcLinkLabelsTextColor,\n arcLinkLabelsTextColor = _ref$arcLinkLabelsTex2 === void 0 ? defaultProps.arcLinkLabelsTextColor : _ref$arcLinkLabelsTex2,\n _ref$arcLinkLabelsCol = _ref.arcLinkLabelsColor,\n arcLinkLabelsColor = _ref$arcLinkLabelsCol === void 0 ? defaultProps.arcLinkLabelsColor : _ref$arcLinkLabelsCol,\n _ref$isInteractive = _ref.isInteractive,\n isInteractive = _ref$isInteractive === void 0 ? defaultProps.isInteractive : _ref$isInteractive,\n onClick = _ref.onClick,\n onMouseMove = _ref.onMouseMove,\n _ref$tooltip = _ref.tooltip,\n tooltip = _ref$tooltip === void 0 ? defaultProps.tooltip : _ref$tooltip,\n _ref$legends = _ref.legends,\n legends = _ref$legends === void 0 ? defaultProps.legends : _ref$legends;\n var canvasEl = useRef(null);\n var theme = useTheme();\n\n var _useDimensions = useDimensions(width, height, partialMargin),\n margin = _useDimensions.margin,\n innerWidth = _useDimensions.innerWidth,\n innerHeight = _useDimensions.innerHeight,\n outerWidth = _useDimensions.outerWidth,\n outerHeight = _useDimensions.outerHeight;\n\n var normalizedData = useNormalizedData({\n data: data,\n id: id,\n value: value,\n valueFormat: valueFormat,\n colors: colors\n });\n\n var _usePieFromBox = usePieFromBox({\n data: normalizedData,\n width: innerWidth,\n height: innerHeight,\n fit: fit,\n innerRadius: innerRadiusRatio,\n startAngle: startAngle,\n endAngle: endAngle,\n padAngle: padAngle,\n sortByValue: sortByValue,\n cornerRadius: cornerRadius,\n activeInnerRadiusOffset: activeInnerRadiusOffset,\n activeOuterRadiusOffset: activeOuterRadiusOffset\n }),\n dataWithArc = _usePieFromBox.dataWithArc,\n arcGenerator = _usePieFromBox.arcGenerator,\n centerX = _usePieFromBox.centerX,\n centerY = _usePieFromBox.centerY,\n radius = _usePieFromBox.radius,\n innerRadius = _usePieFromBox.innerRadius,\n setActiveId = _usePieFromBox.setActiveId;\n\n var getBorderColor = useInheritedColor(borderColor, theme);\n var arcLabels = useArcLabels({\n data: dataWithArc,\n label: arcLabel,\n skipAngle: arcLabelsSkipAngle,\n offset: arcLabelsRadiusOffset,\n textColor: arcLabelsTextColor\n });\n var arcLinkLabels = useArcLinkLabels({\n data: dataWithArc,\n skipAngle: arcLinkLabelsSkipAngle,\n offset: arcLinkLabelsOffset,\n diagonalLength: arcLinkLabelsDiagonalLength,\n straightLength: arcLinkLabelsStraightLength,\n label: arcLinkLabel,\n linkColor: arcLinkLabelsColor,\n textOffset: arcLinkLabelsTextOffset,\n textColor: arcLinkLabelsTextColor\n });\n useEffect(function () {\n if (!canvasEl.current) return;\n canvasEl.current.width = outerWidth * pixelRatio;\n canvasEl.current.height = outerHeight * pixelRatio;\n var ctx = canvasEl.current.getContext('2d');\n ctx.scale(pixelRatio, pixelRatio);\n ctx.fillStyle = theme.background;\n ctx.fillRect(0, 0, outerWidth, outerHeight);\n ctx.save();\n ctx.translate(margin.left, margin.top);\n arcGenerator.context(ctx);\n ctx.save();\n ctx.translate(centerX, centerY);\n dataWithArc.forEach(function (arc) {\n ctx.beginPath();\n ctx.fillStyle = arc.color;\n ctx.strokeStyle = getBorderColor(arc);\n ctx.lineWidth = borderWidth;\n arcGenerator(arc.arc);\n ctx.fill();\n\n if (borderWidth > 0) {\n ctx.stroke();\n }\n });\n\n if (enableArcLinkLabels === true) {\n drawCanvasArcLinkLabels(ctx, arcLinkLabels, theme, arcLinkLabelsThickness);\n }\n\n if (enableArcLabels === true) {\n drawCanvasArcLabels(ctx, arcLabels, theme);\n }\n\n ctx.restore();\n legends.forEach(function (legend) {\n renderLegendToCanvas(ctx, _objectSpread2(_objectSpread2({}, legend), {}, {\n data: dataWithArc,\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n theme: theme\n }));\n });\n }, [canvasEl, innerWidth, innerHeight, outerWidth, outerHeight, margin.top, margin.left, pixelRatio, centerX, centerY, arcGenerator, dataWithArc, getBorderColor, enableArcLabels, arcLabels, enableArcLinkLabels, arcLinkLabels, arcLinkLabelsThickness, legends, theme]);\n var arcs = useMemo(function () {\n return dataWithArc.map(function (datum) {\n return _objectSpread2({\n id: datum.id\n }, datum.arc);\n });\n }, [dataWithArc]);\n\n var getArcFromMouse = function getArcFromMouse(event) {\n if (!canvasEl.current) return null;\n\n var _getRelativeCursor = getRelativeCursor(canvasEl.current, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n\n var hoveredArc = findArcUnderCursor(margin.left + centerX, margin.top + centerY, radius, innerRadius, arcs, x, y);\n if (!hoveredArc) return null;\n return dataWithArc.find(function (datum) {\n return datum.id === hoveredArc.id;\n });\n };\n\n var _useTooltip = useTooltip(),\n showTooltipFromEvent = _useTooltip.showTooltipFromEvent,\n hideTooltip = _useTooltip.hideTooltip;\n\n var handleMouseHover = function handleMouseHover(event) {\n var datum = getArcFromMouse(event);\n\n if (datum) {\n onMouseMove === null || onMouseMove === void 0 ? void 0 : onMouseMove(datum, event);\n setActiveId(datum.id);\n showTooltipFromEvent(createElement(tooltip, {\n datum: datum\n }), event);\n } else {\n setActiveId(null);\n hideTooltip();\n }\n };\n\n var handleMouseLeave = function handleMouseLeave() {\n hideTooltip();\n };\n\n var handleClick = function handleClick(event) {\n if (!onClick) return;\n var arc = getArcFromMouse(event);\n\n if (arc) {\n onClick(arc, event);\n }\n };\n\n return jsx(\"canvas\", {\n ref: canvasEl,\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight,\n cursor: isInteractive ? 'auto' : 'normal'\n },\n onMouseEnter: isInteractive ? handleMouseHover : undefined,\n onMouseMove: isInteractive ? handleMouseHover : undefined,\n onMouseLeave: isInteractive ? handleMouseLeave : undefined,\n onClick: isInteractive ? handleClick : undefined\n });\n};\n\nvar PieCanvas = function PieCanvas(_ref2) {\n var _ref2$isInteractive = _ref2.isInteractive,\n isInteractive = _ref2$isInteractive === void 0 ? defaultProps.isInteractive : _ref2$isInteractive,\n theme = _ref2.theme,\n renderWrapper = _ref2.renderWrapper,\n otherProps = _objectWithoutProperties(_ref2, [\"isInteractive\", \"theme\", \"renderWrapper\"]);\n\n return jsx(Container, {\n isInteractive: isInteractive,\n renderWrapper: renderWrapper,\n theme: theme,\n children: jsx(InnerPieCanvas, _objectSpread2({\n isInteractive: isInteractive\n }, otherProps))\n });\n};\n\nvar ResponsivePieCanvas = function ResponsivePieCanvas(props) {\n return jsx(ResponsiveWrapper, {\n children: function children(_ref) {\n var width = _ref.width,\n height = _ref.height;\n return jsx(PieCanvas, _objectSpread2({\n width: width,\n height: height\n }, props));\n }\n });\n};\n\nexport { Pie, PieCanvas, ResponsivePie, ResponsivePieCanvas, defaultProps, useNormalizedData, usePie, usePieArcs, usePieFromBox, usePieLayerContext };","import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport { tau } from \"./math.js\";\nexport default function () {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = data.length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n } // Optionally sort the arcs by previously-computed values or by data.\n\n\n if (sortValues != null) index.sort(function (i, j) {\n return sortValues(arcs[i], arcs[j]);\n });else if (sort != null) index.sort(function (i, j) {\n return sort(data[i], data[j]);\n }); // Compute the arcs! They are stored in the original data's order.\n\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function (_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function (_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function (_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function (_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function (_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function (_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}","/**\r\n * A collection of shims that provide minimal functionality of the ES6 collections.\r\n *\r\n * These implementations are not meant to be used outside of the ResizeObserver\r\n * modules as they cover only a limited range of use cases.\r\n */\n\n/* eslint-disable require-jsdoc, valid-jsdoc */\nvar MapShim = function () {\n if (typeof Map !== 'undefined') {\n return Map;\n }\n /**\r\n * Returns index in provided array that matches the specified key.\r\n *\r\n * @param {Array<Array>} arr\r\n * @param {*} key\r\n * @returns {number}\r\n */\n\n\n function getIndex(arr, key) {\n var result = -1;\n arr.some(function (entry, index) {\n if (entry[0] === key) {\n result = index;\n return true;\n }\n\n return false;\n });\n return result;\n }\n\n return function () {\n function class_1() {\n this.__entries__ = [];\n }\n\n Object.defineProperty(class_1.prototype, \"size\", {\n /**\r\n * @returns {boolean}\r\n */\n get: function get() {\n return this.__entries__.length;\n },\n enumerable: true,\n configurable: true\n });\n /**\r\n * @param {*} key\r\n * @returns {*}\r\n */\n\n class_1.prototype.get = function (key) {\n var index = getIndex(this.__entries__, key);\n var entry = this.__entries__[index];\n return entry && entry[1];\n };\n /**\r\n * @param {*} key\r\n * @param {*} value\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.set = function (key, value) {\n var index = getIndex(this.__entries__, key);\n\n if (~index) {\n this.__entries__[index][1] = value;\n } else {\n this.__entries__.push([key, value]);\n }\n };\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.delete = function (key) {\n var entries = this.__entries__;\n var index = getIndex(entries, key);\n\n if (~index) {\n entries.splice(index, 1);\n }\n };\n /**\r\n * @param {*} key\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.has = function (key) {\n return !!~getIndex(this.__entries__, key);\n };\n /**\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.clear = function () {\n this.__entries__.splice(0);\n };\n /**\r\n * @param {Function} callback\r\n * @param {*} [ctx=null]\r\n * @returns {void}\r\n */\n\n\n class_1.prototype.forEach = function (callback, ctx) {\n if (ctx === void 0) {\n ctx = null;\n }\n\n for (var _i = 0, _a = this.__entries__; _i < _a.length; _i++) {\n var entry = _a[_i];\n callback.call(ctx, entry[1], entry[0]);\n }\n };\n\n return class_1;\n }();\n}();\n/**\r\n * Detects whether window and document objects are available in current environment.\r\n */\n\n\nvar isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined' && window.document === document; // Returns global object of a current environment.\n\nvar global$1 = function () {\n if (typeof global !== 'undefined' && global.Math === Math) {\n return global;\n }\n\n if (typeof self !== 'undefined' && self.Math === Math) {\n return self;\n }\n\n if (typeof window !== 'undefined' && window.Math === Math) {\n return window;\n } // eslint-disable-next-line no-new-func\n\n\n return Function('return this')();\n}();\n/**\r\n * A shim for the requestAnimationFrame which falls back to the setTimeout if\r\n * first one is not supported.\r\n *\r\n * @returns {number} Requests' identifier.\r\n */\n\n\nvar requestAnimationFrame$1 = function () {\n if (typeof requestAnimationFrame === 'function') {\n // It's required to use a bounded function because IE sometimes throws\n // an \"Invalid calling object\" error if rAF is invoked without the global\n // object on the left hand side.\n return requestAnimationFrame.bind(global$1);\n }\n\n return function (callback) {\n return setTimeout(function () {\n return callback(Date.now());\n }, 1000 / 60);\n };\n}(); // Defines minimum timeout before adding a trailing call.\n\n\nvar trailingTimeout = 2;\n/**\r\n * Creates a wrapper function which ensures that provided callback will be\r\n * invoked only once during the specified delay period.\r\n *\r\n * @param {Function} callback - Function to be invoked after the delay period.\r\n * @param {number} delay - Delay after which to invoke callback.\r\n * @returns {Function}\r\n */\n\nfunction throttle(callback, delay) {\n var leadingCall = false,\n trailingCall = false,\n lastCallTime = 0;\n /**\r\n * Invokes the original callback function and schedules new invocation if\r\n * the \"proxy\" was called during current request.\r\n *\r\n * @returns {void}\r\n */\n\n function resolvePending() {\n if (leadingCall) {\n leadingCall = false;\n callback();\n }\n\n if (trailingCall) {\n proxy();\n }\n }\n /**\r\n * Callback invoked after the specified delay. It will further postpone\r\n * invocation of the original function delegating it to the\r\n * requestAnimationFrame.\r\n *\r\n * @returns {void}\r\n */\n\n\n function timeoutCallback() {\n requestAnimationFrame$1(resolvePending);\n }\n /**\r\n * Schedules invocation of the original function.\r\n *\r\n * @returns {void}\r\n */\n\n\n function proxy() {\n var timeStamp = Date.now();\n\n if (leadingCall) {\n // Reject immediately following calls.\n if (timeStamp - lastCallTime < trailingTimeout) {\n return;\n } // Schedule new call to be in invoked when the pending one is resolved.\n // This is important for \"transitions\" which never actually start\n // immediately so there is a chance that we might miss one if change\n // happens amids the pending invocation.\n\n\n trailingCall = true;\n } else {\n leadingCall = true;\n trailingCall = false;\n setTimeout(timeoutCallback, delay);\n }\n\n lastCallTime = timeStamp;\n }\n\n return proxy;\n} // Minimum delay before invoking the update of observers.\n\n\nvar REFRESH_DELAY = 20; // A list of substrings of CSS properties used to find transition events that\n// might affect dimensions of observed elements.\n\nvar transitionKeys = ['top', 'right', 'bottom', 'left', 'width', 'height', 'size', 'weight']; // Check if MutationObserver is available.\n\nvar mutationObserverSupported = typeof MutationObserver !== 'undefined';\n/**\r\n * Singleton controller class which handles updates of ResizeObserver instances.\r\n */\n\nvar ResizeObserverController = function () {\n /**\r\n * Creates a new instance of ResizeObserverController.\r\n *\r\n * @private\r\n */\n function ResizeObserverController() {\n /**\r\n * Indicates whether DOM listeners have been added.\r\n *\r\n * @private {boolean}\r\n */\n this.connected_ = false;\n /**\r\n * Tells that controller has subscribed for Mutation Events.\r\n *\r\n * @private {boolean}\r\n */\n\n this.mutationEventsAdded_ = false;\n /**\r\n * Keeps reference to the instance of MutationObserver.\r\n *\r\n * @private {MutationObserver}\r\n */\n\n this.mutationsObserver_ = null;\n /**\r\n * A list of connected observers.\r\n *\r\n * @private {Array<ResizeObserverSPI>}\r\n */\n\n this.observers_ = [];\n this.onTransitionEnd_ = this.onTransitionEnd_.bind(this);\n this.refresh = throttle(this.refresh.bind(this), REFRESH_DELAY);\n }\n /**\r\n * Adds observer to observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be added.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.addObserver = function (observer) {\n if (!~this.observers_.indexOf(observer)) {\n this.observers_.push(observer);\n } // Add listeners if they haven't been added yet.\n\n\n if (!this.connected_) {\n this.connect_();\n }\n };\n /**\r\n * Removes observer from observers list.\r\n *\r\n * @param {ResizeObserverSPI} observer - Observer to be removed.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.removeObserver = function (observer) {\n var observers = this.observers_;\n var index = observers.indexOf(observer); // Remove observer if it's present in registry.\n\n if (~index) {\n observers.splice(index, 1);\n } // Remove listeners if controller has no connected observers.\n\n\n if (!observers.length && this.connected_) {\n this.disconnect_();\n }\n };\n /**\r\n * Invokes the update of observers. It will continue running updates insofar\r\n * it detects changes.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.refresh = function () {\n var changesDetected = this.updateObservers_(); // Continue running updates if changes have been detected as there might\n // be future ones caused by CSS transitions.\n\n if (changesDetected) {\n this.refresh();\n }\n };\n /**\r\n * Updates every observer from observers list and notifies them of queued\r\n * entries.\r\n *\r\n * @private\r\n * @returns {boolean} Returns \"true\" if any observer has detected changes in\r\n * dimensions of it's elements.\r\n */\n\n\n ResizeObserverController.prototype.updateObservers_ = function () {\n // Collect observers that have active observations.\n var activeObservers = this.observers_.filter(function (observer) {\n return observer.gatherActive(), observer.hasActive();\n }); // Deliver notifications in a separate cycle in order to avoid any\n // collisions between observers, e.g. when multiple instances of\n // ResizeObserver are tracking the same element and the callback of one\n // of them changes content dimensions of the observed target. Sometimes\n // this may result in notifications being blocked for the rest of observers.\n\n activeObservers.forEach(function (observer) {\n return observer.broadcastActive();\n });\n return activeObservers.length > 0;\n };\n /**\r\n * Initializes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.connect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already added.\n if (!isBrowser || this.connected_) {\n return;\n } // Subscription to the \"Transitionend\" event is used as a workaround for\n // delayed transitions. This way it's possible to capture at least the\n // final state of an element.\n\n\n document.addEventListener('transitionend', this.onTransitionEnd_);\n window.addEventListener('resize', this.refresh);\n\n if (mutationObserverSupported) {\n this.mutationsObserver_ = new MutationObserver(this.refresh);\n this.mutationsObserver_.observe(document, {\n attributes: true,\n childList: true,\n characterData: true,\n subtree: true\n });\n } else {\n document.addEventListener('DOMSubtreeModified', this.refresh);\n this.mutationEventsAdded_ = true;\n }\n\n this.connected_ = true;\n };\n /**\r\n * Removes DOM listeners.\r\n *\r\n * @private\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.disconnect_ = function () {\n // Do nothing if running in a non-browser environment or if listeners\n // have been already removed.\n if (!isBrowser || !this.connected_) {\n return;\n }\n\n document.removeEventListener('transitionend', this.onTransitionEnd_);\n window.removeEventListener('resize', this.refresh);\n\n if (this.mutationsObserver_) {\n this.mutationsObserver_.disconnect();\n }\n\n if (this.mutationEventsAdded_) {\n document.removeEventListener('DOMSubtreeModified', this.refresh);\n }\n\n this.mutationsObserver_ = null;\n this.mutationEventsAdded_ = false;\n this.connected_ = false;\n };\n /**\r\n * \"Transitionend\" event handler.\r\n *\r\n * @private\r\n * @param {TransitionEvent} event\r\n * @returns {void}\r\n */\n\n\n ResizeObserverController.prototype.onTransitionEnd_ = function (_a) {\n var _b = _a.propertyName,\n propertyName = _b === void 0 ? '' : _b; // Detect whether transition may affect dimensions of an element.\n\n var isReflowProperty = transitionKeys.some(function (key) {\n return !!~propertyName.indexOf(key);\n });\n\n if (isReflowProperty) {\n this.refresh();\n }\n };\n /**\r\n * Returns instance of the ResizeObserverController.\r\n *\r\n * @returns {ResizeObserverController}\r\n */\n\n\n ResizeObserverController.getInstance = function () {\n if (!this.instance_) {\n this.instance_ = new ResizeObserverController();\n }\n\n return this.instance_;\n };\n /**\r\n * Holds reference to the controller's instance.\r\n *\r\n * @private {ResizeObserverController}\r\n */\n\n\n ResizeObserverController.instance_ = null;\n return ResizeObserverController;\n}();\n/**\r\n * Defines non-writable/enumerable properties of the provided target object.\r\n *\r\n * @param {Object} target - Object for which to define properties.\r\n * @param {Object} props - Properties to be defined.\r\n * @returns {Object} Target object.\r\n */\n\n\nvar defineConfigurable = function defineConfigurable(target, props) {\n for (var _i = 0, _a = Object.keys(props); _i < _a.length; _i++) {\n var key = _a[_i];\n Object.defineProperty(target, key, {\n value: props[key],\n enumerable: false,\n writable: false,\n configurable: true\n });\n }\n\n return target;\n};\n/**\r\n * Returns the global object associated with provided element.\r\n *\r\n * @param {Object} target\r\n * @returns {Object}\r\n */\n\n\nvar getWindowOf = function getWindowOf(target) {\n // Assume that the element is an instance of Node, which means that it\n // has the \"ownerDocument\" property from which we can retrieve a\n // corresponding global object.\n var ownerGlobal = target && target.ownerDocument && target.ownerDocument.defaultView; // Return the local global object if it's not possible extract one from\n // provided element.\n\n return ownerGlobal || global$1;\n}; // Placeholder of an empty content rectangle.\n\n\nvar emptyRect = createRectInit(0, 0, 0, 0);\n/**\r\n * Converts provided string to a number.\r\n *\r\n * @param {number|string} value\r\n * @returns {number}\r\n */\n\nfunction toFloat(value) {\n return parseFloat(value) || 0;\n}\n/**\r\n * Extracts borders size from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @param {...string} positions - Borders positions (top, right, ...)\r\n * @returns {number}\r\n */\n\n\nfunction getBordersSize(styles) {\n var positions = [];\n\n for (var _i = 1; _i < arguments.length; _i++) {\n positions[_i - 1] = arguments[_i];\n }\n\n return positions.reduce(function (size, position) {\n var value = styles['border-' + position + '-width'];\n return size + toFloat(value);\n }, 0);\n}\n/**\r\n * Extracts paddings sizes from provided styles.\r\n *\r\n * @param {CSSStyleDeclaration} styles\r\n * @returns {Object} Paddings box.\r\n */\n\n\nfunction getPaddings(styles) {\n var positions = ['top', 'right', 'bottom', 'left'];\n var paddings = {};\n\n for (var _i = 0, positions_1 = positions; _i < positions_1.length; _i++) {\n var position = positions_1[_i];\n var value = styles['padding-' + position];\n paddings[position] = toFloat(value);\n }\n\n return paddings;\n}\n/**\r\n * Calculates content rectangle of provided SVG element.\r\n *\r\n * @param {SVGGraphicsElement} target - Element content rectangle of which needs\r\n * to be calculated.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getSVGContentRect(target) {\n var bbox = target.getBBox();\n return createRectInit(0, 0, bbox.width, bbox.height);\n}\n/**\r\n * Calculates content rectangle of provided HTMLElement.\r\n *\r\n * @param {HTMLElement} target - Element for which to calculate the content rectangle.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getHTMLElementContentRect(target) {\n // Client width & height properties can't be\n // used exclusively as they provide rounded values.\n var clientWidth = target.clientWidth,\n clientHeight = target.clientHeight; // By this condition we can catch all non-replaced inline, hidden and\n // detached elements. Though elements with width & height properties less\n // than 0.5 will be discarded as well.\n //\n // Without it we would need to implement separate methods for each of\n // those cases and it's not possible to perform a precise and performance\n // effective test for hidden elements. E.g. even jQuery's ':visible' filter\n // gives wrong results for elements with width & height less than 0.5.\n\n if (!clientWidth && !clientHeight) {\n return emptyRect;\n }\n\n var styles = getWindowOf(target).getComputedStyle(target);\n var paddings = getPaddings(styles);\n var horizPad = paddings.left + paddings.right;\n var vertPad = paddings.top + paddings.bottom; // Computed styles of width & height are being used because they are the\n // only dimensions available to JS that contain non-rounded values. It could\n // be possible to utilize the getBoundingClientRect if only it's data wasn't\n // affected by CSS transformations let alone paddings, borders and scroll bars.\n\n var width = toFloat(styles.width),\n height = toFloat(styles.height); // Width & height include paddings and borders when the 'border-box' box\n // model is applied (except for IE).\n\n if (styles.boxSizing === 'border-box') {\n // Following conditions are required to handle Internet Explorer which\n // doesn't include paddings and borders to computed CSS dimensions.\n //\n // We can say that if CSS dimensions + paddings are equal to the \"client\"\n // properties then it's either IE, and thus we don't need to subtract\n // anything, or an element merely doesn't have paddings/borders styles.\n if (Math.round(width + horizPad) !== clientWidth) {\n width -= getBordersSize(styles, 'left', 'right') + horizPad;\n }\n\n if (Math.round(height + vertPad) !== clientHeight) {\n height -= getBordersSize(styles, 'top', 'bottom') + vertPad;\n }\n } // Following steps can't be applied to the document's root element as its\n // client[Width/Height] properties represent viewport area of the window.\n // Besides, it's as well not necessary as the <html> itself neither has\n // rendered scroll bars nor it can be clipped.\n\n\n if (!isDocumentElement(target)) {\n // In some browsers (only in Firefox, actually) CSS width & height\n // include scroll bars size which can be removed at this step as scroll\n // bars are the only difference between rounded dimensions + paddings\n // and \"client\" properties, though that is not always true in Chrome.\n var vertScrollbar = Math.round(width + horizPad) - clientWidth;\n var horizScrollbar = Math.round(height + vertPad) - clientHeight; // Chrome has a rather weird rounding of \"client\" properties.\n // E.g. for an element with content width of 314.2px it sometimes gives\n // the client width of 315px and for the width of 314.7px it may give\n // 314px. And it doesn't happen all the time. So just ignore this delta\n // as a non-relevant.\n\n if (Math.abs(vertScrollbar) !== 1) {\n width -= vertScrollbar;\n }\n\n if (Math.abs(horizScrollbar) !== 1) {\n height -= horizScrollbar;\n }\n }\n\n return createRectInit(paddings.left, paddings.top, width, height);\n}\n/**\r\n * Checks whether provided element is an instance of the SVGGraphicsElement.\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\n\n\nvar isSVGGraphicsElement = function () {\n // Some browsers, namely IE and Edge, don't have the SVGGraphicsElement\n // interface.\n if (typeof SVGGraphicsElement !== 'undefined') {\n return function (target) {\n return target instanceof getWindowOf(target).SVGGraphicsElement;\n };\n } // If it's so, then check that element is at least an instance of the\n // SVGElement and that it has the \"getBBox\" method.\n // eslint-disable-next-line no-extra-parens\n\n\n return function (target) {\n return target instanceof getWindowOf(target).SVGElement && typeof target.getBBox === 'function';\n };\n}();\n/**\r\n * Checks whether provided element is a document element (<html>).\r\n *\r\n * @param {Element} target - Element to be checked.\r\n * @returns {boolean}\r\n */\n\n\nfunction isDocumentElement(target) {\n return target === getWindowOf(target).document.documentElement;\n}\n/**\r\n * Calculates an appropriate content rectangle for provided html or svg element.\r\n *\r\n * @param {Element} target - Element content rectangle of which needs to be calculated.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction getContentRect(target) {\n if (!isBrowser) {\n return emptyRect;\n }\n\n if (isSVGGraphicsElement(target)) {\n return getSVGContentRect(target);\n }\n\n return getHTMLElementContentRect(target);\n}\n/**\r\n * Creates rectangle with an interface of the DOMRectReadOnly.\r\n * Spec: https://drafts.fxtf.org/geometry/#domrectreadonly\r\n *\r\n * @param {DOMRectInit} rectInit - Object with rectangle's x/y coordinates and dimensions.\r\n * @returns {DOMRectReadOnly}\r\n */\n\n\nfunction createReadOnlyRect(_a) {\n var x = _a.x,\n y = _a.y,\n width = _a.width,\n height = _a.height; // If DOMRectReadOnly is available use it as a prototype for the rectangle.\n\n var Constr = typeof DOMRectReadOnly !== 'undefined' ? DOMRectReadOnly : Object;\n var rect = Object.create(Constr.prototype); // Rectangle's properties are not writable and non-enumerable.\n\n defineConfigurable(rect, {\n x: x,\n y: y,\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: height + y,\n left: x\n });\n return rect;\n}\n/**\r\n * Creates DOMRectInit object based on the provided dimensions and the x/y coordinates.\r\n * Spec: https://drafts.fxtf.org/geometry/#dictdef-domrectinit\r\n *\r\n * @param {number} x - X coordinate.\r\n * @param {number} y - Y coordinate.\r\n * @param {number} width - Rectangle's width.\r\n * @param {number} height - Rectangle's height.\r\n * @returns {DOMRectInit}\r\n */\n\n\nfunction createRectInit(x, y, width, height) {\n return {\n x: x,\n y: y,\n width: width,\n height: height\n };\n}\n/**\r\n * Class that is responsible for computations of the content rectangle of\r\n * provided DOM element and for keeping track of it's changes.\r\n */\n\n\nvar ResizeObservation = function () {\n /**\r\n * Creates an instance of ResizeObservation.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n */\n function ResizeObservation(target) {\n /**\r\n * Broadcasted width of content rectangle.\r\n *\r\n * @type {number}\r\n */\n this.broadcastWidth = 0;\n /**\r\n * Broadcasted height of content rectangle.\r\n *\r\n * @type {number}\r\n */\n\n this.broadcastHeight = 0;\n /**\r\n * Reference to the last observed content rectangle.\r\n *\r\n * @private {DOMRectInit}\r\n */\n\n this.contentRect_ = createRectInit(0, 0, 0, 0);\n this.target = target;\n }\n /**\r\n * Updates content rectangle and tells whether it's width or height properties\r\n * have changed since the last broadcast.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n ResizeObservation.prototype.isActive = function () {\n var rect = getContentRect(this.target);\n this.contentRect_ = rect;\n return rect.width !== this.broadcastWidth || rect.height !== this.broadcastHeight;\n };\n /**\r\n * Updates 'broadcastWidth' and 'broadcastHeight' properties with a data\r\n * from the corresponding properties of the last observed content rectangle.\r\n *\r\n * @returns {DOMRectInit} Last observed content rectangle.\r\n */\n\n\n ResizeObservation.prototype.broadcastRect = function () {\n var rect = this.contentRect_;\n this.broadcastWidth = rect.width;\n this.broadcastHeight = rect.height;\n return rect;\n };\n\n return ResizeObservation;\n}();\n\nvar ResizeObserverEntry = function () {\n /**\r\n * Creates an instance of ResizeObserverEntry.\r\n *\r\n * @param {Element} target - Element that is being observed.\r\n * @param {DOMRectInit} rectInit - Data of the element's content rectangle.\r\n */\n function ResizeObserverEntry(target, rectInit) {\n var contentRect = createReadOnlyRect(rectInit); // According to the specification following properties are not writable\n // and are also not enumerable in the native implementation.\n //\n // Property accessors are not being used as they'd require to define a\n // private WeakMap storage which may cause memory leaks in browsers that\n // don't support this type of collections.\n\n defineConfigurable(this, {\n target: target,\n contentRect: contentRect\n });\n }\n\n return ResizeObserverEntry;\n}();\n\nvar ResizeObserverSPI = function () {\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback function that is invoked\r\n * when one of the observed elements changes it's content dimensions.\r\n * @param {ResizeObserverController} controller - Controller instance which\r\n * is responsible for the updates of observer.\r\n * @param {ResizeObserver} callbackCtx - Reference to the public\r\n * ResizeObserver instance which will be passed to callback function.\r\n */\n function ResizeObserverSPI(callback, controller, callbackCtx) {\n /**\r\n * Collection of resize observations that have detected changes in dimensions\r\n * of elements.\r\n *\r\n * @private {Array<ResizeObservation>}\r\n */\n this.activeObservations_ = [];\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map<Element, ResizeObservation>}\r\n */\n\n this.observations_ = new MapShim();\n\n if (typeof callback !== 'function') {\n throw new TypeError('The callback provided as parameter 1 is not a function.');\n }\n\n this.callback_ = callback;\n this.controller_ = controller;\n this.callbackCtx_ = callbackCtx;\n }\n /**\r\n * Starts observing provided element.\r\n *\r\n * @param {Element} target - Element to be observed.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.observe = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n } // Do nothing if current environment doesn't have the Element interface.\n\n\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_; // Do nothing if element is already being observed.\n\n if (observations.has(target)) {\n return;\n }\n\n observations.set(target, new ResizeObservation(target));\n this.controller_.addObserver(this); // Force the update of observations.\n\n this.controller_.refresh();\n };\n /**\r\n * Stops observing provided element.\r\n *\r\n * @param {Element} target - Element to stop observing.\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.unobserve = function (target) {\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n } // Do nothing if current environment doesn't have the Element interface.\n\n\n if (typeof Element === 'undefined' || !(Element instanceof Object)) {\n return;\n }\n\n if (!(target instanceof getWindowOf(target).Element)) {\n throw new TypeError('parameter 1 is not of type \"Element\".');\n }\n\n var observations = this.observations_; // Do nothing if element is not being observed.\n\n if (!observations.has(target)) {\n return;\n }\n\n observations.delete(target);\n\n if (!observations.size) {\n this.controller_.removeObserver(this);\n }\n };\n /**\r\n * Stops observing all elements.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.disconnect = function () {\n this.clearActive();\n this.observations_.clear();\n this.controller_.removeObserver(this);\n };\n /**\r\n * Collects observation instances the associated element of which has changed\r\n * it's content rectangle.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.gatherActive = function () {\n var _this = this;\n\n this.clearActive();\n this.observations_.forEach(function (observation) {\n if (observation.isActive()) {\n _this.activeObservations_.push(observation);\n }\n });\n };\n /**\r\n * Invokes initial callback function with a list of ResizeObserverEntry\r\n * instances collected from active resize observations.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.broadcastActive = function () {\n // Do nothing if observer doesn't have active observations.\n if (!this.hasActive()) {\n return;\n }\n\n var ctx = this.callbackCtx_; // Create ResizeObserverEntry instance for every active observation.\n\n var entries = this.activeObservations_.map(function (observation) {\n return new ResizeObserverEntry(observation.target, observation.broadcastRect());\n });\n this.callback_.call(ctx, entries, ctx);\n this.clearActive();\n };\n /**\r\n * Clears the collection of active observations.\r\n *\r\n * @returns {void}\r\n */\n\n\n ResizeObserverSPI.prototype.clearActive = function () {\n this.activeObservations_.splice(0);\n };\n /**\r\n * Tells whether observer has active observations.\r\n *\r\n * @returns {boolean}\r\n */\n\n\n ResizeObserverSPI.prototype.hasActive = function () {\n return this.activeObservations_.length > 0;\n };\n\n return ResizeObserverSPI;\n}(); // Registry of internal observers. If WeakMap is not available use current shim\n// for the Map collection as it has all required methods and because WeakMap\n// can't be fully polyfilled anyway.\n\n\nvar observers = typeof WeakMap !== 'undefined' ? new WeakMap() : new MapShim();\n/**\r\n * ResizeObserver API. Encapsulates the ResizeObserver SPI implementation\r\n * exposing only those methods and properties that are defined in the spec.\r\n */\n\nvar ResizeObserver = function () {\n /**\r\n * Creates a new instance of ResizeObserver.\r\n *\r\n * @param {ResizeObserverCallback} callback - Callback that is invoked when\r\n * dimensions of the observed elements change.\r\n */\n function ResizeObserver(callback) {\n if (!(this instanceof ResizeObserver)) {\n throw new TypeError('Cannot call a class as a function.');\n }\n\n if (!arguments.length) {\n throw new TypeError('1 argument required, but only 0 present.');\n }\n\n var controller = ResizeObserverController.getInstance();\n var observer = new ResizeObserverSPI(callback, controller, this);\n observers.set(this, observer);\n }\n\n return ResizeObserver;\n}(); // Expose public methods of ResizeObserver.\n\n\n['observe', 'unobserve', 'disconnect'].forEach(function (method) {\n ResizeObserver.prototype[method] = function () {\n var _a;\n\n return (_a = observers.get(this))[method].apply(_a, arguments);\n };\n});\n\nvar index = function () {\n // Export existing implementation if available.\n if (typeof global$1.ResizeObserver !== 'undefined') {\n return global$1.ResizeObserver;\n }\n\n return ResizeObserver;\n}();\n\nexport default index;","import React, { useState, useMemo, useCallback } from \"react\"\n\nimport { ResponsivePie } from \"@nivo/pie\"\nimport ResizeObserver from \"resize-observer-polyfill\"\n\nimport ArrowDropDown from \"@material-ui/icons/ArrowDropDown\"\nimport ArrowDropUp from \"@material-ui/icons/ArrowDropUp\"\nimport Person from \"@material-ui/icons/Person\"\nimport { renderRichText } from \"gatsby-source-contentful/rich-text\"\nimport { MARKS } from \"@contentful/rich-text-types\"\nimport { formatToUSD } from \"../utilities/content-utilities\"\nimport \"./pie-chart.scss\"\n\nconst contentPaths = {\n centralProgramsLabel: \"centralProgramsLabel\",\n otherLabel: \"otherLabel\",\n description: \"description\",\n statDescriptor: \"statDescriptor\",\n increaseDescriptor: \"increaseDescriptor\",\n decreaseDescriptor: \"decreaseDescriptor\",\n}\n\nfunction getObjValueFromPath(path) {\n const keyRegex = \"[a-zA-Z_$]\\\\w*\"\n const pathRegex = `^${keyRegex}(\\\\.${keyRegex})*$`\n if (!path.match(pathRegex)) {\n throw new Error(`Invalid path: ${path}`)\n }\n const pathArray = path.split(\".\")\n return pathArray.reduce((acc, key) => acc?.[key], this)\n}\n\nconst parseObject = (objectToParse, paths) => {\n const result = {}\n const parse = getObjValueFromPath.bind(objectToParse)\n for (let key in paths) {\n result[key] = parse(paths[key])\n }\n return result\n}\n\nconst useResizeObserverRef = (callback) => {\n const resizeObserver = useMemo(() => new ResizeObserver(callback), [callback])\n const ref = useCallback(\n (node) => {\n if (node) resizeObserver.observe(node)\n },\n [resizeObserver]\n )\n return ref\n}\n\nconst CenteredMetric =\n ({ descriptor, icon, percentOfTotal }) =>\n ({ dataWithArc, centerX, centerY }) => {\n return (\n <g transform=\"translate(0,-8)\">\n {icon(centerX - 73, centerY - 150)}\n <text\n x={centerX + 20}\n y={centerY}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n style={{\n fontSize: \"45px\",\n fontWeight: \"600\",\n }}\n >\n {percentOfTotal}%\n </text>\n <text\n x={centerX}\n y={centerY + 35}\n textAnchor=\"middle\"\n dominantBaseline=\"central\"\n style={{\n fontSize: \"20px\",\n fontWeight: \"200\",\n }}\n >\n {descriptor}\n </text>\n </g>\n )\n }\n\nconst Description = ({ percentOfTotal, data, content, formatValue }) => {\n const renderOptions = {\n renderMark: {\n [MARKS.BOLD]: (text) => {\n if (text === \"**Percent of Total**\") {\n return <strong>{percentOfTotal}%</strong>\n } else if (text === \"**Change Descriptor**\") {\n const changeDescriptor =\n data.change > 0\n ? content.increaseDescriptor\n : content.decreaseDescriptor\n return <strong>{changeDescriptor}</strong>\n } else if (text === \"**Change Quantity**\") {\n return (\n <span className=\"change pt-2\">\n {data.change < 0 ? (\n <ArrowDropDown className=\"arrow\" alt=\"down arrow\" />\n ) : (\n <ArrowDropUp className=\"arrow\" alt=\"up arrow\" />\n )}{\" \"}\n {formatValue(Math.abs(data.change))}\n </span>\n )\n } else {\n return <strong>{text}</strong>\n }\n },\n },\n }\n return (\n <div className=\"description\">\n <div className=\"\">\n {renderRichText(content.description, renderOptions)}\n </div>\n </div>\n )\n}\n\nconst CentralToTotalComparisonPie = ({\n data,\n content,\n formatValue,\n metricIcon,\n centralProgramsColor,\n}) => {\n const [activeNode, setActiveNode] = useState(null)\n const [showRadialLabels, setShowRadialLabels] = useState(true)\n\n const radialLabelSizeCheck = useCallback(\n ([entry]) => {\n setShowRadialLabels(entry.contentRect.width > 470)\n },\n [setShowRadialLabels]\n )\n const labelRef = useResizeObserverRef(radialLabelSizeCheck)\n\n const percentOfTotal = Math.floor((data.centralPrograms / data.allOUSD) * 100)\n\n const pieChartData = useMemo(\n () => [\n {\n id: content.centralProgramsLabel,\n value: data.centralPrograms,\n },\n {\n id: content.otherLabel,\n value: data.allOUSD - data.centralPrograms,\n },\n ],\n [content, data]\n )\n\n const colors = {\n [content.centralProgramsLabel]: centralProgramsColor,\n [content.otherLabel]: \"#e9e9e9\",\n }\n\n pieChartData.forEach((data, i) => {\n const transparency = activeNode && activeNode !== data ? \"77\" : \"\"\n data.color = `${colors[data.id]}${transparency}`\n })\n\n return (\n <div className=\"overview-chart\">\n <div className=\"pie-chart\" ref={labelRef}>\n <ResponsivePie\n data={pieChartData}\n colors={({ data: { color } }) => color}\n innerRadius={0.7}\n padAngle={1.5}\n cornerRadius={3}\n margin={{ top: 20, bottom: 25 }}\n enableArcLinkLabels={showRadialLabels}\n arcLinkLabel={(data) => data.id}\n arcLinkLabelsColor={{ from: \"color\" }}\n arcLinkLabelsTextColor={{\n from: \"color\",\n modifiers: [[\"darker\", 2]],\n }}\n arcLinkLabelsDiagonalLength={1}\n arcLinkLabelsThickness={2}\n arcLinkLabelsOffset={0}\n arcLinkLabelsLinkHorizontalLength={15}\n enableArcLabels={false}\n arcLabel={(data) => formatValue(data.value)}\n arcLabelsTextColor={{ from: \"color\", modifiers: [[\"darker\", 3]] }}\n valueFormat={formatValue}\n onMouseEnter={({ data }) => setActiveNode(data)}\n onMouseLeave={() => setActiveNode(null)}\n layers={[\n \"arcs\",\n \"arcLabels\",\n \"arcLinkLabels\",\n \"legends\",\n CenteredMetric({\n icon: metricIcon,\n descriptor: content.statDescriptor,\n percentOfTotal,\n }),\n ]}\n />\n </div>\n <Description\n percentOfTotal={percentOfTotal}\n data={data}\n content={content}\n formatValue={formatValue}\n />\n </div>\n )\n}\n\nexport const SpendingPieChart = ({ data, content }) => {\n const dataPaths = {\n centralPrograms: \"spending\",\n allOUSD: \"all_ousd_spending\",\n change: \"change_from_previous_year.spending\",\n }\n\n const parsedData = parseObject(data, dataPaths)\n const contentToParse = content.find(({ name }) => name === \"Spending\")\n const parsedContent = parseObject(contentToParse, contentPaths)\n\n const icon = (x, y) => (\n <svg\n id=\"moneyIcon\"\n viewBox=\"0 0 511.998 511.998\"\n width=\"38\"\n xmlns=\"http://www.w3.org/2000/svg\"\n x={x}\n y={y}\n alt=\"icon of coins with a dollar sign on it\"\n >\n <g>\n <path d=\"m462.232 19.236c-28.114-12.404-65.164-19.236-104.325-19.236s-76.211 6.832-104.326 19.236c-32.017 14.126-49.65 34.398-49.65 57.081v129.269c-14.847-4.675-30.638-7.202-47.008-7.202-86.464 0-156.807 70.343-156.807 156.807 0 86.463 70.343 156.807 156.807 156.807 59.484 0 111.336-33.294 137.905-82.224 19.656 4.149 41.21 6.327 63.079 6.327 39.161 0 76.211-6.831 104.326-19.235 32.018-14.126 49.65-34.398 49.65-57.081v-283.468c0-22.683-17.633-42.955-49.651-57.081zm-196.541 27.447c24.383-10.758 57.133-16.683 92.216-16.683s67.833 5.925 92.216 16.683c19.59 8.643 31.76 19.999 31.76 29.634s-12.17 20.99-31.76 29.634c-24.384 10.758-57.133 16.683-92.216 16.683s-67.833-5.925-92.216-16.683c-19.59-8.644-31.76-19.998-31.76-29.634s12.17-20.991 31.76-29.634zm-108.769 435.315c-69.922 0-126.807-56.885-126.807-126.807s56.885-126.807 126.807-126.807c69.921 0 126.807 56.885 126.807 126.807s-56.885 126.807-126.807 126.807zm293.201-92.58c-24.384 10.758-57.133 16.683-92.216 16.683-17.707 0-35.107-1.558-51.176-4.543 3.886-12.529 6.233-25.727 6.835-39.371 14.245 2.009 29.082 3.047 44.342 3.047 39.161 0 76.211-6.832 104.326-19.236 7.318-3.229 13.874-6.781 19.65-10.607v24.393c-.001 9.636-12.171 20.991-31.761 29.634zm0-70.867c-24.383 10.758-57.133 16.683-92.216 16.683-15.963 0-31.362-1.235-45.952-3.636-2.279-15.039-6.709-29.38-12.954-42.708 18.448 3.584 38.469 5.477 58.906 5.477 39.161 0 76.211-6.831 104.326-19.235 7.318-3.229 13.874-6.782 19.65-10.608v24.393c0 9.636-12.17 20.991-31.76 29.634zm0-70.866c-24.384 10.758-57.133 16.683-92.216 16.683-31.017 0-60.624-4.728-83.876-13.331-11.461-12.872-25.004-23.849-40.1-32.396v-24.983c5.776 3.826 12.333 7.379 19.65 10.607 28.115 12.404 65.165 19.236 104.326 19.236s76.211-6.832 104.326-19.236c7.318-3.229 13.874-6.781 19.65-10.607v24.393c0 9.635-12.17 20.99-31.76 29.634zm0-70.868c-24.383 10.758-57.133 16.683-92.216 16.683s-67.833-5.925-92.216-16.683c-19.59-8.643-31.76-19.998-31.76-29.634v-24.393c5.776 3.826 12.333 7.379 19.65 10.608 28.115 12.404 65.165 19.235 104.326 19.235s76.211-6.831 104.326-19.235c7.318-3.229 13.874-6.782 19.65-10.608v24.393c0 9.636-12.17 20.991-31.76 29.634z\" />\n <path d=\"m176.952 339.052h-32.175c-7.243 0-13.136-5.893-13.136-13.136s5.893-13.136 13.136-13.136h54.323v-30h-27.177v-20.239h-30v20.344c-22.458 1.476-40.282 20.206-40.282 43.031 0 23.785 19.351 43.136 43.136 43.136h32.175c7.871 0 14.274 6.404 14.274 14.275s-6.403 14.274-14.274 14.274h-69.333v30h34.304v20.239h30v-20.239h5.029c24.413 0 44.274-19.861 44.274-44.274s-19.861-44.275-44.274-44.275z\" />\n </g>\n </svg>\n )\n\n return (\n <CentralToTotalComparisonPie\n data={parsedData}\n content={parsedContent}\n formatValue={formatToUSD}\n metricIcon={icon}\n centralProgramsColor={\"#fc8123\"}\n />\n )\n}\n\nexport const StaffPieChart = ({ data, content }) => {\n const dataPaths = {\n centralPrograms: \"eoy_total_positions\",\n allOUSD: \"all_ousd_eoy_total_positions\",\n change: \"change_from_previous_year.eoy_total_positions\",\n }\n\n const contentToParse = content.find(({ name }) => name === \"Staff\")\n const parsedData = parseObject(data, dataPaths)\n const parsedContent = parseObject(contentToParse, contentPaths)\n const icon = (x, y) => <Person x={x} y={y} width=\"45\" />\n\n return (\n <CentralToTotalComparisonPie\n data={parsedData}\n content={parsedContent}\n formatValue={(value) => Math.floor(value)}\n metricIcon={icon}\n centralProgramsColor={\"#129c9b\"}\n />\n )\n}\n","import React from \"react\"\nimport { graphql } from \"gatsby\"\nimport Container from \"react-bootstrap/Container\"\nimport Col from \"react-bootstrap/Col\"\nimport Row from \"react-bootstrap/Row\"\n\nimport Layout from \"../components/layout\"\nimport Seo from \"../components/seo\"\nimport RequireWideScreen from \"../components/require-wide-screen\"\nimport CentralProgramsTable from \"../components/central-programs-table\"\nimport MultiYearChart from \"../components/multi-year-chart\"\nimport SankeyChart from \"../components/sankey-chart\"\nimport { SpendingPieChart, StaffPieChart } from \"../components/pie-chart\"\n\nimport sankeyProgramData from \"../../data/sankey.json\"\nimport sankeyRestrictedProgramData from \"../../data/sankey-restricted.json\"\n\nimport { useLocalizeCategory } from \"../utilities/content-utilities\"\n\nimport \"../styles/pages/central-programs.scss\"\nimport \"../components/sankey-chart.scss\"\n\nconst CentralProgramsPage = ({ data, pageContext }) => {\n const centralProgramsOverviewData = data.centralProgramsOverviewJson\n let centralPrograms = data.allCentralProgramsJson.nodes\n const content = data.contentfulPage.content\n Object.assign(content, {\n contentfulPie: data.allContentfulOverviewPieChart.nodes,\n })\n const translatedProgramNames = data.allContentfulCentralProgram.nodes\n const localizeCategory = useLocalizeCategory(pageContext.language)\n\n // Translating content for the table\n centralPrograms = centralPrograms.map((program) => {\n try {\n program.name = translatedProgramNames.find(\n (t) => t.siteCode === program.code\n ).programName\n } catch (e) {\n console.warn(`Could not find Contentful translation for ${program.name}`)\n // throw new Error(`Could not find Contentful translation for ${program.name}`)\n }\n program.category = localizeCategory(program.category)\n return program\n })\n\n // Translating for the sankey chart\n const localizeCategoryFields = (fields, object) => {\n const localizedObject = { ...object }\n for (let field of fields) {\n localizedObject[field] = localizeCategory(object[field])\n }\n return localizedObject\n }\n\n const localizeSankeyData = ({ nodes, links }) => {\n return {\n nodes: nodes.map(localizeCategoryFields.bind(null, [\"id\"])),\n links: links.map(localizeCategoryFields.bind(null, [\"target\", \"source\"])),\n }\n }\n\n const translatedSankeyProgramData = localizeSankeyData(sankeyProgramData)\n const translatedSankeyRestrictedProgramData = localizeSankeyData(\n sankeyRestrictedProgramData\n )\n\n return (\n <Layout pageClassName=\"central-programs-page\">\n <Seo title={data.contentfulPage.title} />\n <Container>\n <Row>\n <Col>\n <h1>\n {content.contentfulPie[0].heading} (\n {data.site.siteMetadata.latestSchoolYear})\n </h1>\n </Col>\n </Row>\n </Container>\n <Container>\n <Row>\n <Col lg={6}>\n <SpendingPieChart\n data={centralProgramsOverviewData}\n content={content.contentfulPie}\n />\n </Col>\n <Col lg={6}>\n <StaffPieChart\n data={centralProgramsOverviewData}\n content={content.contentfulPie}\n />\n </Col>\n </Row>\n <Row>\n <Col lg={6} className=\"mx-auto\">\n <MultiYearChart\n data={centralProgramsOverviewData.time_series}\n content={content.programsTable.columns}\n gaEventCategory={\"Overview\"}\n />\n </Col>\n </Row>\n </Container>\n\n <Container>\n <Row>\n <Col>\n <h1 className=\"pb-3 pt-5\">\n {content.spendingSankeyChart.heading} (\n {data.site.siteMetadata.latestSchoolYear})\n </h1>\n </Col>\n </Row>\n </Container>\n <RequireWideScreen minScreenWidth={\"sm\"}>\n <SankeyChart\n data={translatedSankeyProgramData}\n restrictedData={translatedSankeyRestrictedProgramData}\n labelContent={content.spendingSankeyChart}\n margin={{ top: 50, right: 200, bottom: 20, left: 240 }}\n gaEventCategory=\"Overview\"\n includeCategoriesLink={true}\n />\n </RequireWideScreen>\n <Container id=\"programs-section\">\n <Row>\n <Col>\n <h1 className=\"pb-3 pt-5\">\n {content.programsTable.heading} (\n {data.site.siteMetadata.latestSchoolYear})\n </h1>\n <CentralProgramsTable\n data={centralPrograms}\n labelContent={content.programsTable}\n />\n </Col>\n </Row>\n </Container>\n </Layout>\n )\n}\n\nexport default CentralProgramsPage\n\nexport const query = graphql`\n query CentralProgramsPage($language: String) {\n site {\n siteMetadata {\n latestSchoolYear\n }\n }\n allContentfulCentralProgram(filter: { node_locale: { eq: $language } }) {\n nodes {\n programName\n siteCode\n }\n }\n allContentfulOverviewPieChart(filter: { node_locale: { eq: $language } }) {\n nodes {\n name\n centralProgramsLabel\n description {\n raw\n }\n heading\n otherLabel\n statDescriptor\n increaseDescriptor\n decreaseDescriptor\n node_locale\n }\n }\n allCentralProgramsJson {\n nodes {\n name\n category\n remaining_budget_percent\n eoy_total_fte\n eoy_total_positions\n budget\n spending\n year\n code\n fields {\n slug\n }\n }\n }\n centralProgramsOverviewJson {\n all_ousd_eoy_total_fte\n all_ousd_eoy_total_positions\n all_ousd_spending\n eoy_total_fte\n eoy_total_positions\n spending\n year\n time_series {\n year\n eoy_total_positions\n eoy_total_fte\n spending\n budget\n all_ousd_spending\n all_ousd_budget\n all_ousd_eoy_total_fte\n all_ousd_eoy_total_positions\n }\n change_from_previous_year {\n eoy_total_fte\n eoy_total_positions\n spending\n }\n }\n\n contentfulPage(\n slug: { eq: \"central-programs\" }\n node_locale: { eq: $language }\n ) {\n content {\n ... on ContentfulCentralProgramsOverviewPageContent {\n spendingSankeyChart {\n heading\n groupingLabel\n groupingOptions {\n optionId\n optionLabel\n helperDescription {\n raw\n }\n }\n rightLabel\n leftLabel\n readMoreLink\n footnote {\n footnote\n }\n }\n programsTable {\n heading\n columns {\n displayName\n dataFieldName\n helperText {\n helperText\n }\n }\n labels {\n columnsNotShownLabel\n currentlyShownColumnsLabel\n downloadDataLabel\n showHideColumnsLabel\n searchLabel\n totalLabel\n }\n footnote {\n footnote\n }\n }\n }\n }\n slug\n title\n node_locale\n }\n }\n`\n"],"names":["_interopRequireDefault","_interopRequireWildcard","exports","React","_default","default","createElement","d","_fadeStyles","_excluded","fadeStyles","Fade","_ref","ref","className","children","props","handleEnter","useCallback","node","onEnter","addEndListener","status","innerProps","defaultProps","in","timeout","mountOnEnter","unmountOnExit","appear","displayName","size","scrollbarSize","recalc","canUseDOM","scrollDiv","document","style","position","top","width","height","overflow","body","appendChild","offsetWidth","clientWidth","removeChild","useWillUnmount","fn","value","valueRef","onUnmount","useRef","current","useEffect","activeElement","doc","active","nodeName","e","addClass","element","classList","add","contains","baseVal","indexOf","hasClass","setAttribute","replaceClassName","origClass","classToRemove","replace","RegExp","removeClass","remove","getComputedStyle","psuedoElement","defaultView","window","ownerWindow","rUpper","msPattern","hyphenateStyleName","string","toLowerCase","hyphenate","supportedTransforms","property","css","transforms","getPropertyValue","Object","keys","forEach","key","test","isTransform","removeProperty","cssText","isWindow","nodeType","DOCUMENT_NODE","isOverflowing","container","tagName","win","innerWidth","bodyIsOverflowing","scrollHeight","clientHeight","BLACKLIST","siblings","exclude","cb","call","ariaHidden","hide","removeAttribute","manager","ModalManager","_temp","_ref$hideSiblingNodes","hideSiblingNodes","_ref$handleContainerO","handleContainerOverflow","this","modals","containers","data","_proto","prototype","isContainerOverflowing","modal","containerIndexFromModal","overflowing","arr","idx","some","i","setContainerStyle","containerState","paddingRight","parseInt","removeContainerStyle","assign","modalIdx","containerIdx","length","push","_ref2","dialog","backdrop","hideSiblings","classes","split","bind","splice","_ref3","showSiblings","_data$modals","isTopModal","resolveContainerRef","useWaitForDOMRef","onResolved","_useState","useState","resolvedRef","setRef","earlyRef","nextRef","useModalManager","provided","modalManager","setDialogRef","setBackdropRef","Modal","forwardRef","_ref$show","show","_ref$role","role","_ref$backdrop","_ref$keyboard","keyboard","onBackdropClick","onEscapeKeyDown","transition","backdropTransition","_ref$autoFocus","autoFocus","_ref$enforceFocus","enforceFocus","_ref$restoreFocus","restoreFocus","restoreFocusOptions","renderDialog","_ref$renderBackdrop","renderBackdrop","providedManager","containerRef","containerClassName","onShow","_ref$onHide","onHide","onExit","onExited","onExiting","onEntering","onEntered","rest","isMounted","useMounted","prevShow","usePrevious","exited","setExited","lastFocusRef","useImperativeHandle","handleShow","useEventCallback","removeKeydownListenerRef","listen","handleDocumentKeyDown","removeFocusListenerRef","setTimeout","handleEnforceFocus","currentActiveElement","focus","handleHide","_lastFocusRef$current","handleBackdropClick","target","currentTarget","keyCode","defaultPrevented","Transition","dialogProps","undefined","tabIndex","_len","arguments","args","Array","_key","apply","backdropElement","BackdropTransition","onClick","Manager","Selector","BootstrapModalManager","_ModalManager","adjustAndStore","prop","adjust","_css","actual","dataset","parseFloat","restore","_css2","_this","el","_this2","createWithBsPrefix","ModalDialog","bsPrefix","contentClassName","centered","scrollable","dialogClass","CloseButton","label","type","ModalHeader","closeLabel","closeButton","context","useContext","handleClick","DivStyledAsH4","p","Component","animation","dialogAs","DialogTransition","dialogClassName","Dialog","ariaLabelledby","backdropClassName","propsManager","modalStyle","setStyle","_useState2","animateStaticModal","setAnimateStaticModal","waitingForMouseUpRef","ignoreBackdropClickRef","removeStaticModalAnimationRef","_useCallbackRef","useCallbackRef","setModalRef","_modal","modalContext","useMemo","getModalManager","updateDialogStyle","containerIsOverflowing","modalIsOverflowing","ownerDocument","documentElement","paddingLeft","handleWindowResize","removeEventListener","handleDialogMouseDown","handleMouseUp","handleStaticModalAnimation","transitionEnd","handleStaticBackdropClick","backdropProps","baseModalStyle","display","preventDefault","isAppearing","addEventListener","onMouseUp","onMouseDown","Body","ModalBody","Header","Title","ModalTitle","Footer","ModalFooter","TRANSITION_DURATION","BACKDROP_TRANSITION_DURATION","MAX_DELAY_MS","Math","pow","setChainedTimeout","handleRef","timeoutAtMs","delayMs","Date","now","useTimeout","clearTimeout","clear","set","Overlay","outerRef","flip","offset","placement","_props$containerPaddi","containerPadding","_props$popperConfig","popperConfig","rootElement","attachRef","_useCallbackRef2","arrowElement","attachArrowRef","mergedRef","useMergedRefs","_usePopper","usePopper","mergeOptionsWithPopperConfig","enableEvents","styles","attributes","popper","mountOverlay","useRootClose","disabled","rootClose","rootCloseDisabled","clickTrigger","rootCloseEvent","child","arrowProps","arrow","propTypes","_PropTypes$func","isRequired","concat","_excluded2","overlay","_ref$popperConfig","outerProps","popperRef","_usePopperMarginModif","usePopperMarginModifiers","marginModifiers","actualTransition","modifiers","_state$modifiersData$","overlayProps","update","forceUpdate","state","aRef","__wrapped","r","safeFindDOMNode","wrapRefs","scheduleUpdate","outOfBoundaries","modifiersData","isReferenceHidden","RefHolder","_React$Component","render","handleMouseOverOut","handler","relatedNative","related","relatedTarget","nativeEvent","compareDocumentPosition","OverlayTrigger","trigger","propsShow","_ref$defaultShow","defaultShow","onToggle","propsDelay","delay","_ref$flip","triggerNodeRef","hoverStateRef","_useUncontrolledProp","setShow","normalizeDelay","onFocus","onBlur","getTarget","handleFocus","handleBlur","_len2","_key2","handleMouseOver","_len3","_key3","handleMouseOut","_len4","_key4","triggers","triggerProps","onMouseOver","onMouseOut","cloneElement","Tooltip","primaryPlacement","tooltipText","toString","HelpOutline","SearchBar","Search","ClearSearchButton","ExportCSVButton","CSVExport","sortPrograms","a","b","order","dataField","rowA","rowB","totalLabel","sort","trackSortEvent","fieldName","trackCustomEvent","category","action","ModalColumnToggle","columns","onColumnToggle","toggles","labelContent","columnLabels","columnsGroupedBy","visible","hidden","reduce","col","text","toggle","ColumnOption","column","Button","variant","handleColumnToggle","RemoveCircleOutline","AddCircleOutline","Create","labels","showHideColumnsLabel","id","currentlyShownColumnsLabel","map","columnsNotShownLabel","CentralProgramsTable","codes","firstRow","initialObject","name","spending","budget","eoy_total_fte","eoy_total_positions","code","returnObject","currentItem","staff","createFirstRow","columnLabelsByDatafield","getColumnsByDataField","formatter","cell","row","rowIndex","Link","to","fields","slug","columnsFormatter","headerFormatter","colIndex","components","sortElement","sortCaret","getSortCaret","onSort","field","sortFunc","events","columnIndex","trackTableCellClickEvent","align","formatToUSD","searchable","formatFTE","helperText","headerStyle","colum","minWidth","csvExport","commaFormattedInteger","percent","formatRemainingBudgetCell","remaining_budget_percent","keyField","exportCSV","fileName","bootstrap4","search","columnToggle","Row","Col","md","searchProps","placeholder","searchLabel","columnToggleProps","wrapperClasses","bordered","baseProps","rowClasses","totalRowClass","defaultSorted","footnote","csvProps","downloadDataLabel","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","intersect","x0","y0","x1","y1","x2","y2","x3","y3","x10","y10","x32","y32","t","cornerTangents","r1","rc","cw","x01","y01","lo","ox","oy","x11","y11","x00","y00","dx","dy","d2","D","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cx","cy","cornerRadius","constant","padRadius","arc","buffer","r0","a0","a1","da","path","moveTo","t0","t1","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","p0","p1","oc","pi","ax","ay","bx","by","kc","lc","lineTo","closePath","centroid","_","_defineProperty","obj","defineProperty","enumerable","configurable","writable","ownKeys","object","enumerableOnly","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","_objectSpread2","source","getOwnPropertyDescriptors","defineProperties","getNormalizedAngle","angle","normalizedAngle","PI","filterDataBySkipAngle","skipAngle","datum","abs","arcTransitionModeById","enter","leave","middleAngle","centerRadius","pushIn","pushOut","useArcTransitionMode","mode","extraTransition","transitionMode","progress","computeArcCenter","radius","interpolateArcCenter","startAngleValue","endAngleValue","innerRadiusValue","outerRadiusValue","x","y","staticStyle","pointerEvents","ArcLabel","theme","jsx","transform","opacity","textAnchor","dominantBaseline","fill","textColor","ArcLabelsLayer","center","labelAccessor","radiusOffset","_ref$component","component","getLabel","getTextColor","_useArcCentersTransit","extra","_useMotionConfig","animate","springConfig","config","phases","useTransition","initial","from","immediate","interpolate","useArcCentersTransition","Label","transitionProps","computeArcLink","diagonalLength","straightLength","side","point2","centerAngle","point0","point1","points","lineGenerator","line","interpolateLink","offsetValue","diagonalLengthValue","straightLengthValue","diagonalLengthAnimated","straightLengthAnimated","interpolateTextAnchor","computeArcLinkTextAnchor","interpolateTextPosition","textOffsetValue","textOffset","_computeArcLink2","useArcLinkLabelsTransition","_ref2$offset","_ref2$skipAngle","linkColor","getLinkColor","filteredData","useFilteredDataBySkipAngle","transitionPhases","useTransitionPhases","ArcLinkLabel","jsxs","stroke","strokeWidth","thickness","textPosition","ArcLinkLabelsLayer","_useArcLinkLabelsTran","ArcShape","onMouseEnter","onMouseMove","onMouseLeave","event","handleMouseEnter","handleMouseMove","handleMouseLeave","color","borderColor","borderWidth","interpolateArc","arcGenerator","max","ArcsLayer","getBorderColor","_useArcsTransition","useArcsTransition","Arc","_arrayLikeToArray","len","arr2","_unsupportedIterableToArray","o","minLen","n","slice","constructor","_toConsumableArray","isArray","_arrayWithoutHoles","iter","Symbol","iterator","_iterableToArray","TypeError","_nonIterableSpread","_slicedToArray","_arrayWithHoles","_arr","_n","_d","_e","_s","_i","next","done","err","_iterableToArrayLimit","_nonIterableRest","NaN","excluded","sourceKeys","sourceSymbolKeys","propertyIsEnumerable","PieLegends","legends","toggleSerie","Fragment","legend","_legend$data","containerWidth","containerHeight","_window$devicePixelRa","sortByValue","layers","fit","activeInnerRadiusOffset","activeOuterRadiusOffset","enableArcLabels","arcLabel","arcLabelsSkipAngle","arcLabelsRadiusOffset","arcLabelsTextColor","enableArcLinkLabels","arcLinkLabel","arcLinkLabelsSkipAngle","arcLinkLabelsOffset","arcLinkLabelsDiagonalLength","arcLinkLabelsStraightLength","arcLinkLabelsThickness","arcLinkLabelsTextOffset","arcLinkLabelsTextColor","arcLinkLabelsColor","colors","scheme","defs","isInteractive","motionConfig","tooltip","formattedValue","enableChip","pixelRatio","devicePixelRatio","useNormalizedData","_ref$id","_ref$value","valueFormat","_ref$colors","getId","getValue","formatValue","getColor","_datum$label","datumId","datumValue","normalizedDatum","usePieArcs","activeId","hiddenIds","pie$1","innerPie","identity","sortValues","descending","pie","j","k","v","sum","index","arcs","min","pa","hiddenData","item","includes","dataWithArc","angleDeg","legendData","usePieFromBox","_ref4","_ref4$innerRadius","innerRadiusRatio","_ref4$startAngle","_ref4$endAngle","_ref4$padAngle","_ref4$sortByValue","_ref4$cornerRadius","_ref4$fit","_ref4$activeInnerRadi","_ref4$activeOuterRadi","_useState6","setActiveId","_useState8","setHiddenIds","computedProps","boundingBox","centerX","centerY","_computeArcBoundingBo","includeCenter","round","xs","ys","_ref5","computeArcBoundingBox","box","ratio","adjustedBox","debug","pieArcs","_ref$cornerRadius","_ref$padAngle","Arcs","_useTooltip","showTooltipFromEvent","hideTooltip","InnerPie","_ref$sortByValue","_ref$layers","_ref$startAngle","_ref$endAngle","_ref$fit","_ref$innerRadius","_ref$activeInnerRadiu","_ref$activeOuterRadiu","partialMargin","margin","_ref$borderWidth","_ref$borderColor","_ref$enableArcLabels","_ref$arcLabel","_ref$arcLabelsSkipAng","_ref$arcLabelsTextCol","_ref$arcLabelsRadiusO","arcLabelsComponent","_ref$enableArcLinkLab","_ref$arcLinkLabel","_ref$arcLinkLabelsSki","_ref$arcLinkLabelsOff","_ref$arcLinkLabelsDia","_ref$arcLinkLabelsStr","_ref$arcLinkLabelsThi","_ref$arcLinkLabelsTex","_ref$arcLinkLabelsTex2","_ref$arcLinkLabelsCol","arcLinkLabelComponent","_ref$defs","_ref$fill","_ref$isInteractive","_ref$tooltip","_ref$transitionMode","_ref$legends","_useDimensions","outerWidth","outerHeight","innerHeight","normalizedData","_usePieFromBox","boundDefs","layerById","arcLinkLabels","arcLabels","layerContext","usePieLayerContext","layer","Pie","_ref2$isInteractive","_ref2$animate","_ref2$motionConfig","renderWrapper","otherProps","ResponsivePie","MapShim","Map","getIndex","result","entry","class_1","__entries__","get","delete","entries","has","callback","ctx","_a","isBrowser","global$1","g","self","Function","requestAnimationFrame$1","requestAnimationFrame","transitionKeys","mutationObserverSupported","MutationObserver","ResizeObserverController","connected_","mutationEventsAdded_","mutationsObserver_","observers_","onTransitionEnd_","refresh","leadingCall","trailingCall","lastCallTime","resolvePending","proxy","timeoutCallback","timeStamp","throttle","addObserver","observer","connect_","removeObserver","observers","disconnect_","updateObservers_","activeObservers","gatherActive","hasActive","broadcastActive","observe","childList","characterData","subtree","disconnect","_b","propertyName","getInstance","instance_","defineConfigurable","getWindowOf","emptyRect","createRectInit","toFloat","getBordersSize","positions","getHTMLElementContentRect","paddings","positions_1","getPaddings","horizPad","left","right","vertPad","bottom","boxSizing","isDocumentElement","vertScrollbar","horizScrollbar","isSVGGraphicsElement","SVGGraphicsElement","SVGElement","getBBox","getContentRect","bbox","getSVGContentRect","ResizeObservation","broadcastWidth","broadcastHeight","contentRect_","isActive","rect","broadcastRect","ResizeObserverEntry","rectInit","Constr","contentRect","DOMRectReadOnly","create","ResizeObserverSPI","controller","callbackCtx","activeObservations_","observations_","callback_","controller_","callbackCtx_","Element","observations","unobserve","clearActive","observation","WeakMap","ResizeObserver","method","contentPaths","centralProgramsLabel","otherLabel","description","statDescriptor","increaseDescriptor","decreaseDescriptor","getObjValueFromPath","match","Error","acc","parseObject","objectToParse","paths","parse","CenteredMetric","descriptor","icon","percentOfTotal","fontSize","fontWeight","Description","content","renderOptions","renderMark","MARKS","changeDescriptor","change","ArrowDropDown","alt","ArrowDropUp","renderRichText","CentralToTotalComparisonPie","resizeObserver","metricIcon","centralProgramsColor","activeNode","setActiveNode","showRadialLabels","setShowRadialLabels","radialLabelSizeCheck","labelRef","floor","centralPrograms","allOUSD","pieChartData","transparency","arcLinkLabelsLinkHorizontalLength","SpendingPieChart","parsedData","contentToParse","find","parsedContent","viewBox","xmlns","StaffPieChart","Person","pageContext","centralProgramsOverviewData","centralProgramsOverviewJson","allCentralProgramsJson","nodes","contentfulPage","contentfulPie","allContentfulOverviewPieChart","translatedProgramNames","allContentfulCentralProgram","localizeCategory","useLocalizeCategory","language","program","siteCode","programName","console","warn","localizeCategoryFields","localizedObject","localizeSankeyData","links","translatedSankeyProgramData","sankeyProgramData","translatedSankeyRestrictedProgramData","sankeyRestrictedProgramData","pageClassName","title","heading","site","siteMetadata","latestSchoolYear","lg","time_series","programsTable","gaEventCategory","spendingSankeyChart","minScreenWidth","restrictedData","includeCategoriesLink"],"sourceRoot":""}