`${Math.round((d.value / total) * 100)}%`}\n slicesLabelsSkipAngle={10}\n slicesLabelsTextColor=\"#FFFFFF\"\n animate={false}\n motionStiffness={90}\n motionDamping={15}\n\n defs={[\n {\n id: 'dots',\n type: 'patternDots',\n background: 'inherit',\n color: 'rgba(255, 255, 255, 0.3)',\n size: 4,\n padding: 1,\n stagger: true\n },\n {\n id: 'lines',\n type: 'patternLines',\n background: 'inherit',\n color: 'rgba(255, 255, 255, 0.3)',\n rotation: -45,\n lineWidth: 6,\n spacing: 10\n }\n ]}\n fill={fillSettings}\n legends={props.uses_legend && !breakpoints.sm ? legendSettings : []}\n />\n )\n}\n\nPieChart.propTypes = {\n xmlChildren: PropTypes.array.isRequired,\n question: PropTypes.string.isRequired,\n uses_legend: PropTypes.bool.isRequired,\n custom_scheme: PropTypes.array.isRequired,\n}\n\nPieChart.defaultProps = {\n xmlChildren: [],\n question: null,\n uses_legend: false\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { ResponsiveLine } from '@nivo/line'\nimport { useBreakpoint } from 'gatsby-plugin-breakpoints'\n\n\nexport default function LineChart(props) {\n const breakpoints = useBreakpoint();\n const chartData = []\n\n // This is bad but there is a time crunch\n // look for the qID of total and set percentage to no. The qID is set in multiyear.xml for this particular dataset\n const usePercent = props.qID === 'total' ? false : true\n\n props.xmlChildren.map(child => {\n\n // eslint-disable-next-line no-prototype-builtins\n if(child.hasOwnProperty(\"children\")){\n return (\n chartData.push({\n \"id\": child.attributes.response,\n\n \"data\": child.children.map(yearData => {\n return (\n {\n \"x\": Number(yearData.content),\n \"y\": Number(usePercent ? yearData.attributes.percent : yearData.attributes.total)\n }\n )\n })\n })\n )\n } else {\n return (\n There was an error with this line chart. Probably missing multiyear data.
\n )\n }\n })\n\n const legendSettings = [\n {\n anchor: 'bottom-left',\n direction: props.xmlChildren.length > 2 ? 'column' : 'row',\n justify: false,\n translateX: -10,\n translateY: breakpoints.sm ? 200 : 140,\n itemsSpacing: 0,\n itemDirection: 'left-to-right',\n itemWidth: 80,\n itemHeight: 20,\n itemOpacity: 0.75,\n symbolSize: 12,\n symbolShape: 'circle',\n symbolBorderColor: 'rgba(0, 0, 0, .5)',\n effects: [\n {\n on: 'hover',\n style: {\n itemBackground: 'rgba(0, 0, 0, .03)',\n itemOpacity: 1\n }\n }\n ]\n }\n ]\n\n\n\n const marginBottom = props.uses_legend ? props.xmlChildren.length > 2 ? 180 : 150 : 80\n\n return (\n \n )\n}\n\nLineChart.propTypes = {\n xmlChildren: PropTypes.array.isRequired,\n question: PropTypes.string.isRequired,\n uses_legend: PropTypes.bool.isRequired,\n custom_scheme: PropTypes.array.isRequired,\n qID: PropTypes.string.isRequired\n}\n\nLineChart.defaultProps = {\n xmlChildren: [],\n question: null,\n uses_legend: false,\n}\n","import React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport VerticalBarChart from \"./vertical-bar-chart\"\nimport HorizontalBarChart from \"./horizontal-bar-chart\"\nimport BumpChart from \"./bump-chart\"\nimport PieChart from \"./pie-chart\"\nimport LineChart from \"./line-chart\"\n\nexport default function ChartHandler(props) {\n const chartType = props.chart_type.split(\" \").join(\"\")\n const chartClass = props.chart_type.split(\" \").join(\"-\").toLowerCase()\n\n // This is where we define the components based on the chart type we receive as props\n const chartComponents = {\n \"VerticalBarChart\": VerticalBarChart,\n \"HorizontalBarChart\": HorizontalBarChart,\n \"PieChart\": PieChart,\n \"StackedBarChart\": PieChart,\n \"BumpChart\": BumpChart,\n \"LineChart\": LineChart,\n };\n\n const ChartComponent = chartComponents[chartType];\n\n const allChartData = useStaticQuery(graphql`\n {\n allYear2020Xml {\n edges {\n node {\n attributes {\n qID\n question\n }\n id\n xmlChildren {\n children {\n content\n name\n attributes {\n total\n }\n }\n content\n name\n }\n }\n }\n },\n allMultiyearXml {\n edges {\n node {\n attributes {\n qID\n question\n }\n id\n xmlChildren {\n children {\n attributes {\n response\n }\n children {\n attributes {\n total\n ranking\n percent\n }\n content\n }\n }\n }\n }\n }\n }\n }\n `)\n\n const fullCustomScheme = ['#310707','#560B0B', '#810000', '#960000', '#AA0000', '#BB0000', '#D60000', '#E03535', '#EA4646']\n const minimalColorScheme = ['#810000', '#BB0000', '#EA4646']\n\n function shuffleArray(array) {\n for (let i = array.length - 1; i > 0; i--) {\n const j = Math.floor(Math.random() * (i + 1));\n [array[i], array[j]] = [array[j], array[i]];\n }\n }\n\n function renderChart(){\n const limitedChartData = props.is_multiyear ? allChartData.allMultiyearXml.edges : allChartData.allYear2020Xml.edges;\n\n let chartHeight = 500;\n\n if (props.custom_chart_height !== null){\n chartHeight = props.custom_chart_height;\n } else if (chartType === 'PieChart'){\n chartHeight = 400;\n }\n\n return(\n \n {limitedChartData.map(chartData => {\n const qID = chartData.node.attributes.qID;\n const question = chartData.node.attributes.question;\n\n // eslint-disable-next-line no-prototype-builtins\n if(chartData.hasOwnProperty(\"node\")){\n\n return (\n chartData.node.xmlChildren.map(xmlChild => {\n // eslint-disable-next-line no-prototype-builtins\n const custom_scheme = xmlChild.children.length > 3 ? fullCustomScheme : minimalColorScheme\n shuffleArray(custom_scheme)\n\n // eslint-disable-next-line no-prototype-builtins\n if (xmlChild.hasOwnProperty(\"children\") && props.crowdsignal_question_number === qID) {\n return (\n
\n \n
\n )\n } else if (qID === null){\n return (\n null\n //
\n // { props.is_multiyear ? 'Multi year' : 'Single year' } data might be missing for this chart.
\n // \n )\n } else {\n return null\n }\n })\n )\n }\n })}\n
\n )\n }\n\n return (\n <>\n {renderChart()}\n >\n )\n}\n\n\nChartHandler.propTypes = {\n chart_type: PropTypes.string,\n is_multiyear: PropTypes.bool,\n crowdsignal_question_number: PropTypes.string,\n uses_legend: PropTypes.bool,\n custom_chart_height: PropTypes.number,\n custom_scheme: PropTypes.array,\n}\n\nChartHandler.defaultProps = {\n chart_type: ``,\n is_multiyear: false,\n crowdsignal_question_number: ``,\n uses_legend: false,\n custom_chart_height: null,\n custom_scheme: [],\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '@mdi/react';\nimport { mdiCommentQuote } from '@mdi/js';\nimport Img from \"gatsby-image\"\n\n\nexport default function CommunityInsights(props) {\n function renderCommunityInsightsData() {\n return (\n \n
\n
\n
Community Insight
\n \n
\n \n
\n
\n
\n\n
\n
\n {props.insightData.insight_image !== null &&\n
![]()
\n }\n
\n
\n
{props.insightData.name}
\n
\n
\n
\n
\n )\n }\n\n return (\n <>\n {renderCommunityInsightsData()}\n >\n )\n}\n\nCommunityInsights.defaultProps = {\n insightData: {},\n}\n\nCommunityInsights.propTypes = {\n insightData: PropTypes.object,\n}\n","export default function objectToGetParams(object) {\n var params = Object.entries(object).filter(function (_a) {\n var value = _a[1];\n return value !== undefined && value !== null;\n }).map(function (_a) {\n var key = _a[0],\n value = _a[1];\n return encodeURIComponent(key) + \"=\" + encodeURIComponent(String(value));\n });\n return params.length > 0 ? \"?\" + params.join('&') : '';\n}","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nvar __awaiter = this && this.__awaiter || function (thisArg, _arguments, P, generator) {\n function adopt(value) {\n return value instanceof P ? value : new P(function (resolve) {\n resolve(value);\n });\n }\n\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) {\n try {\n step(generator.next(value));\n } catch (e) {\n reject(e);\n }\n }\n\n function rejected(value) {\n try {\n step(generator[\"throw\"](value));\n } catch (e) {\n reject(e);\n }\n }\n\n function step(result) {\n result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);\n }\n\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\n\nvar __generator = this && this.__generator || function (thisArg, body) {\n var _ = {\n label: 0,\n sent: function sent() {\n if (t[0] & 1) throw t[1];\n return t[1];\n },\n trys: [],\n ops: []\n },\n f,\n y,\n t,\n g;\n return g = {\n next: verb(0),\n \"throw\": verb(1),\n \"return\": verb(2)\n }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function () {\n return this;\n }), g;\n\n function verb(n) {\n return function (v) {\n return step([n, v]);\n };\n }\n\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n\n while (_) {\n try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n\n switch (op[0]) {\n case 0:\n case 1:\n t = op;\n break;\n\n case 4:\n _.label++;\n return {\n value: op[1],\n done: false\n };\n\n case 5:\n _.label++;\n y = op[1];\n op = [0];\n continue;\n\n case 7:\n op = _.ops.pop();\n\n _.trys.pop();\n\n continue;\n\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {\n _ = 0;\n continue;\n }\n\n if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {\n _.label = op[1];\n break;\n }\n\n if (op[0] === 6 && _.label < t[1]) {\n _.label = t[1];\n t = op;\n break;\n }\n\n if (t && _.label < t[2]) {\n _.label = t[2];\n\n _.ops.push(op);\n\n break;\n }\n\n if (t[2]) _.ops.pop();\n\n _.trys.pop();\n\n continue;\n }\n\n op = body.call(thisArg, _);\n } catch (e) {\n op = [6, e];\n y = 0;\n } finally {\n f = t = 0;\n }\n }\n\n if (op[0] & 5) throw op[1];\n return {\n value: op[0] ? op[1] : void 0,\n done: true\n };\n }\n};\n\nvar __rest = this && this.__rest || function (s, e) {\n var t = {};\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];\n }\n\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];\n }\n return t;\n};\n\nimport React, { Component } from 'react';\nimport cx from 'classnames';\n\nvar isPromise = function isPromise(obj) {\n return !!obj && (typeof obj === 'object' || typeof obj === 'function') && typeof obj.then === 'function';\n};\n\nvar getBoxPositionOnWindowCenter = function getBoxPositionOnWindowCenter(width, height) {\n return {\n left: window.outerWidth / 2 + (window.screenX || window.screenLeft || 0) - width / 2,\n top: window.outerHeight / 2 + (window.screenY || window.screenTop || 0) - height / 2\n };\n};\n\nvar getBoxPositionOnScreenCenter = function getBoxPositionOnScreenCenter(width, height) {\n return {\n top: (window.screen.height - height) / 2,\n left: (window.screen.width - width) / 2\n };\n};\n\nfunction windowOpen(url, _a, onClose) {\n var height = _a.height,\n width = _a.width,\n configRest = __rest(_a, [\"height\", \"width\"]);\n\n var config = __assign({\n height: height,\n width: width,\n location: 'no',\n toolbar: 'no',\n status: 'no',\n directories: 'no',\n menubar: 'no',\n scrollbars: 'yes',\n resizable: 'no',\n centerscreen: 'yes',\n chrome: 'yes'\n }, configRest);\n\n var shareDialog = window.open(url, '', Object.keys(config).map(function (key) {\n return key + \"=\" + config[key];\n }).join(', '));\n\n if (onClose) {\n var interval_1 = window.setInterval(function () {\n try {\n if (shareDialog === null || shareDialog.closed) {\n window.clearInterval(interval_1);\n onClose(shareDialog);\n }\n } catch (e) {\n /* eslint-disable no-console */\n console.error(e);\n /* eslint-enable no-console */\n }\n }, 1000);\n }\n\n return shareDialog;\n}\n\nvar ShareButton =\n/** @class */\nfunction (_super) {\n __extends(ShareButton, _super);\n\n function ShareButton() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n\n _this.openShareDialog = function (link) {\n var _a = _this.props,\n onShareWindowClose = _a.onShareWindowClose,\n _b = _a.windowHeight,\n windowHeight = _b === void 0 ? 400 : _b,\n _c = _a.windowPosition,\n windowPosition = _c === void 0 ? 'windowCenter' : _c,\n _d = _a.windowWidth,\n windowWidth = _d === void 0 ? 550 : _d;\n\n var windowConfig = __assign({\n height: windowHeight,\n width: windowWidth\n }, windowPosition === 'windowCenter' ? getBoxPositionOnWindowCenter(windowWidth, windowHeight) : getBoxPositionOnScreenCenter(windowWidth, windowHeight));\n\n windowOpen(link, windowConfig, onShareWindowClose);\n };\n\n _this.handleClick = function (event) {\n return __awaiter(_this, void 0, void 0, function () {\n var _a, beforeOnClick, disabled, networkLink, onClick, url, openShareDialogOnClick, opts, link, returnVal;\n\n return __generator(this, function (_b) {\n switch (_b.label) {\n case 0:\n _a = this.props, beforeOnClick = _a.beforeOnClick, disabled = _a.disabled, networkLink = _a.networkLink, onClick = _a.onClick, url = _a.url, openShareDialogOnClick = _a.openShareDialogOnClick, opts = _a.opts;\n link = networkLink(url, opts);\n\n if (disabled) {\n return [2\n /*return*/\n ];\n }\n\n event.preventDefault();\n if (!beforeOnClick) return [3\n /*break*/\n , 2];\n returnVal = beforeOnClick();\n if (!isPromise(returnVal)) return [3\n /*break*/\n , 2];\n return [4\n /*yield*/\n , returnVal];\n\n case 1:\n _b.sent();\n\n _b.label = 2;\n\n case 2:\n if (openShareDialogOnClick) {\n this.openShareDialog(link);\n }\n\n if (onClick) {\n onClick(event, link);\n }\n\n return [2\n /*return*/\n ];\n }\n });\n });\n };\n\n return _this;\n }\n\n ShareButton.prototype.render = function () {\n var _a = this.props,\n beforeOnClick = _a.beforeOnClick,\n children = _a.children,\n className = _a.className,\n disabled = _a.disabled,\n disabledStyle = _a.disabledStyle,\n forwardedRef = _a.forwardedRef,\n networkLink = _a.networkLink,\n networkName = _a.networkName,\n onShareWindowClose = _a.onShareWindowClose,\n openShareDialogOnClick = _a.openShareDialogOnClick,\n opts = _a.opts,\n resetButtonStyle = _a.resetButtonStyle,\n style = _a.style,\n url = _a.url,\n windowHeight = _a.windowHeight,\n windowPosition = _a.windowPosition,\n windowWidth = _a.windowWidth,\n rest = __rest(_a, [\"beforeOnClick\", \"children\", \"className\", \"disabled\", \"disabledStyle\", \"forwardedRef\", \"networkLink\", \"networkName\", \"onShareWindowClose\", \"openShareDialogOnClick\", \"opts\", \"resetButtonStyle\", \"style\", \"url\", \"windowHeight\", \"windowPosition\", \"windowWidth\"]);\n\n var newClassName = cx('react-share__ShareButton', {\n 'react-share__ShareButton--disabled': !!disabled,\n disabled: !!disabled\n }, className);\n var newStyle = resetButtonStyle ? __assign(__assign({\n backgroundColor: 'transparent',\n border: 'none',\n padding: 0,\n font: 'inherit',\n color: 'inherit',\n cursor: 'pointer'\n }, style), disabled && disabledStyle) : __assign(__assign({}, style), disabled && disabledStyle);\n return React.createElement(\"button\", __assign({}, rest, {\n \"aria-label\": rest['aria-label'] || networkName,\n className: newClassName,\n onClick: this.handleClick,\n ref: forwardedRef,\n style: newStyle\n }), children);\n };\n\n ShareButton.defaultProps = {\n disabledStyle: {\n opacity: 0.6\n },\n openShareDialogOnClick: true,\n resetButtonStyle: true\n };\n return ShareButton;\n}(Component);\n\nexport default ShareButton;","var __assign = this && this.__assign || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n\n for (var p in s) {\n if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n }\n\n return t;\n };\n\n return __assign.apply(this, arguments);\n};\n\nimport React, { forwardRef } from 'react';\nimport ShareButton from '../ShareButton';\n\nfunction createShareButton(networkName, link, optsMap, defaultProps) {\n function CreatedButton(props, ref) {\n var opts = optsMap(props);\n\n var passedProps = __assign({}, props); // remove keys from passed props that are passed as opts\n\n\n var optsKeys = Object.keys(opts);\n optsKeys.forEach(function (key) {\n delete passedProps[key];\n });\n return React.createElement(ShareButton, __assign({}, defaultProps, passedProps, {\n forwardedRef: ref,\n networkName: networkName,\n networkLink: link,\n opts: optsMap(props)\n }));\n }\n\n CreatedButton.displayName = \"ShareButton-\" + networkName;\n return forwardRef(CreatedButton);\n}\n\nexport default createShareButton;","import objectToGetParams from './utils/objectToGetParams';\nimport createShareButton from './hocs/createShareButton';\n\nfunction emailLink(url, _a) {\n var subject = _a.subject,\n body = _a.body,\n separator = _a.separator;\n return 'mailto:' + objectToGetParams({\n subject: subject,\n body: body ? body + separator + url : url\n });\n}\n\nvar EmailShareButton = createShareButton('email', emailLink, function (props) {\n return {\n subject: props.subject,\n body: props.body,\n separator: props.separator || ' '\n };\n}, {\n openShareDialogOnClick: false,\n onClick: function onClick(_, link) {\n window.location.href = link;\n }\n});\nexport default EmailShareButton;","var __extends = this && this.__extends || function () {\n var _extendStatics = function extendStatics(d, b) {\n _extendStatics = Object.setPrototypeOf || {\n __proto__: []\n } instanceof Array && function (d, b) {\n d.__proto__ = b;\n } || function (d, b) {\n for (var p in b) {\n if (b.hasOwnProperty(p)) d[p] = b[p];\n }\n };\n\n return _extendStatics(d, b);\n };\n\n return function (d, b) {\n _extendStatics(d, b);\n\n function __() {\n this.constructor = d;\n }\n\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n}();\n\nvar AssertionError =\n/** @class */\nfunction (_super) {\n __extends(AssertionError, _super);\n\n function AssertionError(message) {\n var _this = _super.call(this, message) || this;\n\n _this.name = 'AssertionError';\n return _this;\n }\n\n return AssertionError;\n}(Error);\n\nexport default function assert(value, message) {\n if (!value) {\n throw new AssertionError(message);\n }\n}","import assert from './utils/assert';\nimport objectToGetParams from './utils/objectToGetParams';\nimport createShareButton from './hocs/createShareButton';\n\nfunction facebookLink(url, _a) {\n var quote = _a.quote,\n hashtag = _a.hashtag;\n assert(url, 'facebook.url');\n return 'https://www.facebook.com/sharer/sharer.php' + objectToGetParams({\n u: url,\n quote: quote,\n hashtag: hashtag\n });\n}\n\nvar FacebookShareButton = createShareButton('facebook', facebookLink, function (props) {\n return {\n quote: props.quote,\n hashtag: props.hashtag\n };\n}, {\n windowWidth: 550,\n windowHeight: 400\n});\nexport default FacebookShareButton;","import assert from './utils/assert';\nimport objectToGetParams from './utils/objectToGetParams';\nimport createShareButton from './hocs/createShareButton';\n\nfunction linkedinLink(url, _a) {\n var title = _a.title,\n summary = _a.summary,\n source = _a.source;\n assert(url, 'linkedin.url');\n return 'https://linkedin.com/shareArticle' + objectToGetParams({\n url: url,\n mini: 'true',\n title: title,\n summary: summary,\n source: source\n });\n}\n\nvar LinkedinShareButton = createShareButton('linkedin', linkedinLink, function (_a) {\n var title = _a.title,\n summary = _a.summary,\n source = _a.source;\n return {\n title: title,\n summary: summary,\n source: source\n };\n}, {\n windowWidth: 750,\n windowHeight: 600\n});\nexport default LinkedinShareButton;","import assert from './utils/assert';\nimport objectToGetParams from './utils/objectToGetParams';\nimport createShareButton from './hocs/createShareButton';\n\nfunction twitterLink(url, _a) {\n var title = _a.title,\n via = _a.via,\n _b = _a.hashtags,\n hashtags = _b === void 0 ? [] : _b,\n _c = _a.related,\n related = _c === void 0 ? [] : _c;\n assert(url, 'twitter.url');\n assert(Array.isArray(hashtags), 'twitter.hashtags is not an array');\n assert(Array.isArray(related), 'twitter.related is not an array');\n return 'https://twitter.com/share' + objectToGetParams({\n url: url,\n text: title,\n via: via,\n hashtags: hashtags.length > 0 ? hashtags.join(',') : undefined,\n related: related.length > 0 ? related.join(',') : undefined\n });\n}\n\nvar TwitterShareButton = createShareButton('twitter', twitterLink, function (props) {\n return {\n hashtags: props.hashtags,\n title: props.title,\n via: props.via,\n related: props.related\n };\n}, {\n windowWidth: 550,\n windowHeight: 400\n});\nexport default TwitterShareButton;","\nimport React, { useState } from \"react\"\nimport PropTypes from \"prop-types\"\nimport {\n FacebookShareButton,\n LinkedinShareButton,\n TwitterShareButton,\n EmailShareButton,\n} from \"react-share\";\nimport Icon from '@mdi/react';\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport { mdiTwitter, mdiFacebook, mdiLinkedin, mdiEmail, mdiLinkBoxVariant } from '@mdi/js';\n\nconst SocialShare = (props) => {\n const [isOpen, setIsOpen] = useState(false)\n\n const { site } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n author\n url\n }\n }\n }\n `\n )\n\n const url = site.siteMetadata.url + '#' + props.sectionId\n\n function handleClick() {\n if (!isOpen) {\n setIsOpen(true)\n } else {\n setIsOpen(false)\n }\n }\n\n return (\n \n
\n\n {isOpen &&\n\n
\n
\n \n \n\n
\n \n \n\n
\n \n \n\n
\n \n \n\n
\n \n \n
\n }\n
\n )\n}\n\nSocialShare.propTypes = {\n sectionId: PropTypes.string,\n sectionTitle: PropTypes.string,\n}\n\nSocialShare.defaultProps = {\n sectionId: \"\",\n sectionTitle: \"\",\n}\n\nexport default SocialShare","import React, { useState } from \"react\"\nimport PropTypes from \"prop-types\"\nimport useSurveyResultsData from \"../static_queries/useSurveyResultsData\";\nimport ChartHandler from \"./charts/chart-handler\"\nimport CommunityInsight from \"./community-insight\";\nimport SocialShare from \"./social-share\";\nimport Icon from '@mdi/react';\nimport Img from \"gatsby-image\";\nimport { mdiChartArc, mdiChartLine, mdiChartBar, mdiMapMarker, mdiAccountGroup, mdiHeart, mdiHeartBroken, mdiDiamondStone, mdiChartTimelineVariant, mdiPodcast, mdiRss } from '@mdi/js';\n\nexport default function SurveyResultList({resultRelativePath}) {\n const surveyResultsData = useSurveyResultsData()\n const [isSeeAllOpen, setIsSeeAllOpen] = useState(false)\n\n const surveyResultsIcons = {\n \"mdiChartArc\": mdiChartArc,\n \"mdiChartLine\": mdiChartLine,\n \"mdiChartBar\": mdiChartBar,\n \"mdiMapMarker\": mdiMapMarker,\n \"mdiAccountGroup\": mdiAccountGroup,\n \"mdiHeart\": mdiHeart,\n \"mdiHeartBroken\": mdiHeartBroken,\n \"mdiDiamondStone\": mdiDiamondStone,\n \"mdiChartTimelineVariant\": mdiChartTimelineVariant,\n \"mdiPodcast\": mdiPodcast,\n \"mdiRss\": mdiRss,\n };\n\n function handleOther(tags, title = 'Other responses:') {\n return (\n \n
{title}
\n
\n {\n tags.map(tag => {tag})\n }\n
\n
\n )\n }\n\n function handleSeeAll() {\n if (!isSeeAllOpen) {\n setIsSeeAllOpen(true)\n } else {\n setIsSeeAllOpen(false)\n }\n }\n\n function listLink(item, i, resultIcon) {\n return (\n \n )\n }\n\n function listImageLink(item, i) {\n return (\n \n )\n }\n\n function handleRankedLinkableList(list_items, resultIcon = mdiDiamondStone) {\n if (list_items.length > 0) {\n return (\n <>\n { list_items.length > 0 && Top 10
}\n \n {\n list_items.map((item, i) => {\n if (i < 10){\n if (item.list_item_image !== null) {\n return listImageLink(item, i)\n }\n return listLink(item, i, resultIcon)\n }\n })\n }\n
\n { list_items.length > 10 &&\n <>\n Other mentions:
\n \n {\n list_items.map((item, i) => {\n if (i > 10 && i < 17){\n return listLink(item, i, resultIcon)\n }\n }\n )}\n
\n {!isSeeAllOpen &&\n \n }\n \n { isSeeAllOpen &&\n list_items.map((item, i) => {\n if (i > 18 ){\n return listLink(item, i, resultIcon)\n }\n }\n )}\n
\n >\n }\n >\n )\n }\n }\n\n function renderSurveyResultsData() {\n return (\n <>\n {surveyResultsData.map(result => {\n if (resultRelativePath === result.node.relativePath) {\n const resultIcon = surveyResultsIcons[result.node.childMarkdownRemark.frontmatter.icon];\n const insightData = {\n name: result.node.childMarkdownRemark.frontmatter.insight_name,\n bio: result.node.childMarkdownRemark.frontmatter.insight_bio,\n quote: result.node.childMarkdownRemark.frontmatter.insight_quote,\n insight_image: result.node.childMarkdownRemark.frontmatter.insight_image,\n }\n const displayOtherTags = result.node.childMarkdownRemark.frontmatter.display_other\n const otherTags = result.node.childMarkdownRemark.frontmatter.other_tags || []\n const otherTagsTitle = result.node.childMarkdownRemark.frontmatter.other_tags_title || undefined\n\n return (\n \n
\n {resultIcon &&\n
\n \n
\n }\n
\n \n
\n
{result.node.childMarkdownRemark.frontmatter.title}
\n \n
\n\n {result.node.childMarkdownRemark.frontmatter.graphic &&\n
![]()
\n }\n\n {result.node.childMarkdownRemark.frontmatter.uses_nivo_chart == true &&\n (\n
\n )\n }\n { displayOtherTags &&\n handleOther(otherTags, otherTagsTitle)\n }\n { result.node.childMarkdownRemark.frontmatter.ranked_linkable_list !== null &&\n handleRankedLinkableList(result.node.childMarkdownRemark.frontmatter.ranked_linkable_list, resultIcon)\n }\n { result.node.childMarkdownRemark.frontmatter.include_community_insight &&\n
\n }\n
\n )\n } else { return null }\n })}\n >\n )\n }\n return (\n <>\n {renderSurveyResultsData()}\n >\n )\n}\n\nSurveyResultList.propTypes = {\n resultRelativePath: PropTypes.string,\n}\n\nSurveyResultList.defaultProps = {\n resultRelativePath: '',\n}\n","import { useStaticQuery, graphql } from \"gatsby\"\n\nexport default function useSurveyResultsData() {\n const data = useStaticQuery(graphql`\n {\n allFile(filter: {sourceInstanceName: {eq: \"survey-results\"}}) {\n edges {\n node {\n name\n id\n relativePath\n childMarkdownRemark {\n html\n frontmatter {\n icon\n title\n uses_nivo_chart\n is_multiyear\n graphic {\n id\n childImageSharp {\n fluid(maxWidth: 1000) {\n ...GatsbyImageSharpFluid\n }\n }\n }\n uses_legend\n crowdsignal_question_number\n chart_type\n include_community_insight\n insight_quote\n insight_name\n insight_bio\n insight_image {\n publicURL\n childImageSharp {\n fixed(cropFocus: CENTER, width: 110, height: 110) {\n ...GatsbyImageSharpFixed\n }\n }\n }\n custom_chart_height\n display_other\n other_tags_title\n other_tags\n ranked_linkable_list {\n display_text\n url\n tag\n list_item_image {\n id\n childImageSharp {\n fluid(maxWidth: 310) {\n ...GatsbyImageSharpFluid\n }\n }\n }\n }\n }\n }\n sourceInstanceName\n }\n }\n }\n }\n`)\n return data.allFile.edges\n}\n","import React from \"react\"\nimport SurveyResult from \"./survey-result\"\nimport useSectionData from \"../static_queries/useSectionData\"\n\nexport default function SectionList() {\n const sectionData = useSectionData()\n\n function renderSectionData() {\n const orderedSections = [];\n\n sectionData.file.childMarkdownRemark.frontmatter.sections.map(section => {\n orderedSections.push(section.slice(0, -3))\n })\n\n return (\n \n {\n orderedSections.map((orderedSection, i) => {\n return(\n
\n {sectionData.allFile.edges.map(section => {\n const thisSectionName = `content/sections/${section.node.name}`\n const firstSection = section.node.name === 'introduction'\n\n if (orderedSection === thisSectionName) {\n return (\n \n {section.node.childMarkdownRemark.frontmatter.show_title_in_content === true &&\n <>\n {section.node.childMarkdownRemark.frontmatter.title}
\n {section.node.childMarkdownRemark.frontmatter.subtitle}
\n >\n }\n {section.node.childMarkdownRemark.html &&\n \n }\n {section.node.childMarkdownRemark.frontmatter.survey_results.map((result, i) => {\n const resultRelativePath = result.replace('content/survey-results/','')\n return (\n \n )\n })}\n \n )\n }\n })}\n \n )\n })\n }\n
\n )\n }\n return (\n \n {renderSectionData()}\n
\n )\n}\n","/**\n * SEO component that queries for data with\n * Gatsby's useStaticQuery React hook\n *\n * See: https://www.gatsbyjs.org/docs/use-static-query/\n */\n\nimport React from \"react\"\nimport PropTypes from \"prop-types\"\nimport { Helmet } from \"react-helmet\"\nimport { useStaticQuery, graphql } from \"gatsby\"\nimport ShareCard from \"../assets/2020-ruby-on-rails-survey-results.png\";\n\nfunction SEO({ description, lang, meta }) {\n const { site } = useStaticQuery(\n graphql`\n query {\n site {\n siteMetadata {\n title\n description\n author\n url\n }\n }\n }\n `\n )\n\n const metaDescription = description || site.siteMetadata.description\n const metaTitle = site.siteMetadata.title\n const shareCardURL = `${site.siteMetadata.url}${ShareCard}`\n\n return (\n \n )\n}\n\nSEO.defaultProps = {\n lang: `en`,\n meta: [],\n description: ``,\n}\n\nSEO.propTypes = {\n description: PropTypes.string,\n lang: PropTypes.string,\n meta: PropTypes.arrayOf(PropTypes.object),\n}\n\nexport default SEO\n","import React from \"react\"\nimport Layout from \"../components/site-layout\"\nimport SectionList from \"../components/section-list\"\nimport SEO from \"../components/seo-helper\"\n\nconst IndexPage = () => (\n \n \n \n \n)\n\nexport default IndexPage\n","/**\n * The function whose prototype chain sequence wrappers inherit from.\n *\n * @private\n */\nfunction baseLodash() {\n // No operation performed.\n}\n\nmodule.exports = baseLodash;\n","var apply = require('./_apply'),\n createCtor = require('./_createCtor'),\n createHybrid = require('./_createHybrid'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/**\n * Creates a function that wraps `func` to enable currying.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {number} arity The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createCurry(func, bitmask, arity) {\n var Ctor = createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length,\n placeholder = getHolder(wrapper);\n\n while (index--) {\n args[index] = arguments[index];\n }\n var holders = (length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder)\n ? []\n : replaceHolders(args, placeholder);\n\n length -= holders.length;\n if (length < arity) {\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, undefined,\n args, holders, undefined, undefined, arity - length);\n }\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return apply(fn, this, args);\n }\n return wrapper;\n}\n\nmodule.exports = createCurry;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _react = require(\"react\");\n\nvar _setDisplayName = _interopRequireDefault(require(\"./setDisplayName\"));\n\nvar _wrapDisplayName = _interopRequireDefault(require(\"./wrapDisplayName\"));\n\nvar mapProps = function mapProps(propsMapper) {\n return function (BaseComponent) {\n var factory = (0, _react.createFactory)(BaseComponent);\n\n var MapProps = function MapProps(props) {\n return factory(propsMapper(props));\n };\n\n if (process.env.NODE_ENV !== 'production') {\n return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'mapProps'))(MapProps);\n }\n\n return MapProps;\n };\n};\n\nvar _default = mapProps;\nexports.default = _default;","var castPath = require('./_castPath'),\n last = require('./last'),\n parent = require('./_parent'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.unset`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The property path to unset.\n * @returns {boolean} Returns `true` if the property is deleted, else `false`.\n */\nfunction baseUnset(object, path) {\n path = castPath(path, object);\n object = parent(object, path);\n return object == null || delete object[toKey(last(path))];\n}\n\nmodule.exports = baseUnset;\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n // proceed\n\n default:\n this._context.lineTo(x, y);\n\n break;\n }\n }\n};\nexport default function (context) {\n return new Linear(context);\n}","var baseForOwn = require('./_baseForOwn'),\n createBaseEach = require('./_createBaseEach');\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nmodule.exports = baseEach;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","import colors from \"../colors.js\";\n\nfunction ramp(range) {\n var n = range.length;\n return function (t) {\n return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];\n };\n}\n\nexport default ramp(colors(\"44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725\"));\nexport var magma = ramp(colors(\"00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf\"));\nexport var inferno = ramp(colors(\"00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4\"));\nexport var plasma = ramp(colors(\"0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921\"));","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"d8b365f5f5f55ab4ac\", \"a6611adfc27d80cdc1018571\", \"a6611adfc27df5f5f580cdc1018571\", \"8c510ad8b365f6e8c3c7eae55ab4ac01665e\", \"8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e\", \"8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e\", \"8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e\", \"5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30\", \"5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30\").map(colors);\nexport default ramp(scheme);","var assignMergeValue = require('./_assignMergeValue'),\n cloneBuffer = require('./_cloneBuffer'),\n cloneTypedArray = require('./_cloneTypedArray'),\n copyArray = require('./_copyArray'),\n initCloneObject = require('./_initCloneObject'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLikeObject = require('./isArrayLikeObject'),\n isBuffer = require('./isBuffer'),\n isFunction = require('./isFunction'),\n isObject = require('./isObject'),\n isPlainObject = require('./isPlainObject'),\n isTypedArray = require('./isTypedArray'),\n safeGet = require('./_safeGet'),\n toPlainObject = require('./toPlainObject');\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\nmodule.exports = baseMergeDeep;\n","var getWrapDetails = require('./_getWrapDetails'),\n insertWrapDetails = require('./_insertWrapDetails'),\n setToString = require('./_setToString'),\n updateWrapDetails = require('./_updateWrapDetails');\n\n/**\n * Sets the `toString` method of `wrapper` to mimic the source of `reference`\n * with wrapper details in a comment at the top of the source body.\n *\n * @private\n * @param {Function} wrapper The function to modify.\n * @param {Function} reference The reference function.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @returns {Function} Returns `wrapper`.\n */\nfunction setWrapToString(wrapper, reference, bitmask) {\n var source = (reference + '');\n return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));\n}\n\nmodule.exports = setWrapToString;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var global = require('../internals/global');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar createProperty = require('../internals/create-property');\n\nvar Array = global.Array;\nvar max = Math.max;\n\nmodule.exports = function (O, start, end) {\n var length = lengthOfArrayLike(O);\n var k = toAbsoluteIndex(start, length);\n var fin = toAbsoluteIndex(end === undefined ? length : end, length);\n var result = Array(max(fin - k, 0));\n for (var n = 0; k < fin; k++, n++) createProperty(result, n, O[k]);\n result.length = n;\n return result;\n};\n","'use strict';\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar toString = require('../internals/to-string');\nvar fails = require('../internals/fails');\nvar internalSort = require('../internals/array-sort');\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\nvar FF = require('../internals/engine-ff-version');\nvar IE_OR_EDGE = require('../internals/engine-is-ie-or-edge');\nvar V8 = require('../internals/engine-v8-version');\nvar WEBKIT = require('../internals/engine-webkit-version');\n\nvar test = [];\nvar un$Sort = uncurryThis(test.sort);\nvar push = uncurryThis(test.push);\n\n// IE8-\nvar FAILS_ON_UNDEFINED = fails(function () {\n test.sort(undefined);\n});\n// V8 bug\nvar FAILS_ON_NULL = fails(function () {\n test.sort(null);\n});\n// Old WebKit\nvar STRICT_METHOD = arrayMethodIsStrict('sort');\n\nvar STABLE_SORT = !fails(function () {\n // feature detection can be too slow, so check engines versions\n if (V8) return V8 < 70;\n if (FF && FF > 3) return;\n if (IE_OR_EDGE) return true;\n if (WEBKIT) return WEBKIT < 603;\n\n var result = '';\n var code, chr, value, index;\n\n // generate an array with more 512 elements (Chakra and old V8 fails only in this case)\n for (code = 65; code < 76; code++) {\n chr = String.fromCharCode(code);\n\n switch (code) {\n case 66: case 69: case 70: case 72: value = 3; break;\n case 68: case 71: value = 4; break;\n default: value = 2;\n }\n\n for (index = 0; index < 47; index++) {\n test.push({ k: chr + index, v: value });\n }\n }\n\n test.sort(function (a, b) { return b.v - a.v; });\n\n for (index = 0; index < test.length; index++) {\n chr = test[index].k.charAt(0);\n if (result.charAt(result.length - 1) !== chr) result += chr;\n }\n\n return result !== 'DGBEFHACIJK';\n});\n\nvar FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT;\n\nvar getSortCompare = function (comparefn) {\n return function (x, y) {\n if (y === undefined) return -1;\n if (x === undefined) return 1;\n if (comparefn !== undefined) return +comparefn(x, y) || 0;\n return toString(x) > toString(y) ? 1 : -1;\n };\n};\n\n// `Array.prototype.sort` method\n// https://tc39.es/ecma262/#sec-array.prototype.sort\n$({ target: 'Array', proto: true, forced: FORCED }, {\n sort: function sort(comparefn) {\n if (comparefn !== undefined) aCallable(comparefn);\n\n var array = toObject(this);\n\n if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn);\n\n var items = [];\n var arrayLength = lengthOfArrayLike(array);\n var itemsLength, index;\n\n for (index = 0; index < arrayLength; index++) {\n if (index in array) push(items, array[index]);\n }\n\n internalSort(items, getSortCompare(comparefn));\n\n itemsLength = items.length;\n index = 0;\n\n while (index < itemsLength) array[index] = items[index++];\n while (index < arrayLength) delete array[index++];\n\n return array;\n }\n});\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar numberTag = '[object Number]';\n\n/**\n * Checks if `value` is classified as a `Number` primitive or object.\n *\n * **Note:** To exclude `Infinity`, `-Infinity`, and `NaN`, which are\n * classified as numbers, use the `_.isFinite` method.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a number, else `false`.\n * @example\n *\n * _.isNumber(3);\n * // => true\n *\n * _.isNumber(Number.MIN_VALUE);\n * // => true\n *\n * _.isNumber(Infinity);\n * // => true\n *\n * _.isNumber('3');\n * // => false\n */\nfunction isNumber(value) {\n return typeof value == 'number' ||\n (isObjectLike(value) && baseGetTag(value) == numberTag);\n}\n\nmodule.exports = isNumber;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\nmodule.exports = baseTimes;\n","var userAgent = require('../internals/engine-user-agent');\n\nvar webkit = userAgent.match(/AppleWebKit\\/(\\d+)\\./);\n\nmodule.exports = !!webkit && +webkit[1];\n","var global = require('../internals/global');\nvar classof = require('../internals/classof');\n\nvar String = global.String;\n\nmodule.exports = function (argument) {\n if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');\n return String(argument);\n};\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","/**\n * Gets the argument placeholder value for `func`.\n *\n * @private\n * @param {Function} func The function to inspect.\n * @returns {*} Returns the placeholder value.\n */\nfunction getHolder(func) {\n var object = func;\n return object.placeholder;\n}\n\nmodule.exports = getHolder;\n","/**\n * The base implementation of `_.gt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is greater than `other`,\n * else `false`.\n */\nfunction baseGt(value, other) {\n return value > other;\n}\n\nmodule.exports = baseGt;\n","import { tickStep } from \"d3-array\";\nimport { format, formatPrefix, formatSpecifier, precisionFixed, precisionPrefix, precisionRound } from \"d3-format\";\nexport default function tickFormat(start, stop, count, specifier) {\n var step = tickStep(start, stop, count),\n precision;\n specifier = formatSpecifier(specifier == null ? \",f\" : specifier);\n\n switch (specifier.type) {\n case \"s\":\n {\n var value = Math.max(Math.abs(start), Math.abs(stop));\n if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;\n return formatPrefix(specifier, value);\n }\n\n case \"\":\n case \"e\":\n case \"g\":\n case \"p\":\n case \"r\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === \"e\");\n break;\n }\n\n case \"f\":\n case \"%\":\n {\n if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === \"%\") * 2;\n break;\n }\n }\n\n return format(specifier);\n}","import exponent from \"./exponent.js\";\nexport default function (step, value) {\n return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));\n}","import exponent from \"./exponent.js\";\nexport default function (step, max) {\n step = Math.abs(step), max = Math.abs(max) - step;\n return Math.max(0, exponent(max) - exponent(step)) + 1;\n}","import exponent from \"./exponent.js\";\nexport default function (step) {\n return Math.max(0, -exponent(Math.abs(step)));\n}","import { ticks, tickIncrement } from \"d3-array\";\nimport continuous, { copy } from \"./continuous.js\";\nimport { initRange } from \"./init.js\";\nimport tickFormat from \"./tickFormat.js\";\nexport function linearish(scale) {\n var domain = scale.domain;\n\n scale.ticks = function (count) {\n var d = domain();\n return ticks(d[0], d[d.length - 1], count == null ? 10 : count);\n };\n\n scale.tickFormat = function (count, specifier) {\n var d = domain();\n return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);\n };\n\n scale.nice = function (count) {\n if (count == null) count = 10;\n var d = domain();\n var i0 = 0;\n var i1 = d.length - 1;\n var start = d[i0];\n var stop = d[i1];\n var prestep;\n var step;\n var maxIter = 10;\n\n if (stop < start) {\n step = start, start = stop, stop = step;\n step = i0, i0 = i1, i1 = step;\n }\n\n while (maxIter-- > 0) {\n step = tickIncrement(start, stop, count);\n\n if (step === prestep) {\n d[i0] = start;\n d[i1] = stop;\n return domain(d);\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n } else {\n break;\n }\n\n prestep = step;\n }\n\n return scale;\n };\n\n return scale;\n}\nexport default function linear() {\n var scale = continuous();\n\n scale.copy = function () {\n return copy(scale, linear());\n };\n\n initRange.apply(scale, arguments);\n return linearish(scale);\n}","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e9a3c9f7f7f7a1d76a\", \"d01c8bf1b6dab8e1864dac26\", \"d01c8bf1b6daf7f7f7b8e1864dac26\", \"c51b7de9a3c9fde0efe6f5d0a1d76a4d9221\", \"c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221\", \"c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221\", \"c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221\", \"8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419\", \"8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419\").map(colors);\nexport default ramp(scheme);","var copyObject = require('./_copyObject'),\n getSymbols = require('./_getSymbols');\n\n/**\n * Copies own symbols of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy symbols from.\n * @param {Object} [object={}] The object to copy symbols to.\n * @returns {Object} Returns `object`.\n */\nfunction copySymbols(source, object) {\n return copyObject(source, getSymbols(source), object);\n}\n\nmodule.exports = copySymbols;\n","/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\nmodule.exports = stackHas;\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import _classCallCheck from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/createClass.js\";\nimport \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nvar EPSILON = Math.pow(2, -52);\nvar EDGE_STACK = new Uint32Array(512);\n\nvar Delaunator = /*#__PURE__*/function () {\n function Delaunator(coords) {\n _classCallCheck(this, Delaunator);\n\n var n = coords.length >> 1;\n if (n > 0 && typeof coords[0] !== 'number') throw new Error('Expected coords to contain numbers.');\n this.coords = coords; // arrays that will store the triangulation graph\n\n var maxTriangles = Math.max(2 * n - 5, 0);\n this._triangles = new Uint32Array(maxTriangles * 3);\n this._halfedges = new Int32Array(maxTriangles * 3); // temporary arrays for tracking the edges of the advancing convex hull\n\n this._hashSize = Math.ceil(Math.sqrt(n));\n this._hullPrev = new Uint32Array(n); // edge to prev edge\n\n this._hullNext = new Uint32Array(n); // edge to next edge\n\n this._hullTri = new Uint32Array(n); // edge to adjacent triangle\n\n this._hullHash = new Int32Array(this._hashSize).fill(-1); // angular edge hash\n // temporary arrays for sorting points\n\n this._ids = new Uint32Array(n);\n this._dists = new Float64Array(n);\n this.update();\n }\n\n _createClass(Delaunator, [{\n key: \"update\",\n value: function update() {\n var coords = this.coords,\n hullPrev = this._hullPrev,\n hullNext = this._hullNext,\n hullTri = this._hullTri,\n hullHash = this._hullHash;\n var n = coords.length >> 1; // populate an array of point indices; calculate input data bbox\n\n var minX = Infinity;\n var minY = Infinity;\n var maxX = -Infinity;\n var maxY = -Infinity;\n\n for (var i = 0; i < n; i++) {\n var x = coords[2 * i];\n var y = coords[2 * i + 1];\n if (x < minX) minX = x;\n if (y < minY) minY = y;\n if (x > maxX) maxX = x;\n if (y > maxY) maxY = y;\n this._ids[i] = i;\n }\n\n var cx = (minX + maxX) / 2;\n var cy = (minY + maxY) / 2;\n var minDist = Infinity;\n var i0, i1, i2; // pick a seed point close to the center\n\n for (var _i = 0; _i < n; _i++) {\n var d = dist(cx, cy, coords[2 * _i], coords[2 * _i + 1]);\n\n if (d < minDist) {\n i0 = _i;\n minDist = d;\n }\n }\n\n var i0x = coords[2 * i0];\n var i0y = coords[2 * i0 + 1];\n minDist = Infinity; // find the point closest to the seed\n\n for (var _i2 = 0; _i2 < n; _i2++) {\n if (_i2 === i0) continue;\n\n var _d = dist(i0x, i0y, coords[2 * _i2], coords[2 * _i2 + 1]);\n\n if (_d < minDist && _d > 0) {\n i1 = _i2;\n minDist = _d;\n }\n }\n\n var i1x = coords[2 * i1];\n var i1y = coords[2 * i1 + 1];\n var minRadius = Infinity; // find the third point which forms the smallest circumcircle with the first two\n\n for (var _i3 = 0; _i3 < n; _i3++) {\n if (_i3 === i0 || _i3 === i1) continue;\n var r = circumradius(i0x, i0y, i1x, i1y, coords[2 * _i3], coords[2 * _i3 + 1]);\n\n if (r < minRadius) {\n i2 = _i3;\n minRadius = r;\n }\n }\n\n var i2x = coords[2 * i2];\n var i2y = coords[2 * i2 + 1];\n\n if (minRadius === Infinity) {\n // order collinear points by dx (or dy if all x are identical)\n // and return the list as a hull\n for (var _i4 = 0; _i4 < n; _i4++) {\n this._dists[_i4] = coords[2 * _i4] - coords[0] || coords[2 * _i4 + 1] - coords[1];\n }\n\n quicksort(this._ids, this._dists, 0, n - 1);\n var hull = new Uint32Array(n);\n var j = 0;\n\n for (var _i5 = 0, d0 = -Infinity; _i5 < n; _i5++) {\n var id = this._ids[_i5];\n\n if (this._dists[id] > d0) {\n hull[j++] = id;\n d0 = this._dists[id];\n }\n }\n\n this.hull = hull.subarray(0, j);\n this.triangles = new Uint32Array(0);\n this.halfedges = new Uint32Array(0);\n return;\n } // swap the order of the seed points for counter-clockwise orientation\n\n\n if (orient(i0x, i0y, i1x, i1y, i2x, i2y)) {\n var _i6 = i1;\n var _x = i1x;\n var _y = i1y;\n i1 = i2;\n i1x = i2x;\n i1y = i2y;\n i2 = _i6;\n i2x = _x;\n i2y = _y;\n }\n\n var center = circumcenter(i0x, i0y, i1x, i1y, i2x, i2y);\n this._cx = center.x;\n this._cy = center.y;\n\n for (var _i7 = 0; _i7 < n; _i7++) {\n this._dists[_i7] = dist(coords[2 * _i7], coords[2 * _i7 + 1], center.x, center.y);\n } // sort the points by distance from the seed triangle circumcenter\n\n\n quicksort(this._ids, this._dists, 0, n - 1); // set up the seed triangle as the starting hull\n\n this._hullStart = i0;\n var hullSize = 3;\n hullNext[i0] = hullPrev[i2] = i1;\n hullNext[i1] = hullPrev[i0] = i2;\n hullNext[i2] = hullPrev[i1] = i0;\n hullTri[i0] = 0;\n hullTri[i1] = 1;\n hullTri[i2] = 2;\n hullHash.fill(-1);\n hullHash[this._hashKey(i0x, i0y)] = i0;\n hullHash[this._hashKey(i1x, i1y)] = i1;\n hullHash[this._hashKey(i2x, i2y)] = i2;\n this.trianglesLen = 0;\n\n this._addTriangle(i0, i1, i2, -1, -1, -1);\n\n for (var k = 0, xp, yp; k < this._ids.length; k++) {\n var _i8 = this._ids[k];\n var _x2 = coords[2 * _i8];\n var _y2 = coords[2 * _i8 + 1]; // skip near-duplicate points\n\n if (k > 0 && Math.abs(_x2 - xp) <= EPSILON && Math.abs(_y2 - yp) <= EPSILON) continue;\n xp = _x2;\n yp = _y2; // skip seed triangle points\n\n if (_i8 === i0 || _i8 === i1 || _i8 === i2) continue; // find a visible edge on the convex hull using edge hash\n\n var start = 0;\n\n for (var _j = 0, key = this._hashKey(_x2, _y2); _j < this._hashSize; _j++) {\n start = hullHash[(key + _j) % this._hashSize];\n if (start !== -1 && start !== hullNext[start]) break;\n }\n\n start = hullPrev[start];\n var e = start,\n q = void 0;\n\n while (q = hullNext[e], !orient(_x2, _y2, coords[2 * e], coords[2 * e + 1], coords[2 * q], coords[2 * q + 1])) {\n e = q;\n\n if (e === start) {\n e = -1;\n break;\n }\n }\n\n if (e === -1) continue; // likely a near-duplicate point; skip it\n // add the first triangle from the point\n\n var t = this._addTriangle(e, _i8, hullNext[e], -1, -1, hullTri[e]); // recursively flip triangles from the point until they satisfy the Delaunay condition\n\n\n hullTri[_i8] = this._legalize(t + 2);\n hullTri[e] = t; // keep track of boundary triangles on the hull\n\n hullSize++; // walk forward through the hull, adding more triangles and flipping recursively\n\n var _n = hullNext[e];\n\n while (q = hullNext[_n], orient(_x2, _y2, coords[2 * _n], coords[2 * _n + 1], coords[2 * q], coords[2 * q + 1])) {\n t = this._addTriangle(_n, _i8, q, hullTri[_i8], -1, hullTri[_n]);\n hullTri[_i8] = this._legalize(t + 2);\n hullNext[_n] = _n; // mark as removed\n\n hullSize--;\n _n = q;\n } // walk backward from the other side, adding more triangles and flipping\n\n\n if (e === start) {\n while (q = hullPrev[e], orient(_x2, _y2, coords[2 * q], coords[2 * q + 1], coords[2 * e], coords[2 * e + 1])) {\n t = this._addTriangle(q, _i8, e, -1, hullTri[e], hullTri[q]);\n\n this._legalize(t + 2);\n\n hullTri[q] = t;\n hullNext[e] = e; // mark as removed\n\n hullSize--;\n e = q;\n }\n } // update the hull indices\n\n\n this._hullStart = hullPrev[_i8] = e;\n hullNext[e] = hullPrev[_n] = _i8;\n hullNext[_i8] = _n; // save the two new edges in the hash table\n\n hullHash[this._hashKey(_x2, _y2)] = _i8;\n hullHash[this._hashKey(coords[2 * e], coords[2 * e + 1])] = e;\n }\n\n this.hull = new Uint32Array(hullSize);\n\n for (var _i9 = 0, _e = this._hullStart; _i9 < hullSize; _i9++) {\n this.hull[_i9] = _e;\n _e = hullNext[_e];\n } // trim typed triangle mesh arrays\n\n\n this.triangles = this._triangles.subarray(0, this.trianglesLen);\n this.halfedges = this._halfedges.subarray(0, this.trianglesLen);\n }\n }, {\n key: \"_hashKey\",\n value: function _hashKey(x, y) {\n return Math.floor(pseudoAngle(x - this._cx, y - this._cy) * this._hashSize) % this._hashSize;\n }\n }, {\n key: \"_legalize\",\n value: function _legalize(a) {\n var triangles = this._triangles,\n halfedges = this._halfedges,\n coords = this.coords;\n var i = 0;\n var ar = 0; // recursion eliminated with a fixed-size stack\n\n while (true) {\n var b = halfedges[a];\n /* if the pair of triangles doesn't satisfy the Delaunay condition\n * (p1 is inside the circumcircle of [p0, pl, pr]), flip them,\n * then do the same check/flip recursively for the new pair of triangles\n *\n * pl pl\n * /||\\ / \\\n * al/ || \\bl al/ \\a\n * / || \\ / \\\n * / a||b \\ flip /___ar___\\\n * p0\\ || /p1 => p0\\---bl---/p1\n * \\ || / \\ /\n * ar\\ || /br b\\ /br\n * \\||/ \\ /\n * pr pr\n */\n\n var a0 = a - a % 3;\n ar = a0 + (a + 2) % 3;\n\n if (b === -1) {\n // convex hull edge\n if (i === 0) break;\n a = EDGE_STACK[--i];\n continue;\n }\n\n var b0 = b - b % 3;\n var al = a0 + (a + 1) % 3;\n var bl = b0 + (b + 2) % 3;\n var p0 = triangles[ar];\n var pr = triangles[a];\n var pl = triangles[al];\n var p1 = triangles[bl];\n var illegal = inCircle(coords[2 * p0], coords[2 * p0 + 1], coords[2 * pr], coords[2 * pr + 1], coords[2 * pl], coords[2 * pl + 1], coords[2 * p1], coords[2 * p1 + 1]);\n\n if (illegal) {\n triangles[a] = p1;\n triangles[b] = p0;\n var hbl = halfedges[bl]; // edge swapped on the other side of the hull (rare); fix the halfedge reference\n\n if (hbl === -1) {\n var e = this._hullStart;\n\n do {\n if (this._hullTri[e] === bl) {\n this._hullTri[e] = a;\n break;\n }\n\n e = this._hullPrev[e];\n } while (e !== this._hullStart);\n }\n\n this._link(a, hbl);\n\n this._link(b, halfedges[ar]);\n\n this._link(ar, bl);\n\n var br = b0 + (b + 1) % 3; // don't worry about hitting the cap: it can only happen on extremely degenerate input\n\n if (i < EDGE_STACK.length) {\n EDGE_STACK[i++] = br;\n }\n } else {\n if (i === 0) break;\n a = EDGE_STACK[--i];\n }\n }\n\n return ar;\n }\n }, {\n key: \"_link\",\n value: function _link(a, b) {\n this._halfedges[a] = b;\n if (b !== -1) this._halfedges[b] = a;\n } // add a new triangle given vertex indices and adjacent half-edge ids\n\n }, {\n key: \"_addTriangle\",\n value: function _addTriangle(i0, i1, i2, a, b, c) {\n var t = this.trianglesLen;\n this._triangles[t] = i0;\n this._triangles[t + 1] = i1;\n this._triangles[t + 2] = i2;\n\n this._link(t, a);\n\n this._link(t + 1, b);\n\n this._link(t + 2, c);\n\n this.trianglesLen += 3;\n return t;\n }\n }], [{\n key: \"from\",\n value: function from(points) {\n var getX = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : defaultGetX;\n var getY = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultGetY;\n var n = points.length;\n var coords = new Float64Array(n * 2);\n\n for (var i = 0; i < n; i++) {\n var p = points[i];\n coords[2 * i] = getX(p);\n coords[2 * i + 1] = getY(p);\n }\n\n return new Delaunator(coords);\n }\n }]);\n\n return Delaunator;\n}(); // monotonically increases with real angle, but doesn't need expensive trigonometry\n\n\nexport { Delaunator as default };\n\nfunction pseudoAngle(dx, dy) {\n var p = dx / (Math.abs(dx) + Math.abs(dy));\n return (dy > 0 ? 3 - p : 1 + p) / 4; // [0..1]\n}\n\nfunction dist(ax, ay, bx, by) {\n var dx = ax - bx;\n var dy = ay - by;\n return dx * dx + dy * dy;\n} // return 2d orientation sign if we're confident in it through J. Shewchuk's error bound check\n\n\nfunction orientIfSure(px, py, rx, ry, qx, qy) {\n var l = (ry - py) * (qx - px);\n var r = (rx - px) * (qy - py);\n return Math.abs(l - r) >= 3.3306690738754716e-16 * Math.abs(l + r) ? l - r : 0;\n} // a more robust orientation test that's stable in a given triangle (to fix robustness issues)\n\n\nfunction orient(rx, ry, qx, qy, px, py) {\n var sign = orientIfSure(px, py, rx, ry, qx, qy) || orientIfSure(rx, ry, qx, qy, px, py) || orientIfSure(qx, qy, px, py, rx, ry);\n return sign < 0;\n}\n\nfunction inCircle(ax, ay, bx, by, cx, cy, px, py) {\n var dx = ax - px;\n var dy = ay - py;\n var ex = bx - px;\n var ey = by - py;\n var fx = cx - px;\n var fy = cy - py;\n var ap = dx * dx + dy * dy;\n var bp = ex * ex + ey * ey;\n var cp = fx * fx + fy * fy;\n return dx * (ey * cp - bp * fy) - dy * (ex * cp - bp * fx) + ap * (ex * fy - ey * fx) < 0;\n}\n\nfunction circumradius(ax, ay, bx, by, cx, cy) {\n var dx = bx - ax;\n var dy = by - ay;\n var ex = cx - ax;\n var ey = cy - ay;\n var bl = dx * dx + dy * dy;\n var cl = ex * ex + ey * ey;\n var d = 0.5 / (dx * ey - dy * ex);\n var x = (ey * bl - dy * cl) * d;\n var y = (dx * cl - ex * bl) * d;\n return x * x + y * y;\n}\n\nfunction circumcenter(ax, ay, bx, by, cx, cy) {\n var dx = bx - ax;\n var dy = by - ay;\n var ex = cx - ax;\n var ey = cy - ay;\n var bl = dx * dx + dy * dy;\n var cl = ex * ex + ey * ey;\n var d = 0.5 / (dx * ey - dy * ex);\n var x = ax + (ey * bl - dy * cl) * d;\n var y = ay + (dx * cl - ex * bl) * d;\n return {\n x: x,\n y: y\n };\n}\n\nfunction quicksort(ids, dists, left, right) {\n if (right - left <= 20) {\n for (var i = left + 1; i <= right; i++) {\n var temp = ids[i];\n var tempDist = dists[temp];\n var j = i - 1;\n\n while (j >= left && dists[ids[j]] > tempDist) {\n ids[j + 1] = ids[j--];\n }\n\n ids[j + 1] = temp;\n }\n } else {\n var median = left + right >> 1;\n\n var _i10 = left + 1;\n\n var _j2 = right;\n swap(ids, median, _i10);\n if (dists[ids[left]] > dists[ids[right]]) swap(ids, left, right);\n if (dists[ids[_i10]] > dists[ids[right]]) swap(ids, _i10, right);\n if (dists[ids[left]] > dists[ids[_i10]]) swap(ids, left, _i10);\n var _temp = ids[_i10];\n var _tempDist = dists[_temp];\n\n while (true) {\n do {\n _i10++;\n } while (dists[ids[_i10]] < _tempDist);\n\n do {\n _j2--;\n } while (dists[ids[_j2]] > _tempDist);\n\n if (_j2 < _i10) break;\n swap(ids, _i10, _j2);\n }\n\n ids[left + 1] = ids[_j2];\n ids[_j2] = _temp;\n\n if (right - _i10 + 1 >= _j2 - left) {\n quicksort(ids, dists, _i10, right);\n quicksort(ids, dists, left, _j2 - 1);\n } else {\n quicksort(ids, dists, left, _j2 - 1);\n quicksort(ids, dists, _i10, right);\n }\n }\n}\n\nfunction swap(arr, i, j) {\n var tmp = arr[i];\n arr[i] = arr[j];\n arr[j] = tmp;\n}\n\nfunction defaultGetX(p) {\n return p[0];\n}\n\nfunction defaultGetY(p) {\n return p[1];\n}","import _classCallCheck from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/createClass.js\";\nvar epsilon = 1e-6;\n\nvar Path = /*#__PURE__*/function () {\n function Path() {\n _classCallCheck(this, Path);\n\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n\n this._ = \"\";\n }\n\n _createClass(Path, [{\n key: \"moveTo\",\n value: function moveTo(x, y) {\n this._ += \"M\".concat(this._x0 = this._x1 = +x, \",\").concat(this._y0 = this._y1 = +y);\n }\n }, {\n key: \"closePath\",\n value: function closePath() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n }\n }, {\n key: \"lineTo\",\n value: function lineTo(x, y) {\n this._ += \"L\".concat(this._x1 = +x, \",\").concat(this._y1 = +y);\n }\n }, {\n key: \"arc\",\n value: function arc(x, y, r) {\n x = +x, y = +y, r = +r;\n var x0 = x + r;\n var y0 = y;\n if (r < 0) throw new Error(\"negative radius\");\n if (this._x1 === null) this._ += \"M\".concat(x0, \",\").concat(y0);else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) this._ += \"L\" + x0 + \",\" + y0;\n if (!r) return;\n this._ += \"A\".concat(r, \",\").concat(r, \",0,1,1,\").concat(x - r, \",\").concat(y, \"A\").concat(r, \",\").concat(r, \",0,1,1,\").concat(this._x1 = x0, \",\").concat(this._y1 = y0);\n }\n }, {\n key: \"rect\",\n value: function rect(x, y, w, h) {\n this._ += \"M\".concat(this._x0 = this._x1 = +x, \",\").concat(this._y0 = this._y1 = +y, \"h\").concat(+w, \"v\").concat(+h, \"h\").concat(-w, \"Z\");\n }\n }, {\n key: \"value\",\n value: function value() {\n return this._ || null;\n }\n }]);\n\n return Path;\n}();\n\nexport { Path as default };","import _classCallCheck from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/createClass.js\";\n\nvar Polygon = /*#__PURE__*/function () {\n function Polygon() {\n _classCallCheck(this, Polygon);\n\n this._ = [];\n }\n\n _createClass(Polygon, [{\n key: \"moveTo\",\n value: function moveTo(x, y) {\n this._.push([x, y]);\n }\n }, {\n key: \"closePath\",\n value: function closePath() {\n this._.push(this._[0].slice());\n }\n }, {\n key: \"lineTo\",\n value: function lineTo(x, y) {\n this._.push([x, y]);\n }\n }, {\n key: \"value\",\n value: function value() {\n return this._.length ? this._ : null;\n }\n }]);\n\n return Polygon;\n}();\n\nexport { Polygon as default };","import _slicedToArray from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport _classCallCheck from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/createClass.js\";\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport _regeneratorRuntime from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/regenerator/index.js\";\nimport \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\n\nvar Voronoi = /*#__PURE__*/function () {\n function Voronoi(delaunay) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [0, 0, 960, 500],\n _ref2 = _slicedToArray(_ref, 4),\n xmin = _ref2[0],\n ymin = _ref2[1],\n xmax = _ref2[2],\n ymax = _ref2[3];\n\n _classCallCheck(this, Voronoi);\n\n if (!((xmax = +xmax) >= (xmin = +xmin)) || !((ymax = +ymax) >= (ymin = +ymin))) throw new Error(\"invalid bounds\");\n this.delaunay = delaunay;\n this._circumcenters = new Float64Array(delaunay.points.length * 2);\n this.vectors = new Float64Array(delaunay.points.length * 2);\n this.xmax = xmax, this.xmin = xmin;\n this.ymax = ymax, this.ymin = ymin;\n\n this._init();\n }\n\n _createClass(Voronoi, [{\n key: \"update\",\n value: function update() {\n this.delaunay.update();\n\n this._init();\n\n return this;\n }\n }, {\n key: \"_init\",\n value: function _init() {\n var _this$delaunay = this.delaunay,\n points = _this$delaunay.points,\n hull = _this$delaunay.hull,\n triangles = _this$delaunay.triangles,\n vectors = this.vectors; // Compute circumcenters.\n\n var circumcenters = this.circumcenters = this._circumcenters.subarray(0, triangles.length / 3 * 2);\n\n for (var i = 0, j = 0, n = triangles.length, x, y; i < n; i += 3, j += 2) {\n var t1 = triangles[i] * 2;\n var t2 = triangles[i + 1] * 2;\n var t3 = triangles[i + 2] * 2;\n var _x = points[t1];\n var _y = points[t1 + 1];\n var x2 = points[t2];\n var y2 = points[t2 + 1];\n var x3 = points[t3];\n var y3 = points[t3 + 1];\n var dx = x2 - _x;\n var dy = y2 - _y;\n var ex = x3 - _x;\n var ey = y3 - _y;\n var bl = dx * dx + dy * dy;\n var cl = ex * ex + ey * ey;\n var ab = (dx * ey - dy * ex) * 2;\n\n if (!ab) {\n // degenerate case (collinear diagram)\n x = (_x + x3) / 2 - 1e8 * ey;\n y = (_y + y3) / 2 + 1e8 * ex;\n } else if (Math.abs(ab) < 1e-8) {\n // almost equal points (degenerate triangle)\n x = (_x + x3) / 2;\n y = (_y + y3) / 2;\n } else {\n var d = 1 / ab;\n x = _x + (ey * bl - dy * cl) * d;\n y = _y + (dx * cl - ex * bl) * d;\n }\n\n circumcenters[j] = x;\n circumcenters[j + 1] = y;\n } // Compute exterior cell rays.\n\n\n var h = hull[hull.length - 1];\n var p0,\n p1 = h * 4;\n var x0,\n x1 = points[2 * h];\n var y0,\n y1 = points[2 * h + 1];\n vectors.fill(0);\n\n for (var _i = 0; _i < hull.length; ++_i) {\n h = hull[_i];\n p0 = p1, x0 = x1, y0 = y1;\n p1 = h * 4, x1 = points[2 * h], y1 = points[2 * h + 1];\n vectors[p0 + 2] = vectors[p1] = y0 - y1;\n vectors[p0 + 3] = vectors[p1 + 1] = x1 - x0;\n }\n }\n }, {\n key: \"render\",\n value: function render(context) {\n var buffer = context == null ? context = new Path() : undefined;\n var _this$delaunay2 = this.delaunay,\n halfedges = _this$delaunay2.halfedges,\n inedges = _this$delaunay2.inedges,\n hull = _this$delaunay2.hull,\n circumcenters = this.circumcenters,\n vectors = this.vectors;\n if (hull.length <= 1) return null;\n\n for (var i = 0, n = halfedges.length; i < n; ++i) {\n var j = halfedges[i];\n if (j < i) continue;\n var ti = Math.floor(i / 3) * 2;\n var tj = Math.floor(j / 3) * 2;\n var xi = circumcenters[ti];\n var yi = circumcenters[ti + 1];\n var xj = circumcenters[tj];\n var yj = circumcenters[tj + 1];\n\n this._renderSegment(xi, yi, xj, yj, context);\n }\n\n var h0,\n h1 = hull[hull.length - 1];\n\n for (var _i2 = 0; _i2 < hull.length; ++_i2) {\n h0 = h1, h1 = hull[_i2];\n var t = Math.floor(inedges[h1] / 3) * 2;\n var x = circumcenters[t];\n var y = circumcenters[t + 1];\n var v = h0 * 4;\n\n var p = this._project(x, y, vectors[v + 2], vectors[v + 3]);\n\n if (p) this._renderSegment(x, y, p[0], p[1], context);\n }\n\n return buffer && buffer.value();\n }\n }, {\n key: \"renderBounds\",\n value: function renderBounds(context) {\n var buffer = context == null ? context = new Path() : undefined;\n context.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin);\n return buffer && buffer.value();\n }\n }, {\n key: \"renderCell\",\n value: function renderCell(i, context) {\n var buffer = context == null ? context = new Path() : undefined;\n\n var points = this._clip(i);\n\n if (points === null || !points.length) return;\n context.moveTo(points[0], points[1]);\n var n = points.length;\n\n while (points[0] === points[n - 2] && points[1] === points[n - 1] && n > 1) {\n n -= 2;\n }\n\n for (var _i3 = 2; _i3 < n; _i3 += 2) {\n if (points[_i3] !== points[_i3 - 2] || points[_i3 + 1] !== points[_i3 - 1]) context.lineTo(points[_i3], points[_i3 + 1]);\n }\n\n context.closePath();\n return buffer && buffer.value();\n }\n }, {\n key: \"cellPolygons\",\n value: /*#__PURE__*/_regeneratorRuntime.mark(function cellPolygons() {\n var points, i, n, cell;\n return _regeneratorRuntime.wrap(function cellPolygons$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n points = this.delaunay.points;\n i = 0, n = points.length / 2;\n\n case 2:\n if (!(i < n)) {\n _context.next = 11;\n break;\n }\n\n cell = this.cellPolygon(i);\n\n if (!cell) {\n _context.next = 8;\n break;\n }\n\n cell.index = i;\n _context.next = 8;\n return cell;\n\n case 8:\n ++i;\n _context.next = 2;\n break;\n\n case 11:\n case \"end\":\n return _context.stop();\n }\n }\n }, cellPolygons, this);\n })\n }, {\n key: \"cellPolygon\",\n value: function cellPolygon(i) {\n var polygon = new Polygon();\n this.renderCell(i, polygon);\n return polygon.value();\n }\n }, {\n key: \"_renderSegment\",\n value: function _renderSegment(x0, y0, x1, y1, context) {\n var S;\n\n var c0 = this._regioncode(x0, y0);\n\n var c1 = this._regioncode(x1, y1);\n\n if (c0 === 0 && c1 === 0) {\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n } else if (S = this._clipSegment(x0, y0, x1, y1, c0, c1)) {\n context.moveTo(S[0], S[1]);\n context.lineTo(S[2], S[3]);\n }\n }\n }, {\n key: \"contains\",\n value: function contains(i, x, y) {\n if ((x = +x, x !== x) || (y = +y, y !== y)) return false;\n return this.delaunay._step(i, x, y) === i;\n }\n }, {\n key: \"neighbors\",\n value: /*#__PURE__*/_regeneratorRuntime.mark(function neighbors(i) {\n var ci, _iterator, _step, j, cj, ai, li, aj, lj;\n\n return _regeneratorRuntime.wrap(function neighbors$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n ci = this._clip(i);\n\n if (!ci) {\n _context2.next = 33;\n break;\n }\n\n _iterator = _createForOfIteratorHelper(this.delaunay.neighbors(i));\n _context2.prev = 3;\n\n _iterator.s();\n\n case 5:\n if ((_step = _iterator.n()).done) {\n _context2.next = 25;\n break;\n }\n\n j = _step.value;\n cj = this._clip(j); // find the common edge\n\n if (!cj) {\n _context2.next = 23;\n break;\n }\n\n ai = 0, li = ci.length;\n\n case 10:\n if (!(ai < li)) {\n _context2.next = 23;\n break;\n }\n\n aj = 0, lj = cj.length;\n\n case 12:\n if (!(aj < lj)) {\n _context2.next = 20;\n break;\n }\n\n if (!(ci[ai] == cj[aj] && ci[ai + 1] == cj[aj + 1] && ci[(ai + 2) % li] == cj[(aj + lj - 2) % lj] && ci[(ai + 3) % li] == cj[(aj + lj - 1) % lj])) {\n _context2.next = 17;\n break;\n }\n\n _context2.next = 16;\n return j;\n\n case 16:\n return _context2.abrupt(\"break\", 23);\n\n case 17:\n aj += 2;\n _context2.next = 12;\n break;\n\n case 20:\n ai += 2;\n _context2.next = 10;\n break;\n\n case 23:\n _context2.next = 5;\n break;\n\n case 25:\n _context2.next = 30;\n break;\n\n case 27:\n _context2.prev = 27;\n _context2.t0 = _context2[\"catch\"](3);\n\n _iterator.e(_context2.t0);\n\n case 30:\n _context2.prev = 30;\n\n _iterator.f();\n\n return _context2.finish(30);\n\n case 33:\n case \"end\":\n return _context2.stop();\n }\n }\n }, neighbors, this, [[3, 27, 30, 33]]);\n })\n }, {\n key: \"_cell\",\n value: function _cell(i) {\n var circumcenters = this.circumcenters,\n _this$delaunay3 = this.delaunay,\n inedges = _this$delaunay3.inedges,\n halfedges = _this$delaunay3.halfedges,\n triangles = _this$delaunay3.triangles;\n var e0 = inedges[i];\n if (e0 === -1) return null; // coincident point\n\n var points = [];\n var e = e0;\n\n do {\n var t = Math.floor(e / 3);\n points.push(circumcenters[t * 2], circumcenters[t * 2 + 1]);\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n\n e = halfedges[e];\n } while (e !== e0 && e !== -1);\n\n return points;\n }\n }, {\n key: \"_clip\",\n value: function _clip(i) {\n // degenerate case (1 valid point: return the box)\n if (i === 0 && this.delaunay.hull.length === 1) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n\n var points = this._cell(i);\n\n if (points === null) return null;\n var V = this.vectors;\n var v = i * 4;\n return V[v] || V[v + 1] ? this._clipInfinite(i, points, V[v], V[v + 1], V[v + 2], V[v + 3]) : this._clipFinite(i, points);\n }\n }, {\n key: \"_clipFinite\",\n value: function _clipFinite(i, points) {\n var n = points.length;\n var P = null;\n var x0,\n y0,\n x1 = points[n - 2],\n y1 = points[n - 1];\n\n var c0,\n c1 = this._regioncode(x1, y1);\n\n var e0, e1;\n\n for (var j = 0; j < n; j += 2) {\n x0 = x1, y0 = y1, x1 = points[j], y1 = points[j + 1];\n c0 = c1, c1 = this._regioncode(x1, y1);\n\n if (c0 === 0 && c1 === 0) {\n e0 = e1, e1 = 0;\n if (P) P.push(x1, y1);else P = [x1, y1];\n } else {\n var S = void 0,\n sx0 = void 0,\n sy0 = void 0,\n sx1 = void 0,\n sy1 = void 0;\n\n if (c0 === 0) {\n if ((S = this._clipSegment(x0, y0, x1, y1, c0, c1)) === null) continue;\n var _S = S;\n\n var _S2 = _slicedToArray(_S, 4);\n\n sx0 = _S2[0];\n sy0 = _S2[1];\n sx1 = _S2[2];\n sy1 = _S2[3];\n } else {\n if ((S = this._clipSegment(x1, y1, x0, y0, c1, c0)) === null) continue;\n var _S3 = S;\n\n var _S4 = _slicedToArray(_S3, 4);\n\n sx1 = _S4[0];\n sy1 = _S4[1];\n sx0 = _S4[2];\n sy0 = _S4[3];\n e0 = e1, e1 = this._edgecode(sx0, sy0);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx0, sy0);else P = [sx0, sy0];\n }\n\n e0 = e1, e1 = this._edgecode(sx1, sy1);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n if (P) P.push(sx1, sy1);else P = [sx1, sy1];\n }\n }\n\n if (P) {\n e0 = e1, e1 = this._edgecode(P[0], P[1]);\n if (e0 && e1) this._edge(i, e0, e1, P, P.length);\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];\n }\n\n return P;\n }\n }, {\n key: \"_clipSegment\",\n value: function _clipSegment(x0, y0, x1, y1, c0, c1) {\n while (true) {\n if (c0 === 0 && c1 === 0) return [x0, y0, x1, y1];\n if (c0 & c1) return null;\n var x = void 0,\n y = void 0,\n c = c0 || c1;\n if (c & 8) x = x0 + (x1 - x0) * (this.ymax - y0) / (y1 - y0), y = this.ymax;else if (c & 4) x = x0 + (x1 - x0) * (this.ymin - y0) / (y1 - y0), y = this.ymin;else if (c & 2) y = y0 + (y1 - y0) * (this.xmax - x0) / (x1 - x0), x = this.xmax;else y = y0 + (y1 - y0) * (this.xmin - x0) / (x1 - x0), x = this.xmin;\n if (c0) x0 = x, y0 = y, c0 = this._regioncode(x0, y0);else x1 = x, y1 = y, c1 = this._regioncode(x1, y1);\n }\n }\n }, {\n key: \"_clipInfinite\",\n value: function _clipInfinite(i, points, vx0, vy0, vxn, vyn) {\n var P = Array.from(points),\n p;\n if (p = this._project(P[0], P[1], vx0, vy0)) P.unshift(p[0], p[1]);\n if (p = this._project(P[P.length - 2], P[P.length - 1], vxn, vyn)) P.push(p[0], p[1]);\n\n if (P = this._clipFinite(i, P)) {\n for (var j = 0, n = P.length, c0, c1 = this._edgecode(P[n - 2], P[n - 1]); j < n; j += 2) {\n c0 = c1, c1 = this._edgecode(P[j], P[j + 1]);\n if (c0 && c1) j = this._edge(i, c0, c1, P, j), n = P.length;\n }\n } else if (this.contains(i, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2)) {\n P = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax];\n }\n\n return P;\n }\n }, {\n key: \"_edge\",\n value: function _edge(i, e0, e1, P, j) {\n while (e0 !== e1) {\n var x = void 0,\n y = void 0;\n\n switch (e0) {\n case 5:\n e0 = 4;\n continue;\n // top-left\n\n case 4:\n e0 = 6, x = this.xmax, y = this.ymin;\n break;\n // top\n\n case 6:\n e0 = 2;\n continue;\n // top-right\n\n case 2:\n e0 = 10, x = this.xmax, y = this.ymax;\n break;\n // right\n\n case 10:\n e0 = 8;\n continue;\n // bottom-right\n\n case 8:\n e0 = 9, x = this.xmin, y = this.ymax;\n break;\n // bottom\n\n case 9:\n e0 = 1;\n continue;\n // bottom-left\n\n case 1:\n e0 = 5, x = this.xmin, y = this.ymin;\n break;\n // left\n }\n\n if ((P[j] !== x || P[j + 1] !== y) && this.contains(i, x, y)) {\n P.splice(j, 0, x, y), j += 2;\n }\n }\n\n if (P.length > 4) {\n for (var _i4 = 0; _i4 < P.length; _i4 += 2) {\n var _j = (_i4 + 2) % P.length,\n k = (_i4 + 4) % P.length;\n\n if (P[_i4] === P[_j] && P[_j] === P[k] || P[_i4 + 1] === P[_j + 1] && P[_j + 1] === P[k + 1]) P.splice(_j, 2), _i4 -= 2;\n }\n }\n\n return j;\n }\n }, {\n key: \"_project\",\n value: function _project(x0, y0, vx, vy) {\n var t = Infinity,\n c,\n x,\n y;\n\n if (vy < 0) {\n // top\n if (y0 <= this.ymin) return null;\n if ((c = (this.ymin - y0) / vy) < t) y = this.ymin, x = x0 + (t = c) * vx;\n } else if (vy > 0) {\n // bottom\n if (y0 >= this.ymax) return null;\n if ((c = (this.ymax - y0) / vy) < t) y = this.ymax, x = x0 + (t = c) * vx;\n }\n\n if (vx > 0) {\n // right\n if (x0 >= this.xmax) return null;\n if ((c = (this.xmax - x0) / vx) < t) x = this.xmax, y = y0 + (t = c) * vy;\n } else if (vx < 0) {\n // left\n if (x0 <= this.xmin) return null;\n if ((c = (this.xmin - x0) / vx) < t) x = this.xmin, y = y0 + (t = c) * vy;\n }\n\n return [x, y];\n }\n }, {\n key: \"_edgecode\",\n value: function _edgecode(x, y) {\n return (x === this.xmin ? 1 : x === this.xmax ? 2 : 0) | (y === this.ymin ? 4 : y === this.ymax ? 8 : 0);\n }\n }, {\n key: \"_regioncode\",\n value: function _regioncode(x, y) {\n return (x < this.xmin ? 1 : x > this.xmax ? 2 : 0) | (y < this.ymin ? 4 : y > this.ymax ? 8 : 0);\n }\n }]);\n\n return Voronoi;\n}();\n\nexport { Voronoi as default };","import _classCallCheck from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/classCallCheck.js\";\nimport _createClass from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/createClass.js\";\n\nvar _marked = /*#__PURE__*/_regeneratorRuntime.mark(flatIterable);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nimport _regeneratorRuntime from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/regenerator/index.js\";\nimport \"core-js/modules/es.typed-array.set.js\";\nimport \"core-js/modules/es.typed-array.sort.js\";\nimport \"core-js/modules/es.array.sort.js\";\nimport \"core-js/modules/es.math.hypot.js\";\nimport Delaunator from \"delaunator\";\nimport Path from \"./path.js\";\nimport Polygon from \"./polygon.js\";\nimport Voronoi from \"./voronoi.js\";\nvar tau = 2 * Math.PI,\n pow = Math.pow;\n\nfunction pointX(p) {\n return p[0];\n}\n\nfunction pointY(p) {\n return p[1];\n} // A triangulation is collinear if all its triangles have a non-null area\n\n\nfunction collinear(d) {\n var triangles = d.triangles,\n coords = d.coords;\n\n for (var i = 0; i < triangles.length; i += 3) {\n var a = 2 * triangles[i],\n b = 2 * triangles[i + 1],\n c = 2 * triangles[i + 2],\n cross = (coords[c] - coords[a]) * (coords[b + 1] - coords[a + 1]) - (coords[b] - coords[a]) * (coords[c + 1] - coords[a + 1]);\n if (cross > 1e-10) return false;\n }\n\n return true;\n}\n\nfunction jitter(x, y, r) {\n return [x + Math.sin(x + y) * r, y + Math.cos(x - y) * r];\n}\n\nvar Delaunay = /*#__PURE__*/function () {\n function Delaunay(points) {\n _classCallCheck(this, Delaunay);\n\n this._delaunator = new Delaunator(points);\n this.inedges = new Int32Array(points.length / 2);\n this._hullIndex = new Int32Array(points.length / 2);\n this.points = this._delaunator.coords;\n\n this._init();\n }\n\n _createClass(Delaunay, [{\n key: \"update\",\n value: function update() {\n this._delaunator.update();\n\n this._init();\n\n return this;\n }\n }, {\n key: \"_init\",\n value: function _init() {\n var d = this._delaunator,\n points = this.points; // check for collinear\n\n if (d.hull && d.hull.length > 2 && collinear(d)) {\n this.collinear = Int32Array.from({\n length: points.length / 2\n }, function (_, i) {\n return i;\n }).sort(function (i, j) {\n return points[2 * i] - points[2 * j] || points[2 * i + 1] - points[2 * j + 1];\n }); // for exact neighbors\n\n var e = this.collinear[0],\n f = this.collinear[this.collinear.length - 1],\n bounds = [points[2 * e], points[2 * e + 1], points[2 * f], points[2 * f + 1]],\n r = 1e-8 * Math.hypot(bounds[3] - bounds[1], bounds[2] - bounds[0]);\n\n for (var i = 0, n = points.length / 2; i < n; ++i) {\n var p = jitter(points[2 * i], points[2 * i + 1], r);\n points[2 * i] = p[0];\n points[2 * i + 1] = p[1];\n }\n\n this._delaunator = new Delaunator(points);\n } else {\n delete this.collinear;\n }\n\n var halfedges = this.halfedges = this._delaunator.halfedges;\n var hull = this.hull = this._delaunator.hull;\n var triangles = this.triangles = this._delaunator.triangles;\n var inedges = this.inedges.fill(-1);\n\n var hullIndex = this._hullIndex.fill(-1); // Compute an index from each point to an (arbitrary) incoming halfedge\n // Used to give the first neighbor of each point; for this reason,\n // on the hull we give priority to exterior halfedges\n\n\n for (var _e = 0, _n = halfedges.length; _e < _n; ++_e) {\n var _p = triangles[_e % 3 === 2 ? _e - 2 : _e + 1];\n if (halfedges[_e] === -1 || inedges[_p] === -1) inedges[_p] = _e;\n }\n\n for (var _i = 0, _n2 = hull.length; _i < _n2; ++_i) {\n hullIndex[hull[_i]] = _i;\n } // degenerate case: 1 or 2 (distinct) points\n\n\n if (hull.length <= 2 && hull.length > 0) {\n this.triangles = new Int32Array(3).fill(-1);\n this.halfedges = new Int32Array(3).fill(-1);\n this.triangles[0] = hull[0];\n this.triangles[1] = hull[1];\n this.triangles[2] = hull[1];\n inedges[hull[0]] = 1;\n if (hull.length === 2) inedges[hull[1]] = 0;\n }\n }\n }, {\n key: \"voronoi\",\n value: function voronoi(bounds) {\n return new Voronoi(this, bounds);\n }\n }, {\n key: \"neighbors\",\n value: /*#__PURE__*/_regeneratorRuntime.mark(function neighbors(i) {\n var inedges, hull, _hullIndex, halfedges, triangles, collinear, l, e0, e, p0, p;\n\n return _regeneratorRuntime.wrap(function neighbors$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n inedges = this.inedges, hull = this.hull, _hullIndex = this._hullIndex, halfedges = this.halfedges, triangles = this.triangles, collinear = this.collinear; // degenerate case with several collinear points\n\n if (!collinear) {\n _context.next = 10;\n break;\n }\n\n l = collinear.indexOf(i);\n\n if (!(l > 0)) {\n _context.next = 6;\n break;\n }\n\n _context.next = 6;\n return collinear[l - 1];\n\n case 6:\n if (!(l < collinear.length - 1)) {\n _context.next = 9;\n break;\n }\n\n _context.next = 9;\n return collinear[l + 1];\n\n case 9:\n return _context.abrupt(\"return\");\n\n case 10:\n e0 = inedges[i];\n\n if (!(e0 === -1)) {\n _context.next = 13;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 13:\n // coincident point\n e = e0, p0 = -1;\n\n case 14:\n _context.next = 16;\n return p0 = triangles[e];\n\n case 16:\n e = e % 3 === 2 ? e - 2 : e + 1;\n\n if (!(triangles[e] !== i)) {\n _context.next = 19;\n break;\n }\n\n return _context.abrupt(\"return\");\n\n case 19:\n // bad triangulation\n e = halfedges[e];\n\n if (!(e === -1)) {\n _context.next = 26;\n break;\n }\n\n p = hull[(_hullIndex[i] + 1) % hull.length];\n\n if (!(p !== p0)) {\n _context.next = 25;\n break;\n }\n\n _context.next = 25;\n return p;\n\n case 25:\n return _context.abrupt(\"return\");\n\n case 26:\n if (e !== e0) {\n _context.next = 14;\n break;\n }\n\n case 27:\n case \"end\":\n return _context.stop();\n }\n }\n }, neighbors, this);\n })\n }, {\n key: \"find\",\n value: function find(x, y) {\n var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;\n if ((x = +x, x !== x) || (y = +y, y !== y)) return -1;\n var i0 = i;\n var c;\n\n while ((c = this._step(i, x, y)) >= 0 && c !== i && c !== i0) {\n i = c;\n }\n\n return c;\n }\n }, {\n key: \"_step\",\n value: function _step(i, x, y) {\n var inedges = this.inedges,\n hull = this.hull,\n _hullIndex = this._hullIndex,\n halfedges = this.halfedges,\n triangles = this.triangles,\n points = this.points;\n if (inedges[i] === -1 || !points.length) return (i + 1) % (points.length >> 1);\n var c = i;\n var dc = pow(x - points[i * 2], 2) + pow(y - points[i * 2 + 1], 2);\n var e0 = inedges[i];\n var e = e0;\n\n do {\n var t = triangles[e];\n var dt = pow(x - points[t * 2], 2) + pow(y - points[t * 2 + 1], 2);\n if (dt < dc) dc = dt, c = t;\n e = e % 3 === 2 ? e - 2 : e + 1;\n if (triangles[e] !== i) break; // bad triangulation\n\n e = halfedges[e];\n\n if (e === -1) {\n e = hull[(_hullIndex[i] + 1) % hull.length];\n\n if (e !== t) {\n if (pow(x - points[e * 2], 2) + pow(y - points[e * 2 + 1], 2) < dc) return e;\n }\n\n break;\n }\n } while (e !== e0);\n\n return c;\n }\n }, {\n key: \"render\",\n value: function render(context) {\n var buffer = context == null ? context = new Path() : undefined;\n var points = this.points,\n halfedges = this.halfedges,\n triangles = this.triangles;\n\n for (var i = 0, n = halfedges.length; i < n; ++i) {\n var j = halfedges[i];\n if (j < i) continue;\n var ti = triangles[i] * 2;\n var tj = triangles[j] * 2;\n context.moveTo(points[ti], points[ti + 1]);\n context.lineTo(points[tj], points[tj + 1]);\n }\n\n this.renderHull(context);\n return buffer && buffer.value();\n }\n }, {\n key: \"renderPoints\",\n value: function renderPoints(context) {\n var r = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2;\n var buffer = context == null ? context = new Path() : undefined;\n var points = this.points;\n\n for (var i = 0, n = points.length; i < n; i += 2) {\n var x = points[i],\n y = points[i + 1];\n context.moveTo(x + r, y);\n context.arc(x, y, r, 0, tau);\n }\n\n return buffer && buffer.value();\n }\n }, {\n key: \"renderHull\",\n value: function renderHull(context) {\n var buffer = context == null ? context = new Path() : undefined;\n var hull = this.hull,\n points = this.points;\n var h = hull[0] * 2,\n n = hull.length;\n context.moveTo(points[h], points[h + 1]);\n\n for (var i = 1; i < n; ++i) {\n var _h = 2 * hull[i];\n\n context.lineTo(points[_h], points[_h + 1]);\n }\n\n context.closePath();\n return buffer && buffer.value();\n }\n }, {\n key: \"hullPolygon\",\n value: function hullPolygon() {\n var polygon = new Polygon();\n this.renderHull(polygon);\n return polygon.value();\n }\n }, {\n key: \"renderTriangle\",\n value: function renderTriangle(i, context) {\n var buffer = context == null ? context = new Path() : undefined;\n var points = this.points,\n triangles = this.triangles;\n var t0 = triangles[i *= 3] * 2;\n var t1 = triangles[i + 1] * 2;\n var t2 = triangles[i + 2] * 2;\n context.moveTo(points[t0], points[t0 + 1]);\n context.lineTo(points[t1], points[t1 + 1]);\n context.lineTo(points[t2], points[t2 + 1]);\n context.closePath();\n return buffer && buffer.value();\n }\n }, {\n key: \"trianglePolygons\",\n value: /*#__PURE__*/_regeneratorRuntime.mark(function trianglePolygons() {\n var triangles, i, n;\n return _regeneratorRuntime.wrap(function trianglePolygons$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n triangles = this.triangles;\n i = 0, n = triangles.length / 3;\n\n case 2:\n if (!(i < n)) {\n _context2.next = 8;\n break;\n }\n\n _context2.next = 5;\n return this.trianglePolygon(i);\n\n case 5:\n ++i;\n _context2.next = 2;\n break;\n\n case 8:\n case \"end\":\n return _context2.stop();\n }\n }\n }, trianglePolygons, this);\n })\n }, {\n key: \"trianglePolygon\",\n value: function trianglePolygon(i) {\n var polygon = new Polygon();\n this.renderTriangle(i, polygon);\n return polygon.value();\n }\n }], [{\n key: \"from\",\n value: function from(points) {\n var fx = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : pointX;\n var fy = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : pointY;\n var that = arguments.length > 3 ? arguments[3] : undefined;\n return new Delaunay(\"length\" in points ? flatArray(points, fx, fy, that) : Float64Array.from(flatIterable(points, fx, fy, that)));\n }\n }]);\n\n return Delaunay;\n}();\n\nexport { Delaunay as default };\n\nfunction flatArray(points, fx, fy, that) {\n var n = points.length;\n var array = new Float64Array(n * 2);\n\n for (var i = 0; i < n; ++i) {\n var p = points[i];\n array[i * 2] = fx.call(that, p, i, points);\n array[i * 2 + 1] = fy.call(that, p, i, points);\n }\n\n return array;\n}\n\nfunction flatIterable(points, fx, fy, that) {\n var i, _iterator, _step2, p;\n\n return _regeneratorRuntime.wrap(function flatIterable$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n i = 0;\n _iterator = _createForOfIteratorHelper(points);\n _context3.prev = 2;\n\n _iterator.s();\n\n case 4:\n if ((_step2 = _iterator.n()).done) {\n _context3.next = 13;\n break;\n }\n\n p = _step2.value;\n _context3.next = 8;\n return fx.call(that, p, i, points);\n\n case 8:\n _context3.next = 10;\n return fy.call(that, p, i, points);\n\n case 10:\n ++i;\n\n case 11:\n _context3.next = 4;\n break;\n\n case 13:\n _context3.next = 18;\n break;\n\n case 15:\n _context3.prev = 15;\n _context3.t0 = _context3[\"catch\"](2);\n\n _iterator.e(_context3.t0);\n\n case 18:\n _context3.prev = 18;\n\n _iterator.f();\n\n return _context3.finish(18);\n\n case 21:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _marked, null, [[2, 15, 18, 21]]);\n}","import React, { Fragment, useMemo, useRef, useState, useCallback } from 'react';\nimport { withTheme, withDimensions, Container, SvgWrapper, ResponsiveWrapper, getRelativeCursor } from '@nivo/core';\nimport { scaleLinear } from 'd3-scale';\nimport { Delaunay } from 'd3-delaunay';\nimport compose from 'recompose/compose';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport pure from 'recompose/pure';\nimport PropTypes from 'prop-types';\nvar VoronoiPropTypes = {\n data: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]).isRequired,\n x: PropTypes.number.isRequired,\n y: PropTypes.number.isRequired\n })).isRequired,\n xDomain: PropTypes.arrayOf(PropTypes.number).isRequired,\n yDomain: PropTypes.arrayOf(PropTypes.number).isRequired,\n layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['links', 'cells', 'points', 'bounds']), PropTypes.func])).isRequired,\n enableLinks: PropTypes.bool.isRequired,\n linkLineWidth: PropTypes.number.isRequired,\n linkLineColor: PropTypes.string.isRequired,\n enableCells: PropTypes.bool.isRequired,\n cellLineWidth: PropTypes.number.isRequired,\n cellLineColor: PropTypes.string.isRequired,\n enablePoints: PropTypes.bool.isRequired,\n pointSize: PropTypes.number.isRequired,\n pointColor: PropTypes.string.isRequired,\n delaunay: PropTypes.object.isRequired,\n voronoi: PropTypes.object.isRequired\n};\nvar VoronoiDefaultProps = {\n xDomain: [0, 1],\n yDomain: [0, 1],\n layers: ['links', 'cells', 'points', 'bounds'],\n enableLinks: false,\n linkLineWidth: 1,\n linkLineColor: '#bbb',\n enableCells: true,\n cellLineWidth: 2,\n cellLineColor: '#000',\n enablePoints: true,\n pointSize: 4,\n pointColor: '#666'\n};\n\nvar enhance = function enhance(Component) {\n return compose(defaultProps(VoronoiDefaultProps), withTheme(), withDimensions(), withPropsOnChange(['xDomain', 'yDomain', 'width', 'height'], function (_ref) {\n var xDomain = _ref.xDomain,\n yDomain = _ref.yDomain,\n width = _ref.width,\n height = _ref.height;\n return {\n xScale: scaleLinear().domain(xDomain).range([0, width]),\n yScale: scaleLinear().domain(yDomain).range([0, height])\n };\n }), withPropsOnChange(['data', 'xScale', 'yScale'], function (_ref2) {\n var data = _ref2.data,\n xScale = _ref2.xScale,\n yScale = _ref2.yScale;\n return {\n scaledPoints: data.map(function (d) {\n return {\n data: d,\n x: xScale(d.x),\n y: yScale(d.y)\n };\n })\n };\n }), withPropsOnChange(['scaledPoints', 'width', 'height'], function (_ref3) {\n var scaledPoints = _ref3.scaledPoints,\n width = _ref3.width,\n height = _ref3.height;\n var delaunay = Delaunay.from(scaledPoints.map(function (p) {\n return [p.x, p.y];\n }));\n var voronoi = delaunay.voronoi([0, 0, width, height]);\n return {\n delaunay: delaunay,\n voronoi: voronoi\n };\n }), pure)(Component);\n};\n\nvar Voronoi = function Voronoi(_ref) {\n var delaunay = _ref.delaunay,\n voronoi = _ref.voronoi,\n data = _ref.data,\n layers = _ref.layers,\n margin = _ref.margin,\n width = _ref.width,\n height = _ref.height,\n outerWidth = _ref.outerWidth,\n outerHeight = _ref.outerHeight,\n enableLinks = _ref.enableLinks,\n linkLineWidth = _ref.linkLineWidth,\n linkLineColor = _ref.linkLineColor,\n enableCells = _ref.enableCells,\n cellLineWidth = _ref.cellLineWidth,\n cellLineColor = _ref.cellLineColor,\n enablePoints = _ref.enablePoints,\n pointSize = _ref.pointSize,\n pointColor = _ref.pointColor,\n theme = _ref.theme;\n var context = {\n width: width,\n height: height,\n data: data,\n delaunay: delaunay,\n voronoi: voronoi\n };\n var layerById = {\n bounds: React.createElement(\"path\", {\n key: \"bounds\",\n fill: \"none\",\n stroke: cellLineColor,\n strokeWidth: cellLineWidth,\n d: voronoi.renderBounds()\n })\n };\n\n if (enableLinks === true) {\n layerById.links = React.createElement(\"path\", {\n key: \"links\",\n stroke: linkLineColor,\n strokeWidth: linkLineWidth,\n fill: \"none\",\n d: delaunay.render()\n });\n }\n\n if (enableCells === true) {\n layerById.cells = React.createElement(\"path\", {\n key: \"cells\",\n d: voronoi.render(),\n fill: \"none\",\n stroke: cellLineColor,\n strokeWidth: cellLineWidth\n });\n }\n\n if (enablePoints === true) {\n layerById.points = React.createElement(\"path\", {\n key: \"points\",\n stroke: \"none\",\n fill: pointColor,\n d: delaunay.renderPoints(undefined, pointSize / 2)\n });\n }\n\n return React.createElement(Container, {\n isInteractive: false,\n theme: theme,\n animate: false\n }, function () {\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n theme: theme\n }, layers.map(function (layer, i) {\n if (typeof layer === 'function') {\n return React.createElement(Fragment, {\n key: i\n }, layer(context));\n }\n\n return layerById[layer];\n }));\n });\n};\n\nvar Voronoi$1 = enhance(Voronoi);\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar ResponsiveVoronoi = function ResponsiveVoronoi(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Voronoi$1, _extends({\n width: width,\n height: height\n }, props));\n });\n};\n\nvar getAccessor = function getAccessor(directive) {\n return typeof directive === 'function' ? directive : function (d) {\n return d[directive];\n };\n};\n\nvar computeMeshPoints = function computeMeshPoints(_ref) {\n var points = _ref.points,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? 'x' : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 'y' : _ref$y;\n var getX = getAccessor(x);\n var getY = getAccessor(y);\n return points.map(function (p) {\n return [getX(p), getY(p)];\n });\n};\n\nvar computeMesh = function computeMesh(_ref2) {\n var points = _ref2.points,\n width = _ref2.width,\n height = _ref2.height,\n debug = _ref2.debug;\n var delaunay = Delaunay.from(points);\n var voronoi = debug === true ? delaunay.voronoi([0, 0, width, height]) : undefined;\n return {\n delaunay: delaunay,\n voronoi: voronoi\n };\n};\n\nvar useVoronoiMesh = function useVoronoiMesh(_ref) {\n var points = _ref.points,\n x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n debug = _ref.debug;\n var points2d = useMemo(function () {\n return computeMeshPoints({\n points: points,\n x: x,\n y: y\n });\n }, [points, x, y]);\n return useMemo(function () {\n return computeMesh({\n points: points2d,\n width: width,\n height: height,\n debug: debug\n });\n }, [points2d, width, height, debug]);\n};\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\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 _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nvar Mesh = function Mesh(_ref) {\n var nodes = _ref.nodes,\n width = _ref.width,\n height = _ref.height,\n x = _ref.x,\n y = _ref.y,\n debug = _ref.debug,\n onMouseEnter = _ref.onMouseEnter,\n onMouseMove = _ref.onMouseMove,\n onMouseLeave = _ref.onMouseLeave,\n onClick = _ref.onClick;\n var elementRef = useRef(null);\n\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n currentIndex = _useState2[0],\n setCurrentIndex = _useState2[1];\n\n var _useVoronoiMesh = useVoronoiMesh({\n points: nodes,\n x: x,\n y: y,\n width: width,\n height: height,\n debug: debug\n }),\n delaunay = _useVoronoiMesh.delaunay,\n voronoi = _useVoronoiMesh.voronoi;\n\n var voronoiPath = useMemo(function () {\n return debug ? voronoi.render() : undefined;\n });\n var getIndexAndNodeFromEvent = useCallback(function (event) {\n var _getRelativeCursor = getRelativeCursor(elementRef.current, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n\n var index = delaunay.find(x, y);\n return [index, index !== undefined ? nodes[index] : null];\n }, [delaunay]);\n var handleMouseEnter = useCallback(function (event) {\n var _getIndexAndNodeFromE = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE2 = _slicedToArray(_getIndexAndNodeFromE, 2),\n index = _getIndexAndNodeFromE2[0],\n node = _getIndexAndNodeFromE2[1];\n\n if (currentIndex !== index) setCurrentIndex(index);\n node && onMouseEnter && onMouseEnter(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n var handleMouseMove = useCallback(function (event) {\n var _getIndexAndNodeFromE3 = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE4 = _slicedToArray(_getIndexAndNodeFromE3, 2),\n index = _getIndexAndNodeFromE4[0],\n node = _getIndexAndNodeFromE4[1];\n\n if (currentIndex !== index) setCurrentIndex(index);\n node && onMouseMove && onMouseMove(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n var handleMouseLeave = useCallback(function (event) {\n setCurrentIndex(null);\n\n if (onMouseLeave) {\n var previousNode;\n\n if (currentIndex !== undefined && currentIndex !== null) {\n previousNode = nodes[currentIndex];\n }\n\n previousNode && onMouseLeave(previousNode, event);\n }\n }, [setCurrentIndex, currentIndex, nodes]);\n var handleClick = useCallback(function (event) {\n var _getIndexAndNodeFromE5 = getIndexAndNodeFromEvent(event),\n _getIndexAndNodeFromE6 = _slicedToArray(_getIndexAndNodeFromE5, 2),\n index = _getIndexAndNodeFromE6[0],\n node = _getIndexAndNodeFromE6[1];\n\n if (currentIndex !== index) setCurrentIndex(index);\n onClick && onClick(node, event);\n }, [getIndexAndNodeFromEvent, setCurrentIndex]);\n return React.createElement(\"g\", {\n ref: elementRef\n }, debug && React.createElement(\"path\", {\n d: voronoiPath,\n stroke: \"red\",\n strokeWidth: 1,\n opacity: 0.75\n }), currentIndex !== null && debug && React.createElement(\"path\", {\n fill: \"red\",\n opacity: 0.35,\n d: voronoi.renderCell(currentIndex)\n }), React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: \"red\",\n opacity: 0,\n style: {\n cursor: 'auto'\n },\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleMouseMove,\n onMouseLeave: handleMouseLeave,\n onClick: handleClick\n }));\n};\n\nMesh.defaultProps = {\n x: 'x',\n y: 'y',\n debug: false\n};\n\nvar renderVoronoiToCanvas = function renderVoronoiToCanvas(ctx, voronoi) {\n ctx.save();\n ctx.globalAlpha = 0.75;\n ctx.beginPath();\n voronoi.render(ctx);\n ctx.strokeStyle = 'red';\n ctx.lineWidth = 1;\n ctx.stroke();\n ctx.restore();\n};\n\nvar renderVoronoiCellToCanvas = function renderVoronoiCellToCanvas(ctx, voronoi, index) {\n ctx.save();\n ctx.globalAlpha = 0.35;\n ctx.beginPath();\n voronoi.renderCell(index, ctx);\n ctx.fillStyle = 'red';\n ctx.fill();\n ctx.restore();\n};\n\nexport { Mesh, ResponsiveVoronoi, Voronoi$1 as Voronoi, VoronoiDefaultProps, VoronoiPropTypes, computeMesh, computeMeshPoints, renderVoronoiCellToCanvas, renderVoronoiToCanvas, useVoronoiMesh };","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return Math.round(a * (1 - t) + b * t);\n };\n}","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var createRange = require('./_createRange');\n\n/**\n * Creates an array of numbers (positive and/or negative) progressing from\n * `start` up to, but not including, `end`. A step of `-1` is used if a negative\n * `start` is specified without an `end` or `step`. If `end` is not specified,\n * it's set to `start` with `start` then set to `0`.\n *\n * **Note:** JavaScript follows the IEEE-754 standard for resolving\n * floating-point values which can produce unexpected results.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {number} [start=0] The start of the range.\n * @param {number} end The end of the range.\n * @param {number} [step=1] The value to increment or decrement by.\n * @returns {Array} Returns the range of numbers.\n * @see _.inRange, _.rangeRight\n * @example\n *\n * _.range(4);\n * // => [0, 1, 2, 3]\n *\n * _.range(-4);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 5);\n * // => [1, 2, 3, 4]\n *\n * _.range(0, 20, 5);\n * // => [0, 5, 10, 15]\n *\n * _.range(0, -4, -1);\n * // => [0, -1, -2, -3]\n *\n * _.range(1, 4, 0);\n * // => [1, 1, 1]\n *\n * _.range(0);\n * // => []\n */\nvar range = createRange();\n\nmodule.exports = range;\n","var baseDifference = require('./_baseDifference'),\n baseRest = require('./_baseRest'),\n isArrayLikeObject = require('./isArrayLikeObject');\n\n/**\n * Creates an array excluding all given values using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.pull`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {...*} [values] The values to exclude.\n * @returns {Array} Returns the new array of filtered values.\n * @see _.difference, _.xor\n * @example\n *\n * _.without([2, 1, 2, 3], 1, 2);\n * // => [3]\n */\nvar without = baseRest(function(array, values) {\n return isArrayLikeObject(array)\n ? baseDifference(array, values)\n : [];\n});\n\nmodule.exports = without;\n","var copyObject = require('./_copyObject'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.assign` without support for multiple sources\n * or `customizer` functions.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @returns {Object} Returns `object`.\n */\nfunction baseAssign(object, source) {\n return object && copyObject(source, keys(source), object);\n}\n\nmodule.exports = baseAssign;\n","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport var warm = interpolateCubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nexport var cool = interpolateCubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));\nvar c = cubehelix();\nexport default function (t) {\n if (t < 0 || t > 1) t -= Math.floor(t);\n var ts = Math.abs(t - 0.5);\n c.h = 360 * t - 100;\n c.s = 1.5 - 1.5 * ts;\n c.l = 0.8 - 0.9 * ts;\n return c + \"\";\n}","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `dataView`.\n *\n * @private\n * @param {Object} dataView The data view to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned data view.\n */\nfunction cloneDataView(dataView, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;\n return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);\n}\n\nmodule.exports = cloneDataView;\n","import { cubehelix } from \"d3-color\";\nimport { interpolateCubehelixLong } from \"d3-interpolate\";\nexport default interpolateCubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));","\"use strict\";\n\nrequire(\"core-js/modules/es.array.reduce.js\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar compose = function compose() {\n for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {\n funcs[_key] = arguments[_key];\n }\n\n return funcs.reduce(function (a, b) {\n return function () {\n return a(b.apply(void 0, arguments));\n };\n }, function (arg) {\n return arg;\n });\n};\n\nvar _default = compose;\nexports.default = _default;","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","/**\n * This function is like `arrayIncludes` except that it accepts a comparator.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludesWith(array, value, comparator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (comparator(value, array[index])) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arrayIncludesWith;\n","var baseIsEqual = require('./_baseIsEqual');\n\n/**\n * Performs a deep comparison between two values to determine if they are\n * equivalent.\n *\n * **Note:** This method supports comparing arrays, array buffers, booleans,\n * date objects, error objects, maps, numbers, `Object` objects, regexes,\n * sets, strings, symbols, and typed arrays. `Object` objects are compared\n * by their own, not inherited, enumerable properties. Functions and DOM\n * nodes are compared by strict equality, i.e. `===`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.isEqual(object, other);\n * // => true\n *\n * object === other;\n * // => false\n */\nfunction isEqual(value, other) {\n return baseIsEqual(value, other);\n}\n\nmodule.exports = isEqual;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e0ecf49ebcda8856a7\", \"edf8fbb3cde38c96c688419d\", \"edf8fbb3cde38c96c68856a7810f7c\", \"edf8fbbfd3e69ebcda8c96c68856a7810f7c\", \"edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b\", \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b\", \"f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b\").map(colors);\nexport default ramp(scheme);","export default function (constructor, factory, prototype) {\n constructor.prototype = factory.prototype = prototype;\n prototype.constructor = constructor;\n}\nexport function extend(parent, definition) {\n var prototype = Object.create(parent.prototype);\n\n for (var key in definition) {\n prototype[key] = definition[key];\n }\n\n return prototype;\n}","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var baseGetTag = require('./_baseGetTag'),\n getPrototype = require('./_getPrototype'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;\n","var baseIsDate = require('./_baseIsDate'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsDate = nodeUtil && nodeUtil.isDate;\n\n/**\n * Checks if `value` is classified as a `Date` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n * @example\n *\n * _.isDate(new Date);\n * // => true\n *\n * _.isDate('Mon April 23 2012');\n * // => false\n */\nvar isDate = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;\n\nmodule.exports = isDate;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fde0ddfa9fb5c51b8a\", \"feebe2fbb4b9f768a1ae017e\", \"feebe2fbb4b9f768a1c51b8a7a0177\", \"feebe2fcc5c0fa9fb5f768a1c51b8a7a0177\", \"feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177\", \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177\", \"fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ef8a62f7f7f767a9cf\", \"ca0020f4a58292c5de0571b0\", \"ca0020f4a582f7f7f792c5de0571b0\", \"b2182bef8a62fddbc7d1e5f067a9cf2166ac\", \"b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac\", \"b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac\", \"b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac\", \"67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061\", \"67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061\").map(colors);\nexport default ramp(scheme);","var baseCreate = require('./_baseCreate'),\n baseLodash = require('./_baseLodash');\n\n/** Used as references for the maximum length and index of an array. */\nvar MAX_ARRAY_LENGTH = 4294967295;\n\n/**\n * Creates a lazy wrapper object which wraps `value` to enable lazy evaluation.\n *\n * @private\n * @constructor\n * @param {*} value The value to wrap.\n */\nfunction LazyWrapper(value) {\n this.__wrapped__ = value;\n this.__actions__ = [];\n this.__dir__ = 1;\n this.__filtered__ = false;\n this.__iteratees__ = [];\n this.__takeCount__ = MAX_ARRAY_LENGTH;\n this.__views__ = [];\n}\n\n// Ensure `LazyWrapper` is an instance of `baseLodash`.\nLazyWrapper.prototype = baseCreate(baseLodash.prototype);\nLazyWrapper.prototype.constructor = LazyWrapper;\n\nmodule.exports = LazyWrapper;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * @typechecks\n * \n */\n\n/*eslint-disable no-self-compare */\n'use strict';\n\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n\nfunction is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n // Added the nonzero y check to make Flow happy, but it is redundant\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n}\n/**\n * Performs equality by iterating through keys on an object and returning false\n * when any key has values which are not strictly equal between the arguments.\n * Returns true when the values of all keys are strictly equal.\n */\n\n\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) {\n return true;\n }\n\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n\n var keysA = Object.keys(objA);\n var keysB = Object.keys(objB);\n\n if (keysA.length !== keysB.length) {\n return false;\n } // Test for A's keys different from B.\n\n\n for (var i = 0; i < keysA.length; i++) {\n if (!hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = shallowEqual;","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","// currently used to initiate the velocity style object to 0\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = mapToZero;\n\nfunction mapToZero(obj) {\n var ret = {};\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n ret[key] = 0;\n }\n }\n\n return ret;\n}\n\nmodule.exports = exports['default'];","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var baseIsMatch = require('./_baseIsMatch'),\n getMatchData = require('./_getMatchData'),\n matchesStrictComparable = require('./_matchesStrictComparable');\n\n/**\n * The base implementation of `_.matches` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property values to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatches(source) {\n var matchData = getMatchData(source);\n if (matchData.length == 1 && matchData[0][2]) {\n return matchesStrictComparable(matchData[0][0], matchData[0][1]);\n }\n return function(object) {\n return object === source || baseIsMatch(object, source, matchData);\n };\n}\n\nmodule.exports = baseMatches;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","export default function (specifier) {\n var n = specifier.length / 6 | 0,\n colors = new Array(n),\n i = 0;\n\n while (i < n) {\n colors[i] = \"#\" + specifier.slice(i * 6, ++i * 6);\n }\n\n return colors;\n}","var t0 = new Date(),\n t1 = new Date();\nexport default function newInterval(floori, offseti, count, field) {\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n }\n\n interval.floor = function (date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function (date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function (date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function (date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function (start, stop, step) {\n var range = [],\n previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n\n do {\n range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n } while (previous < start && start < stop);\n\n return range;\n };\n\n interval.filter = function (test) {\n return newInterval(function (date) {\n if (date >= date) while (floori(date), !test(date)) {\n date.setTime(date - 1);\n }\n }, function (date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n\n }\n }\n });\n };\n\n if (count) {\n interval.count = function (start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function (step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {\n return field(d) % step === 0;\n } : function (d) {\n return interval.count(0, d) % step === 0;\n });\n };\n }\n\n return interval;\n}","import interval from \"./interval.js\";\nvar millisecond = interval(function () {// noop\n}, function (date, step) {\n date.setTime(+date + step);\n}, function (start, end) {\n return end - start;\n}); // An optimized implementation for this simple case.\n\nmillisecond.every = function (k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function (date) {\n date.setTime(Math.floor(date / k) * k);\n }, function (date, step) {\n date.setTime(+date + step * k);\n }, function (start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;","import interval from \"./interval.js\";\nimport { durationSecond } from \"./duration.js\";\nvar second = interval(function (date) {\n date.setTime(date - date.getMilliseconds());\n}, function (date, step) {\n date.setTime(+date + step * durationSecond);\n}, function (start, end) {\n return (end - start) / durationSecond;\n}, function (date) {\n return date.getUTCSeconds();\n});\nexport default second;\nexport var seconds = second.range;","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;","import interval from \"./interval.js\";\nimport { durationMinute, durationSecond } from \"./duration.js\";\nvar minute = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getMinutes();\n});\nexport default minute;\nexport var minutes = minute.range;","import interval from \"./interval.js\";\nimport { durationMinute } from \"./duration.js\";\nvar utcMinute = interval(function (date) {\n date.setUTCSeconds(0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getUTCMinutes();\n});\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;","import interval from \"./interval.js\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration.js\";\nvar hour = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getHours();\n});\nexport default hour;\nexport var hours = hour.range;","import interval from \"./interval.js\";\nimport { durationHour } from \"./duration.js\";\nvar utcHour = interval(function (date) {\n date.setUTCMinutes(0, 0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getUTCHours();\n});\nexport default utcHour;\nexport var utcHours = utcHour.range;","import interval from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nvar day = interval(function (date) {\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setDate(date.getDate() + step);\n}, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function (date) {\n return date.getDate() - 1;\n});\nexport default day;\nexport var days = day.range;","import interval from \"./interval.js\";\nimport { durationDay } from \"./duration.js\";\nvar utcDay = interval(function (date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function (start, end) {\n return (end - start) / durationDay;\n}, function (date) {\n return date.getUTCDate() - 1;\n});\nexport default utcDay;\nexport var utcDays = utcDay.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function (date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;","import interval from \"./interval.js\";\nimport { durationWeek } from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function (date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function (start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;","import interval from \"./interval.js\";\nvar month = interval(function (date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setMonth(date.getMonth() + step);\n}, function (start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function (date) {\n return date.getMonth();\n});\nexport default month;\nexport var months = month.range;","import interval from \"./interval.js\";\nvar utcMonth = interval(function (date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function (start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function (date) {\n return date.getUTCMonth();\n});\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;","import interval from \"./interval.js\";\nvar year = interval(function (date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function (start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function (date) {\n return date.getFullYear();\n}); // An optimized implementation for this simple case.\n\nyear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;","import interval from \"./interval.js\";\nvar utcYear = interval(function (date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function (start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function (date) {\n return date.getUTCFullYear();\n}); // An optimized implementation for this simple case.\n\nutcYear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {\n y: y,\n m: m,\n d: d,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n }; // These recursive directive definitions must be deferred.\n\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function (string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week,\n day;\n if (i != string.length) return null; // If a UNIX timestamp is specified, return it.\n\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0)); // If this is utcParse, never use the local timezone.\n\n if (Z && !(\"Z\" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM.\n\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter.\n\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year.\n\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n } // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n\n\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n } // Otherwise, all fields are in local time.\n\n\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || (j = parse(d, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function format(specifier) {\n var f = newFormat(specifier += \"\", formats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n parse: function parse(specifier) {\n var p = newParse(specifier += \"\", false);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n },\n utcFormat: function utcFormat(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n utcParse: function utcParse(specifier) {\n var p = newParse(specifier += \"\", true);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n }\n };\n}\nvar pads = {\n \"-\": \"\",\n \"_\": \" \",\n \"0\": \"0\"\n},\n numberRe = /^\\s*\\d+/,\n // note: ignores next directive\npercentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {},\n i = -1,\n n = names.length;\n\n while (++i < n) {\n map[names[i].toLowerCase()] = i;\n }\n\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n} // Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\n\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function () {\n return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n \"%\": function _(x, p) {\n return (x * 100).toFixed(p);\n },\n \"b\": function b(x) {\n return Math.round(x).toString(2);\n },\n \"c\": function c(x) {\n return x + \"\";\n },\n \"d\": formatDecimal,\n \"e\": function e(x, p) {\n return x.toExponential(p);\n },\n \"f\": function f(x, p) {\n return x.toFixed(p);\n },\n \"g\": function g(x, p) {\n return x.toPrecision(p);\n },\n \"o\": function o(x) {\n return Math.round(x).toString(8);\n },\n \"p\": function p(x, _p) {\n return formatRounded(x * 100, _p);\n },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function X(x) {\n return Math.round(x).toString(16).toUpperCase();\n },\n \"x\": function x(_x) {\n return Math.round(_x).toString(16);\n }\n};","export default function (x) {\n return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type; // The \"n\" type is an alias for \",g\".\n\n if (type === \"n\") comma = true, type = \"g\"; // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\"; // If zero fill is specified, padding goes after sign and before digits.\n\n if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\"; // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\"; // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n\n precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i,\n n,\n c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n\n var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting.\n\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros.\n\n if (trim) value = formatTrim(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false; // Compute the prefix and suffix.\n\n valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\"); // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n\n if (maybeSuffix) {\n i = -1, n = value.length;\n\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n } // If the fill character is not \"0\", grouping is applied before padding.\n\n\n if (comma && !zero) value = group(value, Infinity); // Compute the padding.\n\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\"; // If the fill character is \"0\", grouping is applied after padding.\n\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\"; // Reconstruct the final output based on the desired alignment.\n\n switch (align) {\n case \"<\":\n value = valuePrefix + value + valueSuffix + padding;\n break;\n\n case \"=\":\n value = valuePrefix + padding + value + valueSuffix;\n break;\n\n case \"^\":\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n\n return numerals(value);\n }\n\n format.toString = function () {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}","export default function (grouping, thousands) {\n return function (value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}","export default function (numerals) {\n return function (value) {\n return value.replace(/[0-9]/g, function (i) {\n return numerals[+i];\n });\n };\n}","import React, { memo, useMemo, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Motion, spring, TransitionMotion } from 'react-motion';\nimport { textPropsByEngine, useTheme, useMotionConfig } from '@nivo/core';\nimport isNumber from 'lodash/isNumber';\nimport { timeMillisecond, utcMillisecond, timeSecond, utcSecond, timeMinute, utcMinute, timeHour, utcHour, timeDay, utcDay, timeWeek, utcWeek, timeSunday, utcSunday, timeMonday, utcMonday, timeTuesday, utcTuesday, timeWednesday, utcWednesday, timeThursday, utcThursday, timeFriday, utcFriday, timeSaturday, utcSaturday, timeMonth, utcMonth, timeYear, utcYear } from 'd3-time';\nimport { timeFormat } from 'd3-time-format';\nimport { format } from 'd3-format';\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\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\nvar centerScale = function centerScale(scale) {\n var bandwidth = scale.bandwidth();\n if (bandwidth === 0) return scale;\n var offset = bandwidth / 2;\n\n if (scale.round()) {\n offset = Math.round(offset);\n }\n\n return function (d) {\n return scale(d) + offset;\n };\n};\n\nvar timeByType = {\n millisecond: [timeMillisecond, utcMillisecond],\n second: [timeSecond, utcSecond],\n minute: [timeMinute, utcMinute],\n hour: [timeHour, utcHour],\n day: [timeDay, utcDay],\n week: [timeWeek, utcWeek],\n sunday: [timeSunday, utcSunday],\n monday: [timeMonday, utcMonday],\n tuesday: [timeTuesday, utcTuesday],\n wednesday: [timeWednesday, utcWednesday],\n thursday: [timeThursday, utcThursday],\n friday: [timeFriday, utcFriday],\n saturday: [timeSaturday, utcSaturday],\n month: [timeMonth, utcMonth],\n year: [timeYear, utcYear]\n};\nvar timeTypes = Object.keys(timeByType);\nvar timeIntervalRegexp = new RegExp(\"^every\\\\s*(\\\\d+)?\\\\s*(\".concat(timeTypes.join('|'), \")s?$\"), 'i');\n\nvar getScaleTicks = function getScaleTicks(scale, spec) {\n if (Array.isArray(spec)) {\n return spec;\n }\n\n if (scale.ticks) {\n if (spec === undefined) {\n return scale.ticks();\n }\n\n if (isNumber(spec)) {\n return scale.ticks(spec);\n }\n\n if (typeof spec === 'string') {\n var matches = spec.match(timeIntervalRegexp);\n\n if (matches) {\n var timeType = timeByType[matches[2]][scale.useUTC ? 1 : 0];\n\n if (matches[1] === undefined) {\n return scale.ticks(timeType);\n }\n\n return scale.ticks(timeType.every(Number(matches[1])));\n }\n\n throw new Error(\"Invalid tickValues: \".concat(spec));\n }\n }\n\n return scale.domain();\n};\n\nvar computeCartesianTicks = function computeCartesianTicks(_ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n tickSize = _ref.tickSize,\n tickPadding = _ref.tickPadding,\n tickRotation = _ref.tickRotation,\n _ref$engine = _ref.engine,\n engine = _ref$engine === void 0 ? 'svg' : _ref$engine;\n var values = getScaleTicks(scale, tickValues);\n var textProps = textPropsByEngine[engine];\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var line = {\n lineX: 0,\n lineY: 0\n };\n var text = {\n textX: 0,\n textY: 0\n };\n var translate;\n var textAlign = textProps.align.center;\n var textBaseline = textProps.baseline.center;\n\n if (axis === 'x') {\n translate = function translate(d) {\n return {\n x: position(d),\n y: 0\n };\n };\n\n line.lineY = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textY = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n\n if (ticksPosition === 'after') {\n textBaseline = textProps.baseline.top;\n } else {\n textBaseline = textProps.baseline.bottom;\n }\n\n if (tickRotation === 0) {\n textAlign = textProps.align.center;\n } else if (ticksPosition === 'after' && tickRotation < 0 || ticksPosition === 'before' && tickRotation > 0) {\n textAlign = textProps.align.right;\n textBaseline = textProps.baseline.center;\n } else if (ticksPosition === 'after' && tickRotation > 0 || ticksPosition === 'before' && tickRotation < 0) {\n textAlign = textProps.align.left;\n textBaseline = textProps.baseline.center;\n }\n } else {\n translate = function translate(d) {\n return {\n x: 0,\n y: position(d)\n };\n };\n\n line.lineX = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textX = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n\n if (ticksPosition === 'after') {\n textAlign = textProps.align.left;\n } else {\n textAlign = textProps.align.right;\n }\n }\n\n var ticks = values.map(function (value) {\n return _objectSpread({\n key: value,\n value: value\n }, translate(value), line, text);\n });\n return {\n ticks: ticks,\n textAlign: textAlign,\n textBaseline: textBaseline\n };\n};\n\nvar getFormatter = function getFormatter(format$1, scale) {\n if (!format$1 || typeof format$1 === 'function') return format$1;\n\n if (scale.type === 'time') {\n var f = timeFormat(format$1);\n return function (d) {\n return f(new Date(d));\n };\n }\n\n return format(format$1);\n};\n\nvar computeGridLines = function computeGridLines(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n scale = _ref2.scale,\n axis = _ref2.axis,\n _values = _ref2.values;\n var lineValues = Array.isArray(_values) ? _values : undefined;\n var lineCount = isNumber(_values) ? _values : undefined;\n var values = lineValues || getScaleTicks(scale, lineCount);\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var lines;\n\n if (axis === 'x') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: position(v),\n x2: position(v),\n y1: 0,\n y2: height\n };\n });\n } else if (axis === 'y') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: 0,\n x2: width,\n y1: position(v),\n y2: position(v)\n };\n });\n }\n\n return lines;\n};\n\nvar axisPropTypes = {\n ticksPosition: PropTypes.oneOf(['before', 'after']),\n tickValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)])), PropTypes.string]),\n tickSize: PropTypes.number,\n tickPadding: PropTypes.number,\n tickRotation: PropTypes.number,\n format: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n renderTick: PropTypes.func,\n legend: PropTypes.node,\n legendPosition: PropTypes.oneOf(['start', 'middle', 'end']),\n legendOffset: PropTypes.number\n};\nvar axisPropType = PropTypes.shape(axisPropTypes);\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar AxisTick = function AxisTick(_ref) {\n var _value = _ref.value,\n x = _ref.x,\n y = _ref.y,\n opacity = _ref.opacity,\n rotate = _ref.rotate,\n format = _ref.format,\n lineX = _ref.lineX,\n lineY = _ref.lineY,\n _onClick = _ref.onClick,\n textX = _ref.textX,\n textY = _ref.textY,\n textBaseline = _ref.textBaseline,\n textAnchor = _ref.textAnchor;\n var theme = useTheme();\n var value = _value;\n\n if (format !== undefined) {\n value = format(value);\n }\n\n var gStyle = {\n opacity: opacity\n };\n\n if (_onClick) {\n gStyle['cursor'] = 'pointer';\n }\n\n return React.createElement(\"g\", _extends({\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, _onClick ? {\n onClick: function onClick(e) {\n return _onClick(e, value);\n }\n } : {}, {\n style: gStyle\n }), React.createElement(\"line\", {\n x1: 0,\n x2: lineX,\n y1: 0,\n y2: lineY,\n style: theme.axis.ticks.line\n }), React.createElement(\"text\", {\n dominantBaseline: textBaseline,\n textAnchor: textAnchor,\n transform: \"translate(\".concat(textX, \",\").concat(textY, \") rotate(\").concat(rotate, \")\"),\n style: theme.axis.ticks.text\n }, value));\n};\n\nAxisTick.defaultProps = {\n opacity: 1,\n rotate: 0\n};\nvar AxisTick$1 = memo(AxisTick);\n\nfunction _extends$1() {\n _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$1.apply(this, arguments);\n}\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$1(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$1(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\nvar willEnter = function willEnter() {\n return {\n rotate: 0,\n opacity: 0,\n x: 0,\n y: 0\n };\n};\n\nvar willLeave = function willLeave(springConfig) {\n return function (_ref) {\n var _ref$style = _ref.style,\n x = _ref$style.x,\n y = _ref$style.y,\n rotate = _ref$style.rotate;\n return {\n rotate: rotate,\n opacity: spring(0, springConfig),\n x: spring(x.val, springConfig),\n y: spring(y.val, springConfig)\n };\n };\n};\n\nvar defaultTickRenderer = function defaultTickRenderer(props) {\n return React.createElement(AxisTick$1, props);\n};\n\nvar Axis = function Axis(_ref2) {\n var axis = _ref2.axis,\n scale = _ref2.scale,\n x = _ref2.x,\n y = _ref2.y,\n length = _ref2.length,\n ticksPosition = _ref2.ticksPosition,\n tickValues = _ref2.tickValues,\n tickSize = _ref2.tickSize,\n tickPadding = _ref2.tickPadding,\n tickRotation = _ref2.tickRotation,\n format = _ref2.format,\n renderTick = _ref2.renderTick,\n legend = _ref2.legend,\n legendPosition = _ref2.legendPosition,\n legendOffset = _ref2.legendOffset,\n onClick = _ref2.onClick;\n var theme = useTheme();\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n\n var formatValue = useMemo(function () {\n return getFormatter(format, scale);\n }, [format, scale]);\n\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n\n var legendNode = null;\n\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n var textAnchor;\n\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n\n if (legendPosition === 'start') {\n textAnchor = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n }\n } else {\n legendY = legendOffset;\n\n if (legendPosition === 'start') {\n textAnchor = 'start';\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n legendX = length;\n }\n }\n\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendX, \", \").concat(legendY, \") rotate(\").concat(legendRotation, \")\"),\n textAnchor: textAnchor,\n style: _objectSpread$1({\n dominantBaseline: 'central'\n }, theme.axis.legend.text)\n }, legend);\n }\n\n if (animate !== true) {\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, ticks.map(function (tick, tickIndex) {\n return React.createElement(renderTick, _objectSpread$1({\n tickIndex: tickIndex,\n format: formatValue,\n rotate: tickRotation,\n textBaseline: textBaseline,\n textAnchor: textAlign\n }, tick, onClick ? {\n onClick: onClick\n } : {}));\n }), React.createElement(\"line\", {\n style: theme.axis.domain.line,\n x1: 0,\n x2: axis === 'x' ? length : 0,\n y1: 0,\n y2: axis === 'x' ? 0 : length\n }), legendNode);\n }\n\n return React.createElement(Motion, {\n style: {\n x: spring(x, springConfig),\n y: spring(y, springConfig)\n }\n }, function (xy) {\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(xy.x, \",\").concat(xy.y, \")\")\n }, React.createElement(TransitionMotion, {\n willEnter: willEnter,\n willLeave: willLeave(springConfig),\n styles: ticks.map(function (tick) {\n return {\n key: \"\".concat(tick.key),\n data: tick,\n style: {\n opacity: spring(1, springConfig),\n x: spring(tick.x, springConfig),\n y: spring(tick.y, springConfig),\n rotate: spring(tickRotation, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(Fragment, null, interpolatedStyles.map(function (_ref3, tickIndex) {\n var style = _ref3.style,\n tick = _ref3.data;\n return React.createElement(renderTick, _objectSpread$1({\n tickIndex: tickIndex,\n format: formatValue,\n textBaseline: textBaseline,\n textAnchor: textAlign\n }, tick, style, onClick ? {\n onClick: onClick\n } : {}));\n }));\n }), React.createElement(Motion, {\n style: {\n x2: spring(axis === 'x' ? length : 0, springConfig),\n y2: spring(axis === 'x' ? 0 : length, springConfig)\n }\n }, function (values) {\n return React.createElement(\"line\", _extends$1({\n style: theme.axis.domain.line,\n x1: 0,\n y1: 0\n }, values));\n }), legendNode);\n });\n};\n\nAxis.defaultProps = {\n x: 0,\n y: 0,\n tickSize: 5,\n tickPadding: 5,\n tickRotation: 0,\n renderTick: defaultTickRenderer,\n legendPosition: 'end',\n legendOffset: 0\n};\nvar Axis$1 = memo(Axis);\n\nfunction _extends$2() {\n _extends$2 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$2.apply(this, arguments);\n}\n\nvar positions = ['top', 'right', 'bottom', 'left'];\n\nvar Axes = function Axes(_ref) {\n var xScale = _ref.xScale,\n yScale = _ref.yScale,\n width = _ref.width,\n height = _ref.height,\n top = _ref.top,\n right = _ref.right,\n bottom = _ref.bottom,\n left = _ref.left;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n return positions.map(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n return React.createElement(Axis$1, _extends$2({\n key: position\n }, axis, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: isXAxis ? xScale : yScale,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition\n }));\n });\n};\n\nvar Axes$1 = memo(Axes);\n\nvar GridLine = function GridLine(props) {\n return React.createElement(\"line\", props);\n};\n\nGridLine.defaultProps = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n};\nvar GridLine$1 = memo(GridLine);\n\nfunction _extends$3() {\n _extends$3 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$3.apply(this, arguments);\n}\n\nvar GridLines = function GridLines(_ref) {\n var type = _ref.type,\n lines = _ref.lines;\n var theme = useTheme();\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n\n var lineWillEnter = useMemo(function () {\n return function (_ref2) {\n var style = _ref2.style;\n return {\n opacity: 0,\n x1: type === 'x' ? 0 : style.x1.val,\n x2: type === 'x' ? 0 : style.x2.val,\n y1: type === 'y' ? 0 : style.y1.val,\n y2: type === 'y' ? 0 : style.y2.val\n };\n };\n }, [type]);\n var lineWillLeave = useMemo(function () {\n return function (_ref3) {\n var style = _ref3.style;\n return {\n opacity: spring(0, springConfig),\n x1: spring(style.x1.val, springConfig),\n x2: spring(style.x2.val, springConfig),\n y1: spring(style.y1.val, springConfig),\n y2: spring(style.y2.val, springConfig)\n };\n };\n }, [springConfig]);\n\n if (!animate) {\n return React.createElement(\"g\", null, lines.map(function (line) {\n return React.createElement(GridLine$1, _extends$3({\n key: line.key\n }, line, theme.grid.line));\n }));\n }\n\n return React.createElement(TransitionMotion, {\n willEnter: lineWillEnter,\n willLeave: lineWillLeave,\n styles: lines.map(function (line) {\n return {\n key: line.key,\n style: {\n opacity: spring(1, springConfig),\n x1: spring(line.x1 || 0, springConfig),\n x2: spring(line.x2 || 0, springConfig),\n y1: spring(line.y1 || 0, springConfig),\n y2: spring(line.y2 || 0, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"g\", null, interpolatedStyles.map(function (interpolatedStyle) {\n var key = interpolatedStyle.key,\n style = interpolatedStyle.style;\n return React.createElement(GridLine$1, _extends$3({\n key: key\n }, theme.grid.line, style));\n }));\n });\n};\n\nvar GridLines$1 = memo(GridLines);\n\nvar Grid = function Grid(_ref) {\n var width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n xValues = _ref.xValues,\n yValues = _ref.yValues;\n var xLines = useMemo(function () {\n if (!xScale) return false;\n return computeGridLines({\n width: width,\n height: height,\n scale: xScale,\n axis: 'x',\n values: xValues\n });\n }, [xScale, xValues]);\n var yLines = yScale ? computeGridLines({\n width: width,\n height: height,\n scale: yScale,\n axis: 'y',\n values: yValues\n }) : false;\n return React.createElement(React.Fragment, null, xLines && React.createElement(GridLines$1, {\n type: \"x\",\n lines: xLines\n }), yLines && React.createElement(GridLines$1, {\n type: \"y\",\n lines: yLines\n }));\n};\n\nvar Grid$1 = memo(Grid);\n\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$2(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$2(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\nvar renderAxisToCanvas = function renderAxisToCanvas(ctx, _ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 0 : _ref$y,\n length = _ref.length,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n _ref$tickSize = _ref.tickSize,\n tickSize = _ref$tickSize === void 0 ? 5 : _ref$tickSize,\n _ref$tickPadding = _ref.tickPadding,\n tickPadding = _ref$tickPadding === void 0 ? 5 : _ref$tickPadding,\n _ref$tickRotation = _ref.tickRotation,\n tickRotation = _ref$tickRotation === void 0 ? 0 : _ref$tickRotation,\n format = _ref.format,\n legend = _ref.legend,\n _ref$legendPosition = _ref.legendPosition,\n legendPosition = _ref$legendPosition === void 0 ? 'end' : _ref$legendPosition,\n _ref$legendOffset = _ref.legendOffset,\n legendOffset = _ref$legendOffset === void 0 ? 0 : _ref$legendOffset,\n theme = _ref.theme;\n\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation,\n engine: 'canvas'\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n\n ctx.save();\n ctx.translate(x, y);\n ctx.textAlign = textAlign;\n ctx.textBaseline = textBaseline;\n ctx.font = \"\".concat(theme.axis.ticks.text.fontSize, \"px \").concat(theme.axis.ticks.text.fontFamily);\n\n if (theme.axis.domain.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.domain.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.domain.line.stroke;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(axis === 'x' ? length : 0, axis === 'x' ? 0 : length);\n ctx.stroke();\n }\n\n ticks.forEach(function (tick) {\n if (theme.axis.ticks.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.ticks.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.ticks.line.stroke;\n ctx.beginPath();\n ctx.moveTo(tick.x, tick.y);\n ctx.lineTo(tick.x + tick.lineX, tick.y + tick.lineY);\n ctx.stroke();\n }\n\n var value = format !== undefined ? format(tick.value) : tick.value;\n ctx.save();\n ctx.translate(tick.x + tick.textX, tick.y + tick.textY);\n ctx.rotate(degreesToRadians(tickRotation));\n ctx.fillStyle = theme.axis.ticks.text.fill;\n ctx.fillText(value, 0, 0);\n ctx.restore();\n });\n\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n\n var _textAlign;\n\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n\n if (legendPosition === 'start') {\n _textAlign = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n }\n } else {\n legendY = legendOffset;\n\n if (legendPosition === 'start') {\n _textAlign = 'start';\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n legendX = length;\n }\n }\n\n ctx.translate(legendX, legendY);\n ctx.rotate(degreesToRadians(legendRotation));\n ctx.font = \"\".concat(theme.axis.legend.text.fontWeight ? \"\".concat(theme.axis.legend.text.fontWeight, \" \") : '').concat(theme.axis.legend.text.fontSize, \"px \").concat(theme.axis.legend.text.fontFamily);\n ctx.fillStyle = theme.axis.legend.text.fill;\n ctx.textAlign = _textAlign;\n ctx.textBaseline = 'middle';\n ctx.fillText(legend, 0, 0);\n }\n\n ctx.restore();\n};\n\nvar positions$1 = ['top', 'right', 'bottom', 'left'];\n\nvar renderAxesToCanvas = function renderAxesToCanvas(ctx, _ref2) {\n var xScale = _ref2.xScale,\n yScale = _ref2.yScale,\n width = _ref2.width,\n height = _ref2.height,\n top = _ref2.top,\n right = _ref2.right,\n bottom = _ref2.bottom,\n left = _ref2.left,\n theme = _ref2.theme;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n positions$1.forEach(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n var scale = isXAxis ? xScale : yScale;\n var format = getFormatter(axis.format, scale);\n renderAxisToCanvas(ctx, _objectSpread$2({}, axis, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: scale,\n format: format,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition,\n theme: theme\n }));\n });\n};\n\nvar renderGridLinesToCanvas = function renderGridLinesToCanvas(ctx, _ref3) {\n var width = _ref3.width,\n height = _ref3.height,\n scale = _ref3.scale,\n axis = _ref3.axis,\n values = _ref3.values;\n var lines = computeGridLines({\n width: width,\n height: height,\n scale: scale,\n axis: axis,\n values: values\n });\n lines.forEach(function (line) {\n ctx.beginPath();\n ctx.moveTo(line.x1, line.y1);\n ctx.lineTo(line.x2, line.y2);\n ctx.stroke();\n });\n};\n\nexport { Axes$1 as Axes, Axis$1 as Axis, Grid$1 as Grid, axisPropType, axisPropTypes, renderAxesToCanvas, renderAxisToCanvas, renderGridLinesToCanvas };","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n countHolders = require('./_countHolders'),\n createCtor = require('./_createCtor'),\n createRecurry = require('./_createRecurry'),\n getHolder = require('./_getHolder'),\n reorder = require('./_reorder'),\n replaceHolders = require('./_replaceHolders'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_FLAG = 8,\n WRAP_CURRY_RIGHT_FLAG = 16,\n WRAP_ARY_FLAG = 128,\n WRAP_FLIP_FLAG = 512;\n\n/**\n * Creates a function that wraps `func` to invoke it with optional `this`\n * binding of `thisArg`, partial application, and currying.\n *\n * @private\n * @param {Function|string} func The function or method name to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @param {Array} [partials] The arguments to prepend to those provided to\n * the new function.\n * @param {Array} [holders] The `partials` placeholder indexes.\n * @param {Array} [partialsRight] The arguments to append to those provided\n * to the new function.\n * @param {Array} [holdersRight] The `partialsRight` placeholder indexes.\n * @param {Array} [argPos] The argument positions of the new function.\n * @param {number} [ary] The arity cap of `func`.\n * @param {number} [arity] The arity of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary, arity) {\n var isAry = bitmask & WRAP_ARY_FLAG,\n isBind = bitmask & WRAP_BIND_FLAG,\n isBindKey = bitmask & WRAP_BIND_KEY_FLAG,\n isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG),\n isFlip = bitmask & WRAP_FLIP_FLAG,\n Ctor = isBindKey ? undefined : createCtor(func);\n\n function wrapper() {\n var length = arguments.length,\n args = Array(length),\n index = length;\n\n while (index--) {\n args[index] = arguments[index];\n }\n if (isCurried) {\n var placeholder = getHolder(wrapper),\n holdersCount = countHolders(args, placeholder);\n }\n if (partials) {\n args = composeArgs(args, partials, holders, isCurried);\n }\n if (partialsRight) {\n args = composeArgsRight(args, partialsRight, holdersRight, isCurried);\n }\n length -= holdersCount;\n if (isCurried && length < arity) {\n var newHolders = replaceHolders(args, placeholder);\n return createRecurry(\n func, bitmask, createHybrid, wrapper.placeholder, thisArg,\n args, newHolders, argPos, ary, arity - length\n );\n }\n var thisBinding = isBind ? thisArg : this,\n fn = isBindKey ? thisBinding[func] : func;\n\n length = args.length;\n if (argPos) {\n args = reorder(args, argPos);\n } else if (isFlip && length > 1) {\n args.reverse();\n }\n if (isAry && ary < length) {\n args.length = ary;\n }\n if (this && this !== root && this instanceof wrapper) {\n fn = Ctor || createCtor(fn);\n }\n return fn.apply(thisBinding, args);\n }\n return wrapper;\n}\n\nmodule.exports = createHybrid;\n","var WeakMap = require('./_WeakMap');\n\n/** Used to store function metadata. */\nvar metaMap = WeakMap && new WeakMap;\n\nmodule.exports = metaMap;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n baseSortBy = require('./_baseSortBy'),\n baseUnary = require('./_baseUnary'),\n compareMultiple = require('./_compareMultiple'),\n identity = require('./identity');\n\n/**\n * The base implementation of `_.orderBy` without param guards.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.\n * @param {string[]} orders The sort orders of `iteratees`.\n * @returns {Array} Returns the new sorted array.\n */\nfunction baseOrderBy(collection, iteratees, orders) {\n var index = -1;\n iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseUnary(baseIteratee));\n\n var result = baseMap(collection, function(value, key, collection) {\n var criteria = arrayMap(iteratees, function(iteratee) {\n return iteratee(value);\n });\n return { 'criteria': criteria, 'index': ++index, 'value': value };\n });\n\n return baseSortBy(result, function(object, other) {\n return compareMultiple(object, other, orders);\n });\n}\n\nmodule.exports = baseOrderBy;\n","/** Used to match `RegExp` flags from their coerced string values. */\nvar reFlags = /\\w*$/;\n\n/**\n * Creates a clone of `regexp`.\n *\n * @private\n * @param {Object} regexp The regexp to clone.\n * @returns {Object} Returns the cloned regexp.\n */\nfunction cloneRegExp(regexp) {\n var result = new regexp.constructor(regexp.source, reFlags.exec(regexp));\n result.lastIndex = regexp.lastIndex;\n return result;\n}\n\nmodule.exports = cloneRegExp;\n","var baseTimes = require('./_baseTimes'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isIndex = require('./_isIndex'),\n isTypedArray = require('./isTypedArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = arrayLikeKeys;\n","// Generated by CoffeeScript 1.7.1\n(function () {\n var getNanoSeconds, hrtime, loadTime;\n\n if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n module.exports = function () {\n return performance.now();\n };\n } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n module.exports = function () {\n return (getNanoSeconds() - loadTime) / 1e6;\n };\n\n hrtime = process.hrtime;\n\n getNanoSeconds = function getNanoSeconds() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n\n loadTime = getNanoSeconds();\n } else if (Date.now) {\n module.exports = function () {\n return Date.now() - loadTime;\n };\n\n loadTime = Date.now();\n } else {\n module.exports = function () {\n return new Date().getTime() - loadTime;\n };\n\n loadTime = new Date().getTime();\n }\n}).call(this);","export default function nice(domain, interval) {\n domain = domain.slice();\n var i0 = 0,\n i1 = domain.length - 1,\n x0 = domain[i0],\n x1 = domain[i1],\n t;\n\n if (x1 < x0) {\n t = i0, i0 = i1, i1 = t;\n t = x0, x0 = x1, x1 = t;\n }\n\n domain[i0] = interval.floor(x0);\n domain[i1] = interval.ceil(x1);\n return domain;\n}","import \"core-js/modules/es.array.reduce.js\";\n\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} 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 (\n /** @class */\n 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}();\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 =\n/** @class */\nfunction () {\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}\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 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 ().\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 =\n/** @class */\nfunction () {\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 =\n/** @class */\nfunction () {\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 =\n/** @class */\nfunction () {\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}\r\n */\n this.activeObservations_ = [];\n /**\r\n * Registry of the ResizeObservation instances.\r\n *\r\n * @private {Map}\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 =\n/** @class */\nfunction () {\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;","'use strict';\n\nvar isArray = Array.isArray;\nvar keyList = Object.keys;\nvar hasProp = Object.prototype.hasOwnProperty;\nvar hasElementType = typeof Element !== 'undefined';\n\nfunction equal(a, b) {\n // fast-deep-equal index.js 2.0.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n var arrA = isArray(a),\n arrB = isArray(b),\n i,\n length,\n key;\n\n if (arrA && arrB) {\n length = a.length;\n if (length != b.length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!equal(a[i], b[i])) return false;\n }\n\n return true;\n }\n\n if (arrA != arrB) return false;\n var dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA != dateB) return false;\n if (dateA && dateB) return a.getTime() == b.getTime();\n var regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA != regexpB) return false;\n if (regexpA && regexpB) return a.toString() == b.toString();\n var keys = keyList(a);\n length = keys.length;\n if (length !== keyList(b).length) return false;\n\n for (i = length; i-- !== 0;) {\n if (!hasProp.call(b, keys[i])) return false;\n } // end fast-deep-equal\n // start react-fast-compare\n // custom handling for DOM elements\n\n\n if (hasElementType && a instanceof Element && b instanceof Element) return a === b; // custom handling for React\n\n for (i = length; i-- !== 0;) {\n key = keys[i];\n\n if (key === '_owner' && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner.\n // _owner contains circular references\n // and is not needed when comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of a react element\n continue;\n } else {\n // all other properties should be traversed as usual\n if (!equal(a[key], b[key])) return false;\n }\n } // end react-fast-compare\n // fast-deep-equal index.js 2.0.1\n\n\n return true;\n }\n\n return a !== a && b !== b;\n} // end fast-deep-equal\n\n\nmodule.exports = function exportedEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (error.message && error.message.match(/stack|recursion/i) || error.number === -2146828260) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('Warning: react-fast-compare does not handle circular references.', error.name, error.message);\n return false;\n } // some other error. we should definitely know about these\n\n\n throw error;\n }\n};","\"use strict\";\n\nexports.__esModule = true;\n\nvar _BreakpointProvider = require(\"./BreakpointProvider\");\n\nexports.useBreakpoint = _BreakpointProvider.useBreakpoint;\n\nvar _withBreakpoints = require(\"./withBreakpoints\");\n\nexports.withBreakpoints = _withBreakpoints.withBreakpoints;","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar getDisplayName = function getDisplayName(Component) {\n if (typeof Component === 'string') {\n return Component;\n }\n\n if (!Component) {\n return undefined;\n }\n\n return Component.displayName || Component.name || 'Component';\n};\n\nvar _default = getDisplayName;\nexports.default = _default;","\"use strict\";\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar setStatic = function setStatic(key, value) {\n return function (BaseComponent) {\n /* eslint-disable no-param-reassign */\n BaseComponent[key] = value;\n /* eslint-enable no-param-reassign */\n\n return BaseComponent;\n };\n};\n\nvar _default = setStatic;\nexports.default = _default;","var createBaseFor = require('./_createBaseFor');\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\nmodule.exports = baseFor;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _inheritsLoose2 = _interopRequireDefault(require(\"@babel/runtime/helpers/inheritsLoose\"));\n\nvar _react = require(\"react\");\n\nvar _reactLifecyclesCompat = require(\"react-lifecycles-compat\");\n\nvar _pick = _interopRequireDefault(require(\"./utils/pick\"));\n\nvar _shallowEqual = _interopRequireDefault(require(\"./shallowEqual\"));\n\nvar _setDisplayName = _interopRequireDefault(require(\"./setDisplayName\"));\n\nvar _wrapDisplayName = _interopRequireDefault(require(\"./wrapDisplayName\"));\n\nvar withPropsOnChange = function withPropsOnChange(shouldMapOrKeys, propsMapper) {\n return function (BaseComponent) {\n var factory = (0, _react.createFactory)(BaseComponent);\n var shouldMap = typeof shouldMapOrKeys === 'function' ? shouldMapOrKeys : function (props, nextProps) {\n return !(0, _shallowEqual.default)((0, _pick.default)(props, shouldMapOrKeys), (0, _pick.default)(nextProps, shouldMapOrKeys));\n };\n\n var WithPropsOnChange = /*#__PURE__*/function (_Component) {\n (0, _inheritsLoose2.default)(WithPropsOnChange, _Component);\n\n function WithPropsOnChange() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n _this.state = {\n computedProps: propsMapper(_this.props),\n prevProps: _this.props\n };\n return _this;\n }\n\n WithPropsOnChange.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, prevState) {\n if (shouldMap(prevState.prevProps, nextProps)) {\n return {\n computedProps: propsMapper(nextProps),\n prevProps: nextProps\n };\n }\n\n return {\n prevProps: nextProps\n };\n };\n\n var _proto = WithPropsOnChange.prototype;\n\n _proto.render = function render() {\n return factory((0, _extends2.default)({}, this.props, this.state.computedProps));\n };\n\n return WithPropsOnChange;\n }(_react.Component);\n\n (0, _reactLifecyclesCompat.polyfill)(WithPropsOnChange);\n\n if (process.env.NODE_ENV !== 'production') {\n return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'withPropsOnChange'))(WithPropsOnChange);\n }\n\n return WithPropsOnChange;\n };\n};\n\nvar _default = withPropsOnChange;\nexports.default = _default;","var Set = require('./_Set'),\n noop = require('./noop'),\n setToArray = require('./_setToArray');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Creates a set object of `values`.\n *\n * @private\n * @param {Array} values The values to add to the set.\n * @returns {Object} Returns the new set.\n */\nvar createSet = !(Set && (1 / setToArray(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {\n return new Set(values);\n};\n\nmodule.exports = createSet;\n","var isObject = require('./isObject');\n\n/** Built-in value references. */\nvar objectCreate = Object.create;\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\nmodule.exports = baseCreate;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isSymbol = require('./isSymbol');\n\n/**\n * The base implementation of methods like `_.max` and `_.min` which accepts a\n * `comparator` to determine the extremum value.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The iteratee invoked per iteration.\n * @param {Function} comparator The comparator used to compare values.\n * @returns {*} Returns the extremum value.\n */\nfunction baseExtremum(array, iteratee, comparator) {\n var index = -1,\n length = array.length;\n\n while (++index < length) {\n var value = array[index],\n current = iteratee(value);\n\n if (current != null && (computed === undefined\n ? (current === current && !isSymbol(current))\n : comparator(current, computed)\n )) {\n var computed = current,\n result = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseExtremum;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var Stack = require('./_Stack'),\n equalArrays = require('./_equalArrays'),\n equalByTag = require('./_equalByTag'),\n equalObjects = require('./_equalObjects'),\n getTag = require('./_getTag'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isTypedArray = require('./isTypedArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n objectTag = '[object Object]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqual` for arrays and objects which performs\n * deep comparisons and tracks traversed objects enabling objects with circular\n * references to be compared.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} [stack] Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {\n var objIsArr = isArray(object),\n othIsArr = isArray(other),\n objTag = objIsArr ? arrayTag : getTag(object),\n othTag = othIsArr ? arrayTag : getTag(other);\n\n objTag = objTag == argsTag ? objectTag : objTag;\n othTag = othTag == argsTag ? objectTag : othTag;\n\n var objIsObj = objTag == objectTag,\n othIsObj = othTag == objectTag,\n isSameTag = objTag == othTag;\n\n if (isSameTag && isBuffer(object)) {\n if (!isBuffer(other)) {\n return false;\n }\n objIsArr = true;\n objIsObj = false;\n }\n if (isSameTag && !objIsObj) {\n stack || (stack = new Stack);\n return (objIsArr || isTypedArray(object))\n ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)\n : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);\n }\n if (!(bitmask & COMPARE_PARTIAL_FLAG)) {\n var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),\n othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');\n\n if (objIsWrapped || othIsWrapped) {\n var objUnwrapped = objIsWrapped ? object.value() : object,\n othUnwrapped = othIsWrapped ? other.value() : other;\n\n stack || (stack = new Stack);\n return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);\n }\n }\n if (!isSameTag) {\n return false;\n }\n stack || (stack = new Stack);\n return equalObjects(object, other, bitmask, customizer, equalFunc, stack);\n}\n\nmodule.exports = baseIsEqualDeep;\n","// Generated by CoffeeScript 1.12.2\n(function () {\n var getNanoSeconds, hrtime, loadTime, moduleLoadTime, nodeLoadTime, upTime;\n\n if (typeof performance !== \"undefined\" && performance !== null && performance.now) {\n module.exports = function () {\n return performance.now();\n };\n } else if (typeof process !== \"undefined\" && process !== null && process.hrtime) {\n module.exports = function () {\n return (getNanoSeconds() - nodeLoadTime) / 1e6;\n };\n\n hrtime = process.hrtime;\n\n getNanoSeconds = function getNanoSeconds() {\n var hr;\n hr = hrtime();\n return hr[0] * 1e9 + hr[1];\n };\n\n moduleLoadTime = getNanoSeconds();\n upTime = process.uptime() * 1e9;\n nodeLoadTime = moduleLoadTime - upTime;\n } else if (Date.now) {\n module.exports = function () {\n return Date.now() - loadTime;\n };\n\n loadTime = Date.now();\n } else {\n module.exports = function () {\n return new Date().getTime() - loadTime;\n };\n\n loadTime = new Date().getTime();\n }\n}).call(this);","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e7e1efc994c7dd1c77\", \"f1eef6d7b5d8df65b0ce1256\", \"f1eef6d7b5d8df65b0dd1c77980043\", \"f1eef6d4b9dac994c7df65b0dd1c77980043\", \"f1eef6d4b9dac994c7df65b0e7298ace125691003f\", \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f\", \"f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f\").map(colors);\nexport default ramp(scheme);","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","var arrayPush = require('./_arrayPush'),\n isArray = require('./isArray');\n\n/**\n * The base implementation of `getAllKeys` and `getAllKeysIn` which uses\n * `keysFunc` and `symbolsFunc` to get the enumerable property names and\n * symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @param {Function} symbolsFunc The function to get the symbols of `object`.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction baseGetAllKeys(object, keysFunc, symbolsFunc) {\n var result = keysFunc(object);\n return isArray(object) ? result : arrayPush(result, symbolsFunc(object));\n}\n\nmodule.exports = baseGetAllKeys;\n","// stepper is used a lot. Saves allocation to return the same array wrapper.\n// This is fine and danger-free against mutations because the callsite\n// immediately destructures it and gets the numbers inside without passing the\n\"use strict\";\n\nexports.__esModule = true;\nexports[\"default\"] = stepper;\nvar reusedTuple = [0, 0];\n\nfunction stepper(secondPerFrame, x, v, destX, k, b, precision) {\n // Spring stiffness, in kg / s^2\n // for animations, destX is really spring length (spring at rest). initial\n // position is considered as the stretched/compressed position of a spring\n var Fspring = -k * (x - destX); // Damping, in kg / s\n\n var Fdamper = -b * v; // usually we put mass here, but for animation purposes, specifying mass is a\n // bit redundant. you could simply adjust k and b accordingly\n // let a = (Fspring + Fdamper) / mass;\n\n var a = Fspring + Fdamper;\n var newV = v + a * secondPerFrame;\n var newX = x + newV * secondPerFrame;\n\n if (Math.abs(newV) < precision && Math.abs(newX - destX) < precision) {\n reusedTuple[0] = destX;\n reusedTuple[1] = 0;\n return reusedTuple;\n }\n\n reusedTuple[0] = newX;\n reusedTuple[1] = newV;\n return reusedTuple;\n}\n\nmodule.exports = exports[\"default\"]; // array reference around.","var ListCache = require('./_ListCache'),\n stackClear = require('./_stackClear'),\n stackDelete = require('./_stackDelete'),\n stackGet = require('./_stackGet'),\n stackHas = require('./_stackHas'),\n stackSet = require('./_stackSet');\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\nmodule.exports = Stack;\n","/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Adds `value` to the array cache.\n *\n * @private\n * @name add\n * @memberOf SetCache\n * @alias push\n * @param {*} value The value to cache.\n * @returns {Object} Returns the cache instance.\n */\nfunction setCacheAdd(value) {\n this.__data__.set(value, HASH_UNDEFINED);\n return this;\n}\n\nmodule.exports = setCacheAdd;\n","/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\nmodule.exports = stackGet;\n","/**\n * A specialized version of `_.forEach` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns `array`.\n */\nfunction arrayEach(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (iteratee(array[index], index, array) === false) {\n break;\n }\n }\n return array;\n}\n\nmodule.exports = arrayEach;\n","import colors from \"../colors.js\";\nexport default colors(\"66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3\");","var baseGet = require('./_baseGet'),\n baseSlice = require('./_baseSlice');\n\n/**\n * Gets the parent value at `path` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} path The path to get the parent value of.\n * @returns {*} Returns the parent value.\n */\nfunction parent(object, path) {\n return path.length < 2 ? object : baseGet(object, baseSlice(path, 0, -1));\n}\n\nmodule.exports = parent;\n","import colors from \"../colors.js\";\nexport default colors(\"7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666\");","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\nvar ascendingBisect = bisector(ascending);\nexport var bisectRight = ascendingBisect.right;\nexport var bisectLeft = ascendingBisect.left;\nexport var bisectCenter = bisector(number).center;\nexport default bisectRight;","import _regeneratorRuntime from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/regenerator/index.js\";\n\nvar _marked = /*#__PURE__*/_regeneratorRuntime.mark(numbers);\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nexport default function (x) {\n return x === null ? NaN : +x;\n}\nexport function numbers(values, valueof) {\n var _iterator, _step, value, index, _iterator2, _step2, _value;\n\n return _regeneratorRuntime.wrap(function numbers$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n if (!(valueof === undefined)) {\n _context.next = 21;\n break;\n }\n\n _iterator = _createForOfIteratorHelper(values);\n _context.prev = 2;\n\n _iterator.s();\n\n case 4:\n if ((_step = _iterator.n()).done) {\n _context.next = 11;\n break;\n }\n\n value = _step.value;\n\n if (!(value != null && (value = +value) >= value)) {\n _context.next = 9;\n break;\n }\n\n _context.next = 9;\n return value;\n\n case 9:\n _context.next = 4;\n break;\n\n case 11:\n _context.next = 16;\n break;\n\n case 13:\n _context.prev = 13;\n _context.t0 = _context[\"catch\"](2);\n\n _iterator.e(_context.t0);\n\n case 16:\n _context.prev = 16;\n\n _iterator.f();\n\n return _context.finish(16);\n\n case 19:\n _context.next = 40;\n break;\n\n case 21:\n index = -1;\n _iterator2 = _createForOfIteratorHelper(values);\n _context.prev = 23;\n\n _iterator2.s();\n\n case 25:\n if ((_step2 = _iterator2.n()).done) {\n _context.next = 32;\n break;\n }\n\n _value = _step2.value;\n\n if (!((_value = valueof(_value, ++index, values)) != null && (_value = +_value) >= _value)) {\n _context.next = 30;\n break;\n }\n\n _context.next = 30;\n return _value;\n\n case 30:\n _context.next = 25;\n break;\n\n case 32:\n _context.next = 37;\n break;\n\n case 34:\n _context.prev = 34;\n _context.t1 = _context[\"catch\"](23);\n\n _iterator2.e(_context.t1);\n\n case 37:\n _context.prev = 37;\n\n _iterator2.f();\n\n return _context.finish(37);\n\n case 40:\n case \"end\":\n return _context.stop();\n }\n }\n }, _marked, null, [[2, 13, 16, 19], [23, 34, 37, 40]]);\n}","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"deebf79ecae13182bd\", \"eff3ffbdd7e76baed62171b5\", \"eff3ffbdd7e76baed63182bd08519c\", \"eff3ffc6dbef9ecae16baed63182bd08519c\", \"eff3ffc6dbef9ecae16baed64292c62171b5084594\", \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594\", \"f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b\").map(colors);\nexport default ramp(scheme);","'use strict';\nvar toPropertyKey = require('../internals/to-property-key');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = function (object, key, value) {\n var propertyKey = toPropertyKey(key);\n if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value));\n else object[propertyKey] = value;\n};\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _getDisplayName = _interopRequireDefault(require(\"./getDisplayName\"));\n\nvar wrapDisplayName = function wrapDisplayName(BaseComponent, hocName) {\n return hocName + \"(\" + (0, _getDisplayName.default)(BaseComponent) + \")\";\n};\n\nvar _default = wrapDisplayName;\nexports.default = _default;","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var t0 = new Date(),\n t1 = new Date();\nexport default function newInterval(floori, offseti, count, field) {\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n }\n\n interval.floor = function (date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function (date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function (date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function (date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function (start, stop, step) {\n var range = [],\n previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n\n do {\n range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n } while (previous < start && start < stop);\n\n return range;\n };\n\n interval.filter = function (test) {\n return newInterval(function (date) {\n if (date >= date) while (floori(date), !test(date)) {\n date.setTime(date - 1);\n }\n }, function (date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n\n }\n }\n });\n };\n\n if (count) {\n interval.count = function (start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function (step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {\n return field(d) % step === 0;\n } : function (d) {\n return interval.count(0, d) % step === 0;\n });\n };\n }\n\n return interval;\n}","import interval from \"./interval.js\";\nvar millisecond = interval(function () {// noop\n}, function (date, step) {\n date.setTime(+date + step);\n}, function (start, end) {\n return end - start;\n}); // An optimized implementation for this simple case.\n\nmillisecond.every = function (k) {\n k = Math.floor(k);\n if (!isFinite(k) || !(k > 0)) return null;\n if (!(k > 1)) return millisecond;\n return interval(function (date) {\n date.setTime(Math.floor(date / k) * k);\n }, function (date, step) {\n date.setTime(+date + step * k);\n }, function (start, end) {\n return (end - start) / k;\n });\n};\n\nexport default millisecond;\nexport var milliseconds = millisecond.range;","import interval from \"./interval.js\";\nimport { durationSecond } from \"./duration.js\";\nvar second = interval(function (date) {\n date.setTime(date - date.getMilliseconds());\n}, function (date, step) {\n date.setTime(+date + step * durationSecond);\n}, function (start, end) {\n return (end - start) / durationSecond;\n}, function (date) {\n return date.getUTCSeconds();\n});\nexport default second;\nexport var seconds = second.range;","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;","import interval from \"./interval.js\";\nimport { durationMinute, durationSecond } from \"./duration.js\";\nvar minute = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getMinutes();\n});\nexport default minute;\nexport var minutes = minute.range;","import interval from \"./interval.js\";\nimport { durationMinute } from \"./duration.js\";\nvar utcMinute = interval(function (date) {\n date.setUTCSeconds(0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationMinute);\n}, function (start, end) {\n return (end - start) / durationMinute;\n}, function (date) {\n return date.getUTCMinutes();\n});\nexport default utcMinute;\nexport var utcMinutes = utcMinute.range;","import interval from \"./interval.js\";\nimport { durationHour, durationMinute, durationSecond } from \"./duration.js\";\nvar hour = interval(function (date) {\n date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getHours();\n});\nexport default hour;\nexport var hours = hour.range;","import interval from \"./interval.js\";\nimport { durationHour } from \"./duration.js\";\nvar utcHour = interval(function (date) {\n date.setUTCMinutes(0, 0, 0);\n}, function (date, step) {\n date.setTime(+date + step * durationHour);\n}, function (start, end) {\n return (end - start) / durationHour;\n}, function (date) {\n return date.getUTCHours();\n});\nexport default utcHour;\nexport var utcHours = utcHour.range;","import interval from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nvar day = interval(function (date) {\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setDate(date.getDate() + step);\n}, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function (date) {\n return date.getDate() - 1;\n});\nexport default day;\nexport var days = day.range;","import interval from \"./interval.js\";\nimport { durationDay } from \"./duration.js\";\nvar utcDay = interval(function (date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function (start, end) {\n return (end - start) / durationDay;\n}, function (date) {\n return date.getUTCDate() - 1;\n});\nexport default utcDay;\nexport var utcDays = utcDay.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function (date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;","import interval from \"./interval.js\";\nimport { durationWeek } from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function (date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function (start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;","import interval from \"./interval.js\";\nvar month = interval(function (date) {\n date.setDate(1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setMonth(date.getMonth() + step);\n}, function (start, end) {\n return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;\n}, function (date) {\n return date.getMonth();\n});\nexport default month;\nexport var months = month.range;","import interval from \"./interval.js\";\nvar utcMonth = interval(function (date) {\n date.setUTCDate(1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCMonth(date.getUTCMonth() + step);\n}, function (start, end) {\n return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;\n}, function (date) {\n return date.getUTCMonth();\n});\nexport default utcMonth;\nexport var utcMonths = utcMonth.range;","import interval from \"./interval.js\";\nvar year = interval(function (date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function (start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function (date) {\n return date.getFullYear();\n}); // An optimized implementation for this simple case.\n\nyear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;","import interval from \"./interval.js\";\nvar utcYear = interval(function (date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function (start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function (date) {\n return date.getUTCFullYear();\n}); // An optimized implementation for this simple case.\n\nutcYear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {\n y: y,\n m: m,\n d: d,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n }; // These recursive directive definitions must be deferred.\n\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function (string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week,\n day;\n if (i != string.length) return null; // If a UNIX timestamp is specified, return it.\n\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0)); // If this is utcParse, never use the local timezone.\n\n if (Z && !(\"Z\" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM.\n\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter.\n\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year.\n\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n } // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n\n\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n } // Otherwise, all fields are in local time.\n\n\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || (j = parse(d, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function format(specifier) {\n var f = newFormat(specifier += \"\", formats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n parse: function parse(specifier) {\n var p = newParse(specifier += \"\", false);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n },\n utcFormat: function utcFormat(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n utcParse: function utcParse(specifier) {\n var p = newParse(specifier += \"\", true);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n }\n };\n}\nvar pads = {\n \"-\": \"\",\n \"_\": \" \",\n \"0\": \"0\"\n},\n numberRe = /^\\s*\\d+/,\n // note: ignores next directive\npercentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {},\n i = -1,\n n = names.length;\n\n while (++i < n) {\n map[names[i].toLowerCase()] = i;\n }\n\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n} // Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\n\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function () {\n return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n \"%\": function _(x, p) {\n return (x * 100).toFixed(p);\n },\n \"b\": function b(x) {\n return Math.round(x).toString(2);\n },\n \"c\": function c(x) {\n return x + \"\";\n },\n \"d\": formatDecimal,\n \"e\": function e(x, p) {\n return x.toExponential(p);\n },\n \"f\": function f(x, p) {\n return x.toFixed(p);\n },\n \"g\": function g(x, p) {\n return x.toPrecision(p);\n },\n \"o\": function o(x) {\n return Math.round(x).toString(8);\n },\n \"p\": function p(x, _p) {\n return formatRounded(x * 100, _p);\n },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function X(x) {\n return Math.round(x).toString(16).toUpperCase();\n },\n \"x\": function x(_x) {\n return Math.round(_x).toString(16);\n }\n};","export default function (x) {\n return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type; // The \"n\" type is an alias for \",g\".\n\n if (type === \"n\") comma = true, type = \"g\"; // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\"; // If zero fill is specified, padding goes after sign and before digits.\n\n if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\"; // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\"; // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n\n precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i,\n n,\n c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n\n var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting.\n\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros.\n\n if (trim) value = formatTrim(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false; // Compute the prefix and suffix.\n\n valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\"); // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n\n if (maybeSuffix) {\n i = -1, n = value.length;\n\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n } // If the fill character is not \"0\", grouping is applied before padding.\n\n\n if (comma && !zero) value = group(value, Infinity); // Compute the padding.\n\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\"; // If the fill character is \"0\", grouping is applied after padding.\n\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\"; // Reconstruct the final output based on the desired alignment.\n\n switch (align) {\n case \"<\":\n value = valuePrefix + value + valueSuffix + padding;\n break;\n\n case \"=\":\n value = valuePrefix + padding + value + valueSuffix;\n break;\n\n case \"^\":\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n\n return numerals(value);\n }\n\n format.toString = function () {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}","export default function (grouping, thousands) {\n return function (value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}","export default function (numerals) {\n return function (value) {\n return value.replace(/[0-9]/g, function (i) {\n return numerals[+i];\n });\n };\n}","import React, { memo, useMemo, Fragment } from 'react';\nimport PropTypes from 'prop-types';\nimport { Motion, spring, TransitionMotion } from 'react-motion';\nimport { textPropsByEngine, useTheme, useMotionConfig } from '@nivo/core';\nimport isNumber from 'lodash/isNumber';\nimport { timeMillisecond, utcMillisecond, timeSecond, utcSecond, timeMinute, utcMinute, timeHour, utcHour, timeDay, utcDay, timeWeek, utcWeek, timeSunday, utcSunday, timeMonday, utcMonday, timeTuesday, utcTuesday, timeWednesday, utcWednesday, timeThursday, utcThursday, timeFriday, utcFriday, timeSaturday, utcSaturday, timeMonth, utcMonth, timeYear, utcYear } from 'd3-time';\nimport { timeFormat } from 'd3-time-format';\nimport { format } from 'd3-format';\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\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\nvar centerScale = function centerScale(scale) {\n var bandwidth = scale.bandwidth();\n if (bandwidth === 0) return scale;\n var offset = bandwidth / 2;\n\n if (scale.round()) {\n offset = Math.round(offset);\n }\n\n return function (d) {\n return scale(d) + offset;\n };\n};\n\nvar timeByType = {\n millisecond: [timeMillisecond, utcMillisecond],\n second: [timeSecond, utcSecond],\n minute: [timeMinute, utcMinute],\n hour: [timeHour, utcHour],\n day: [timeDay, utcDay],\n week: [timeWeek, utcWeek],\n sunday: [timeSunday, utcSunday],\n monday: [timeMonday, utcMonday],\n tuesday: [timeTuesday, utcTuesday],\n wednesday: [timeWednesday, utcWednesday],\n thursday: [timeThursday, utcThursday],\n friday: [timeFriday, utcFriday],\n saturday: [timeSaturday, utcSaturday],\n month: [timeMonth, utcMonth],\n year: [timeYear, utcYear]\n};\nvar timeTypes = Object.keys(timeByType);\nvar timeIntervalRegexp = new RegExp(\"^every\\\\s*(\\\\d+)?\\\\s*(\".concat(timeTypes.join('|'), \")s?$\"), 'i');\n\nvar getScaleTicks = function getScaleTicks(scale, spec) {\n if (Array.isArray(spec)) {\n return spec;\n }\n\n if (scale.ticks) {\n if (spec === undefined) {\n return scale.ticks();\n }\n\n if (isNumber(spec)) {\n return scale.ticks(spec);\n }\n\n if (typeof spec === 'string') {\n var matches = spec.match(timeIntervalRegexp);\n\n if (matches) {\n var timeType = timeByType[matches[2]][scale.useUTC ? 1 : 0];\n\n if (matches[1] === undefined) {\n return scale.ticks(timeType);\n }\n\n return scale.ticks(timeType.every(Number(matches[1])));\n }\n\n throw new Error(\"Invalid tickValues: \".concat(spec));\n }\n }\n\n return scale.domain();\n};\n\nvar computeCartesianTicks = function computeCartesianTicks(_ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n tickSize = _ref.tickSize,\n tickPadding = _ref.tickPadding,\n tickRotation = _ref.tickRotation,\n _ref$engine = _ref.engine,\n engine = _ref$engine === void 0 ? 'svg' : _ref$engine;\n var values = getScaleTicks(scale, tickValues);\n var textProps = textPropsByEngine[engine];\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var line = {\n lineX: 0,\n lineY: 0\n };\n var text = {\n textX: 0,\n textY: 0\n };\n var translate;\n var textAlign = textProps.align.center;\n var textBaseline = textProps.baseline.center;\n\n if (axis === 'x') {\n translate = function translate(d) {\n return {\n x: position(d),\n y: 0\n };\n };\n\n line.lineY = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textY = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n\n if (ticksPosition === 'after') {\n textBaseline = textProps.baseline.top;\n } else {\n textBaseline = textProps.baseline.bottom;\n }\n\n if (tickRotation === 0) {\n textAlign = textProps.align.center;\n } else if (ticksPosition === 'after' && tickRotation < 0 || ticksPosition === 'before' && tickRotation > 0) {\n textAlign = textProps.align.right;\n textBaseline = textProps.baseline.center;\n } else if (ticksPosition === 'after' && tickRotation > 0 || ticksPosition === 'before' && tickRotation < 0) {\n textAlign = textProps.align.left;\n textBaseline = textProps.baseline.center;\n }\n } else {\n translate = function translate(d) {\n return {\n x: 0,\n y: position(d)\n };\n };\n\n line.lineX = tickSize * (ticksPosition === 'after' ? 1 : -1);\n text.textX = (tickSize + tickPadding) * (ticksPosition === 'after' ? 1 : -1);\n\n if (ticksPosition === 'after') {\n textAlign = textProps.align.left;\n } else {\n textAlign = textProps.align.right;\n }\n }\n\n var ticks = values.map(function (value) {\n return _objectSpread({\n key: value,\n value: value\n }, translate(value), line, text);\n });\n return {\n ticks: ticks,\n textAlign: textAlign,\n textBaseline: textBaseline\n };\n};\n\nvar getFormatter = function getFormatter(format$1, scale) {\n if (!format$1 || typeof format$1 === 'function') return format$1;\n\n if (scale.type === 'time') {\n var f = timeFormat(format$1);\n return function (d) {\n return f(new Date(d));\n };\n }\n\n return format(format$1);\n};\n\nvar computeGridLines = function computeGridLines(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n scale = _ref2.scale,\n axis = _ref2.axis,\n _values = _ref2.values;\n var lineValues = Array.isArray(_values) ? _values : undefined;\n var lineCount = isNumber(_values) ? _values : undefined;\n var values = lineValues || getScaleTicks(scale, lineCount);\n var position = scale.bandwidth ? centerScale(scale) : scale;\n var lines;\n\n if (axis === 'x') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: position(v),\n x2: position(v),\n y1: 0,\n y2: height\n };\n });\n } else if (axis === 'y') {\n lines = values.map(function (v) {\n return {\n key: \"\".concat(v),\n x1: 0,\n x2: width,\n y1: position(v),\n y2: position(v)\n };\n });\n }\n\n return lines;\n};\n\nvar axisPropTypes = {\n ticksPosition: PropTypes.oneOf(['before', 'after']),\n tickValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.instanceOf(Date)])), PropTypes.string]),\n tickSize: PropTypes.number,\n tickPadding: PropTypes.number,\n tickRotation: PropTypes.number,\n format: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n renderTick: PropTypes.func,\n legend: PropTypes.node,\n legendPosition: PropTypes.oneOf(['start', 'middle', 'end']),\n legendOffset: PropTypes.number\n};\nvar axisPropType = PropTypes.shape(axisPropTypes);\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar AxisTick = function AxisTick(_ref) {\n var _value = _ref.value,\n x = _ref.x,\n y = _ref.y,\n opacity = _ref.opacity,\n rotate = _ref.rotate,\n format = _ref.format,\n lineX = _ref.lineX,\n lineY = _ref.lineY,\n _onClick = _ref.onClick,\n textX = _ref.textX,\n textY = _ref.textY,\n textBaseline = _ref.textBaseline,\n textAnchor = _ref.textAnchor;\n var theme = useTheme();\n var value = _value;\n\n if (format !== undefined) {\n value = format(value);\n }\n\n var gStyle = {\n opacity: opacity\n };\n\n if (_onClick) {\n gStyle['cursor'] = 'pointer';\n }\n\n return React.createElement(\"g\", _extends({\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, _onClick ? {\n onClick: function onClick(e) {\n return _onClick(e, value);\n }\n } : {}, {\n style: gStyle\n }), React.createElement(\"line\", {\n x1: 0,\n x2: lineX,\n y1: 0,\n y2: lineY,\n style: theme.axis.ticks.line\n }), React.createElement(\"text\", {\n dominantBaseline: textBaseline,\n textAnchor: textAnchor,\n transform: \"translate(\".concat(textX, \",\").concat(textY, \") rotate(\").concat(rotate, \")\"),\n style: theme.axis.ticks.text\n }, value));\n};\n\nAxisTick.defaultProps = {\n opacity: 1,\n rotate: 0\n};\nvar AxisTick$1 = memo(AxisTick);\n\nfunction _extends$1() {\n _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$1.apply(this, arguments);\n}\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$1(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$1(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\nvar willEnter = function willEnter() {\n return {\n rotate: 0,\n opacity: 0,\n x: 0,\n y: 0\n };\n};\n\nvar willLeave = function willLeave(springConfig) {\n return function (_ref) {\n var _ref$style = _ref.style,\n x = _ref$style.x,\n y = _ref$style.y,\n rotate = _ref$style.rotate;\n return {\n rotate: rotate,\n opacity: spring(0, springConfig),\n x: spring(x.val, springConfig),\n y: spring(y.val, springConfig)\n };\n };\n};\n\nvar defaultTickRenderer = function defaultTickRenderer(props) {\n return React.createElement(AxisTick$1, props);\n};\n\nvar Axis = function Axis(_ref2) {\n var axis = _ref2.axis,\n scale = _ref2.scale,\n x = _ref2.x,\n y = _ref2.y,\n length = _ref2.length,\n ticksPosition = _ref2.ticksPosition,\n tickValues = _ref2.tickValues,\n tickSize = _ref2.tickSize,\n tickPadding = _ref2.tickPadding,\n tickRotation = _ref2.tickRotation,\n format = _ref2.format,\n renderTick = _ref2.renderTick,\n legend = _ref2.legend,\n legendPosition = _ref2.legendPosition,\n legendOffset = _ref2.legendOffset,\n onClick = _ref2.onClick;\n var theme = useTheme();\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n\n var formatValue = useMemo(function () {\n return getFormatter(format, scale);\n }, [format, scale]);\n\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n\n var legendNode = null;\n\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n var textAnchor;\n\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n\n if (legendPosition === 'start') {\n textAnchor = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n }\n } else {\n legendY = legendOffset;\n\n if (legendPosition === 'start') {\n textAnchor = 'start';\n } else if (legendPosition === 'middle') {\n textAnchor = 'middle';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n textAnchor = 'end';\n legendX = length;\n }\n }\n\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendX, \", \").concat(legendY, \") rotate(\").concat(legendRotation, \")\"),\n textAnchor: textAnchor,\n style: _objectSpread$1({\n dominantBaseline: 'central'\n }, theme.axis.legend.text)\n }, legend);\n }\n\n if (animate !== true) {\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \",\").concat(y, \")\")\n }, ticks.map(function (tick, tickIndex) {\n return React.createElement(renderTick, _objectSpread$1({\n tickIndex: tickIndex,\n format: formatValue,\n rotate: tickRotation,\n textBaseline: textBaseline,\n textAnchor: textAlign\n }, tick, onClick ? {\n onClick: onClick\n } : {}));\n }), React.createElement(\"line\", {\n style: theme.axis.domain.line,\n x1: 0,\n x2: axis === 'x' ? length : 0,\n y1: 0,\n y2: axis === 'x' ? 0 : length\n }), legendNode);\n }\n\n return React.createElement(Motion, {\n style: {\n x: spring(x, springConfig),\n y: spring(y, springConfig)\n }\n }, function (xy) {\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(xy.x, \",\").concat(xy.y, \")\")\n }, React.createElement(TransitionMotion, {\n willEnter: willEnter,\n willLeave: willLeave(springConfig),\n styles: ticks.map(function (tick) {\n return {\n key: \"\".concat(tick.key),\n data: tick,\n style: {\n opacity: spring(1, springConfig),\n x: spring(tick.x, springConfig),\n y: spring(tick.y, springConfig),\n rotate: spring(tickRotation, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(Fragment, null, interpolatedStyles.map(function (_ref3, tickIndex) {\n var style = _ref3.style,\n tick = _ref3.data;\n return React.createElement(renderTick, _objectSpread$1({\n tickIndex: tickIndex,\n format: formatValue,\n textBaseline: textBaseline,\n textAnchor: textAlign\n }, tick, style, onClick ? {\n onClick: onClick\n } : {}));\n }));\n }), React.createElement(Motion, {\n style: {\n x2: spring(axis === 'x' ? length : 0, springConfig),\n y2: spring(axis === 'x' ? 0 : length, springConfig)\n }\n }, function (values) {\n return React.createElement(\"line\", _extends$1({\n style: theme.axis.domain.line,\n x1: 0,\n y1: 0\n }, values));\n }), legendNode);\n });\n};\n\nAxis.defaultProps = {\n x: 0,\n y: 0,\n tickSize: 5,\n tickPadding: 5,\n tickRotation: 0,\n renderTick: defaultTickRenderer,\n legendPosition: 'end',\n legendOffset: 0\n};\nvar Axis$1 = memo(Axis);\n\nfunction _extends$2() {\n _extends$2 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$2.apply(this, arguments);\n}\n\nvar positions = ['top', 'right', 'bottom', 'left'];\n\nvar Axes = function Axes(_ref) {\n var xScale = _ref.xScale,\n yScale = _ref.yScale,\n width = _ref.width,\n height = _ref.height,\n top = _ref.top,\n right = _ref.right,\n bottom = _ref.bottom,\n left = _ref.left;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n return positions.map(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n return React.createElement(Axis$1, _extends$2({\n key: position\n }, axis, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: isXAxis ? xScale : yScale,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition\n }));\n });\n};\n\nvar Axes$1 = memo(Axes);\n\nvar GridLine = function GridLine(props) {\n return React.createElement(\"line\", props);\n};\n\nGridLine.defaultProps = {\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 0\n};\nvar GridLine$1 = memo(GridLine);\n\nfunction _extends$3() {\n _extends$3 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$3.apply(this, arguments);\n}\n\nvar GridLines = function GridLines(_ref) {\n var type = _ref.type,\n lines = _ref.lines;\n var theme = useTheme();\n\n var _useMotionConfig = useMotionConfig(),\n animate = _useMotionConfig.animate,\n springConfig = _useMotionConfig.springConfig;\n\n var lineWillEnter = useMemo(function () {\n return function (_ref2) {\n var style = _ref2.style;\n return {\n opacity: 0,\n x1: type === 'x' ? 0 : style.x1.val,\n x2: type === 'x' ? 0 : style.x2.val,\n y1: type === 'y' ? 0 : style.y1.val,\n y2: type === 'y' ? 0 : style.y2.val\n };\n };\n }, [type]);\n var lineWillLeave = useMemo(function () {\n return function (_ref3) {\n var style = _ref3.style;\n return {\n opacity: spring(0, springConfig),\n x1: spring(style.x1.val, springConfig),\n x2: spring(style.x2.val, springConfig),\n y1: spring(style.y1.val, springConfig),\n y2: spring(style.y2.val, springConfig)\n };\n };\n }, [springConfig]);\n\n if (!animate) {\n return React.createElement(\"g\", null, lines.map(function (line) {\n return React.createElement(GridLine$1, _extends$3({\n key: line.key\n }, line, theme.grid.line));\n }));\n }\n\n return React.createElement(TransitionMotion, {\n willEnter: lineWillEnter,\n willLeave: lineWillLeave,\n styles: lines.map(function (line) {\n return {\n key: line.key,\n style: {\n opacity: spring(1, springConfig),\n x1: spring(line.x1 || 0, springConfig),\n x2: spring(line.x2 || 0, springConfig),\n y1: spring(line.y1 || 0, springConfig),\n y2: spring(line.y2 || 0, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"g\", null, interpolatedStyles.map(function (interpolatedStyle) {\n var key = interpolatedStyle.key,\n style = interpolatedStyle.style;\n return React.createElement(GridLine$1, _extends$3({\n key: key\n }, theme.grid.line, style));\n }));\n });\n};\n\nvar GridLines$1 = memo(GridLines);\n\nvar Grid = function Grid(_ref) {\n var width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale,\n xValues = _ref.xValues,\n yValues = _ref.yValues;\n var xLines = useMemo(function () {\n if (!xScale) return false;\n return computeGridLines({\n width: width,\n height: height,\n scale: xScale,\n axis: 'x',\n values: xValues\n });\n }, [xScale, xValues]);\n var yLines = yScale ? computeGridLines({\n width: width,\n height: height,\n scale: yScale,\n axis: 'y',\n values: yValues\n }) : false;\n return React.createElement(React.Fragment, null, xLines && React.createElement(GridLines$1, {\n type: \"x\",\n lines: xLines\n }), yLines && React.createElement(GridLines$1, {\n type: \"y\",\n lines: yLines\n }));\n};\n\nvar Grid$1 = memo(Grid);\n\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$2(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$2(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\nvar renderAxisToCanvas = function renderAxisToCanvas(ctx, _ref) {\n var axis = _ref.axis,\n scale = _ref.scale,\n _ref$x = _ref.x,\n x = _ref$x === void 0 ? 0 : _ref$x,\n _ref$y = _ref.y,\n y = _ref$y === void 0 ? 0 : _ref$y,\n length = _ref.length,\n ticksPosition = _ref.ticksPosition,\n tickValues = _ref.tickValues,\n _ref$tickSize = _ref.tickSize,\n tickSize = _ref$tickSize === void 0 ? 5 : _ref$tickSize,\n _ref$tickPadding = _ref.tickPadding,\n tickPadding = _ref$tickPadding === void 0 ? 5 : _ref$tickPadding,\n _ref$tickRotation = _ref.tickRotation,\n tickRotation = _ref$tickRotation === void 0 ? 0 : _ref$tickRotation,\n format = _ref.format,\n legend = _ref.legend,\n _ref$legendPosition = _ref.legendPosition,\n legendPosition = _ref$legendPosition === void 0 ? 'end' : _ref$legendPosition,\n _ref$legendOffset = _ref.legendOffset,\n legendOffset = _ref$legendOffset === void 0 ? 0 : _ref$legendOffset,\n theme = _ref.theme;\n\n var _computeCartesianTick = computeCartesianTicks({\n axis: axis,\n scale: scale,\n ticksPosition: ticksPosition,\n tickValues: tickValues,\n tickSize: tickSize,\n tickPadding: tickPadding,\n tickRotation: tickRotation,\n engine: 'canvas'\n }),\n ticks = _computeCartesianTick.ticks,\n textAlign = _computeCartesianTick.textAlign,\n textBaseline = _computeCartesianTick.textBaseline;\n\n ctx.save();\n ctx.translate(x, y);\n ctx.textAlign = textAlign;\n ctx.textBaseline = textBaseline;\n ctx.font = \"\".concat(theme.axis.ticks.text.fontSize, \"px \").concat(theme.axis.ticks.text.fontFamily);\n\n if (theme.axis.domain.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.domain.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.domain.line.stroke;\n ctx.beginPath();\n ctx.moveTo(0, 0);\n ctx.lineTo(axis === 'x' ? length : 0, axis === 'x' ? 0 : length);\n ctx.stroke();\n }\n\n ticks.forEach(function (tick) {\n if (theme.axis.ticks.line.strokeWidth > 0) {\n ctx.lineWidth = theme.axis.ticks.line.strokeWidth;\n ctx.lineCap = 'square';\n ctx.strokeStyle = theme.axis.ticks.line.stroke;\n ctx.beginPath();\n ctx.moveTo(tick.x, tick.y);\n ctx.lineTo(tick.x + tick.lineX, tick.y + tick.lineY);\n ctx.stroke();\n }\n\n var value = format !== undefined ? format(tick.value) : tick.value;\n ctx.save();\n ctx.translate(tick.x + tick.textX, tick.y + tick.textY);\n ctx.rotate(degreesToRadians(tickRotation));\n ctx.fillStyle = theme.axis.ticks.text.fill;\n ctx.fillText(value, 0, 0);\n ctx.restore();\n });\n\n if (legend !== undefined) {\n var legendX = 0;\n var legendY = 0;\n var legendRotation = 0;\n\n var _textAlign;\n\n if (axis === 'y') {\n legendRotation = -90;\n legendX = legendOffset;\n\n if (legendPosition === 'start') {\n _textAlign = 'start';\n legendY = length;\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendY = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n }\n } else {\n legendY = legendOffset;\n\n if (legendPosition === 'start') {\n _textAlign = 'start';\n } else if (legendPosition === 'middle') {\n _textAlign = 'center';\n legendX = length / 2;\n } else if (legendPosition === 'end') {\n _textAlign = 'end';\n legendX = length;\n }\n }\n\n ctx.translate(legendX, legendY);\n ctx.rotate(degreesToRadians(legendRotation));\n ctx.font = \"\".concat(theme.axis.legend.text.fontWeight ? \"\".concat(theme.axis.legend.text.fontWeight, \" \") : '').concat(theme.axis.legend.text.fontSize, \"px \").concat(theme.axis.legend.text.fontFamily);\n ctx.fillStyle = theme.axis.legend.text.fill;\n ctx.textAlign = _textAlign;\n ctx.textBaseline = 'middle';\n ctx.fillText(legend, 0, 0);\n }\n\n ctx.restore();\n};\n\nvar positions$1 = ['top', 'right', 'bottom', 'left'];\n\nvar renderAxesToCanvas = function renderAxesToCanvas(ctx, _ref2) {\n var xScale = _ref2.xScale,\n yScale = _ref2.yScale,\n width = _ref2.width,\n height = _ref2.height,\n top = _ref2.top,\n right = _ref2.right,\n bottom = _ref2.bottom,\n left = _ref2.left,\n theme = _ref2.theme;\n var axes = {\n top: top,\n right: right,\n bottom: bottom,\n left: left\n };\n positions$1.forEach(function (position) {\n var axis = axes[position];\n if (!axis) return null;\n var isXAxis = position === 'top' || position === 'bottom';\n var ticksPosition = position === 'top' || position === 'left' ? 'before' : 'after';\n var scale = isXAxis ? xScale : yScale;\n var format = getFormatter(axis.format, scale);\n renderAxisToCanvas(ctx, _objectSpread$2({}, axis, {\n axis: isXAxis ? 'x' : 'y',\n x: position === 'right' ? width : 0,\n y: position === 'bottom' ? height : 0,\n scale: scale,\n format: format,\n length: isXAxis ? width : height,\n ticksPosition: ticksPosition,\n theme: theme\n }));\n });\n};\n\nvar renderGridLinesToCanvas = function renderGridLinesToCanvas(ctx, _ref3) {\n var width = _ref3.width,\n height = _ref3.height,\n scale = _ref3.scale,\n axis = _ref3.axis,\n values = _ref3.values;\n var lines = computeGridLines({\n width: width,\n height: height,\n scale: scale,\n axis: axis,\n values: values\n });\n lines.forEach(function (line) {\n ctx.beginPath();\n ctx.moveTo(line.x1, line.y1);\n ctx.lineTo(line.x2, line.y2);\n ctx.stroke();\n });\n};\n\nexport { Axes$1 as Axes, Axis$1 as Axis, Grid$1 as Grid, axisPropType, axisPropTypes, renderAxesToCanvas, renderAxisToCanvas, renderGridLinesToCanvas };","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","var createCtor = require('./_createCtor'),\n root = require('./_root');\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1;\n\n/**\n * Creates a function that wraps `func` to invoke it with the optional `this`\n * binding of `thisArg`.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {number} bitmask The bitmask flags. See `createWrap` for more details.\n * @param {*} [thisArg] The `this` binding of `func`.\n * @returns {Function} Returns the new wrapped function.\n */\nfunction createBind(func, bitmask, thisArg) {\n var isBind = bitmask & WRAP_BIND_FLAG,\n Ctor = createCtor(func);\n\n function wrapper() {\n var fn = (this && this !== root && this instanceof wrapper) ? Ctor : func;\n return fn.apply(isBind ? thisArg : this, arguments);\n }\n return wrapper;\n}\n\nmodule.exports = createBind;\n","/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\nmodule.exports = safeGet;\n","function _point(that, x, y) {\n that._context.bezierCurveTo((2 * that._x0 + that._x1) / 3, (2 * that._y0 + that._y1) / 3, (that._x0 + 2 * that._x1) / 3, (that._y0 + 2 * that._y1) / 3, (that._x0 + 4 * that._x1 + x) / 6, (that._y0 + 4 * that._y1 + y) / 6);\n}\n\nexport { _point as point };\nexport function Basis(context) {\n this._context = context;\n}\nBasis.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 3:\n _point(this, this._x1, this._y1);\n\n // proceed\n\n case 2:\n this._context.lineTo(this._x1, this._y1);\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n\n this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6);\n\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new Basis(context);\n}","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1,\n t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n var n = values.length - 1;\n return function (t) {\n var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, { gamma } from \"./color.js\";\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function (t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function (colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i,\n color;\n\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function (t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);","import { basis } from \"./basis.js\";\nexport default function (values) {\n var n = values.length;\n return function (t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","import { interpolateRgbBasis } from \"d3-interpolate\";\nexport default function (scheme) {\n return interpolateRgbBasis(scheme[scheme.length - 1]);\n}","/**\n * The base implementation of `_.lt` which doesn't coerce arguments.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if `value` is less than `other`,\n * else `false`.\n */\nfunction baseLt(value, other) {\n return value < other;\n}\n\nmodule.exports = baseLt;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ffeda0feb24cf03b20\", \"ffffb2fecc5cfd8d3ce31a1c\", \"ffffb2fecc5cfd8d3cf03b20bd0026\", \"ffffb2fed976feb24cfd8d3cf03b20bd0026\", \"ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026\", \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026\", \"ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026\").map(colors);\nexport default ramp(scheme);","var baseIndexOf = require('./_baseIndexOf');\n\n/**\n * A specialized version of `_.includes` for arrays without support for\n * specifying an index to search from.\n *\n * @private\n * @param {Array} [array] The array to inspect.\n * @param {*} target The value to search for.\n * @returns {boolean} Returns `true` if `target` is found, else `false`.\n */\nfunction arrayIncludes(array, value) {\n var length = array == null ? 0 : array.length;\n return !!length && baseIndexOf(array, value, 0) > -1;\n}\n\nmodule.exports = arrayIncludes;\n","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\nmodule.exports = toPlainObject;\n","var assignValue = require('./_assignValue'),\n baseAssignValue = require('./_baseAssignValue');\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\nmodule.exports = copyObject;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var arrayFilter = require('./_arrayFilter'),\n baseFilter = require('./_baseFilter'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Iterates over elements of `collection`, returning an array of all elements\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * **Note:** Unlike `_.remove`, this method returns a new array.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n * @see _.reject\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * _.filter(users, function(o) { return !o.active; });\n * // => objects for ['fred']\n *\n * // The `_.matches` iteratee shorthand.\n * _.filter(users, { 'age': 36, 'active': true });\n * // => objects for ['barney']\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.filter(users, ['active', false]);\n * // => objects for ['fred']\n *\n * // The `_.property` iteratee shorthand.\n * _.filter(users, 'active');\n * // => objects for ['barney']\n */\nfunction filter(collection, predicate) {\n var func = isArray(collection) ? arrayFilter : baseFilter;\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = filter;\n","// usage assumption: currentStyle values have already been rendered but it says\n// nothing of whether currentStyle is stale (see unreadPropStyle)\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = shouldStopAnimation;\n\nfunction shouldStopAnimation(currentStyle, style, currentVelocity) {\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n\n if (currentVelocity[key] !== 0) {\n return false;\n }\n\n var styleValue = typeof style[key] === 'number' ? style[key] : style[key].val; // stepper will have already taken care of rounding precision errors, so\n // won't have such thing as 0.9999 !=== 1\n\n if (currentStyle[key] !== styleValue) {\n return false;\n }\n }\n\n return true;\n}\n\nmodule.exports = exports['default'];","import \"core-js/modules/es.array.reduce.js\";\nimport React, { Fragment, Component } from 'react';\nimport { TransitionMotion, spring } from 'react-motion';\nimport { defsPropTypes, noop, withTheme, withDimensions, withMotion, getAccessorFor, getLabelGenerator, bindDefs, Container, CartesianMarkers, SvgWrapper, getRelativeCursor, isCursorInRect, ResponsiveWrapper } from '@nivo/core';\nimport { axisPropType, Grid, Axes, renderGridLinesToCanvas, renderAxesToCanvas } from '@nivo/axes';\nimport { LegendPropShape, BoxLegendSvg, renderLegendToCanvas } from '@nivo/legends';\nimport min from 'lodash/min';\nimport max from 'lodash/max';\nimport range from 'lodash/range';\nimport { scaleBand, scaleLinear } from 'd3-scale';\nimport flattenDepth from 'lodash/flattenDepth';\nimport { stack, stackOffsetDiverging } from 'd3-shape';\nimport _uniqBy from 'lodash/uniqBy';\nimport setDisplayName from 'recompose/setDisplayName';\nimport compose from 'recompose/compose';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport pure from 'recompose/pure';\nimport { inheritedColorPropType, ordinalColorsPropType, colorPropertyAccessorPropType, getOrdinalColorScale, getInheritedColorGenerator } from '@nivo/colors';\nimport PropTypes from 'prop-types';\nimport { BasicTooltip } from '@nivo/tooltip';\nimport { useAnnotations, Annotation } from '@nivo/annotations';\n\nvar getIndexedScale = function getIndexedScale(data, getIndex, range, padding) {\n return scaleBand().rangeRound(range).domain(data.map(getIndex)).padding(padding);\n};\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar getGroupedScale = function getGroupedScale(data, keys, _minValue, _maxValue, range) {\n var allValues = data.reduce(function (acc, entry) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(keys.map(function (k) {\n return entry[k];\n })));\n }, []);\n var maxValue = _maxValue;\n\n if (maxValue === 'auto') {\n maxValue = max(allValues);\n }\n\n var minValue = _minValue;\n\n if (minValue === 'auto') {\n minValue = min(allValues);\n if (minValue > 0) minValue = 0;\n }\n\n return scaleLinear().rangeRound(range).domain([minValue, maxValue]);\n};\n\nvar generateVerticalGroupedBars = function generateVerticalGroupedBars(_ref) {\n var data = _ref.data,\n getIndex = _ref.getIndex,\n keys = _ref.keys,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n reverse = _ref.reverse,\n width = _ref.width,\n height = _ref.height,\n getColor = _ref.getColor,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? 0 : _ref$padding,\n _ref$innerPadding = _ref.innerPadding,\n innerPadding = _ref$innerPadding === void 0 ? 0 : _ref$innerPadding;\n var xScale = getIndexedScale(data, getIndex, [0, width], padding);\n var yRange = reverse ? [0, height] : [height, 0];\n var yScale = getGroupedScale(data, keys, minValue, maxValue, yRange);\n var barWidth = (xScale.bandwidth() - innerPadding * (keys.length - 1)) / keys.length;\n var yRef = yScale(0);\n\n var getY = function getY(d) {\n return d > 0 ? yScale(d) : yRef;\n };\n\n var getHeight = function getHeight(d, y) {\n return d > 0 ? yRef - y : yScale(d) - yRef;\n };\n\n if (reverse) {\n getY = function getY(d) {\n return d < 0 ? yScale(d) : yRef;\n };\n\n getHeight = function getHeight(d, y) {\n return d < 0 ? yRef - y : yScale(d) - yRef;\n };\n }\n\n var bars = [];\n\n if (barWidth > 0) {\n keys.forEach(function (key, i) {\n range(xScale.domain().length).forEach(function (index) {\n var x = xScale(getIndex(data[index])) + barWidth * i + innerPadding * i;\n var y = getY(data[index][key]);\n var barHeight = getHeight(data[index][key], y);\n\n if (barWidth > 0 && barHeight > 0) {\n var barData = {\n id: key,\n value: data[index][key],\n index: index,\n indexValue: getIndex(data[index]),\n data: data[index]\n };\n bars.push({\n key: \"\".concat(key, \".\").concat(barData.indexValue),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\n\nvar generateHorizontalGroupedBars = function generateHorizontalGroupedBars(_ref2) {\n var data = _ref2.data,\n getIndex = _ref2.getIndex,\n keys = _ref2.keys,\n minValue = _ref2.minValue,\n maxValue = _ref2.maxValue,\n reverse = _ref2.reverse,\n width = _ref2.width,\n height = _ref2.height,\n getColor = _ref2.getColor,\n _ref2$padding = _ref2.padding,\n padding = _ref2$padding === void 0 ? 0 : _ref2$padding,\n _ref2$innerPadding = _ref2.innerPadding,\n innerPadding = _ref2$innerPadding === void 0 ? 0 : _ref2$innerPadding;\n var xRange = reverse ? [width, 0] : [0, width];\n var xScale = getGroupedScale(data, keys, minValue, maxValue, xRange);\n var yScale = getIndexedScale(data, getIndex, [height, 0], padding);\n var barHeight = (yScale.bandwidth() - innerPadding * (keys.length - 1)) / keys.length;\n var xRef = xScale(0);\n\n var getX = function getX(d) {\n return d > 0 ? xRef : xScale(d);\n };\n\n var getWidth = function getWidth(d, x) {\n return d > 0 ? xScale(d) - xRef : xRef - x;\n };\n\n if (reverse) {\n getX = function getX(d) {\n return d < 0 ? xRef : xScale(d);\n };\n\n getWidth = function getWidth(d, x) {\n return d < 0 ? xScale(d) - xRef : xRef - x;\n };\n }\n\n var bars = [];\n\n if (barHeight > 0) {\n keys.forEach(function (key, i) {\n range(yScale.domain().length).forEach(function (index) {\n var x = getX(data[index][key]);\n var y = yScale(getIndex(data[index])) + barHeight * i + innerPadding * i;\n var barWidth = getWidth(data[index][key], x);\n\n if (barWidth > 0) {\n var barData = {\n id: key,\n value: data[index][key],\n index: index,\n indexValue: getIndex(data[index]),\n data: data[index]\n };\n bars.push({\n key: \"\".concat(key, \".\").concat(barData.indexValue),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\n\nvar generateGroupedBars = function generateGroupedBars(options) {\n return options.layout === 'vertical' ? generateVerticalGroupedBars(options) : generateHorizontalGroupedBars(options);\n};\n\nvar getStackedScale = function getStackedScale(data, _minValue, _maxValue, range) {\n var allValues = flattenDepth(data, 2);\n var minValue = _minValue;\n\n if (minValue === 'auto') {\n minValue = min(allValues);\n }\n\n var maxValue = _maxValue;\n\n if (maxValue === 'auto') {\n maxValue = max(allValues);\n }\n\n return scaleLinear().rangeRound(range).domain([minValue, maxValue]);\n};\n\nvar generateVerticalStackedBars = function generateVerticalStackedBars(_ref) {\n var data = _ref.data,\n getIndex = _ref.getIndex,\n keys = _ref.keys,\n minValue = _ref.minValue,\n maxValue = _ref.maxValue,\n reverse = _ref.reverse,\n width = _ref.width,\n height = _ref.height,\n getColor = _ref.getColor,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? 0 : _ref$padding,\n _ref$innerPadding = _ref.innerPadding,\n innerPadding = _ref$innerPadding === void 0 ? 0 : _ref$innerPadding;\n var stackedData = stack().keys(keys).offset(stackOffsetDiverging)(data);\n var xScale = getIndexedScale(data, getIndex, [0, width], padding);\n var yRange = reverse ? [0, height] : [height, 0];\n var yScale = getStackedScale(stackedData, minValue, maxValue, yRange);\n var bars = [];\n var barWidth = xScale.bandwidth();\n\n var getY = function getY(d) {\n return yScale(d[1]);\n };\n\n var getHeight = function getHeight(d, y) {\n return yScale(d[0]) - y;\n };\n\n if (reverse) {\n getY = function getY(d) {\n return yScale(d[0]);\n };\n\n getHeight = function getHeight(d, y) {\n return yScale(d[1]) - y;\n };\n }\n\n if (barWidth > 0) {\n stackedData.forEach(function (stackedDataItem) {\n xScale.domain().forEach(function (index, i) {\n var d = stackedDataItem[i];\n var x = xScale(getIndex(d.data));\n var y = getY(d);\n var barHeight = getHeight(d, y);\n\n if (innerPadding > 0) {\n y += innerPadding * 0.5;\n barHeight -= innerPadding;\n }\n\n if (barHeight > 0) {\n var barData = {\n id: stackedDataItem.key,\n value: d.data[stackedDataItem.key],\n index: i,\n indexValue: index,\n data: d.data\n };\n bars.push({\n key: \"\".concat(stackedDataItem.key, \".\").concat(index),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\n\nvar generateHorizontalStackedBars = function generateHorizontalStackedBars(_ref2) {\n var data = _ref2.data,\n getIndex = _ref2.getIndex,\n keys = _ref2.keys,\n minValue = _ref2.minValue,\n maxValue = _ref2.maxValue,\n reverse = _ref2.reverse,\n width = _ref2.width,\n height = _ref2.height,\n getColor = _ref2.getColor,\n _ref2$padding = _ref2.padding,\n padding = _ref2$padding === void 0 ? 0 : _ref2$padding,\n _ref2$innerPadding = _ref2.innerPadding,\n innerPadding = _ref2$innerPadding === void 0 ? 0 : _ref2$innerPadding;\n var stackedData = stack().keys(keys).offset(stackOffsetDiverging)(data);\n var xRange = reverse ? [width, 0] : [0, width];\n var xScale = getStackedScale(stackedData, minValue, maxValue, xRange);\n var yScale = getIndexedScale(data, getIndex, [height, 0], padding);\n var bars = [];\n var barHeight = yScale.bandwidth();\n\n var getX = function getX(d) {\n return xScale(d[0]);\n };\n\n var getWidth = function getWidth(d, x) {\n return xScale(d[1]) - x;\n };\n\n if (reverse) {\n getX = function getX(d) {\n return xScale(d[1]);\n };\n\n getWidth = function getWidth(d, y) {\n return xScale(d[0]) - y;\n };\n }\n\n if (barHeight > 0) {\n stackedData.forEach(function (stackedDataItem) {\n yScale.domain().forEach(function (index, i) {\n var d = stackedDataItem[i];\n var y = yScale(getIndex(d.data));\n var barData = {\n id: stackedDataItem.key,\n value: d.data[stackedDataItem.key],\n index: i,\n indexValue: index,\n data: d.data\n };\n var x = getX(d);\n var barWidth = getWidth(d, x);\n\n if (innerPadding > 0) {\n x += innerPadding * 0.5;\n barWidth -= innerPadding;\n }\n\n if (barWidth > 0) {\n bars.push({\n key: \"\".concat(stackedDataItem.key, \".\").concat(index),\n data: barData,\n x: x,\n y: y,\n width: barWidth,\n height: barHeight,\n color: getColor(barData)\n });\n }\n });\n });\n }\n\n return {\n xScale: xScale,\n yScale: yScale,\n bars: bars\n };\n};\n\nvar generateStackedBars = function generateStackedBars(options) {\n return options.layout === 'vertical' ? generateVerticalStackedBars(options) : generateHorizontalStackedBars(options);\n};\n\nvar getLegendDataForKeys = function getLegendDataForKeys(bars, layout, direction, groupMode, reverse) {\n var data = _uniqBy(bars.map(function (bar) {\n return {\n id: bar.data.id,\n label: bar.data.id,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref) {\n var id = _ref.id;\n return id;\n });\n\n if (layout === 'vertical' && groupMode === 'stacked' && direction === 'column' && reverse !== true || layout === 'horizontal' && groupMode === 'stacked' && reverse === true) {\n data.reverse();\n }\n\n return data;\n};\n\nvar getLegendDataForIndexes = function getLegendDataForIndexes(bars) {\n return _uniqBy(bars.map(function (bar) {\n return {\n id: bar.data.indexValue,\n label: bar.data.indexValue,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref2) {\n var id = _ref2.id;\n return id;\n });\n};\n\nvar getLegendData = function getLegendData(_ref3) {\n var from = _ref3.from,\n bars = _ref3.bars,\n layout = _ref3.layout,\n direction = _ref3.direction,\n groupMode = _ref3.groupMode,\n reverse = _ref3.reverse;\n\n if (from === 'indexes') {\n return getLegendDataForIndexes(bars);\n }\n\n return getLegendDataForKeys(bars, layout, direction, groupMode, reverse);\n};\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\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\nvar BarItem = function BarItem(_ref) {\n var data = _ref.data,\n x = _ref.x,\n y = _ref.y,\n width = _ref.width,\n height = _ref.height,\n borderRadius = _ref.borderRadius,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n label = _ref.label,\n shouldRenderLabel = _ref.shouldRenderLabel,\n labelColor = _ref.labelColor,\n showTooltip = _ref.showTooltip,\n hideTooltip = _ref.hideTooltip,\n onClick = _ref.onClick,\n onMouseEnter = _ref.onMouseEnter,\n onMouseLeave = _ref.onMouseLeave,\n tooltip = _ref.tooltip,\n theme = _ref.theme;\n\n var handleTooltip = function handleTooltip(e) {\n return showTooltip(tooltip, e);\n };\n\n var handleMouseEnter = function handleMouseEnter(e) {\n onMouseEnter(data, e);\n showTooltip(tooltip, e);\n };\n\n var handleMouseLeave = function handleMouseLeave(e) {\n onMouseLeave(data, e);\n hideTooltip(e);\n };\n\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\")\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n rx: borderRadius,\n ry: borderRadius,\n fill: data.fill ? data.fill : color,\n strokeWidth: borderWidth,\n stroke: borderColor,\n onMouseEnter: handleMouseEnter,\n onMouseMove: handleTooltip,\n onMouseLeave: handleMouseLeave,\n onClick: onClick\n }), shouldRenderLabel && React.createElement(\"text\", {\n x: width / 2,\n y: height / 2,\n textAnchor: \"middle\",\n dominantBaseline: \"central\",\n style: _objectSpread({}, theme.labels.text, {\n pointerEvents: 'none',\n fill: labelColor\n })\n }, label));\n};\n\nvar enhance = compose(withPropsOnChange(['data', 'color', 'onClick'], function (_ref2) {\n var data = _ref2.data,\n color = _ref2.color,\n _onClick = _ref2.onClick;\n return {\n onClick: function onClick(event) {\n return _onClick(_objectSpread({\n color: color\n }, data), event);\n }\n };\n}), withPropsOnChange(['data', 'color', 'theme', 'tooltip', 'getTooltipLabel', 'tooltipFormat'], function (_ref3) {\n var data = _ref3.data,\n color = _ref3.color,\n theme = _ref3.theme,\n tooltip = _ref3.tooltip,\n getTooltipLabel = _ref3.getTooltipLabel,\n tooltipFormat = _ref3.tooltipFormat;\n return {\n tooltip: React.createElement(BasicTooltip, {\n id: getTooltipLabel(data),\n value: data.value,\n enableChip: true,\n color: color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread({\n color: color,\n theme: theme\n }, data)) : null\n })\n };\n}), pure);\nvar BarItem$1 = enhance(BarItem);\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$1(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$1(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\nvar BarPropTypes = _objectSpread$1({\n data: PropTypes.arrayOf(PropTypes.object).isRequired,\n indexBy: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n getIndex: PropTypes.func.isRequired,\n keys: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])).isRequired,\n layers: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['grid', 'axes', 'bars', 'markers', 'legends', 'annotations']), PropTypes.func])).isRequired,\n groupMode: PropTypes.oneOf(['stacked', 'grouped']).isRequired,\n layout: PropTypes.oneOf(['horizontal', 'vertical']).isRequired,\n reverse: PropTypes.bool.isRequired,\n minValue: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]).isRequired,\n maxValue: PropTypes.oneOfType([PropTypes.number, PropTypes.oneOf(['auto'])]).isRequired,\n padding: PropTypes.number.isRequired,\n innerPadding: PropTypes.number.isRequired,\n axisTop: axisPropType,\n axisRight: axisPropType,\n axisBottom: axisPropType,\n axisLeft: axisPropType,\n enableGridX: PropTypes.bool.isRequired,\n enableGridY: PropTypes.bool.isRequired,\n gridXValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))]),\n gridYValues: PropTypes.oneOfType([PropTypes.number, PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.number, PropTypes.string]))]),\n barComponent: PropTypes.func.isRequired,\n enableLabel: PropTypes.bool.isRequired,\n label: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired,\n labelFormat: PropTypes.oneOfType([PropTypes.string, PropTypes.func]),\n getLabel: PropTypes.func.isRequired,\n labelSkipWidth: PropTypes.number.isRequired,\n labelSkipHeight: PropTypes.number.isRequired,\n labelTextColor: inheritedColorPropType.isRequired,\n getLabelTextColor: PropTypes.func.isRequired,\n labelLinkColor: inheritedColorPropType.isRequired,\n getLabelLinkColor: PropTypes.func.isRequired,\n colors: ordinalColorsPropType.isRequired,\n colorBy: colorPropertyAccessorPropType.isRequired,\n borderRadius: PropTypes.number.isRequired,\n getColor: PropTypes.func.isRequired\n}, defsPropTypes, {\n borderWidth: PropTypes.number.isRequired,\n borderColor: inheritedColorPropType.isRequired,\n getBorderColor: PropTypes.func.isRequired,\n isInteractive: PropTypes.bool,\n onClick: PropTypes.func.isRequired,\n onMouseEnter: PropTypes.func.isRequired,\n onMouseLeave: PropTypes.func.isRequired,\n tooltipLabel: PropTypes.func,\n getTooltipLabel: PropTypes.func.isRequired,\n tooltipFormat: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),\n tooltip: PropTypes.func,\n legends: PropTypes.arrayOf(PropTypes.shape(_objectSpread$1({\n dataFrom: PropTypes.oneOf(['indexes', 'keys']).isRequired\n }, LegendPropShape))).isRequired,\n pixelRatio: PropTypes.number.isRequired\n});\n\nvar BarDefaultProps = {\n indexBy: 'id',\n keys: ['value'],\n layers: ['grid', 'axes', 'bars', 'markers', 'legends', 'annotations'],\n groupMode: 'stacked',\n layout: 'vertical',\n reverse: false,\n minValue: 'auto',\n maxValue: 'auto',\n padding: 0.1,\n innerPadding: 0,\n axisBottom: {},\n axisLeft: {},\n enableGridX: false,\n enableGridY: true,\n barComponent: BarItem$1,\n enableLabel: true,\n label: 'value',\n labelSkipWidth: 0,\n labelSkipHeight: 0,\n labelLinkColor: 'theme',\n labelTextColor: 'theme',\n colors: {\n scheme: 'nivo'\n },\n colorBy: 'id',\n defs: [],\n fill: [],\n borderRadius: 0,\n borderWidth: 0,\n borderColor: {\n from: 'color'\n },\n isInteractive: true,\n onClick: noop,\n onMouseEnter: noop,\n onMouseLeave: noop,\n legends: [],\n annotations: [],\n pixelRatio: global.window && global.window.devicePixelRatio ? global.window.devicePixelRatio : 1\n};\n\nvar enhance$1 = function enhance$1(Component) {\n return compose(defaultProps(BarDefaultProps), withTheme(), withDimensions(), withMotion(), withPropsOnChange(['colors', 'colorBy'], function (_ref) {\n var colors = _ref.colors,\n colorBy = _ref.colorBy;\n return {\n getColor: getOrdinalColorScale(colors, colorBy)\n };\n }), withPropsOnChange(['indexBy'], function (_ref2) {\n var indexBy = _ref2.indexBy;\n return {\n getIndex: getAccessorFor(indexBy)\n };\n }), withPropsOnChange(['labelTextColor', 'theme'], function (_ref3) {\n var labelTextColor = _ref3.labelTextColor,\n theme = _ref3.theme;\n return {\n getLabelTextColor: getInheritedColorGenerator(labelTextColor, theme)\n };\n }), withPropsOnChange(['labelLinkColor', 'theme'], function (_ref4) {\n var labelLinkColor = _ref4.labelLinkColor,\n theme = _ref4.theme;\n return {\n getLabelLinkColor: getInheritedColorGenerator(labelLinkColor, theme)\n };\n }), withPropsOnChange(['label', 'labelFormat'], function (_ref5) {\n var label = _ref5.label,\n labelFormat = _ref5.labelFormat;\n return {\n getLabel: getLabelGenerator(label, labelFormat)\n };\n }), withPropsOnChange(['borderColor', 'theme'], function (_ref6) {\n var borderColor = _ref6.borderColor,\n theme = _ref6.theme;\n return {\n getBorderColor: getInheritedColorGenerator(borderColor, theme)\n };\n }), withPropsOnChange(['tooltipLabel'], function (_ref7) {\n var tooltipLabel = _ref7.tooltipLabel;\n\n var getTooltipLabel = function getTooltipLabel(d) {\n return \"\".concat(d.id, \" - \").concat(d.indexValue);\n };\n\n if (typeof tooltipLabel === 'function') {\n getTooltipLabel = tooltipLabel;\n }\n\n return {\n getTooltipLabel: getTooltipLabel\n };\n }), pure)(Component);\n};\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar BarAnnotations = function BarAnnotations(_ref) {\n var bars = _ref.bars,\n annotations = _ref.annotations,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var boundAnnotations = useAnnotations({\n items: bars,\n annotations: annotations,\n getPosition: function getPosition(bar) {\n return {\n x: bar.x + bar.width / 2,\n y: bar.y + bar.height / 2\n };\n },\n getDimensions: function getDimensions(bar, offset) {\n var width = bar.width + offset * 2;\n var height = bar.height + offset * 2;\n return {\n width: width,\n height: height,\n size: Math.max(width, height)\n };\n }\n });\n return boundAnnotations.map(function (annotation, i) {\n return React.createElement(Annotation, _extends({\n key: i\n }, annotation, {\n containerWidth: innerWidth,\n containerHeight: innerHeight,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }));\n });\n};\n\nfunction _extends$1() {\n _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$1.apply(this, arguments);\n}\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$2(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$2(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\nvar barWillEnterHorizontal = function barWillEnterHorizontal(_ref) {\n var style = _ref.style;\n return {\n x: style.x.val,\n y: style.y.val,\n width: 0,\n height: style.height.val\n };\n};\n\nvar barWillEnterVertical = function barWillEnterVertical(_ref2) {\n var style = _ref2.style;\n return {\n x: style.x.val,\n y: style.y.val + style.height.val,\n width: style.width.val,\n height: 0\n };\n};\n\nvar barWillLeaveHorizontal = function barWillLeaveHorizontal(springConfig) {\n return function (_ref3) {\n var style = _ref3.style;\n return {\n x: style.x,\n y: style.y,\n width: spring(0, springConfig),\n height: style.height\n };\n };\n};\n\nvar barWillLeaveVertical = function barWillLeaveVertical(springConfig) {\n return function (_ref4) {\n var style = _ref4.style;\n return {\n x: style.x,\n y: spring(style.y.val + style.height.val, springConfig),\n width: style.width,\n height: spring(0, springConfig)\n };\n };\n};\n\nvar Bar = function Bar(props) {\n var data = props.data,\n getIndex = props.getIndex,\n keys = props.keys,\n groupMode = props.groupMode,\n layout = props.layout,\n reverse = props.reverse,\n minValue = props.minValue,\n maxValue = props.maxValue,\n margin = props.margin,\n width = props.width,\n height = props.height,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n padding = props.padding,\n innerPadding = props.innerPadding,\n axisTop = props.axisTop,\n axisRight = props.axisRight,\n axisBottom = props.axisBottom,\n axisLeft = props.axisLeft,\n enableGridX = props.enableGridX,\n enableGridY = props.enableGridY,\n gridXValues = props.gridXValues,\n gridYValues = props.gridYValues,\n layers = props.layers,\n barComponent = props.barComponent,\n enableLabel = props.enableLabel,\n getLabel = props.getLabel,\n labelSkipWidth = props.labelSkipWidth,\n labelSkipHeight = props.labelSkipHeight,\n getLabelTextColor = props.getLabelTextColor,\n markers = props.markers,\n theme = props.theme,\n getColor = props.getColor,\n defs = props.defs,\n fill = props.fill,\n borderRadius = props.borderRadius,\n borderWidth = props.borderWidth,\n getBorderColor = props.getBorderColor,\n annotations = props.annotations,\n isInteractive = props.isInteractive,\n getTooltipLabel = props.getTooltipLabel,\n tooltipFormat = props.tooltipFormat,\n tooltip = props.tooltip,\n onClick = props.onClick,\n onMouseEnter = props.onMouseEnter,\n onMouseLeave = props.onMouseLeave,\n legends = props.legends,\n animate = props.animate,\n motionStiffness = props.motionStiffness,\n motionDamping = props.motionDamping;\n var options = {\n layout: layout,\n reverse: reverse,\n data: data,\n getIndex: getIndex,\n keys: keys,\n minValue: minValue,\n maxValue: maxValue,\n width: width,\n height: height,\n getColor: getColor,\n padding: padding,\n innerPadding: innerPadding\n };\n var result = groupMode === 'grouped' ? generateGroupedBars(options) : generateStackedBars(options);\n var motionProps = {\n animate: animate,\n motionDamping: motionDamping,\n motionStiffness: motionStiffness\n };\n var springConfig = {\n damping: motionDamping,\n stiffness: motionStiffness\n };\n var willEnter = layout === 'vertical' ? barWillEnterVertical : barWillEnterHorizontal;\n var willLeave = layout === 'vertical' ? barWillLeaveVertical(springConfig) : barWillLeaveHorizontal(springConfig);\n\n var shouldRenderLabel = function shouldRenderLabel(_ref5) {\n var width = _ref5.width,\n height = _ref5.height;\n if (!enableLabel) return false;\n if (labelSkipWidth > 0 && width < labelSkipWidth) return false;\n if (labelSkipHeight > 0 && height < labelSkipHeight) return false;\n return true;\n };\n\n var boundDefs = bindDefs(defs, result.bars, fill, {\n dataKey: 'data',\n targetKey: 'data.fill'\n });\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: animate,\n motionStiffness: motionStiffness,\n motionDamping: motionDamping\n }, function (_ref6) {\n var showTooltip = _ref6.showTooltip,\n hideTooltip = _ref6.hideTooltip;\n var commonProps = {\n borderRadius: borderRadius,\n borderWidth: borderWidth,\n enableLabel: enableLabel,\n labelSkipWidth: labelSkipWidth,\n labelSkipHeight: labelSkipHeight,\n showTooltip: showTooltip,\n hideTooltip: hideTooltip,\n onClick: onClick,\n onMouseEnter: onMouseEnter,\n onMouseLeave: onMouseLeave,\n theme: theme,\n getTooltipLabel: getTooltipLabel,\n tooltipFormat: tooltipFormat,\n tooltip: tooltip\n };\n var bars;\n\n if (animate === true) {\n bars = React.createElement(TransitionMotion, {\n key: \"bars\",\n willEnter: willEnter,\n willLeave: willLeave,\n styles: result.bars.map(function (bar) {\n return {\n key: bar.key,\n data: bar,\n style: {\n x: spring(bar.x, springConfig),\n y: spring(bar.y, springConfig),\n width: spring(bar.width, springConfig),\n height: spring(bar.height, springConfig)\n }\n };\n })\n }, function (interpolatedStyles) {\n return React.createElement(\"g\", null, interpolatedStyles.map(function (_ref7) {\n var key = _ref7.key,\n style = _ref7.style,\n bar = _ref7.data;\n\n var baseProps = _objectSpread$2({}, bar, style);\n\n return React.createElement(barComponent, _objectSpread$2({\n key: key\n }, baseProps, commonProps, {\n shouldRenderLabel: shouldRenderLabel(baseProps),\n width: Math.max(style.width, 0),\n height: Math.max(style.height, 0),\n label: getLabel(bar.data),\n labelColor: getLabelTextColor(baseProps, theme),\n borderColor: getBorderColor(baseProps),\n theme: theme\n }));\n }));\n });\n } else {\n bars = result.bars.map(function (d) {\n return React.createElement(barComponent, _objectSpread$2({\n key: d.key\n }, d, commonProps, {\n label: getLabel(d.data),\n shouldRenderLabel: shouldRenderLabel(d),\n labelColor: getLabelTextColor(d, theme),\n borderColor: getBorderColor(d),\n theme: theme\n }));\n });\n }\n\n var layerById = {\n grid: React.createElement(Grid, {\n key: \"grid\",\n width: width,\n height: height,\n xScale: enableGridX ? result.xScale : null,\n yScale: enableGridY ? result.yScale : null,\n xValues: gridXValues,\n yValues: gridYValues\n }),\n axes: React.createElement(Axes, {\n key: \"axes\",\n xScale: result.xScale,\n yScale: result.yScale,\n width: width,\n height: height,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft\n }),\n bars: bars,\n markers: React.createElement(CartesianMarkers, {\n key: \"markers\",\n markers: markers,\n width: width,\n height: height,\n xScale: result.xScale,\n yScale: result.yScale,\n theme: theme\n }),\n legends: legends.map(function (legend, i) {\n var legendData = getLegendData({\n from: legend.dataFrom,\n bars: result.bars,\n layout: layout,\n direction: legend.direction,\n groupMode: groupMode,\n reverse: reverse\n });\n if (legendData === undefined) return null;\n return React.createElement(BoxLegendSvg, _extends$1({\n key: i\n }, legend, {\n containerWidth: width,\n containerHeight: height,\n data: legendData,\n theme: theme\n }));\n }),\n annotations: React.createElement(BarAnnotations, _extends$1({\n key: \"annotations\",\n innerWidth: width,\n innerHeight: height,\n bars: result.bars,\n annotations: annotations\n }, motionProps))\n };\n return React.createElement(SvgWrapper, {\n width: outerWidth,\n height: outerHeight,\n margin: margin,\n defs: boundDefs,\n theme: theme\n }, layers.map(function (layer, i) {\n if (typeof layer === 'function') {\n return React.createElement(Fragment, {\n key: i\n }, layer(_objectSpread$2({}, props, result, {\n showTooltip: showTooltip,\n hideTooltip: hideTooltip\n })));\n }\n\n return layerById[layer];\n }));\n });\n};\n\nvar Bar$1 = setDisplayName('Bar')(enhance$1(Bar));\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _objectSpread$3(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$3(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\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 _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _defineProperty$3(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\nvar findNodeUnderCursor = function findNodeUnderCursor(nodes, margin, x, y) {\n return nodes.find(function (node) {\n return isCursorInRect(node.x + margin.left, node.y + margin.top, node.width, node.height, x, y);\n });\n};\n\nvar BarCanvas = function (_Component) {\n _inherits(BarCanvas, _Component);\n\n function BarCanvas() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, BarCanvas);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(BarCanvas)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty$3(_assertThisInitialized(_this), \"handleMouseHover\", function (showTooltip, hideTooltip) {\n return function (event) {\n if (!_this.bars) return;\n var _this$props = _this.props,\n margin = _this$props.margin,\n theme = _this$props.theme,\n tooltip = _this$props.tooltip,\n getTooltipLabel = _this$props.getTooltipLabel,\n tooltipFormat = _this$props.tooltipFormat;\n\n var _getRelativeCursor = getRelativeCursor(_this.surface, event),\n _getRelativeCursor2 = _slicedToArray(_getRelativeCursor, 2),\n x = _getRelativeCursor2[0],\n y = _getRelativeCursor2[1];\n\n var bar = findNodeUnderCursor(_this.bars, margin, x, y);\n\n if (bar !== undefined) {\n showTooltip(React.createElement(BasicTooltip, {\n id: getTooltipLabel(bar.data),\n value: bar.data.value,\n enableChip: true,\n color: bar.color,\n theme: theme,\n format: tooltipFormat,\n renderContent: typeof tooltip === 'function' ? tooltip.bind(null, _objectSpread$3({\n color: bar.color\n }, bar.data)) : null\n }), event);\n } else {\n hideTooltip();\n }\n };\n });\n\n _defineProperty$3(_assertThisInitialized(_this), \"handleMouseLeave\", function (hideTooltip) {\n return function () {\n hideTooltip();\n };\n });\n\n _defineProperty$3(_assertThisInitialized(_this), \"handleClick\", function (event) {\n if (!_this.bars) return;\n var _this$props2 = _this.props,\n margin = _this$props2.margin,\n onClick = _this$props2.onClick;\n\n var _getRelativeCursor3 = getRelativeCursor(_this.surface, event),\n _getRelativeCursor4 = _slicedToArray(_getRelativeCursor3, 2),\n x = _getRelativeCursor4[0],\n y = _getRelativeCursor4[1];\n\n var node = findNodeUnderCursor(_this.bars, margin, x, y);\n if (node !== undefined) onClick(node.data, event);\n });\n\n return _this;\n }\n\n _createClass(BarCanvas, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"shouldComponentUpdate\",\n value: function shouldComponentUpdate(props) {\n if (this.props.outerWidth !== props.outerWidth || this.props.outerHeight !== props.outerHeight || this.props.isInteractive !== props.isInteractive || this.props.theme !== props.theme) {\n return true;\n } else {\n this.draw(props);\n return false;\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate() {\n this.ctx = this.surface.getContext('2d');\n this.draw(this.props);\n }\n }, {\n key: \"draw\",\n value: function draw(props) {\n var _this2 = this;\n\n var data = props.data,\n keys = props.keys,\n getIndex = props.getIndex,\n minValue = props.minValue,\n maxValue = props.maxValue,\n width = props.width,\n height = props.height,\n outerWidth = props.outerWidth,\n outerHeight = props.outerHeight,\n pixelRatio = props.pixelRatio,\n margin = props.margin,\n layout = props.layout,\n reverse = props.reverse,\n groupMode = props.groupMode,\n padding = props.padding,\n innerPadding = props.innerPadding,\n axisTop = props.axisTop,\n axisRight = props.axisRight,\n axisBottom = props.axisBottom,\n axisLeft = props.axisLeft,\n theme = props.theme,\n getColor = props.getColor,\n borderWidth = props.borderWidth,\n getBorderColor = props.getBorderColor,\n legends = props.legends,\n enableGridX = props.enableGridX,\n gridXValues = props.gridXValues,\n enableGridY = props.enableGridY,\n gridYValues = props.gridYValues;\n this.surface.width = outerWidth * pixelRatio;\n this.surface.height = outerHeight * pixelRatio;\n this.ctx.scale(pixelRatio, pixelRatio);\n var options = {\n layout: layout,\n reverse: reverse,\n data: data,\n getIndex: getIndex,\n keys: keys,\n minValue: minValue,\n maxValue: maxValue,\n width: width,\n height: height,\n getColor: getColor,\n padding: padding,\n innerPadding: innerPadding\n };\n var result = groupMode === 'grouped' ? generateGroupedBars(options) : generateStackedBars(options);\n this.bars = result.bars;\n this.ctx.fillStyle = theme.background;\n this.ctx.fillRect(0, 0, outerWidth, outerHeight);\n this.ctx.translate(margin.left, margin.top);\n\n if (theme.grid.line.strokeWidth > 0) {\n this.ctx.lineWidth = theme.grid.line.strokeWidth;\n this.ctx.strokeStyle = theme.grid.line.stroke;\n enableGridX && renderGridLinesToCanvas(this.ctx, {\n width: width,\n height: height,\n scale: result.xScale,\n axis: 'x',\n values: gridXValues\n });\n enableGridY && renderGridLinesToCanvas(this.ctx, {\n width: width,\n height: height,\n scale: result.yScale,\n axis: 'y',\n values: gridYValues\n });\n }\n\n this.ctx.strokeStyle = '#dddddd';\n\n var legendDataForKeys = _uniqBy(result.bars.map(function (bar) {\n return {\n id: bar.data.id,\n label: bar.data.id,\n color: bar.color,\n fill: bar.data.fill\n };\n }).reverse(), function (_ref) {\n var id = _ref.id;\n return id;\n });\n\n var legendDataForIndexes = _uniqBy(result.bars.map(function (bar) {\n return {\n id: bar.data.indexValue,\n label: bar.data.indexValue,\n color: bar.color,\n fill: bar.data.fill\n };\n }), function (_ref2) {\n var id = _ref2.id;\n return id;\n });\n\n legends.forEach(function (legend) {\n var legendData;\n\n if (legend.dataFrom === 'keys') {\n legendData = legendDataForKeys;\n } else if (legend.dataFrom === 'indexes') {\n legendData = legendDataForIndexes;\n }\n\n if (legendData === undefined) return null;\n renderLegendToCanvas(_this2.ctx, _objectSpread$3({}, legend, {\n data: legendData,\n containerWidth: width,\n containerHeight: height,\n itemTextColor: '#999',\n symbolSize: 16,\n theme: theme\n }));\n });\n renderAxesToCanvas(this.ctx, {\n xScale: result.xScale,\n yScale: result.yScale,\n width: width,\n height: height,\n top: axisTop,\n right: axisRight,\n bottom: axisBottom,\n left: axisLeft,\n theme: theme\n });\n result.bars.forEach(function (bar) {\n var x = bar.x,\n y = bar.y,\n color = bar.color,\n width = bar.width,\n height = bar.height;\n _this2.ctx.fillStyle = color;\n\n if (borderWidth > 0) {\n _this2.ctx.strokeStyle = getBorderColor(bar);\n _this2.ctx.lineWidth = borderWidth;\n }\n\n _this2.ctx.beginPath();\n\n _this2.ctx.rect(x, y, width, height);\n\n _this2.ctx.fill();\n\n if (borderWidth > 0) {\n _this2.ctx.stroke();\n }\n });\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this3 = this;\n\n var _this$props3 = this.props,\n outerWidth = _this$props3.outerWidth,\n outerHeight = _this$props3.outerHeight,\n pixelRatio = _this$props3.pixelRatio,\n isInteractive = _this$props3.isInteractive,\n theme = _this$props3.theme;\n return React.createElement(Container, {\n isInteractive: isInteractive,\n theme: theme,\n animate: false\n }, function (_ref3) {\n var showTooltip = _ref3.showTooltip,\n hideTooltip = _ref3.hideTooltip;\n return React.createElement(\"canvas\", {\n ref: function ref(surface) {\n _this3.surface = surface;\n },\n width: outerWidth * pixelRatio,\n height: outerHeight * pixelRatio,\n style: {\n width: outerWidth,\n height: outerHeight\n },\n onMouseEnter: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseMove: _this3.handleMouseHover(showTooltip, hideTooltip),\n onMouseLeave: _this3.handleMouseLeave(hideTooltip),\n onClick: _this3.handleClick\n });\n });\n }\n }]);\n\n return BarCanvas;\n}(Component);\n\nvar BarCanvas$1 = setDisplayName('BarCanvas')(enhance$1(BarCanvas));\n\nfunction _extends$2() {\n _extends$2 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$2.apply(this, arguments);\n}\n\nvar ResponsiveBar = function ResponsiveBar(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(Bar$1, _extends$2({\n width: width,\n height: height\n }, props));\n });\n};\n\nfunction _extends$3() {\n _extends$3 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$3.apply(this, arguments);\n}\n\nvar ResponsiveBarCanvas = function ResponsiveBarCanvas(props) {\n return React.createElement(ResponsiveWrapper, null, function (_ref) {\n var width = _ref.width,\n height = _ref.height;\n return React.createElement(BarCanvas$1, _extends$3({\n width: width,\n height: height\n }, props));\n });\n};\n\nexport { Bar$1 as Bar, BarCanvas$1 as BarCanvas, BarDefaultProps, BarPropTypes, ResponsiveBar, ResponsiveBarCanvas };","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var baseEach = require('./_baseEach'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * The base implementation of `_.map` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction baseMap(collection, iteratee) {\n var index = -1,\n result = isArrayLike(collection) ? Array(collection.length) : [];\n\n baseEach(collection, function(value, key, collection) {\n result[++index] = iteratee(value, key, collection);\n });\n return result;\n}\n\nmodule.exports = baseMap;\n","var isArrayLike = require('./isArrayLike');\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nmodule.exports = createBaseEach;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var Stack = require('./_Stack'),\n baseIsEqual = require('./_baseIsEqual');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * The base implementation of `_.isMatch` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to inspect.\n * @param {Object} source The object of property values to match.\n * @param {Array} matchData The property names, values, and compare flags to match.\n * @param {Function} [customizer] The function to customize comparisons.\n * @returns {boolean} Returns `true` if `object` is a match, else `false`.\n */\nfunction baseIsMatch(object, source, matchData, customizer) {\n var index = matchData.length,\n length = index,\n noCustomizer = !customizer;\n\n if (object == null) {\n return !length;\n }\n object = Object(object);\n while (index--) {\n var data = matchData[index];\n if ((noCustomizer && data[2])\n ? data[1] !== object[data[0]]\n : !(data[0] in object)\n ) {\n return false;\n }\n }\n while (++index < length) {\n data = matchData[index];\n var key = data[0],\n objValue = object[key],\n srcValue = data[1];\n\n if (noCustomizer && data[2]) {\n if (objValue === undefined && !(key in object)) {\n return false;\n }\n } else {\n var stack = new Stack;\n if (customizer) {\n var result = customizer(objValue, srcValue, key, object, source, stack);\n }\n if (!(result === undefined\n ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack)\n : result\n )) {\n return false;\n }\n }\n }\n return true;\n}\n\nmodule.exports = baseIsMatch;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e5f5f999d8c92ca25f\", \"edf8fbb2e2e266c2a4238b45\", \"edf8fbb2e2e266c2a42ca25f006d2c\", \"edf8fbccece699d8c966c2a42ca25f006d2c\", \"edf8fbccece699d8c966c2a441ae76238b45005824\", \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824\", \"f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b\").map(colors);\nexport default ramp(scheme);","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeysIn = require('./_baseKeysIn'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\nmodule.exports = keysIn;\n","/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\nmodule.exports = createBaseFor;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var eq = require('./eq'),\n isArrayLike = require('./isArrayLike'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject');\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\nmodule.exports = isIterateeCall;\n","var baseGet = require('./_baseGet');\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","import { ticks } from \"d3-array\";\nimport { format } from \"d3-format\";\nimport nice from \"./nice.js\";\nimport { copy, transformer } from \"./continuous.js\";\nimport { initRange } from \"./init.js\";\n\nfunction transformLog(x) {\n return Math.log(x);\n}\n\nfunction transformExp(x) {\n return Math.exp(x);\n}\n\nfunction transformLogn(x) {\n return -Math.log(-x);\n}\n\nfunction transformExpn(x) {\n return -Math.exp(-x);\n}\n\nfunction pow10(x) {\n return isFinite(x) ? +(\"1e\" + x) : x < 0 ? 0 : x;\n}\n\nfunction powp(base) {\n return base === 10 ? pow10 : base === Math.E ? Math.exp : function (x) {\n return Math.pow(base, x);\n };\n}\n\nfunction logp(base) {\n return base === Math.E ? Math.log : base === 10 && Math.log10 || base === 2 && Math.log2 || (base = Math.log(base), function (x) {\n return Math.log(x) / base;\n });\n}\n\nfunction reflect(f) {\n return function (x) {\n return -f(-x);\n };\n}\n\nexport function loggish(transform) {\n var scale = transform(transformLog, transformExp),\n domain = scale.domain,\n base = 10,\n logs,\n pows;\n\n function rescale() {\n logs = logp(base), pows = powp(base);\n\n if (domain()[0] < 0) {\n logs = reflect(logs), pows = reflect(pows);\n transform(transformLogn, transformExpn);\n } else {\n transform(transformLog, transformExp);\n }\n\n return scale;\n }\n\n scale.base = function (_) {\n return arguments.length ? (base = +_, rescale()) : base;\n };\n\n scale.domain = function (_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.ticks = function (count) {\n var d = domain(),\n u = d[0],\n v = d[d.length - 1],\n r;\n if (r = v < u) i = u, u = v, v = i;\n var i = logs(u),\n j = logs(v),\n p,\n k,\n t,\n n = count == null ? 10 : +count,\n z = [];\n\n if (!(base % 1) && j - i < n) {\n i = Math.floor(i), j = Math.ceil(j);\n if (u > 0) for (; i <= j; ++i) {\n for (k = 1, p = pows(i); k < base; ++k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n } else for (; i <= j; ++i) {\n for (k = base - 1, p = pows(i); k >= 1; --k) {\n t = p * k;\n if (t < u) continue;\n if (t > v) break;\n z.push(t);\n }\n }\n if (z.length * 2 < n) z = ticks(u, v, n);\n } else {\n z = ticks(i, j, Math.min(j - i, n)).map(pows);\n }\n\n return r ? z.reverse() : z;\n };\n\n scale.tickFormat = function (count, specifier) {\n if (specifier == null) specifier = base === 10 ? \".0e\" : \",\";\n if (typeof specifier !== \"function\") specifier = format(specifier);\n if (count === Infinity) return specifier;\n if (count == null) count = 10;\n var k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?\n\n return function (d) {\n var i = d / pows(Math.round(logs(d)));\n if (i * base < base - 0.5) i *= base;\n return i <= k ? specifier(d) : \"\";\n };\n };\n\n scale.nice = function () {\n return domain(nice(domain(), {\n floor: function floor(x) {\n return pows(Math.floor(logs(x)));\n },\n ceil: function ceil(x) {\n return pows(Math.ceil(logs(x)));\n }\n }));\n };\n\n return scale;\n}\nexport default function log() {\n var scale = loggish(transformer()).domain([1, 10]);\n\n scale.copy = function () {\n return copy(scale, log()).base(scale.base());\n };\n\n initRange.apply(scale, arguments);\n return scale;\n}","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.filter` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction baseFilter(collection, predicate) {\n var result = [];\n baseEach(collection, function(value, index, collection) {\n if (predicate(value, index, collection)) {\n result.push(value);\n }\n });\n return result;\n}\n\nmodule.exports = baseFilter;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","var arrayPush = require('./_arrayPush'),\n getPrototype = require('./_getPrototype'),\n getSymbols = require('./_getSymbols'),\n stubArray = require('./stubArray');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeGetSymbols = Object.getOwnPropertySymbols;\n\n/**\n * Creates an array of the own and inherited enumerable symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of symbols.\n */\nvar getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {\n var result = [];\n while (object) {\n arrayPush(result, getSymbols(object));\n object = getPrototype(object);\n }\n return result;\n};\n\nmodule.exports = getSymbolsIn;\n","var SetCache = require('./_SetCache'),\n arraySome = require('./_arraySome'),\n cacheHas = require('./_cacheHas');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/**\n * A specialized version of `baseIsEqualDeep` for arrays with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Array} array The array to compare.\n * @param {Array} other The other array to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `array` and `other` objects.\n * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.\n */\nfunction equalArrays(array, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n arrLength = array.length,\n othLength = other.length;\n\n if (arrLength != othLength && !(isPartial && othLength > arrLength)) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(array);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var index = -1,\n result = true,\n seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;\n\n stack.set(array, other);\n stack.set(other, array);\n\n // Ignore non-index properties.\n while (++index < arrLength) {\n var arrValue = array[index],\n othValue = other[index];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, arrValue, index, other, array, stack)\n : customizer(arrValue, othValue, index, array, other, stack);\n }\n if (compared !== undefined) {\n if (compared) {\n continue;\n }\n result = false;\n break;\n }\n // Recursively compare arrays (susceptible to call stack limits).\n if (seen) {\n if (!arraySome(other, function(othValue, othIndex) {\n if (!cacheHas(seen, othIndex) &&\n (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {\n return seen.push(othIndex);\n }\n })) {\n result = false;\n break;\n }\n } else if (!(\n arrValue === othValue ||\n equalFunc(arrValue, othValue, bitmask, customizer, stack)\n )) {\n result = false;\n break;\n }\n }\n stack['delete'](array);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalArrays;\n","var Symbol = require('./_Symbol');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * Creates a clone of the `symbol` object.\n *\n * @private\n * @param {Object} symbol The symbol object to clone.\n * @returns {Object} Returns the cloned symbol object.\n */\nfunction cloneSymbol(symbol) {\n return symbolValueOf ? Object(symbolValueOf.call(symbol)) : {};\n}\n\nmodule.exports = cloneSymbol;\n","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _mergeDiff = require('./mergeDiff');\n\nvar _mergeDiff2 = _interopRequireDefault(_mergeDiff);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60; // the children function & (potential) styles function asks as param an\n// Array, where each TransitionPlainStyle is of the format\n// {key: string, data?: any, style: PlainStyle}. However, the way we keep\n// internal states doesn't contain such a data structure (check the state and\n// TransitionMotionState). So when children function and others ask for such\n// data we need to generate them on the fly by combining mergedPropsStyles and\n// currentStyles/lastIdealStyles\n\nfunction rehydrateStyles(mergedPropsStyles, unreadPropStyles, plainStyles) {\n // Copy the value to a `const` so that Flow understands that the const won't\n // change and will be non-nullable in the callback below.\n var cUnreadPropStyles = unreadPropStyles;\n\n if (cUnreadPropStyles == null) {\n return mergedPropsStyles.map(function (mergedPropsStyle, i) {\n return {\n key: mergedPropsStyle.key,\n data: mergedPropsStyle.data,\n style: plainStyles[i]\n };\n });\n }\n\n return mergedPropsStyles.map(function (mergedPropsStyle, i) {\n for (var j = 0; j < cUnreadPropStyles.length; j++) {\n if (cUnreadPropStyles[j].key === mergedPropsStyle.key) {\n return {\n key: cUnreadPropStyles[j].key,\n data: cUnreadPropStyles[j].data,\n style: plainStyles[i]\n };\n }\n }\n\n return {\n key: mergedPropsStyle.key,\n data: mergedPropsStyle.data,\n style: plainStyles[i]\n };\n });\n}\n\nfunction shouldStopAnimationAll(currentStyles, destStyles, currentVelocities, mergedPropsStyles) {\n if (mergedPropsStyles.length !== destStyles.length) {\n return false;\n }\n\n for (var i = 0; i < mergedPropsStyles.length; i++) {\n if (mergedPropsStyles[i].key !== destStyles[i].key) {\n return false;\n }\n } // we have the invariant that mergedPropsStyles and\n // currentStyles/currentVelocities/last* are synced in terms of cells, see\n // mergeAndSync comment for more info\n\n\n for (var i = 0; i < mergedPropsStyles.length; i++) {\n if (!_shouldStopAnimation2['default'](currentStyles[i], destStyles[i].style, currentVelocities[i])) {\n return false;\n }\n }\n\n return true;\n} // core key merging logic\n// things to do: say previously merged style is {a, b}, dest style (prop) is {b,\n// c}, previous current (interpolating) style is {a, b}\n// **invariant**: current[i] corresponds to merged[i] in terms of key\n// steps:\n// turn merged style into {a?, b, c}\n// add c, value of c is destStyles.c\n// maybe remove a, aka call willLeave(a), then merged is either {b, c} or {a, b, c}\n// turn current (interpolating) style from {a, b} into {a?, b, c}\n// maybe remove a\n// certainly add c, value of c is willEnter(c)\n// loop over merged and construct new current\n// dest doesn't change, that's owner's\n\n\nfunction mergeAndSync(willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldLastIdealStyles, oldLastIdealVelocities) {\n var newMergedPropsStyles = _mergeDiff2['default'](oldMergedPropsStyles, destStyles, function (oldIndex, oldMergedPropsStyle) {\n var leavingStyle = willLeave(oldMergedPropsStyle);\n\n if (leavingStyle == null) {\n didLeave({\n key: oldMergedPropsStyle.key,\n data: oldMergedPropsStyle.data\n });\n return null;\n }\n\n if (_shouldStopAnimation2['default'](oldCurrentStyles[oldIndex], leavingStyle, oldCurrentVelocities[oldIndex])) {\n didLeave({\n key: oldMergedPropsStyle.key,\n data: oldMergedPropsStyle.data\n });\n return null;\n }\n\n return {\n key: oldMergedPropsStyle.key,\n data: oldMergedPropsStyle.data,\n style: leavingStyle\n };\n });\n\n var newCurrentStyles = [];\n var newCurrentVelocities = [];\n var newLastIdealStyles = [];\n var newLastIdealVelocities = [];\n\n for (var i = 0; i < newMergedPropsStyles.length; i++) {\n var newMergedPropsStyleCell = newMergedPropsStyles[i];\n var foundOldIndex = null;\n\n for (var j = 0; j < oldMergedPropsStyles.length; j++) {\n if (oldMergedPropsStyles[j].key === newMergedPropsStyleCell.key) {\n foundOldIndex = j;\n break;\n }\n } // TODO: key search code\n\n\n if (foundOldIndex == null) {\n var plainStyle = willEnter(newMergedPropsStyleCell);\n newCurrentStyles[i] = plainStyle;\n newLastIdealStyles[i] = plainStyle;\n\n var velocity = _mapToZero2['default'](newMergedPropsStyleCell.style);\n\n newCurrentVelocities[i] = velocity;\n newLastIdealVelocities[i] = velocity;\n } else {\n newCurrentStyles[i] = oldCurrentStyles[foundOldIndex];\n newLastIdealStyles[i] = oldLastIdealStyles[foundOldIndex];\n newCurrentVelocities[i] = oldCurrentVelocities[foundOldIndex];\n newLastIdealVelocities[i] = oldLastIdealVelocities[foundOldIndex];\n }\n }\n\n return [newMergedPropsStyles, newCurrentStyles, newCurrentVelocities, newLastIdealStyles, newLastIdealVelocities];\n}\n\nvar TransitionMotion = function (_React$Component) {\n _inherits(TransitionMotion, _React$Component);\n\n _createClass(TransitionMotion, null, [{\n key: 'propTypes',\n value: {\n defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].shape({\n key: _propTypes2['default'].string.isRequired,\n data: _propTypes2['default'].any,\n style: _propTypes2['default'].objectOf(_propTypes2['default'].number).isRequired\n })),\n styles: _propTypes2['default'].oneOfType([_propTypes2['default'].func, _propTypes2['default'].arrayOf(_propTypes2['default'].shape({\n key: _propTypes2['default'].string.isRequired,\n data: _propTypes2['default'].any,\n style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired\n }))]).isRequired,\n children: _propTypes2['default'].func.isRequired,\n willEnter: _propTypes2['default'].func,\n willLeave: _propTypes2['default'].func,\n didLeave: _propTypes2['default'].func\n },\n enumerable: true\n }, {\n key: 'defaultProps',\n value: {\n willEnter: function willEnter(styleThatEntered) {\n return _stripStyle2['default'](styleThatEntered.style);\n },\n // recall: returning null makes the current unmounting TransitionStyle\n // disappear immediately\n willLeave: function willLeave() {\n return null;\n },\n didLeave: function didLeave() {}\n },\n enumerable: true\n }]);\n\n function TransitionMotion(props) {\n var _this = this;\n\n _classCallCheck(this, TransitionMotion);\n\n _React$Component.call(this, props);\n\n this.unmounting = false;\n this.animationID = null;\n this.prevTime = 0;\n this.accumulatedTime = 0;\n this.unreadPropStyles = null;\n\n this.clearUnreadPropStyle = function (unreadPropStyles) {\n var _mergeAndSync = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, unreadPropStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);\n\n var mergedPropsStyles = _mergeAndSync[0];\n var currentStyles = _mergeAndSync[1];\n var currentVelocities = _mergeAndSync[2];\n var lastIdealStyles = _mergeAndSync[3];\n var lastIdealVelocities = _mergeAndSync[4];\n\n for (var i = 0; i < unreadPropStyles.length; i++) {\n var unreadPropStyle = unreadPropStyles[i].style;\n var dirty = false;\n\n for (var key in unreadPropStyle) {\n if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {\n continue;\n }\n\n var styleValue = unreadPropStyle[key];\n\n if (typeof styleValue === 'number') {\n if (!dirty) {\n dirty = true;\n currentStyles[i] = _extends({}, currentStyles[i]);\n currentVelocities[i] = _extends({}, currentVelocities[i]);\n lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);\n lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);\n mergedPropsStyles[i] = {\n key: mergedPropsStyles[i].key,\n data: mergedPropsStyles[i].data,\n style: _extends({}, mergedPropsStyles[i].style)\n };\n }\n\n currentStyles[i][key] = styleValue;\n currentVelocities[i][key] = 0;\n lastIdealStyles[i][key] = styleValue;\n lastIdealVelocities[i][key] = 0;\n mergedPropsStyles[i].style[key] = styleValue;\n }\n }\n } // unlike the other 2 components, we can't detect staleness and optionally\n // opt out of setState here. each style object's data might contain new\n // stuff we're not/cannot compare\n\n\n _this.setState({\n currentStyles: currentStyles,\n currentVelocities: currentVelocities,\n mergedPropsStyles: mergedPropsStyles,\n lastIdealStyles: lastIdealStyles,\n lastIdealVelocities: lastIdealVelocities\n });\n };\n\n this.startAnimationIfNecessary = function () {\n if (_this.unmounting) {\n return;\n } // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n // call cb? No, otherwise accidental parent rerender causes cb trigger\n\n\n _this.animationID = _raf2['default'](function (timestamp) {\n // https://github.com/chenglou/react-motion/pull/420\n // > if execution passes the conditional if (this.unmounting), then\n // executes async defaultRaf and after that component unmounts and after\n // that the callback of defaultRaf is called, then setState will be called\n // on unmounted component.\n if (_this.unmounting) {\n return;\n }\n\n var propStyles = _this.props.styles;\n var destStyles = typeof propStyles === 'function' ? propStyles(rehydrateStyles(_this.state.mergedPropsStyles, _this.unreadPropStyles, _this.state.lastIdealStyles)) : propStyles; // check if we need to animate in the first place\n\n if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities, _this.state.mergedPropsStyles)) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n _this.accumulatedTime = 0;\n return;\n }\n\n var currentTime = timestamp || _performanceNow2['default']();\n\n var timeDelta = currentTime - _this.prevTime;\n _this.prevTime = currentTime;\n _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n if (_this.accumulatedTime > msPerFrame * 10) {\n _this.accumulatedTime = 0;\n }\n\n if (_this.accumulatedTime === 0) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n\n _this.startAnimationIfNecessary();\n\n return;\n }\n\n var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n\n var _mergeAndSync2 = mergeAndSync(_this.props.willEnter, _this.props.willLeave, _this.props.didLeave, _this.state.mergedPropsStyles, destStyles, _this.state.currentStyles, _this.state.currentVelocities, _this.state.lastIdealStyles, _this.state.lastIdealVelocities);\n\n var newMergedPropsStyles = _mergeAndSync2[0];\n var newCurrentStyles = _mergeAndSync2[1];\n var newCurrentVelocities = _mergeAndSync2[2];\n var newLastIdealStyles = _mergeAndSync2[3];\n var newLastIdealVelocities = _mergeAndSync2[4];\n\n for (var i = 0; i < newMergedPropsStyles.length; i++) {\n var newMergedPropsStyle = newMergedPropsStyles[i].style;\n var newCurrentStyle = {};\n var newCurrentVelocity = {};\n var newLastIdealStyle = {};\n var newLastIdealVelocity = {};\n\n for (var key in newMergedPropsStyle) {\n if (!Object.prototype.hasOwnProperty.call(newMergedPropsStyle, key)) {\n continue;\n }\n\n var styleValue = newMergedPropsStyle[key];\n\n if (typeof styleValue === 'number') {\n newCurrentStyle[key] = styleValue;\n newCurrentVelocity[key] = 0;\n newLastIdealStyle[key] = styleValue;\n newLastIdealVelocity[key] = 0;\n } else {\n var newLastIdealStyleValue = newLastIdealStyles[i][key];\n var newLastIdealVelocityValue = newLastIdealVelocities[i][key];\n\n for (var j = 0; j < framesToCatchUp; j++) {\n var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n newLastIdealStyleValue = _stepper[0];\n newLastIdealVelocityValue = _stepper[1];\n }\n\n var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n var nextIdealX = _stepper2[0];\n var nextIdealV = _stepper2[1];\n newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n newLastIdealStyle[key] = newLastIdealStyleValue;\n newLastIdealVelocity[key] = newLastIdealVelocityValue;\n }\n }\n\n newLastIdealStyles[i] = newLastIdealStyle;\n newLastIdealVelocities[i] = newLastIdealVelocity;\n newCurrentStyles[i] = newCurrentStyle;\n newCurrentVelocities[i] = newCurrentVelocity;\n }\n\n _this.animationID = null; // the amount we're looped over above\n\n _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n _this.setState({\n currentStyles: newCurrentStyles,\n currentVelocities: newCurrentVelocities,\n lastIdealStyles: newLastIdealStyles,\n lastIdealVelocities: newLastIdealVelocities,\n mergedPropsStyles: newMergedPropsStyles\n });\n\n _this.unreadPropStyles = null;\n\n _this.startAnimationIfNecessary();\n });\n };\n\n this.state = this.defaultState();\n }\n\n TransitionMotion.prototype.defaultState = function defaultState() {\n var _props = this.props;\n var defaultStyles = _props.defaultStyles;\n var styles = _props.styles;\n var willEnter = _props.willEnter;\n var willLeave = _props.willLeave;\n var didLeave = _props.didLeave;\n var destStyles = typeof styles === 'function' ? styles(defaultStyles) : styles; // this is special. for the first time around, we don't have a comparison\n // between last (no last) and current merged props. we'll compute last so:\n // say default is {a, b} and styles (dest style) is {b, c}, we'll\n // fabricate last as {a, b}\n\n var oldMergedPropsStyles = undefined;\n\n if (defaultStyles == null) {\n oldMergedPropsStyles = destStyles;\n } else {\n oldMergedPropsStyles = defaultStyles.map(function (defaultStyleCell) {\n // TODO: key search code\n for (var i = 0; i < destStyles.length; i++) {\n if (destStyles[i].key === defaultStyleCell.key) {\n return destStyles[i];\n }\n }\n\n return defaultStyleCell;\n });\n }\n\n var oldCurrentStyles = defaultStyles == null ? destStyles.map(function (s) {\n return _stripStyle2['default'](s.style);\n }) : defaultStyles.map(function (s) {\n return _stripStyle2['default'](s.style);\n });\n var oldCurrentVelocities = defaultStyles == null ? destStyles.map(function (s) {\n return _mapToZero2['default'](s.style);\n }) : defaultStyles.map(function (s) {\n return _mapToZero2['default'](s.style);\n });\n\n var _mergeAndSync3 = mergeAndSync( // Because this is an old-style createReactClass component, Flow doesn't\n // understand that the willEnter and willLeave props have default values\n // and will always be present.\n willEnter, willLeave, didLeave, oldMergedPropsStyles, destStyles, oldCurrentStyles, oldCurrentVelocities, oldCurrentStyles, // oldLastIdealStyles really\n oldCurrentVelocities);\n\n var mergedPropsStyles = _mergeAndSync3[0];\n var currentStyles = _mergeAndSync3[1];\n var currentVelocities = _mergeAndSync3[2];\n var lastIdealStyles = _mergeAndSync3[3];\n var lastIdealVelocities = _mergeAndSync3[4]; // oldLastIdealVelocities really\n\n return {\n currentStyles: currentStyles,\n currentVelocities: currentVelocities,\n lastIdealStyles: lastIdealStyles,\n lastIdealVelocities: lastIdealVelocities,\n mergedPropsStyles: mergedPropsStyles\n };\n }; // after checking for unreadPropStyles != null, we manually go set the\n // non-interpolating values (those that are a number, without a spring\n // config)\n\n\n TransitionMotion.prototype.componentDidMount = function componentDidMount() {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n };\n\n TransitionMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n if (this.unreadPropStyles) {\n // previous props haven't had the chance to be set yet; set them here\n this.clearUnreadPropStyle(this.unreadPropStyles);\n }\n\n var styles = props.styles;\n\n if (typeof styles === 'function') {\n this.unreadPropStyles = styles(rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.lastIdealStyles));\n } else {\n this.unreadPropStyles = styles;\n }\n\n if (this.animationID == null) {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n }\n };\n\n TransitionMotion.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unmounting = true;\n\n if (this.animationID != null) {\n _raf2['default'].cancel(this.animationID);\n\n this.animationID = null;\n }\n };\n\n TransitionMotion.prototype.render = function render() {\n var hydratedStyles = rehydrateStyles(this.state.mergedPropsStyles, this.unreadPropStyles, this.state.currentStyles);\n var renderedChildren = this.props.children(hydratedStyles);\n return renderedChildren && _react2['default'].Children.only(renderedChildren);\n };\n\n return TransitionMotion;\n}(_react2['default'].Component);\n\nexports['default'] = TransitionMotion;\nmodule.exports = exports['default']; // list of styles, each containing interpolating values. Part of what's passed\n// to children function. Notice that this is\n// Array, without the wrapper that is {key: ...,\n// data: ... style: ActualInterpolatingStyleObject}. Only mergedPropsStyles\n// contains the key & data info (so that we only have a single source of truth\n// for these, and to save space). Check the comment for `rehydrateStyles` to\n// see how we regenerate the entirety of what's passed to children function\n// the array that keeps track of currently rendered stuff! Including stuff\n// that you've unmounted but that's still animating. This is where it lives\n// it's possible that currentStyle's value is stale: if props is immediately\n// changed from 0 to 400 to spring(0) again, the async currentStyle is still\n// at 0 (didn't have time to tick and interpolate even once). If we naively\n// compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n// In reality currentStyle should be 400","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","// core keys merging algorithm. If previous render's keys are [a, b], and the\n// next render's [c, b, d], what's the final merged keys and ordering?\n// - c and a must both be before b\n// - b before d\n// - ordering between a and c ambiguous\n// this reduces to merging two partially ordered lists (e.g. lists where not\n// every item has a definite ordering, like comparing a and c above). For the\n// ambiguous ordering we deterministically choose to place the next render's\n// item after the previous'; so c after a\n// this is called a topological sorting. Except the existing algorithms don't\n// work well with js bc of the amount of allocation, and isn't optimized for our\n// current use-case bc the runtime is linear in terms of edges (see wiki for\n// meaning), which is huge when two lists have many common elements\n'use strict';\n\nrequire(\"core-js/modules/es.array.sort.js\");\n\nexports.__esModule = true;\nexports['default'] = mergeDiff;\n\nfunction mergeDiff(prev, next, onRemove) {\n // bookkeeping for easier access of a key's index below. This is 2 allocations +\n // potentially triggering chrome hash map mode for objs (so it might be faster\n var prevKeyIndex = {};\n\n for (var i = 0; i < prev.length; i++) {\n prevKeyIndex[prev[i].key] = i;\n }\n\n var nextKeyIndex = {};\n\n for (var i = 0; i < next.length; i++) {\n nextKeyIndex[next[i].key] = i;\n } // first, an overly elaborate way of merging prev and next, eliminating\n // duplicates (in terms of keys). If there's dupe, keep the item in next).\n // This way of writing it saves allocations\n\n\n var ret = [];\n\n for (var i = 0; i < next.length; i++) {\n ret[i] = next[i];\n }\n\n for (var i = 0; i < prev.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(nextKeyIndex, prev[i].key)) {\n // this is called my TM's `mergeAndSync`, which calls willLeave. We don't\n // merge in keys that the user desires to kill\n var fill = onRemove(i, prev[i]);\n\n if (fill != null) {\n ret.push(fill);\n }\n }\n } // now all the items all present. Core sorting logic to have the right order\n\n\n return ret.sort(function (a, b) {\n var nextOrderA = nextKeyIndex[a.key];\n var nextOrderB = nextKeyIndex[b.key];\n var prevOrderA = prevKeyIndex[a.key];\n var prevOrderB = prevKeyIndex[b.key];\n\n if (nextOrderA != null && nextOrderB != null) {\n // both keys in next\n return nextKeyIndex[a.key] - nextKeyIndex[b.key];\n } else if (prevOrderA != null && prevOrderB != null) {\n // both keys in prev\n return prevKeyIndex[a.key] - prevKeyIndex[b.key];\n } else if (nextOrderA != null) {\n // key a in next, key b in prev\n // how to determine the order between a and b? We find a \"pivot\" (term\n // abuse), a key present in both prev and next, that is sandwiched between\n // a and b. In the context of our above example, if we're comparing a and\n // d, b's (the only) pivot\n for (var i = 0; i < next.length; i++) {\n var pivot = next[i].key;\n\n if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {\n continue;\n }\n\n if (nextOrderA < nextKeyIndex[pivot] && prevOrderB > prevKeyIndex[pivot]) {\n return -1;\n } else if (nextOrderA > nextKeyIndex[pivot] && prevOrderB < prevKeyIndex[pivot]) {\n return 1;\n }\n } // pluggable. default to: next bigger than prev\n\n\n return 1;\n } // prevOrderA, nextOrderB\n\n\n for (var i = 0; i < next.length; i++) {\n var pivot = next[i].key;\n\n if (!Object.prototype.hasOwnProperty.call(prevKeyIndex, pivot)) {\n continue;\n }\n\n if (nextOrderB < nextKeyIndex[pivot] && prevOrderA > prevKeyIndex[pivot]) {\n return 1;\n } else if (nextOrderB > nextKeyIndex[pivot] && prevOrderA < prevKeyIndex[pivot]) {\n return -1;\n }\n } // pluggable. default to: next bigger than prev\n\n\n return -1;\n });\n}\n\nmodule.exports = exports['default']; // to loop through and find a key's index each time), but I no longer care","var copyArray = require('./_copyArray'),\n isIndex = require('./_isIndex');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Reorder `array` according to the specified indexes where the element at\n * the first index is assigned as the first element, the element at\n * the second index is assigned as the second element, and so on.\n *\n * @private\n * @param {Array} array The array to reorder.\n * @param {Array} indexes The arranged array indexes.\n * @returns {Array} Returns `array`.\n */\nfunction reorder(array, indexes) {\n var arrLength = array.length,\n length = nativeMin(indexes.length, arrLength),\n oldArray = copyArray(array);\n\n while (length--) {\n var index = indexes[length];\n array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined;\n }\n return array;\n}\n\nmodule.exports = reorder;\n","var composeArgs = require('./_composeArgs'),\n composeArgsRight = require('./_composeArgsRight'),\n replaceHolders = require('./_replaceHolders');\n\n/** Used as the internal argument placeholder. */\nvar PLACEHOLDER = '__lodash_placeholder__';\n\n/** Used to compose bitmasks for function metadata. */\nvar WRAP_BIND_FLAG = 1,\n WRAP_BIND_KEY_FLAG = 2,\n WRAP_CURRY_BOUND_FLAG = 4,\n WRAP_CURRY_FLAG = 8,\n WRAP_ARY_FLAG = 128,\n WRAP_REARG_FLAG = 256;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMin = Math.min;\n\n/**\n * Merges the function metadata of `source` into `data`.\n *\n * Merging metadata reduces the number of wrappers used to invoke a function.\n * This is possible because methods like `_.bind`, `_.curry`, and `_.partial`\n * may be applied regardless of execution order. Methods like `_.ary` and\n * `_.rearg` modify function arguments, making the order in which they are\n * executed important, preventing the merging of metadata. However, we make\n * an exception for a safe combined case where curried functions have `_.ary`\n * and or `_.rearg` applied.\n *\n * @private\n * @param {Array} data The destination metadata.\n * @param {Array} source The source metadata.\n * @returns {Array} Returns `data`.\n */\nfunction mergeData(data, source) {\n var bitmask = data[1],\n srcBitmask = source[1],\n newBitmask = bitmask | srcBitmask,\n isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);\n\n var isCombo =\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_CURRY_FLAG)) ||\n ((srcBitmask == WRAP_ARY_FLAG) && (bitmask == WRAP_REARG_FLAG) && (data[7].length <= source[8])) ||\n ((srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG)) && (source[7].length <= source[8]) && (bitmask == WRAP_CURRY_FLAG));\n\n // Exit early if metadata can't be merged.\n if (!(isCommon || isCombo)) {\n return data;\n }\n // Use source `thisArg` if available.\n if (srcBitmask & WRAP_BIND_FLAG) {\n data[2] = source[2];\n // Set when currying a bound function.\n newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;\n }\n // Compose partial arguments.\n var value = source[3];\n if (value) {\n var partials = data[3];\n data[3] = partials ? composeArgs(partials, value, source[4]) : value;\n data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];\n }\n // Compose partial right arguments.\n value = source[5];\n if (value) {\n partials = data[5];\n data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;\n data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];\n }\n // Use source `argPos` if available.\n value = source[7];\n if (value) {\n data[7] = value;\n }\n // Use source `ary` if it's smaller.\n if (srcBitmask & WRAP_ARY_FLAG) {\n data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);\n }\n // Use source `arity` if one is not provided.\n if (data[9] == null) {\n data[9] = source[9];\n }\n // Use source `func` and merge bitmasks.\n data[0] = source[0];\n data[1] = newBitmask;\n\n return data;\n}\n\nmodule.exports = mergeData;\n","var baseExtremum = require('./_baseExtremum'),\n baseGt = require('./_baseGt'),\n identity = require('./identity');\n\n/**\n * Computes the maximum value of `array`. If `array` is empty or falsey,\n * `undefined` is returned.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Math\n * @param {Array} array The array to iterate over.\n * @returns {*} Returns the maximum value.\n * @example\n *\n * _.max([4, 2, 8, 6]);\n * // => 8\n *\n * _.max([]);\n * // => undefined\n */\nfunction max(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseGt)\n : undefined;\n}\n\nmodule.exports = max;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"f0f0f0bdbdbd636363\", \"f7f7f7cccccc969696525252\", \"f7f7f7cccccc969696636363252525\", \"f7f7f7d9d9d9bdbdbd969696636363252525\", \"f7f7f7d9d9d9bdbdbd969696737373525252252525\", \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525\", \"fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000\").map(colors);\nexport default ramp(scheme);","var baseIteratee = require('./_baseIteratee'),\n baseUniq = require('./_baseUniq');\n\n/**\n * This method is like `_.uniq` except that it accepts `iteratee` which is\n * invoked for each element in `array` to generate the criterion by which\n * uniqueness is computed. The order of result values is determined by the\n * order they occur in the array. The iteratee is invoked with one argument:\n * (value).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee=_.identity] The iteratee invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n * @example\n *\n * _.uniqBy([2.1, 1.2, 2.3], Math.floor);\n * // => [2.1, 1.2]\n *\n * // The `_.property` iteratee shorthand.\n * _.uniqBy([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x');\n * // => [{ 'x': 1 }, { 'x': 2 }]\n */\nfunction uniqBy(array, iteratee) {\n return (array && array.length) ? baseUniq(array, baseIteratee(iteratee, 2)) : [];\n}\n\nmodule.exports = uniqBy;\n","import colors from \"../colors.js\";\nexport default colors(\"1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf\");","// eslint-disable-next-line es-x/no-typed-arrays -- safe\nmodule.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';\n","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbols = require('./_getSymbols'),\n keys = require('./keys');\n\n/**\n * Creates an array of own enumerable property names and symbols of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names and symbols.\n */\nfunction getAllKeys(object) {\n return baseGetAllKeys(object, keys, getSymbols);\n}\n\nmodule.exports = getAllKeys;\n","import \"core-js/modules/es.array.reduce.js\";\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-side-effect';\nimport isEqual from 'react-fast-compare';\nimport React from 'react';\nimport objectAssign from 'object-assign';\nvar ATTRIBUTE_NAMES = {\n BODY: \"bodyAttributes\",\n HTML: \"htmlAttributes\",\n TITLE: \"titleAttributes\"\n};\nvar TAG_NAMES = {\n BASE: \"base\",\n BODY: \"body\",\n HEAD: \"head\",\n HTML: \"html\",\n LINK: \"link\",\n META: \"meta\",\n NOSCRIPT: \"noscript\",\n SCRIPT: \"script\",\n STYLE: \"style\",\n TITLE: \"title\"\n};\nvar VALID_TAG_NAMES = Object.keys(TAG_NAMES).map(function (name) {\n return TAG_NAMES[name];\n});\nvar TAG_PROPERTIES = {\n CHARSET: \"charset\",\n CSS_TEXT: \"cssText\",\n HREF: \"href\",\n HTTPEQUIV: \"http-equiv\",\n INNER_HTML: \"innerHTML\",\n ITEM_PROP: \"itemprop\",\n NAME: \"name\",\n PROPERTY: \"property\",\n REL: \"rel\",\n SRC: \"src\",\n TARGET: \"target\"\n};\nvar REACT_TAG_MAP = {\n accesskey: \"accessKey\",\n charset: \"charSet\",\n class: \"className\",\n contenteditable: \"contentEditable\",\n contextmenu: \"contextMenu\",\n \"http-equiv\": \"httpEquiv\",\n itemprop: \"itemProp\",\n tabindex: \"tabIndex\"\n};\nvar HELMET_PROPS = {\n DEFAULT_TITLE: \"defaultTitle\",\n DEFER: \"defer\",\n ENCODE_SPECIAL_CHARACTERS: \"encodeSpecialCharacters\",\n ON_CHANGE_CLIENT_STATE: \"onChangeClientState\",\n TITLE_TEMPLATE: \"titleTemplate\"\n};\nvar HTML_TAG_MAP = Object.keys(REACT_TAG_MAP).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key]] = key;\n return obj;\n}, {});\nvar SELF_CLOSING_TAGS = [TAG_NAMES.NOSCRIPT, TAG_NAMES.SCRIPT, TAG_NAMES.STYLE];\nvar HELMET_ATTRIBUTE = \"data-react-helmet\";\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) {\n return typeof obj;\n} : function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n};\n\nvar classCallCheck = function classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar inherits = function inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar objectWithoutProperties = function objectWithoutProperties(obj, keys) {\n var target = {};\n\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n\n return target;\n};\n\nvar possibleConstructorReturn = function possibleConstructorReturn(self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar encodeSpecialCharacters = function encodeSpecialCharacters(str) {\n var encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;\n\n if (encode === false) {\n return String(str);\n }\n\n return String(str).replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\").replace(/'/g, \"'\");\n};\n\nvar getTitleFromPropsList = function getTitleFromPropsList(propsList) {\n var innermostTitle = getInnermostProperty(propsList, TAG_NAMES.TITLE);\n var innermostTemplate = getInnermostProperty(propsList, HELMET_PROPS.TITLE_TEMPLATE);\n\n if (innermostTemplate && innermostTitle) {\n // use function arg to avoid need to escape $ characters\n return innermostTemplate.replace(/%s/g, function () {\n return Array.isArray(innermostTitle) ? innermostTitle.join(\"\") : innermostTitle;\n });\n }\n\n var innermostDefaultTitle = getInnermostProperty(propsList, HELMET_PROPS.DEFAULT_TITLE);\n return innermostTitle || innermostDefaultTitle || undefined;\n};\n\nvar getOnChangeClientState = function getOnChangeClientState(propsList) {\n return getInnermostProperty(propsList, HELMET_PROPS.ON_CHANGE_CLIENT_STATE) || function () {};\n};\n\nvar getAttributesFromPropsList = function getAttributesFromPropsList(tagType, propsList) {\n return propsList.filter(function (props) {\n return typeof props[tagType] !== \"undefined\";\n }).map(function (props) {\n return props[tagType];\n }).reduce(function (tagAttrs, current) {\n return _extends({}, tagAttrs, current);\n }, {});\n};\n\nvar getBaseTagFromPropsList = function getBaseTagFromPropsList(primaryAttributes, propsList) {\n return propsList.filter(function (props) {\n return typeof props[TAG_NAMES.BASE] !== \"undefined\";\n }).map(function (props) {\n return props[TAG_NAMES.BASE];\n }).reverse().reduce(function (innermostBaseTag, tag) {\n if (!innermostBaseTag.length) {\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase();\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && tag[lowerCaseAttributeKey]) {\n return innermostBaseTag.concat(tag);\n }\n }\n }\n\n return innermostBaseTag;\n }, []);\n};\n\nvar getTagsFromPropsList = function getTagsFromPropsList(tagName, primaryAttributes, propsList) {\n // Calculate list of tags, giving priority innermost component (end of the propslist)\n var approvedSeenTags = {};\n return propsList.filter(function (props) {\n if (Array.isArray(props[tagName])) {\n return true;\n }\n\n if (typeof props[tagName] !== \"undefined\") {\n warn(\"Helmet: \" + tagName + \" should be of type \\\"Array\\\". Instead found type \\\"\" + _typeof(props[tagName]) + \"\\\"\");\n }\n\n return false;\n }).map(function (props) {\n return props[tagName];\n }).reverse().reduce(function (approvedTags, instanceTags) {\n var instanceSeenTags = {};\n instanceTags.filter(function (tag) {\n var primaryAttributeKey = void 0;\n var keys = Object.keys(tag);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var lowerCaseAttributeKey = attributeKey.toLowerCase(); // Special rule with link tags, since rel and href are both primary tags, rel takes priority\n\n if (primaryAttributes.indexOf(lowerCaseAttributeKey) !== -1 && !(primaryAttributeKey === TAG_PROPERTIES.REL && tag[primaryAttributeKey].toLowerCase() === \"canonical\") && !(lowerCaseAttributeKey === TAG_PROPERTIES.REL && tag[lowerCaseAttributeKey].toLowerCase() === \"stylesheet\")) {\n primaryAttributeKey = lowerCaseAttributeKey;\n } // Special case for innerHTML which doesn't work lowercased\n\n\n if (primaryAttributes.indexOf(attributeKey) !== -1 && (attributeKey === TAG_PROPERTIES.INNER_HTML || attributeKey === TAG_PROPERTIES.CSS_TEXT || attributeKey === TAG_PROPERTIES.ITEM_PROP)) {\n primaryAttributeKey = attributeKey;\n }\n }\n\n if (!primaryAttributeKey || !tag[primaryAttributeKey]) {\n return false;\n }\n\n var value = tag[primaryAttributeKey].toLowerCase();\n\n if (!approvedSeenTags[primaryAttributeKey]) {\n approvedSeenTags[primaryAttributeKey] = {};\n }\n\n if (!instanceSeenTags[primaryAttributeKey]) {\n instanceSeenTags[primaryAttributeKey] = {};\n }\n\n if (!approvedSeenTags[primaryAttributeKey][value]) {\n instanceSeenTags[primaryAttributeKey][value] = true;\n return true;\n }\n\n return false;\n }).reverse().forEach(function (tag) {\n return approvedTags.push(tag);\n }); // Update seen tags with tags from this instance\n\n var keys = Object.keys(instanceSeenTags);\n\n for (var i = 0; i < keys.length; i++) {\n var attributeKey = keys[i];\n var tagUnion = objectAssign({}, approvedSeenTags[attributeKey], instanceSeenTags[attributeKey]);\n approvedSeenTags[attributeKey] = tagUnion;\n }\n\n return approvedTags;\n }, []).reverse();\n};\n\nvar getInnermostProperty = function getInnermostProperty(propsList, property) {\n for (var i = propsList.length - 1; i >= 0; i--) {\n var props = propsList[i];\n\n if (props.hasOwnProperty(property)) {\n return props[property];\n }\n }\n\n return null;\n};\n\nvar reducePropsToState = function reducePropsToState(propsList) {\n return {\n baseTag: getBaseTagFromPropsList([TAG_PROPERTIES.HREF, TAG_PROPERTIES.TARGET], propsList),\n bodyAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.BODY, propsList),\n defer: getInnermostProperty(propsList, HELMET_PROPS.DEFER),\n encode: getInnermostProperty(propsList, HELMET_PROPS.ENCODE_SPECIAL_CHARACTERS),\n htmlAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.HTML, propsList),\n linkTags: getTagsFromPropsList(TAG_NAMES.LINK, [TAG_PROPERTIES.REL, TAG_PROPERTIES.HREF], propsList),\n metaTags: getTagsFromPropsList(TAG_NAMES.META, [TAG_PROPERTIES.NAME, TAG_PROPERTIES.CHARSET, TAG_PROPERTIES.HTTPEQUIV, TAG_PROPERTIES.PROPERTY, TAG_PROPERTIES.ITEM_PROP], propsList),\n noscriptTags: getTagsFromPropsList(TAG_NAMES.NOSCRIPT, [TAG_PROPERTIES.INNER_HTML], propsList),\n onChangeClientState: getOnChangeClientState(propsList),\n scriptTags: getTagsFromPropsList(TAG_NAMES.SCRIPT, [TAG_PROPERTIES.SRC, TAG_PROPERTIES.INNER_HTML], propsList),\n styleTags: getTagsFromPropsList(TAG_NAMES.STYLE, [TAG_PROPERTIES.CSS_TEXT], propsList),\n title: getTitleFromPropsList(propsList),\n titleAttributes: getAttributesFromPropsList(ATTRIBUTE_NAMES.TITLE, propsList)\n };\n};\n\nvar rafPolyfill = function () {\n var clock = Date.now();\n return function (callback) {\n var currentTime = Date.now();\n\n if (currentTime - clock > 16) {\n clock = currentTime;\n callback(currentTime);\n } else {\n setTimeout(function () {\n rafPolyfill(callback);\n }, 0);\n }\n };\n}();\n\nvar cafPolyfill = function cafPolyfill(id) {\n return clearTimeout(id);\n};\n\nvar requestAnimationFrame = typeof window !== \"undefined\" ? window.requestAnimationFrame && window.requestAnimationFrame.bind(window) || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || rafPolyfill : global.requestAnimationFrame || rafPolyfill;\nvar cancelAnimationFrame = typeof window !== \"undefined\" ? window.cancelAnimationFrame || window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || cafPolyfill : global.cancelAnimationFrame || cafPolyfill;\n\nvar warn = function warn(msg) {\n return console && typeof console.warn === \"function\" && console.warn(msg);\n};\n\nvar _helmetCallback = null;\n\nvar handleClientStateChange = function handleClientStateChange(newState) {\n if (_helmetCallback) {\n cancelAnimationFrame(_helmetCallback);\n }\n\n if (newState.defer) {\n _helmetCallback = requestAnimationFrame(function () {\n commitTagChanges(newState, function () {\n _helmetCallback = null;\n });\n });\n } else {\n commitTagChanges(newState);\n _helmetCallback = null;\n }\n};\n\nvar commitTagChanges = function commitTagChanges(newState, cb) {\n var baseTag = newState.baseTag,\n bodyAttributes = newState.bodyAttributes,\n htmlAttributes = newState.htmlAttributes,\n linkTags = newState.linkTags,\n metaTags = newState.metaTags,\n noscriptTags = newState.noscriptTags,\n onChangeClientState = newState.onChangeClientState,\n scriptTags = newState.scriptTags,\n styleTags = newState.styleTags,\n title = newState.title,\n titleAttributes = newState.titleAttributes;\n updateAttributes(TAG_NAMES.BODY, bodyAttributes);\n updateAttributes(TAG_NAMES.HTML, htmlAttributes);\n updateTitle(title, titleAttributes);\n var tagUpdates = {\n baseTag: updateTags(TAG_NAMES.BASE, baseTag),\n linkTags: updateTags(TAG_NAMES.LINK, linkTags),\n metaTags: updateTags(TAG_NAMES.META, metaTags),\n noscriptTags: updateTags(TAG_NAMES.NOSCRIPT, noscriptTags),\n scriptTags: updateTags(TAG_NAMES.SCRIPT, scriptTags),\n styleTags: updateTags(TAG_NAMES.STYLE, styleTags)\n };\n var addedTags = {};\n var removedTags = {};\n Object.keys(tagUpdates).forEach(function (tagType) {\n var _tagUpdates$tagType = tagUpdates[tagType],\n newTags = _tagUpdates$tagType.newTags,\n oldTags = _tagUpdates$tagType.oldTags;\n\n if (newTags.length) {\n addedTags[tagType] = newTags;\n }\n\n if (oldTags.length) {\n removedTags[tagType] = tagUpdates[tagType].oldTags;\n }\n });\n cb && cb();\n onChangeClientState(newState, addedTags, removedTags);\n};\n\nvar flattenArray = function flattenArray(possibleArray) {\n return Array.isArray(possibleArray) ? possibleArray.join(\"\") : possibleArray;\n};\n\nvar updateTitle = function updateTitle(title, attributes) {\n if (typeof title !== \"undefined\" && document.title !== title) {\n document.title = flattenArray(title);\n }\n\n updateAttributes(TAG_NAMES.TITLE, attributes);\n};\n\nvar updateAttributes = function updateAttributes(tagName, attributes) {\n var elementTag = document.getElementsByTagName(tagName)[0];\n\n if (!elementTag) {\n return;\n }\n\n var helmetAttributeString = elementTag.getAttribute(HELMET_ATTRIBUTE);\n var helmetAttributes = helmetAttributeString ? helmetAttributeString.split(\",\") : [];\n var attributesToRemove = [].concat(helmetAttributes);\n var attributeKeys = Object.keys(attributes);\n\n for (var i = 0; i < attributeKeys.length; i++) {\n var attribute = attributeKeys[i];\n var value = attributes[attribute] || \"\";\n\n if (elementTag.getAttribute(attribute) !== value) {\n elementTag.setAttribute(attribute, value);\n }\n\n if (helmetAttributes.indexOf(attribute) === -1) {\n helmetAttributes.push(attribute);\n }\n\n var indexToSave = attributesToRemove.indexOf(attribute);\n\n if (indexToSave !== -1) {\n attributesToRemove.splice(indexToSave, 1);\n }\n }\n\n for (var _i = attributesToRemove.length - 1; _i >= 0; _i--) {\n elementTag.removeAttribute(attributesToRemove[_i]);\n }\n\n if (helmetAttributes.length === attributesToRemove.length) {\n elementTag.removeAttribute(HELMET_ATTRIBUTE);\n } else if (elementTag.getAttribute(HELMET_ATTRIBUTE) !== attributeKeys.join(\",\")) {\n elementTag.setAttribute(HELMET_ATTRIBUTE, attributeKeys.join(\",\"));\n }\n};\n\nvar updateTags = function updateTags(type, tags) {\n var headElement = document.head || document.querySelector(TAG_NAMES.HEAD);\n var tagNodes = headElement.querySelectorAll(type + \"[\" + HELMET_ATTRIBUTE + \"]\");\n var oldTags = Array.prototype.slice.call(tagNodes);\n var newTags = [];\n var indexToDelete = void 0;\n\n if (tags && tags.length) {\n tags.forEach(function (tag) {\n var newElement = document.createElement(type);\n\n for (var attribute in tag) {\n if (tag.hasOwnProperty(attribute)) {\n if (attribute === TAG_PROPERTIES.INNER_HTML) {\n newElement.innerHTML = tag.innerHTML;\n } else if (attribute === TAG_PROPERTIES.CSS_TEXT) {\n if (newElement.styleSheet) {\n newElement.styleSheet.cssText = tag.cssText;\n } else {\n newElement.appendChild(document.createTextNode(tag.cssText));\n }\n } else {\n var value = typeof tag[attribute] === \"undefined\" ? \"\" : tag[attribute];\n newElement.setAttribute(attribute, value);\n }\n }\n }\n\n newElement.setAttribute(HELMET_ATTRIBUTE, \"true\"); // Remove a duplicate tag from domTagstoRemove, so it isn't cleared.\n\n if (oldTags.some(function (existingTag, index) {\n indexToDelete = index;\n return newElement.isEqualNode(existingTag);\n })) {\n oldTags.splice(indexToDelete, 1);\n } else {\n newTags.push(newElement);\n }\n });\n }\n\n oldTags.forEach(function (tag) {\n return tag.parentNode.removeChild(tag);\n });\n newTags.forEach(function (tag) {\n return headElement.appendChild(tag);\n });\n return {\n oldTags: oldTags,\n newTags: newTags\n };\n};\n\nvar generateElementAttributesAsString = function generateElementAttributesAsString(attributes) {\n return Object.keys(attributes).reduce(function (str, key) {\n var attr = typeof attributes[key] !== \"undefined\" ? key + \"=\\\"\" + attributes[key] + \"\\\"\" : \"\" + key;\n return str ? str + \" \" + attr : attr;\n }, \"\");\n};\n\nvar generateTitleAsString = function generateTitleAsString(type, title, attributes, encode) {\n var attributeString = generateElementAttributesAsString(attributes);\n var flattenedTitle = flattenArray(title);\n return attributeString ? \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeString + \">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\" : \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\">\" + encodeSpecialCharacters(flattenedTitle, encode) + \"\" + type + \">\";\n};\n\nvar generateTagsAsString = function generateTagsAsString(type, tags, encode) {\n return tags.reduce(function (str, tag) {\n var attributeHtml = Object.keys(tag).filter(function (attribute) {\n return !(attribute === TAG_PROPERTIES.INNER_HTML || attribute === TAG_PROPERTIES.CSS_TEXT);\n }).reduce(function (string, attribute) {\n var attr = typeof tag[attribute] === \"undefined\" ? attribute : attribute + \"=\\\"\" + encodeSpecialCharacters(tag[attribute], encode) + \"\\\"\";\n return string ? string + \" \" + attr : attr;\n }, \"\");\n var tagContent = tag.innerHTML || tag.cssText || \"\";\n var isSelfClosing = SELF_CLOSING_TAGS.indexOf(type) === -1;\n return str + \"<\" + type + \" \" + HELMET_ATTRIBUTE + \"=\\\"true\\\" \" + attributeHtml + (isSelfClosing ? \"/>\" : \">\" + tagContent + \"\" + type + \">\");\n }, \"\");\n};\n\nvar convertElementAttributestoReactProps = function convertElementAttributestoReactProps(attributes) {\n var initProps = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(attributes).reduce(function (obj, key) {\n obj[REACT_TAG_MAP[key] || key] = attributes[key];\n return obj;\n }, initProps);\n};\n\nvar convertReactPropstoHtmlAttributes = function convertReactPropstoHtmlAttributes(props) {\n var initAttributes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return Object.keys(props).reduce(function (obj, key) {\n obj[HTML_TAG_MAP[key] || key] = props[key];\n return obj;\n }, initAttributes);\n};\n\nvar generateTitleAsReactComponent = function generateTitleAsReactComponent(type, title, attributes) {\n var _initProps; // assigning into an array to define toString function on it\n\n\n var initProps = (_initProps = {\n key: title\n }, _initProps[HELMET_ATTRIBUTE] = true, _initProps);\n var props = convertElementAttributestoReactProps(attributes, initProps);\n return [React.createElement(TAG_NAMES.TITLE, props, title)];\n};\n\nvar generateTagsAsReactComponent = function generateTagsAsReactComponent(type, tags) {\n return tags.map(function (tag, i) {\n var _mappedTag;\n\n var mappedTag = (_mappedTag = {\n key: i\n }, _mappedTag[HELMET_ATTRIBUTE] = true, _mappedTag);\n Object.keys(tag).forEach(function (attribute) {\n var mappedAttribute = REACT_TAG_MAP[attribute] || attribute;\n\n if (mappedAttribute === TAG_PROPERTIES.INNER_HTML || mappedAttribute === TAG_PROPERTIES.CSS_TEXT) {\n var content = tag.innerHTML || tag.cssText;\n mappedTag.dangerouslySetInnerHTML = {\n __html: content\n };\n } else {\n mappedTag[mappedAttribute] = tag[attribute];\n }\n });\n return React.createElement(type, mappedTag);\n });\n};\n\nvar getMethodsForTag = function getMethodsForTag(type, tags, encode) {\n switch (type) {\n case TAG_NAMES.TITLE:\n return {\n toComponent: function toComponent() {\n return generateTitleAsReactComponent(type, tags.title, tags.titleAttributes, encode);\n },\n toString: function toString() {\n return generateTitleAsString(type, tags.title, tags.titleAttributes, encode);\n }\n };\n\n case ATTRIBUTE_NAMES.BODY:\n case ATTRIBUTE_NAMES.HTML:\n return {\n toComponent: function toComponent() {\n return convertElementAttributestoReactProps(tags);\n },\n toString: function toString() {\n return generateElementAttributesAsString(tags);\n }\n };\n\n default:\n return {\n toComponent: function toComponent() {\n return generateTagsAsReactComponent(type, tags);\n },\n toString: function toString() {\n return generateTagsAsString(type, tags, encode);\n }\n };\n }\n};\n\nvar mapStateOnServer = function mapStateOnServer(_ref) {\n var baseTag = _ref.baseTag,\n bodyAttributes = _ref.bodyAttributes,\n encode = _ref.encode,\n htmlAttributes = _ref.htmlAttributes,\n linkTags = _ref.linkTags,\n metaTags = _ref.metaTags,\n noscriptTags = _ref.noscriptTags,\n scriptTags = _ref.scriptTags,\n styleTags = _ref.styleTags,\n _ref$title = _ref.title,\n title = _ref$title === undefined ? \"\" : _ref$title,\n titleAttributes = _ref.titleAttributes;\n return {\n base: getMethodsForTag(TAG_NAMES.BASE, baseTag, encode),\n bodyAttributes: getMethodsForTag(ATTRIBUTE_NAMES.BODY, bodyAttributes, encode),\n htmlAttributes: getMethodsForTag(ATTRIBUTE_NAMES.HTML, htmlAttributes, encode),\n link: getMethodsForTag(TAG_NAMES.LINK, linkTags, encode),\n meta: getMethodsForTag(TAG_NAMES.META, metaTags, encode),\n noscript: getMethodsForTag(TAG_NAMES.NOSCRIPT, noscriptTags, encode),\n script: getMethodsForTag(TAG_NAMES.SCRIPT, scriptTags, encode),\n style: getMethodsForTag(TAG_NAMES.STYLE, styleTags, encode),\n title: getMethodsForTag(TAG_NAMES.TITLE, {\n title: title,\n titleAttributes: titleAttributes\n }, encode)\n };\n};\n\nvar Helmet = function Helmet(Component) {\n var _class, _temp;\n\n return _temp = _class = function (_React$Component) {\n inherits(HelmetWrapper, _React$Component);\n\n function HelmetWrapper() {\n classCallCheck(this, HelmetWrapper);\n return possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n HelmetWrapper.prototype.shouldComponentUpdate = function shouldComponentUpdate(nextProps) {\n return !isEqual(this.props, nextProps);\n };\n\n HelmetWrapper.prototype.mapNestedChildrenToProps = function mapNestedChildrenToProps(child, nestedChildren) {\n if (!nestedChildren) {\n return null;\n }\n\n switch (child.type) {\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.NOSCRIPT:\n return {\n innerHTML: nestedChildren\n };\n\n case TAG_NAMES.STYLE:\n return {\n cssText: nestedChildren\n };\n }\n\n throw new Error(\"<\" + child.type + \" /> elements are self-closing and can not contain children. Refer to our API for more information.\");\n };\n\n HelmetWrapper.prototype.flattenArrayTypeChildren = function flattenArrayTypeChildren(_ref) {\n var _babelHelpers$extends;\n\n var child = _ref.child,\n arrayTypeChildren = _ref.arrayTypeChildren,\n newChildProps = _ref.newChildProps,\n nestedChildren = _ref.nestedChildren;\n return _extends({}, arrayTypeChildren, (_babelHelpers$extends = {}, _babelHelpers$extends[child.type] = [].concat(arrayTypeChildren[child.type] || [], [_extends({}, newChildProps, this.mapNestedChildrenToProps(child, nestedChildren))]), _babelHelpers$extends));\n };\n\n HelmetWrapper.prototype.mapObjectTypeChildren = function mapObjectTypeChildren(_ref2) {\n var _babelHelpers$extends2, _babelHelpers$extends3;\n\n var child = _ref2.child,\n newProps = _ref2.newProps,\n newChildProps = _ref2.newChildProps,\n nestedChildren = _ref2.nestedChildren;\n\n switch (child.type) {\n case TAG_NAMES.TITLE:\n return _extends({}, newProps, (_babelHelpers$extends2 = {}, _babelHelpers$extends2[child.type] = nestedChildren, _babelHelpers$extends2.titleAttributes = _extends({}, newChildProps), _babelHelpers$extends2));\n\n case TAG_NAMES.BODY:\n return _extends({}, newProps, {\n bodyAttributes: _extends({}, newChildProps)\n });\n\n case TAG_NAMES.HTML:\n return _extends({}, newProps, {\n htmlAttributes: _extends({}, newChildProps)\n });\n }\n\n return _extends({}, newProps, (_babelHelpers$extends3 = {}, _babelHelpers$extends3[child.type] = _extends({}, newChildProps), _babelHelpers$extends3));\n };\n\n HelmetWrapper.prototype.mapArrayTypeChildrenToProps = function mapArrayTypeChildrenToProps(arrayTypeChildren, newProps) {\n var newFlattenedProps = _extends({}, newProps);\n\n Object.keys(arrayTypeChildren).forEach(function (arrayChildName) {\n var _babelHelpers$extends4;\n\n newFlattenedProps = _extends({}, newFlattenedProps, (_babelHelpers$extends4 = {}, _babelHelpers$extends4[arrayChildName] = arrayTypeChildren[arrayChildName], _babelHelpers$extends4));\n });\n return newFlattenedProps;\n };\n\n HelmetWrapper.prototype.warnOnInvalidChildren = function warnOnInvalidChildren(child, nestedChildren) {\n if (process.env.NODE_ENV !== \"production\") {\n if (!VALID_TAG_NAMES.some(function (name) {\n return child.type === name;\n })) {\n if (typeof child.type === \"function\") {\n return warn(\"You may be attempting to nest components within each other, which is not allowed. Refer to our API for more information.\");\n }\n\n return warn(\"Only elements types \" + VALID_TAG_NAMES.join(\", \") + \" are allowed. Helmet does not support rendering <\" + child.type + \"> elements. Refer to our API for more information.\");\n }\n\n if (nestedChildren && typeof nestedChildren !== \"string\" && (!Array.isArray(nestedChildren) || nestedChildren.some(function (nestedChild) {\n return typeof nestedChild !== \"string\";\n }))) {\n throw new Error(\"Helmet expects a string as a child of <\" + child.type + \">. Did you forget to wrap your children in braces? ( <\" + child.type + \">{``}\" + child.type + \"> ) Refer to our API for more information.\");\n }\n }\n\n return true;\n };\n\n HelmetWrapper.prototype.mapChildrenToProps = function mapChildrenToProps(children, newProps) {\n var _this2 = this;\n\n var arrayTypeChildren = {};\n React.Children.forEach(children, function (child) {\n if (!child || !child.props) {\n return;\n }\n\n var _child$props = child.props,\n nestedChildren = _child$props.children,\n childProps = objectWithoutProperties(_child$props, [\"children\"]);\n var newChildProps = convertReactPropstoHtmlAttributes(childProps);\n\n _this2.warnOnInvalidChildren(child, nestedChildren);\n\n switch (child.type) {\n case TAG_NAMES.LINK:\n case TAG_NAMES.META:\n case TAG_NAMES.NOSCRIPT:\n case TAG_NAMES.SCRIPT:\n case TAG_NAMES.STYLE:\n arrayTypeChildren = _this2.flattenArrayTypeChildren({\n child: child,\n arrayTypeChildren: arrayTypeChildren,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n\n default:\n newProps = _this2.mapObjectTypeChildren({\n child: child,\n newProps: newProps,\n newChildProps: newChildProps,\n nestedChildren: nestedChildren\n });\n break;\n }\n });\n newProps = this.mapArrayTypeChildrenToProps(arrayTypeChildren, newProps);\n return newProps;\n };\n\n HelmetWrapper.prototype.render = function render() {\n var _props = this.props,\n children = _props.children,\n props = objectWithoutProperties(_props, [\"children\"]);\n\n var newProps = _extends({}, props);\n\n if (children) {\n newProps = this.mapChildrenToProps(children, newProps);\n }\n\n return React.createElement(Component, newProps);\n };\n\n createClass(HelmetWrapper, null, [{\n key: \"canUseDOM\",\n // Component.peek comes from react-side-effect:\n // For testing, you may use a static peek() method available on the returned component.\n // It lets you get the current state without resetting the mounted instance stack.\n // Don’t use it for anything other than testing.\n\n /**\n * @param {Object} base: {\"target\": \"_blank\", \"href\": \"http://mysite.com/\"}\n * @param {Object} bodyAttributes: {\"className\": \"root\"}\n * @param {String} defaultTitle: \"Default Title\"\n * @param {Boolean} defer: true\n * @param {Boolean} encodeSpecialCharacters: true\n * @param {Object} htmlAttributes: {\"lang\": \"en\", \"amp\": undefined}\n * @param {Array} link: [{\"rel\": \"canonical\", \"href\": \"http://mysite.com/example\"}]\n * @param {Array} meta: [{\"name\": \"description\", \"content\": \"Test description\"}]\n * @param {Array} noscript: [{\"innerHTML\": \"
console.log(newState)\"\n * @param {Array} script: [{\"type\": \"text/javascript\", \"src\": \"http://mysite.com/js/test.js\"}]\n * @param {Array} style: [{\"type\": \"text/css\", \"cssText\": \"div { display: block; color: blue; }\"}]\n * @param {String} title: \"Title\"\n * @param {Object} titleAttributes: {\"itemprop\": \"name\"}\n * @param {String} titleTemplate: \"MySite.com - %s\"\n */\n set: function set$$1(canUseDOM) {\n Component.canUseDOM = canUseDOM;\n }\n }]);\n return HelmetWrapper;\n }(React.Component), _class.propTypes = {\n base: PropTypes.object,\n bodyAttributes: PropTypes.object,\n children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),\n defaultTitle: PropTypes.string,\n defer: PropTypes.bool,\n encodeSpecialCharacters: PropTypes.bool,\n htmlAttributes: PropTypes.object,\n link: PropTypes.arrayOf(PropTypes.object),\n meta: PropTypes.arrayOf(PropTypes.object),\n noscript: PropTypes.arrayOf(PropTypes.object),\n onChangeClientState: PropTypes.func,\n script: PropTypes.arrayOf(PropTypes.object),\n style: PropTypes.arrayOf(PropTypes.object),\n title: PropTypes.string,\n titleAttributes: PropTypes.object,\n titleTemplate: PropTypes.string\n }, _class.defaultProps = {\n defer: true,\n encodeSpecialCharacters: true\n }, _class.peek = Component.peek, _class.rewind = function () {\n var mappedState = Component.rewind();\n\n if (!mappedState) {\n // provide fallback if mappedState is undefined\n mappedState = mapStateOnServer({\n baseTag: [],\n bodyAttributes: {},\n encodeSpecialCharacters: true,\n htmlAttributes: {},\n linkTags: [],\n metaTags: [],\n noscriptTags: [],\n scriptTags: [],\n styleTags: [],\n title: \"\",\n titleAttributes: {}\n });\n }\n\n return mappedState;\n }, _temp;\n};\n\nvar NullComponent = function NullComponent() {\n return null;\n};\n\nvar HelmetSideEffects = withSideEffect(reducePropsToState, handleClientStateChange, mapStateOnServer)(NullComponent);\nvar HelmetExport = Helmet(HelmetSideEffects);\nHelmetExport.renderStatic = HelmetExport.rewind;\nexport { HelmetExport as Helmet };","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n} // Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\n\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","export default function (series) {\n var n = series.length,\n o = new Array(n);\n\n while (--n >= 0) {\n o[n] = n;\n }\n\n return o;\n}","import colors from \"../colors.js\";\nexport default colors(\"fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2\");","/**\n * Converts `set` to an array of its values.\n *\n * @private\n * @param {Object} set The set to convert.\n * @returns {Array} Returns the values.\n */\nfunction setToArray(set) {\n var index = -1,\n result = Array(set.size);\n\n set.forEach(function(value) {\n result[++index] = value;\n });\n return result;\n}\n\nmodule.exports = setToArray;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fee6cefdae6be6550d\", \"feeddefdbe85fd8d3cd94701\", \"feeddefdbe85fd8d3ce6550da63603\", \"feeddefdd0a2fdae6bfd8d3ce6550da63603\", \"feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04\", \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04\", \"fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704\").map(colors);\nexport default ramp(scheme);","var arraySlice = require('../internals/array-slice-simple');\n\nvar floor = Math.floor;\n\nvar mergeSort = function (array, comparefn) {\n var length = array.length;\n var middle = floor(length / 2);\n return length < 8 ? insertionSort(array, comparefn) : merge(\n array,\n mergeSort(arraySlice(array, 0, middle), comparefn),\n mergeSort(arraySlice(array, middle), comparefn),\n comparefn\n );\n};\n\nvar insertionSort = function (array, comparefn) {\n var length = array.length;\n var i = 1;\n var element, j;\n\n while (i < length) {\n j = i;\n element = array[i];\n while (j && comparefn(array[j - 1], element) > 0) {\n array[j] = array[--j];\n }\n if (j !== i++) array[j] = element;\n } return array;\n};\n\nvar merge = function (array, left, right, comparefn) {\n var llength = left.length;\n var rlength = right.length;\n var lindex = 0;\n var rindex = 0;\n\n while (lindex < llength || rindex < rlength) {\n array[lindex + rindex] = (lindex < llength && rindex < rlength)\n ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++]\n : lindex < llength ? left[lindex++] : right[rindex++];\n } return array;\n};\n\nmodule.exports = mergeSort;\n","var identity = require('./identity'),\n metaMap = require('./_metaMap');\n\n/**\n * The base implementation of `setData` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n","export default function (start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}","import _slicedToArray from \"/Users/brianmiddleton/dev/2020-rails-survey-site/node_modules/@babel/runtime/helpers/esm/slicedToArray.js\";\nimport { range as sequence } from \"d3-array\";\nimport { initRange } from \"./init.js\";\nimport ordinal from \"./ordinal.js\";\nexport default function band() {\n var scale = ordinal().unknown(undefined),\n domain = scale.domain,\n ordinalRange = scale.range,\n r0 = 0,\n r1 = 1,\n step,\n bandwidth,\n round = false,\n paddingInner = 0,\n paddingOuter = 0,\n align = 0.5;\n delete scale.unknown;\n\n function rescale() {\n var n = domain().length,\n reverse = r1 < r0,\n start = reverse ? r1 : r0,\n stop = reverse ? r0 : r1;\n step = (stop - start) / Math.max(1, n - paddingInner + paddingOuter * 2);\n if (round) step = Math.floor(step);\n start += (stop - start - step * (n - paddingInner)) * align;\n bandwidth = step * (1 - paddingInner);\n if (round) start = Math.round(start), bandwidth = Math.round(bandwidth);\n var values = sequence(n).map(function (i) {\n return start + step * i;\n });\n return ordinalRange(reverse ? values.reverse() : values);\n }\n\n scale.domain = function (_) {\n return arguments.length ? (domain(_), rescale()) : domain();\n };\n\n scale.range = function (_) {\n var _ref, _ref2;\n\n return arguments.length ? ((_ref = _, _ref2 = _slicedToArray(_ref, 2), r0 = _ref2[0], r1 = _ref2[1], _ref), r0 = +r0, r1 = +r1, rescale()) : [r0, r1];\n };\n\n scale.rangeRound = function (_) {\n var _ref3, _ref4;\n\n return (_ref3 = _, _ref4 = _slicedToArray(_ref3, 2), r0 = _ref4[0], r1 = _ref4[1], _ref3), r0 = +r0, r1 = +r1, round = true, rescale();\n };\n\n scale.bandwidth = function () {\n return bandwidth;\n };\n\n scale.step = function () {\n return step;\n };\n\n scale.round = function (_) {\n return arguments.length ? (round = !!_, rescale()) : round;\n };\n\n scale.padding = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, paddingOuter = +_), rescale()) : paddingInner;\n };\n\n scale.paddingInner = function (_) {\n return arguments.length ? (paddingInner = Math.min(1, _), rescale()) : paddingInner;\n };\n\n scale.paddingOuter = function (_) {\n return arguments.length ? (paddingOuter = +_, rescale()) : paddingOuter;\n };\n\n scale.align = function (_) {\n return arguments.length ? (align = Math.max(0, Math.min(1, _)), rescale()) : align;\n };\n\n scale.copy = function () {\n return band(domain(), [r0, r1]).round(round).paddingInner(paddingInner).paddingOuter(paddingOuter).align(align);\n };\n\n return initRange.apply(rescale(), arguments);\n}\n\nfunction pointish(scale) {\n var copy = scale.copy;\n scale.padding = scale.paddingOuter;\n delete scale.paddingInner;\n delete scale.paddingOuter;\n\n scale.copy = function () {\n return pointish(copy());\n };\n\n return scale;\n}\n\nexport function point() {\n return pointish(band.apply(null, arguments).paddingInner(1));\n}","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar dateTag = '[object Date]';\n\n/**\n * The base implementation of `_.isDate` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a date object, else `false`.\n */\nfunction baseIsDate(value) {\n return isObjectLike(value) && baseGetTag(value) == dateTag;\n}\n\nmodule.exports = baseIsDate;\n","var getAllKeys = require('./_getAllKeys');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1;\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * A specialized version of `baseIsEqualDeep` for objects with support for\n * partial deep comparisons.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.\n * @param {Function} customizer The function to customize comparisons.\n * @param {Function} equalFunc The function to determine equivalents of values.\n * @param {Object} stack Tracks traversed `object` and `other` objects.\n * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.\n */\nfunction equalObjects(object, other, bitmask, customizer, equalFunc, stack) {\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG,\n objProps = getAllKeys(object),\n objLength = objProps.length,\n othProps = getAllKeys(other),\n othLength = othProps.length;\n\n if (objLength != othLength && !isPartial) {\n return false;\n }\n var index = objLength;\n while (index--) {\n var key = objProps[index];\n if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {\n return false;\n }\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked && stack.get(other)) {\n return stacked == other;\n }\n var result = true;\n stack.set(object, other);\n stack.set(other, object);\n\n var skipCtor = isPartial;\n while (++index < objLength) {\n key = objProps[index];\n var objValue = object[key],\n othValue = other[key];\n\n if (customizer) {\n var compared = isPartial\n ? customizer(othValue, objValue, key, other, object, stack)\n : customizer(objValue, othValue, key, object, other, stack);\n }\n // Recursively compare objects (susceptible to call stack limits).\n if (!(compared === undefined\n ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))\n : compared\n )) {\n result = false;\n break;\n }\n skipCtor || (skipCtor = key == 'constructor');\n }\n if (result && !skipCtor) {\n var objCtor = object.constructor,\n othCtor = other.constructor;\n\n // Non `Object` object instances with different constructors are not equal.\n if (objCtor != othCtor &&\n ('constructor' in object && 'constructor' in other) &&\n !(typeof objCtor == 'function' && objCtor instanceof objCtor &&\n typeof othCtor == 'function' && othCtor instanceof othCtor)) {\n result = false;\n }\n }\n stack['delete'](object);\n stack['delete'](other);\n return result;\n}\n\nmodule.exports = equalObjects;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","import colors from \"../colors.js\";\nexport default colors(\"b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc\");","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"af8dc3f7f7f77fbf7b\", \"7b3294c2a5cfa6dba0008837\", \"7b3294c2a5cff7f7f7a6dba0008837\", \"762a83af8dc3e7d4e8d9f0d37fbf7b1b7837\", \"762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837\", \"762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837\", \"762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837\", \"40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b\", \"40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b\").map(colors);\nexport default ramp(scheme);","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fc8d59ffffbf91cf60\", \"d7191cfdae61a6d96a1a9641\", \"d7191cfdae61ffffbfa6d96a1a9641\", \"d73027fc8d59fee08bd9ef8b91cf601a9850\", \"d73027fc8d59fee08bffffbfd9ef8b91cf601a9850\", \"d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850\", \"d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850\", \"a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837\", \"a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837\").map(colors);\nexport default ramp(scheme);","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignMergeValue;\n","/**\n * Gets the number of `placeholder` occurrences in `array`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} placeholder The placeholder to search for.\n * @returns {number} Returns the placeholder count.\n */\nfunction countHolders(array, placeholder) {\n var length = array.length,\n result = 0;\n\n while (length--) {\n if (array[length] === placeholder) {\n ++result;\n }\n }\n return result;\n}\n\nmodule.exports = countHolders;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","var isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nexports['default'] = spring;\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nvar _presets = require('./presets');\n\nvar _presets2 = _interopRequireDefault(_presets);\n\nvar defaultConfig = _extends({}, _presets2['default'].noWobble, {\n precision: 0.01\n});\n\nfunction spring(val, config) {\n return _extends({}, defaultConfig, config, {\n val: val\n });\n}\n\nmodule.exports = exports['default'];","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","// turn {x: {val: 1, stiffness: 1, damping: 2}, y: 2} generated by\n// `{x: spring(1, {stiffness: 1, damping: 2}), y: 2}` into {x: 1, y: 2}\n'use strict';\n\nexports.__esModule = true;\nexports['default'] = stripStyle;\n\nfunction stripStyle(style) {\n var ret = {};\n\n for (var key in style) {\n if (!Object.prototype.hasOwnProperty.call(style, key)) {\n continue;\n }\n\n ret[key] = typeof style[key] === 'number' ? style[key] : style[key].val;\n }\n\n return ret;\n}\n\nmodule.exports = exports['default'];","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"ece7f2a6bddb2b8cbe\", \"f1eef6bdc9e174a9cf0570b0\", \"f1eef6bdc9e174a9cf2b8cbe045a8d\", \"f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d\", \"f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b\", \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b\", \"fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858\").map(colors);\nexport default ramp(scheme);","/** Used to match wrap detail comments. */\nvar reWrapDetails = /\\{\\n\\/\\* \\[wrapped with (.+)\\] \\*/,\n reSplitDetails = /,? & /;\n\n/**\n * Extracts wrapper details from the `source` body comment.\n *\n * @private\n * @param {string} source The source to inspect.\n * @returns {Array} Returns the wrapper details.\n */\nfunction getWrapDetails(source) {\n var match = source.match(reWrapDetails);\n return match ? match[1].split(reSplitDetails) : [];\n}\n\nmodule.exports = getWrapDetails;\n","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nfunction shouldStopAnimationAll(currentStyles, styles, currentVelocities) {\n for (var i = 0; i < currentStyles.length; i++) {\n if (!_shouldStopAnimation2['default'](currentStyles[i], styles[i], currentVelocities[i])) {\n return false;\n }\n }\n\n return true;\n}\n\nvar StaggeredMotion = function (_React$Component) {\n _inherits(StaggeredMotion, _React$Component);\n\n _createClass(StaggeredMotion, null, [{\n key: 'propTypes',\n value: {\n // TOOD: warn against putting a config in here\n defaultStyles: _propTypes2['default'].arrayOf(_propTypes2['default'].objectOf(_propTypes2['default'].number)),\n styles: _propTypes2['default'].func.isRequired,\n children: _propTypes2['default'].func.isRequired\n },\n enumerable: true\n }]);\n\n function StaggeredMotion(props) {\n var _this = this;\n\n _classCallCheck(this, StaggeredMotion);\n\n _React$Component.call(this, props);\n\n this.animationID = null;\n this.prevTime = 0;\n this.accumulatedTime = 0;\n this.unreadPropStyles = null;\n\n this.clearUnreadPropStyle = function (unreadPropStyles) {\n var _state = _this.state;\n var currentStyles = _state.currentStyles;\n var currentVelocities = _state.currentVelocities;\n var lastIdealStyles = _state.lastIdealStyles;\n var lastIdealVelocities = _state.lastIdealVelocities;\n var someDirty = false;\n\n for (var i = 0; i < unreadPropStyles.length; i++) {\n var unreadPropStyle = unreadPropStyles[i];\n var dirty = false;\n\n for (var key in unreadPropStyle) {\n if (!Object.prototype.hasOwnProperty.call(unreadPropStyle, key)) {\n continue;\n }\n\n var styleValue = unreadPropStyle[key];\n\n if (typeof styleValue === 'number') {\n if (!dirty) {\n dirty = true;\n someDirty = true;\n currentStyles[i] = _extends({}, currentStyles[i]);\n currentVelocities[i] = _extends({}, currentVelocities[i]);\n lastIdealStyles[i] = _extends({}, lastIdealStyles[i]);\n lastIdealVelocities[i] = _extends({}, lastIdealVelocities[i]);\n }\n\n currentStyles[i][key] = styleValue;\n currentVelocities[i][key] = 0;\n lastIdealStyles[i][key] = styleValue;\n lastIdealVelocities[i][key] = 0;\n }\n }\n }\n\n if (someDirty) {\n _this.setState({\n currentStyles: currentStyles,\n currentVelocities: currentVelocities,\n lastIdealStyles: lastIdealStyles,\n lastIdealVelocities: lastIdealVelocities\n });\n }\n };\n\n this.startAnimationIfNecessary = function () {\n // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n // call cb? No, otherwise accidental parent rerender causes cb trigger\n _this.animationID = _raf2['default'](function (timestamp) {\n var destStyles = _this.props.styles(_this.state.lastIdealStyles); // check if we need to animate in the first place\n\n\n if (shouldStopAnimationAll(_this.state.currentStyles, destStyles, _this.state.currentVelocities)) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n _this.accumulatedTime = 0;\n return;\n }\n\n var currentTime = timestamp || _performanceNow2['default']();\n\n var timeDelta = currentTime - _this.prevTime;\n _this.prevTime = currentTime;\n _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n if (_this.accumulatedTime > msPerFrame * 10) {\n _this.accumulatedTime = 0;\n }\n\n if (_this.accumulatedTime === 0) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n\n _this.startAnimationIfNecessary();\n\n return;\n }\n\n var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n var newLastIdealStyles = [];\n var newLastIdealVelocities = [];\n var newCurrentStyles = [];\n var newCurrentVelocities = [];\n\n for (var i = 0; i < destStyles.length; i++) {\n var destStyle = destStyles[i];\n var newCurrentStyle = {};\n var newCurrentVelocity = {};\n var newLastIdealStyle = {};\n var newLastIdealVelocity = {};\n\n for (var key in destStyle) {\n if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n continue;\n }\n\n var styleValue = destStyle[key];\n\n if (typeof styleValue === 'number') {\n newCurrentStyle[key] = styleValue;\n newCurrentVelocity[key] = 0;\n newLastIdealStyle[key] = styleValue;\n newLastIdealVelocity[key] = 0;\n } else {\n var newLastIdealStyleValue = _this.state.lastIdealStyles[i][key];\n var newLastIdealVelocityValue = _this.state.lastIdealVelocities[i][key];\n\n for (var j = 0; j < framesToCatchUp; j++) {\n var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n newLastIdealStyleValue = _stepper[0];\n newLastIdealVelocityValue = _stepper[1];\n }\n\n var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n var nextIdealX = _stepper2[0];\n var nextIdealV = _stepper2[1];\n newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n newLastIdealStyle[key] = newLastIdealStyleValue;\n newLastIdealVelocity[key] = newLastIdealVelocityValue;\n }\n }\n\n newCurrentStyles[i] = newCurrentStyle;\n newCurrentVelocities[i] = newCurrentVelocity;\n newLastIdealStyles[i] = newLastIdealStyle;\n newLastIdealVelocities[i] = newLastIdealVelocity;\n }\n\n _this.animationID = null; // the amount we're looped over above\n\n _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n _this.setState({\n currentStyles: newCurrentStyles,\n currentVelocities: newCurrentVelocities,\n lastIdealStyles: newLastIdealStyles,\n lastIdealVelocities: newLastIdealVelocities\n });\n\n _this.unreadPropStyles = null;\n\n _this.startAnimationIfNecessary();\n });\n };\n\n this.state = this.defaultState();\n }\n\n StaggeredMotion.prototype.defaultState = function defaultState() {\n var _props = this.props;\n var defaultStyles = _props.defaultStyles;\n var styles = _props.styles;\n var currentStyles = defaultStyles || styles().map(_stripStyle2['default']);\n var currentVelocities = currentStyles.map(function (currentStyle) {\n return _mapToZero2['default'](currentStyle);\n });\n return {\n currentStyles: currentStyles,\n currentVelocities: currentVelocities,\n lastIdealStyles: currentStyles,\n lastIdealVelocities: currentVelocities\n };\n };\n\n StaggeredMotion.prototype.componentDidMount = function componentDidMount() {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n };\n\n StaggeredMotion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n if (this.unreadPropStyles != null) {\n // previous props haven't had the chance to be set yet; set them here\n this.clearUnreadPropStyle(this.unreadPropStyles);\n }\n\n this.unreadPropStyles = props.styles(this.state.lastIdealStyles);\n\n if (this.animationID == null) {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n }\n };\n\n StaggeredMotion.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.animationID != null) {\n _raf2['default'].cancel(this.animationID);\n\n this.animationID = null;\n }\n };\n\n StaggeredMotion.prototype.render = function render() {\n var renderedChildren = this.props.children(this.state.currentStyles);\n return renderedChildren && _react2['default'].Children.only(renderedChildren);\n };\n\n return StaggeredMotion;\n}(_react2['default'].Component);\n\nexports['default'] = StaggeredMotion;\nmodule.exports = exports['default']; // it's possible that currentStyle's value is stale: if props is immediately\n// changed from 0 to 400 to spring(0) again, the async currentStyle is still\n// at 0 (didn't have time to tick and interpolate even once). If we naively\n// compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n// In reality currentStyle should be 400\n// after checking for unreadPropStyles != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","var baseMatches = require('./_baseMatches'),\n baseMatchesProperty = require('./_baseMatchesProperty'),\n identity = require('./identity'),\n isArray = require('./isArray'),\n property = require('./property');\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nmodule.exports = baseIteratee;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"e5f5e0a1d99b31a354\", \"edf8e9bae4b374c476238b45\", \"edf8e9bae4b374c47631a354006d2c\", \"edf8e9c7e9c0a1d99b74c47631a354006d2c\", \"edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32\", \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32\", \"f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b\").map(colors);\nexport default ramp(scheme);","/**\n * This method returns `undefined`.\n *\n * @static\n * @memberOf _\n * @since 2.3.0\n * @category Util\n * @example\n *\n * _.times(2, _.noop);\n * // => [undefined, undefined]\n */\nfunction noop() {\n // No operation performed.\n}\n\nmodule.exports = noop;\n","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar setTag = '[object Set]';\n\n/**\n * The base implementation of `_.isSet` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a set, else `false`.\n */\nfunction baseIsSet(value) {\n return isObjectLike(value) && getTag(value) == setTag;\n}\n\nmodule.exports = baseIsSet;\n","import colors from \"../colors.js\";\nexport default colors(\"a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928\");","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fc8d59ffffbf91bfdb\", \"d7191cfdae61abd9e92c7bb6\", \"d7191cfdae61ffffbfabd9e92c7bb6\", \"d73027fc8d59fee090e0f3f891bfdb4575b4\", \"d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4\", \"d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4\", \"d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4\", \"a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695\", \"a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695\").map(colors);\nexport default ramp(scheme);","var baseIsEqualDeep = require('./_baseIsEqualDeep'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * The base implementation of `_.isEqual` which supports partial comparisons\n * and tracks traversed objects.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Unordered comparison\n * 2 - Partial comparison\n * @param {Function} [customizer] The function to customize comparisons.\n * @param {Object} [stack] Tracks traversed `value` and `other` objects.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n */\nfunction baseIsEqual(value, other, bitmask, customizer, stack) {\n if (value === other) {\n return true;\n }\n if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {\n return value !== value && other !== other;\n }\n return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);\n}\n\nmodule.exports = baseIsEqual;\n","export var slice = Array.prototype.slice;","import { slice } from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nexport default function () {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var kz = keys.apply(this, arguments),\n i,\n m = data.length,\n n = kz.length,\n sz = new Array(n),\n oz;\n\n for (i = 0; i < n; ++i) {\n for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n si[j] = sij = [0, +value(data[j], ki, j, data)];\n sij.data = data[j];\n }\n\n si.key = ki;\n }\n\n for (i = 0, oz = order(sz); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function (_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n };\n\n stack.value = function (_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function (_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n };\n\n stack.offset = function (_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _setStatic = _interopRequireDefault(require(\"./setStatic\"));\n\nvar setPropTypes = function setPropTypes(propTypes) {\n return (0, _setStatic.default)('propTypes', propTypes);\n};\n\nvar _default = setPropTypes;\nexports.default = _default;","var cloneArrayBuffer = require('./_cloneArrayBuffer'),\n cloneDataView = require('./_cloneDataView'),\n cloneRegExp = require('./_cloneRegExp'),\n cloneSymbol = require('./_cloneSymbol'),\n cloneTypedArray = require('./_cloneTypedArray');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n symbolTag = '[object Symbol]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Initializes an object clone based on its `toStringTag`.\n *\n * **Note:** This function only supports cloning values with tags of\n * `Boolean`, `Date`, `Error`, `Map`, `Number`, `RegExp`, `Set`, or `String`.\n *\n * @private\n * @param {Object} object The object to clone.\n * @param {string} tag The `toStringTag` of the object to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneByTag(object, tag, isDeep) {\n var Ctor = object.constructor;\n switch (tag) {\n case arrayBufferTag:\n return cloneArrayBuffer(object);\n\n case boolTag:\n case dateTag:\n return new Ctor(+object);\n\n case dataViewTag:\n return cloneDataView(object, isDeep);\n\n case float32Tag: case float64Tag:\n case int8Tag: case int16Tag: case int32Tag:\n case uint8Tag: case uint8ClampedTag: case uint16Tag: case uint32Tag:\n return cloneTypedArray(object, isDeep);\n\n case mapTag:\n return new Ctor;\n\n case numberTag:\n case stringTag:\n return new Ctor(object);\n\n case regexpTag:\n return cloneRegExp(object);\n\n case setTag:\n return new Ctor;\n\n case symbolTag:\n return cloneSymbol(object);\n }\n}\n\nmodule.exports = initCloneByTag;\n","\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\n\nexports.__esModule = true;\nexports.default = void 0;\n\nvar _extends2 = _interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));\n\nvar _wrapDisplayName = _interopRequireDefault(require(\"./wrapDisplayName\"));\n\nvar _setDisplayName = _interopRequireDefault(require(\"./setDisplayName\"));\n\nvar _mapProps = _interopRequireDefault(require(\"./mapProps\"));\n\nvar withProps = function withProps(input) {\n var hoc = (0, _mapProps.default)(function (props) {\n return (0, _extends2.default)({}, props, typeof input === 'function' ? input(props) : input);\n });\n\n if (process.env.NODE_ENV !== 'production') {\n return function (BaseComponent) {\n return (0, _setDisplayName.default)((0, _wrapDisplayName.default)(BaseComponent, 'withProps'))(hoc(BaseComponent));\n };\n }\n\n return hoc;\n};\n\nvar _default = withProps;\nexports.default = _default;","'use strict';\n\nexports.__esModule = true;\n\nvar _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n};\n\nvar _createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ('value' in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n 'default': obj\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError('Cannot call a class as a function');\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== 'function' && superClass !== null) {\n throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nvar _mapToZero = require('./mapToZero');\n\nvar _mapToZero2 = _interopRequireDefault(_mapToZero);\n\nvar _stripStyle = require('./stripStyle');\n\nvar _stripStyle2 = _interopRequireDefault(_stripStyle);\n\nvar _stepper3 = require('./stepper');\n\nvar _stepper4 = _interopRequireDefault(_stepper3);\n\nvar _performanceNow = require('performance-now');\n\nvar _performanceNow2 = _interopRequireDefault(_performanceNow);\n\nvar _raf = require('raf');\n\nvar _raf2 = _interopRequireDefault(_raf);\n\nvar _shouldStopAnimation = require('./shouldStopAnimation');\n\nvar _shouldStopAnimation2 = _interopRequireDefault(_shouldStopAnimation);\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar msPerFrame = 1000 / 60;\n\nvar Motion = function (_React$Component) {\n _inherits(Motion, _React$Component);\n\n _createClass(Motion, null, [{\n key: 'propTypes',\n value: {\n // TOOD: warn against putting a config in here\n defaultStyle: _propTypes2['default'].objectOf(_propTypes2['default'].number),\n style: _propTypes2['default'].objectOf(_propTypes2['default'].oneOfType([_propTypes2['default'].number, _propTypes2['default'].object])).isRequired,\n children: _propTypes2['default'].func.isRequired,\n onRest: _propTypes2['default'].func\n },\n enumerable: true\n }]);\n\n function Motion(props) {\n var _this = this;\n\n _classCallCheck(this, Motion);\n\n _React$Component.call(this, props);\n\n this.wasAnimating = false;\n this.animationID = null;\n this.prevTime = 0;\n this.accumulatedTime = 0;\n this.unreadPropStyle = null;\n\n this.clearUnreadPropStyle = function (destStyle) {\n var dirty = false;\n var _state = _this.state;\n var currentStyle = _state.currentStyle;\n var currentVelocity = _state.currentVelocity;\n var lastIdealStyle = _state.lastIdealStyle;\n var lastIdealVelocity = _state.lastIdealVelocity;\n\n for (var key in destStyle) {\n if (!Object.prototype.hasOwnProperty.call(destStyle, key)) {\n continue;\n }\n\n var styleValue = destStyle[key];\n\n if (typeof styleValue === 'number') {\n if (!dirty) {\n dirty = true;\n currentStyle = _extends({}, currentStyle);\n currentVelocity = _extends({}, currentVelocity);\n lastIdealStyle = _extends({}, lastIdealStyle);\n lastIdealVelocity = _extends({}, lastIdealVelocity);\n }\n\n currentStyle[key] = styleValue;\n currentVelocity[key] = 0;\n lastIdealStyle[key] = styleValue;\n lastIdealVelocity[key] = 0;\n }\n }\n\n if (dirty) {\n _this.setState({\n currentStyle: currentStyle,\n currentVelocity: currentVelocity,\n lastIdealStyle: lastIdealStyle,\n lastIdealVelocity: lastIdealVelocity\n });\n }\n };\n\n this.startAnimationIfNecessary = function () {\n // TODO: when config is {a: 10} and dest is {a: 10} do we raf once and\n // call cb? No, otherwise accidental parent rerender causes cb trigger\n _this.animationID = _raf2['default'](function (timestamp) {\n // check if we need to animate in the first place\n var propsStyle = _this.props.style;\n\n if (_shouldStopAnimation2['default'](_this.state.currentStyle, propsStyle, _this.state.currentVelocity)) {\n if (_this.wasAnimating && _this.props.onRest) {\n _this.props.onRest();\n } // no need to cancel animationID here; shouldn't have any in flight\n\n\n _this.animationID = null;\n _this.wasAnimating = false;\n _this.accumulatedTime = 0;\n return;\n }\n\n _this.wasAnimating = true;\n\n var currentTime = timestamp || _performanceNow2['default']();\n\n var timeDelta = currentTime - _this.prevTime;\n _this.prevTime = currentTime;\n _this.accumulatedTime = _this.accumulatedTime + timeDelta; // more than 10 frames? prolly switched browser tab. Restart\n\n if (_this.accumulatedTime > msPerFrame * 10) {\n _this.accumulatedTime = 0;\n }\n\n if (_this.accumulatedTime === 0) {\n // no need to cancel animationID here; shouldn't have any in flight\n _this.animationID = null;\n\n _this.startAnimationIfNecessary();\n\n return;\n }\n\n var currentFrameCompletion = (_this.accumulatedTime - Math.floor(_this.accumulatedTime / msPerFrame) * msPerFrame) / msPerFrame;\n var framesToCatchUp = Math.floor(_this.accumulatedTime / msPerFrame);\n var newLastIdealStyle = {};\n var newLastIdealVelocity = {};\n var newCurrentStyle = {};\n var newCurrentVelocity = {};\n\n for (var key in propsStyle) {\n if (!Object.prototype.hasOwnProperty.call(propsStyle, key)) {\n continue;\n }\n\n var styleValue = propsStyle[key];\n\n if (typeof styleValue === 'number') {\n newCurrentStyle[key] = styleValue;\n newCurrentVelocity[key] = 0;\n newLastIdealStyle[key] = styleValue;\n newLastIdealVelocity[key] = 0;\n } else {\n var newLastIdealStyleValue = _this.state.lastIdealStyle[key];\n var newLastIdealVelocityValue = _this.state.lastIdealVelocity[key];\n\n for (var i = 0; i < framesToCatchUp; i++) {\n var _stepper = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n newLastIdealStyleValue = _stepper[0];\n newLastIdealVelocityValue = _stepper[1];\n }\n\n var _stepper2 = _stepper4['default'](msPerFrame / 1000, newLastIdealStyleValue, newLastIdealVelocityValue, styleValue.val, styleValue.stiffness, styleValue.damping, styleValue.precision);\n\n var nextIdealX = _stepper2[0];\n var nextIdealV = _stepper2[1];\n newCurrentStyle[key] = newLastIdealStyleValue + (nextIdealX - newLastIdealStyleValue) * currentFrameCompletion;\n newCurrentVelocity[key] = newLastIdealVelocityValue + (nextIdealV - newLastIdealVelocityValue) * currentFrameCompletion;\n newLastIdealStyle[key] = newLastIdealStyleValue;\n newLastIdealVelocity[key] = newLastIdealVelocityValue;\n }\n }\n\n _this.animationID = null; // the amount we're looped over above\n\n _this.accumulatedTime -= framesToCatchUp * msPerFrame;\n\n _this.setState({\n currentStyle: newCurrentStyle,\n currentVelocity: newCurrentVelocity,\n lastIdealStyle: newLastIdealStyle,\n lastIdealVelocity: newLastIdealVelocity\n });\n\n _this.unreadPropStyle = null;\n\n _this.startAnimationIfNecessary();\n });\n };\n\n this.state = this.defaultState();\n }\n\n Motion.prototype.defaultState = function defaultState() {\n var _props = this.props;\n var defaultStyle = _props.defaultStyle;\n var style = _props.style;\n\n var currentStyle = defaultStyle || _stripStyle2['default'](style);\n\n var currentVelocity = _mapToZero2['default'](currentStyle);\n\n return {\n currentStyle: currentStyle,\n currentVelocity: currentVelocity,\n lastIdealStyle: currentStyle,\n lastIdealVelocity: currentVelocity\n };\n }; // it's possible that currentStyle's value is stale: if props is immediately\n // changed from 0 to 400 to spring(0) again, the async currentStyle is still\n // at 0 (didn't have time to tick and interpolate even once). If we naively\n // compare currentStyle with destVal it'll be 0 === 0 (no animation, stop).\n // In reality currentStyle should be 400\n\n\n Motion.prototype.componentDidMount = function componentDidMount() {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n };\n\n Motion.prototype.componentWillReceiveProps = function componentWillReceiveProps(props) {\n if (this.unreadPropStyle != null) {\n // previous props haven't had the chance to be set yet; set them here\n this.clearUnreadPropStyle(this.unreadPropStyle);\n }\n\n this.unreadPropStyle = props.style;\n\n if (this.animationID == null) {\n this.prevTime = _performanceNow2['default']();\n this.startAnimationIfNecessary();\n }\n };\n\n Motion.prototype.componentWillUnmount = function componentWillUnmount() {\n if (this.animationID != null) {\n _raf2['default'].cancel(this.animationID);\n\n this.animationID = null;\n }\n };\n\n Motion.prototype.render = function render() {\n var renderedChildren = this.props.children(this.state.currentStyle);\n return renderedChildren && _react2['default'].Children.only(renderedChildren);\n };\n\n return Motion;\n}(_react2['default'].Component);\n\nexports['default'] = Motion;\nmodule.exports = exports['default']; // after checking for unreadPropStyle != null, we manually go set the\n// non-interpolating values (those that are a number, without a spring\n// config)","var now = require('performance-now'),\n root = typeof window === 'undefined' ? global : window,\n vendors = ['moz', 'webkit'],\n suffix = 'AnimationFrame',\n raf = root['request' + suffix],\n caf = root['cancel' + suffix] || root['cancelRequest' + suffix];\n\nfor (var i = 0; !raf && i < vendors.length; i++) {\n raf = root[vendors[i] + 'Request' + suffix];\n caf = root[vendors[i] + 'Cancel' + suffix] || root[vendors[i] + 'CancelRequest' + suffix];\n} // Some versions of FF have rAF but not cAF\n\n\nif (!raf || !caf) {\n var last = 0,\n id = 0,\n queue = [],\n frameDuration = 1000 / 60;\n\n raf = function raf(callback) {\n if (queue.length === 0) {\n var _now = now(),\n next = Math.max(0, frameDuration - (_now - last));\n\n last = next + _now;\n setTimeout(function () {\n var cp = queue.slice(0); // Clear queue here to prevent\n // callbacks from appending listeners\n // to the current frame's queue\n\n queue.length = 0;\n\n for (var i = 0; i < cp.length; i++) {\n if (!cp[i].cancelled) {\n try {\n cp[i].callback(last);\n } catch (e) {\n setTimeout(function () {\n throw e;\n }, 0);\n }\n }\n }\n }, Math.round(next));\n }\n\n queue.push({\n handle: ++id,\n callback: callback,\n cancelled: false\n });\n return id;\n };\n\n caf = function caf(handle) {\n for (var i = 0; i < queue.length; i++) {\n if (queue[i].handle === handle) {\n queue[i].cancelled = true;\n }\n }\n };\n}\n\nmodule.exports = function (fn) {\n // Wrap in a new function to prevent\n // `cancel` potentially being assigned\n // to the native rAF function\n return raf.call(root, fn);\n};\n\nmodule.exports.cancel = function () {\n caf.apply(root, arguments);\n};\n\nmodule.exports.polyfill = function (object) {\n if (!object) {\n object = root;\n }\n\n object.requestAnimationFrame = raf;\n object.cancelAnimationFrame = caf;\n};","var LazyWrapper = require('./_LazyWrapper'),\n LodashWrapper = require('./_LodashWrapper'),\n copyArray = require('./_copyArray');\n\n/**\n * Creates a clone of `wrapper`.\n *\n * @private\n * @param {Object} wrapper The wrapper to clone.\n * @returns {Object} Returns the cloned wrapper.\n */\nfunction wrapperClone(wrapper) {\n if (wrapper instanceof LazyWrapper) {\n return wrapper.clone();\n }\n var result = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);\n result.__actions__ = copyArray(wrapper.__actions__);\n result.__index__ = wrapper.__index__;\n result.__values__ = wrapper.__values__;\n return result;\n}\n\nmodule.exports = wrapperClone;\n","/**\n * Checks if a `cache` value for `key` exists.\n *\n * @private\n * @param {Object} cache The cache to query.\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction cacheHas(cache, key) {\n return cache.has(key);\n}\n\nmodule.exports = cacheHas;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var baseFlatten = require('./_baseFlatten'),\n baseOrderBy = require('./_baseOrderBy'),\n baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates an array of elements, sorted in ascending order by the results of\n * running each element in a collection thru each iteratee. This method\n * performs a stable sort, that is, it preserves the original sort order of\n * equal elements. The iteratees are invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {...(Function|Function[])} [iteratees=[_.identity]]\n * The iteratees to sort by.\n * @returns {Array} Returns the new sorted array.\n * @example\n *\n * var users = [\n * { 'user': 'fred', 'age': 48 },\n * { 'user': 'barney', 'age': 36 },\n * { 'user': 'fred', 'age': 40 },\n * { 'user': 'barney', 'age': 34 }\n * ];\n *\n * _.sortBy(users, [function(o) { return o.user; }]);\n * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]\n */\nvar sortBy = baseRest(function(collection, iteratees) {\n if (collection == null) {\n return [];\n }\n var length = iteratees.length;\n if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {\n iteratees = [];\n } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {\n iteratees = [iteratees[0]];\n }\n return baseOrderBy(collection, baseFlatten(iteratees, 1), []);\n});\n\nmodule.exports = sortBy;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates an array that is the composition of partially applied arguments,\n * placeholders, and provided arguments into a single array of arguments.\n *\n * @private\n * @param {Array} args The provided arguments.\n * @param {Array} partials The arguments to prepend to those provided.\n * @param {Array} holders The `partials` placeholder indexes.\n * @params {boolean} [isCurried] Specify composing for a curried function.\n * @returns {Array} Returns the new array of composed arguments.\n */\nfunction composeArgs(args, partials, holders, isCurried) {\n var argsIndex = -1,\n argsLength = args.length,\n holdersLength = holders.length,\n leftIndex = -1,\n leftLength = partials.length,\n rangeLength = nativeMax(argsLength - holdersLength, 0),\n result = Array(leftLength + rangeLength),\n isUncurried = !isCurried;\n\n while (++leftIndex < leftLength) {\n result[leftIndex] = partials[leftIndex];\n }\n while (++argsIndex < holdersLength) {\n if (isUncurried || argsIndex < argsLength) {\n result[holders[argsIndex]] = args[argsIndex];\n }\n }\n while (rangeLength--) {\n result[leftIndex++] = args[argsIndex++];\n }\n return result;\n}\n\nmodule.exports = composeArgs;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n/** Used to stand-in for `undefined` hash values. */\n\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n/** Used as references for various `Number` constants. */\n\nvar INFINITY = 1 / 0;\n/** `Object#toString` result references. */\n\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n/** Used to match property names within property paths. */\n\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\n\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n/** Used to match backslashes in property paths. */\n\nvar reEscapeChar = /\\\\(\\\\)?/g;\n/** Used to detect host constructors (Safari). */\n\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n/** Detect free variable `global` from Node.js. */\n\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n/** Detect free variable `self`. */\n\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n/** Used as a reference to the global object. */\n\nvar root = freeGlobal || freeSelf || Function('return this')();\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\n\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\n\n\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n\n return result;\n}\n/** Used for built-in method references. */\n\n\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to detect overreaching core-js shims. */\n\nvar coreJsData = root['__core-js_shared__'];\n/** Used to detect methods masquerading as native. */\n\nvar maskSrcKey = function () {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? 'Symbol(src)_1.' + uid : '';\n}();\n/** Used to resolve the decompiled source of functions. */\n\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/** Used to detect if a method is native. */\n\nvar reIsNative = RegExp('^' + funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&').replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$');\n/** Built-in value references. */\n\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n/* Built-in method references that are verified to be native. */\n\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n/** Used to convert symbols to primitives and strings. */\n\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\n\n\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction hashGet(key) {\n var data = this.__data__;\n\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\n\n\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = nativeCreate && value === undefined ? HASH_UNDEFINED : value;\n return this;\n} // Add methods to `Hash`.\n\n\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\n\n\nfunction listCacheClear() {\n this.__data__ = [];\n}\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n\n var lastIndex = data.length - 1;\n\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n\n return true;\n}\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n return index < 0 ? undefined : data[index][1];\n}\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\n\n\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n\n return this;\n} // Add methods to `ListCache`.\n\n\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\n\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n this.clear();\n\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\n\n\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash(),\n 'map': new (Map || ListCache)(),\n 'string': new Hash()\n };\n}\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\n\n\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\n\n\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\n\n\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\n\n\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n} // Add methods to `MapCache`.\n\n\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\n\nfunction assocIndexOf(array, key) {\n var length = array.length;\n\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n\n return -1;\n}\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\n\n\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n\n return index && index == length ? object : undefined;\n}\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\n\n\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n\n var pattern = isFunction(value) || isHostObject(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\n\n\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\n\n\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\n\n\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key) ? data[typeof key == 'string' ? 'string' : 'hash'] : data.map;\n}\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\n\n\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\n\n\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n\n var type = typeof value;\n\n if (type == 'number' || type == 'symbol' || type == 'boolean' || value == null || isSymbol(value)) {\n return true;\n }\n\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object(object);\n}\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\n\n\nfunction isKeyable(value) {\n var type = typeof value;\n return type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean' ? value !== '__proto__' : value === null;\n}\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\n\n\nfunction isMasked(func) {\n return !!maskSrcKey && maskSrcKey in func;\n}\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\n\n\nvar stringToPath = memoize(function (string) {\n string = toString(string);\n var result = [];\n\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n\n string.replace(rePropName, function (match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : number || match);\n });\n return result;\n});\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\n\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n\n var result = value + '';\n return result == '0' && 1 / value == -INFINITY ? '-0' : result;\n}\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\n\n\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n\n try {\n return func + '';\n } catch (e) {}\n }\n\n return '';\n}\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\n\n\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || resolver && typeof resolver != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n\n var memoized = function memoized() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n\n memoized.cache = new (memoize.Cache || MapCache)();\n return memoized;\n} // Assign cache to `_.memoize`.\n\n\nmemoize.Cache = MapCache;\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\n\nfunction eq(value, other) {\n return value === other || value !== value && other !== other;\n}\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\n\n\nvar isArray = Array.isArray;\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\n\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\n\n\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\n\n\nfunction isSymbol(value) {\n return typeof value == 'symbol' || isObjectLike(value) && objectToString.call(value) == symbolTag;\n}\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\n\n\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\n\n\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Initializes an array clone.\n *\n * @private\n * @param {Array} array The array to clone.\n * @returns {Array} Returns the initialized clone.\n */\nfunction initCloneArray(array) {\n var length = array.length,\n result = new array.constructor(length);\n\n // Add properties assigned by `RegExp#exec`.\n if (length && typeof array[0] == 'string' && hasOwnProperty.call(array, 'index')) {\n result.index = array.index;\n result.input = array.input;\n }\n return result;\n}\n\nmodule.exports = initCloneArray;\n","var cloneArrayBuffer = require('./_cloneArrayBuffer');\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\nmodule.exports = cloneTypedArray;\n","import colors from \"../colors.js\";\nimport ramp from \"../ramp.js\";\nexport var scheme = new Array(3).concat(\"fee8c8fdbb84e34a33\", \"fef0d9fdcc8afc8d59d7301f\", \"fef0d9fdcc8afc8d59e34a33b30000\", \"fef0d9fdd49efdbb84fc8d59e34a33b30000\", \"fef0d9fdd49efdbb84fc8d59ef6548d7301f990000\", \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000\", \"fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000\").map(colors);\nexport default ramp(scheme);","export default function () {}","import noop from \"../noop.js\";\nimport { point as _point } from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x2, this._y2);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x2 = x, this._y2 = y;\n break;\n\n case 1:\n this._point = 2;\n this._x3 = x, this._y3 = y;\n break;\n\n case 2:\n this._point = 3;\n this._x4 = x, this._y4 = y;\n\n this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6);\n\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new BasisClosed(context);\n}","import { point as _point } from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n var x0 = (this._x0 + 4 * this._x1 + x) / 6,\n y0 = (this._y0 + 4 * this._y1 + y) / 6;\n this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\nexport default function (context) {\n return new BasisOpen(context);\n}","import { Basis } from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function lineStart() {\n this._x = [];\n this._y = [];\n\n this._basis.lineStart();\n },\n lineEnd: function lineEnd() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n\n this._basis.point(this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), this._beta * y[i] + (1 - this._beta) * (y0 + t * dy));\n }\n }\n\n this._x = this._y = null;\n\n this._basis.lineEnd();\n },\n point: function point(x, y) {\n this._x.push(+x);\n\n this._y.push(+y);\n }\n};\nexport default (function custom(beta) {\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function (beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);","function _point(that, x, y) {\n that._context.bezierCurveTo(that._x1 + that._k * (that._x2 - that._x0), that._y1 + that._k * (that._y2 - that._y0), that._x2 + that._k * (that._x1 - x), that._y2 + that._k * (that._y1 - y), that._x2, that._y2);\n}\n\nexport { _point as point };\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinal.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x2, this._y2);\n\n break;\n\n case 3:\n _point(this, this._x1, this._y1);\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n this._x1 = x, this._y1 = y;\n break;\n\n case 2:\n this._point = 3;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import noop from \"../noop.js\";\nimport { point as _point } from \"./cardinal.js\";\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.lineTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x3 = x, this._y3 = y;\n break;\n\n case 1:\n this._point = 2;\n\n this._context.moveTo(this._x4 = x, this._y4 = y);\n\n break;\n\n case 2:\n this._point = 3;\n this._x5 = x, this._y5 = y;\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import { point as _point } from \"./cardinal.js\";\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\nCardinalOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(tension) {\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function (tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);","import { epsilon } from \"../math.js\";\nimport { Cardinal } from \"./cardinal.js\";\n\nfunction _point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nexport { _point as point };\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x2, this._y2);\n\n break;\n\n case 3:\n this.point(this._x2, this._y2);\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import { CardinalClosed } from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 1:\n {\n this._context.moveTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 2:\n {\n this._context.lineTo(this._x3, this._y3);\n\n this._context.closePath();\n\n break;\n }\n\n case 3:\n {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._x3 = x, this._y3 = y;\n break;\n\n case 1:\n this._point = 2;\n\n this._context.moveTo(this._x4 = x, this._y4 = y);\n\n break;\n\n case 2:\n this._point = 3;\n this._x5 = x, this._y5 = y;\n break;\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import { CardinalOpen } from \"./cardinalOpen.js\";\nimport { point as _point } from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._x2 = this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0:\n this._point = 1;\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2);\n break;\n\n case 3:\n this._point = 4;\n // proceed\n\n default:\n _point(this, x, y);\n\n break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\nexport default (function custom(alpha) {\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function (alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function lineStart() {\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (this._point) this._context.closePath();\n },\n point: function point(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);else this._point = 1, this._context.moveTo(x, y);\n }\n};\nexport default function (context) {\n return new LinearClosed(context);\n}","function sign(x) {\n return x < 0 ? -1 : 1;\n} // Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\n\n\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n} // Calculate a one-sided slope.\n\n\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n} // According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\n\n\nfunction _point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x0 = this._x1 = this._y0 = this._y1 = this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n switch (this._point) {\n case 2:\n this._context.lineTo(this._x1, this._y1);\n\n break;\n\n case 3:\n _point(this, this._t0, slope2(this, this._t0));\n\n break;\n }\n\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function point(x, y) {\n var t1 = NaN;\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n break;\n\n case 2:\n this._point = 3;\n\n _point(this, slope2(this, t1 = slope3(this, x, y)), t1);\n\n break;\n\n default:\n _point(this, this._t0, t1 = slope3(this, x, y));\n\n break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n};\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function (x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function moveTo(x, y) {\n this._context.moveTo(y, x);\n },\n closePath: function closePath() {\n this._context.closePath();\n },\n lineTo: function lineTo(x, y) {\n this._context.lineTo(y, x);\n },\n bezierCurveTo: function bezierCurveTo(x1, y1, x2, y2, x, y) {\n this._context.bezierCurveTo(y1, x1, y2, x2, y, x);\n }\n};\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function lineEnd() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || this._line !== 0 && n === 1) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function point(x, y) {\n this._x.push(+x);\n\n this._y.push(+y);\n }\n}; // See https://www.particleincell.com/2012/bezier-splines/ for derivation.\n\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n\n for (i = 1; i < n - 1; ++i) {\n a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n }\n\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n\n for (i = 1; i < n; ++i) {\n m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n }\n\n a[n - 1] = r[n - 1] / b[n - 1];\n\n for (i = n - 2; i >= 0; --i) {\n a[i] = (r[i] - a[i + 1]) / b[i];\n }\n\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n\n for (i = 0; i < n - 1; ++i) {\n b[i] = 2 * x[i + 1] - a[i + 1];\n }\n\n return [a, b];\n}\n\nexport default function (context) {\n return new Natural(context);\n}","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function areaStart() {\n this._line = 0;\n },\n areaEnd: function areaEnd() {\n this._line = NaN;\n },\n lineStart: function lineStart() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function lineEnd() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function point(x, y) {\n x = +x, y = +y;\n\n switch (this._point) {\n case 0:\n this._point = 1;\n this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y);\n break;\n\n case 1:\n this._point = 2;\n // proceed\n\n default:\n {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n\n this._context.lineTo(x1, this._y);\n\n this._context.lineTo(x1, y);\n }\n\n break;\n }\n }\n\n this._x = x, this._y = y;\n }\n};\nexport default function (context) {\n return new Step(context, 0.5);\n}\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\nexport function stepAfter(context) {\n return new Step(context, 1);\n}","import \"core-js/modules/es.array.sort.js\";\nimport none from \"./none.js\";\nexport default function (series) {\n var sums = series.map(sum);\n return none(series).sort(function (a, b) {\n return sums[a] - sums[b];\n });\n}\nexport function sum(series) {\n var s = 0,\n i = -1,\n n = series.length,\n v;\n\n while (++i < n) {\n if (v = +series[i][1]) s += v;\n }\n\n return s;\n}","import \"core-js/modules/es.array.sort.js\";\nimport none from \"./none.js\";\nexport default function (series) {\n var peaks = series.map(peak);\n return none(series).sort(function (a, b) {\n return peaks[a] - peaks[b];\n });\n}\n\nfunction peak(series) {\n var i = -1,\n j = 0,\n n = series.length,\n vi,\n vj = -Infinity;\n\n while (++i < n) {\n if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n }\n\n return j;\n}","import appearance from \"./appearance.js\";\nimport { sum } from \"./ascending.js\";\nexport default function (series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (x1 - x0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.y0 = y0, node.y1 = y1;\n node.x0 = x0, node.x1 = x0 += node.value * k;\n }\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n node,\n i = -1,\n n = nodes.length,\n k = parent.value && (y1 - y0) / parent.value;\n\n while (++i < n) {\n node = nodes[i], node.x0 = x0, node.x1 = x1;\n node.y0 = y0, node.y1 = y0 += node.value * k;\n }\n}","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nexport var phi = (1 + Math.sqrt(5)) / 2;\nexport function squarifyRatio(ratio, parent, x0, y0, x1, y1) {\n var rows = [],\n nodes = parent.children,\n row,\n nodeValue,\n i0 = 0,\n i1 = 0,\n n = nodes.length,\n dx,\n dy,\n value = parent.value,\n sumValue,\n minValue,\n maxValue,\n newRatio,\n minRatio,\n alpha,\n beta;\n\n while (i0 < n) {\n dx = x1 - x0, dy = y1 - y0; // Find the next non-empty node.\n\n do {\n sumValue = nodes[i1++].value;\n } while (!sumValue && i1 < n);\n\n minValue = maxValue = sumValue;\n alpha = Math.max(dy / dx, dx / dy) / (value * ratio);\n beta = sumValue * sumValue * alpha;\n minRatio = Math.max(maxValue / beta, beta / minValue); // Keep adding nodes while the aspect ratio maintains or improves.\n\n for (; i1 < n; ++i1) {\n sumValue += nodeValue = nodes[i1].value;\n if (nodeValue < minValue) minValue = nodeValue;\n if (nodeValue > maxValue) maxValue = nodeValue;\n beta = sumValue * sumValue * alpha;\n newRatio = Math.max(maxValue / beta, beta / minValue);\n\n if (newRatio > minRatio) {\n sumValue -= nodeValue;\n break;\n }\n\n minRatio = newRatio;\n } // Position and record the row orientation.\n\n\n rows.push(row = {\n value: sumValue,\n dice: dx < dy,\n children: nodes.slice(i0, i1)\n });\n if (row.dice) treemapDice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);else treemapSlice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);\n value -= sumValue, i0 = i1;\n }\n\n return rows;\n}\nexport default (function custom(ratio) {\n function squarify(parent, x0, y0, x1, y1) {\n squarifyRatio(ratio, parent, x0, y0, x1, y1);\n }\n\n squarify.ratio = function (x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return squarify;\n})(phi);","import treemapDice from \"./dice.js\";\nimport treemapSlice from \"./slice.js\";\nimport { phi, squarifyRatio } from \"./squarify.js\";\nexport default (function custom(ratio) {\n function resquarify(parent, x0, y0, x1, y1) {\n if ((rows = parent._squarify) && rows.ratio === ratio) {\n var rows,\n row,\n nodes,\n i,\n j = -1,\n n,\n m = rows.length,\n value = parent.value;\n\n while (++j < m) {\n row = rows[j], nodes = row.children;\n\n for (i = row.value = 0, n = nodes.length; i < n; ++i) {\n row.value += nodes[i].value;\n }\n\n if (row.dice) treemapDice(row, x0, y0, x1, y0 += (y1 - y0) * row.value / value);else treemapSlice(row, x0, y0, x0 += (x1 - x0) * row.value / value, y1);\n value -= row.value;\n }\n } else {\n parent._squarify = rows = squarifyRatio(ratio, parent, x0, y0, x1, y1);\n rows.ratio = ratio;\n }\n }\n\n resquarify.ratio = function (x) {\n return custom((x = +x) > 1 ? x : 1);\n };\n\n return resquarify;\n})(phi);","function count(node) {\n var sum = 0,\n children = node.children,\n i = children && children.length;\n if (!i) sum = 1;else while (--i >= 0) {\n sum += children[i].value;\n }\n node.value = sum;\n}\n\nexport default function () {\n return this.eachAfter(count);\n}","import node_count from \"./count.js\";\nimport node_each from \"./each.js\";\nimport node_eachBefore from \"./eachBefore.js\";\nimport node_eachAfter from \"./eachAfter.js\";\nimport node_sum from \"./sum.js\";\nimport node_sort from \"./sort.js\";\nimport node_path from \"./path.js\";\nimport node_ancestors from \"./ancestors.js\";\nimport node_descendants from \"./descendants.js\";\nimport node_leaves from \"./leaves.js\";\nimport node_links from \"./links.js\";\nexport default function hierarchy(data, children) {\n var root = new Node(data),\n valued = +data.value && (root.value = data.value),\n node,\n nodes = [root],\n child,\n childs,\n i,\n n;\n if (children == null) children = defaultChildren;\n\n while (node = nodes.pop()) {\n if (valued) node.value = +node.data.value;\n\n if ((childs = children(node.data)) && (n = childs.length)) {\n node.children = new Array(n);\n\n for (i = n - 1; i >= 0; --i) {\n nodes.push(child = node.children[i] = new Node(childs[i]));\n child.parent = node;\n child.depth = node.depth + 1;\n }\n }\n }\n\n return root.eachBefore(computeHeight);\n}\n\nfunction node_copy() {\n return hierarchy(this).eachBefore(copyData);\n}\n\nfunction defaultChildren(d) {\n return d.children;\n}\n\nfunction copyData(node) {\n node.data = node.data.data;\n}\n\nexport function computeHeight(node) {\n var height = 0;\n\n do {\n node.height = height;\n } while ((node = node.parent) && node.height < ++height);\n}\nexport function Node(data) {\n this.data = data;\n this.depth = this.height = 0;\n this.parent = null;\n}\nNode.prototype = hierarchy.prototype = {\n constructor: Node,\n count: node_count,\n each: node_each,\n eachAfter: node_eachAfter,\n eachBefore: node_eachBefore,\n sum: node_sum,\n sort: node_sort,\n path: node_path,\n ancestors: node_ancestors,\n descendants: node_descendants,\n leaves: node_leaves,\n links: node_links,\n copy: node_copy\n};","export default function (callback) {\n var node = this,\n current,\n next = [node],\n children,\n i,\n n;\n\n do {\n current = next.reverse(), next = [];\n\n while (node = current.pop()) {\n callback(node), children = node.children;\n if (children) for (i = 0, n = children.length; i < n; ++i) {\n next.push(children[i]);\n }\n }\n } while (next.length);\n\n return this;\n}","export default function (callback) {\n var node = this,\n nodes = [node],\n next = [],\n children,\n i,\n n;\n\n while (node = nodes.pop()) {\n next.push(node), children = node.children;\n if (children) for (i = 0, n = children.length; i < n; ++i) {\n nodes.push(children[i]);\n }\n }\n\n while (node = next.pop()) {\n callback(node);\n }\n\n return this;\n}","export default function (callback) {\n var node = this,\n nodes = [node],\n children,\n i;\n\n while (node = nodes.pop()) {\n callback(node), children = node.children;\n if (children) for (i = children.length - 1; i >= 0; --i) {\n nodes.push(children[i]);\n }\n }\n\n return this;\n}","export default function (value) {\n return this.eachAfter(function (node) {\n var sum = +value(node.data) || 0,\n children = node.children,\n i = children && children.length;\n\n while (--i >= 0) {\n sum += children[i].value;\n }\n\n node.value = sum;\n });\n}","import \"core-js/modules/es.array.sort.js\";\nexport default function (compare) {\n return this.eachBefore(function (node) {\n if (node.children) {\n node.children.sort(compare);\n }\n });\n}","export default function (end) {\n var start = this,\n ancestor = leastCommonAncestor(start, end),\n nodes = [start];\n\n while (start !== ancestor) {\n start = start.parent;\n nodes.push(start);\n }\n\n var k = nodes.length;\n\n while (end !== ancestor) {\n nodes.splice(k, 0, end);\n end = end.parent;\n }\n\n return nodes;\n}\n\nfunction leastCommonAncestor(a, b) {\n if (a === b) return a;\n var aNodes = a.ancestors(),\n bNodes = b.ancestors(),\n c = null;\n a = aNodes.pop();\n b = bNodes.pop();\n\n while (a === b) {\n c = a;\n a = aNodes.pop();\n b = bNodes.pop();\n }\n\n return c;\n}","export default function () {\n var node = this,\n nodes = [node];\n\n while (node = node.parent) {\n nodes.push(node);\n }\n\n return nodes;\n}","export default function () {\n var nodes = [];\n this.each(function (node) {\n nodes.push(node);\n });\n return nodes;\n}","export default function () {\n var leaves = [];\n this.eachBefore(function (node) {\n if (!node.children) {\n leaves.push(node);\n }\n });\n return leaves;\n}","export default function () {\n var root = this,\n links = [];\n root.each(function (node) {\n if (node !== root) {\n // Don’t include the root’s parent, if any.\n links.push({\n source: node.parent,\n target: node\n });\n }\n });\n return links;\n}","export default function (x) {\n return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString(\"en\").replace(/,/g, \"\") : x.toString(10);\n} // Computes the decimal coefficient and exponent of the specified number x with\n// significant digits p, where x is positive and p is in [1, 21] or undefined.\n// For example, formatDecimalParts(1.23) returns [\"123\", 0].\n\nexport function formatDecimalParts(x, p) {\n if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf(\"e\")) < 0) return null; // NaN, ±Infinity\n\n var i,\n coefficient = x.slice(0, i); // The string returned by toExponential either has the form \\d\\.\\d+e[-+]\\d+\n // (e.g., 1.2e+3) or the form \\de[-+]\\d+ (e.g., 1e+3).\n\n return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x) {\n return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;\n}","// [[fill]align][sign][symbol][0][width][,][.precision][~][type]\nvar re = /^(?:(.)?([<>=^]))?([+\\-( ])?([$#])?(0)?(\\d+)?(,)?(\\.\\d+)?(~)?([a-z%])?$/i;\nexport default function formatSpecifier(specifier) {\n if (!(match = re.exec(specifier))) throw new Error(\"invalid format: \" + specifier);\n var match;\n return new FormatSpecifier({\n fill: match[1],\n align: match[2],\n sign: match[3],\n symbol: match[4],\n zero: match[5],\n width: match[6],\n comma: match[7],\n precision: match[8] && match[8].slice(1),\n trim: match[9],\n type: match[10]\n });\n}\nformatSpecifier.prototype = FormatSpecifier.prototype; // instanceof\n\nexport function FormatSpecifier(specifier) {\n this.fill = specifier.fill === undefined ? \" \" : specifier.fill + \"\";\n this.align = specifier.align === undefined ? \">\" : specifier.align + \"\";\n this.sign = specifier.sign === undefined ? \"-\" : specifier.sign + \"\";\n this.symbol = specifier.symbol === undefined ? \"\" : specifier.symbol + \"\";\n this.zero = !!specifier.zero;\n this.width = specifier.width === undefined ? undefined : +specifier.width;\n this.comma = !!specifier.comma;\n this.precision = specifier.precision === undefined ? undefined : +specifier.precision;\n this.trim = !!specifier.trim;\n this.type = specifier.type === undefined ? \"\" : specifier.type + \"\";\n}\n\nFormatSpecifier.prototype.toString = function () {\n return this.fill + this.align + this.sign + this.symbol + (this.zero ? \"0\" : \"\") + (this.width === undefined ? \"\" : Math.max(1, this.width | 0)) + (this.comma ? \",\" : \"\") + (this.precision === undefined ? \"\" : \".\" + Math.max(0, this.precision | 0)) + (this.trim ? \"~\" : \"\") + this.type;\n};","// Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.\nexport default function (s) {\n out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {\n switch (s[i]) {\n case \".\":\n i0 = i1 = i;\n break;\n\n case \"0\":\n if (i0 === 0) i0 = i;\n i1 = i;\n break;\n\n default:\n if (!+s[i]) break out;\n if (i0 > 0) i0 = 0;\n break;\n }\n }\n\n return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport var prefixExponent;\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1],\n i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1,\n n = coefficient.length;\n return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join(\"0\") : i > 0 ? coefficient.slice(0, i) + \".\" + coefficient.slice(i) : \"0.\" + new Array(1 - i).join(\"0\") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var format;\nexport var formatPrefix;\ndefaultLocale({\n decimal: \".\",\n thousands: \",\",\n grouping: [3],\n currency: [\"$\", \"\"],\n minus: \"-\"\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n format = locale.format;\n formatPrefix = locale.formatPrefix;\n return locale;\n}","import { formatDecimalParts } from \"./formatDecimal.js\";\nexport default function (x, p) {\n var d = formatDecimalParts(x, p);\n if (!d) return x + \"\";\n var coefficient = d[0],\n exponent = d[1];\n return exponent < 0 ? \"0.\" + new Array(-exponent).join(\"0\") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + \".\" + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join(\"0\");\n}","import formatDecimal from \"./formatDecimal.js\";\nimport formatPrefixAuto from \"./formatPrefixAuto.js\";\nimport formatRounded from \"./formatRounded.js\";\nexport default {\n \"%\": function _(x, p) {\n return (x * 100).toFixed(p);\n },\n \"b\": function b(x) {\n return Math.round(x).toString(2);\n },\n \"c\": function c(x) {\n return x + \"\";\n },\n \"d\": formatDecimal,\n \"e\": function e(x, p) {\n return x.toExponential(p);\n },\n \"f\": function f(x, p) {\n return x.toFixed(p);\n },\n \"g\": function g(x, p) {\n return x.toPrecision(p);\n },\n \"o\": function o(x) {\n return Math.round(x).toString(8);\n },\n \"p\": function p(x, _p) {\n return formatRounded(x * 100, _p);\n },\n \"r\": formatRounded,\n \"s\": formatPrefixAuto,\n \"X\": function X(x) {\n return Math.round(x).toString(16).toUpperCase();\n },\n \"x\": function x(_x) {\n return Math.round(_x).toString(16);\n }\n};","export default function (x) {\n return x;\n}","import exponent from \"./exponent.js\";\nimport formatGroup from \"./formatGroup.js\";\nimport formatNumerals from \"./formatNumerals.js\";\nimport formatSpecifier from \"./formatSpecifier.js\";\nimport formatTrim from \"./formatTrim.js\";\nimport formatTypes from \"./formatTypes.js\";\nimport { prefixExponent } from \"./formatPrefixAuto.js\";\nimport identity from \"./identity.js\";\nvar map = Array.prototype.map,\n prefixes = [\"y\", \"z\", \"a\", \"f\", \"p\", \"n\", \"µ\", \"m\", \"\", \"k\", \"M\", \"G\", \"T\", \"P\", \"E\", \"Z\", \"Y\"];\nexport default function (locale) {\n var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + \"\"),\n currencyPrefix = locale.currency === undefined ? \"\" : locale.currency[0] + \"\",\n currencySuffix = locale.currency === undefined ? \"\" : locale.currency[1] + \"\",\n decimal = locale.decimal === undefined ? \".\" : locale.decimal + \"\",\n numerals = locale.numerals === undefined ? identity : formatNumerals(map.call(locale.numerals, String)),\n percent = locale.percent === undefined ? \"%\" : locale.percent + \"\",\n minus = locale.minus === undefined ? \"-\" : locale.minus + \"\",\n nan = locale.nan === undefined ? \"NaN\" : locale.nan + \"\";\n\n function newFormat(specifier) {\n specifier = formatSpecifier(specifier);\n var fill = specifier.fill,\n align = specifier.align,\n sign = specifier.sign,\n symbol = specifier.symbol,\n zero = specifier.zero,\n width = specifier.width,\n comma = specifier.comma,\n precision = specifier.precision,\n trim = specifier.trim,\n type = specifier.type; // The \"n\" type is an alias for \",g\".\n\n if (type === \"n\") comma = true, type = \"g\"; // The \"\" type, and any invalid type, is an alias for \".12~g\".\n else if (!formatTypes[type]) precision === undefined && (precision = 12), trim = true, type = \"g\"; // If zero fill is specified, padding goes after sign and before digits.\n\n if (zero || fill === \"0\" && align === \"=\") zero = true, fill = \"0\", align = \"=\"; // Compute the prefix and suffix.\n // For SI-prefix, the suffix is lazily computed.\n\n var prefix = symbol === \"$\" ? currencyPrefix : symbol === \"#\" && /[boxX]/.test(type) ? \"0\" + type.toLowerCase() : \"\",\n suffix = symbol === \"$\" ? currencySuffix : /[%p]/.test(type) ? percent : \"\"; // What format function should we use?\n // Is this an integer type?\n // Can this type generate exponential notation?\n\n var formatType = formatTypes[type],\n maybeSuffix = /[defgprs%]/.test(type); // Set the default precision if not specified,\n // or clamp the specified precision to the supported range.\n // For significant precision, it must be in [1, 21].\n // For fixed precision, it must be in [0, 20].\n\n precision = precision === undefined ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));\n\n function format(value) {\n var valuePrefix = prefix,\n valueSuffix = suffix,\n i,\n n,\n c;\n\n if (type === \"c\") {\n valueSuffix = formatType(value) + valueSuffix;\n value = \"\";\n } else {\n value = +value; // Determine the sign. -0 is not less than 0, but 1 / -0 is!\n\n var valueNegative = value < 0 || 1 / value < 0; // Perform the initial formatting.\n\n value = isNaN(value) ? nan : formatType(Math.abs(value), precision); // Trim insignificant zeros.\n\n if (trim) value = formatTrim(value); // If a negative value rounds to zero after formatting, and no explicit positive sign is requested, hide the sign.\n\n if (valueNegative && +value === 0 && sign !== \"+\") valueNegative = false; // Compute the prefix and suffix.\n\n valuePrefix = (valueNegative ? sign === \"(\" ? sign : minus : sign === \"-\" || sign === \"(\" ? \"\" : sign) + valuePrefix;\n valueSuffix = (type === \"s\" ? prefixes[8 + prefixExponent / 3] : \"\") + valueSuffix + (valueNegative && sign === \"(\" ? \")\" : \"\"); // Break the formatted value into the integer “value” part that can be\n // grouped, and fractional or exponential “suffix” part that is not.\n\n if (maybeSuffix) {\n i = -1, n = value.length;\n\n while (++i < n) {\n if (c = value.charCodeAt(i), 48 > c || c > 57) {\n valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix;\n value = value.slice(0, i);\n break;\n }\n }\n }\n } // If the fill character is not \"0\", grouping is applied before padding.\n\n\n if (comma && !zero) value = group(value, Infinity); // Compute the padding.\n\n var length = valuePrefix.length + value.length + valueSuffix.length,\n padding = length < width ? new Array(width - length + 1).join(fill) : \"\"; // If the fill character is \"0\", grouping is applied after padding.\n\n if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = \"\"; // Reconstruct the final output based on the desired alignment.\n\n switch (align) {\n case \"<\":\n value = valuePrefix + value + valueSuffix + padding;\n break;\n\n case \"=\":\n value = valuePrefix + padding + value + valueSuffix;\n break;\n\n case \"^\":\n value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);\n break;\n\n default:\n value = padding + valuePrefix + value + valueSuffix;\n break;\n }\n\n return numerals(value);\n }\n\n format.toString = function () {\n return specifier + \"\";\n };\n\n return format;\n }\n\n function formatPrefix(specifier, value) {\n var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = \"f\", specifier)),\n e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3,\n k = Math.pow(10, -e),\n prefix = prefixes[8 + e / 3];\n return function (value) {\n return f(k * value) + prefix;\n };\n }\n\n return {\n format: newFormat,\n formatPrefix: formatPrefix\n };\n}","export default function (grouping, thousands) {\n return function (value, width) {\n var i = value.length,\n t = [],\n j = 0,\n g = grouping[0],\n length = 0;\n\n while (i > 0 && g > 0) {\n if (length + g + 1 > width) g = Math.max(1, width - length);\n t.push(value.substring(i -= g, i + g));\n if ((length += g + 1) > width) break;\n g = grouping[j = (j + 1) % grouping.length];\n }\n\n return t.reverse().join(thousands);\n };\n}","export default function (numerals) {\n return function (value) {\n return value.replace(/[0-9]/g, function (i) {\n return numerals[+i];\n });\n };\n}","var t0 = new Date(),\n t1 = new Date();\nexport default function newInterval(floori, offseti, count, field) {\n function interval(date) {\n return floori(date = arguments.length === 0 ? new Date() : new Date(+date)), date;\n }\n\n interval.floor = function (date) {\n return floori(date = new Date(+date)), date;\n };\n\n interval.ceil = function (date) {\n return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;\n };\n\n interval.round = function (date) {\n var d0 = interval(date),\n d1 = interval.ceil(date);\n return date - d0 < d1 - date ? d0 : d1;\n };\n\n interval.offset = function (date, step) {\n return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;\n };\n\n interval.range = function (start, stop, step) {\n var range = [],\n previous;\n start = interval.ceil(start);\n step = step == null ? 1 : Math.floor(step);\n if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date\n\n do {\n range.push(previous = new Date(+start)), offseti(start, step), floori(start);\n } while (previous < start && start < stop);\n\n return range;\n };\n\n interval.filter = function (test) {\n return newInterval(function (date) {\n if (date >= date) while (floori(date), !test(date)) {\n date.setTime(date - 1);\n }\n }, function (date, step) {\n if (date >= date) {\n if (step < 0) while (++step <= 0) {\n while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty\n\n } else while (--step >= 0) {\n while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty\n\n }\n }\n });\n };\n\n if (count) {\n interval.count = function (start, end) {\n t0.setTime(+start), t1.setTime(+end);\n floori(t0), floori(t1);\n return Math.floor(count(t0, t1));\n };\n\n interval.every = function (step) {\n step = Math.floor(step);\n return !isFinite(step) || !(step > 0) ? null : !(step > 1) ? interval : interval.filter(field ? function (d) {\n return field(d) % step === 0;\n } : function (d) {\n return interval.count(0, d) % step === 0;\n });\n };\n }\n\n return interval;\n}","import interval from \"./interval.js\";\nimport { durationWeek } from \"./duration.js\";\n\nfunction utcWeekday(i) {\n return interval(function (date) {\n date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step * 7);\n }, function (start, end) {\n return (end - start) / durationWeek;\n });\n}\n\nexport var utcSunday = utcWeekday(0);\nexport var utcMonday = utcWeekday(1);\nexport var utcTuesday = utcWeekday(2);\nexport var utcWednesday = utcWeekday(3);\nexport var utcThursday = utcWeekday(4);\nexport var utcFriday = utcWeekday(5);\nexport var utcSaturday = utcWeekday(6);\nexport var utcSundays = utcSunday.range;\nexport var utcMondays = utcMonday.range;\nexport var utcTuesdays = utcTuesday.range;\nexport var utcWednesdays = utcWednesday.range;\nexport var utcThursdays = utcThursday.range;\nexport var utcFridays = utcFriday.range;\nexport var utcSaturdays = utcSaturday.range;","export var durationSecond = 1e3;\nexport var durationMinute = 6e4;\nexport var durationHour = 36e5;\nexport var durationDay = 864e5;\nexport var durationWeek = 6048e5;","import interval from \"./interval.js\";\nimport { durationDay } from \"./duration.js\";\nvar utcDay = interval(function (date) {\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCDate(date.getUTCDate() + step);\n}, function (start, end) {\n return (end - start) / durationDay;\n}, function (date) {\n return date.getUTCDate() - 1;\n});\nexport default utcDay;\nexport var utcDays = utcDay.range;","import interval from \"./interval.js\";\nimport { durationMinute, durationWeek } from \"./duration.js\";\n\nfunction weekday(i) {\n return interval(function (date) {\n date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setDate(date.getDate() + step * 7);\n }, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;\n });\n}\n\nexport var sunday = weekday(0);\nexport var monday = weekday(1);\nexport var tuesday = weekday(2);\nexport var wednesday = weekday(3);\nexport var thursday = weekday(4);\nexport var friday = weekday(5);\nexport var saturday = weekday(6);\nexport var sundays = sunday.range;\nexport var mondays = monday.range;\nexport var tuesdays = tuesday.range;\nexport var wednesdays = wednesday.range;\nexport var thursdays = thursday.range;\nexport var fridays = friday.range;\nexport var saturdays = saturday.range;","import interval from \"./interval.js\";\nimport { durationDay, durationMinute } from \"./duration.js\";\nvar day = interval(function (date) {\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setDate(date.getDate() + step);\n}, function (start, end) {\n return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;\n}, function (date) {\n return date.getDate() - 1;\n});\nexport default day;\nexport var days = day.range;","import interval from \"./interval.js\";\nvar year = interval(function (date) {\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setFullYear(date.getFullYear() + step);\n}, function (start, end) {\n return end.getFullYear() - start.getFullYear();\n}, function (date) {\n return date.getFullYear();\n}); // An optimized implementation for this simple case.\n\nyear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setFullYear(Math.floor(date.getFullYear() / k) * k);\n date.setMonth(0, 1);\n date.setHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setFullYear(date.getFullYear() + step * k);\n });\n};\n\nexport default year;\nexport var years = year.range;","import interval from \"./interval.js\";\nvar utcYear = interval(function (date) {\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n}, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step);\n}, function (start, end) {\n return end.getUTCFullYear() - start.getUTCFullYear();\n}, function (date) {\n return date.getUTCFullYear();\n}); // An optimized implementation for this simple case.\n\nutcYear.every = function (k) {\n return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : interval(function (date) {\n date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);\n date.setUTCMonth(0, 1);\n date.setUTCHours(0, 0, 0, 0);\n }, function (date, step) {\n date.setUTCFullYear(date.getUTCFullYear() + step * k);\n });\n};\n\nexport default utcYear;\nexport var utcYears = utcYear.range;","import { timeDay, timeSunday, timeMonday, timeThursday, timeYear, utcDay, utcSunday, utcMonday, utcThursday, utcYear } from \"d3-time\";\n\nfunction localDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);\n date.setFullYear(d.y);\n return date;\n }\n\n return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);\n}\n\nfunction utcDate(d) {\n if (0 <= d.y && d.y < 100) {\n var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));\n date.setUTCFullYear(d.y);\n return date;\n }\n\n return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));\n}\n\nfunction newDate(y, m, d) {\n return {\n y: y,\n m: m,\n d: d,\n H: 0,\n M: 0,\n S: 0,\n L: 0\n };\n}\n\nexport default function formatLocale(locale) {\n var locale_dateTime = locale.dateTime,\n locale_date = locale.date,\n locale_time = locale.time,\n locale_periods = locale.periods,\n locale_weekdays = locale.days,\n locale_shortWeekdays = locale.shortDays,\n locale_months = locale.months,\n locale_shortMonths = locale.shortMonths;\n var periodRe = formatRe(locale_periods),\n periodLookup = formatLookup(locale_periods),\n weekdayRe = formatRe(locale_weekdays),\n weekdayLookup = formatLookup(locale_weekdays),\n shortWeekdayRe = formatRe(locale_shortWeekdays),\n shortWeekdayLookup = formatLookup(locale_shortWeekdays),\n monthRe = formatRe(locale_months),\n monthLookup = formatLookup(locale_months),\n shortMonthRe = formatRe(locale_shortMonths),\n shortMonthLookup = formatLookup(locale_shortMonths);\n var formats = {\n \"a\": formatShortWeekday,\n \"A\": formatWeekday,\n \"b\": formatShortMonth,\n \"B\": formatMonth,\n \"c\": null,\n \"d\": formatDayOfMonth,\n \"e\": formatDayOfMonth,\n \"f\": formatMicroseconds,\n \"g\": formatYearISO,\n \"G\": formatFullYearISO,\n \"H\": formatHour24,\n \"I\": formatHour12,\n \"j\": formatDayOfYear,\n \"L\": formatMilliseconds,\n \"m\": formatMonthNumber,\n \"M\": formatMinutes,\n \"p\": formatPeriod,\n \"q\": formatQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatSeconds,\n \"u\": formatWeekdayNumberMonday,\n \"U\": formatWeekNumberSunday,\n \"V\": formatWeekNumberISO,\n \"w\": formatWeekdayNumberSunday,\n \"W\": formatWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatYear,\n \"Y\": formatFullYear,\n \"Z\": formatZone,\n \"%\": formatLiteralPercent\n };\n var utcFormats = {\n \"a\": formatUTCShortWeekday,\n \"A\": formatUTCWeekday,\n \"b\": formatUTCShortMonth,\n \"B\": formatUTCMonth,\n \"c\": null,\n \"d\": formatUTCDayOfMonth,\n \"e\": formatUTCDayOfMonth,\n \"f\": formatUTCMicroseconds,\n \"g\": formatUTCYearISO,\n \"G\": formatUTCFullYearISO,\n \"H\": formatUTCHour24,\n \"I\": formatUTCHour12,\n \"j\": formatUTCDayOfYear,\n \"L\": formatUTCMilliseconds,\n \"m\": formatUTCMonthNumber,\n \"M\": formatUTCMinutes,\n \"p\": formatUTCPeriod,\n \"q\": formatUTCQuarter,\n \"Q\": formatUnixTimestamp,\n \"s\": formatUnixTimestampSeconds,\n \"S\": formatUTCSeconds,\n \"u\": formatUTCWeekdayNumberMonday,\n \"U\": formatUTCWeekNumberSunday,\n \"V\": formatUTCWeekNumberISO,\n \"w\": formatUTCWeekdayNumberSunday,\n \"W\": formatUTCWeekNumberMonday,\n \"x\": null,\n \"X\": null,\n \"y\": formatUTCYear,\n \"Y\": formatUTCFullYear,\n \"Z\": formatUTCZone,\n \"%\": formatLiteralPercent\n };\n var parses = {\n \"a\": parseShortWeekday,\n \"A\": parseWeekday,\n \"b\": parseShortMonth,\n \"B\": parseMonth,\n \"c\": parseLocaleDateTime,\n \"d\": parseDayOfMonth,\n \"e\": parseDayOfMonth,\n \"f\": parseMicroseconds,\n \"g\": parseYear,\n \"G\": parseFullYear,\n \"H\": parseHour24,\n \"I\": parseHour24,\n \"j\": parseDayOfYear,\n \"L\": parseMilliseconds,\n \"m\": parseMonthNumber,\n \"M\": parseMinutes,\n \"p\": parsePeriod,\n \"q\": parseQuarter,\n \"Q\": parseUnixTimestamp,\n \"s\": parseUnixTimestampSeconds,\n \"S\": parseSeconds,\n \"u\": parseWeekdayNumberMonday,\n \"U\": parseWeekNumberSunday,\n \"V\": parseWeekNumberISO,\n \"w\": parseWeekdayNumberSunday,\n \"W\": parseWeekNumberMonday,\n \"x\": parseLocaleDate,\n \"X\": parseLocaleTime,\n \"y\": parseYear,\n \"Y\": parseFullYear,\n \"Z\": parseZone,\n \"%\": parseLiteralPercent\n }; // These recursive directive definitions must be deferred.\n\n formats.x = newFormat(locale_date, formats);\n formats.X = newFormat(locale_time, formats);\n formats.c = newFormat(locale_dateTime, formats);\n utcFormats.x = newFormat(locale_date, utcFormats);\n utcFormats.X = newFormat(locale_time, utcFormats);\n utcFormats.c = newFormat(locale_dateTime, utcFormats);\n\n function newFormat(specifier, formats) {\n return function (date) {\n var string = [],\n i = -1,\n j = 0,\n n = specifier.length,\n c,\n pad,\n format;\n if (!(date instanceof Date)) date = new Date(+date);\n\n while (++i < n) {\n if (specifier.charCodeAt(i) === 37) {\n string.push(specifier.slice(j, i));\n if ((pad = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);else pad = c === \"e\" ? \" \" : \"0\";\n if (format = formats[c]) c = format(date, pad);\n string.push(c);\n j = i + 1;\n }\n }\n\n string.push(specifier.slice(j, i));\n return string.join(\"\");\n };\n }\n\n function newParse(specifier, Z) {\n return function (string) {\n var d = newDate(1900, undefined, 1),\n i = parseSpecifier(d, specifier, string += \"\", 0),\n week,\n day;\n if (i != string.length) return null; // If a UNIX timestamp is specified, return it.\n\n if (\"Q\" in d) return new Date(d.Q);\n if (\"s\" in d) return new Date(d.s * 1000 + (\"L\" in d ? d.L : 0)); // If this is utcParse, never use the local timezone.\n\n if (Z && !(\"Z\" in d)) d.Z = 0; // The am-pm flag is 0 for AM, and 1 for PM.\n\n if (\"p\" in d) d.H = d.H % 12 + d.p * 12; // If the month was not specified, inherit from the quarter.\n\n if (d.m === undefined) d.m = \"q\" in d ? d.q : 0; // Convert day-of-week and week-of-year to day-of-year.\n\n if (\"V\" in d) {\n if (d.V < 1 || d.V > 53) return null;\n if (!(\"w\" in d)) d.w = 1;\n\n if (\"Z\" in d) {\n week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();\n week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);\n week = utcDay.offset(week, (d.V - 1) * 7);\n d.y = week.getUTCFullYear();\n d.m = week.getUTCMonth();\n d.d = week.getUTCDate() + (d.w + 6) % 7;\n } else {\n week = localDate(newDate(d.y, 0, 1)), day = week.getDay();\n week = day > 4 || day === 0 ? timeMonday.ceil(week) : timeMonday(week);\n week = timeDay.offset(week, (d.V - 1) * 7);\n d.y = week.getFullYear();\n d.m = week.getMonth();\n d.d = week.getDate() + (d.w + 6) % 7;\n }\n } else if (\"W\" in d || \"U\" in d) {\n if (!(\"w\" in d)) d.w = \"u\" in d ? d.u % 7 : \"W\" in d ? 1 : 0;\n day = \"Z\" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();\n d.m = 0;\n d.d = \"W\" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;\n } // If a time zone is specified, all fields are interpreted as UTC and then\n // offset according to the specified time zone.\n\n\n if (\"Z\" in d) {\n d.H += d.Z / 100 | 0;\n d.M += d.Z % 100;\n return utcDate(d);\n } // Otherwise, all fields are in local time.\n\n\n return localDate(d);\n };\n }\n\n function parseSpecifier(d, specifier, string, j) {\n var i = 0,\n n = specifier.length,\n m = string.length,\n c,\n parse;\n\n while (i < n) {\n if (j >= m) return -1;\n c = specifier.charCodeAt(i++);\n\n if (c === 37) {\n c = specifier.charAt(i++);\n parse = parses[c in pads ? specifier.charAt(i++) : c];\n if (!parse || (j = parse(d, string, j)) < 0) return -1;\n } else if (c != string.charCodeAt(j++)) {\n return -1;\n }\n }\n\n return j;\n }\n\n function parsePeriod(d, string, i) {\n var n = periodRe.exec(string.slice(i));\n return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortWeekday(d, string, i) {\n var n = shortWeekdayRe.exec(string.slice(i));\n return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseWeekday(d, string, i) {\n var n = weekdayRe.exec(string.slice(i));\n return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseShortMonth(d, string, i) {\n var n = shortMonthRe.exec(string.slice(i));\n return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseMonth(d, string, i) {\n var n = monthRe.exec(string.slice(i));\n return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;\n }\n\n function parseLocaleDateTime(d, string, i) {\n return parseSpecifier(d, locale_dateTime, string, i);\n }\n\n function parseLocaleDate(d, string, i) {\n return parseSpecifier(d, locale_date, string, i);\n }\n\n function parseLocaleTime(d, string, i) {\n return parseSpecifier(d, locale_time, string, i);\n }\n\n function formatShortWeekday(d) {\n return locale_shortWeekdays[d.getDay()];\n }\n\n function formatWeekday(d) {\n return locale_weekdays[d.getDay()];\n }\n\n function formatShortMonth(d) {\n return locale_shortMonths[d.getMonth()];\n }\n\n function formatMonth(d) {\n return locale_months[d.getMonth()];\n }\n\n function formatPeriod(d) {\n return locale_periods[+(d.getHours() >= 12)];\n }\n\n function formatQuarter(d) {\n return 1 + ~~(d.getMonth() / 3);\n }\n\n function formatUTCShortWeekday(d) {\n return locale_shortWeekdays[d.getUTCDay()];\n }\n\n function formatUTCWeekday(d) {\n return locale_weekdays[d.getUTCDay()];\n }\n\n function formatUTCShortMonth(d) {\n return locale_shortMonths[d.getUTCMonth()];\n }\n\n function formatUTCMonth(d) {\n return locale_months[d.getUTCMonth()];\n }\n\n function formatUTCPeriod(d) {\n return locale_periods[+(d.getUTCHours() >= 12)];\n }\n\n function formatUTCQuarter(d) {\n return 1 + ~~(d.getUTCMonth() / 3);\n }\n\n return {\n format: function format(specifier) {\n var f = newFormat(specifier += \"\", formats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n parse: function parse(specifier) {\n var p = newParse(specifier += \"\", false);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n },\n utcFormat: function utcFormat(specifier) {\n var f = newFormat(specifier += \"\", utcFormats);\n\n f.toString = function () {\n return specifier;\n };\n\n return f;\n },\n utcParse: function utcParse(specifier) {\n var p = newParse(specifier += \"\", true);\n\n p.toString = function () {\n return specifier;\n };\n\n return p;\n }\n };\n}\nvar pads = {\n \"-\": \"\",\n \"_\": \" \",\n \"0\": \"0\"\n},\n numberRe = /^\\s*\\d+/,\n // note: ignores next directive\npercentRe = /^%/,\n requoteRe = /[\\\\^$*+?|[\\]().{}]/g;\n\nfunction pad(value, fill, width) {\n var sign = value < 0 ? \"-\" : \"\",\n string = (sign ? -value : value) + \"\",\n length = string.length;\n return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);\n}\n\nfunction requote(s) {\n return s.replace(requoteRe, \"\\\\$&\");\n}\n\nfunction formatRe(names) {\n return new RegExp(\"^(?:\" + names.map(requote).join(\"|\") + \")\", \"i\");\n}\n\nfunction formatLookup(names) {\n var map = {},\n i = -1,\n n = names.length;\n\n while (++i < n) {\n map[names[i].toLowerCase()] = i;\n }\n\n return map;\n}\n\nfunction parseWeekdayNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.w = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekdayNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.u = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberSunday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.U = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberISO(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.V = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseWeekNumberMonday(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.W = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseFullYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 4));\n return n ? (d.y = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2000), i + n[0].length) : -1;\n}\n\nfunction parseZone(d, string, i) {\n var n = /^(Z)|([+-]\\d\\d)(?::?(\\d\\d))?/.exec(string.slice(i, i + 6));\n return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || \"00\")), i + n[0].length) : -1;\n}\n\nfunction parseQuarter(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 1));\n return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;\n}\n\nfunction parseMonthNumber(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.m = n[0] - 1, i + n[0].length) : -1;\n}\n\nfunction parseDayOfMonth(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseDayOfYear(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseHour24(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.H = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMinutes(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.M = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 2));\n return n ? (d.S = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMilliseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 3));\n return n ? (d.L = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseMicroseconds(d, string, i) {\n var n = numberRe.exec(string.slice(i, i + 6));\n return n ? (d.L = Math.floor(n[0] / 1000), i + n[0].length) : -1;\n}\n\nfunction parseLiteralPercent(d, string, i) {\n var n = percentRe.exec(string.slice(i, i + 1));\n return n ? i + n[0].length : -1;\n}\n\nfunction parseUnixTimestamp(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.Q = +n[0], i + n[0].length) : -1;\n}\n\nfunction parseUnixTimestampSeconds(d, string, i) {\n var n = numberRe.exec(string.slice(i));\n return n ? (d.s = +n[0], i + n[0].length) : -1;\n}\n\nfunction formatDayOfMonth(d, p) {\n return pad(d.getDate(), p, 2);\n}\n\nfunction formatHour24(d, p) {\n return pad(d.getHours(), p, 2);\n}\n\nfunction formatHour12(d, p) {\n return pad(d.getHours() % 12 || 12, p, 2);\n}\n\nfunction formatDayOfYear(d, p) {\n return pad(1 + timeDay.count(timeYear(d), d), p, 3);\n}\n\nfunction formatMilliseconds(d, p) {\n return pad(d.getMilliseconds(), p, 3);\n}\n\nfunction formatMicroseconds(d, p) {\n return formatMilliseconds(d, p) + \"000\";\n}\n\nfunction formatMonthNumber(d, p) {\n return pad(d.getMonth() + 1, p, 2);\n}\n\nfunction formatMinutes(d, p) {\n return pad(d.getMinutes(), p, 2);\n}\n\nfunction formatSeconds(d, p) {\n return pad(d.getSeconds(), p, 2);\n}\n\nfunction formatWeekdayNumberMonday(d) {\n var day = d.getDay();\n return day === 0 ? 7 : day;\n}\n\nfunction formatWeekNumberSunday(d, p) {\n return pad(timeSunday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction dISO(d) {\n var day = d.getDay();\n return day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n}\n\nfunction formatWeekNumberISO(d, p) {\n d = dISO(d);\n return pad(timeThursday.count(timeYear(d), d) + (timeYear(d).getDay() === 4), p, 2);\n}\n\nfunction formatWeekdayNumberSunday(d) {\n return d.getDay();\n}\n\nfunction formatWeekNumberMonday(d, p) {\n return pad(timeMonday.count(timeYear(d) - 1, d), p, 2);\n}\n\nfunction formatYear(d, p) {\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatYearISO(d, p) {\n d = dISO(d);\n return pad(d.getFullYear() % 100, p, 2);\n}\n\nfunction formatFullYear(d, p) {\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatFullYearISO(d, p) {\n var day = d.getDay();\n d = day >= 4 || day === 0 ? timeThursday(d) : timeThursday.ceil(d);\n return pad(d.getFullYear() % 10000, p, 4);\n}\n\nfunction formatZone(d) {\n var z = d.getTimezoneOffset();\n return (z > 0 ? \"-\" : (z *= -1, \"+\")) + pad(z / 60 | 0, \"0\", 2) + pad(z % 60, \"0\", 2);\n}\n\nfunction formatUTCDayOfMonth(d, p) {\n return pad(d.getUTCDate(), p, 2);\n}\n\nfunction formatUTCHour24(d, p) {\n return pad(d.getUTCHours(), p, 2);\n}\n\nfunction formatUTCHour12(d, p) {\n return pad(d.getUTCHours() % 12 || 12, p, 2);\n}\n\nfunction formatUTCDayOfYear(d, p) {\n return pad(1 + utcDay.count(utcYear(d), d), p, 3);\n}\n\nfunction formatUTCMilliseconds(d, p) {\n return pad(d.getUTCMilliseconds(), p, 3);\n}\n\nfunction formatUTCMicroseconds(d, p) {\n return formatUTCMilliseconds(d, p) + \"000\";\n}\n\nfunction formatUTCMonthNumber(d, p) {\n return pad(d.getUTCMonth() + 1, p, 2);\n}\n\nfunction formatUTCMinutes(d, p) {\n return pad(d.getUTCMinutes(), p, 2);\n}\n\nfunction formatUTCSeconds(d, p) {\n return pad(d.getUTCSeconds(), p, 2);\n}\n\nfunction formatUTCWeekdayNumberMonday(d) {\n var dow = d.getUTCDay();\n return dow === 0 ? 7 : dow;\n}\n\nfunction formatUTCWeekNumberSunday(d, p) {\n return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction UTCdISO(d) {\n var day = d.getUTCDay();\n return day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n}\n\nfunction formatUTCWeekNumberISO(d, p) {\n d = UTCdISO(d);\n return pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);\n}\n\nfunction formatUTCWeekdayNumberSunday(d) {\n return d.getUTCDay();\n}\n\nfunction formatUTCWeekNumberMonday(d, p) {\n return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);\n}\n\nfunction formatUTCYear(d, p) {\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCYearISO(d, p) {\n d = UTCdISO(d);\n return pad(d.getUTCFullYear() % 100, p, 2);\n}\n\nfunction formatUTCFullYear(d, p) {\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCFullYearISO(d, p) {\n var day = d.getUTCDay();\n d = day >= 4 || day === 0 ? utcThursday(d) : utcThursday.ceil(d);\n return pad(d.getUTCFullYear() % 10000, p, 4);\n}\n\nfunction formatUTCZone() {\n return \"+0000\";\n}\n\nfunction formatLiteralPercent() {\n return \"%\";\n}\n\nfunction formatUnixTimestamp(d) {\n return +d;\n}\n\nfunction formatUnixTimestampSeconds(d) {\n return Math.floor(+d / 1000);\n}","import formatLocale from \"./locale.js\";\nvar locale;\nexport var timeFormat;\nexport var timeParse;\nexport var utcFormat;\nexport var utcParse;\ndefaultLocale({\n dateTime: \"%x, %X\",\n date: \"%-m/%-d/%Y\",\n time: \"%-I:%M:%S %p\",\n periods: [\"AM\", \"PM\"],\n days: [\"Sunday\", \"Monday\", \"Tuesday\", \"Wednesday\", \"Thursday\", \"Friday\", \"Saturday\"],\n shortDays: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n months: [\"January\", \"February\", \"March\", \"April\", \"May\", \"June\", \"July\", \"August\", \"September\", \"October\", \"November\", \"December\"],\n shortMonths: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"]\n});\nexport default function defaultLocale(definition) {\n locale = formatLocale(definition);\n timeFormat = locale.format;\n timeParse = locale.parse;\n utcFormat = locale.utcFormat;\n utcParse = locale.utcParse;\n return locale;\n}","export function basis(t1, v0, v1, v2, v3) {\n var t2 = t1 * t1,\n t3 = t2 * t1;\n return ((1 - 3 * t1 + 3 * t2 - t3) * v0 + (4 - 6 * t2 + 3 * t3) * v1 + (1 + 3 * t1 + 3 * t2 - 3 * t3) * v2 + t3 * v3) / 6;\n}\nexport default function (values) {\n var n = values.length - 1;\n return function (t) {\n var i = t <= 0 ? t = 0 : t >= 1 ? (t = 1, n - 1) : Math.floor(t * n),\n v1 = values[i],\n v2 = values[i + 1],\n v0 = i > 0 ? values[i - 1] : 2 * v1 - v2,\n v3 = i < n - 1 ? values[i + 2] : 2 * v2 - v1;\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","export default function (x) {\n return function () {\n return x;\n };\n}","import constant from \"./constant.js\";\n\nfunction linear(a, d) {\n return function (t) {\n return a + t * d;\n };\n}\n\nfunction exponential(a, b, y) {\n return a = Math.pow(a, y), b = Math.pow(b, y) - a, y = 1 / y, function (t) {\n return Math.pow(a + t * b, y);\n };\n}\n\nexport function hue(a, b) {\n var d = b - a;\n return d ? linear(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);\n}\nexport function gamma(y) {\n return (y = +y) === 1 ? nogamma : function (a, b) {\n return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);\n };\n}\nexport default function nogamma(a, b) {\n var d = b - a;\n return d ? linear(a, d) : constant(isNaN(a) ? b : a);\n}","import { rgb as colorRgb } from \"d3-color\";\nimport basis from \"./basis.js\";\nimport basisClosed from \"./basisClosed.js\";\nimport nogamma, { gamma } from \"./color.js\";\nexport default (function rgbGamma(y) {\n var color = gamma(y);\n\n function rgb(start, end) {\n var r = color((start = colorRgb(start)).r, (end = colorRgb(end)).r),\n g = color(start.g, end.g),\n b = color(start.b, end.b),\n opacity = nogamma(start.opacity, end.opacity);\n return function (t) {\n start.r = r(t);\n start.g = g(t);\n start.b = b(t);\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n rgb.gamma = rgbGamma;\n return rgb;\n})(1);\n\nfunction rgbSpline(spline) {\n return function (colors) {\n var n = colors.length,\n r = new Array(n),\n g = new Array(n),\n b = new Array(n),\n i,\n color;\n\n for (i = 0; i < n; ++i) {\n color = colorRgb(colors[i]);\n r[i] = color.r || 0;\n g[i] = color.g || 0;\n b[i] = color.b || 0;\n }\n\n r = spline(r);\n g = spline(g);\n b = spline(b);\n color.opacity = 1;\n return function (t) {\n color.r = r(t);\n color.g = g(t);\n color.b = b(t);\n return color + \"\";\n };\n };\n}\n\nexport var rgbBasis = rgbSpline(basis);\nexport var rgbBasisClosed = rgbSpline(basisClosed);","import { basis } from \"./basis.js\";\nexport default function (values) {\n var n = values.length;\n return function (t) {\n var i = Math.floor(((t %= 1) < 0 ? ++t : t) * n),\n v0 = values[(i + n - 1) % n],\n v1 = values[i % n],\n v2 = values[(i + 1) % n],\n v3 = values[(i + 2) % n];\n return basis((t - i / n) * n, v0, v1, v2, v3);\n };\n}","export default function (a, b) {\n if (!b) b = [];\n var n = a ? Math.min(b.length, a.length) : 0,\n c = b.slice(),\n i;\n return function (t) {\n for (i = 0; i < n; ++i) {\n c[i] = a[i] * (1 - t) + b[i] * t;\n }\n\n return c;\n };\n}\nexport function isNumberArray(x) {\n return ArrayBuffer.isView(x) && !(x instanceof DataView);\n}","import value from \"./value.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n return (isNumberArray(b) ? numberArray : genericArray)(a, b);\n}\nexport function genericArray(a, b) {\n var nb = b ? b.length : 0,\n na = a ? Math.min(nb, a.length) : 0,\n x = new Array(na),\n c = new Array(nb),\n i;\n\n for (i = 0; i < na; ++i) {\n x[i] = value(a[i], b[i]);\n }\n\n for (; i < nb; ++i) {\n c[i] = b[i];\n }\n\n return function (t) {\n for (i = 0; i < na; ++i) {\n c[i] = x[i](t);\n }\n\n return c;\n };\n}","export default function (a, b) {\n var d = new Date();\n return a = +a, b = +b, function (t) {\n return d.setTime(a * (1 - t) + b * t), d;\n };\n}","export default function (a, b) {\n return a = +a, b = +b, function (t) {\n return a * (1 - t) + b * t;\n };\n}","import value from \"./value.js\";\nexport default function (a, b) {\n var i = {},\n c = {},\n k;\n if (a === null || typeof a !== \"object\") a = {};\n if (b === null || typeof b !== \"object\") b = {};\n\n for (k in b) {\n if (k in a) {\n i[k] = value(a[k], b[k]);\n } else {\n c[k] = b[k];\n }\n }\n\n return function (t) {\n for (k in i) {\n c[k] = i[k](t);\n }\n\n return c;\n };\n}","import number from \"./number.js\";\nvar reA = /[-+]?(?:\\d+\\.?\\d*|\\.?\\d+)(?:[eE][-+]?\\d+)?/g,\n reB = new RegExp(reA.source, \"g\");\n\nfunction zero(b) {\n return function () {\n return b;\n };\n}\n\nfunction one(b) {\n return function (t) {\n return b(t) + \"\";\n };\n}\n\nexport default function (a, b) {\n var bi = reA.lastIndex = reB.lastIndex = 0,\n // scan index for next number in b\n am,\n // current match in a\n bm,\n // current match in b\n bs,\n // string preceding current number in b, if any\n i = -1,\n // index in s\n s = [],\n // string constants and placeholders\n q = []; // number interpolators\n // Coerce inputs to strings.\n\n a = a + \"\", b = b + \"\"; // Interpolate pairs of numbers in a & b.\n\n while ((am = reA.exec(a)) && (bm = reB.exec(b))) {\n if ((bs = bm.index) > bi) {\n // a string precedes the next number in b\n bs = b.slice(bi, bs);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n }\n\n if ((am = am[0]) === (bm = bm[0])) {\n // numbers in a & b match\n if (s[i]) s[i] += bm; // coalesce with previous string\n else s[++i] = bm;\n } else {\n // interpolate non-matching numbers\n s[++i] = null;\n q.push({\n i: i,\n x: number(am, bm)\n });\n }\n\n bi = reB.lastIndex;\n } // Add remains of b.\n\n\n if (bi < b.length) {\n bs = b.slice(bi);\n if (s[i]) s[i] += bs; // coalesce with previous string\n else s[++i] = bs;\n } // Special optimization for only a single match.\n // Otherwise, interpolate each of the numbers and rejoin the string.\n\n\n return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function (t) {\n for (var i = 0, o; i < b; ++i) {\n s[(o = q[i]).i] = o.x(t);\n }\n\n return s.join(\"\");\n });\n}","import { color } from \"d3-color\";\nimport rgb from \"./rgb.js\";\nimport { genericArray } from \"./array.js\";\nimport date from \"./date.js\";\nimport number from \"./number.js\";\nimport object from \"./object.js\";\nimport string from \"./string.js\";\nimport constant from \"./constant.js\";\nimport numberArray, { isNumberArray } from \"./numberArray.js\";\nexport default function (a, b) {\n var t = typeof b,\n c;\n return b == null || t === \"boolean\" ? constant(b) : (t === \"number\" ? number : t === \"string\" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== \"function\" && typeof b.toString !== \"function\" || isNaN(b) ? object : number)(a, b);\n}","import React, { useMemo, createContext, useContext, PureComponent, useRef, useState, useCallback, Component, memo } from 'react';\nimport PropTypes from 'prop-types';\nimport { tooltipContext, useTooltipHandlers, TooltipWrapper } from '@nivo/tooltip';\nimport merge from 'lodash/merge';\nimport get from 'lodash/get';\nimport set from 'lodash/set';\nimport last from 'lodash/last';\nimport isArray from 'lodash/isArray';\nimport isString from 'lodash/isString';\nimport { scaleQuantize, scaleOrdinal, scaleSequential } from 'd3-scale';\nimport { schemeBrBG, schemePRGn, schemePiYG, schemePuOr, schemeRdBu, schemeRdGy, schemeRdYlBu, schemeRdYlGn, schemeSpectral, schemeBlues, schemeGreens, schemeGreys, schemeOranges, schemePurples, schemeReds, schemeBuGn, schemeBuPu, schemeGnBu, schemeOrRd, schemePuBuGn, schemePuBu, schemePuRd, schemeRdPu, schemeYlGnBu, schemeYlGn, schemeYlOrBr, schemeYlOrRd, schemeCategory10, schemeAccent, schemeDark2, schemePaired, schemePastel1, schemePastel2, schemeSet1, schemeSet2, schemeSet3, interpolateBrBG, interpolatePRGn, interpolatePiYG, interpolatePuOr, interpolateRdBu, interpolateRdGy, interpolateRdYlBu, interpolateRdYlGn, interpolateSpectral, interpolateBlues, interpolateGreens, interpolateGreys, interpolateOranges, interpolatePurples, interpolateReds, interpolateViridis, interpolateInferno, interpolateMagma, interpolatePlasma, interpolateWarm, interpolateCool, interpolateCubehelixDefault, interpolateBuGn, interpolateBuPu, interpolateGnBu, interpolateOrRd, interpolatePuBuGn, interpolatePuBu, interpolatePuRd, interpolateRdPu, interpolateYlGnBu, interpolateYlGn, interpolateYlOrBr, interpolateYlOrRd, interpolateRainbow, interpolateSinebow } from 'd3-scale-chromatic';\nimport isFunction from 'lodash/isFunction';\nimport without from 'lodash/without';\nimport { curveBasis, curveBasisClosed, curveBasisOpen, curveBundle, curveCardinal, curveCardinalClosed, curveCardinalOpen, curveCatmullRom, curveCatmullRomClosed, curveCatmullRomOpen, curveLinear, curveLinearClosed, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle } from 'd3-shape';\nimport { treemapBinary, treemapDice, treemapSlice, treemapSliceDice, treemapSquarify, treemapResquarify, hierarchy } from 'd3-hierarchy';\nimport { format } from 'd3-format';\nimport { timeFormat } from 'd3-time-format';\nimport { spring, Motion } from 'react-motion';\nimport { interpolate } from 'd3-interpolate';\nimport Measure from 'react-measure';\nimport withProps from 'recompose/withProps';\nimport isEqual from 'lodash/isEqual';\nimport compose from 'recompose/compose';\nimport setPropTypes from 'recompose/setPropTypes';\nimport defaultProps from 'recompose/defaultProps';\nimport withPropsOnChange from 'recompose/withPropsOnChange';\nimport partialRight from 'lodash/partialRight';\nimport isPlainObject from 'lodash/isPlainObject';\nimport pick from 'lodash/pick';\n\nvar noop = function noop() {};\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\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\nvar textProps = {\n fill: PropTypes.string,\n fontSize: PropTypes.number,\n fontFamily: PropTypes.string\n};\nvar axisThemePropType = PropTypes.shape({\n domain: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n }).isRequired,\n ticks: PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired,\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n }).isRequired,\n legend: PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n }).isRequired\n});\nvar gridThemePropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar legendsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar labelsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar dotsThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar markersThemePropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps)).isRequired\n});\nvar crosshairPropType = PropTypes.shape({\n line: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n strokeDasharray: PropTypes.string\n }).isRequired\n});\nvar annotationsPropType = PropTypes.shape({\n text: PropTypes.shape(_objectSpread({}, textProps, {\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n })).isRequired,\n link: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n outline: PropTypes.shape({\n stroke: PropTypes.string.isRequired,\n strokeWidth: PropTypes.number.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired,\n symbol: PropTypes.shape({\n fill: PropTypes.string.isRequired,\n outlineWidth: PropTypes.number.isRequired,\n outlineColor: PropTypes.string.isRequired\n }).isRequired\n});\nvar themePropType = PropTypes.shape({\n background: PropTypes.string.isRequired,\n fontFamily: PropTypes.string.isRequired,\n fontSize: PropTypes.number.isRequired,\n textColor: PropTypes.string.isRequired,\n axis: axisThemePropType.isRequired,\n grid: gridThemePropType.isRequired,\n legends: legendsThemePropType.isRequired,\n labels: labelsThemePropType.isRequired,\n dots: dotsThemePropType.isRequired,\n markers: markersThemePropType,\n crosshair: crosshairPropType.isRequired,\n annotations: annotationsPropType.isRequired\n});\nvar defaultTheme = {\n background: 'transparent',\n fontFamily: 'sans-serif',\n fontSize: 11,\n textColor: '#333333',\n axis: {\n domain: {\n line: {\n stroke: 'transparent',\n strokeWidth: 1\n }\n },\n ticks: {\n line: {\n stroke: '#777777',\n strokeWidth: 1\n },\n text: {}\n },\n legend: {\n text: {\n fontSize: 12\n }\n }\n },\n grid: {\n line: {\n stroke: '#dddddd',\n strokeWidth: 1\n }\n },\n legends: {\n text: {\n fill: '#333333'\n }\n },\n labels: {\n text: {}\n },\n markers: {\n lineColor: '#000000',\n lineStrokeWidth: 1,\n text: {}\n },\n dots: {\n text: {}\n },\n tooltip: {\n container: {\n background: 'white',\n color: 'inherit',\n fontSize: 'inherit',\n borderRadius: '2px',\n boxShadow: '0 1px 2px rgba(0, 0, 0, 0.25)',\n padding: '5px 9px'\n },\n basic: {\n whiteSpace: 'pre',\n display: 'flex',\n alignItems: 'center'\n },\n chip: {\n marginRight: 7\n },\n table: {},\n tableCell: {\n padding: '3px 5px'\n }\n },\n crosshair: {\n line: {\n stroke: '#000000',\n strokeWidth: 1,\n strokeOpacity: 0.75,\n strokeDasharray: '6 6'\n }\n },\n annotations: {\n text: {\n fontSize: 13,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n link: {\n stroke: '#000000',\n strokeWidth: 1,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n outline: {\n fill: 'none',\n stroke: '#000000',\n strokeWidth: 2,\n outlineWidth: 2,\n outlineColor: '#ffffff'\n },\n symbol: {\n fill: '#000000',\n outlineWidth: 2,\n outlineColor: '#ffffff'\n }\n }\n};\nvar fontProps = ['axis.ticks.text', 'axis.legend.text', 'legends.text', 'labels.text', 'dots.text', 'markers.text', 'annotations.text'];\n\nvar extendDefaultTheme = function extendDefaultTheme(defaultTheme, customTheme) {\n var theme = merge({}, defaultTheme, customTheme);\n fontProps.forEach(function (prop) {\n if (get(theme, \"\".concat(prop, \".fontFamily\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontFamily\"), theme.fontFamily);\n }\n\n if (get(theme, \"\".concat(prop, \".fontSize\")) === undefined) {\n set(theme, \"\".concat(prop, \".fontSize\"), theme.fontSize);\n }\n\n if (get(theme, \"\".concat(prop, \".fill\")) === undefined) {\n set(theme, \"\".concat(prop, \".fill\"), theme.textColor);\n }\n });\n return theme;\n};\n\nvar quantizeColorScales = {\n nivo: ['#d76445', '#f47560', '#e8c1a0', '#97e3d5', '#61cdbb', '#00b0a7'],\n BrBG: last(schemeBrBG),\n PRGn: last(schemePRGn),\n PiYG: last(schemePiYG),\n PuOr: last(schemePuOr),\n RdBu: last(schemeRdBu),\n RdGy: last(schemeRdGy),\n RdYlBu: last(schemeRdYlBu),\n RdYlGn: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n BuGn: last(schemeBuGn),\n BuPu: last(schemeBuPu),\n GnBu: last(schemeGnBu),\n OrRd: last(schemeOrRd),\n PuBuGn: last(schemePuBuGn),\n PuBu: last(schemePuBu),\n PuRd: last(schemePuRd),\n RdPu: last(schemeRdPu),\n YlGnBu: last(schemeYlGnBu),\n YlGn: last(schemeYlGn),\n YlOrBr: last(schemeYlOrBr),\n YlOrRd: last(schemeYlOrRd)\n};\nvar quantizeColorScalesKeys = Object.keys(quantizeColorScales);\n\nvar guessQuantizeColorScale = function guessQuantizeColorScale(colors) {\n if (isFunction(colors)) {\n if (!isFunction(colors.domain)) {\n throw new Error(\"Provided colors should be a valid quantize scale providing a 'domain()' function\");\n }\n\n return colors;\n }\n\n if (quantizeColorScales[colors]) {\n return scaleQuantize().range(quantizeColorScales[colors]);\n }\n\n if (isArray(colors)) return scaleQuantize().range(colors);\n throw new Error(\"Unable to guess quantize color scale from '\".concat(colors, \"',\\nmust be a function or one of:\\n'\").concat(quantizeColorScalesKeys.join(\"', '\"), \"'\"));\n};\n\nvar colorSchemes = {\n nivo: ['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5'],\n category10: schemeCategory10,\n accent: schemeAccent,\n dark2: schemeDark2,\n paired: schemePaired,\n pastel1: schemePastel1,\n pastel2: schemePastel2,\n set1: schemeSet1,\n set2: schemeSet2,\n set3: schemeSet3,\n brown_blueGreen: last(schemeBrBG),\n purpleRed_green: last(schemePRGn),\n pink_yellowGreen: last(schemePiYG),\n purple_orange: last(schemePuOr),\n red_blue: last(schemeRdBu),\n red_grey: last(schemeRdGy),\n red_yellow_blue: last(schemeRdYlBu),\n red_yellow_green: last(schemeRdYlGn),\n spectral: last(schemeSpectral),\n blues: last(schemeBlues),\n greens: last(schemeGreens),\n greys: last(schemeGreys),\n oranges: last(schemeOranges),\n purples: last(schemePurples),\n reds: last(schemeReds),\n blue_green: last(schemeBuGn),\n blue_purple: last(schemeBuPu),\n green_blue: last(schemeGnBu),\n orange_red: last(schemeOrRd),\n purple_blue_green: last(schemePuBuGn),\n purple_blue: last(schemePuBu),\n purple_red: last(schemePuRd),\n red_purple: last(schemeRdPu),\n yellow_green_blue: last(schemeYlGnBu),\n yellow_green: last(schemeYlGn),\n yellow_orange_brown: last(schemeYlOrBr),\n yellow_orange_red: last(schemeYlOrRd)\n};\nvar colorSchemeIds = ['nivo', 'category10', 'accent', 'dark2', 'paired', 'pastel1', 'pastel2', 'set1', 'set2', 'set3', 'brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral', 'blues', 'greens', 'greys', 'oranges', 'purples', 'reds', 'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red'];\nvar colorInterpolators = {\n brown_blueGreen: interpolateBrBG,\n purpleRed_green: interpolatePRGn,\n pink_yellowGreen: interpolatePiYG,\n purple_orange: interpolatePuOr,\n red_blue: interpolateRdBu,\n red_grey: interpolateRdGy,\n red_yellow_blue: interpolateRdYlBu,\n red_yellow_green: interpolateRdYlGn,\n spectral: interpolateSpectral,\n blues: interpolateBlues,\n greens: interpolateGreens,\n greys: interpolateGreys,\n oranges: interpolateOranges,\n purples: interpolatePurples,\n reds: interpolateReds,\n viridis: interpolateViridis,\n inferno: interpolateInferno,\n magma: interpolateMagma,\n plasma: interpolatePlasma,\n warm: interpolateWarm,\n cool: interpolateCool,\n cubehelixDefault: interpolateCubehelixDefault,\n blue_green: interpolateBuGn,\n blue_purple: interpolateBuPu,\n green_blue: interpolateGnBu,\n orange_red: interpolateOrRd,\n purple_blue_green: interpolatePuBuGn,\n purple_blue: interpolatePuBu,\n purple_red: interpolatePuRd,\n red_purple: interpolateRdPu,\n yellow_green_blue: interpolateYlGnBu,\n yellow_green: interpolateYlGn,\n yellow_orange_brown: interpolateYlOrBr,\n yellow_orange_red: interpolateYlOrRd,\n rainbow: interpolateRainbow,\n sinebow: interpolateSinebow\n};\nvar colorInterpolatorIds = ['brown_blueGreen', 'purpleRed_green', 'pink_yellowGreen', 'purple_orange', 'red_blue', 'red_grey', 'red_yellow_blue', 'red_yellow_green', 'spectral', 'blues', 'greens', 'greys', 'oranges', 'purples', 'reds', 'viridis', 'inferno', 'magma', 'plasma', 'warm', 'cool', 'cubehelixDefault', 'blue_green', 'blue_purple', 'green_blue', 'orange_red', 'purple_blue_green', 'purple_blue', 'purple_red', 'red_purple', 'yellow_green_blue', 'yellow_green', 'yellow_orange_brown', 'yellow_orange_red', 'rainbow', 'sinebow'];\n\nvar nivoCategoricalColors = function nivoCategoricalColors() {\n return scaleOrdinal(['#e8c1a0', '#f47560', '#f1e15b', '#e8a838', '#61cdbb', '#97e3d5']);\n};\n\nvar getColorScale = function getColorScale(colors, dataScale) {\n if (isString(colors)) {\n var scheme = colorSchemes[colors];\n\n if (scheme !== undefined) {\n var scale = scaleOrdinal(scheme);\n scale.type = 'ordinal';\n return scale;\n }\n\n if (dataScale !== undefined && colors.indexOf('seq:') === 0) {\n var interpolator = colorInterpolators[colors.slice(4)];\n\n if (interpolator !== undefined) {\n var _scale = scaleSequential(interpolator).domain(dataScale.domain());\n\n _scale.type = 'sequential';\n return _scale;\n }\n }\n }\n\n if (isArray(colors)) {\n var _scale2 = scaleOrdinal(colors);\n\n _scale2.type = 'ordinal';\n return _scale2;\n }\n\n return function () {\n return colors;\n };\n};\n\nvar quantizeColorScalePropType = PropTypes.oneOfType([PropTypes.oneOf(quantizeColorScalesKeys), PropTypes.func, PropTypes.arrayOf(PropTypes.string)]);\nvar curvePropMapping = {\n basis: curveBasis,\n basisClosed: curveBasisClosed,\n basisOpen: curveBasisOpen,\n bundle: curveBundle,\n cardinal: curveCardinal,\n cardinalClosed: curveCardinalClosed,\n cardinalOpen: curveCardinalOpen,\n catmullRom: curveCatmullRom,\n catmullRomClosed: curveCatmullRomClosed,\n catmullRomOpen: curveCatmullRomOpen,\n linear: curveLinear,\n linearClosed: curveLinearClosed,\n monotoneX: curveMonotoneX,\n monotoneY: curveMonotoneY,\n natural: curveNatural,\n step: curveStep,\n stepAfter: curveStepAfter,\n stepBefore: curveStepBefore\n};\nvar curvePropKeys = Object.keys(curvePropMapping);\nvar curvePropType = PropTypes.oneOf(curvePropKeys);\nvar closedCurvePropKeys = curvePropKeys.filter(function (c) {\n return c.endsWith('Closed');\n});\nvar closedCurvePropType = PropTypes.oneOf(closedCurvePropKeys);\nvar areaCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar areaCurvePropType = PropTypes.oneOf(areaCurvePropKeys);\nvar lineCurvePropKeys = without(curvePropKeys, 'bundle', 'basisClosed', 'basisOpen', 'cardinalClosed', 'cardinalOpen', 'catmullRomClosed', 'catmullRomOpen', 'linearClosed');\nvar lineCurvePropType = PropTypes.oneOf(lineCurvePropKeys);\n\nvar curveFromProp = function curveFromProp(id) {\n var curveInterpolator = curvePropMapping[id];\n\n if (!curveInterpolator) {\n throw new TypeError(\"'\".concat(id, \"', is not a valid curve interpolator identifier.\"));\n }\n\n return curvePropMapping[id];\n};\n\nvar defsPropTypes = {\n defs: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired\n })).isRequired,\n fill: PropTypes.arrayOf(PropTypes.shape({\n id: PropTypes.string.isRequired,\n match: PropTypes.oneOfType([PropTypes.oneOf(['*']), PropTypes.object, PropTypes.func]).isRequired\n })).isRequired\n};\nvar stackOrderPropMapping = {\n ascending: stackOrderAscending,\n descending: stackOrderDescending,\n insideOut: stackOrderInsideOut,\n none: stackOrderNone,\n reverse: stackOrderReverse\n};\nvar stackOrderPropKeys = Object.keys(stackOrderPropMapping);\nvar stackOrderPropType = PropTypes.oneOf(stackOrderPropKeys);\n\nvar stackOrderFromProp = function stackOrderFromProp(prop) {\n return stackOrderPropMapping[prop];\n};\n\nvar stackOffsetPropMapping = {\n expand: stackOffsetExpand,\n diverging: stackOffsetDiverging,\n none: stackOffsetNone,\n silhouette: stackOffsetSilhouette,\n wiggle: stackOffsetWiggle\n};\nvar stackOffsetPropKeys = Object.keys(stackOffsetPropMapping);\nvar stackOffsetPropType = PropTypes.oneOf(stackOffsetPropKeys);\n\nvar stackOffsetFromProp = function stackOffsetFromProp(prop) {\n return stackOffsetPropMapping[prop];\n};\n\nvar treeMapTilePropMapping = {\n binary: treemapBinary,\n dice: treemapDice,\n slice: treemapSlice,\n sliceDice: treemapSliceDice,\n squarify: treemapSquarify,\n resquarify: treemapResquarify\n};\nvar treeMapTilePropKeys = Object.keys(treeMapTilePropMapping);\nvar treeMapTilePropType = PropTypes.oneOf(treeMapTilePropKeys);\n\nvar treeMapTileFromProp = function treeMapTileFromProp(prop) {\n return treeMapTilePropMapping[prop];\n};\n\nvar marginPropType = PropTypes.shape({\n top: PropTypes.number,\n right: PropTypes.number,\n bottom: PropTypes.number,\n left: PropTypes.number\n}).isRequired;\nvar motionPropTypes = {\n animate: PropTypes.bool.isRequired,\n motionStiffness: PropTypes.number.isRequired,\n motionDamping: PropTypes.number.isRequired\n};\nvar blendModes = ['normal', 'multiply', 'screen', 'overlay', 'darken', 'lighten', 'color-dodge', 'color-burn', 'hard-light', 'soft-light', 'difference', 'exclusion', 'hue', 'saturation', 'color', 'luminosity'];\nvar blendModePropType = PropTypes.oneOf(blendModes);\n\nvar useCurveInterpolation = function useCurveInterpolation(interpolation) {\n return useMemo(function () {\n return curveFromProp(interpolation);\n }, [interpolation]);\n};\n\nvar defaultAnimate = true;\nvar defaultMotionStiffness = 90;\nvar defaultMotionDamping = 15;\nvar defaultCategoricalColors = nivoCategoricalColors;\nvar defaultColorRange = scaleOrdinal(schemeSet3);\nvar defaultMargin = {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n};\n\nfunction _objectSpread$1(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$1(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$1(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\nvar useDimensions = function useDimensions(width, height) {\n var partialMargin = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return useMemo(function () {\n var margin = _objectSpread$1({}, defaultMargin, partialMargin);\n\n return {\n margin: margin,\n innerWidth: width - margin.left - margin.right,\n innerHeight: height - margin.top - margin.bottom,\n outerWidth: width,\n outerHeight: height\n };\n }, [width, height, partialMargin.top, partialMargin.right, partialMargin.bottom, partialMargin.left]);\n};\n\nvar usePartialTheme = function usePartialTheme(partialTheme) {\n return useMemo(function () {\n return extendDefaultTheme(defaultTheme, partialTheme);\n }, [partialTheme]);\n};\n\nvar getValueFormatter = function getValueFormatter(format$1) {\n if (typeof format$1 === 'function') return format$1;\n\n if (typeof format$1 === 'string') {\n if (format$1.indexOf('time:') === 0) {\n return timeFormat(format$1.slice('5'));\n }\n\n return format(format$1);\n }\n\n return function (v) {\n return v;\n };\n};\n\nvar useValueFormatter = function useValueFormatter(format) {\n return useMemo(function () {\n return getValueFormatter(format);\n }, [format]);\n};\n\nvar themeContext = createContext();\nvar defaultPartialTheme = {};\n\nvar ThemeProvider = function ThemeProvider(_ref) {\n var _ref$theme = _ref.theme,\n partialTheme = _ref$theme === void 0 ? defaultPartialTheme : _ref$theme,\n children = _ref.children;\n var theme = usePartialTheme(partialTheme);\n return React.createElement(themeContext.Provider, {\n value: theme\n }, children);\n};\n\nvar useTheme = function useTheme() {\n return useContext(themeContext);\n};\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread$2(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$2(target, key, source[key]);\n });\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\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 _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf(subClass, superClass);\n}\n\nfunction _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}\n\nfunction _defineProperty$2(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\nvar enhancedSpring = function enhancedSpring(value, config) {\n if (typeof value !== 'number') {\n return {\n value: value,\n config: config,\n interpolator: config && config.interpolator ? config.interpolator : interpolate\n };\n }\n\n return spring(value, config);\n};\n\nvar SmartMotion = function (_PureComponent) {\n _inherits(SmartMotion, _PureComponent);\n\n function SmartMotion() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck(this, SmartMotion);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn(this, (_getPrototypeOf2 = _getPrototypeOf(SmartMotion)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty$2(_assertThisInitialized(_this), \"oldValues\", {});\n\n _defineProperty$2(_assertThisInitialized(_this), \"newInters\", {});\n\n _defineProperty$2(_assertThisInitialized(_this), \"currentStepValues\", {});\n\n _defineProperty$2(_assertThisInitialized(_this), \"stepValues\", {});\n\n _defineProperty$2(_assertThisInitialized(_this), \"stepInterpolators\", {});\n\n return _this;\n }\n\n _createClass(SmartMotion, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$props = this.props,\n style = _this$props.style,\n children = _this$props.children,\n rest = _objectWithoutProperties(_this$props, [\"style\", \"children\"]);\n\n var resolvedStyle = style(enhancedSpring);\n\n for (var key in resolvedStyle) {\n if (resolvedStyle[key] && resolvedStyle[key].interpolator) {\n this.currentStepValues[key] = this.currentStepValues[key] || 0;\n\n if (typeof this.newInters[key] === 'undefined' || resolvedStyle[key].value !== this.newInters[key].value) {\n this.newInters[key] = resolvedStyle[key];\n this.stepValues[key] = this.currentStepValues[key] + 1;\n this.stepInterpolators[key] = this.newInters[key].interpolator(this.oldValues[key], this.newInters[key].value);\n }\n\n resolvedStyle[key] = spring(this.stepValues[key], this.newInters[key].config);\n }\n }\n\n return React.createElement(Motion, _extends({}, rest, {\n style: resolvedStyle\n }), function (values) {\n var newValues = {};\n\n for (var _key2 in values) {\n if (_this2.stepValues[_key2]) {\n _this2.currentStepValues[_key2] = values[_key2];\n var percentage = _this2.currentStepValues[_key2] - _this2.stepValues[_key2] + 1;\n _this2.oldValues[_key2] = newValues[_key2] = _this2.stepInterpolators[_key2](percentage);\n }\n }\n\n return children(_objectSpread$2({}, values, newValues));\n });\n }\n }]);\n\n return SmartMotion;\n}(PureComponent);\n\n_defineProperty$2(SmartMotion, \"propTypes\", {\n children: PropTypes.func.isRequired,\n style: PropTypes.func.isRequired\n});\n\nvar motionConfigContext = createContext();\n\nvar MotionConfigProvider = function MotionConfigProvider(_ref) {\n var children = _ref.children,\n animate = _ref.animate,\n stiffness = _ref.stiffness,\n damping = _ref.damping;\n var value = useMemo(function () {\n return {\n animate: animate,\n springConfig: {\n stiffness: stiffness,\n damping: damping\n }\n };\n }, [animate, stiffness, damping]);\n return React.createElement(motionConfigContext.Provider, {\n value: value\n }, children);\n};\n\nMotionConfigProvider.defaultProps = {\n animate: true,\n stiffness: 90,\n damping: 15\n};\n\nvar useMotionConfig = function useMotionConfig() {\n return useContext(motionConfigContext);\n};\n\nfunction _objectSpread$3(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$3(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$3(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 _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\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 _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nvar containerStyle = {\n position: 'relative'\n};\nvar tooltipStyle = {\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 10\n};\n\nvar Container = function Container(_ref) {\n var children = _ref.children,\n theme = _ref.theme,\n _ref$isInteractive = _ref.isInteractive,\n isInteractive = _ref$isInteractive === void 0 ? true : _ref$isInteractive,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var containerEl = useRef(null);\n\n var _useState = useState({\n isTooltipVisible: false,\n tooltipContent: null,\n position: {}\n }),\n _useState2 = _slicedToArray(_useState, 2),\n state = _useState2[0],\n setState = _useState2[1];\n\n var showTooltip = useCallback(function (content, event) {\n if (!containerEl) return;\n var bounds = containerEl.current.getBoundingClientRect();\n var clientX = event.clientX,\n clientY = event.clientY;\n var x = clientX - bounds.left;\n var y = clientY - bounds.top;\n var position = {};\n if (x < bounds.width / 2) position.left = x + 20;else position.right = bounds.width - x + 20;\n if (y < bounds.height / 2) position.top = y - 12;else position.bottom = bounds.height - y - 12;\n setState({\n isTooltipVisible: true,\n tooltipContent: content,\n position: position\n });\n }, [containerEl]);\n var hideTooltip = useCallback(function () {\n setState({\n isTooltipVisible: false,\n tooltipContent: null\n });\n });\n var isTooltipVisible = state.isTooltipVisible,\n tooltipContent = state.tooltipContent,\n position = state.position;\n var content;\n\n if (isInteractive === true) {\n content = React.createElement(\"div\", {\n style: containerStyle,\n ref: containerEl\n }, children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n }), isTooltipVisible && React.createElement(\"div\", {\n style: _objectSpread$3({}, tooltipStyle, position, theme.tooltip)\n }, tooltipContent));\n } else {\n content = children({\n showTooltip: isInteractive ? showTooltip : noop,\n hideTooltip: isInteractive ? hideTooltip : noop\n });\n }\n\n return React.createElement(themeContext.Provider, {\n value: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping\n }, React.createElement(tooltipContext.Provider, {\n value: [showTooltip, hideTooltip]\n }, content)));\n};\n\nfunction _typeof$1(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof$1 = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof$1 = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof$1(obj);\n}\n\nfunction _classCallCheck$1(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties$1(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass$1(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties$1(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn$1(self, call) {\n if (call && (_typeof$1(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized$1(self);\n}\n\nfunction _getPrototypeOf$1(o) {\n _getPrototypeOf$1 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf$1(o);\n}\n\nfunction _assertThisInitialized$1(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _inherits$1(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf$1(subClass, superClass);\n}\n\nfunction _setPrototypeOf$1(o, p) {\n _setPrototypeOf$1 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf$1(o, p);\n}\n\nfunction _defineProperty$4(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\nvar ResponsiveWrapper = function (_Component) {\n _inherits$1(ResponsiveWrapper, _Component);\n\n function ResponsiveWrapper() {\n var _getPrototypeOf2;\n\n var _this;\n\n _classCallCheck$1(this, ResponsiveWrapper);\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _possibleConstructorReturn$1(this, (_getPrototypeOf2 = _getPrototypeOf$1(ResponsiveWrapper)).call.apply(_getPrototypeOf2, [this].concat(args)));\n\n _defineProperty$4(_assertThisInitialized$1(_this), \"state\", {\n dimensions: {\n width: -1,\n height: -1\n }\n });\n\n return _this;\n }\n\n _createClass$1(ResponsiveWrapper, [{\n key: \"render\",\n value: function render() {\n var _this2 = this;\n\n var _this$state$dimension = this.state.dimensions,\n width = _this$state$dimension.width,\n height = _this$state$dimension.height;\n var shouldRender = width > 0 && height > 0;\n return React.createElement(Measure, {\n bounds: true,\n onResize: function onResize(contentRect) {\n _this2.setState({\n dimensions: contentRect.bounds\n });\n }\n }, function (_ref) {\n var measureRef = _ref.measureRef;\n return React.createElement(\"div\", {\n ref: measureRef,\n style: {\n width: '100%',\n height: '100%'\n }\n }, shouldRender && _this2.props.children({\n width: width,\n height: height\n }));\n });\n }\n }]);\n\n return ResponsiveWrapper;\n}(Component);\n\n_defineProperty$4(ResponsiveWrapper, \"propTypes\", {\n children: PropTypes.func.isRequired\n});\n\nfunction _objectSpread$4(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$5(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$5(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\nvar LinearGradient = function LinearGradient(_ref) {\n var id = _ref.id,\n colors = _ref.colors;\n return React.createElement(\"linearGradient\", {\n id: id,\n x1: 0,\n x2: 0,\n y1: 0,\n y2: 1\n }, colors.map(function (_ref2) {\n var offset = _ref2.offset,\n color = _ref2.color,\n opacity = _ref2.opacity;\n return React.createElement(\"stop\", {\n key: offset,\n offset: \"\".concat(offset, \"%\"),\n stopColor: color,\n stopOpacity: opacity !== undefined ? opacity : 1\n });\n }));\n};\n\nvar linearGradientDef = function linearGradientDef(id, colors) {\n var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n return _objectSpread$4({\n id: id,\n type: 'linearGradient',\n colors: colors\n }, options);\n};\n\nvar gradientTypes = {\n linearGradient: LinearGradient\n};\n\nfunction _objectSpread$5(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$6(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$6(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\nvar PatternDots = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var radius = size / 2;\n var halfPadding = padding / 2;\n\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"circle\", {\n cx: halfPadding + radius,\n cy: halfPadding + radius,\n r: radius,\n fill: color\n }), stagger && React.createElement(\"circle\", {\n cx: padding * 1.5 + size + radius,\n cy: padding * 1.5 + size + radius,\n r: radius,\n fill: color\n }));\n});\nPatternDots.displayName = 'PatternDots';\nPatternDots.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\n\nvar patternDotsDef = function patternDotsDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$5({\n id: id,\n type: 'patternDots'\n }, options);\n};\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nfunction _slicedToArray$1(arr, i) {\n return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _nonIterableRest$1();\n}\n\nfunction _nonIterableRest$1() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction _iterableToArrayLimit$1(arr, i) {\n if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === \"[object Arguments]\")) {\n return;\n }\n\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 _arrayWithHoles$1(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nvar TWO_PI = Math.PI * 2;\n\nvar degreesToRadians = function degreesToRadians(degrees) {\n return degrees * Math.PI / 180;\n};\n\nvar radiansToDegrees = function radiansToDegrees(radians) {\n return 180 * radians / Math.PI;\n};\n\nvar midAngle = function midAngle(arc) {\n return arc.startAngle + (arc.endAngle - arc.startAngle) / 2;\n};\n\nvar positionFromAngle = function positionFromAngle(angle, distance) {\n return {\n x: Math.cos(angle) * distance,\n y: Math.sin(angle) * distance\n };\n};\n\nvar absoluteAngleDegrees = function absoluteAngleDegrees(angle) {\n var absAngle = angle % 360;\n\n if (absAngle < 0) {\n absAngle += 360;\n }\n\n return absAngle;\n};\n\nvar absoluteAngleRadians = function absoluteAngleRadians(angle) {\n return angle - TWO_PI * Math.floor((angle + Math.PI) / TWO_PI);\n};\n\nvar computeArcBoundingBox = function computeArcBoundingBox(ox, oy, 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$1(_ref, 2),\n x = _ref2[0],\n y = _ref2[1];\n\n return [ox + x, oy + y];\n });\n if (includeCenter === true) points.push([ox, oy]);\n var xs = points.map(function (_ref3) {\n var _ref4 = _slicedToArray$1(_ref3, 1),\n x = _ref4[0];\n\n return x;\n });\n var ys = points.map(function (_ref5) {\n var _ref6 = _slicedToArray$1(_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 textPropsByEngine = {\n svg: {\n align: {\n left: 'start',\n center: 'middle',\n right: 'end'\n },\n baseline: {\n top: 'text-before-edge',\n center: 'central',\n bottom: 'alphabetic'\n }\n },\n canvas: {\n align: {\n left: 'left',\n center: 'center',\n right: 'right'\n },\n baseline: {\n top: 'top',\n center: 'middle',\n bottom: 'bottom'\n }\n }\n};\n\nvar getPolarLabelProps = function getPolarLabelProps(radius, angle, rotation) {\n var engine = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'svg';\n var textProps = textPropsByEngine[engine];\n\n var _positionFromAngle = positionFromAngle(angle - Math.PI / 2, radius),\n x = _positionFromAngle.x,\n y = _positionFromAngle.y;\n\n var rotate = radiansToDegrees(angle);\n var align = textProps.align.center;\n var baseline = textProps.baseline.bottom;\n\n if (rotation > 0) {\n align = textProps.align.right;\n baseline = textProps.baseline.center;\n } else if (rotation < 0) {\n align = textProps.align.left;\n baseline = textProps.baseline.center;\n }\n\n if (rotation !== 0 && rotate > 180) {\n rotate -= 180;\n align = align === textProps.align.right ? textProps.align.left : textProps.align.right;\n }\n\n rotate += rotation;\n return {\n x: x,\n y: y,\n rotate: rotate,\n align: align,\n baseline: baseline\n };\n};\n\nfunction _objectSpread$6(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$7(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$7(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\nvar PatternLines = memo(function (_ref) {\n var id = _ref.id,\n _spacing = _ref.spacing,\n _rotation = _ref.rotation,\n background = _ref.background,\n color = _ref.color,\n lineWidth = _ref.lineWidth;\n var rotation = Math.round(_rotation) % 360;\n var spacing = Math.abs(_spacing);\n if (rotation > 180) rotation = rotation - 360;else if (rotation > 90) rotation = rotation - 180;else if (rotation < -180) rotation = rotation + 360;else if (rotation < -90) rotation = rotation + 180;\n var width = spacing;\n var height = spacing;\n var path;\n\n if (rotation === 0) {\n path = \"\\n M 0 0 L \".concat(width, \" 0\\n M 0 \").concat(height, \" L \").concat(width, \" \").concat(height, \"\\n \");\n } else if (rotation === 90) {\n path = \"\\n M 0 0 L 0 \".concat(height, \"\\n M \").concat(width, \" 0 L \").concat(width, \" \").concat(height, \"\\n \");\n } else {\n width = Math.abs(spacing / Math.sin(degreesToRadians(rotation)));\n height = spacing / Math.sin(degreesToRadians(90 - rotation));\n\n if (rotation > 0) {\n path = \"\\n M 0 \".concat(-height, \" L \").concat(width * 2, \" \").concat(height, \"\\n M \").concat(-width, \" \").concat(-height, \" L \").concat(width, \" \").concat(height, \"\\n M \").concat(-width, \" 0 L \").concat(width, \" \").concat(height * 2, \"\\n \");\n } else {\n path = \"\\n M \".concat(-width, \" \").concat(height, \" L \").concat(width, \" \").concat(-height, \"\\n M \").concat(-width, \" \").concat(height * 2, \" L \").concat(width * 2, \" \").concat(-height, \"\\n M 0 \").concat(height * 2, \" L \").concat(width * 2, \" 0\\n \");\n }\n }\n\n return React.createElement(\"pattern\", {\n id: id,\n width: width,\n height: height,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: background,\n stroke: \"rgba(255, 0, 0, 0.1)\",\n strokeWidth: 0\n }), React.createElement(\"path\", {\n d: path,\n strokeWidth: lineWidth,\n stroke: color,\n strokeLinecap: \"square\"\n }));\n});\nPatternLines.displayName = 'PatternLines';\nPatternLines.defaultProps = {\n spacing: 5,\n rotation: 0,\n color: '#000000',\n background: '#ffffff',\n lineWidth: 2\n};\n\nvar patternLinesDef = function patternLinesDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$6({\n id: id,\n type: 'patternLines'\n }, options);\n};\n\nfunction _objectSpread$7(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$8(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$8(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\nvar PatternSquares = memo(function (_ref) {\n var id = _ref.id,\n background = _ref.background,\n color = _ref.color,\n size = _ref.size,\n padding = _ref.padding,\n stagger = _ref.stagger;\n var fullSize = size + padding;\n var halfPadding = padding / 2;\n\n if (stagger === true) {\n fullSize = size * 2 + padding * 2;\n }\n\n return React.createElement(\"pattern\", {\n id: id,\n width: fullSize,\n height: fullSize,\n patternUnits: \"userSpaceOnUse\"\n }, React.createElement(\"rect\", {\n width: fullSize,\n height: fullSize,\n fill: background\n }), React.createElement(\"rect\", {\n x: halfPadding,\n y: halfPadding,\n width: size,\n height: size,\n fill: color\n }), stagger && React.createElement(\"rect\", {\n x: padding * 1.5 + size,\n y: padding * 1.5 + size,\n width: size,\n height: size,\n fill: color\n }));\n});\nPatternSquares.displayName = 'PatternSquares';\nPatternSquares.defaultProps = {\n color: '#000000',\n background: '#ffffff',\n size: 4,\n padding: 4,\n stagger: false\n};\n\nvar patternSquaresDef = function patternSquaresDef(id) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return _objectSpread$7({\n id: id,\n type: 'patternSquares'\n }, options);\n};\n\nvar patternTypes = {\n patternDots: PatternDots,\n patternLines: PatternLines,\n patternSquares: PatternSquares\n};\n\nfunction _objectWithoutProperties$1(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose$1(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\nfunction _objectWithoutPropertiesLoose$1(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 _objectSpread$8(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$9(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$9(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\nvar defsMapping = _objectSpread$8({}, gradientTypes, patternTypes);\n\nvar Defs = function Defs(_ref) {\n var definitions = _ref.defs;\n if (!definitions || definitions.length < 1) return null;\n return React.createElement(\"defs\", null, definitions.map(function (_ref2) {\n var type = _ref2.type,\n def = _objectWithoutProperties$1(_ref2, [\"type\"]);\n\n if (defsMapping[type]) return React.createElement(defsMapping[type], _objectSpread$8({\n key: def.id\n }, def));\n return null;\n }));\n};\n\nvar Defs$1 = memo(Defs);\n\nvar SvgWrapper = function SvgWrapper(_ref) {\n var width = _ref.width,\n height = _ref.height,\n margin = _ref.margin,\n defs = _ref.defs,\n children = _ref.children;\n var theme = useTheme();\n return React.createElement(\"svg\", {\n xmlns: \"http://www.w3.org/2000/svg\",\n role: \"img\",\n width: width,\n height: height\n }, React.createElement(Defs$1, {\n defs: defs\n }), React.createElement(\"rect\", {\n width: width,\n height: height,\n fill: theme.background\n }), React.createElement(\"g\", {\n transform: \"translate(\".concat(margin.left, \",\").concat(margin.top, \")\")\n }, children));\n};\n\nvar DotsItemSymbol = function DotsItemSymbol(_ref) {\n var size = _ref.size,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor;\n return React.createElement(\"circle\", {\n r: size / 2,\n fill: color,\n stroke: borderColor,\n strokeWidth: borderWidth,\n style: {\n pointerEvents: 'none'\n }\n });\n};\n\nvar DotsItemSymbol$1 = memo(DotsItemSymbol);\n\nvar DotsItem = function DotsItem(_ref) {\n var x = _ref.x,\n y = _ref.y,\n symbol = _ref.symbol,\n size = _ref.size,\n datum = _ref.datum,\n color = _ref.color,\n borderWidth = _ref.borderWidth,\n borderColor = _ref.borderColor,\n label = _ref.label,\n labelTextAnchor = _ref.labelTextAnchor,\n labelYOffset = _ref.labelYOffset,\n theme = _ref.theme;\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\"),\n style: {\n pointerEvents: 'none'\n }\n }, React.createElement(symbol, {\n size: size,\n color: color,\n datum: datum,\n borderWidth: borderWidth,\n borderColor: borderColor\n }), label && React.createElement(\"text\", {\n textAnchor: labelTextAnchor,\n y: labelYOffset,\n style: theme.dots.text\n }, label));\n};\n\nvar DotsItemDefaultProps = {\n symbol: DotsItemSymbol$1,\n labelTextAnchor: 'middle',\n labelYOffset: -12\n};\nDotsItem.defaultProps = DotsItemDefaultProps;\nvar DotsItem$1 = memo(DotsItem);\n\nvar computeLabel = function computeLabel(_ref) {\n var axis = _ref.axis,\n width = _ref.width,\n height = _ref.height,\n position = _ref.position,\n offsetX = _ref.offsetX,\n offsetY = _ref.offsetY,\n orientation = _ref.orientation;\n var x = 0;\n var y = 0;\n var rotation = orientation === 'vertical' ? -90 : 0;\n var textAnchor = 'start';\n\n if (axis === 'x') {\n switch (position) {\n case 'top-left':\n x = -offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n\n case 'top':\n y = -offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n\n break;\n\n case 'top-right':\n x = offsetX;\n y = offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n\n break;\n\n case 'right':\n x = offsetX;\n y = height / 2;\n\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n\n break;\n\n case 'bottom-right':\n x = offsetX;\n y = height - offsetY;\n textAnchor = 'start';\n break;\n\n case 'bottom':\n y = height + offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n\n break;\n\n case 'bottom-left':\n y = height - offsetY;\n x = -offsetX;\n\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n\n break;\n\n case 'left':\n x = -offsetX;\n y = height / 2;\n\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n\n break;\n }\n } else {\n switch (position) {\n case 'top-left':\n x = offsetX;\n y = -offsetY;\n textAnchor = 'start';\n break;\n\n case 'top':\n x = width / 2;\n y = -offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'start';\n }\n\n break;\n\n case 'top-right':\n x = width - offsetX;\n y = -offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'start';\n }\n\n break;\n\n case 'right':\n x = width + offsetX;\n\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'middle';\n }\n\n break;\n\n case 'bottom-right':\n x = width - offsetX;\n y = offsetY;\n textAnchor = 'end';\n break;\n\n case 'bottom':\n x = width / 2;\n y = offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'middle';\n } else {\n textAnchor = 'end';\n }\n\n break;\n\n case 'bottom-left':\n x = offsetX;\n y = offsetY;\n\n if (orientation === 'horizontal') {\n textAnchor = 'start';\n } else {\n textAnchor = 'end';\n }\n\n break;\n\n case 'left':\n x = -offsetX;\n\n if (orientation === 'horizontal') {\n textAnchor = 'end';\n } else {\n textAnchor = 'middle';\n }\n\n break;\n }\n }\n\n return {\n x: x,\n y: y,\n rotation: rotation,\n textAnchor: textAnchor\n };\n};\n\nvar CartesianMarkersItem = function CartesianMarkersItem(_ref2) {\n var width = _ref2.width,\n height = _ref2.height,\n axis = _ref2.axis,\n scale = _ref2.scale,\n value = _ref2.value,\n lineStyle = _ref2.lineStyle,\n textStyle = _ref2.textStyle,\n legend = _ref2.legend,\n legendPosition = _ref2.legendPosition,\n legendOffsetX = _ref2.legendOffsetX,\n legendOffsetY = _ref2.legendOffsetY,\n legendOrientation = _ref2.legendOrientation;\n var theme = useTheme();\n var x = 0;\n var x2 = 0;\n var y = 0;\n var y2 = 0;\n\n if (axis === 'y') {\n y = scale(value);\n x2 = width;\n } else {\n x = scale(value);\n y2 = height;\n }\n\n var legendNode = null;\n\n if (legend) {\n var legendProps = computeLabel({\n axis: axis,\n width: width,\n height: height,\n position: legendPosition,\n offsetX: legendOffsetX,\n offsetY: legendOffsetY,\n orientation: legendOrientation\n });\n legendNode = React.createElement(\"text\", {\n transform: \"translate(\".concat(legendProps.x, \", \").concat(legendProps.y, \") rotate(\").concat(legendProps.rotation, \")\"),\n textAnchor: legendProps.textAnchor,\n dominantBaseline: \"central\",\n style: textStyle\n }, legend);\n }\n\n return React.createElement(\"g\", {\n transform: \"translate(\".concat(x, \", \").concat(y, \")\")\n }, React.createElement(\"line\", {\n x1: 0,\n x2: x2,\n y1: 0,\n y2: y2,\n stroke: theme.markers.lineColor,\n strokeWidth: theme.markers.lineStrokeWidth,\n style: lineStyle\n }), legendNode);\n};\n\nCartesianMarkersItem.defaultProps = {\n legendPosition: 'top-right',\n legendOffsetX: 14,\n legendOffsetY: 14,\n legendOrientation: 'horizontal'\n};\nvar CartesianMarkersItem$1 = memo(CartesianMarkersItem);\n\nfunction _extends$1() {\n _extends$1 = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends$1.apply(this, arguments);\n}\n\nvar CartesianMarkers = function CartesianMarkers(_ref) {\n var markers = _ref.markers,\n width = _ref.width,\n height = _ref.height,\n xScale = _ref.xScale,\n yScale = _ref.yScale;\n if (!markers || markers.length === 0) return null;\n return markers.map(function (marker, i) {\n return React.createElement(CartesianMarkersItem$1, _extends$1({\n key: i\n }, marker, {\n width: width,\n height: height,\n scale: marker.axis === 'y' ? yScale : xScale\n }));\n });\n};\n\nvar CartesianMarkers$1 = memo(CartesianMarkers);\n\nfunction _defineProperty$a(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\nvar withCurve = function withCurve() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'curve' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'curveInterpolator' : _ref$destKey;\n\n return withProps(function (props) {\n return _defineProperty$a({}, destKey, curveFromProp(props[srcKey]));\n });\n};\n\nvar withDimensions = function withDimensions() {\n return compose(defaultProps({\n margin: defaultMargin\n }), setPropTypes({\n width: PropTypes.number.isRequired,\n height: PropTypes.number.isRequired,\n margin: marginPropType\n }), withPropsOnChange(function (props, nextProps) {\n return props.width !== nextProps.width || props.height !== nextProps.height || !isEqual(props.margin, nextProps.margin);\n }, function (props) {\n var margin = Object.assign({}, defaultMargin, props.margin);\n return {\n margin: margin,\n width: props.width - margin.left - margin.right,\n height: props.height - margin.top - margin.bottom,\n outerWidth: props.width,\n outerHeight: props.height\n };\n }));\n};\n\nvar getLabelGenerator = function getLabelGenerator(_label, labelFormat) {\n var getRawLabel = isFunction(_label) ? _label : function (d) {\n return get(d, _label);\n };\n var formatter;\n\n if (labelFormat) {\n formatter = isFunction(labelFormat) ? labelFormat : format(labelFormat);\n }\n\n if (formatter) return function (d) {\n return formatter(getRawLabel(d));\n };\n return getRawLabel;\n};\n\nvar getAccessorFor = function getAccessorFor(directive) {\n return isFunction(directive) ? directive : function (d) {\n return d[directive];\n };\n};\n\nvar getAccessorOrValue = function getAccessorOrValue(value) {\n return isFunction(value) ? value : function () {\n return value;\n };\n};\n\nfunction _defineProperty$b(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\nvar withHierarchy = function withHierarchy() {\n var _setPropTypes;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'root' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'root' : _ref$destKey,\n _ref$valueKey = _ref.valueKey,\n valueKey = _ref$valueKey === void 0 ? 'value' : _ref$valueKey,\n _ref$valueDefault = _ref.valueDefault,\n valueDefault = _ref$valueDefault === void 0 ? 'value' : _ref$valueDefault;\n\n return compose(defaultProps(_defineProperty$b({}, valueKey, valueDefault)), setPropTypes((_setPropTypes = {}, _defineProperty$b(_setPropTypes, srcKey, PropTypes.object.isRequired), _defineProperty$b(_setPropTypes, valueKey, PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired), _setPropTypes)), withPropsOnChange([srcKey, valueKey], function (props) {\n return _defineProperty$b({}, destKey, hierarchy(props[srcKey]).sum(getAccessorFor(props[valueKey])));\n }));\n};\n\nvar withMotion = function withMotion() {\n return compose(setPropTypes(motionPropTypes), defaultProps({\n animate: defaultAnimate,\n motionDamping: defaultMotionDamping,\n motionStiffness: defaultMotionStiffness\n }), withPropsOnChange(['motionDamping', 'motionStiffness'], function (_ref) {\n var motionDamping = _ref.motionDamping,\n motionStiffness = _ref.motionStiffness;\n return {\n boundSpring: partialRight(spring, {\n damping: motionDamping,\n stiffness: motionStiffness\n })\n };\n }));\n};\n\nfunction _defineProperty$c(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\nvar withTheme = function withTheme() {\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$srcKey = _ref.srcKey,\n srcKey = _ref$srcKey === void 0 ? 'theme' : _ref$srcKey,\n _ref$destKey = _ref.destKey,\n destKey = _ref$destKey === void 0 ? 'theme' : _ref$destKey;\n\n return compose(setPropTypes(_defineProperty$c({}, srcKey, PropTypes.object)), withPropsOnChange([srcKey], function (props) {\n return _defineProperty$c({}, destKey, extendDefaultTheme(defaultTheme, props[srcKey]));\n }));\n};\n\nfunction _typeof$2(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof$2 = function _typeof(obj) {\n return typeof obj;\n };\n } else {\n _typeof$2 = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof$2(obj);\n}\n\nfunction _objectWithoutProperties$2(source, excluded) {\n if (source == null) return {};\n\n var target = _objectWithoutPropertiesLoose$2(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\nfunction _objectWithoutPropertiesLoose$2(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 _classCallCheck$2(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nfunction _defineProperties$2(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass$2(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties$2(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties$2(Constructor, staticProps);\n return Constructor;\n}\n\nfunction _possibleConstructorReturn$2(self, call) {\n if (call && (_typeof$2(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized$2(self);\n}\n\nfunction _assertThisInitialized$2(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _getPrototypeOf$2(o) {\n _getPrototypeOf$2 = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf$2(o);\n}\n\nfunction _inherits$2(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) _setPrototypeOf$2(subClass, superClass);\n}\n\nfunction _setPrototypeOf$2(o, p) {\n _setPrototypeOf$2 = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf$2(o, p);\n}\n\nvar containerStyle$1 = {\n position: 'relative'\n};\n\nvar Container$1 = function Container(_ref) {\n var theme = _ref.theme,\n _ref$renderWrapper = _ref.renderWrapper,\n renderWrapper = _ref$renderWrapper === void 0 ? true : _ref$renderWrapper,\n children = _ref.children,\n animate = _ref.animate,\n motionStiffness = _ref.motionStiffness,\n motionDamping = _ref.motionDamping;\n var container = useRef(null);\n\n var _useTooltipHandlers = useTooltipHandlers(container),\n showTooltipAt = _useTooltipHandlers.showTooltipAt,\n showTooltipFromEvent = _useTooltipHandlers.showTooltipFromEvent,\n hideTooltip = _useTooltipHandlers.hideTooltip,\n isTooltipVisible = _useTooltipHandlers.isTooltipVisible,\n tooltipContent = _useTooltipHandlers.tooltipContent,\n tooltipPosition = _useTooltipHandlers.tooltipPosition,\n tooltipAnchor = _useTooltipHandlers.tooltipAnchor;\n\n return React.createElement(ThemeProvider, {\n theme: theme\n }, React.createElement(MotionConfigProvider, {\n animate: animate,\n stiffness: motionStiffness,\n damping: motionDamping\n }, React.createElement(tooltipContext.Provider, {\n value: {\n showTooltipAt: showTooltipAt,\n showTooltipFromEvent: showTooltipFromEvent,\n hideTooltip: hideTooltip\n }\n }, renderWrapper === true && React.createElement(\"div\", {\n style: containerStyle$1,\n ref: container\n }, children, isTooltipVisible && React.createElement(TooltipWrapper, {\n position: tooltipPosition,\n anchor: tooltipAnchor\n }, tooltipContent)), renderWrapper !== true && children)));\n};\n\nvar withContainer = function withContainer(WrappedComponent) {\n return function (_Component) {\n _inherits$2(_class, _Component);\n\n function _class() {\n _classCallCheck$2(this, _class);\n\n return _possibleConstructorReturn$2(this, _getPrototypeOf$2(_class).apply(this, arguments));\n }\n\n _createClass$2(_class, [{\n key: \"render\",\n value: function render() {\n var _this$props = this.props,\n theme = _this$props.theme,\n renderWrapper = _this$props.renderWrapper,\n childProps = _objectWithoutProperties$2(_this$props, [\"theme\", \"renderWrapper\"]);\n\n return React.createElement(Container$1, {\n theme: theme,\n renderWrapper: renderWrapper,\n animate: childProps.animate,\n motionStiffness: childProps.motionStiffness,\n motionDamping: childProps.motionDamping\n }, React.createElement(WrappedComponent, childProps));\n }\n }]);\n\n return _class;\n }(Component);\n};\n\nvar boxAlignments = ['center', 'top-left', 'top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left'];\n\nvar alignBox = function alignBox(box, container, alignment) {\n var deltaX = container.width - box.width;\n var deltaY = container.height - box.height;\n var x = 0;\n var y = 0;\n\n if (alignment === 'center') {\n x = deltaX / 2;\n y = deltaY / 2;\n }\n\n if (alignment === 'top') {\n x = deltaX / 2;\n }\n\n if (alignment === 'top-right') {\n x = deltaX;\n }\n\n if (alignment === 'right') {\n x = deltaX;\n y = deltaY / 2;\n }\n\n if (alignment === 'bottom-right') {\n x = deltaX;\n y = deltaY;\n }\n\n if (alignment === 'bottom') {\n x = deltaX / 2;\n y = deltaY;\n }\n\n if (alignment === 'bottom-left') {\n y = deltaY;\n }\n\n if (alignment === 'left') {\n y = deltaY / 2;\n }\n\n return [x, y];\n};\n\nvar getDistance = function getDistance(x1, y1, x2, y2) {\n var deltaX = x2 - x1;\n var deltaY = y2 - y1;\n deltaX *= deltaX;\n deltaY *= deltaY;\n return Math.sqrt(deltaX + deltaY);\n};\n\nvar getAngle = function getAngle(x1, y1, x2, y2) {\n var angle = Math.atan2(y2 - y1, x2 - x1) - Math.PI / 2;\n return angle > 0 ? angle : Math.PI * 2 + angle;\n};\n\nvar isCursorInRect = function isCursorInRect(x, y, width, height, cursorX, cursorY) {\n return x <= cursorX && cursorX <= x + width && y <= cursorY && cursorY <= y + height;\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 getHoveredArc = function getHoveredArc(centerX, centerY, radius, innerRadius, arcs, cursorX, cursorY) {\n if (!isCursorInRing(centerX, centerY, radius, innerRadius, cursorX, cursorY)) return null;\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 getRelativeCursor = function getRelativeCursor(el, event) {\n var clientX = event.clientX,\n clientY = event.clientY;\n var bounds = el.getBoundingClientRect();\n return [clientX - bounds.left, clientY - bounds.top];\n};\n\nfunction _objectSpread$9(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(Object(source));\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty$d(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _defineProperty$d(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 _toConsumableArray$1(arr) {\n return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _nonIterableSpread$1();\n}\n\nfunction _nonIterableSpread$1() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _iterableToArray$1(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _arrayWithoutHoles$1(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}\n\nvar gradientKeys = Object.keys(gradientTypes);\nvar patternKeys = Object.keys(patternTypes);\n\nvar isMatchingDef = function isMatchingDef(predicate, node, dataKey) {\n if (predicate === '*') {\n return true;\n } else if (isFunction(predicate)) {\n return predicate(node);\n } else if (isPlainObject(predicate)) {\n var data = dataKey ? get(node, dataKey) : node;\n return isEqual(pick(data, Object.keys(predicate)), predicate);\n }\n\n return false;\n};\n\nvar bindDefs = function bindDefs(defs, nodes, rules) {\n var _ref = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},\n dataKey = _ref.dataKey,\n _ref$colorKey = _ref.colorKey,\n colorKey = _ref$colorKey === void 0 ? 'color' : _ref$colorKey,\n _ref$targetKey = _ref.targetKey,\n targetKey = _ref$targetKey === void 0 ? 'fill' : _ref$targetKey;\n\n var boundDefs = [];\n var generatedIds = {};\n\n if (defs.length && nodes.length) {\n boundDefs = _toConsumableArray$1(defs);\n nodes.forEach(function (node) {\n var _loop = function _loop(i) {\n var _rules$i = rules[i],\n id = _rules$i.id,\n match = _rules$i.match;\n\n if (isMatchingDef(match, node, dataKey)) {\n var def = defs.find(function (_ref2) {\n var defId = _ref2.id;\n return defId === id;\n });\n\n if (def) {\n if (patternKeys.includes(def.type)) {\n if (def.background === 'inherit' || def.color === 'inherit') {\n var nodeColor = get(node, colorKey);\n var background = def.background;\n var color = def.color;\n var inheritedId = id;\n\n if (def.background === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".bg.\").concat(nodeColor);\n background = nodeColor;\n }\n\n if (def.color === 'inherit') {\n inheritedId = \"\".concat(inheritedId, \".fg.\").concat(nodeColor);\n color = nodeColor;\n }\n\n set(node, targetKey, \"url(#\".concat(inheritedId, \")\"));\n\n if (!generatedIds[inheritedId]) {\n boundDefs.push(_objectSpread$9({}, def, {\n id: inheritedId,\n background: background,\n color: color\n }));\n generatedIds[inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n } else if (gradientKeys.includes(def.type)) {\n var allColors = def.colors.map(function (_ref3) {\n var color = _ref3.color;\n return color;\n });\n\n if (allColors.includes('inherit')) {\n var _nodeColor = get(node, colorKey);\n\n var _inheritedId = id;\n\n var inheritedDef = _objectSpread$9({}, def, {\n colors: def.colors.map(function (colorStop, i) {\n if (colorStop.color !== 'inherit') return colorStop;\n _inheritedId = \"\".concat(_inheritedId, \".\").concat(i, \".\").concat(_nodeColor);\n return _objectSpread$9({}, colorStop, {\n color: colorStop.color === 'inherit' ? _nodeColor : colorStop.color\n });\n })\n });\n\n inheritedDef.id = _inheritedId;\n set(node, targetKey, \"url(#\".concat(_inheritedId, \")\"));\n\n if (!generatedIds[_inheritedId]) {\n boundDefs.push(inheritedDef);\n generatedIds[_inheritedId] = 1;\n }\n } else {\n set(node, targetKey, \"url(#\".concat(id, \")\"));\n }\n }\n }\n\n return \"break\";\n }\n };\n\n for (var i = 0; i < rules.length; i++) {\n var _ret = _loop(i);\n\n if (_ret === \"break\") break;\n }\n });\n }\n\n return boundDefs;\n};\n\nexport { CartesianMarkers$1 as CartesianMarkers, CartesianMarkersItem$1 as CartesianMarkersItem, Container, Defs$1 as Defs, DotsItem$1 as DotsItem, DotsItemDefaultProps, LinearGradient, MotionConfigProvider, PatternDots, PatternLines, PatternSquares, ResponsiveWrapper, SmartMotion, SvgWrapper, TWO_PI, ThemeProvider, absoluteAngleDegrees, absoluteAngleRadians, alignBox, annotationsPropType, areaCurvePropKeys, areaCurvePropType, axisThemePropType, bindDefs, blendModePropType, blendModes, boxAlignments, closedCurvePropKeys, closedCurvePropType, colorInterpolatorIds, colorInterpolators, colorSchemeIds, computeArcBoundingBox, crosshairPropType, curveFromProp, curvePropKeys, curvePropMapping, curvePropType, defaultAnimate, defaultCategoricalColors, defaultColorRange, defaultMargin, defaultMotionDamping, defaultMotionStiffness, defaultTheme, defsPropTypes, degreesToRadians, dotsThemePropType, extendDefaultTheme, getAccessorFor, getAccessorOrValue, getAngle, getColorScale, getDistance, getHoveredArc, getLabelGenerator, getPolarLabelProps, getRelativeCursor, getValueFormatter, gradientTypes, gridThemePropType, guessQuantizeColorScale, isCursorInRect, isCursorInRing, isMatchingDef, labelsThemePropType, legendsThemePropType, lineCurvePropKeys, lineCurvePropType, linearGradientDef, marginPropType, markersThemePropType, midAngle, motionConfigContext, motionPropTypes, nivoCategoricalColors, noop, patternDotsDef, patternLinesDef, patternSquaresDef, patternTypes, positionFromAngle, quantizeColorScalePropType, quantizeColorScales, quantizeColorScalesKeys, radiansToDegrees, stackOffsetFromProp, stackOffsetPropKeys, stackOffsetPropMapping, stackOffsetPropType, stackOrderFromProp, stackOrderPropKeys, stackOrderPropMapping, stackOrderPropType, textPropsByEngine, themeContext, themePropType, treeMapTileFromProp, treeMapTilePropKeys, treeMapTilePropMapping, treeMapTilePropType, useCurveInterpolation, useDimensions, useMotionConfig, usePartialTheme, useTheme, useValueFormatter, withContainer, withCurve, withDimensions, withHierarchy, withMotion, withTheme };","import ascending from \"./ascending.js\";\nexport default function (series) {\n return ascending(series).reverse();\n}","import none from \"./none.js\";\nexport default function (series) {\n return none(series).reverse();\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0)) return;\n\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) {\n y += series[i][j][1] || 0;\n }\n\n if (y) for (i = 0; i < n; ++i) {\n series[i][j][1] /= y;\n }\n }\n\n none(series, order);\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0)) return;\n\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) {\n y += series[i][j][1] || 0;\n }\n\n s0[j][1] += s0[j][0] = -y / 2;\n }\n\n none(series, order);\n}","import none from \"./none.js\";\nexport default function (series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n\n s1 += sij0, s2 += s3 * sij0;\n }\n\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}","export default function (parent, x0, y0, x1, y1) {\n var nodes = parent.children,\n i,\n n = nodes.length,\n sum,\n sums = new Array(n + 1);\n\n for (sums[0] = sum = i = 0; i < n; ++i) {\n sums[i + 1] = sum += nodes[i].value;\n }\n\n partition(0, n, parent.value, x0, y0, x1, y1);\n\n function partition(i, j, value, x0, y0, x1, y1) {\n if (i >= j - 1) {\n var node = nodes[i];\n node.x0 = x0, node.y0 = y0;\n node.x1 = x1, node.y1 = y1;\n return;\n }\n\n var valueOffset = sums[i],\n valueTarget = value / 2 + valueOffset,\n k = i + 1,\n hi = j - 1;\n\n while (k < hi) {\n var mid = k + hi >>> 1;\n if (sums[mid] < valueTarget) k = mid + 1;else hi = mid;\n }\n\n if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i + 1 < k) --k;\n var valueLeft = sums[k] - valueOffset,\n valueRight = value - valueLeft;\n\n if (x1 - x0 > y1 - y0) {\n var xk = (x0 * valueRight + x1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, xk, y1);\n partition(k, j, valueRight, xk, y0, x1, y1);\n } else {\n var yk = (y0 * valueRight + y1 * valueLeft) / value;\n partition(i, k, valueLeft, x0, y0, x1, yk);\n partition(k, j, valueRight, x0, yk, x1, y1);\n }\n }\n}","import dice from \"./dice.js\";\nimport slice from \"./slice.js\";\nexport default function (parent, x0, y0, x1, y1) {\n (parent.depth & 1 ? slice : dice)(parent, x0, y0, x1, y1);\n}","var isSymbol = require('./isSymbol');\n\n/**\n * Compares values to sort them in ascending order.\n *\n * @private\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {number} Returns the sort order indicator for `value`.\n */\nfunction compareAscending(value, other) {\n if (value !== other) {\n var valIsDefined = value !== undefined,\n valIsNull = value === null,\n valIsReflexive = value === value,\n valIsSymbol = isSymbol(value);\n\n var othIsDefined = other !== undefined,\n othIsNull = other === null,\n othIsReflexive = other === other,\n othIsSymbol = isSymbol(other);\n\n if ((!othIsNull && !othIsSymbol && !valIsSymbol && value > other) ||\n (valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol) ||\n (valIsNull && othIsDefined && othIsReflexive) ||\n (!valIsDefined && othIsReflexive) ||\n !valIsReflexive) {\n return 1;\n }\n if ((!valIsNull && !valIsSymbol && !othIsSymbol && value < other) ||\n (othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol) ||\n (othIsNull && valIsDefined && valIsReflexive) ||\n (!othIsDefined && valIsReflexive) ||\n !othIsReflexive) {\n return -1;\n }\n }\n return 0;\n}\n\nmodule.exports = compareAscending;\n","import { cubehelix as colorCubehelix } from \"d3-color\";\nimport color, { hue } from \"./color.js\";\n\nfunction cubehelix(hue) {\n return function cubehelixGamma(y) {\n y = +y;\n\n function cubehelix(start, end) {\n var h = hue((start = colorCubehelix(start)).h, (end = colorCubehelix(end)).h),\n s = color(start.s, end.s),\n l = color(start.l, end.l),\n opacity = color(start.opacity, end.opacity);\n return function (t) {\n start.h = h(t);\n start.s = s(t);\n start.l = l(Math.pow(t, y));\n start.opacity = opacity(t);\n return start + \"\";\n };\n }\n\n cubehelix.gamma = cubehelixGamma;\n return cubehelix;\n }(1);\n}\n\nexport default cubehelix(hue);\nexport var cubehelixLong = cubehelix(color);","var baseIsMap = require('./_baseIsMap'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsMap = nodeUtil && nodeUtil.isMap;\n\n/**\n * Checks if `value` is classified as a `Map` object.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n * @example\n *\n * _.isMap(new Map);\n * // => true\n *\n * _.isMap(new WeakMap);\n * // => false\n */\nvar isMap = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;\n\nmodule.exports = isMap;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** `Object#toString` result references. */\nvar objectTag = '[object Object]';\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\n\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n\n return result;\n}\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\n\n\nfunction overArg(func, transform) {\n return function (arg) {\n return func(transform(arg));\n };\n}\n/** Used for built-in method references. */\n\n\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n/** Used to resolve the decompiled source of functions. */\n\nvar funcToString = funcProto.toString;\n/** Used to check objects for own properties. */\n\nvar hasOwnProperty = objectProto.hasOwnProperty;\n/** Used to infer the `Object` constructor. */\n\nvar objectCtorString = funcToString.call(Object);\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\n\nvar objectToString = objectProto.toString;\n/** Built-in value references. */\n\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\n\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\n\n\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || objectToString.call(value) != objectTag || isHostObject(value)) {\n return false;\n }\n\n var proto = getPrototype(value);\n\n if (proto === null) {\n return true;\n }\n\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString;\n}\n\nmodule.exports = isPlainObject;","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n"],"sourceRoot":""}