[0],\n props: JSX.IntrinsicAttributes,\n ...children: React.ReactChild[]\n ) => React.ReactChild\n\n /**\n * Disable the compiler's best-effort transcription of provided raw HTML\n * into JSX-equivalent. This is the functionality that prevents the need to\n * use `dangerouslySetInnerHTML` in React.\n */\n disableParsingRawHTML: boolean\n\n /**\n * Forces the compiler to have space between hash sign and the header text which\n * is explicitly stated in the most of the markdown specs.\n * https://github.github.com/gfm/#atx-heading\n * `The opening sequence of # characters must be followed by a space or by the end of line.`\n */\n enforceAtxHeadings: boolean\n\n /**\n * Forces the compiler to always output content with a block-level wrapper\n * (`` or any block-level syntax your markdown already contains.)\n */\n forceBlock: boolean\n\n /**\n * Forces the compiler to always output content with an inline wrapper (``)\n */\n forceInline: boolean\n\n /**\n * Forces the compiler to wrap results, even if there is only a single\n * child or no children.\n */\n forceWrapper: boolean\n\n /**\n * Supply additional HTML entity: unicode replacement mappings.\n *\n * Pass only the inner part of the entity as the key,\n * e.g. `≤` -> `{ \"le\": \"\\u2264\" }`\n *\n * By default\n * the following entities are replaced with their unicode equivalents:\n *\n * ```\n * &\n * '\n * >\n * <\n * \n * "\n * ```\n */\n namedCodesToUnicode: {\n [key: string]: string\n }\n\n /**\n * Selectively control the output of particular HTML tags as they would be\n * emitted by the compiler.\n */\n overrides: Overrides\n\n /**\n * Allows for full control over rendering of particular rules.\n * For example, to implement a LaTeX renderer such as `react-katex`:\n *\n * ```\n * renderRule(next, node, renderChildren, state) {\n * if (node.type === RuleType.codeBlock && node.lang === 'latex') {\n * return (\n * \n * {String.raw`${node.text}`}\n * \n * )\n * }\n *\n * return next();\n * }\n * ```\n *\n * Thar be dragons obviously, but you can do a lot with this\n * (have fun!) To see how things work internally, check the `render`\n * method in source for a particular rule.\n */\n renderRule: (\n /** Resume normal processing, call this function as a fallback if you are not returning custom JSX. */\n next: () => React.ReactChild,\n /** the current AST node, use `RuleType` against `node.type` for identification */\n node: ParserResult,\n /** use as `renderChildren(node.children)` for block nodes */\n renderChildren: RuleOutput,\n /** contains `key` which should be supplied to the topmost JSX element */\n state: State\n ) => React.ReactChild\n\n /**\n * Override normalization of non-URI-safe characters for use in generating\n * HTML IDs for anchor linking purposes.\n */\n slugify: (source: string) => string\n\n /**\n * Declare the type of the wrapper to be used when there are multiple\n * children to render. Set to `null` to get an array of children back\n * without any wrapper, or use `React.Fragment` to get a React element\n * that won't show up in the DOM.\n */\n wrapper: React.ElementType | null\n }>\n}\n\nexport default Markdown\n","import styled, { css } from 'styled-components';\nimport { genericStyles, normalizeColor, textAlignStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar colorStyle = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.colorProp, props.theme);\n});\nvar sizeStyle = function sizeStyle(props) {\n var size = props.size || 'medium';\n var data = props.theme.paragraph[size];\n return css([\"font-size:\", \";line-height:\", \";max-width:\", \";\"], data ? data.size : size, data ? data.height : 'normal', props.fillProp ? 'none' : data && data.maxWidth);\n};\nvar fontFamily = css([\"font-family:\", \";\"], function (props) {\n return props.theme.paragraph.font.family;\n});\nvar maxlinesStyle = function maxlinesStyle(props) {\n return props.maxLines && css([\"display:-webkit-box;-webkit-line-clamp:\", \";-webkit-box-orient:vertical;overflow:hidden;\"], props.maxLines);\n};\nvar StyledParagraph = styled.p.withConfig({\n displayName: \"StyledParagraph\",\n componentId: \"sc-tbetod-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return maxlinesStyle(props);\n}, function (props) {\n return sizeStyle(props);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.colorProp && colorStyle;\n}, function (props) {\n return props.theme.paragraph.font && props.theme.paragraph.font.family && fontFamily;\n}, function (props) {\n return props.theme.paragraph && props.theme.paragraph.extend;\n});\nStyledParagraph.defaultProps = {};\nObject.setPrototypeOf(StyledParagraph.defaultProps, defaultProps);\nexport { StyledParagraph };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n fill: PropTypes.bool,\n maxLines: PropTypes.number,\n responsive: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['small', 'medium', 'large', 'xlarge', 'xxlarge']), PropTypes.string]),\n textAlign: PropTypes.oneOf(['start', 'center', 'end', 'justify'])\n });\n}\nexport var ParagraphPropTypes = PropType;","import React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Skeleton } from '../Skeleton';\nimport { Box } from '../Box';\nvar ParagraphSkeleton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var fill = _ref.fill,\n sizeProp = _ref.size;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var size = sizeProp || 'medium';\n var data = theme.paragraph[size];\n var height = data ? data.size : size;\n return /*#__PURE__*/React.createElement(Box, {\n ref: ref,\n gap: \"xsmall\",\n width: {\n max: fill ? 'none' : data && data.maxWidth\n }\n }, /*#__PURE__*/React.createElement(Skeleton, {\n height: height\n }), /*#__PURE__*/React.createElement(Skeleton, {\n height: height\n }), /*#__PURE__*/React.createElement(Skeleton, {\n height: height,\n width: \"30%\"\n }));\n});\nParagraphSkeleton.displayName = 'ParagraphSkeleton';\nexport { ParagraphSkeleton };","var _excluded = [\"children\", \"color\", \"fill\", \"size\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo } from 'react';\nimport { StyledParagraph } from './StyledParagraph';\nimport { ParagraphPropTypes } from './propTypes';\nimport { useSkeleton } from '../Skeleton';\nimport { ParagraphSkeleton } from './ParagraphSkeleton';\nimport { TextContext } from '../Text/TextContext';\nvar Paragraph = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n color = _ref.color,\n fill = _ref.fill,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var skeleton = useSkeleton();\n var textContextValue = useMemo(function () {\n return {\n size: size\n };\n }, [size]);\n if (skeleton) {\n return /*#__PURE__*/React.createElement(ParagraphSkeleton, _extends({\n ref: ref,\n fill: fill,\n size: size\n }, rest), children);\n }\n return /*#__PURE__*/React.createElement(StyledParagraph, _extends({\n ref: ref,\n colorProp: color,\n fillProp: fill,\n size: size\n }, rest), children !== undefined ? /*#__PURE__*/React.createElement(TextContext.Provider, {\n value: textContextValue\n }, children) : undefined);\n});\nParagraph.displayName = 'Paragraph';\nParagraph.prototype = ParagraphPropTypes;\nexport { Paragraph };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n components: PropTypes.object,\n options: PropTypes.shape({})\n };\n}\nexport var MarkdownPropTypes = PropType;","var _excluded = [\"children\", \"components\", \"options\", \"theme\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, Fragment } from 'react';\nimport Markdown from 'markdown-to-jsx';\nimport { deepMerge } from '../../utils';\nimport { Heading } from '../Heading';\nimport { Paragraph } from '../Paragraph';\nimport { Anchor } from '../Anchor';\nimport { Image } from '../Image';\nimport { Table } from '../Table';\nimport { TableBody } from '../TableBody';\nimport { TableCell } from '../TableCell';\nimport { TableFooter } from '../TableFooter';\nimport { TableHeader } from '../TableHeader';\nimport { TableRow } from '../TableRow';\nimport { MarkdownPropTypes } from './propTypes';\nvar GrommetMarkdown = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n components = _ref.components,\n options = _ref.options,\n theme = _ref.theme,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var heading = [1, 2, 3, 4].reduce(function (obj, level) {\n var result = _extends({}, obj);\n result[\"h\" + level] = {\n component: Heading,\n props: {\n level: level\n }\n };\n return result;\n }, {});\n var overrides = deepMerge({\n a: {\n component: Anchor\n },\n img: {\n component: Image\n },\n p: {\n component: Paragraph\n },\n table: {\n component: Table\n },\n td: {\n component: TableCell,\n props: {\n plain: true\n }\n },\n tbody: {\n component: TableBody\n },\n tfoot: {\n component: TableFooter\n },\n th: {\n component: TableCell\n },\n thead: {\n component: TableHeader\n },\n tr: {\n component: TableRow\n }\n }, heading, components, options && options.overrides);\n\n // we use Fragment as the wrapper so we can assign the ref with the div\n // wrapper can still be overridden with the options.\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(Markdown, {\n children: children,\n options: _extends({\n wrapper: Fragment\n }, options, {\n overrides: overrides\n })\n }));\n});\nGrommetMarkdown.propTypes = MarkdownPropTypes;\nexport { GrommetMarkdown as Markdown };","import styled, { css } from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar roundStyle = css([\"border-radius:\", \";\"], function (props) {\n return props.theme.global.edgeSize[props.round.size];\n});\n\n// overflow: hidden is needed for ie11\nvar StyledMeter = styled.svg.withConfig({\n displayName: \"StyledMeter\",\n componentId: \"sc-nsxarx-0\"\n})([\"max-width:100%;overflow:hidden;\", \" \", \" \", \" path{transition:stroke 0.3s,stroke-width 0.3s;}\", \";\"], function (props) {\n return props.reverse && css([\"transform:scale(-1,1);\"]);\n}, genericStyles, function (props) {\n return props.round && roundStyle;\n}, function (props) {\n return props.theme.meter && props.theme.meter.extend;\n});\nStyledMeter.defaultProps = {};\nObject.setPrototypeOf(StyledMeter.defaultProps, defaultProps);\nexport { StyledMeter };","import { normalizeColor } from '../../utils';\nexport var strokeProps = function strokeProps(color, theme) {\n var result = {};\n if (color) {\n if (typeof color === 'object') {\n result.stroke = normalizeColor(color.color, theme);\n if (color.opacity) {\n result.strokeOpacity = \"\" + (color.opacity === true ? theme.global.opacity.medium : theme.global.opacity[color.opacity] || color.opacity);\n }\n } else {\n result.stroke = normalizeColor(color, theme);\n }\n }\n return result;\n};\nvar neutralExp = /^neutral-\\d+/;\nexport var defaultColor = function defaultColor(index, theme, valuesLength) {\n if (index === valuesLength - 1 && theme.meter.color) {\n return theme.meter.color;\n }\n // We want the last value to have the first color\n var colorIndex = valuesLength - index - 1;\n if (theme.meter && theme.meter.colors) {\n var _colors = theme.meter.colors[theme.dark ? 'dark' : 'light'] || theme.meter.colors;\n return _colors[colorIndex % _colors.length];\n }\n var colors = Object.keys(theme.global.colors).filter(function (n) {\n return n.match(/^graph-[0-9]$/);\n });\n if (colors.length > 0) {\n return colors[colorIndex % colors.length];\n }\n // Deprecate using \"neutral-*\" color names. Remove eventually.\n var neutralColors = Object.keys(theme.global.colors).filter(function (k) {\n return neutralExp.test(k);\n });\n return neutralColors[colorIndex % neutralColors.length];\n};","var _excluded = [\"background\", \"max\", \"round\", \"size\", \"thickness\", \"direction\", \"values\", \"reverse\"],\n _excluded2 = [\"color\", \"highlight\", \"label\", \"onHover\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { parseMetricToNum } from '../../utils';\nimport { StyledMeter } from './StyledMeter';\nimport { strokeProps, defaultColor } from './utils';\nvar Bar = /*#__PURE__*/forwardRef(function (props, ref) {\n var background = props.background,\n max = props.max,\n round = props.round,\n size = props.size,\n thicknessProp = props.thickness,\n direction = props.direction,\n values = props.values,\n reverse = props.reverse,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var length = size === 'full' ? 288 : parseMetricToNum(theme.global.size[size] || size);\n var thickness = parseMetricToNum(theme.global.edgeSize[thicknessProp] || thicknessProp);\n // account for the round cap, if any\n var capOffset = round ? thickness / 2 : 0;\n var mid = thickness / 2;\n var someHighlight = (values || []).some(function (v) {\n return v.highlight;\n });\n var start = direction === 'horizontal' ? capOffset : max * (length - 2 * capOffset) / max;\n var paths = (values || []).reduce(function (acc, valueArg, index) {\n if (valueArg.value > 0) {\n var color = valueArg.color,\n highlight = valueArg.highlight,\n label = valueArg.label,\n onHover = valueArg.onHover,\n value = valueArg.value,\n pathRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);\n var key = \"p-\" + index;\n var delta = value * (length - 2 * capOffset) / max;\n var d = direction === 'horizontal' ? \"M \" + start + \",\" + mid + \" L \" + (start + delta) + \",\" + mid : \"M \" + mid + \",\" + start + \" L \" + mid + \",\" + (start - delta);\n var colorName = color || defaultColor(index, theme, values ? values.length : 0);\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n if (direction === 'horizontal') {\n start += delta;\n } else {\n start -= delta;\n }\n var result = /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d,\n fill: \"none\"\n }, strokeProps(someHighlight && !highlight ? background : colorName, theme), {\n strokeWidth: direction === 'horizontal' ? thickness : length,\n strokeLinecap: round ? 'round' : 'butt'\n }, hoverProps, pathRest));\n acc.push(result);\n }\n return acc;\n }, []).reverse(); // reverse so the caps looks right\n\n var width;\n if (direction === 'horizontal') {\n width = size === 'full' ? '100%' : length;\n } else {\n width = size === 'full' ? '100%' : thickness;\n }\n var backgroundPath = direction === 'horizontal' ? \"M \" + capOffset + \",\" + mid + \" L \" + (length - capOffset) + \",\" + mid : \"M \" + mid + \",\" + capOffset + \" L \" + mid + \",\" + (length - capOffset);\n return /*#__PURE__*/React.createElement(StyledMeter, _extends({\n ref: ref,\n viewBox: direction === 'horizontal' ? \"0 0 \" + length + \" \" + thickness : \"0 0 \" + thickness + \" \" + length,\n preserveAspectRatio: \"none\",\n width: width,\n height: direction === 'horizontal' ? thickness : length,\n round: round ? {\n size: thicknessProp\n } : undefined\n }, rest, {\n reverse: reverse\n }), /*#__PURE__*/React.createElement(\"path\", _extends({\n d: backgroundPath,\n fill: \"none\"\n }, strokeProps(background, theme), {\n strokeWidth: thickness,\n strokeLinecap: round ? 'round' : 'square'\n })), paths);\n});\nBar.displayName = 'Bar';\nBar.defaultProps = {\n background: 'light-1'\n};\nObject.setPrototypeOf(Bar.defaultProps, defaultProps);\nexport { Bar };","var POST_DECIMAL_DIGITS = 10;\nexport var baseUnit = 24;\nexport var polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n};\nexport var arcCommands = function arcCommands(centerX, centerY, radius, startAngle, endAngle) {\n // handle that we can't draw a complete circle\n var normalizedEndAngle = endAngle;\n /* \n added endAngle - startAngle >= 360 \n for SemiCircle the endAngle will never be greater then startAngle \n since it starts with a startAngle of 270.\n */\n if (endAngle > startAngle && endAngle - startAngle >= 360) {\n normalizedEndAngle = startAngle + 359.99;\n }\n var start = polarToCartesian(centerX, centerY, radius, normalizedEndAngle);\n var end = polarToCartesian(centerX, centerY, radius, startAngle);\n var arcSweep = normalizedEndAngle - startAngle <= 180 ? '0' : '1';\n var d = ['M', start.x.toFixed(POST_DECIMAL_DIGITS), start.y.toFixed(POST_DECIMAL_DIGITS), 'A', radius.toFixed(POST_DECIMAL_DIGITS), radius.toFixed(POST_DECIMAL_DIGITS), 0, arcSweep, 0, end.x.toFixed(POST_DECIMAL_DIGITS), end.y.toFixed(POST_DECIMAL_DIGITS)].join(' ');\n return d;\n};\n\n/* TranslatedEngAngle will now take the value of the\nstartAngle + anglePer * value and mod by 360. This was added\nto take account the startAngle not being 0. So no matter the\nvalue it will be % 360 to get the correct angle. \n*/\nexport var translateEndAngle = function translateEndAngle(startAngle, anglePer, value) {\n return Math.max(0, startAngle + anglePer * value) % 360;\n};","var _excluded = [\"background\", \"max\", \"round\", \"size\", \"thickness\", \"type\", \"values\"],\n _excluded2 = [\"color\", \"highlight\", \"label\", \"onHover\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { arcCommands, parseMetricToNum, translateEndAngle } from '../../utils';\nimport { StyledMeter } from './StyledMeter';\nimport { strokeProps, defaultColor } from './utils';\nvar Circle = /*#__PURE__*/forwardRef(function (props, ref) {\n var background = props.background,\n max = props.max,\n round = props.round,\n size = props.size,\n thickness = props.thickness,\n type = props.type,\n values = props.values,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n var theme = useContext(ThemeContext);\n var width = size === 'full' ? 288 : parseMetricToNum(theme.global.size[size] || size);\n var strokeWidth = type === 'pie' ? width / 2 : parseMetricToNum(theme.global.edgeSize[thickness] || thickness);\n var centerX = width / 2;\n var centerY = width / 2;\n var radius = width / 2 - strokeWidth / 2;\n // truncate to avoid floating point arithmetic errors\n // see: https://github.com/grommet/grommet/issues/6190\n // Choose a scale factor at least 3 orders of magnitude above max\n var scalePower = Math.max(5, Math.ceil(Math.log10(max)) + 3);\n var scale = Math.pow(10, scalePower);\n var anglePer = Math.floor((type === 'semicircle' ? 180 : 360) / max * scale) / scale;\n // (type === 'semicircle' ? 180 : 360) / max;\n var someHighlight = (values || []).some(function (v) {\n return v.highlight;\n });\n var startValue = 0;\n var startAngle = type === 'semicircle' ? 270 : 0;\n var paths = [];\n var pathCaps = [];\n (values || []).filter(function (v) {\n return v.value > 0;\n }).forEach(function (valueArg, index) {\n var color = valueArg.color,\n highlight = valueArg.highlight,\n label = valueArg.label,\n onHover = valueArg.onHover,\n value = valueArg.value,\n pathRest = _objectWithoutPropertiesLoose(valueArg, _excluded2);\n var key = \"p-\" + index;\n var colorName = color || defaultColor(index, theme, values ? values.length : 0);\n var endAngle;\n if (startValue + value >= max) {\n endAngle = type === 'semicircle' ? 90 : 360;\n } else {\n endAngle = translateEndAngle(startAngle, anglePer, value);\n }\n var hoverProps;\n if (onHover) {\n hoverProps = {\n onMouseOver: function onMouseOver() {\n return onHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return onHover(false);\n }\n };\n }\n var stroke = strokeProps(someHighlight && !highlight ? background : colorName, theme);\n if (round) {\n var d1 = arcCommands(centerX, centerY, radius, startAngle, endAngle);\n paths.unshift( /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d1,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"round\"\n }, hoverProps, pathRest)));\n\n // To handle situations where the last values are small, redraw\n // a dot at the end. Give just a bit of angle to avoid anti-aliasing\n // leakage around the edge.\n var d2 = arcCommands(centerX, centerY, radius, endAngle - 0.5, endAngle);\n var pathCap = /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key + \"-\",\n d: d2,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"round\"\n }, hoverProps, pathRest));\n // If we are on a large enough path to not need re-drawing previous\n // ones, clear the pathCaps we've collected already.\n if (endAngle - startAngle > 2 * anglePer) {\n pathCaps = [];\n }\n pathCaps.unshift(pathCap);\n } else {\n var d = arcCommands(centerX, centerY, radius, startAngle, endAngle);\n paths.push( /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n d: d,\n fill: \"none\"\n }, stroke, {\n strokeWidth: strokeWidth,\n strokeLinecap: \"butt\"\n }, hoverProps, pathRest)));\n }\n startValue += value;\n startAngle = endAngle;\n });\n var track;\n if (type === 'semicircle') {\n var d1 = arcCommands(centerX, centerY, radius, 270, 90);\n track = /*#__PURE__*/React.createElement(\"path\", _extends({\n d: d1,\n strokeWidth: strokeWidth,\n fill: \"none\"\n }, strokeProps(background, theme), {\n strokeLinecap: round ? 'round' : 'square'\n }));\n } else {\n track = /*#__PURE__*/React.createElement(\"circle\", _extends({\n cx: centerX,\n cy: centerY,\n r: radius\n }, strokeProps(background, theme), {\n strokeWidth: strokeWidth,\n strokeLinecap: round ? 'round' : 'square',\n fill: \"none\"\n }));\n }\n var viewBoxHeight = type === 'semicircle' ? width / 2 : width;\n return /*#__PURE__*/React.createElement(StyledMeter, _extends({\n ref: ref,\n viewBox: \"0 0 \" + width + \" \" + viewBoxHeight,\n width: size === 'full' ? '100%' : width,\n height: size === 'full' ? '100%' : viewBoxHeight\n }, rest), track, paths, pathCaps);\n});\nCircle.displayName = 'Circle';\nCircle.defaultProps = {};\nObject.setPrototypeOf(Circle.defaultProps, defaultProps);\nexport { Circle };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n color: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.oneOf(['weak', 'medium', 'strong']), PropTypes.number, PropTypes.bool])\n })]),\n color: PropTypes.string,\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n reverse: PropTypes.bool,\n round: PropTypes.bool,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), PropTypes.string]),\n thickness: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n type: PropTypes.oneOf(['bar', 'circle', 'pie', 'semicircle']),\n direction: PropTypes.oneOf(['horizontal', 'vertical']),\n value: PropTypes.number,\n values: PropTypes.arrayOf(PropTypes.shape({\n color: PropTypes.string,\n highlight: PropTypes.bool,\n label: PropTypes.string.isRequired,\n // for accessibility\n onClick: PropTypes.func,\n onHover: PropTypes.func,\n value: PropTypes.number.isRequired\n }))\n });\n}\nexport var MeterPropTypes = PropType;","var _excluded = [\"background\", \"color\", \"direction\", \"size\", \"thickness\", \"type\", \"reverse\", \"value\", \"values\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useMemo, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Bar } from './Bar';\nimport { Circle } from './Circle';\nimport { MeterPropTypes } from './propTypes';\nvar deriveMax = function deriveMax(values) {\n var max = 100;\n if (values && values.length > 1) {\n max = 0;\n values.forEach(function (v) {\n max += v.value;\n });\n }\n return max;\n};\nvar Meter = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref$background = _ref.background,\n background = _ref$background === void 0 ? {\n color: 'light-2',\n opacity: 'medium'\n } : _ref$background,\n color = _ref.color,\n _ref$direction = _ref.direction,\n direction = _ref$direction === void 0 ? 'horizontal' : _ref$direction,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 'medium' : _ref$size,\n _ref$thickness = _ref.thickness,\n thickness = _ref$thickness === void 0 ? 'medium' : _ref$thickness,\n _ref$type = _ref.type,\n type = _ref$type === void 0 ? 'bar' : _ref$type,\n reverseProp = _ref.reverse,\n value = _ref.value,\n valuesProp = _ref.values,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n // normalize values to an array of objects\n var values = useMemo(function () {\n if (valuesProp) return valuesProp;\n if (value) return [{\n color: color,\n value: value\n }];\n return [];\n }, [color, value, valuesProp]);\n var reverse = direction === 'horizontal' && (theme.dir === 'rtl' || reverseProp) && !(theme.dir === 'rtl' && reverseProp);\n var memoizedMax = useMemo(function () {\n return deriveMax(values);\n }, [values]);\n var content;\n if (type === 'bar') {\n content = /*#__PURE__*/React.createElement(Bar, _extends({\n ref: ref,\n max: memoizedMax,\n values: values,\n size: size,\n thickness: thickness,\n background: background,\n direction: direction,\n reverse: reverse\n }, rest));\n } else if (type === 'circle' || type === 'pie' || type === 'semicircle') {\n content = /*#__PURE__*/React.createElement(Circle, _extends({\n ref: ref,\n max: memoizedMax,\n values: values,\n size: size,\n thickness: thickness,\n type: type,\n background: background,\n reverse: reverse\n }, rest));\n }\n return content;\n});\nMeter.displayName = 'Meter';\nMeter.prototype = MeterPropTypes;\nexport { Meter };","import { createContext } from 'react';\nexport var PageContext = /*#__PURE__*/createContext({});","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n kind: PropTypes.string\n };\n}\nexport var PagePropTypes = PropType;","var _excluded = [\"kind\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { PageContext } from './PageContext';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { PagePropTypes } from './propTypes';\nvar Page = function Page(_ref) {\n var kind = _ref.kind,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n var contentValue = useMemo(function () {\n var _theme$page$kind, _theme$page$kind2;\n return _extends({\n alignSelf: (_theme$page$kind = theme.page[kind]) == null ? void 0 : _theme$page$kind.alignSelf,\n width: (_theme$page$kind2 = theme.page[kind]) == null ? void 0 : _theme$page$kind2.width\n }, theme.page[kind][size]);\n }, [theme, size, kind]);\n return /*#__PURE__*/React.createElement(PageContext.Provider, {\n value: contentValue\n }, /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\"\n }, rest)));\n};\nPage.displayName = 'Page';\nPage.propTypes = PagePropTypes;\nPage.defaultProps = {\n kind: 'wide'\n};\nexport { Page };","import PropTypes from 'prop-types';\nimport { colorPropType } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n background: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n color: colorPropType,\n dark: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n image: PropTypes.string,\n position: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.oneOf(['weak', 'medium', 'strong'])]),\n repeat: PropTypes.oneOfType([PropTypes.oneOf(['no-repeat', 'repeat']), PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['cover', 'contain']), PropTypes.string]),\n light: PropTypes.string,\n fill: PropTypes.oneOf(['horizontal'])\n })])\n };\n}\nexport var PageContentPropTypes = PropType;","var _excluded = [\"children\", \"background\"];\nfunction _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { Box } from '../Box';\nimport { PageContext } from '../Page';\nimport { PageContentPropTypes } from './propTypes';\nvar PageContent = function PageContent(_ref) {\n var children = _ref.children,\n background = _ref.background,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var _useContext = useContext(PageContext),\n pageContext = _extends({}, (_objectDestructuringEmpty(_useContext), _useContext));\n if (background != null && background.fill) {\n return /*#__PURE__*/React.createElement(Box, {\n background: background\n }, /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\"\n }, pageContext, rest), children));\n }\n return /*#__PURE__*/React.createElement(Box, _extends({\n fill: \"horizontal\",\n background: background\n }, pageContext, rest), children);\n};\nPageContent.displayName = 'PageContent';\nPageContent.propTypes = PageContentPropTypes;\nexport { PageContent };","var _excluded = [\"actions\", \"gridProps\", \"parent\", \"responsive\", \"size\", \"subtitle\", \"title\", \"level\"];\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Header } from '../Header';\nimport { Heading } from '../Heading';\nimport { Grid } from '../Grid';\nimport { Paragraph } from '../Paragraph';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nvar sizeStyle = function sizeStyle(size, feature, theme, breakpoint) {\n var _ref, _theme$pageHeader$siz, _theme$global$breakpo, _theme$global$breakpo2;\n var style = _extends({}, theme.pageHeader[feature], (_ref = size && ((_theme$pageHeader$siz = theme.pageHeader.size[size]) == null ? void 0 : _theme$pageHeader$siz[feature])) != null ? _ref : theme.pageHeader[feature], (!size || size === 'medium') && feature === 'subtitle' && ((_theme$global$breakpo = theme.global.breakpoints[breakpoint]) == null ? void 0 : _theme$global$breakpo.value) <= ((_theme$global$breakpo2 = theme.global.breakpoints.small) == null ? void 0 : _theme$global$breakpo2.value) && {\n size: 'medium'\n });\n return style;\n};\nvar PageHeader = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var actions = _ref2.actions,\n gridPropsProp = _ref2.gridProps,\n parent = _ref2.parent,\n responsive = _ref2.responsive,\n size = _ref2.size,\n subtitle = _ref2.subtitle,\n title = _ref2.title,\n level = _ref2.level,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n var theme = useContext(ThemeContext);\n var breakpoint = useContext(ResponsiveContext);\n var actionsProps = _extends({}, theme.pageHeader.actions);\n var gridProps = theme.pageHeader[breakpoint] || theme.pageHeader.medium;\n if (responsive && theme.pageHeader.responsive.breakpoints.includes(breakpoint)) {\n gridProps = _extends({}, gridProps, theme.pageHeader.responsive);\n actionsProps = _extends({}, actionsProps, theme.pageHeader.responsive.actions);\n }\n var _gridProps = gridProps,\n areas = _gridProps.areas,\n columns = _gridProps.columns,\n gap = _gridProps.gap,\n rows = _gridProps.rows;\n return /*#__PURE__*/React.createElement(Header, _extends({\n ref: ref,\n direction: \"column\",\n gap: \"none\",\n pad: sizeStyle(size, 'pad', theme)\n }, rest), /*#__PURE__*/React.createElement(Grid, _extends({\n columns: columns,\n rows: rows,\n areas: areas,\n gap: gap,\n fill: \"horizontal\"\n }, gridPropsProp), /*#__PURE__*/React.createElement(Box, _extends({\n gridArea: \"parent\"\n }, theme.pageHeader.parent), parent), /*#__PURE__*/React.createElement(Box, {\n gridArea: \"title\"\n }, typeof title === 'string' ? /*#__PURE__*/React.createElement(Heading, _extends({}, sizeStyle(size, 'title', theme), {\n level: level\n }), title) : title), /*#__PURE__*/React.createElement(Box, {\n gridArea: \"subtitle\"\n }, typeof subtitle === 'string' ? /*#__PURE__*/React.createElement(Paragraph, sizeStyle(size, 'subtitle', theme, breakpoint), subtitle) : subtitle), /*#__PURE__*/React.createElement(Box, _extends({\n gridArea: \"actions\"\n }, actionsProps), actions)));\n});\nPageHeader.displayName = 'PageHeader';\nexport { PageHeader };","import React from 'react';\nexport var NameValueListContext = /*#__PURE__*/React.createContext({});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { Fragment, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { NameValueListContext } from '../NameValueList/NameValueListContext';\nimport { isSmall } from '../../utils/responsive';\nvar NameValuePair = function NameValuePair(_ref) {\n var _theme$nameValuePair;\n var children = _ref.children,\n nameProp = _ref.name;\n var _useContext = useContext(NameValueListContext),\n nameProps = _useContext.nameProps,\n pairProps = _useContext.pairProps,\n valueProps = _useContext.valueProps;\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n var direction = pairProps == null ? void 0 : pairProps.direction;\n var column = direction === 'column' || direction === 'column-reverse' || isSmall(size);\n var Container = column ? Box : Fragment;\n var nameAlign = !isSmall(size) ? nameProps == null ? void 0 : nameProps.align : undefined;\n var valueAlign = !isSmall(size) ? valueProps == null ? void 0 : valueProps.align : undefined;\n // using margin to act as gap\n // elements must only directly contain\n // properly-ordered - and
- groups\n var valueGap;\n if (column && (_theme$nameValuePair = theme.nameValuePair) != null && (_theme$nameValuePair = _theme$nameValuePair.column) != null && _theme$nameValuePair.gap) valueGap = {\n bottom: theme.nameValuePair.column.gap\n };\n var name;\n if (typeof nameProp === 'string' || typeof nameProp === 'number') name = /*#__PURE__*/React.createElement(Text, _extends({\n as: \"dt\",\n margin: valueGap,\n textAlign: nameAlign\n }, theme.nameValuePair.name), nameProp);else name = /*#__PURE__*/React.createElement(Box, {\n as: \"dt\",\n align: nameAlign\n }, nameProp);\n var value;\n if (typeof children === 'string' || typeof children === 'number') value =\n /*#__PURE__*/\n // override browser default margin for dd\n React.createElement(Text, _extends({\n as: \"dd\",\n margin: \"none\",\n textAlign: valueAlign\n }, theme.nameValuePair.value), children);else value =\n /*#__PURE__*/\n // override browser default margin for dd\n React.createElement(Box, {\n margin: \"none\",\n as: \"dd\",\n align: valueAlign\n }, children);\n var first = direction !== 'column-reverse' ? name : value;\n var second = direction !== 'column-reverse' ? value : name;\n return /*#__PURE__*/React.createElement(Container, null, first, second);\n};\nexport { NameValuePair };","var _excluded = [\"align\", \"layout\", \"nameProps\", \"pairProps\", \"valueProps\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useMemo } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Grid } from '../Grid';\nimport { ResponsiveContext } from '../../contexts/ResponsiveContext';\nimport { NameValueListContext } from './NameValueListContext';\nimport { isSmall } from '../../utils/responsive';\nvar NameValueList = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$nameValueList$;\n var align = _ref.align,\n _ref$layout = _ref.layout,\n layout = _ref$layout === void 0 ? 'column' : _ref$layout,\n nameProps = _ref.nameProps,\n _ref$pairProps = _ref.pairProps,\n pairProps = _ref$pairProps === void 0 ? {\n direction: 'row'\n } : _ref$pairProps,\n valueProps = _ref.valueProps,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var size = useContext(ResponsiveContext);\n var theme = useContext(ThemeContext);\n\n // If layout is grid, valueWidth sets the max width of the column.\n // Grid will 'fit' as many columns of valueWidth per row as container's\n // width allows.\n var columns;\n var valueWidth = (valueProps == null ? void 0 : valueProps.width) || theme.nameValueList.value.width;\n var nameWidth = (nameProps == null ? void 0 : nameProps.width) || theme.nameValueList.name.width;\n if (isSmall(size) || layout === 'grid') columns = {\n count: 'fit',\n size: !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth\n };else if (layout === 'column' && pairProps.direction === 'row') columns = [nameWidth, !Array.isArray(valueWidth) ? ['auto', valueWidth] : valueWidth];else columns = [valueWidth];\n var gap = theme.nameValueList.gap;\n if ((pairProps.direction === 'column' || isSmall(size)) && (_theme$nameValueList$ = theme.nameValueList.pair) != null && (_theme$nameValueList$ = _theme$nameValueList$.column) != null && _theme$nameValueList$.gap) {\n gap = theme.nameValueList.pair.column.gap;\n }\n var listContextValue = useMemo(function () {\n return {\n nameProps: nameProps,\n pairProps: pairProps,\n valueProps: valueProps\n };\n }, [nameProps, pairProps, valueProps]);\n return /*#__PURE__*/React.createElement(NameValueListContext.Provider, {\n value: listContextValue\n }, /*#__PURE__*/React.createElement(Grid, _extends({\n as: \"dl\",\n ref: ref,\n align: align,\n columns: columns,\n gap: gap,\n margin: \"none\" // override browser default margin for dl\n }, rest)));\n});\nNameValueList.displayName = 'NameValueList';\nexport { NameValueList };","import PropTypes from 'prop-types';\nimport { AnchorPropTypes } from '../Anchor/propTypes';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n actions: PropTypes.arrayOf(PropTypes.shape(AnchorPropTypes)),\n global: PropTypes.bool,\n title: PropTypes.string,\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n status: PropTypes.oneOf(['critical', 'warning', 'normal', 'info', 'unknown']),\n toast: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n autoClose: PropTypes.bool,\n position: PropTypes.oneOf(['bottom', 'bottom-left', 'bottom-right', 'center', 'end', 'hidden', 'left', 'right', 'start', 'top', 'top-left', 'top-right'])\n })]),\n onClose: PropTypes.func,\n icon: PropTypes.element,\n time: PropTypes.number\n };\n}\nexport var NotificationType = PropType;","var _excluded = [\"actions\", \"message\", \"onClose\", \"id\", \"global\", \"status\", \"title\", \"toast\", \"icon\", \"time\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useCallback, useContext, useEffect, useState, useMemo, Fragment } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Anchor } from '../Anchor';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Layer } from '../Layer';\nimport { Paragraph } from '../Paragraph';\nimport { Text } from '../Text';\nimport { NotificationType } from './propTypes';\nvar adaptThemeStyle = function adaptThemeStyle(value, theme) {\n var textStyle = value;\n var closeButtonStyle = value;\n if (typeof value === 'string' && theme.global.edgeSize[value]) {\n textStyle = {\n vertical: value,\n left: value,\n right: undefined\n };\n closeButtonStyle = {\n vertical: value,\n right: value\n };\n } else if (typeof value === 'object') {\n var left = value.left,\n right = value.right,\n top = value.top,\n bottom = value.bottom,\n horizontal = value.horizontal,\n vertical = value.vertical;\n textStyle = {\n top: top || vertical,\n bottom: bottom || vertical,\n left: left || horizontal,\n right: undefined\n };\n closeButtonStyle = {\n top: top || vertical,\n bottom: bottom || vertical,\n right: right || horizontal\n };\n }\n return [textStyle, closeButtonStyle];\n};\nvar NotificationAnchor = styled(Anchor).withConfig({\n displayName: \"Notification__NotificationAnchor\",\n componentId: \"sc-1yq09yz-0\"\n})([\"white-space:nowrap;\"]);\nvar Notification = function Notification(_ref) {\n var _theme$notification, _theme$notification2, _theme$notification3, _theme$notification4, _theme$notification5;\n var actionsProp = _ref.actions,\n messageProp = _ref.message,\n onClose = _ref.onClose,\n id = _ref.id,\n global = _ref.global,\n status = _ref.status,\n title = _ref.title,\n toast = _ref.toast,\n icon = _ref.icon,\n time = _ref.time,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var autoClose = toast && (toast == null ? void 0 : toast.autoClose) === undefined ? true : toast.autoClose;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(true),\n visible = _useState[0],\n setVisible = _useState[1];\n var position = useMemo(function () {\n return toast && (toast == null ? void 0 : toast.position) || 'top';\n }, [toast]);\n var close = useCallback(function (event) {\n setVisible(false);\n if (onClose) onClose(event);\n }, [onClose]);\n useEffect(function () {\n if (autoClose) {\n var timer = setTimeout(close, time || theme.notification.toast.time || theme.notification.time);\n return function () {\n return clearTimeout(timer);\n };\n }\n return undefined;\n }, [autoClose, close, theme.notification.toast.time, theme.notification.time, time]);\n var CloseIcon = theme.notification.close.icon;\n var _ref2 = ((_theme$notification = theme.notification) == null ? void 0 : _theme$notification[status]) || theme.notification.unknown,\n StatusIcon = _ref2.icon,\n color = _ref2.color;\n var closeIconColor = theme.notification.close.color;\n var kind = useMemo(function () {\n if (toast) return 'toast';\n if (global) return 'global';\n return undefined;\n }, [global, toast]);\n var direction;\n if (kind && theme.notification[kind].direction) direction = theme.notification[kind].direction;else direction = theme.notification.direction;\n var background;\n if (kind && (_theme$notification2 = theme.notification) != null && (_theme$notification2 = _theme$notification2[status]) != null && (_theme$notification2 = _theme$notification2[kind]) != null && _theme$notification2.background) background = theme.notification[status][kind].background;else if ((_theme$notification3 = theme.notification) != null && (_theme$notification3 = _theme$notification3[status]) != null && _theme$notification3.background) background = theme.notification[status].background;else background = ((_theme$notification4 = theme.notification) == null || (_theme$notification4 = _theme$notification4[kind]) == null || (_theme$notification4 = _theme$notification4.container) == null ? void 0 : _theme$notification4.background) || theme.notification.container.background;\n var TextWrapper = direction === 'row' ? Text : Fragment;\n\n // notification is built with two child boxes that contain:\n // 1. icon + text (wrapped in button when clickable)\n // 2. close button\n // pad needs to be applied to the child boxes, but we don't want to apply\n // extra padding between the icon + text and the button.\n var pad;\n if (kind && theme.notification[kind].container.pad) pad = theme.notification[kind].container.pad;else pad = theme.notification.container.pad;\n var textPad;\n var closeButtonPad;\n if (onClose) {\n var _adaptThemeStyle = adaptThemeStyle(pad, theme);\n textPad = _adaptThemeStyle[0];\n closeButtonPad = _adaptThemeStyle[1];\n } else textPad = pad;\n var actions;\n var message = messageProp;\n if (actionsProp) actions = actionsProp.map(function (action) {\n return /*#__PURE__*/React.createElement(Fragment, {\n key: action.label\n }, /*#__PURE__*/React.createElement(NotificationAnchor\n // create space between first anchor and\n // text content and next anchor\n , _extends({\n margin: {\n right: 'xsmall'\n }\n }, action, theme.notification.actions)), ' ');\n });\n var Message = direction !== 'row' ? Paragraph : Text;\n if (message || actions) message = typeof message === 'string' ? /*#__PURE__*/React.createElement(Message, theme.notification.message, /*#__PURE__*/React.createElement(Text, {\n margin: {\n right: 'xsmall'\n }\n }, message), actions) : message;\n var iconDimension = ((_theme$notification5 = theme.notification) == null || (_theme$notification5 = _theme$notification5.message) == null ? void 0 : _theme$notification5.size) || 'medium';\n var content = /*#__PURE__*/React.createElement(Box, _extends({}, theme.notification.container, global ? _extends({}, theme.notification.global.container) : {}, toast ? _extends({}, theme.notification.toast.container) : {}, {\n background: background\n // let internal box control pad\n ,\n pad: undefined,\n direction: \"row\",\n gap: \"small\",\n id: toast ? undefined : id\n }, rest), /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n pad: textPad,\n flex: true\n }, /*#__PURE__*/React.createElement(Box, theme.notification.iconContainer, icon || /*#__PURE__*/React.createElement(StatusIcon, {\n color: color,\n height: iconDimension\n })), /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(TextWrapper, null, title && /*#__PURE__*/React.createElement(Text, theme.notification.title, title), message && title && direction === 'row' && /*#__PURE__*/React.createElement(React.Fragment, null, \"\\xA0\"), message))), onClose &&\n /*#__PURE__*/\n // theme.notification.container and textContainer may both have pad,\n // account for both\n React.createElement(Box, {\n pad: closeButtonPad\n }, /*#__PURE__*/React.createElement(Box, theme.notification.textContainer, /*#__PURE__*/React.createElement(Button, {\n icon: /*#__PURE__*/React.createElement(CloseIcon, {\n color: closeIconColor,\n height: iconDimension,\n width: iconDimension\n }),\n onClick: close,\n hoverIndicator: true,\n plain: true\n }))));\n if (toast) {\n content = visible && /*#__PURE__*/React.createElement(Layer, _extends({}, theme.notification.toast.layer, {\n role: \"log\",\n modal: false,\n onEsc: onClose,\n id: id,\n responsive: false,\n plain: true,\n position: position\n }), content);\n }\n return content;\n};\nNotification.defaultProps = {\n status: 'unknown',\n toast: false\n};\nObject.setPrototypeOf(Notification.defaultProps, defaultProps);\nNotification.displayName = 'Notification';\nNotification.propTypes = NotificationType;\nexport { Notification };","var _excluded = [\"path\", \"method\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Anchor } from '../Anchor';\nvar RoutedAnchor = /*#__PURE__*/function (_Component) {\n _inheritsLoose(RoutedAnchor, _Component);\n function RoutedAnchor() {\n return _Component.apply(this, arguments) || this;\n }\n var _proto = RoutedAnchor.prototype;\n _proto.render = function render() {\n var _this = this;\n var _this$props = this.props,\n path = _this$props.path,\n method = _this$props.method,\n rest = _objectWithoutPropertiesLoose(_this$props, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"This component will be deprecated in the upcoming releases. \\n Please refer to https://github.com/grommet/grommet/issues/2855 \\n for more information.\");\n }\n return /*#__PURE__*/React.createElement(Anchor, _extends({}, rest, {\n href: path,\n onClick: function onClick(event) {\n var onClick = _this.props.onClick;\n var router = _this.context.router;\n if (event) {\n var modifierKey = event.ctrlKey || event.metaKey;\n\n // if the user right-clicked in the Anchor we should let it go\n if (modifierKey) {\n return;\n }\n }\n if (router) {\n event.preventDefault();\n (router.history || router)[method](path);\n }\n if (onClick) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n onClick.apply(void 0, [event].concat(args));\n }\n }\n }));\n };\n return RoutedAnchor;\n}(Component);\nRoutedAnchor.contextTypes = {\n router: PropTypes.shape({}).isRequired\n};\nRoutedAnchor.defaultProps = {\n method: 'push'\n};\nexport { RoutedAnchor };","var _excluded = [\"href\", \"path\", \"method\", \"onClick\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nimport React, { Component } from 'react';\nimport PropTypes from 'prop-types';\nimport { Button } from '../Button';\nvar RoutedButton = /*#__PURE__*/function (_Component) {\n _inheritsLoose(RoutedButton, _Component);\n function RoutedButton() {\n var _this;\n for (var _len = arguments.length, _args = new Array(_len), _key = 0; _key < _len; _key++) {\n _args[_key] = arguments[_key];\n }\n _this = _Component.call.apply(_Component, [this].concat(_args)) || this;\n _this.onClick = function (event) {\n var _this$props = _this.props,\n method = _this$props.method,\n onClick = _this$props.onClick,\n path = _this$props.path;\n var router = _this.context.router;\n if (event) {\n var modifierKey = event.ctrlKey || event.metaKey;\n\n // if the user right-clicked in the button we should let it go\n if (modifierKey) {\n return;\n }\n }\n if (router) {\n event.preventDefault();\n (router.history || router)[method](path);\n }\n if (onClick) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n onClick.apply(void 0, [event].concat(args));\n }\n };\n return _this;\n }\n var _proto = RoutedButton.prototype;\n _proto.render = function render() {\n var _this$props2 = this.props,\n href = _this$props2.href,\n path = _this$props2.path,\n method = _this$props2.method,\n onClick = _this$props2.onClick,\n rest = _objectWithoutPropertiesLoose(_this$props2, _excluded);\n if (process.env.NODE_ENV !== 'production') {\n console.warn(\"This component will be deprecated in the upcoming releases.\\n Please refer to https://github.com/grommet/grommet/issues/2855\\n for more information.\");\n }\n return /*#__PURE__*/React.createElement(Button, _extends({}, rest, {\n href: path || href,\n disabled: !path && !onClick,\n onClick: this.onClick\n }));\n };\n return RoutedButton;\n}(Component);\nRoutedButton.contextTypes = {\n router: PropTypes.shape({}).isRequired\n};\nRoutedButton.defaultProps = {\n method: 'push'\n};\nexport { RoutedButton };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.node,\n footer: PropTypes.node,\n header: PropTypes.node\n };\n}\nexport var SidebarPropTypes = PropType;","var _excluded = [\"children\", \"footer\", \"header\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport { Box } from '../Box';\nimport { SidebarPropTypes } from './propTypes';\nexport var Sidebar = function Sidebar(_ref) {\n var children = _ref.children,\n footer = _ref.footer,\n header = _ref.header,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Box, _extends({\n pad: \"small\",\n gap: \"large\",\n height: {\n min: '100%'\n }\n }, rest), header, /*#__PURE__*/React.createElement(Box, {\n flex: true\n }, children), footer);\n};\nSidebar.propTypes = SidebarPropTypes;\nSidebar.defaultProps = {\n children: undefined,\n footer: undefined,\n header: undefined\n};","var _excluded = [\"id\", \"label\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { Anchor } from '../Anchor';\nexport var SkipLink = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var id = _ref.id,\n label = _ref.label,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Anchor, _extends({\n href: \"#\" + id,\n ref: ref,\n label: label\n }, rest));\n});","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.node.isRequired,\n messages: PropTypes.shape({\n skipTo: PropTypes.string\n })\n };\n}\nexport var SkipLinksPropTypes = PropType;","import React, { Children, cloneElement, useContext, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { Layer } from '../Layer';\nimport { defaultProps } from '../../default-props';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { SkipLinksPropTypes } from './propTypes';\nvar SkipLinks = function SkipLinks(_ref) {\n var children = _ref.children,\n id = _ref.id,\n messages = _ref.messages;\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useState = useState(false),\n showLayer = _useState[0],\n setShowLayer = _useState[1];\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var layerRef = useRef(null);\n var onFocus = function onFocus() {\n setShowLayer(true);\n };\n var removeLayer = function removeLayer() {\n setShowLayer(false);\n };\n var onBlur = function onBlur() {\n // timeout needed so it gives enough time for activeElement to be updated\n setTimeout(function () {\n var layerNode = layerRef.current;\n if (layerNode && !layerNode.contains(document.activeElement)) {\n // close the layer when the activeElement isn't contained in the layer\n removeLayer();\n }\n }, 0);\n };\n return /*#__PURE__*/React.createElement(Layer, {\n id: id,\n position: showLayer ? theme.skipLinks.position : 'hidden',\n ref: layerRef,\n onFocus: onFocus,\n onBlur: onBlur,\n modal: false\n // Prepend the Layer so any SkipLink will be the first element that\n // pressing the Tab key reaches, targetChildPosition triggers prepend.\n ,\n targetChildPosition: \"first\"\n // Non-modal Layer's will take the full screen at small breakpoints\n // by default, which isn't what we want, hence setting responsive false\n ,\n responsive: false\n }, /*#__PURE__*/React.createElement(Box, theme.skipLinks.container, /*#__PURE__*/React.createElement(Text, theme.skipLinks.label, format({\n id: 'skipLinks.skipTo',\n messages: messages\n })), /*#__PURE__*/React.createElement(Box, {\n align: \"center\",\n gap: \"medium\"\n }, Children.map(children, function (child, index) {\n return child && /*#__PURE__*/cloneElement(child, {\n // eslint-disable-next-line react/no-array-index-key\n key: \"skip-link-\" + index,\n onClick: removeLayer\n });\n }))));\n};\nSkipLinks.defaultProps = {};\nSkipLinks.propTypes = SkipLinksPropTypes;\nexport { SkipLinks };","var _excluded = [\"label\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React from 'react';\nimport styled from 'styled-components';\nimport { Anchor } from '../Anchor';\nvar HiddenAnchor = styled(Anchor).withConfig({\n displayName: \"SkipLinkTarget__HiddenAnchor\",\n componentId: \"sc-16wjfgk-0\"\n})([\"width:0;height:0;overflow:hidden;position:absolute;\"]);\nexport var SkipLinkTarget = function SkipLinkTarget(_ref) {\n var label = _ref.label,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(HiddenAnchor, _extends({}, rest, {\n tabIndex: \"-1\",\n \"aria-hidden\": \"true\"\n }), label);\n};","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]),\n color: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n })]),\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string\n })])\n };\n}\nexport var SpinnerPropTypes = PropType;","var _excluded = [\"ref\", \"size\"],\n _excluded2 = [\"children\", \"color\", \"size\", \"message\"],\n _excluded3 = [\"size\", \"color\", \"border\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { isValidElement, forwardRef, useContext, useEffect } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nimport { SpinnerPropTypes } from './propTypes';\nvar BasicSpinner = function BasicSpinner(_ref) {\n var ref = _ref.ref,\n size = _ref.size,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n height: size,\n width: size,\n ref: ref\n }, rest));\n};\n/**\n * If the user is calling … with children, it will take\n * precedence over theme styling. Yet, it will still inherit the\n * default animation and size of the spinner, and of course any additional\n * given props.\n *\n * If the user is providing an icon/svg via the theme.spinner.icon,\n * the Spinner will use it as a child and will include all its relevant\n * theme props (size/color/pad…) as well,\n * user will only need to type .\n * If the icon has its own animation, user can turn it off via the theme.\n *\n * If none of the above is provider, will provide its default\n * border, size and friends, all configurable via theme or props.\n */\nvar Spinner = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var children = _ref2.children,\n colorProp = _ref2.color,\n size = _ref2.size,\n message = _ref2.message,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var announce = useContext(AnnounceContext);\n useEffect(function () {\n if (message != null && message.start) announce(message.start);else if (typeof message === 'string') announce(message);\n return function () {\n return (message == null ? void 0 : message.end) && announce(message.end);\n };\n }, [announce, message]);\n\n // Avoid color and size leaking into the DOM\n var _theme$spinner$contai = theme.spinner.container,\n sizeThemeProp = _theme$spinner$contai.size,\n colorThemeProp = _theme$spinner$contai.color,\n borderThemeProp = _theme$spinner$contai.border,\n themeProps = _objectWithoutPropertiesLoose(_theme$spinner$contai, _excluded3);\n var normalizedSize = size || sizeThemeProp;\n var spinnerSize = theme.spinner.size[normalizedSize] || normalizedSize;\n var color = colorProp || colorThemeProp;\n var Icon = theme.spinner.icon;\n var defaultBorder = [{\n side: 'all',\n color: 'background-contrast',\n size: size\n }, {\n side: 'top',\n color: color,\n size: size\n }];\n var spinnerBorder = Array.isArray(borderThemeProp) ? borderThemeProp.map(function (borderSide) {\n return _extends({}, borderSide, {\n color: borderSide.side === 'all' ? borderSide.color || 'background-contrast' : color\n });\n }) : borderThemeProp;\n\n // children will take precedence over theme attributes\n if (children) {\n return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref\n }, rest), children);\n }\n\n // In case icon is provided by the theme\n if (Icon) return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref\n }, themeProps, rest), /*#__PURE__*/isValidElement(Icon) ? Icon : /*#__PURE__*/React.createElement(Icon, {\n size: spinnerSize,\n color: color\n }));\n return /*#__PURE__*/React.createElement(BasicSpinner, _extends({\n size: spinnerSize,\n ref: ref,\n border: typeof borderThemeProp === 'undefined' ? defaultBorder : spinnerBorder\n }, themeProps, rest));\n});\nSpinner.displayName = 'Spinner';\nSpinner.propTypes = SpinnerPropTypes;\nexport { Spinner };","var _excluded = [\"name\", \"defaultValue\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Star } from 'grommet-icons/icons/Star';\nimport { StarOutline } from 'grommet-icons/icons/StarOutline';\nimport { FormContext } from '../Form/FormContext';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nvar StarRating = function StarRating(_ref) {\n var name = _ref.name,\n defaultValue = _ref.defaultValue,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var theme = useContext(ThemeContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp,\n initialValue: defaultValue != null ? defaultValue : 0\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var options = [];\n for (var i = 1; i < 6; i += 1) {\n options.push(i);\n }\n return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({\n name: name,\n direction: \"row\",\n options: options,\n onChange: function onChange(event) {\n setValue(event.value);\n }\n }, rest), function (option) {\n var _theme$starRating, _theme$starRating2;\n return option <= value ? /*#__PURE__*/React.createElement(Star, {\n color: (_theme$starRating = theme.starRating) == null ? void 0 : _theme$starRating.color\n }) : /*#__PURE__*/React.createElement(StarOutline, {\n color: (_theme$starRating2 = theme.starRating) == null ? void 0 : _theme$starRating2.color\n });\n });\n};\nStarRating.displayName = 'StarRating';\nexport { StarRating };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n name: PropTypes.string,\n value: PropTypes.string.isRequired,\n onClick: PropTypes.func,\n onRemove: PropTypes.func,\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string])\n };\n}\nexport var TagPropTypes = PropType;","import styled from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { borderStyle, roundStyle } from '../../utils';\nimport { Button } from '../Button';\nexport var StyledTagButton = styled(Button).withConfig({\n displayName: \"StyledTag__StyledTagButton\",\n componentId: \"sc-cb9fl2-0\"\n})([\"\", \" \", \"\"], function (props) {\n return props.border && borderStyle(props.border, true, props.theme);\n}, function (props) {\n return props.round && roundStyle(props.round, true, props.theme);\n});\nStyledTagButton.defaultProps = {};\nObject.setPrototypeOf(StyledTagButton.defaultProps, defaultProps);\nexport var StyledRemoveButton = styled(Button).withConfig({\n displayName: \"StyledTag__StyledRemoveButton\",\n componentId: \"sc-cb9fl2-1\"\n})([\"\", \"\"], function (props) {\n return props.round && roundStyle(props.round, true, props.theme);\n});\nStyledRemoveButton.defaultProps = {};\nObject.setPrototypeOf(StyledRemoveButton.defaultProps, defaultProps);","var _excluded = [\"name\", \"value\", \"size\", \"onRemove\", \"onClick\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormClose } from 'grommet-icons/icons/FormClose';\nimport { defaultProps } from '../../default-props';\nimport { TagPropTypes } from './propTypes';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\nimport { StyledRemoveButton, StyledTagButton } from './StyledTag';\nvar Tag = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _theme$tag$icons, _theme$tag$size, _theme$tag$size2, _theme$tag$size3, _theme$tag$size4;\n var name = _ref.name,\n value = _ref.value,\n size = _ref.size,\n onRemove = _ref.onRemove,\n onClick = _ref.onClick,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var RemoveIcon = ((_theme$tag$icons = theme.tag.icons) == null ? void 0 : _theme$tag$icons.remove) || FormClose;\n var containerProps = _extends({\n ref: ref,\n align: 'center',\n background: theme.tag.background,\n border: theme.tag.border,\n round: ((_theme$tag$size = theme.tag.size) == null || (_theme$tag$size = _theme$tag$size[size]) == null ? void 0 : _theme$tag$size.round) || theme.tag.round\n }, rest);\n var contents = /*#__PURE__*/React.createElement(Box, {\n width: {\n min: 'min-content'\n },\n pad: ((_theme$tag$size2 = theme.tag.size) == null || (_theme$tag$size2 = _theme$tag$size2[size]) == null ? void 0 : _theme$tag$size2.pad) || theme.tag.pad\n }, /*#__PURE__*/React.createElement(Text, {\n size: size\n }, name && /*#__PURE__*/React.createElement(Text, _extends({}, theme.tag.name, {\n size: size\n }), ' ', name), name && value ? /*#__PURE__*/React.createElement(Text, {\n size: size\n }, theme.tag.separator) : '', value && /*#__PURE__*/React.createElement(Text, _extends({}, theme.tag.value, {\n size: size\n }), value)));\n if (onClick && onRemove) {\n console.warn('Tag cannot combine \"onClick\" and \"onRemove\".');\n }\n return onRemove || !onClick ? /*#__PURE__*/React.createElement(Box, _extends({\n flex: false,\n direction: \"row\",\n width: {\n min: 'min-content'\n }\n }, containerProps), contents, onRemove && /*#__PURE__*/React.createElement(StyledRemoveButton, _extends({\n onClick: onRemove,\n plain: true,\n hoverIndicator: true,\n focusIndicator: true,\n icon: /*#__PURE__*/React.createElement(RemoveIcon, (_theme$tag$size3 = theme.tag.size) == null || (_theme$tag$size3 = _theme$tag$size3[size]) == null ? void 0 : _theme$tag$size3.icon),\n round: ((_theme$tag$size4 = theme.tag.size) == null || (_theme$tag$size4 = _theme$tag$size4[size]) == null ? void 0 : _theme$tag$size4.round) || theme.tag.round\n }, theme.tag.remove))) : /*#__PURE__*/React.createElement(StyledTagButton, _extends({\n flex: false,\n plain: true,\n onClick: onClick,\n hoverIndicator: true,\n focusIndicator: true\n }, containerProps), contents);\n});\nTag.displayName = 'Tag';\nTag.prototype = TagPropTypes;\nexport { Tag };","import styled, { css } from 'styled-components';\nimport { disabledStyle, inputStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar plainStyle = css([\"outline:none;border:none;width:100%;-webkit-appearance:none;\"]);\nvar resizeStyle = function resizeStyle(resize) {\n if (resize === 'horizontal') {\n return 'resize: horizontal;';\n }\n if (resize === 'vertical') {\n return 'resize: vertical;';\n }\n if (resize) {\n return 'resize: both;';\n }\n return 'resize: none;';\n};\nvar StyledTextArea = styled.textarea.withConfig({\n displayName: \"StyledTextArea\",\n componentId: \"sc-17i3mwp-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \";max-width:100%;\"], inputStyle, function (props) {\n return props.resize !== undefined && resizeStyle(props.resize);\n}, function (props) {\n return props.fillArg && 'height: 100%;';\n}, function (props) {\n return props.plain && plainStyle;\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.textArea.disabled && props.theme.textArea.disabled.opacity);\n}, function (props) {\n return props.theme.textArea && props.theme.textArea.extend;\n});\nStyledTextArea.defaultProps = {};\nObject.setPrototypeOf(StyledTextArea.defaultProps, defaultProps);\nexport { StyledTextArea };","import PropTypes from 'prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n a11yTitle: PropTypes.string,\n id: PropTypes.string,\n fill: PropTypes.bool,\n focusIndicator: PropTypes.bool,\n name: PropTypes.string,\n onChange: PropTypes.func,\n placeholder: PropTypes.string,\n plain: PropTypes.bool,\n value: PropTypes.string,\n resize: PropTypes.oneOfType([PropTypes.oneOf(['vertical', 'horizontal']), PropTypes.bool]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge', '2xl', '3xl', '4xl', '5xl', '6xl']), PropTypes.string])\n };\n}\nexport var TextAreaPropTypes = PropType;","var _excluded = [\"a11yTitle\", \"fill\", \"focusIndicator\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onKeyDown\", \"value\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useContext, useState } from 'react';\nimport { FormContext } from '../Form/FormContext';\nimport { Keyboard } from '../Keyboard';\nimport { StyledTextArea } from './StyledTextArea';\nimport { TextAreaPropTypes } from './propTypes';\nvar TextArea = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n fill = _ref.fill,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var formContext = useContext(FormContext);\n var _formContext$useFormI = formContext.useFormInput({\n name: name,\n value: valueProp\n }),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n return /*#__PURE__*/React.createElement(Keyboard, {\n onEsc: function onEsc(event) {\n // we have to stop both synthetic events and native events\n // drop and layer should not close by pressing esc on this input\n event.stopPropagation();\n event.nativeEvent.stopImmediatePropagation();\n },\n onKeyDown: onKeyDown\n }, /*#__PURE__*/React.createElement(StyledTextArea, _extends({\n \"aria-label\": a11yTitle,\n ref: ref,\n name: name,\n fillArg: fill,\n focus: focus,\n value: value,\n focusIndicator: focusIndicator\n }, rest, {\n onFocus: function onFocus(event) {\n setFocus(true);\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n },\n onChange: function onChange(event) {\n setValue(event.target.value);\n if (_onChange) _onChange(event);\n }\n })));\n});\nTextArea.displayName = 'TextArea';\nTextArea.propTypes = TextAreaPropTypes;\nexport { TextArea };","function _objectDestructuringEmpty(obj) { if (obj == null) throw new TypeError(\"Cannot destructure \" + obj); }\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport React, { useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Like } from 'grommet-icons/icons/Like';\nimport { LikeFill } from 'grommet-icons/icons/LikeFill';\nimport { Dislike } from 'grommet-icons/icons/Dislike';\nimport { DislikeFill } from 'grommet-icons/icons/DislikeFill';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nvar ThumbsRating = function ThumbsRating(_ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n var theme = useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(RadioButtonGroup, _extends({\n direction: \"row\",\n options: ['like', 'dislike']\n }, rest), function (option, _ref2) {\n var _theme$thumbsRating3, _theme$thumbsRating4;\n var checked = _ref2.checked;\n if (option === 'like') {\n var _theme$thumbsRating, _theme$thumbsRating2;\n return checked ? /*#__PURE__*/React.createElement(LikeFill, {\n color: (_theme$thumbsRating = theme.thumbsRating) == null || (_theme$thumbsRating = _theme$thumbsRating.like) == null ? void 0 : _theme$thumbsRating.color\n }) : /*#__PURE__*/React.createElement(Like, {\n color: (_theme$thumbsRating2 = theme.thumbsRating) == null || (_theme$thumbsRating2 = _theme$thumbsRating2.like) == null ? void 0 : _theme$thumbsRating2.color\n });\n }\n return checked ? /*#__PURE__*/React.createElement(DislikeFill, {\n color: (_theme$thumbsRating3 = theme.thumbsRating) == null || (_theme$thumbsRating3 = _theme$thumbsRating3.dislike) == null ? void 0 : _theme$thumbsRating3.color\n }) : /*#__PURE__*/React.createElement(Dislike, {\n color: (_theme$thumbsRating4 = theme.thumbsRating) == null || (_theme$thumbsRating4 = _theme$thumbsRating4.dislike) == null ? void 0 : _theme$thumbsRating4.color\n });\n });\n};\nThumbsRating.displayName = 'ThumbsRating';\nexport { ThumbsRating };","import styled, { css } from 'styled-components';\nimport { focusStyle, genericStyles, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar FIT_MAP = {\n cover: 'cover',\n contain: 'contain'\n};\nvar fitStyle = css([\"flex:1 1;min-height:0;object-fit:\", \";\"], function (props) {\n return FIT_MAP[props.fit];\n});\n\n// z-index is for Safari so controls aren't hidden\nvar StyledVideo = styled.video.withConfig({\n displayName: \"StyledVideo\",\n componentId: \"sc-w4v8h9-0\"\n})([\"max-width:100%;z-index:1;\", \"::cue{background:\", \";}\", \";\"], function (props) {\n return props.fit && fitStyle;\n}, function (props) {\n return props.theme.video.captions.background;\n}, function (props) {\n return props.theme.video && props.theme.video.extend;\n});\nStyledVideo.defaultProps = {};\nObject.setPrototypeOf(StyledVideo.defaultProps, defaultProps);\nvar StyledVideoContainer = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoContainer\",\n componentId: \"sc-w4v8h9-1\"\n})([\"flex:1 1;display:flex;flex-direction:column;overflow:hidden;position:relative;\", \";&:focus{\", \"}\"], genericStyles, focusStyle());\nStyledVideoContainer.defaultProps = {};\nObject.setPrototypeOf(StyledVideoContainer.defaultProps, defaultProps);\n\n// z-index is for Safari so controls aren't hidden\nvar positionStyle = css([\"position:absolute;left:0;right:0;bottom:0;z-index:1;\"]);\nvar StyledVideoControls = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoControls\",\n componentId: \"sc-w4v8h9-2\"\n})([\"flex:0 0;\", \" opacity:0;transition:opacity 0.3s;\", \";\"], function (props) {\n return props.over && positionStyle;\n}, function (props) {\n return props.active ? 'opacity: 1;' : 'pointer-events: none';\n});\nStyledVideoControls.defaultProps = {};\nObject.setPrototypeOf(StyledVideoControls.defaultProps, defaultProps);\nvar headStyle = css([\"::after{content:'';height:100%;width:\", \";background:\", \";position:absolute;left:\", \";}\"], function (props) {\n return props.theme.global.edgeSize.xsmall;\n}, function (props) {\n return normalizeColor(props.theme.video.scrubber.color, props.theme);\n}, function (props) {\n return props.value + \"%\";\n});\nvar StyledVideoScrubber = styled.div.withConfig({\n displayName: \"StyledVideo__StyledVideoScrubber\",\n componentId: \"sc-w4v8h9-3\"\n})([\"cursor:pointer;width:100%;height:100%;\", \";&:focus{\", \"}\"], function (props) {\n return props.value && headStyle;\n}, focusStyle());\nStyledVideoScrubber.defaultProps = {};\nObject.setPrototypeOf(StyledVideoScrubber.defaultProps, defaultProps);\nexport { StyledVideo, StyledVideoContainer, StyledVideoControls, StyledVideoScrubber };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n autoPlay: PropTypes.bool,\n controls: PropTypes.oneOfType([PropTypes.oneOf([false, 'over', 'below']), PropTypes.shape({\n position: PropTypes.oneOf([false, 'over', 'below']),\n items: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.oneOf(['captions', 'descriptions', 'fullScreen', 'play', 'pause', 'volume']), PropTypes.shape({\n icon: PropTypes.element,\n a11yTitle: PropTypes.string,\n onClick: PropTypes.func,\n disabled: PropTypes.bool\n })]))\n })]),\n fit: PropTypes.oneOf(['cover', 'contain']),\n loop: PropTypes.bool,\n mute: PropTypes.bool,\n messages: PropTypes.shape({\n closeMenu: PropTypes.string,\n fullScreen: PropTypes.string,\n openMenu: PropTypes.string,\n pauseButton: PropTypes.string,\n playButton: PropTypes.string,\n progressMeter: PropTypes.string,\n scrubber: PropTypes.string,\n volumeDown: PropTypes.string,\n volumeUp: PropTypes.string\n }),\n skipInterval: PropTypes.number\n });\n}\nexport var VideoPropTypes = PropType;","var _excluded = [\"alignSelf\", \"autoPlay\", \"children\", \"controls\", \"gridArea\", \"loop\", \"margin\", \"messages\", \"mute\", \"onDurationChange\", \"onEnded\", \"onPause\", \"onPlay\", \"onTimeUpdate\", \"onVolumeChange\", \"skipInterval\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { defaultProps } from '../../default-props';\nimport { AnnounceContext } from '../../contexts/AnnounceContext';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Menu } from '../Menu';\nimport { Meter } from '../Meter';\nimport { Stack } from '../Stack';\nimport { Text } from '../Text';\nimport { Keyboard } from '../Keyboard';\nimport { containsFocus, useForwardedRef } from '../../utils';\nimport { StyledVideo, StyledVideoContainer, StyledVideoControls, StyledVideoScrubber } from './StyledVideo';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { VideoPropTypes } from './propTypes';\n\n// Split the volume control into 6 segments. Empirically determined.\nvar VOLUME_STEP = 0.166667;\nvar formatTime = function formatTime(time) {\n var minutes = Math.round(time / 60);\n if (minutes < 10) {\n minutes = \"0\" + minutes;\n }\n var seconds = Math.round(time) % 60;\n if (seconds < 10) {\n seconds = \"0\" + seconds;\n }\n return minutes + \":\" + seconds;\n};\nvar Video = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var alignSelf = _ref.alignSelf,\n autoPlay = _ref.autoPlay,\n children = _ref.children,\n controlsProp = _ref.controls,\n gridArea = _ref.gridArea,\n loop = _ref.loop,\n margin = _ref.margin,\n messages = _ref.messages,\n mute = _ref.mute,\n _onDurationChange = _ref.onDurationChange,\n _onEnded = _ref.onEnded,\n _onPause = _ref.onPause,\n _onPlay = _ref.onPlay,\n _onTimeUpdate = _ref.onTimeUpdate,\n _onVolumeChange = _ref.onVolumeChange,\n skipInterval = _ref.skipInterval,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n var announce = useContext(AnnounceContext);\n var _useState = useState([]),\n captions = _useState[0],\n setCaptions = _useState[1];\n var _useState2 = useState(),\n currentTime = _useState2[0],\n setCurrentTime = _useState2[1];\n var _useState3 = useState(),\n duration = _useState3[0],\n setDuration = _useState3[1];\n var _useState4 = useState(),\n percentagePlayed = _useState4[0],\n setPercentagePlayed = _useState4[1];\n var _useState5 = useState(false),\n playing = _useState5[0],\n setPlaying = _useState5[1];\n var _useState6 = useState(false),\n announceAudioDescription = _useState6[0],\n setAnnounceAudioDescription = _useState6[1];\n var _useState7 = useState(),\n scrubTime = _useState7[0],\n setScrubTime = _useState7[1];\n var _useState8 = useState(),\n volume = _useState8[0],\n setVolume = _useState8[1];\n var _useState9 = useState(false),\n hasPlayed = _useState9[0],\n setHasPlayed = _useState9[1];\n var _useState10 = useState(),\n interacting = _useState10[0],\n setInteracting = _useState10[1];\n var _useState11 = useState(),\n height = _useState11[0],\n setHeight = _useState11[1];\n var _useState12 = useState(),\n width = _useState12[0],\n setWidth = _useState12[1];\n var containerRef = useRef();\n var scrubberRef = useRef();\n var videoRef = useForwardedRef(ref);\n var controls = useMemo(function () {\n var result;\n if (typeof controlsProp === 'string' || typeof controlsProp === 'boolean') {\n result = {\n items: ['volume', 'fullScreen'],\n position: controlsProp\n };\n } else {\n result = {\n items: (controlsProp == null ? void 0 : controlsProp.items) || ['volume', 'fullScreen'],\n position: (controlsProp == null ? void 0 : controlsProp.position) || 'over'\n };\n }\n return result;\n }, [controlsProp]);\n\n // mute if needed\n useEffect(function () {\n var video = videoRef.current;\n if (video && mute) video.muted = true;\n }, [mute, videoRef]);\n\n // when the video is first rendered, set state from it where needed\n useEffect(function () {\n var video = videoRef.current;\n if (video) {\n // hide all captioning to start with\n var textTracks = video.textTracks;\n for (var i = 0; i < textTracks.length; i += 1) {\n textTracks[i].mode = 'hidden';\n }\n setCurrentTime(video.currentTime);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n setVolume(videoRef.current.volume);\n }\n }, [videoRef]);\n\n // turn off interacting after a while\n useEffect(function () {\n var timer = setTimeout(function () {\n if (interacting && !containsFocus(containerRef.current)) {\n setInteracting(false);\n }\n }, 3000);\n return function () {\n return clearTimeout(timer);\n };\n }, [interacting]);\n\n // track which audio description track is active\n var _useState13 = useState(),\n activeTrack = _useState13[0],\n setActiveTrack = _useState13[1];\n useLayoutEffect(function () {\n var video = videoRef.current;\n if (video) {\n if (video.videoHeight) {\n // set the size based on the video aspect ratio\n var rect = video.getBoundingClientRect();\n var ratio = rect.width / rect.height;\n var videoRatio = video.videoWidth / video.videoHeight;\n if (videoRatio > ratio) {\n var nextHeight = rect.width / videoRatio;\n if (nextHeight !== height) {\n setHeight(nextHeight);\n setWidth(undefined);\n }\n } else {\n var nextWidth = rect.height * videoRatio;\n if (nextWidth !== width) {\n setHeight(undefined);\n setWidth(nextWidth);\n }\n }\n }\n\n // remember the state of the text tracks for subsequent rendering\n var textTracks = video.textTracks;\n var nextCaptions = [];\n var set = false;\n // iterate through all of the tracks provided\n var _loop = function _loop() {\n var track = textTracks[i];\n var active = track.mode === 'showing';\n var getActiveTrack = function getActiveTrack(currentVideoTime) {\n var nextActiveTrack;\n for (var j = 0; j < track.cues.length; j += 1) {\n var _track$cues$j, _track$cues$j2;\n if (currentVideoTime > (track == null || (_track$cues$j = track.cues[j]) == null ? void 0 : _track$cues$j.startTime) && currentVideoTime < (track == null || (_track$cues$j2 = track.cues[j]) == null ? void 0 : _track$cues$j2.endTime)) {\n var _track$cues$j3;\n nextActiveTrack = track == null || (_track$cues$j3 = track.cues[j]) == null ? void 0 : _track$cues$j3.text;\n }\n }\n return nextActiveTrack;\n };\n\n // track is an audio description\n if (track.kind === 'descriptions') {\n if (announceAudioDescription) {\n video.ontimeupdate = function () {\n var nextActiveTrack = getActiveTrack(video.currentTime);\n if (activeTrack !== nextActiveTrack) {\n if (nextActiveTrack) {\n announce(nextActiveTrack, 'assertive');\n }\n setActiveTrack(nextActiveTrack);\n }\n };\n }\n }\n\n // otherwise treat as captions\n else {\n nextCaptions.push({\n label: track.label,\n active: active\n });\n if (!captions || !captions[i] || captions[i].active !== active) {\n set = true;\n }\n if (set) {\n setCaptions(nextCaptions);\n }\n }\n };\n for (var i = 0; i < textTracks.length; i += 1) {\n _loop();\n }\n }\n }, [activeTrack, announce, announceAudioDescription, captions, height, videoRef, width]);\n var play = useCallback(function () {\n return videoRef.current.play();\n }, [videoRef]);\n var pause = useCallback(function () {\n return videoRef.current.pause();\n }, [videoRef]);\n var scrub = useCallback(function (event) {\n if (scrubberRef.current) {\n var scrubberRect = scrubberRef.current.getBoundingClientRect();\n var percent = (event.clientX - scrubberRect.left) / scrubberRect.width;\n setScrubTime(duration * percent);\n }\n }, [duration]);\n var seek = useCallback(function (event) {\n if (scrubberRef.current) {\n var scrubberRect = scrubberRef.current.getBoundingClientRect();\n var percent = (event.clientX - scrubberRect.left) / scrubberRect.width;\n if (duration) videoRef.current.currentTime = duration * percent;\n }\n }, [duration, videoRef]);\n var seekForward = useCallback(function () {\n setInteracting(true);\n videoRef.current.currentTime += skipInterval || theme.video.scrubber.interval;\n }, [skipInterval, theme.video.scrubber.interval, videoRef]);\n var seekBackward = useCallback(function () {\n setInteracting(true);\n videoRef.current.currentTime -= skipInterval || theme.video.scrubber.interval;\n }, [skipInterval, theme.video.scrubber.interval, videoRef]);\n var louder = useCallback(function () {\n videoRef.current.volume += VOLUME_STEP;\n }, [videoRef]);\n var quieter = useCallback(function () {\n videoRef.current.volume -= VOLUME_STEP;\n }, [videoRef]);\n var showCaptions = useCallback(function (index) {\n var textTracks = videoRef.current.textTracks;\n for (var i = 0; i < textTracks.length; i += 1) textTracks[i].mode = i === index ? 'showing' : 'hidden';\n }, [videoRef]);\n var fullscreen = useCallback(function () {\n var video = videoRef.current;\n if (video.requestFullscreen) {\n video.requestFullscreen();\n } else if (video.msRequestFullscreen) {\n video.msRequestFullscreen();\n } else if (video.mozRequestFullScreen) {\n video.mozRequestFullScreen();\n } else if (video.webkitRequestFullscreen) {\n video.webkitRequestFullscreen();\n } else {\n console.warn(\"This browser doesn't support fullscreen.\");\n }\n }, [videoRef]);\n var controlsElement;\n if (controls != null && controls.position) {\n var _controls$items;\n var over = controls.position === 'over';\n var background = over ? theme.video.controls && theme.video.controls.background || {\n color: 'background-back',\n opacity: 'strong',\n dark: true\n } : undefined;\n var iconColor = over && (theme.video.icons.color || 'text');\n var formattedTime = formatTime(scrubTime || currentTime || duration);\n var Icons = {\n ClosedCaption: theme.video.icons.closedCaption,\n Configure: theme.video.icons.configure,\n FullScreen: theme.video.icons.fullScreen,\n Pause: theme.video.icons.pause,\n Play: theme.video.icons.play,\n ReduceVolume: theme.video.icons.reduceVolume,\n Volume: theme.video.icons.volume,\n Description: theme.video.icons.description\n };\n var captionControls = captions.map(function (caption, index) {\n return {\n icon: caption.label ? undefined : /*#__PURE__*/React.createElement(Icons.ClosedCaption, {\n color: iconColor\n }),\n label: caption.label,\n active: caption.active,\n a11yTitle: caption.label || format({\n id: 'video.captions',\n messages: messages\n }),\n onClick: function onClick() {\n showCaptions(caption.active ? -1 : index);\n var updatedCaptions = [];\n for (var i = 0; i < captions.length; i += 1) {\n updatedCaptions.push(captions[i]);\n // set other captions to active=false\n if (i !== index && updatedCaptions[i].active) updatedCaptions[i].active = false;\n // set the currently selected captions to active\n else if (i === index) updatedCaptions[i].active = !captions[index].active;\n }\n setCaptions(updatedCaptions);\n }\n };\n });\n var descriptionControls = {\n icon: /*#__PURE__*/React.createElement(Icons.Description, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.audioDescriptions',\n messages: messages\n }),\n active: announceAudioDescription,\n onClick: function onClick() {\n return setAnnounceAudioDescription(!announceAudioDescription);\n }\n };\n var volumeControls = ['volume', 'reduceVolume'].map(function (control) {\n return {\n icon: control === 'volume' ? /*#__PURE__*/React.createElement(Icons.Volume, {\n color: iconColor\n }) : /*#__PURE__*/React.createElement(Icons.ReduceVolume, {\n color: iconColor\n }),\n a11yTitle: format({\n id: control === 'volume' ? 'video.volumeUp' : 'video.volumeDown',\n messages: messages\n }),\n onClick: function onClick() {\n if (volume <= 1 - VOLUME_STEP && control === 'volume') {\n return louder();\n }\n if (volume >= VOLUME_STEP && control === 'reduceVolume') {\n return quieter();\n }\n return undefined;\n },\n close: false\n };\n });\n var buttonProps = {\n captions: captionControls,\n descriptions: descriptionControls,\n volume: volumeControls,\n fullScreen: {\n icon: /*#__PURE__*/React.createElement(Icons.FullScreen, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.fullScreen',\n messages: messages\n }),\n onClick: fullscreen\n },\n pause: {\n icon: /*#__PURE__*/React.createElement(Icons.Pause, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.pauseButton',\n messages: messages\n }),\n disabled: !playing,\n onClick: pause\n },\n play: {\n icon: /*#__PURE__*/React.createElement(Icons.Play, {\n color: iconColor\n }),\n a11yTitle: format({\n id: 'video.playButton',\n messages: messages\n }),\n disabled: playing,\n onClick: play\n }\n };\n var controlsMenuItems = [];\n (_controls$items = controls.items) == null || _controls$items.map(function (item) {\n if (item === 'volume') {\n volumeControls.map(function (control) {\n return controlsMenuItems.push(control);\n });\n return undefined;\n }\n if (item === 'captions' && typeof buttonProps[item] === 'object') {\n for (var i = 0; i < buttonProps[item].length; i += 1) controlsMenuItems.push(buttonProps[item][i]);\n return undefined;\n }\n if (item === 'descriptions') {\n controlsMenuItems.push(buttonProps[item]);\n return undefined;\n }\n if (typeof item === 'string') {\n return controlsMenuItems.push(buttonProps[item]);\n }\n return controlsMenuItems.push(item);\n });\n controlsElement = /*#__PURE__*/React.createElement(StyledVideoControls, {\n over: over,\n active: !hasPlayed || controls.position === 'below' || over && interacting,\n onBlur: function onBlur() {\n if (!containsFocus(containerRef.current)) setInteracting(false);\n }\n }, /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n justify: \"between\",\n background: background\n }, /*#__PURE__*/React.createElement(Button, {\n icon: playing ? /*#__PURE__*/React.createElement(Icons.Pause, {\n color: iconColor,\n a11yTitle: format({\n id: 'video.pauseButton',\n messages: messages\n })\n }) : /*#__PURE__*/React.createElement(Icons.Play, {\n color: iconColor,\n a11yTitle: format({\n id: 'video.playButton',\n messages: messages\n })\n }),\n hoverIndicator: \"background\",\n onClick: playing ? pause : play,\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n }), /*#__PURE__*/React.createElement(Box, {\n direction: \"row\",\n align: \"center\",\n flex: true\n }, /*#__PURE__*/React.createElement(Box, {\n flex: true\n }, /*#__PURE__*/React.createElement(Stack, null, /*#__PURE__*/React.createElement(Meter, {\n \"aria-label\": format({\n id: 'video.progressMeter',\n messages: messages\n }),\n background: over ? theme.video.scrubber && theme.video.scrubber.track && theme.video.scrubber.track.color || 'dark-3' : undefined,\n size: \"full\",\n thickness: \"small\",\n values: [{\n value: percentagePlayed || 0\n }]\n }), /*#__PURE__*/React.createElement(StyledVideoScrubber, {\n \"aria-label\": format({\n id: 'video.scrubber',\n messages: messages\n }),\n ref: scrubberRef,\n tabIndex: 0,\n role: \"button\",\n value: scrubTime ? Math.round(scrubTime / duration * 100) : undefined,\n onMouseMove: scrub,\n onMouseLeave: function onMouseLeave() {\n return setScrubTime(undefined);\n },\n onClick: seek,\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n }))), /*#__PURE__*/React.createElement(Box, {\n pad: {\n horizontal: 'small'\n }\n }, /*#__PURE__*/React.createElement(Text, {\n margin: \"none\"\n }, formattedTime))), /*#__PURE__*/React.createElement(Menu, {\n icon: /*#__PURE__*/React.createElement(Icons.Configure, {\n color: iconColor\n }),\n dropAlign: {\n bottom: 'top',\n right: 'right'\n },\n dropBackground: background,\n messages: {\n openMenu: format({\n id: 'video.openMenu',\n messages: messages\n }),\n closeMenu: format({\n id: 'video.closeMenu',\n messages: messages\n })\n },\n items: [].concat(controlsMenuItems),\n onFocus: function onFocus() {\n return setInteracting(true);\n }\n })));\n }\n var mouseEventListeners;\n if ((controls == null ? void 0 : controls.position) === 'over') {\n mouseEventListeners = {\n onMouseEnter: function onMouseEnter() {\n return setInteracting(true);\n },\n onMouseMove: function onMouseMove() {\n return setInteracting(true);\n },\n onTouchStart: function onTouchStart() {\n return setInteracting(true);\n }\n };\n }\n var style;\n if (rest.fit === 'contain' && (controls == null ? void 0 : controls.position) === 'over') {\n // constrain the size to fit the aspect ratio so the controls\n // overlap correctly\n if (width) {\n style = {\n width: width\n };\n } else if (height) {\n style = {\n height: height\n };\n }\n }\n return /*#__PURE__*/React.createElement(Keyboard, {\n onLeft: seekBackward,\n onRight: seekForward\n }, /*#__PURE__*/React.createElement(StyledVideoContainer, _extends({\n ref: containerRef\n }, mouseEventListeners, {\n alignSelf: alignSelf,\n gridArea: gridArea,\n margin: margin,\n style: style,\n tabIndex: \"-1\"\n }), /*#__PURE__*/React.createElement(StyledVideo, _extends({}, rest, {\n ref: videoRef,\n onDurationChange: function onDurationChange(event) {\n var video = videoRef.current;\n setDuration(video.duration);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n if (_onDurationChange) _onDurationChange(event);\n },\n onEnded: function onEnded(event) {\n setPlaying(false);\n if (_onEnded) _onEnded(event);\n },\n onPause: function onPause(event) {\n setPlaying(false);\n if (_onPause) _onPause(event);\n },\n onPlay: function onPlay(event) {\n setPlaying(true);\n setHasPlayed(true);\n if (_onPlay) _onPlay(event);\n },\n onTimeUpdate: function onTimeUpdate(event) {\n var video = videoRef.current;\n setCurrentTime(video.currentTime);\n setPercentagePlayed(video.currentTime / video.duration * 100);\n if (_onTimeUpdate) _onTimeUpdate(event);\n },\n onVolumeChange: function onVolumeChange(event) {\n setVolume(videoRef.current.volume);\n if (_onVolumeChange) _onVolumeChange(event);\n },\n autoPlay: autoPlay || false,\n loop: loop || false\n }), children), controlsElement));\n});\nVideo.defaultProps = {};\nVideo.displayName = 'Video';\nVideo.propTypes = VideoPropTypes;\nexport { Video };","import styled from 'styled-components';\nimport { genericStyles } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return \"\\n width: 100%;\\n height: unset;\\n \";\n }\n if (fillProp === 'vertical') {\n return \"\\n width: unset;\\n height: 100%;\\n \";\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return '';\n};\n\n// undefined fillProp has width for backwards compatibility\nvar StyledWorldMap = styled.svg.withConfig({\n displayName: \"StyledWorldMap\",\n componentId: \"sc-had4c3-0\"\n})([\"\", \" \", \" \", \";\"], genericStyles, function (props) {\n return props.fillProp !== undefined ? fillStyle(props.fillProp) : 'width: 100%;';\n}, function (props) {\n return props.theme.worldMap && props.theme.worldMap.extend;\n});\nStyledWorldMap.defaultProps = {};\nObject.setPrototypeOf(StyledWorldMap.defaultProps, defaultProps);\nexport { StyledWorldMap };","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport PropTypes from 'prop-types';\nimport { colorPropType, genericProps } from '../../utils/general-prop-types';\nvar PropType = {};\nif (process.env.NODE_ENV !== 'production') {\n PropType = _extends({}, genericProps, {\n color: colorPropType,\n continents: PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType,\n name: PropTypes.oneOf(['Africa', 'Asia', 'Australia', 'Europe', 'North America', 'South America']).isRequired,\n onClick: PropTypes.func,\n onHover: PropTypes.func\n })),\n fill: PropTypes.oneOfType([PropTypes.oneOf(['horizontal', 'vertical']), PropTypes.bool]),\n onSelectPlace: PropTypes.func,\n places: PropTypes.arrayOf(PropTypes.shape({\n color: colorPropType,\n content: PropTypes.node,\n dropProps: PropTypes.shape({}),\n name: PropTypes.string,\n // for a11y aria-label\n location: PropTypes.arrayOf(PropTypes.number).isRequired,\n onClick: PropTypes.func,\n onHover: PropTypes.func\n })),\n hoverColor: colorPropType\n });\n}\nexport var WorldMapPropTypes = PropType;","var _excluded = [\"fill\", \"color\", \"continents\", \"hoverColor\", \"onSelectPlace\", \"places\"],\n _excluded2 = [\"location\"],\n _excluded3 = [\"color\", \"onClick\", \"onHover\"],\n _excluded4 = [\"color\", \"coords\", \"content\", \"dropProps\", \"key\", \"name\", \"onClick\", \"onHover\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport React, { forwardRef } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Drop } from '../Drop';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, parseMetricToNum } from '../../utils';\nimport { StyledWorldMap } from './StyledWorldMap';\nimport { WorldMapPropTypes } from './propTypes';\n\n// The graphic is drawn as a rectangular grid using coordinates spaced\n// by FACTOR pixels.\nvar FACTOR = 10;\n\n// Mapping constants between coordinates and latitude+longitude.\n// The map coordinate space isn't precisely a mercator projection. So,\n// we have a few adjustments that we've empirically determined. The following\n// cities were used to make the empirical determinations:\n// London (0 lon), Quito (0 lat), Nome (far west), Sydney (far east),\n// Svalbard (far north), Ushuaia (far south).\n\n// These map to reality, they aren't adjusted.\nvar EQUATOR_Y = 32;\nvar WIDTH = 93;\n\n// Scale the latitude and longitude to align better with actual locations.\nvar LAT_SCALE = 0.98;\n// adjust more extreme latitudes to fit with the map dots better\nvar LAT_EXTREME_SCALE = 0.91;\nvar LON_SCALE = 0.99;\n\n// We shift the map coordinates to align better with actual locations.\nvar X_OFFSET = -2;\nvar Y_OFFSET = -2;\n\n// The continents have both an area boundary for interaction\n// and dots described as rows where each row is described by three values:\n// a starting coordinate and a length. This approach is more efficient than\n// describing it via SVG elements, keeping the code/library size smaller.\nvar CONTINENTS = [{\n name: 'Australia',\n origin: [74, 32],\n area: [[4, 0], [7, 1], [15, 7], [13, 9], [8, 8], [0, 6], [0, 2]],\n dots: [[4, 0, 1], [2, 1, 6], [0, 2, 9], [0, 3, 10], [0, 4, 10], [0, 5, 3], [5, 5, 5], [5, 6, 4], [8, 8, 1], [15, 7, 1], [14, 8, 1], [13, 9, 1]]\n}, {\n name: 'Asia',\n origin: [52, 1],\n area: [[16, 0], [38, 5], [40, 7], [28, 17], [24, 25], [29, 29], [19, 29], [11, 24], [3, 23], [0, 20], [0, 19], [6, 13], [7, 6]],\n dots: [[16, 0, 1], [17, 1, 2], [18, 2, 2], [15, 3, 6], [28, 3, 1], [30, 3, 1], [10, 4, 2], [13, 4, 10], [24, 4, 1], [9, 5, 22], [32, 5, 1], [38, 5, 1], [7, 6, 2], [10, 6, 1], [12, 6, 27], [7, 7, 34], [7, 8, 31], [7, 9, 26], [34, 9, 3], [7, 10, 22], [31, 10, 1], [33, 10, 1], [7, 11, 21], [32, 11, 2], [7, 12, 21], [32, 12, 1], [6, 13, 22], [32, 13, 1], [6, 14, 22], [5, 15, 22], [3, 16, 2], [6, 16, 20], [2, 17, 3], [6, 17, 16], [24, 17, 1], [28, 17, 1], [1, 18, 22], [26, 18, 2], [0, 19, 24], [0, 20, 5], [6, 20, 17], [2, 21, 5], [10, 21, 14], [2, 22, 5], [11, 22, 4], [16, 22, 4], [3, 23, 3], [11, 23, 2], [17, 23, 3], [23, 23, 1], [11, 24, 2], [18, 24, 2], [23, 24, 1], [24, 25, 1], [18, 26, 1], [22, 26, 1], [18, 27, 1], [20, 27, 4], [18, 28, 1], [21, 28, 1], [23, 28, 1], [26, 28, 3], [19, 29, 1], [28, 29, 2]]\n}, {\n name: 'Africa',\n origin: [40, 19],\n area: [[3, 0], [6, 0], [11, 2], [16, 7], [16, 15], [11, 18], [9, 18], [0, 6], [0, 3]],\n dots: [[3, 0, 4], [2, 1, 6], [9, 1, 2], [1, 2, 11], [0, 3, 13], [0, 4, 14], [0, 5, 14], [0, 6, 16], [1, 7, 16], [2, 8, 2], [6, 8, 11], [7, 9, 9], [7, 10, 8], [7, 11, 7], [8, 12, 7], [7, 13, 8], [7, 14, 7], [16, 14, 1], [8, 15, 5], [15, 15, 2], [8, 16, 5], [9, 17, 3], [9, 18, 3]]\n}, {\n name: 'Europe',\n origin: [39, 2],\n area: [[8, 0], [10, 0], [20, 2], [19, 11], [18, 13], [14, 16], [3, 16], [0, 7]],\n dots: [[8, 0, 3], [9, 1, 1], [20, 2, 1], [19, 3, 1], [12, 4, 1], [19, 4, 1], [9, 5, 6], [9, 6, 7], [17, 6, 3], [0, 7, 1], [8, 7, 12], [7, 8, 3], [11, 8, 9], [7, 9, 3], [11, 9, 9], [4, 10, 1], [7, 10, 1], [9, 10, 1], [11, 10, 9], [3, 11, 2], [7, 11, 13], [4, 12, 1], [6, 12, 13], [4, 13, 15], [5, 14, 3], [9, 14, 4], [15, 14, 2], [3, 15, 3], [8, 15, 1], [10, 15, 5], [6, 15, 2], [3, 16, 2], [10, 16, 5]]\n}, {\n name: 'South America',\n origin: [22, 26],\n area: [[2, 0], [5, 0], [11, 4], [11, 8], [3, 18], [2, 17], [0, 4], [0, 3]],\n dots: [[2, 0, 4], [1, 1, 7], [1, 2, 7], [0, 3, 10], [0, 4, 12], [1, 5, 11], [2, 6, 9], [3, 7, 8], [3, 8, 8], [3, 9, 6], [3, 10, 6], [3, 11, 5], [3, 12, 3], [2, 13, 3], [2, 14, 3], [2, 15, 2], [2, 16, 2], [2, 17, 2], [3, 18, 1]]\n}, {\n name: 'North America',\n origin: [0, 0],\n area: [[21, 0], [39, 0], [39, 6], [22, 26], [16, 23], [2, 12], [0, 7]],\n dots: [[22, 0, 6], [29, 0, 1], [31, 0, 1], [33, 0, 5], [20, 1, 1], [22, 1, 1], [24, 1, 2], [27, 1, 13], [17, 2, 1], [20, 2, 5], [26, 2, 13], [13, 3, 1], [19, 3, 1], [21, 3, 3], [26, 3, 14], [14, 4, 1], [16, 4, 4], [21, 4, 3], [29, 4, 11], [12, 5, 3], [16, 5, 1], [18, 5, 1], [20, 5, 3], [24, 5, 1], [30, 5, 8], [14, 6, 3], [19, 6, 1], [22, 6, 4], [31, 6, 8], [0, 7, 15], [16, 7, 1], [18, 7, 4], [24, 7, 2], [30, 7, 7], [2, 8, 20], [24, 8, 3], [29, 8, 5], [2, 9, 20], [24, 9, 2], [30, 9, 3], [1, 10, 18], [23, 10, 2], [31, 10, 1], [2, 11, 2], [8, 11, 11], [23, 11, 2], [26, 11, 1], [2, 12, 1], [8, 12, 13], [24, 12, 3], [10, 13, 12], [23, 13, 5], [11, 14, 17], [11, 15, 9], [21, 15, 6], [28, 15, 2], [11, 16, 11], [23, 16, 4], [11, 17, 14], [12, 18, 11], [12, 19, 12], [13, 20, 9], [15, 21, 3], [22, 21, 1], [16, 22, 2], [16, 23, 2], [20, 23, 1], [23, 23, 1], [18, 24, 3], [21, 25, 1], [22, 26, 1]]\n}];\nvar mergeBounds = function mergeBounds(bounds1, bounds2) {\n return [bounds1 ? Math.min(bounds1[0], bounds2[0]) : bounds2[0], bounds1 ? Math.min(bounds1[1], bounds2[1]) : bounds2[1], bounds1 ? Math.max(bounds1[2], bounds2[2]) : bounds2[2], bounds1 ? Math.max(bounds1[3], bounds2[3]) : bounds2[3]];\n};\nvar midPoint = function midPoint(bounds) {\n return [bounds[0] + (bounds[2] - bounds[0]) / 2, bounds[1] + (bounds[3] - bounds[1]) / 2];\n};\n\n// from https://stackoverflow.com/a/14457180/8513067\nvar latLonToCoord = function latLonToCoord(_ref) {\n var lat = _ref[0],\n lon = _ref[1];\n var scaledLon = lon * LON_SCALE;\n var x = Math.round((scaledLon + 180) * (WIDTH / 360));\n // adjust more extreme latitudes to fit with the map dots better\n var scaledLat = lat * (lat > 60 || lat < -50 ? LAT_EXTREME_SCALE : LAT_SCALE);\n var latRad = scaledLat * Math.PI / 180;\n var mercN = Math.log(Math.tan(Math.PI / 4 + latRad / 2));\n var y = Math.round(EQUATOR_Y - WIDTH * mercN / (2 * Math.PI));\n return [x + X_OFFSET, y + Y_OFFSET];\n};\nvar coordToLatLon = function coordToLatLon(_ref2) {\n var x = _ref2[0],\n y = _ref2[1];\n var mercN = (EQUATOR_Y - (y - Y_OFFSET)) * (2 * Math.PI) / WIDTH;\n var latRad = (Math.atan(Math.exp(mercN)) - Math.PI / 4) * 2;\n var scaledLat = latRad * 180 / Math.PI / LAT_SCALE;\n // adjust more extreme latitudes to fit with the map dots better\n var lat = scaledLat / (scaledLat > 60 || scaledLat < -50 ? LAT_EXTREME_SCALE : LAT_SCALE);\n var lon = (x - X_OFFSET) * 360 / WIDTH - 180;\n return [lat, lon];\n};\nvar buildContinent = function buildContinent(_ref3) {\n var areaProp = _ref3.area,\n dotsProp = _ref3.dots,\n name = _ref3.name,\n origin = _ref3.origin;\n var bounds = [origin[0], origin[1], origin[0], origin[1]];\n var dots = dotsProp.map(function (segment) {\n var count = segment[2];\n var spots = [];\n for (var i = 0; i < count; i += 1) spots.push('h0');\n var dotCommands = spots.join(' m10,0 ');\n var x = FACTOR * (origin[0] + segment[0] + 1);\n var y = FACTOR * (origin[1] + segment[1] + 1);\n bounds = mergeBounds(bounds, [origin[0], origin[1], origin[0] + segment[0] + segment[2], origin[1] + segment[1]]);\n return \"M\" + x + \",\" + y + \" \" + dotCommands;\n }).join(' ');\n var area = areaProp.map(function (point, index) {\n var x = FACTOR * (point[0] + origin[0] + 1);\n var y = FACTOR * (point[1] + origin[1] + 1);\n return \"\" + (index === 0 ? 'M' : 'L') + x + \",\" + y;\n }).join(' ') + \" Z\";\n var mid = midPoint(bounds);\n return {\n area: area,\n dots: dots,\n name: name,\n origin: origin,\n bounds: bounds,\n mid: mid\n };\n};\nvar buildWorld = function buildWorld() {\n // Build the SVG paths describing the individual dots\n var continents = CONTINENTS.map(buildContinent);\n var bounds;\n continents.forEach(function (continent) {\n bounds = mergeBounds(bounds, continent.bounds);\n });\n return {\n continents: continents,\n bounds: bounds,\n x: bounds[0] * FACTOR,\n y: bounds[1] * FACTOR,\n width: (bounds[2] - bounds[0] + 1) * FACTOR,\n height: (bounds[3] - bounds[1] + 2) * FACTOR\n };\n};\nvar buildInteractiveProps = function buildInteractiveProps(_ref4, activeFunc, active) {\n var name = _ref4.name,\n onClick = _ref4.onClick,\n onHover = _ref4.onHover;\n return {\n role: 'button',\n 'aria-label': name,\n tabIndex: '0',\n onClick: onClick ? function () {\n return onClick(name);\n } : undefined,\n onMouseOver: function onMouseOver() {\n if (!active) {\n activeFunc(name);\n if (onHover) {\n onHover(true);\n }\n }\n },\n onMouseLeave: function onMouseLeave() {\n if (active) {\n activeFunc(undefined);\n if (onHover) {\n onHover(false);\n }\n }\n },\n onFocus: function onFocus() {\n // This moves the map unnecessarily. Instead, we should check\n // the position and scroll if it isn't already visible\n // this._worldMapRef.scrollIntoView();\n if (!active) {\n activeFunc(name);\n }\n },\n onBlur: function onBlur() {\n if (active) {\n activeFunc(undefined);\n }\n }\n };\n};\nvar WorldMap = /*#__PURE__*/forwardRef(function (_ref5, ref) {\n var fill = _ref5.fill,\n color = _ref5.color,\n continentsProp = _ref5.continents,\n hoverColor = _ref5.hoverColor,\n onSelectPlace = _ref5.onSelectPlace,\n placesProp = _ref5.places,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded);\n var theme = React.useContext(ThemeContext);\n var world = React.useMemo(buildWorld, []);\n var _React$useState = React.useState({}),\n continents = _React$useState[0],\n setContinents = _React$useState[1];\n React.useEffect(function () {\n if (continentsProp) {\n setContinents(continentsProp.reduce(function (obj, continent) {\n // eslint-disable-next-line no-param-reassign\n obj[continent.name] = continent;\n return obj;\n }, {}));\n } else setContinents({});\n }, [continentsProp]);\n var _React$useState2 = React.useState([]),\n places = _React$useState2[0],\n setPlaces = _React$useState2[1];\n\n // targets are used for the Drops associated with places content\n var _React$useState3 = React.useState([]),\n targets = _React$useState3[0],\n setTargets = _React$useState3[1];\n React.useEffect(function () {\n if (placesProp) {\n setPlaces(placesProp.map(function (_ref6) {\n var location = _ref6.location,\n place = _objectWithoutPropertiesLoose(_ref6, _excluded2);\n var coords = latLonToCoord(location);\n return _extends({\n coords: coords,\n key: location.join(',')\n }, place);\n }));\n } else setPlaces([]);\n return function () {\n setTargets([]);\n };\n }, [placesProp, world]);\n var _React$useState4 = React.useState(),\n over = _React$useState4[0],\n setOver = _React$useState4[1];\n var _React$useState5 = React.useState(),\n activeCoords = _React$useState5[0],\n setActiveCoords = _React$useState5[1];\n var _React$useState6 = React.useState(),\n activeContinent = _React$useState6[0],\n setActiveContinent = _React$useState6[1];\n var _React$useState7 = React.useState(),\n activePlace = _React$useState7[0],\n setActivePlace = _React$useState7[1];\n var containerRef = React.useRef();\n var placeRef = React.useCallback(function (node, index) {\n setTargets(function (prevTargets) {\n if (!prevTargets[index]) {\n var nextTargets = [].concat(prevTargets);\n nextTargets[index] = node;\n return nextTargets;\n }\n return prevTargets;\n });\n }, []);\n var onMouseMove = React.useCallback(function (event) {\n // determine the map coordinates for where the mouse is\n // containerRef uses the group so we can handle aspect ratio scaling\n var rect = containerRef.current.getBoundingClientRect();\n // since the SVG viewBox might be scaled\n var scale = rect.width / world.width;\n var coords = [Math.round((event.clientX - rect.left) / scale / FACTOR), Math.round((event.clientY - rect.top) / scale / FACTOR)];\n setActiveCoords(coords);\n }, [world.width]);\n var continentElements = world.continents.map(function (_ref7) {\n var area = _ref7.area,\n dots = _ref7.dots,\n name = _ref7.name;\n var _ref8 = continents[name] || {},\n continentColor = _ref8.color,\n onClick = _ref8.onClick,\n onHover = _ref8.onHover,\n restContinents = _objectWithoutPropertiesLoose(_ref8, _excluded3);\n var active = activeContinent && activeContinent === name;\n var interactiveProps = {};\n if (onClick || onHover) {\n interactiveProps = buildInteractiveProps(continents[name], function (activate) {\n return setActiveContinent(activate);\n }, active);\n }\n return /*#__PURE__*/React.createElement(\"g\", _extends({\n key: name\n }, interactiveProps, restContinents), /*#__PURE__*/React.createElement(\"path\", {\n stroke: \"none\",\n fill: \"#fff\",\n fillOpacity: \"0.01\",\n d: area\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: dots,\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.continent[active ? 'active' : 'base']),\n stroke: normalizeColor(continentColor || color || theme.worldMap.color, theme)\n }));\n });\n var placesContent = [];\n var placeElements = places.map(function (place, index) {\n var placeColor = place.color,\n coords = place.coords,\n content = place.content,\n dropProps = place.dropProps,\n key = place.key,\n name = place.name,\n onClick = place.onClick,\n onHover = place.onHover,\n restPlace = _objectWithoutPropertiesLoose(place, _excluded4);\n var d = \"M\" + FACTOR * coords[0] + \", \" + FACTOR * coords[1] + \" h0\";\n var active = activePlace && activePlace === name;\n var interactiveProps = {};\n if (onClick || onHover) {\n interactiveProps = buildInteractiveProps(place, function (activate) {\n return setActivePlace(activate);\n }, active);\n }\n if (content && targets[index]) {\n placesContent.push( /*#__PURE__*/React.createElement(Drop, _extends({\n key: key || name\n }, dropProps, {\n target: targets[index]\n }), content));\n }\n return /*#__PURE__*/React.createElement(\"path\", _extends({\n key: key,\n ref: function ref(node) {\n return placeRef(node, index);\n },\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.place[active ? 'active' : 'base']),\n stroke: normalizeColor(placeColor || color || theme.worldMap.color, theme)\n }, interactiveProps, restPlace, {\n d: d\n }));\n });\n\n // If the caller is interested in onSelectPlace changes, track where the\n var interactiveProps = {};\n if (onSelectPlace) {\n interactiveProps = {\n onMouseOver: function onMouseOver() {\n return setOver(true);\n },\n onMouseMove: over ? onMouseMove : undefined,\n onMouseLeave: function onMouseLeave() {\n setOver(false);\n setActiveCoords(undefined);\n }\n };\n }\n var active;\n if (activeCoords) {\n var d = \"M\" + FACTOR * activeCoords[0] + \", \" + FACTOR * activeCoords[1] + \" h0\";\n active = /*#__PURE__*/React.createElement(\"g\", {\n stroke: \"none\",\n fill: \"none\",\n fillRule: \"evenodd\",\n onClick: function onClick() {\n return onSelectPlace(coordToLatLon(activeCoords, world.bounds));\n }\n }, /*#__PURE__*/React.createElement(\"path\", {\n strokeLinecap: \"round\",\n strokeWidth: parseMetricToNum(theme.worldMap.place.active),\n stroke: normalizeColor(hoverColor || color || theme.worldMap.hover.color, theme),\n d: d\n }));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledWorldMap, _extends({\n ref: ref,\n viewBox: world.x + \" \" + world.y + \" \" + world.width + \" \" + world.height,\n preserveAspectRatio: \"xMinYMin meet\",\n fillProp: fill,\n width: world.width,\n height: world.height\n }, interactiveProps, rest), /*#__PURE__*/React.createElement(\"g\", {\n ref: containerRef,\n stroke: \"none\",\n fill: \"none\",\n fillRule: \"evenodd\"\n }, continentElements), placeElements, active), placesContent);\n});\nWorldMap.displayName = 'WorldMap';\nWorldMap.defaultProps = {};\nObject.setPrototypeOf(WorldMap.defaultProps, defaultProps);\nWorldMap.propTypes = WorldMapPropTypes;\nexport { WorldMap };","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nexport var grommet = deepFreeze({\n global: {\n colors: {\n background: {\n light: '#ffffff',\n dark: '#000000'\n }\n },\n backgrounds: {\n stack: {\n color: 'light-1',\n image: \"url(https://v2.grommet.io/img/stak-hurrah.svg)\"\n },\n 'gradient-purple-blue': {\n color: 'neutral-3',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #00739D 100% /* neutral-3 */\\n );\",\n rotate: 145\n },\n 'gradient-purple-gold': {\n color: 'neutral-2',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #EB0F79 75%,\\n #FFCA58 100% /* accent-4 */\\n );\"\n }\n },\n font: {\n family: \"-apple-system,\\n BlinkMacSystemFont, \\n \\\"Segoe UI\\\", \\n Roboto, \\n Oxygen, \\n Ubuntu, \\n Cantarell, \\n \\\"Fira Sans\\\", \\n \\\"Droid Sans\\\", \\n \\\"Helvetica Neue\\\", \\n Arial, sans-serif, \\n \\\"Apple Color Emoji\\\", \\n \\\"Segoe UI Emoji\\\", \\n \\\"Segoe UI Symbol\\\"\"\n }\n },\n button: {\n extend: css([\"\", \"\"], function (props) {\n return !props.plain && 'font-weight: bold;';\n })\n }\n});","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nimport { normalizeColor } from '../utils/colors';\nvar accentColors = ['#FD6FFF', '#60EB9F', '#60EBE1', '#FFCA58'];\nvar neutralColors = ['#EB6060', '#01C781', '#6095EB', '#FFB200'];\nvar statusColors = {\n critical: '#FF3333',\n error: '#FF3333',\n warning: '#F7E464',\n ok: '#7DD892',\n unknown: '#a8a8a8',\n disabled: '#a8a8a8'\n};\nvar backgroundColor = '#111111';\nvar colors = {\n active: 'rgba(102, 102, 102, 0.5)',\n background: backgroundColor,\n black: '#000000',\n brand: '#FD6FFF',\n control: {\n dark: '#FFCA58',\n light: '#403216'\n },\n focus: '#FFCA58',\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n placeholder: '#AAAAAA',\n text: {\n dark: '#eeeeee',\n light: '#444444'\n },\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nexport var dark = deepFreeze({\n global: {\n colors: colors,\n drop: {\n background: '#333333'\n },\n focus: {\n border: {\n color: css([\"\", \";\"], function (props) {\n return normalizeColor('focus', props.theme);\n }),\n width: '2px'\n }\n },\n font: {\n family: 'Arial'\n },\n input: {\n weight: 700\n }\n },\n anchor: {\n color: 'control'\n },\n layer: {\n background: backgroundColor,\n overlay: {\n background: 'rgba(48, 48, 48, 0.5)'\n }\n }\n});","import { css } from 'styled-components';\nimport { deepFreeze } from '../utils/object';\nexport var hacktoberfest2022 = deepFreeze({\n defaultMode: 'dark',\n global: {\n colors: {\n background: '#160F1D',\n 'background-back': '#000000',\n 'background-front': '#160F1D',\n 'text-strong': '#FFFFFF',\n text: '#E4E1E6',\n 'text-weak': '#76717A',\n grey: '#AFACB2',\n lime: '#C6FC60',\n pink: '#D856A7',\n purple: '#7C7EF4',\n teal: '#73DAFB',\n yellow: '#EDD063',\n darkPurple: '#291E40',\n active: 'purple',\n focus: '#233670',\n brand: 'lime',\n control: 'teal',\n 'graph-0': 'yellow',\n 'graph-1': 'purple',\n 'graph-2': 'teal',\n 'graph-3': 'pink',\n 'graph-4': 'lime',\n // clear unused colors\n icon: undefined,\n 'accent-1': undefined,\n 'accent-2': undefined,\n 'accent-3': undefined,\n 'accent-4': undefined,\n 'neutral-1': undefined,\n 'neutral-2': undefined,\n 'neutral-3': undefined,\n 'neutral-4': undefined,\n 'neutral-5': undefined,\n 'light-1': undefined,\n 'light-2': undefined,\n 'light-3': undefined,\n 'light-4': undefined,\n 'light-5': undefined,\n 'light-6': undefined,\n 'dark-1': undefined,\n 'dark-2': undefined,\n 'dark-3': undefined,\n 'dark-4': undefined,\n 'dark-5': undefined,\n 'dark-6': undefined\n },\n backgrounds: {\n 'gradient-purple-teal': {\n image: \"linear-gradient(\\n #7C7EF4 0%,\\n #73DAFB 100%\\n );\"\n },\n 'gradient-teal-purple': {\n image: \"linear-gradient(\\n #73DAFB 0%,\\n #7C7EF4 100%\\n );\"\n },\n 'gradient-yellow-teal-purple': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 50%,\\n #7C7EF4 100%\\n );\",\n rotate: 90\n },\n 'gradient-yellow-teal': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 100%\\n );\",\n rotate: 90\n }\n },\n focus: {\n shadow: {\n color: 'focus',\n size: '3px'\n }\n },\n font: {\n family: '\"JetBrains Mono\", monospace',\n face: \"/* latin */\\n@font-face {\\n font-family: 'JetBrains Mono';\\n font-style: normal;\\n font-weight: 400;\\n src: url(https://fonts.gstatic.com/s/jetbrainsmono/v13/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOTk6OThhvA.woff) format('woff');\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\\n}\"\n }\n },\n grommet: {\n extend: css([\"text-transform:uppercase;\"])\n },\n anchor: {\n color: 'text',\n hover: {\n color: 'text-strong'\n }\n },\n button: {\n border: {\n width: '0px',\n radius: '0px'\n },\n padding: {\n horizontal: '20px',\n vertical: '10px'\n },\n color: 'text-strong',\n size: {\n small: {\n pad: {\n horizontal: '16px',\n vertical: '8px'\n }\n },\n medium: {\n pad: {\n horizontal: '20px',\n vertical: '10px'\n }\n }\n },\n \"default\": {\n color: 'text-strong'\n },\n primary: {\n border: false,\n background: 'gradient-yellow-teal-purple',\n color: 'text'\n },\n hover: {\n border: false\n },\n extend: css([\"clip-path:polygon( 12px 0px,100% 0px,100% 72%,calc(100% - 12px) 100%,0px 100%,0px 12px );text-transform:uppercase;&:focus{clip-path:none;}\"])\n },\n heading: {\n extend: css([\"text-shadow:rgba(255,215,77,0.6) -1px -1px 6px,rgba(124,127,255,0.6) 1px 1px 6px;\"])\n }\n});","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nimport { Actions } from 'grommet-icons/icons/Actions';\nimport { AssistListening } from 'grommet-icons/icons/AssistListening';\nimport { CircleInformation } from 'grommet-icons/icons/CircleInformation';\nimport { ClosedCaption } from 'grommet-icons/icons/ClosedCaption';\nimport { Expand } from 'grommet-icons/icons/Expand';\nimport { FormClose } from 'grommet-icons/icons/FormClose';\nimport { FormDown } from 'grommet-icons/icons/FormDown';\nimport { FormNext } from 'grommet-icons/icons/FormNext';\nimport { FormPrevious } from 'grommet-icons/icons/FormPrevious';\nimport { FormUp } from 'grommet-icons/icons/FormUp';\nimport { Next } from 'grommet-icons/icons/Next';\nimport { Pause } from 'grommet-icons/icons/Pause';\nimport { Play } from 'grommet-icons/icons/Play';\nimport { FormPin } from 'grommet-icons/icons/FormPin';\nimport { Previous } from 'grommet-icons/icons/Previous';\nimport { StatusCriticalSmall } from 'grommet-icons/icons/StatusCriticalSmall';\nimport { StatusGoodSmall } from 'grommet-icons/icons/StatusGoodSmall';\nimport { StatusWarningSmall } from 'grommet-icons/icons/StatusWarningSmall';\nimport { StatusUnknownSmall } from 'grommet-icons/icons/StatusUnknownSmall';\nimport { Subtract } from 'grommet-icons/icons/Subtract';\nimport { Volume } from 'grommet-icons/icons/Volume';\nimport { VolumeLow } from 'grommet-icons/icons/VolumeLow';\nimport { base as iconBase } from 'grommet-icons/themes/base';\nimport { deepFreeze, deepMerge } from '../utils/object';\nimport { parseMetricToNum } from '../utils/mixins';\nvar brandColor = '#7D4CDB';\nvar accentColors = ['#6FFFB0', '#FD6FFF', '#81FCED', '#FFCA58'];\nvar neutralColors = ['#00873D', '#3D138D', '#00739D', '#A2423D'];\nvar statusColors = {\n critical: '#FF4040',\n error: '#B30000',\n warning: '#FFAA15',\n ok: '#00C781',\n unknown: '#CCCCCC',\n disabled: '#CCCCCC'\n};\nvar darkColors = ['#333333', '#555555', '#777777', '#999999', '#999999', '#999999'];\nvar lightColors = ['#F8F8F8', '#F2F2F2', '#EDEDED', '#DADADA', '#DADADA', '#DADADA'];\nvar focusColor = accentColors[0];\nvar colors = {\n active: 'rgba(221, 221, 221, 0.5)',\n 'background-back': {\n dark: '#33333308',\n light: '#EDEDED'\n },\n 'background-front': {\n dark: '#444444',\n light: '#FFFFFF'\n },\n 'background-contrast': {\n light: '#33333310',\n dark: '#FFFFFF18'\n },\n 'active-background': 'background-contrast',\n 'active-text': 'text-strong',\n black: '#000000',\n border: {\n dark: 'rgba(255, 255, 255, 0.33)',\n light: 'rgba(0, 0, 0, 0.33)'\n },\n brand: brandColor,\n control: {\n dark: 'accent-1',\n light: 'brand'\n },\n focus: focusColor,\n 'graph-0': 'accent-1',\n 'graph-1': 'neutral-1',\n 'graph-2': 'neutral-2',\n 'graph-3': 'neutral-3',\n 'graph-4': 'neutral-4',\n placeholder: '#AAAAAA',\n selected: 'brand',\n text: {\n dark: '#f8f8f8',\n light: '#444444'\n },\n 'text-strong': {\n dark: '#FFFFFF',\n light: '#000000'\n },\n 'text-weak': {\n dark: '#CCCCCC',\n light: '#555555'\n },\n 'text-xweak': {\n dark: '#BBBBBB',\n light: '#666666'\n },\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n 'selected-background': 'brand',\n 'selected-text': 'text-strong',\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(darkColors, 'dark');\ncolorArray(lightColors, 'light');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nexport var generate = function generate(baseSpacing, scale) {\n if (baseSpacing === void 0) {\n baseSpacing = 24;\n }\n if (scale === void 0) {\n scale = 6;\n }\n // 24\n var baseFontSize = baseSpacing * 0.75; // 18\n var fontScale = baseSpacing / scale; // 4\n\n var fontSizing = function fontSizing(factor) {\n return {\n size: baseFontSize + factor * fontScale + \"px\",\n height: baseSpacing + factor * fontScale + \"px\",\n // maxWidth chosen to be ~50 characters wide\n // see: https://ux.stackexchange.com/a/34125\n maxWidth: baseSpacing * (baseFontSize + factor * fontScale) + \"px\"\n };\n };\n var borderWidth = 2;\n var controlBorderWidth = 1;\n var result = deepMerge(iconBase, {\n global: {\n active: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n animation: {\n duration: '1s',\n jiggle: {\n duration: '0.1s'\n }\n },\n // backgrounds: undefined,\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 2 + \"px\",\n // 12\n xlarge: baseSpacing + \"px\" // 24\n },\n breakpoints: {\n small: {\n value: baseSpacing * 32,\n // 768\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 4 + \"px\",\n // 6\n xlarge: baseSpacing / 2 + \"px\" // 12\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: '2px',\n xsmall: baseSpacing / 8 + \"px\",\n // 3\n small: baseSpacing / 4 + \"px\",\n // 6\n medium: baseSpacing / 2 + \"px\",\n // 12\n large: baseSpacing + \"px\",\n // 24\n xlarge: baseSpacing * 2 + \"px\" // 48\n },\n size: {\n xxsmall: baseSpacing + \"px\",\n // 24\n xsmall: baseSpacing * 2 + \"px\",\n // 48\n small: baseSpacing * 4 + \"px\",\n // 96\n medium: baseSpacing * 8 + \"px\",\n // 192\n large: baseSpacing * 16 + \"px\",\n // 384\n xlarge: baseSpacing * 32 + \"px\",\n // 768\n full: '100%'\n }\n },\n medium: {\n value: baseSpacing * 64 // 1536\n },\n large: {} // anything above 'medium'\n },\n // Breakpoints used at Server Side Rendering for the initial rendering\n // These values correspond to the theme breakpoints\n deviceBreakpoints: {\n phone: 'small',\n tablet: 'medium',\n computer: 'large'\n },\n colors: colors,\n control: {\n border: {\n width: controlBorderWidth + \"px\",\n radius: '4px',\n color: 'border'\n },\n disabled: {\n opacity: 0.3\n }\n },\n // The time to wait after the user stopped typing, measured in ms.\n // A half second (500ms) debounce can be a helpful starting point.\n // You want to give the user time to fill out a field, but capture\n // their attention before they move on past it. 2 second (2000ms)\n // might be too long depending on how fast people type, and 200ms\n // would be an eye blink\n debounceDelay: 500,\n drop: {\n // intelligentMargin: undefined,\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '0px'\n },\n // margin: undefined\n shadowSize: 'small',\n // shadowSize is deprecated, use 'elevation'\n zIndex: '20'\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: baseSpacing / 8 + \"px\",\n // 3\n xsmall: baseSpacing / 4 + \"px\",\n // 6\n small: baseSpacing / 2 + \"px\",\n // 12\n medium: baseSpacing + \"px\",\n // 24\n large: baseSpacing * 2 + \"px\",\n // 48\n xlarge: baseSpacing * 4 + \"px\",\n // 96\n responsiveBreakpoint: 'small'\n },\n elevation: {\n light: {\n none: 'none',\n xsmall: '0px 1px 2px rgba(0, 0, 0, 0.20)',\n small: '0px 2px 4px rgba(0, 0, 0, 0.20)',\n medium: '0px 4px 8px rgba(0, 0, 0, 0.20)',\n large: '0px 8px 16px rgba(0, 0, 0, 0.20)',\n xlarge: '0px 12px 24px rgba(0, 0, 0, 0.20)'\n },\n dark: {\n none: 'none',\n xsmall: '0px 2px 2px rgba(255, 255, 255, 0.40)',\n small: '0px 4px 4px rgba(255, 255, 255, 0.40)',\n medium: '0px 6px 8px rgba(255, 255, 255, 0.40)',\n large: '0px 8px 16px rgba(255, 255, 255, 0.40)',\n xlarge: '0px 12px 24px rgba(255, 255, 255, 0.40)'\n }\n },\n focus: {\n // shadow or outline are required for accessibility\n border: {\n // remove to only have shadow\n color: 'focus'\n },\n // outline: { color: undefined, size: undefined },\n shadow: {\n color: 'focus',\n size: '2px'\n }\n },\n font: _extends({}, fontSizing(0)),\n hover: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n input: {\n padding: {\n horizontal: parseMetricToNum(baseSpacing / 2 + \"px\") - parseMetricToNum(controlBorderWidth + \"px\") + \"px\",\n vertical: parseMetricToNum(baseSpacing / 2 + \"px\") - parseMetricToNum(controlBorderWidth + \"px\") + \"px\"\n },\n font: {\n // size: undefined,\n // height: undefined,\n weight: 600\n },\n // deprecate in v3\n // weight: undefined,\n readOnly: {\n // background: undefined,\n // border: {\n // color: undefined,\n // },\n }\n },\n opacity: {\n strong: 0.8,\n medium: 0.4,\n weak: 0.1\n },\n selected: {\n background: 'selected',\n color: 'white'\n },\n spacing: baseSpacing + \"px\",\n size: {\n xxsmall: baseSpacing * 2 + \"px\",\n // 48\n xsmall: baseSpacing * 4 + \"px\",\n // 96\n small: baseSpacing * 8 + \"px\",\n // 192\n medium: baseSpacing * 16 + \"px\",\n // 384\n large: baseSpacing * 32 + \"px\",\n // 768\n xlarge: baseSpacing * 48 + \"px\",\n // 1152\n xxlarge: baseSpacing * 64 + \"px\",\n // 1536\n full: '100%'\n }\n },\n // icon: {\n // extennd: undefined,\n // matchSize: undefined,\n // size: undefined,\n // },\n accordion: {\n panel: {\n // border: {\n // side: 'bottom',\n // color: 'border',\n // },\n },\n border: {\n side: 'bottom',\n color: 'border'\n },\n heading: {\n level: '4' // level ranges from 1-6\n // margin: undefined\n },\n hover: {\n // background: undefined,\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n // deprecated\n heading: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n }\n }\n },\n icons: {\n collapse: FormUp,\n expand: FormDown\n // color: { dark: undefined, light: undefined },\n }\n },\n anchor: {\n textDecoration: 'none',\n fontWeight: 600,\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n gap: 'small',\n hover: {\n textDecoration: 'underline'\n // fontWeight: undefined,\n // extend: undefined,\n }\n // size: {\n // medium: {\n // color: undefined,\n // fontWeight: undefined,\n // textDecoration: undefined,\n // },\n // },\n // extend: undefined,\n },\n avatar: {\n // extend: undefined,\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n // 18px\n small: baseSpacing + \"px\",\n // 24px\n medium: baseSpacing * 2 + \"px\",\n // default 48px\n large: baseSpacing * 3 + \"px\",\n // 72px\n xlarge: baseSpacing * 4 + \"px\",\n // 96px\n '2xl': baseSpacing * 5 + \"px\",\n // 120px\n '3xl': baseSpacing * 6 + \"px\",\n // 144px\n '4xl': baseSpacing * 7 + \"px\",\n // 168px\n '5xl': baseSpacing * 8 + \"px\" // 192px\n },\n text: {\n size: {\n xsmall: 'small',\n // 14px\n small: 'medium',\n // 18px\n medium: 'large',\n // 22px\n large: 'xlarge',\n // 26px\n xlarge: 'xxlarge',\n // 34px\n '2xl': '3xl',\n // 42px\n '3xl': '4xl',\n // 54px\n '4xl': '5xl',\n // 70px\n '5xl': '6xl' // 90px\n }\n // fontWeight: undefined,\n // extend: undefined\n }\n },\n box: {\n responsiveBreakpoint: 'small' // when we switch rows to columns\n // extend: undefined,\n },\n button: {\n badge: {\n // align: undefined,,\n container: {\n background: 'brand'\n // pad: undefined,\n // extend: undefined,\n },\n size: {\n medium: baseSpacing + \"px\" // 24px\n },\n text: {\n size: {\n medium: 'small' // 14px\n }\n }\n },\n gap: 'small',\n size: {\n small: {\n border: {\n radius: baseSpacing * 0.75 + \"px\"\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth * 2 + \"px\" // 20px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n medium: {\n border: {\n radius: baseSpacing * 0.75 + \"px\" // 18px\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth + \"px\" // 22px\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n large: {\n border: {\n radius: baseSpacing + \"px\" // 24px\n },\n pad: {\n vertical: baseSpacing / 4 + borderWidth + \"px\",\n // 8px\n horizontal: baseSpacing + borderWidth * 4 + \"px\" // 32px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n }\n },\n border: {\n // color: { dark: undefined, light: undefined }\n width: borderWidth + \"px\",\n radius: baseSpacing * 0.75 + \"px\"\n },\n // color: { dark: undefined, light: undefined }\n // default: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // primary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // secondary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // option: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n active: {\n background: 'active-background',\n // border: undefined,\n color: 'active-text'\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n disabled: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n opacity: 0.3\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n // hover: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n // },\n padding: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n horizontal: baseSpacing - borderWidth + \"px\"\n },\n transition: {\n timing: 'ease-in-out',\n duration: 0.1,\n properties: ['color', 'background-color', 'border-color', 'box-shadow']\n },\n skeleton: {\n width: {\n min: '100px'\n }\n }\n },\n calendar: {\n // daySize must align with global.size\n small: {\n // title: {},\n fontSize: baseFontSize - fontScale + \"px\",\n lineHeight: 1.375,\n daySize: baseSpacing * 8 / 7 + \"px\",\n slideDuration: '0.2s'\n },\n medium: {\n // title: {},\n fontSize: baseFontSize + \"px\",\n lineHeight: 1.45,\n daySize: baseSpacing * 16 / 7 + \"px\",\n slideDuration: '0.5s'\n },\n large: {\n // title: {},\n fontSize: baseFontSize + 3 * fontScale + \"px\",\n lineHeight: 1.11,\n daySize: baseSpacing * 32 / 7 + \"px\",\n slideDuration: '0.8s'\n },\n icons: {\n previous: Previous,\n next: Next,\n small: {\n previous: FormPrevious,\n next: FormNext\n }\n },\n heading: {\n level: '4'\n } // level ranges from 1-6\n },\n card: {\n container: {\n round: 'small',\n elevation: 'small'\n // extend: undefined,\n },\n // hover: {\n // container: {\n // elevation: undefined,\n // },\n // },\n header: {},\n body: {},\n footer: {}\n },\n cards: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n }\n },\n carousel: {\n icons: {\n current: Subtract,\n next: Next,\n previous: Previous\n // color: { dark: undefined, light: undefined },\n },\n animation: {\n duration: 1000\n },\n disabled: {\n icons: {\n // color: { dark: undefined, light: undefined },\n }\n }\n },\n chart: {\n color: 'graph-0'\n // extend: undefined,\n },\n checkBox: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n // extend: undefined,\n radius: '4px',\n thickness: '4px'\n },\n label: {\n align: 'center'\n },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n // gap: undefined\n hover: {\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n // background: undefined,\n // extend: undefined,\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // checked: undefined,\n // indeterminate: undefined,\n },\n // pad: undefined,\n size: baseSpacing + \"px\",\n toggle: {\n // background: undefined\n color: {\n dark: '#d9d9d9',\n light: '#d9d9d9'\n },\n knob: {\n // extend: undefined,\n },\n radius: baseSpacing + \"px\",\n size: baseSpacing * 2 + \"px\"\n // extend: undefined,\n }\n },\n checkBoxGroup: {\n // container: {\n // // any box props\n // extend: undefined,\n // },\n },\n clock: {\n analog: {\n // extend: undefined,\n hour: {\n color: {\n dark: 'light-2',\n light: 'dark-3'\n },\n width: baseSpacing / 3 + \"px\",\n size: baseSpacing + \"px\",\n shape: 'round'\n },\n minute: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n width: baseSpacing / 6 + \"px\",\n size: Math.round(baseSpacing / 2) + \"px\",\n shape: 'round'\n },\n second: {\n color: {\n dark: 'accent-1',\n light: 'accent-1'\n },\n width: baseSpacing / 8 + \"px\",\n size: Math.round(baseSpacing / 2.666) + \"px\",\n shape: 'round'\n },\n size: {\n xsmall: baseSpacing * 2 + \"px\",\n small: baseSpacing * 3 + \"px\",\n medium: baseSpacing * 4 + \"px\",\n large: baseSpacing * 6 + \"px\",\n xlarge: baseSpacing * 9 + \"px\",\n xxlarge: baseSpacing * 12 + \"px\",\n huge: baseSpacing * 12 + \"px\" // kept for backwards compatibility\n }\n },\n digital: {\n text: {\n xsmall: {\n size: baseFontSize - 2 * fontScale + \"px\",\n height: 1.5\n },\n small: {\n size: baseFontSize - fontScale + \"px\",\n height: 1.43\n },\n medium: {\n size: baseFontSize + \"px\",\n height: 1.375\n },\n large: {\n size: baseFontSize + fontScale + \"px\",\n height: 1.167\n },\n xlarge: {\n size: baseFontSize + 2 * fontScale + \"px\",\n height: 1.1875\n },\n xxlarge: {\n size: baseFontSize + 4 * fontScale + \"px\",\n height: 1.125\n }\n }\n }\n },\n collapsible: {\n minSpeed: 200,\n baseline: 500\n },\n data: {\n // button: {\n // kind: undefined,\n // },\n },\n dateInput: {\n container: {\n round: 'xxsmall'\n }\n // icon: {\n // size: undefined,\n // },\n },\n dataTable: {\n // body: {\n // extend: undefined,\n // },\n pinned: {\n // body: {\n // background: undefined,\n // extend: undefined,\n // },\n header: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n },\n footer: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n }\n },\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n groupHeader: {\n // background: undefined,\n // border: undefined,\n // pad: undefined,\n },\n groupEnd: {\n border: {\n side: 'bottom',\n size: 'xsmall'\n }\n },\n header: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // font: {\n // weight: undefined,\n // size: undefined,\n // },\n gap: 'small',\n // hover: {\n // background: undefined,\n // },\n // pad: undefined,\n units: {\n color: 'text-xweak',\n margin: {\n left: 'xsmall'\n },\n alignSelf: 'end'\n }\n },\n icons: {\n ascending: FormDown,\n contract: FormUp,\n descending: FormUp,\n expand: FormDown\n // sortable: undefined,\n },\n primary: {\n weight: 'bold'\n },\n resize: {\n border: {\n color: 'border',\n side: 'end'\n }\n // hover: {\n // border: {\n // color: undefined,\n // side: undefined,\n // size: undefined,\n // },\n // },\n }\n },\n diagram: {\n // extend: undefined,\n line: {\n color: 'graph-0'\n }\n },\n // drop: {\n // extend: undefined,\n // maxHeight: undefined,\n // },\n fileInput: {\n // background: {},\n border: {\n // color: undefined,\n side: 'all',\n size: 'small',\n style: 'dashed'\n },\n dragOver: {\n border: {\n color: 'control'\n }\n // extend: undefined,\n },\n hover: {\n border: {\n color: 'brand'\n }\n // extend: undefined,\n },\n icons: {\n remove: FormClose\n },\n // pad: {},\n label: {\n margin: 'small'\n // extend: undefined,\n },\n message: {\n margin: 'small'\n // extend: undefined,\n }\n // extend: undefined,\n },\n formField: {\n border: {\n color: 'border',\n error: {\n color: {\n dark: 'white',\n light: 'status-critical'\n }\n },\n position: 'inner',\n side: 'bottom'\n },\n // checkBox: {\n // pad: undefined,\n // },\n content: {\n // margin: undefined,\n pad: 'small'\n },\n disabled: {\n background: {\n color: 'status-disabled',\n opacity: 'medium'\n }\n // border: {\n // color: undefined,\n // },\n // label: {\n // color: undefined,\n // },\n },\n // focus: {\n // background: {\n // color: undefined,\n // },\n // border: {\n // color: undefined,\n // },\n // },\n error: {\n color: 'status-critical',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // background: undefined,\n // container: {}, // any Box props\n // icon: undefined,\n },\n // extend: undefined,\n help: {\n color: 'dark-3',\n margin: {\n start: 'small'\n }\n },\n info: {\n color: 'text-xweak',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // container: {}, // any Box props\n // icon: undefined,\n },\n label: {\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // requiredIndicator: undefined,\n },\n margin: {\n bottom: 'small'\n },\n // round: undefined,\n survey: {\n label: {\n margin: {\n bottom: 'xsmall'\n },\n size: 'medium',\n weight: 400\n }\n }\n },\n grommet: {\n // extend: undefined\n },\n header: {\n sticky: {\n zIndex: '20'\n }\n },\n heading: {\n // color: undefined,\n font: {\n // family: undefined\n },\n level: {\n 1: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(4)),\n medium: _extends({}, fontSizing(8)),\n large: _extends({}, fontSizing(16)),\n xlarge: _extends({}, fontSizing(24))\n },\n 2: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(2)),\n medium: _extends({}, fontSizing(4)),\n large: _extends({}, fontSizing(8)),\n xlarge: _extends({}, fontSizing(12))\n },\n 3: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(1)),\n medium: _extends({}, fontSizing(2)),\n large: _extends({}, fontSizing(4)),\n xlarge: _extends({}, fontSizing(6))\n },\n 4: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(0)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(0)),\n xlarge: _extends({}, fontSizing(0))\n },\n 5: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-0.5)),\n medium: _extends({}, fontSizing(-0.5)),\n large: _extends({}, fontSizing(-0.5)),\n xlarge: _extends({}, fontSizing(-0.5))\n },\n 6: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(-1)),\n large: _extends({}, fontSizing(-1)),\n xlarge: _extends({}, fontSizing(-1))\n }\n },\n responsiveBreakpoint: 'small',\n // when we scale the font size down\n weight: 600,\n skeleton: {\n width: {\n min: '150px',\n max: '200px'\n }\n }\n },\n layer: {\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '4px'\n // intelligentRounding: undefined,\n },\n container: {\n // elevation: undefined,\n zIndex: '20'\n },\n // extend: undefined,\n overlay: {\n background: 'rgba(0, 0, 0, 0.5)'\n // backdropFilter: undefined,\n },\n responsiveBreakpoint: 'small',\n // when Layer takes over the full screen\n zIndex: '20'\n },\n list: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n item: {\n // background: undefined,\n border: 'horizontal',\n disabled: {\n color: 'status-disabled',\n cursor: 'default'\n },\n pinned: {\n background: 'background-contrast',\n icon: {\n size: 'medium',\n pad: 'small'\n }\n },\n pad: {\n horizontal: 'medium',\n vertical: 'small'\n }\n // extend: undefined,\n },\n primaryKey: {\n // any text props\n weight: 'bold'\n },\n icons: {\n down: FormDown,\n up: FormUp,\n pin: FormPin\n }\n // extend: undefined,\n },\n maskedInput: {\n // container: {\n // extend: undefined,\n // },\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n menu: {\n // background: undefined,\n // item: undefined,\n // extend: undefined,\n drop: {\n align: {\n top: 'top',\n left: 'left'\n }\n // any drop props\n },\n group: {\n container: {\n pad: {\n vertical: 'xsmall'\n }\n },\n separator: {\n color: 'border',\n size: 'xsmall',\n pad: {\n horizontal: 'small'\n }\n }\n },\n icons: {\n down: FormDown\n // up: undefined,\n // color: { dark: undefined, light: undefined },\n }\n },\n meter: {\n color: 'graph-0'\n // colors: [] || colors: ['graph-0', 'graph-1', 'graph-2', 'graph-3'],\n // extend: undefined,\n },\n nameValueList: {\n gap: {\n column: 'large',\n row: 'small'\n },\n pair: {\n column: {\n gap: {\n column: 'large',\n row: 'medium'\n }\n }\n },\n name: {\n width: 'small'\n },\n value: {\n width: 'medium'\n }\n },\n nameValuePair: {\n column: {\n gap: 'xxsmall'\n },\n name: {\n // any text props\n color: 'text',\n weight: 'bold'\n },\n value: {\n // any text props\n color: 'text'\n }\n },\n notification: {\n actions: {\n // any anchor props\n },\n direction: 'column',\n container: {\n // any box props\n round: 'xsmall',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n background: {\n color: 'background-front'\n }\n },\n global: {\n direction: 'row',\n container: {\n // any box props\n round: 'none',\n pad: {\n horizontal: 'large',\n vertical: 'xsmall'\n }\n }\n },\n toast: {\n // direction: undefined,\n container: {\n // any box props\n elevation: 'medium',\n width: 'medium'\n },\n layer: {\n position: 'top',\n margin: 'medium'\n },\n time: 8000\n },\n iconContainer: {\n // any box props\n pad: {\n right: 'small'\n },\n flex: false\n },\n textContainer: {\n // any box props\n gap: 'medium'\n },\n title: {\n // any text props\n weight: 'bold'\n },\n message: {\n // any text props\n margin: 'none'\n },\n close: {\n icon: FormClose\n },\n critical: {\n icon: StatusCriticalSmall,\n background: {\n color: 'status-critical',\n opacity: 'weak'\n },\n color: 'status-critical',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n warning: {\n icon: StatusWarningSmall,\n background: {\n color: 'status-warning',\n opacity: 'weak'\n },\n color: 'status-warning',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n normal: {\n icon: StatusGoodSmall,\n background: {\n color: 'status-ok',\n opacity: 'weak'\n },\n color: 'status-ok',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n info: {\n icon: CircleInformation,\n background: 'background-contrast',\n color: 'text-strong',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n unknown: {\n icon: StatusUnknownSmall,\n background: {\n color: 'status-unknown',\n opacity: 'weak'\n },\n color: 'status-unknown',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n // deprecate \"undefined\" in v3\n // and if undefined, no icon\n undefined: {\n icon: StatusUnknownSmall,\n // background: undefined,\n color: 'status-unknown'\n // global: {},\n // toast: {},\n }\n },\n page: {\n wide: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'xxlarge'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n narrow: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'large'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n full: {\n alignSelf: 'start',\n width: {\n min: 'medium',\n max: '100%'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n }\n },\n pageHeader: {\n actions: {\n // any box props\n align: 'end'\n },\n pad: {\n top: 'large',\n bottom: 'medium'\n },\n parent: {\n // any box props\n align: 'start'\n },\n responsive: {\n actions: {\n // any box props\n align: 'start',\n pad: {\n top: 'small'\n }\n },\n areas: [['parent'], ['title'], ['subtitle'], ['actions']],\n breakpoints: ['small'],\n columns: ['auto'],\n rows: ['auto']\n // gap: undefined,\n },\n subtitle: {\n // any paragraph props\n margin: 'none'\n },\n title: {\n // any heading props\n margin: 'none',\n fill: true\n },\n size: {\n small: {\n pad: {\n top: 'medium',\n bottom: 'small'\n },\n subtitle: {\n size: 'small'\n },\n title: {\n size: 'small'\n }\n },\n // medium: {\n // // pad: undefined,\n // // subtitle: {},\n // // title: {},\n // },\n large: {\n pad: {\n top: 'xlarge',\n bottom: 'large'\n },\n subtitle: {\n size: 'large'\n },\n title: {\n size: 'large'\n }\n }\n },\n small: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['small', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n },\n medium: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'medium'\n }\n },\n large: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n }\n },\n pagination: {\n button: {\n active: {\n background: {\n color: 'active-background'\n }\n },\n color: 'text-strong',\n hover: {\n background: {\n color: 'background-contrast'\n },\n color: undefined\n },\n size: {\n small: {\n border: {\n radius: baseSpacing / 8 + \"px\",\n // 3\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(-1)),\n height: baseSpacing * 1.25 + \"px\",\n width: baseSpacing * 1.25 + \"px\"\n },\n medium: {\n border: {\n radius: baseSpacing / 6 + \"px\",\n // 4\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(0)),\n height: baseSpacing * 1.5 + \"px\",\n width: baseSpacing * 1.5 + \"px\"\n },\n large: {\n border: {\n radius: baseSpacing / 4 + \"px\",\n // 6\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(1)),\n height: baseSpacing * 2 + \"px\",\n width: baseSpacing * 2 + \"px\"\n }\n }\n },\n // container: {\n // // any box props,\n // extend: undefined,\n // },\n controls: {\n align: 'center',\n direction: 'row',\n gap: 'xxsmall',\n margin: 'none',\n pad: 'none'\n },\n icons: {\n // color: undefined,\n next: Next,\n previous: Previous\n }\n },\n paragraph: {\n font: {\n // family: undefined\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(1)),\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4))\n },\n thumbsRating: {\n // dislike: {\n // color: undefined,\n // },\n // like: {\n // color: undefined,\n // },\n },\n spinner: {\n container: {\n animation: 'rotateRight',\n color: 'brand',\n pad: 'small',\n round: 'full',\n size: 'small'\n },\n // icon: undefined\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n small: baseSpacing + \"px\",\n // default 24\n medium: baseSpacing * 2 + \"px\",\n large: baseSpacing * 3 + \"px\",\n xlarge: baseSpacing * 4 + \"px\"\n }\n },\n radioButton: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n // background: {\n // color: undefined,\n // },\n check: {\n radius: '100%'\n // background: {\n // color: undefined,\n // },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n },\n // color: undefined,\n hover: {\n // background: {\n // color: undefined,\n // },\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // circle: undefined,\n },\n gap: 'small',\n size: baseSpacing + \"px\",\n font: {\n // weight: undefined,\n },\n container: {\n // extend: undefined\n }\n },\n radioButtonGroup: {\n // container: {}, // any box props\n },\n rangeInput: {\n disabled: {\n opacity: 0.3\n // thumb: {\n // color: undefined,\n // },\n // track: {\n // color: undefined,\n // },\n },\n // extend: undefined\n track: {\n height: '4px',\n color: 'border'\n // opacity: undefined,\n // lower: {\n // color: 'undefined',\n // opacity: undefined,\n // },\n // upper: {\n // color: undefined,\n // opacity: undefined,\n // },\n // extend: undefined\n },\n thumb: {\n // color: { dark: undefined, light: undefined },\n // extend: undefined\n }\n // wheel: undefined\n },\n rangeSelector: {\n background: {\n invert: {\n color: 'light-4'\n }\n }\n // edge: {\n // type: undefined,\n // },\n },\n select: {\n // background: undefined,\n clear: {\n container: {\n pad: 'small',\n background: 'background-contrast'\n },\n // any box props\n text: {\n color: 'text-weak'\n } // any text props\n },\n container: {\n // extend: undefined,\n },\n control: {\n // extend: undefined,\n // open: undefined,\n },\n // emptySearchMessage: {\n // container: {}, // any box props\n // text: {}, // any text props\n // },\n icons: {\n // color: { dark: undefined, light: undefined },\n margin: {\n horizontal: 'small'\n },\n down: FormDown\n // up: undefined\n },\n options: {\n container: {\n align: 'start',\n pad: 'small'\n },\n text: {\n margin: 'none'\n }\n },\n // searchInput: undefined,\n step: 20\n },\n selectMultiple: {\n maxInline: 5\n },\n skeleton: {\n border: false,\n colors: {\n dark: ['background', 'background-front'],\n light: ['background', 'background-back']\n }\n },\n skipLinks: {\n position: 'top',\n container: {\n elevation: 'large',\n round: 'small',\n pad: 'medium'\n },\n label: {\n margin: {\n bottom: 'medium'\n },\n size: 'medium'\n }\n },\n starRating: {\n // color: undefined,\n },\n tab: {\n active: {\n color: 'text'\n // background: undefined,\n },\n // background: undefined,\n border: {\n side: 'bottom',\n size: 'small',\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n active: {\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n disabled: {\n // color: undefined,\n },\n hover: {\n color: {\n dark: 'white',\n light: 'black'\n }\n // extend: undefined,\n }\n },\n color: 'control',\n // disabled: {\n // color: undefined,\n // },\n // extend: undefined,\n hover: {\n // background: undefined,\n // extend: undefined,\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n margin: {\n vertical: 'xxsmall',\n horizontal: 'small'\n },\n pad: {\n bottom: 'xsmall'\n }\n },\n tabs: {\n // background: undefined,\n // extend: undefined,\n // gap: undefined,\n header: {\n // alignSelf: undefined,\n // background: undefined,\n // border: {\n // side: undefined,\n // size: undefined,\n // style: undefined,\n // color: undefined,\n // },\n // extend: undefined,\n },\n panel: {\n // extend: undefined,\n },\n step: {\n small: 1,\n medium: 3,\n large: 3\n }\n },\n table: {\n header: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'bottom'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n },\n body: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n // background: undefined,\n // border: undefined,\n // extend: undefined,\n },\n // row: {\n // hover: {\n // background: undefined,\n // color: undefined,\n // },\n // },\n footer: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'top'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n }\n },\n tag: {\n // background: undefined,\n border: true,\n round: 'large',\n // name: undefined,\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n remove: {\n margin: {\n right: 'xsmall'\n }\n },\n separator: ' : ',\n size: {\n xsmall: {\n pad: {\n horizontal: baseSpacing / 3 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n small: {\n pad: {\n horizontal: baseSpacing * 0.4 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n large: {\n pad: {\n horizontal: baseSpacing / 3 * 2 + \"px\",\n vertical: \"xsmall\"\n },\n icon: {\n size: baseSpacing * 1.25 + \"px\"\n }\n },\n xlarge: {\n pad: {\n horizontal: baseSpacing * 0.75 + \"px\",\n vertical: 'xsmall'\n },\n icon: {\n size: baseSpacing * 1.5 + \"px\"\n }\n }\n },\n value: {\n weight: 600\n },\n icons: {\n remove: FormClose\n }\n },\n text: {\n font: {\n // family: undefined\n },\n xsmall: _extends({}, fontSizing(-1.5)),\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n // 18px\n large: _extends({}, fontSizing(1)),\n // 22px\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4)),\n '2xl': _extends({}, fontSizing(4)),\n '3xl': _extends({}, fontSizing(6)),\n '4xl': _extends({}, fontSizing(9)),\n '5xl': _extends({}, fontSizing(13)),\n '6xl': _extends({}, fontSizing(18)),\n skeleton: {\n width: {\n width: '100px',\n min: '100px'\n },\n margin: {\n vertical: 'xsmall'\n },\n colors: {\n dark: ['border', 'border'],\n light: ['background-front', 'background-back']\n }\n }\n },\n textArea: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n textInput: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n tip: {\n content: {\n // any Box props\n background: 'background-contrast',\n elevation: 'small',\n margin: 'xsmall',\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n },\n round: 'small'\n },\n drop: {\n // any props for the drop\n align: {\n top: 'bottom'\n },\n // most common use case is Header with Buttons\n background: 'none',\n elevation: 'none',\n margin: 'none'\n }\n },\n video: {\n captions: {\n background: 'rgba(0, 0, 0, 0.7)'\n },\n // controls: { background: undefined },\n icons: {\n closedCaption: ClosedCaption,\n configure: Actions,\n fullScreen: Expand,\n pause: Pause,\n play: Play,\n reduceVolume: VolumeLow,\n volume: Volume,\n description: AssistListening\n // color: { dark: undefined, light: undefined },\n },\n scrubber: {\n color: 'light-4',\n interval: 10\n // track: { color: undefined }\n }\n },\n worldMap: {\n color: 'light-3',\n continent: {\n active: '8px',\n base: '6px'\n },\n hover: {\n color: 'light-4'\n },\n place: {\n active: '20px',\n base: '8px'\n }\n }\n });\n return deepFreeze(result);\n};\nexport var base = generate(24);","export var findScrollParent = function findScrollParent(element, horizontal) {\n var result;\n if (element) {\n var parent = element.parentNode;\n while (!result && parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result = parent;\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result = parent;\n }\n parent = parent.parentNode;\n }\n // last scrollable element will be the document\n // if nothing else is scrollable in the page\n if (!result) {\n result = document;\n } else if (result.tagName.toLowerCase() === 'body') {\n result = document;\n }\n }\n return result;\n};\nvar documentTags = ['html', 'body'];\nexport var findScrollParents = function findScrollParents(element, horizontal) {\n var result = [];\n if (element) {\n var parent = element.parentNode;\n while (parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result.push(parent);\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result.push(parent);\n }\n parent = parent.parentNode;\n }\n if (result.length && documentTags.includes(result[0].tagName.toLowerCase())) {\n result.length = 0;\n }\n // last scrollable element will be the document\n result.push(document);\n }\n return result;\n};\nexport var containsFocus = function containsFocus(node) {\n var root = node.getRootNode();\n var element = root.activeElement;\n while (element) {\n if (element === node) break;\n element = element.parentElement;\n }\n return !!element;\n};\nexport var withinDropPortal = function withinDropPortal(node, portalContext) {\n var root = node == null ? void 0 : node.getRootNode();\n var element = node;\n var portalId;\n while (element && element !== root) {\n if (element.hasAttribute('data-g-portal-id')) {\n portalId = element.getAttribute('data-g-portal-id');\n element = root;\n } else {\n element = element.parentElement;\n }\n }\n // if portalContext doesn't contain the portalId then the\n // portal is new and node is within a drop that just opened\n if (portalId === undefined || portalContext.indexOf(parseInt(portalId, 10)) !== -1) return false;\n return true;\n};\n\n// Check if the element.tagName is an input, select or textarea\nexport var isFocusable = function isFocusable(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea';\n};\n\n// Get the first element that can receive focus\nexport var getFirstFocusableDescendant = function getFirstFocusableDescendant(element) {\n var children = element.getElementsByTagName('*');\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isFocusable(child)) {\n return child;\n }\n }\n return undefined;\n};\nexport var shouldKeepFocus = function shouldKeepFocus(root) {\n var element = root.activeElement;\n if (isFocusable(element)) return true;\n return !!getFirstFocusableDescendant(element);\n};\nexport var getNewContainer = function getNewContainer(target, targetChildPosition) {\n if (target === void 0) {\n target = document.body;\n }\n // setup DOM\n var container = document.createElement('div');\n if (targetChildPosition === 'first') {\n // for SkipLinks\n target.prepend(container);\n } else {\n target.appendChild(container);\n }\n return container;\n};\nexport var setFocusWithoutScroll = function setFocusWithoutScroll(element) {\n var x = window.scrollX;\n var y = window.scrollY;\n element.focus();\n window.scrollTo(x, y);\n};\nvar TABINDEX = 'tabindex';\nvar TABINDEX_STATE = 'data-g-tabindex';\nexport var makeNodeFocusable = function makeNodeFocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.removeAttribute('aria-hidden');\n // allow children to receive focus again\n var elements = node.getElementsByTagName('*');\n // only reset elements we've changed in makeNodeUnfocusable()\n Array.prototype.filter.call(elements || [], function (element) {\n return element.hasAttribute(TABINDEX_STATE);\n }).forEach(function (element) {\n var prior = element.getAttribute(TABINDEX_STATE);\n if (prior >= 0) {\n element.setAttribute(TABINDEX, element.getAttribute(TABINDEX_STATE));\n } else if (prior === 'none') {\n element.removeAttribute(TABINDEX);\n }\n element.removeAttribute(TABINDEX_STATE);\n });\n }\n};\nvar autoFocusingTags = /(a|area|input|select|textarea|button|iframe)$/;\nexport var makeNodeUnfocusable = function makeNodeUnfocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.setAttribute('aria-hidden', true);\n // prevent children to receive focus\n var elements = node.getElementsByTagName('*');\n // first, save off the tabIndex of any element with one\n Array.prototype.filter.call(elements || [], function (element) {\n return element.getAttribute(TABINDEX) !== null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, element.getAttribute(TABINDEX));\n element.setAttribute(TABINDEX, -1);\n });\n // then, if any element is inherently focusable and not handled above,\n // give it a tabIndex of -1 so it can't receive focus\n Array.prototype.filter.call(elements || [], function (element) {\n var currentTag = element.tagName.toLowerCase();\n return currentTag.match(autoFocusingTags) && element.focus && element.getAttribute(TABINDEX_STATE) === null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, 'none');\n element.setAttribute(TABINDEX, -1);\n });\n }\n};\nexport var findVisibleParent = function findVisibleParent(element) {\n if (element) {\n // Get the closest ancestor element that is positioned.\n return element.offsetParent ? element : findVisibleParent(element.parentElement) || element;\n }\n return undefined;\n};\nexport var isNodeAfterScroll = function isNodeAfterScroll(node, target) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n bottom = _node$getBoundingClie.bottom;\n // target will be the document from findScrollParent()\n var _ref = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n height: 0,\n top: 0\n },\n height = _ref.height,\n top = _ref.top;\n return bottom >= top + height;\n};\nexport var isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {\n var _node$getBoundingClie2 = node.getBoundingClientRect(),\n top = _node$getBoundingClie2.top;\n // target will be the document from findScrollParent()\n var _ref2 = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n top: 0\n },\n targetTop = _ref2.top;\n return top <= targetTop;\n};\nexport var findButtonParent = function findButtonParent(element) {\n if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return findButtonParent(element.parentElement);\n return element;\n};","import React from 'react';\nexport var PortalContext = /*#__PURE__*/React.createContext([]);","import { css, keyframes } from 'styled-components';\nvar PULSE_SIZES = {\n xsmall: 1.001,\n small: 1.01,\n medium: 1.1,\n large: 1.5,\n xlarge: 2\n};\nvar SLIDE_SIZES = {\n xsmall: 1,\n small: 5,\n medium: 10,\n large: 50,\n xlarge: 200\n};\nvar JIGGLE_SIZES = {\n xsmall: 0.1,\n small: 1,\n medium: 5,\n large: 400,\n xlarge: 1000\n};\nvar ZOOM_SIZES = {\n xsmall: 0.001,\n small: 0.01,\n medium: 0.05,\n large: 0.1,\n xlarge: 0.5\n};\nexport var animationBounds = function animationBounds(type, size) {\n if (size === void 0) {\n size = 'medium';\n }\n if (type === 'draw') {\n return ['', \"stroke-dashoffset: 0\"];\n }\n if (type === 'fadeIn') {\n return ['opacity: 0;', 'opacity: 1;'];\n }\n if (type === 'fadeOut') {\n return ['opacity: 1;', 'opacity: 0;'];\n }\n if (type === 'jiggle') {\n var deg = JIGGLE_SIZES[size];\n return [\"transform: rotate(-\" + deg + \"deg);\", \"transform: rotate(\" + deg + \"deg);\"];\n }\n if (type === 'pulse') {\n return ['transform: scale(1);', \"transform: scale(\" + PULSE_SIZES[size] + \")\"];\n }\n if (type === 'rotateRight') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(359deg);\"];\n }\n if (type === 'rotateLeft') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(-359deg);\"];\n }\n if (type === 'flipIn') {\n return ['transform: rotateY(90deg);', 'transform: rotateY(0);'];\n }\n if (type === 'flipOut') {\n return ['transform: rotateY(0);', 'transform: rotateY(90deg);'];\n }\n if (type === 'slideDown') {\n return [\"transform: translateY(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideLeft') {\n return [\"transform: translateX(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideRight') {\n return [\"transform: translateX(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideUp') {\n return [\"transform: translateY(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'zoomIn') {\n return [\"transform: scale(\" + (1 - ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n if (type === 'zoomOut') {\n return [\"transform: scale(\" + (1 + ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n return [];\n};\nexport var normalizeTiming = function normalizeTiming(time, defaultTiming) {\n return typeof time === 'number' ? time / 1000.0 + \"s\" : time || defaultTiming;\n};\nexport var animationEnding = function animationEnding(type) {\n if (type === 'draw') {\n return 'linear forwards';\n }\n if (type === 'jiggle') {\n return 'alternate infinite';\n }\n if (type === 'pulse') {\n return 'alternate infinite';\n }\n if (type === 'rotateRight' || type === 'rotateLeft') {\n return 'infinite linear';\n }\n return 'forwards';\n};\nexport var animationObjectStyle = function animationObjectStyle(animation, theme, themeObj) {\n var bounds = animationBounds(animation.type, animation.size);\n var animationTheme = themeObj && themeObj.animation || theme.global.animation;\n if (bounds) {\n var animationTransition = css([\"from{\", \";}to{\", \";}\"], bounds[0], bounds[1]);\n var defaultDuration = function defaultDuration() {\n return normalizeTiming(animationTheme[animation.type] ? animationTheme[animation.type].duration : animation.duration, animationTheme.duration);\n };\n return css([\"\", \" \", \" \", \" \", \"\"], keyframes([\"\", \"\"], animationTransition), normalizeTiming(animation.duration, defaultDuration()), normalizeTiming(animation.delay, '0s'), animationEnding(animation.type));\n }\n return '';\n};","import { css } from 'styled-components';\nimport { colorIsDark, getRGBA, normalizeColor, canExtractRGBArray, getRGBArray } from './colors';\n\n// evalStyle() converts a styled-components item into a string\nvar evalStyle = function evalStyle(arg, theme) {\n if (arg && Array.isArray(arg) && typeof arg[0] === 'function') {\n return arg[0]({\n theme: theme\n });\n }\n return arg;\n};\nexport var normalizeBackground = function normalizeBackground(backgroundArg, theme) {\n var _theme$global$backgro;\n var background = ((_theme$global$backgro = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro[backgroundArg]) || backgroundArg;\n var result = background;\n // If the background has a light or dark object, use that\n if (background) {\n if (theme.dark && background.dark && typeof background.dark !== 'boolean') {\n result = background.dark;\n } else if (!theme.dark && background.light && typeof background.light !== 'boolean') {\n result = background.light;\n }\n result = evalStyle(result, theme);\n }\n return result;\n};\nvar normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg, theme) {\n var _theme$global$backgro2;\n var background = backgroundArg.color || backgroundArg;\n var result = normalizeColor(\n // Background color may be defined by theme.global.backgrounds or\n // theme.global.colors.\n ((_theme$global$backgro2 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro2[background]) || background, theme, backgroundArg.dark);\n return result;\n};\nvar normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {\n var result;\n if (background.image) {\n var _theme$global$backgro3, _theme$global$backgro4;\n result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null || (_theme$global$backgro3 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro3.dark : (_theme$global$backgro4 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro4[background.image], theme) || background.image;\n } else {\n var _theme$global$backgro5;\n var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);\n result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;\n }\n return result;\n};\nvar rotateBackground = function rotateBackground(background, theme) {\n var backgroundImage = normalizeBackgroundImage(background, theme);\n var result = backgroundImage;\n if (backgroundImage.lastIndexOf('linear-gradient', 0) === 0) {\n var regex = /\\d{1,}deg\\b,/gm; // Contains rotation specified in degrees. Only targets 'deg' string with a trailing comma. Do not match 'deg' string for hsl, etc..\n result = backgroundImage.lastIndexOf('deg,') >= 0 ? backgroundImage.replace(regex, background.rotate + \"deg,\") : backgroundImage.replace('linear-gradient(', \"linear-gradient(\" + background.rotate + \"deg, \");\n } else {\n console.warn( // eslint-disable-next-line max-len\n \"'background.rotate' property only supports 'background.image' containing a linear-gradient string.\");\n }\n return result;\n};\nexport var backgroundIsDark = function backgroundIsDark(backgroundArg, theme) {\n var background = normalizeBackground(backgroundArg, theme);\n var result;\n if (background) {\n if (typeof background === 'object') {\n var color = background.color,\n dark = background.dark,\n opacity = background.opacity;\n if (typeof dark === 'boolean') {\n result = dark;\n } else if (color && (\n // weak opacity means we keep the existing darkness\n !opacity || opacity !== 'weak')) {\n var backgroundColor = normalizeColor(background.color, theme);\n if (backgroundColor) {\n result = colorIsDark(backgroundColor);\n }\n }\n } else {\n var _color = normalizeColor(background, theme);\n if (_color) {\n result = colorIsDark(_color);\n }\n }\n }\n return result;\n};\nvar darkContext = function darkContext(backgroundColor) {\n var isDark = colorIsDark(backgroundColor);\n if (isDark === undefined) return undefined;\n return isDark ? 'dark' : 'light';\n};\n\n// Returns an array of two CSS colors: [background, color]\n// Either could be undefined.\n// background could be a CSS gradient, like \"linear-gradient(...)\"\nexport var backgroundAndTextColors = function backgroundAndTextColors(backgroundArg, textArg, theme) {\n if (!backgroundArg) return [undefined, textArg];\n var global = theme.global;\n var background = normalizeBackground(backgroundArg, theme);\n var text = textArg || global.colors.text;\n var backgroundColor;\n var textColor;\n if (typeof background === 'object') {\n if (background.dark === false) {\n textColor = text.light || text;\n } else if (background.dark) {\n textColor = text.dark || text;\n }\n if (background.color) {\n var color = normalizeBackgroundColor(background, theme);\n var opacity = background.opacity === true ? global.opacity.medium : global.opacity[background.opacity] || background.opacity;\n backgroundColor = getRGBA(color, opacity) || color;\n\n // If we don't have a textColor already, and we aren't too translucent,\n // set the textColor to have the best contrast against the background\n // color.\n if (!textColor && (opacity === undefined || opacity > 0.3)) {\n var shade = darkContext(backgroundColor, theme);\n textColor = normalizeColor(shade && text[shade] || text, theme);\n }\n }\n } else {\n backgroundColor = normalizeBackgroundColor(background, theme);\n var _shade = darkContext(backgroundColor, theme);\n var transparent;\n if (backgroundColor && canExtractRGBArray(backgroundColor)) {\n var colorArray = getRGBArray(backgroundColor);\n // check if the alpha value is less than 0.5\n if (colorArray[3] < 0.5) transparent = true;\n }\n if (_shade) {\n textColor = normalizeColor(text[_shade] || text, theme, _shade === 'dark');\n } else if (transparent && text) {\n textColor = normalizeColor(text, theme);\n } else {\n // If we can't determine the shade, we assume this isn't a simple color.\n // It could be a gradient. backgroundStyle() will take care of that case.\n if (backgroundColor !== 'transparent') backgroundColor = undefined;\n if (text) textColor = normalizeColor(text, theme);\n }\n }\n // if textArg is false, we don't want the textColor, used for Button hover\n if (textArg === false) textColor = undefined;\n return [backgroundColor, textColor];\n};\nexport var backgroundStyle = function backgroundStyle(backgroundArg, theme, textColorArg) {\n // for Grommet component, if the background isn't defined, don't set it\n if (backgroundArg === undefined) return undefined;\n var background = normalizeBackground(backgroundArg, theme);\n var _backgroundAndTextCol = backgroundAndTextColors(background, textColorArg, theme),\n backgroundColor = _backgroundAndTextCol[0],\n textColor = _backgroundAndTextCol[1];\n var backgroundImage = background.rotate ? rotateBackground(background, theme) : normalizeBackgroundImage(background, theme);\n var backgroundClipStyle = '';\n if (background.clip) {\n backgroundClipStyle = background.clip === 'text' ? \"-webkit-text-fill-color: transparent; \\n -webkit-background-clip: text; \\n background-clip: text;\" : \"background-clip: \" + background.clip + \";\";\n }\n if (typeof background === 'string' && background.lastIndexOf('url', 0) === 0) {\n return css([\"background:\", \" no-repeat center center;background-size:cover;\"], background);\n }\n if (backgroundImage) {\n var backgroundStyles = \"\\n \" + (backgroundColor ? \"background-color: \" + backgroundColor + \";\" : '') + \"\\n background-image: \" + backgroundImage + \";\\n background-repeat: \" + (typeof background === 'object' && background.repeat || 'no-repeat') + \";\\n background-position: \" + (background.position || 'center center') + \";\\n background-size: \" + (background.size || 'cover') + \";\\n \" + backgroundClipStyle + \"\\n \";\n\n // allow both background color and image, in case the image doesn't fill\n // when image and opacity are used together, we need to use pseudo :before\n // to ensure that only image and background color are affected by opacity\n // but not the container contents\n return css([\"\", \" \", \"\"], textColor ? \"color: \" + textColor + \";\" : '', !background.opacity ? backgroundStyles : \"position: relative;\\n z-index: 0;\\n &:before {\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n z-index: -1;\\n border-radius: inherit;\\n \" + backgroundStyles + \"\\n opacity: \" + (background.opacity === true ? theme.global.opacity.medium : theme.global.opacity[background.opacity] || background.opacity) + \";\\n }\");\n }\n if (backgroundColor) {\n return css([\"background-color:\", \";\", \"\"], backgroundColor, textColor ? \"color: \" + textColor + \";\" : '');\n }\n if (typeof background === 'string')\n // This case takes care of gradients\n // or theme colors that use CSS names like 'crimson' that we don't parse\n return css([\"background:\", \";\"], normalizeColor(background, theme));\n return undefined;\n};\nexport var activeStyle = css([\"\", \"\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.global.active.background, props.theme), props.theme, props.theme.global.active.color);\n});\nexport var selectedStyle = css([\"\", \"\"], function (props) {\n return backgroundStyle(normalizeColor(props.theme.global.selected.background, props.theme), props.theme, props.theme.global.selected.color);\n});\nexport var getHoverIndicatorStyle = function getHoverIndicatorStyle(hoverIndicator, theme) {\n var background;\n var elevation;\n if (hoverIndicator === true || hoverIndicator === 'background') {\n background = theme.global.hover.background;\n } else if (typeof hoverIndicator === 'object') {\n if (hoverIndicator.elevation || hoverIndicator.background) {\n elevation = hoverIndicator.elevation;\n background = hoverIndicator.background;\n } else background = hoverIndicator;\n } else {\n background = hoverIndicator;\n }\n return css([\"\", \" \", \"\"], backgroundStyle(background, theme, theme.global.hover.color), elevation && \"box-shadow: \" + theme.global.elevation[theme.dark ? 'dark' : 'light'][elevation] + \";\");\n};","import { css } from 'styled-components';\nimport { normalizeColor } from './colors';\nimport { breakpointStyle } from './mixins';\nexport var responsiveBorderStyle = function responsiveBorderStyle(data, theme) {\n var color = normalizeColor(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var breakpoint = theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n var value = breakpoint && (breakpoint.borderSize[borderSize] || borderSize) && style + \" \" + (breakpoint.borderSize[borderSize] || borderSize) + \" \" + color;\n if (!value) return undefined;\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') return \"border-\" + side + \": \" + value + \";\";\n if (side === 'end' || side === 'start') return \"border-inline-\" + side + \": \" + value + \";\";\n if (side === 'vertical') return \"\\n border-left: \" + value + \";\\n border-right: \" + value + \";\\n \";\n if (side === 'horizontal') return \"\\n border-top: \" + value + \";\\n border-bottom: \" + value + \";\\n \";\n if (side === 'between') return undefined; // no-op\n return \"border: \" + value + \";\";\n};\nexport var borderStyle = function borderStyle(borderData, responsive, theme) {\n var borderStyles = [];\n (Array.isArray(borderData) ? borderData : [borderData]).forEach(function (data) {\n var styles = [];\n var color = normalizeColor(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var value = style + \" \" + (theme.global.borderSize[borderSize] || borderSize) + \" \" + color;\n var responsiveStyle = responsive && responsiveBorderStyle(data, theme);\n var breakpoint = responsiveStyle && theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') {\n styles.push(\"border-\" + side + \": \" + value + \";\");\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'end' || side === 'start') {\n styles.push(css([\"border-inline-\", \":\", \";\"], side, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'vertical') {\n styles.push(css([\"border-left:\", \";border-right:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'horizontal') {\n styles.push(css([\"border-top:\", \";border-bottom:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n } else if (side === 'between') {\n // no-op\n } else {\n styles.push(css([\"border:\", \";\"], value));\n if (responsiveStyle) {\n styles.push(breakpointStyle(breakpoint, responsiveStyle));\n }\n }\n borderStyles.push(styles);\n });\n return borderStyles;\n};","// Returns the specific color that should be used according to the theme.\n// If 'dark' is supplied, it takes precedence over 'theme.dark'.\n// Can return undefined.\nexport var normalizeColor = function normalizeColor(color, theme, dark) {\n var colorSpec = theme.global && theme.global.colors[color] !== undefined ? theme.global.colors[color] : color;\n // If the color has a light or dark object, use that\n var result = colorSpec;\n if (colorSpec) {\n if ((dark === true || dark === undefined && theme.dark) && colorSpec.dark !== undefined) {\n result = colorSpec.dark;\n } else if ((dark === false || !theme.dark) && colorSpec.light !== undefined) {\n result = colorSpec.light;\n }\n }\n // allow one level of indirection in color names\n if (result && theme.global && theme.global.colors[result] !== undefined) {\n result = normalizeColor(result, theme, dark);\n }\n return result;\n};\nvar parseHexToRGB = function parseHexToRGB(color) {\n return color.length < 7 // 7 is what's needed for '#RRGGBB'\n ? color.match(/[A-Za-z0-9]{1}/g).map(function (v) {\n return parseInt(\"\" + v + v, 16);\n }) :\n // https://stackoverflow.com/a/42429333\n color.match(/[A-Za-z0-9]{2}/g).map(function (v) {\n return parseInt(v, 16);\n });\n};\n\n// From: https://stackoverflow.com/a/9493060/8513067\n// Converts an HSL color value to RGB. Conversion formula\n// adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n// Assumes h, s, and l are contained in the set [0, 1] and\n// returns r, g, and b in the set [0, 255].\nvar hslToRGB = function hslToRGB(h, s, l) {\n var r;\n var g;\n var b;\n if (s === 0 || s === '0') {\n // achromatic\n r = l;\n g = l;\n b = l;\n } else {\n var hue2rgb = function hue2rgb(p, q, inT) {\n var t = inT;\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 0.16666667) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 0.66666667) return p + (q - p) * (0.66666667 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 0.33333333);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 0.33333333);\n }\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];\n};\n\n// allow for alpha: #RGB, #RGBA, #RRGGBB, or #RRGGBBAA\nvar hexExp = /^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/;\nvar rgbExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?\\)/;\nvar rgbaExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([.0-9]*)\\s?\\)/;\n// e.g. hsl(240, 60%, 50%)\nvar hslExp = /^hsla?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)%?\\s?,\\s?([0-9]*)%?\\s?.*?\\)/;\nexport var canExtractRGBArray = function canExtractRGBArray(color) {\n return hexExp.test(color) || rgbExp.test(color) || rgbaExp.test(color) || hslExp.test(color);\n};\nexport var getRGBArray = function getRGBArray(color) {\n if (hexExp.test(color)) {\n var _parseHexToRGB = parseHexToRGB(color),\n red = _parseHexToRGB[0],\n green = _parseHexToRGB[1],\n blue = _parseHexToRGB[2],\n alpha = _parseHexToRGB[3];\n return [red, green, blue, alpha !== undefined ? alpha / 255.0 : undefined];\n }\n var match = color.match(rgbExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseInt(v, 10);\n });\n }\n match = color.match(rgbaExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseFloat(v, 10);\n });\n }\n match = color.match(hslExp);\n if (match) {\n var _match$splice$map = match.splice(1).map(function (v) {\n return parseInt(v, 10);\n }),\n h = _match$splice$map[0],\n s = _match$splice$map[1],\n l = _match$splice$map[2];\n return hslToRGB(h / 360.0, s / 100.0, l / 100.0);\n }\n return color;\n};\nexport var colorIsDark = function colorIsDark(color) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray = getRGBArray(color),\n red = _getRGBArray[0],\n green = _getRGBArray[1],\n blue = _getRGBArray[2],\n alpha = _getRGBArray[3];\n // if there is an alpha and it's greater than 50%, we can't really tell\n if (alpha < 0.5) return undefined;\n var brightness = (299 * red + 587 * green + 114 * blue) / 1000;\n // From: http://www.had2know.com/technology/color-contrast-calculator-web-design.html\n // Above domain is no longer registered.\n return brightness < 125;\n }\n return undefined;\n};\nexport var getRGBA = function getRGBA(color, opacity) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray2 = getRGBArray(color),\n red = _getRGBArray2[0],\n green = _getRGBArray2[1],\n blue = _getRGBArray2[2],\n alpha = _getRGBArray2[3];\n var normalizedAlpha;\n if (opacity !== undefined) {\n normalizedAlpha = opacity;\n } else if (alpha !== undefined) {\n normalizedAlpha = alpha;\n } else {\n normalizedAlpha = 1;\n }\n return \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + normalizedAlpha + \")\";\n }\n return undefined;\n};","import PropTypes from 'prop-types';\nexport var a11yTitlePropType = PropTypes.string;\nexport var alignPropType = PropTypes.oneOfType([PropTypes.oneOf(['baseline', 'center', 'end', 'start', 'stretch']), PropTypes.string]);\nvar ANIMATION_TYPE = PropTypes.oneOf(['fadeIn', 'fadeOut', 'jiggle', 'pulse', 'rotateLeft', 'rotateRight', 'slideUp', 'slideDown', 'slideLeft', 'slideRight', 'zoomIn', 'zoomOut']);\nvar ANIMATION_SHAPE = PropTypes.shape({\n type: ANIMATION_TYPE,\n delay: PropTypes.number,\n duration: PropTypes.number,\n size: PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge'])\n});\nexport var animationPropType = PropTypes.oneOfType([ANIMATION_TYPE, ANIMATION_SHAPE, PropTypes.arrayOf(PropTypes.oneOfType([ANIMATION_TYPE, ANIMATION_SHAPE]))]);\nexport var colorPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n dark: PropTypes.string,\n light: PropTypes.string\n})]);\nexport var backgroundPropType = PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n clip: PropTypes.oneOfType([PropTypes.oneOf(['text']), PropTypes.string]),\n color: colorPropType,\n dark: PropTypes.oneOfType([PropTypes.bool, PropTypes.string]),\n image: PropTypes.string,\n position: PropTypes.string,\n opacity: PropTypes.oneOfType([PropTypes.string, PropTypes.bool, PropTypes.number, PropTypes.oneOf(['weak', 'medium', 'strong'])]),\n repeat: PropTypes.oneOfType([PropTypes.oneOf(['no-repeat', 'repeat']), PropTypes.string]),\n rotate: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),\n size: PropTypes.oneOfType([PropTypes.oneOf(['cover', 'contain']), PropTypes.string]),\n light: PropTypes.string\n})]);\nexport var backgroundDoc = backgroundPropType;\nexport var MARGIN_SIZES = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nexport var marginProp = PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(MARGIN_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(MARGIN_SIZES), PropTypes.string])\n}), PropTypes.string]);\nvar PAD_SIZES = ['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge'];\nexport var padPropType = PropTypes.oneOfType([PropTypes.oneOf(['none'].concat(PAD_SIZES)), PropTypes.shape({\n bottom: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n end: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n horizontal: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n left: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n right: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n start: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n top: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string]),\n vertical: PropTypes.oneOfType([PropTypes.oneOf(PAD_SIZES), PropTypes.string])\n}), PropTypes.string]);\nexport var genericProps = {\n a11yTitle: a11yTitlePropType,\n alignSelf: PropTypes.oneOf(['start', 'center', 'end', 'stretch', 'baseline']),\n gridArea: PropTypes.string,\n margin: marginProp\n};\nexport var elevationPropType = PropTypes.oneOfType([PropTypes.oneOf(['none', 'xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string]);\nexport var hoverIndicatorPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.string, PropTypes.oneOf(['background']), backgroundPropType, PropTypes.shape({\n background: backgroundPropType,\n elevation: elevationPropType\n})]);\nexport var pointPropType = PropTypes.oneOf(['circle', 'diamond', 'square', 'star', 'triangle', 'triangleDown']);\nexport var patternPropType = PropTypes.oneOf(['squares', 'circles', 'stripesHorizontal', 'stripesVertical', 'stripesDiagonalDown', 'stripesDiagonalUp']);\nexport var roundPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge', 'full']), PropTypes.string, PropTypes.shape({\n corner: PropTypes.oneOf(['top', 'left', 'bottom', 'right', 'top-left', 'top-right', 'bottom-left', 'bottom-right']),\n size: PropTypes.oneOfType([PropTypes.oneOf(['xsmall', 'small', 'medium', 'large', 'xlarge']), PropTypes.string])\n})]);\nexport var skeletonColorsPropType = PropTypes.shape({\n dark: PropTypes.arrayOf(PropTypes.string),\n light: PropTypes.arrayOf(PropTypes.string)\n});\nexport var skeletonPropType = PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({\n animation: animationPropType,\n colors: skeletonColorsPropType,\n depth: PropTypes.number,\n message: PropTypes.oneOfType([PropTypes.string, PropTypes.shape({\n start: PropTypes.string,\n end: PropTypes.string\n })])\n})]);\nvar dimSizeType = PropTypes.oneOf(['xxsmall', 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge']);\nexport var heightPropType = PropTypes.oneOfType([dimSizeType, PropTypes.string, PropTypes.shape({\n height: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n min: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n max: PropTypes.oneOfType([dimSizeType, PropTypes.string])\n})]);\nexport var widthPropType = PropTypes.oneOfType([dimSizeType, PropTypes.string, PropTypes.shape({\n width: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n min: PropTypes.oneOfType([dimSizeType, PropTypes.string]),\n max: PropTypes.oneOfType([dimSizeType, PropTypes.string])\n})]);\nexport var OVERFLOW_VALUES = ['auto', 'hidden', 'scroll', 'visible'];","import { cloneElement } from 'react';\nexport var useSizedIcon = function useSizedIcon(icon, size, theme) {\n var _theme$icon;\n return icon && theme != null && (_theme$icon = theme.icon) != null && _theme$icon.matchSize && !icon.props.size ? /*#__PURE__*/cloneElement(icon, {\n size: size\n }) : icon;\n};","import { css } from 'styled-components';\nexport var parseMetricToNum = function parseMetricToNum(metric) {\n if (typeof metric === 'number') return metric;\n if (metric.match(/\\s/) && process.env.NODE_ENV !== 'production') {\n console.warn(\"Invalid single measurement value: \\\"\" + metric + \"\\\"\");\n }\n return parseFloat(metric.match(/\\d+(\\.\\d+)?/), 10);\n};\nexport var edgeToNum = function edgeToNum(size, theme) {\n return size ? parseMetricToNum(theme.global.edgeSize[size] || size) : 0;\n};\nexport var fontSize = function fontSize(size, lineHeight) {\n return css([\"font-size:\", \";line-height:\", \";\"], function (props) {\n return parseMetricToNum(size) / parseMetricToNum(props.theme.global.font.size) * 1 + \"rem\";\n }, function (props) {\n return lineHeight || Math.ceil(parseMetricToNum(size) / parseMetricToNum(props.theme.global.lineHeight)) * (parseMetricToNum(props.theme.global.lineHeight) / parseMetricToNum(size)) + \"px\";\n });\n};\nexport var breakpointStyle = function breakpointStyle(breakpoint, content) {\n return css([\"@media only screen \", \"{\", \";}\"], breakpoint.value && \"and (max-width: \" + breakpoint.value + \"px)\", content);\n};\nexport var findAllByType = function findAllByType(component, type) {\n var matches = [];\n if (component.type === type) {\n matches.push(component);\n }\n if (component.children) {\n component.children.forEach(function (child) {\n matches = matches.concat(findAllByType(child, type));\n });\n }\n return matches;\n};\nexport var getAvailableAtBadge = function getAvailableAtBadge(availableAt, componentType) {\n return [{\n url: \"https://storybook.grommet.io/?selectedKind=\" + componentType + \"-\" + availableAt + \"&full=0&stories=1&panelRight=0\",\n badge: 'https://cdn-images-1.medium.com/fit/c/120/120/1*TD1P0HtIH9zF0UEH28zYtw.png',\n label: 'Storybook'\n }, {\n url: \"https://codesandbox.io/s/github/grommet/grommet-sandbox?initialpath=/\" + availableAt.toLowerCase() + \"&module=%2Fsrc%2F\" + availableAt + \".js\",\n badge: 'https://codesandbox.io/static/img/play-codesandbox.svg',\n label: 'CodeSandbox'\n }];\n};","function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nexport var isObject = function isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\nexport var deepFreeze = function deepFreeze(obj) {\n Object.keys(obj).forEach(function (key) {\n return key && isObject(obj[key]) && Object.freeze(obj[key]);\n });\n return Object.freeze(obj);\n};\nexport var deepMerge = function deepMerge(target) {\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n if (!sources.length) {\n return target;\n }\n // making sure to not change target (immutable)\n var output = _extends({}, target);\n sources.forEach(function (source) {\n if (isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (isObject(source[key])) {\n if (!output[key]) {\n output[key] = _extends({}, source[key]);\n } else {\n output[key] = deepMerge(output[key], source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\nexport var removeUndefined = function removeUndefined(obj) {\n var result = {};\n Object.keys(obj).forEach(function (key) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n });\n return result;\n};","var _excluded = [\"data\", \"page\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { useMemo, useState } from 'react';\nexport var normalizeShow = function normalizeShow(showProp, step) {\n var page;\n // by default, show refers to the index of an item,\n // but if using pagination, show can take the form of { page: # },\n // where page refers to the page # to show\n if (typeof showProp === 'number') page = Math.ceil((showProp + 1) / step);else if (typeof showProp === 'object' && 'page' in showProp) page = showProp.page;\n return page;\n};\nexport var usePagination = function usePagination(_ref) {\n var data = _ref.data,\n page = _ref.page,\n step = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var totalPages = data ? Math.ceil(data.length / step) : 0;\n var _useState = useState(Math.min(page, totalPages) || 1),\n activePage = _useState[0],\n setActivePage = _useState[1];\n\n // ensure activePage is never lower than 1 to ensure that itemsBeginIndex\n // and itemsEndIndex aren't negative\n if (activePage > totalPages && (data == null ? void 0 : data.length) > 0) setActivePage(Math.max(totalPages, 1));\n var itemsBeginIndex = step * (activePage - 1);\n var itemsEndIndex = itemsBeginIndex + step;\n var currentItems = useMemo(function () {\n if (Array.isArray(data)) return data.slice(itemsBeginIndex, itemsEndIndex);\n return [];\n }, [data, itemsBeginIndex, itemsEndIndex]);\n var paginationProps = _extends({\n numberItems: data && data.length,\n onChange: function onChange(event) {\n return setActivePage(event.page);\n },\n page: activePage,\n step: step\n }, rest);\n return [currentItems, paginationProps];\n};","import { css } from 'styled-components';\nimport { backgroundStyle } from './background';\nimport { normalizeColor } from './colors';\nexport var readOnlyStyle = function readOnlyStyle(theme) {\n var _theme$global$input$r, _theme$global$input$r2, _theme$global$input$r3;\n var styles = [];\n if (theme != null && (_theme$global$input$r = theme.global.input.readOnly) != null && (_theme$global$input$r = _theme$global$input$r.border) != null && _theme$global$input$r.color) styles.push(css([\"border-color:\", \";\"], normalizeColor(theme.global.input.readOnly.border.color, theme)));\n if (theme != null && (_theme$global$input$r2 = theme.global.input.readOnly) != null && _theme$global$input$r2.background) styles.push(backgroundStyle((_theme$global$input$r3 = theme.global.input.readOnly) == null ? void 0 : _theme$global$input$r3.background, theme));\n return styles;\n};","import { useImperativeHandle, useRef } from 'react';\nexport var useForwardedRef = function useForwardedRef(ref) {\n var innerRef = useRef(null);\n useImperativeHandle(ref, function () {\n return innerRef.current;\n }, [innerRef]);\n return innerRef;\n};","export var getBreakpoint = function getBreakpoint(viewportWidth, theme) {\n var sortedBreakpoints = Object.keys(theme.global.breakpoints).sort(function (a, b) {\n var first = theme.global.breakpoints[a];\n var second = theme.global.breakpoints[b];\n if (!first) return 1;\n if (!second) return -1;\n if (!first.value) return 1;\n if (!second.value) return -1;\n return first.value - second.value;\n });\n\n // the last breakpoint on the sorted array should have\n // no windowWidth boundaries\n var lastBreakpoint = sortedBreakpoints[sortedBreakpoints.length - 1];\n var result = sortedBreakpoints.find(function (name) {\n var breakpoint = theme.global.breakpoints[name];\n return !breakpoint.value || breakpoint.value >= viewportWidth ? name : false;\n });\n return result || lastBreakpoint;\n};\nexport var getDeviceBreakpoint = function getDeviceBreakpoint(type, theme) {\n return theme.global.deviceBreakpoints[type];\n};\nexport var getBreakpointStyle = function getBreakpointStyle(theme, breakpointSize) {\n var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};\n if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n if (!breakpoint.size) breakpoint.size = theme.global.size;\n return breakpoint;\n};\n\n// for checks that look for a small screen size, flag for xsmall\n// as well since we use xsmall in the hpe theme\nexport var isSmall = function isSmall(size) {\n return ['xsmall', 'small'].includes(size);\n};","import { css } from 'styled-components';\nimport { backgroundStyle } from './background';\nimport { normalizeColor } from './colors';\nimport { getBreakpointStyle } from './responsive';\nimport { breakpointStyle, parseMetricToNum } from './mixins';\nexport var baseStyle = css([\"font-family:\", \";font-size:\", \";line-height:\", \";font-weight:\", \";\", \" \", \" box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;\"], function (props) {\n return props.theme.global.font.family;\n}, function (props) {\n return props.theme.global.font.size;\n}, function (props) {\n return props.theme.global.font.height;\n}, function (props) {\n return props.theme.global.font.weight;\n}, function (props) {\n return props.theme.global.font.variant && \"\\n font-variant:\" + props.theme.global.font.variant + \";\\n \";\n}, function (props) {\n return !props.plain && backgroundStyle(props.theme.baseBackground, props.theme);\n});\nexport var controlBorderStyle = css([\"border:\", \" solid \", \";border-radius:\", \";\"], function (props) {\n return props.theme.global.control.border.width;\n}, function (props) {\n return normalizeColor(props.theme.global.control.border.color || 'border', props.theme);\n}, function (props) {\n return props.theme.global.control.border.radius;\n});\nexport var edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {\n var breakpoint = responsiveBreakpoint && theme.global.breakpoints[responsiveBreakpoint];\n if (typeof data === 'string') {\n return css([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[data] || data, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[data] || data) + \";\\n \") : '');\n }\n var result = [];\n var horizontal = data.horizontal,\n vertical = data.vertical,\n top = data.top,\n bottom = data.bottom,\n left = data.left,\n right = data.right;\n\n // if horizontal and vertical are equal OR all sides are equal,\n // we can just return a single css value such as padding: 12px\n // instead of breaking out by sides.\n var horizontalVerticalEqual = horizontal && vertical && horizontal === vertical;\n var allSidesEqual = top && bottom && left && right && top === bottom === left === right;\n if (horizontalVerticalEqual || allSidesEqual) {\n // since the values will be the same between vertical & horizontal OR\n // left, right, top, & bottom, we can just choose one\n var value = horizontalVerticalEqual ? horizontal : top;\n return css([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[value] || value, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[value] || value) + \";\\n \") : '');\n }\n if (horizontal) {\n result.push(css([\"\", \"-left:\", \";\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \") : ''));\n }\n if (vertical) {\n result.push(css([\"\", \"-top:\", \";\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \") : ''));\n }\n if (top) {\n result.push(css([\"\", \"-top:\", \";\", \";\"], kind, theme.global.edgeSize[top] || top, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[top] || top) + \";\\n \") : ''));\n }\n if (bottom) {\n result.push(css([\"\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[bottom] || bottom, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[bottom] || bottom) + \";\\n \") : ''));\n }\n if (left) {\n result.push(css([\"\", \"-left:\", \";\", \";\"], kind, theme.global.edgeSize[left] || left, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[left] || left) + \";\\n \") : ''));\n }\n if (right) {\n result.push(css([\"\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[right] || right, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[right] || right) + \";\\n \") : ''));\n }\n if (data.start) {\n result.push(css([\"\", \"-inline-start:\", \";\", \";\"], kind, theme.global.edgeSize[data.start] || data.start, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-inline-start: \" + (breakpoint.edgeSize[data.start] || data.start) + \";\\n \") : ''));\n }\n if (data.end) {\n result.push(css([\"\", \"-inline-end:\", \";\", \";\"], kind, theme.global.edgeSize[data.end] || data.end, responsive && breakpoint ? breakpointStyle(breakpoint, \"\\n \" + kind + \"-inline-end: \" + (breakpoint.edgeSize[data.end] || data.end) + \";\\n \") : ''));\n }\n return result;\n};\nexport var fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillProp === 'vertical') {\n return 'height: 100%;';\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return undefined;\n};\nvar focusStyles = function focusStyles(props, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n forceOutline = _ref.forceOutline,\n justBorder = _ref.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = normalizeColor('focus', props.theme);\n if (color) return \"outline: 2px solid \" + color + \";\";\n return ''; // native\n }\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n var _color = normalizeColor(focus.outline.color || 'focus', props.theme);\n var size = focus.outline.size || '2px';\n return \"\\n outline-offset: 0px;\\n outline: \" + size + \" solid \" + _color + \";\\n \";\n }\n return \"outline: \" + focus.outline + \";\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n var _color2 = normalizeColor(\n // If there is a focus.border.color, use that for shadow too.\n // This is for backwards compatibility in v2.\n focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);\n var _size = focus.shadow.size || '2px'; // backwards compatible default\n return \"\\n outline: none;\\n box-shadow: 0 0 \" + _size + \" \" + _size + \" \" + _color2 + \";\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: \" + focus.shadow + \";\\n \";\n }\n if (focus.border) {\n var _color3 = normalizeColor(focus.border.color || 'focus', props.theme);\n return \"\\n outline: none;\\n border-color: \" + _color3 + \";\\n \";\n }\n return ''; // defensive\n};\nvar unfocusStyles = function unfocusStyles(props, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n forceOutline = _ref2.forceOutline,\n justBorder = _ref2.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = normalizeColor('focus', props.theme);\n if (color) return \"outline: none;\";\n return ''; // native\n }\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n return \"\\n outline-offset: 0px;\\n outline: none;\\n \";\n }\n return \"outline: none;\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n if (focus.border) {\n return \"\\n outline: none;\\n border-color: none;\\n \";\n }\n return ''; // defensive\n};\n\n// focus also supports clickable elements inside svg\nexport var focusStyle = function focusStyle(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n forceOutline = _ref3.forceOutline,\n justBorder = _ref3.justBorder,\n skipSvgChildren = _ref3.skipSvgChildren;\n return css([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + focusStyles(props) + \"\\n }\";\n }, function (props) {\n return focusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// This is placed next to focusStyle for easy maintainability\n// of code since changes to focusStyle should be reflected in\n// unfocusStyle as well.\n// this function can be used to reset focus styles which is\n// applicable when turning the focus ring off when using the mouse\n// see https://nelo.is/writing/styling-better-focus-states/\nexport var unfocusStyle = function unfocusStyle(_temp4) {\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n forceOutline = _ref4.forceOutline,\n justBorder = _ref4.justBorder,\n skipSvgChildren = _ref4.skipSvgChildren;\n return css([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + unfocusStyles(props) + \"\\n }\";\n }, function (props) {\n return unfocusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// For backwards compatibility we need to add back the control border width.\n// Based on how grommet was functioning prior to https://github.com/grommet/grommet/pull/3939,\n// the padding was subtracting the border width from the theme value, but the\n// placeholder was not. Because we're now placing the subtraction into the\n// theme itself, we have to add back in the border width here.\n// This is used for placeholder/icon in TextInput and MaskedInput.\nvar adjustPad = function adjustPad(props, value) {\n return parseMetricToNum((props.theme.global.edgeSize[value] || value) + \"px\") + parseMetricToNum(props.theme.global.control.border.width + \"px\") + \"px\";\n};\nexport var getInputPadBySide = function getInputPadBySide(props, side) {\n if (typeof props.theme.global.input.padding !== 'object') {\n var _adjustedPad = adjustPad(props, props.theme.global.input.padding);\n return _adjustedPad;\n }\n var orientation;\n if (side === 'left' || side === 'right') orientation = 'horizontal';else if (side === 'top' || side === 'bottom') orientation = 'vertical';else orientation = undefined;\n\n // if individual side isn't available, fallback to the\n // orientation if possible\n var pad = props.theme.global.input.padding[side] || props.theme.global.input.padding[orientation];\n var adjustedPad = adjustPad(props, pad);\n return adjustedPad;\n};\nvar placeholderColor = css([\"color:\", \";\"], function (props) {\n return normalizeColor(props.theme.global.colors.placeholder, props.theme);\n});\nvar placeholderStyle = css([\"&::-webkit-input-placeholder{\", \";}&::-moz-placeholder{\", \";}&:-ms-input-placeholder{\", \";}\"], placeholderColor, placeholderColor, placeholderColor);\nvar inputSizeStyle = function inputSizeStyle(props) {\n var data = props.theme.text[props.size];\n if (!data) {\n return css([\"font-size:\", \";\"], props.size);\n }\n return css([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n};\nexport var inputStyle = css([\"box-sizing:border-box;\", \" font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;\", \" \", \" \", \" margin:0;\", \" &:focus{\", \";}\", \" \", \"::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}\", \"\"], function (props) {\n var _props$theme$text$pro;\n return \"font-size: \" + (props.theme.global.input.font.size ? ((_props$theme$text$pro = props.theme.text[props.theme.global.input.font.size]) == null ? void 0 : _props$theme$text$pro.size) || props.theme.global.input.font.size : 'inherit') + \";\";\n}, function (props) {\n return props.theme.global.input.font.height && \"line-height: \" + props.theme.global.input.font.height + \";\";\n}, function (props) {\n return props.theme.global.input.padding && typeof props.theme.global.input.padding !== 'object' ? // On a breaking change release, this condition could be removed and\n // just the edgeStyle could remain. Currently, this is needed for\n // backwards compatibility since we are placing the calculation in\n // base.js\n \"padding: \" + (parseMetricToNum(props.theme.global.edgeSize[props.theme.global.input.padding] || props.theme.global.input.padding) - parseMetricToNum(props.theme.global.control.border.width)) + \"px;\" : edgeStyle('padding', props.theme.global.input.padding, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return (\n // for backwards compatibility, check if props.theme.global.input.weight\n (props.theme.global.input.weight || props.theme.global.input.font.weight) && css([\"font-weight:\", \";\"], props.theme.global.input.weight || props.theme.global.input.font.weight)\n );\n}, function (props) {\n return props.size && inputSizeStyle(props);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, controlBorderStyle, placeholderStyle, function (props) {\n return props.theme.global.input.extend;\n});\n\n// Apply padding on input to create space for icon.\n// When theme.icon.matchSize is true, the space for the\n// icon should equal the icon dimension + 12px (edgeSize.medium)\n// to ensure there is reasonable space between the icon and value or placeholder\nexport var inputPadForIcon = css([\"\", \"\"], function (props) {\n var _props$theme, _props$theme$icon;\n var pad = (_props$theme = props.theme) != null && (_props$theme = _props$theme.icon) != null && _props$theme.matchSize ? parseMetricToNum((_props$theme$icon = props.theme.icon) == null || (_props$theme$icon = _props$theme$icon.size) == null ? void 0 : _props$theme$icon[(props == null ? void 0 : props.size) || 'medium']) + parseMetricToNum(props.theme.global.edgeSize.medium) + \"px\" : props.theme.global.edgeSize.large;\n return props.reverse ? \"padding-right: \" + pad + \";\" : \"padding-left: \" + pad + \";\";\n});\nexport var overflowStyle = function overflowStyle(overflowProp) {\n if (typeof overflowProp === 'string') {\n return css([\"overflow:\", \";\"], overflowProp);\n }\n return css([\"\", \" \", \";\"], overflowProp.horizontal && \"overflow-x: \" + overflowProp.horizontal + \";\", overflowProp.vertical && \"overflow-y: \" + overflowProp.vertical + \";\");\n};\nvar ALIGN_SELF_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n baseline: 'baseline'\n};\nexport var genericStyles = css([\"\", \" \", \" \", \"\"], function (props) {\n return props.alignSelf && \"align-self: \" + ALIGN_SELF_MAP[props.alignSelf] + \";\";\n}, function (props) {\n return props.gridArea && \"grid-area: \" + props.gridArea + \";\";\n}, function (props) {\n return props.margin && props.theme.global && edgeStyle('margin', props.margin, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n});\nexport var disabledStyle = function disabledStyle(componentStyle) {\n return css([\"opacity:\", \";cursor:default;\"], function (props) {\n return componentStyle || props.theme.global.control.disabled.opacity;\n });\n};\nexport var sizeStyle = function sizeStyle(name, value, theme) {\n return css([\"\", \":\", \";\"], name, theme.global.size[value] || value);\n};\nexport var plainInputStyle = css([\"outline:none;border:none;\"]);\n\n// CSS for this sub-object in the theme\nexport var kindPartStyles = function kindPartStyles(obj, theme, colorValue) {\n var styles = [];\n if (obj.padding || obj.pad) {\n // button uses `padding` but other components use Grommet `pad`\n var pad = obj.padding || obj.pad;\n if (pad.vertical || pad.horizontal) styles.push(\"padding: \" + (theme.global.edgeSize[pad.vertical] || pad.vertical || 0) + \" \" + (theme.global.edgeSize[pad.horizontal] || pad.horizontal || 0) + \";\");else styles.push(\"padding: \" + (theme.global.edgeSize[pad] || pad || 0) + \";\");\n }\n if (obj.background) styles.push(backgroundStyle(colorValue || obj.background, theme, obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined)));else if (obj.color) styles.push(\"color: \" + normalizeColor(obj.color, theme) + \";\");\n if (obj.border) {\n if (obj.border.width) styles.push(css([\"border-style:solid;border-width:\", \";\"], obj.border.width));\n if (obj.border.color) styles.push(css([\"border-color:\", \";\"], normalizeColor(!obj.background && colorValue || obj.border.color || 'border', theme)));\n if (obj.border.radius) styles.push(css([\"border-radius:\", \";\"], obj.border.radius));\n } else if (obj.border === false) styles.push('border: none;');\n if (colorValue && !obj.border && !obj.background) styles.push(\"color: \" + normalizeColor(colorValue, theme) + \";\");\n if (obj.font) {\n if (obj.font.size) {\n styles.push(\"font-size: \" + (theme.text[obj.font.size].size || obj.font.size) + \";\");\n }\n if (obj.font.height) {\n styles.push(\"line-height: \" + obj.font.height + \";\");\n }\n if (obj.font.weight) {\n styles.push(\"font-weight: \" + obj.font.weight + \";\");\n }\n }\n if (obj.opacity) {\n var opacity = obj.opacity === true ? theme.global.opacity.medium : theme.global.opacity[obj.opacity] || obj.opacity;\n styles.push(\"opacity: \" + opacity + \";\");\n }\n if (obj.extend) styles.push(obj.extend);\n return styles;\n};\nvar ROUND_MAP = {\n full: '100%'\n};\nexport var roundStyle = function roundStyle(data, responsive, theme) {\n var breakpoint = getBreakpointStyle(theme, theme.box.responsiveBreakpoint);\n var styles = [];\n if (typeof data === 'object') {\n var size = ROUND_MAP[data.size] || theme.global.edgeSize[data.size || 'medium'] || data.size;\n var responsiveSize = responsive && breakpoint && breakpoint.edgeSize[data.size] && (breakpoint.edgeSize[data.size] || data.size);\n if (data.corner === 'top') {\n styles.push(css([\"border-top-left-radius:\", \";border-top-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-top-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'bottom') {\n styles.push(css([\"border-bottom-left-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-bottom-left-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'left') {\n styles.push(css([\"border-top-left-radius:\", \";border-bottom-left-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-bottom-left-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'right') {\n styles.push(css([\"border-top-right-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-top-right-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner) {\n styles.push(css([\"border-\", \"-radius:\", \";\"], data.corner, size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-\" + data.corner + \"-radius: \" + responsiveSize + \";\\n \"));\n }\n } else {\n styles.push(css([\"border-radius:\", \";\"], size));\n if (responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-radius: \" + responsiveSize + \";\\n \"));\n }\n }\n } else {\n var _size2 = data === true ? 'medium' : data;\n styles.push(css([\"border-radius:\", \";\"], ROUND_MAP[_size2] || theme.global.edgeSize[_size2] || _size2));\n var _responsiveSize = breakpoint && breakpoint.edgeSize[_size2];\n if (_responsiveSize) {\n styles.push(breakpointStyle(breakpoint, \"\\n border-radius: \" + _responsiveSize + \";\\n \"));\n }\n }\n return styles;\n};\nvar TEXT_ALIGN_MAP = {\n center: 'center',\n end: 'right',\n justify: 'justify',\n start: 'left'\n};\nexport var textAlignStyle = css([\"text-align:\", \";\"], function (props) {\n return TEXT_ALIGN_MAP[props.textAlign];\n});\nvar ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nexport var alignStyle = css([\"align-items:\", \";\"], function (props) {\n var _ALIGN_ITEMS_MAP$prop;\n return (_ALIGN_ITEMS_MAP$prop = ALIGN_ITEMS_MAP[props.align]) != null ? _ALIGN_ITEMS_MAP$prop : props.align;\n});\nvar ALIGN_CONTENT_MAP = {\n around: 'space-around',\n baseline: 'baseline',\n between: 'space-between',\n center: 'center',\n evenly: 'space-evenly',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nexport var alignContentStyle = css([\"align-content:\", \";\"], function (props) {\n var _ALIGN_CONTENT_MAP$pr;\n return (_ALIGN_CONTENT_MAP$pr = ALIGN_CONTENT_MAP[props.alignContent]) != null ? _ALIGN_CONTENT_MAP$pr : props.alignContent;\n});\nvar getSize = function getSize(theme, size) {\n return theme.global.size[size] || size;\n};\nvar widthObjectStyle = function widthObjectStyle(width, theme) {\n var result = [];\n if (width.max) result.push(css([\"max-width:\", \";\"], getSize(theme, width.max)));\n if (width.min) result.push(css([\"min-width:\", \";\"], getSize(theme, width.min)));\n if (width.width) result.push(css([\"width:\", \";\"], getSize(theme, width.width)));\n return result;\n};\nvar widthStringStyle = function widthStringStyle(width, theme) {\n return css([\"width:\", \";\"], getSize(theme, width));\n};\nexport var widthStyle = function widthStyle(width, theme) {\n return typeof width === 'object' ? widthObjectStyle(width, theme) : widthStringStyle(width, theme);\n};\nvar heightObjectStyle = function heightObjectStyle(height, theme) {\n var result = [];\n if (height.max) result.push(css([\"max-height:\", \";\"], getSize(theme, height.max)));\n if (height.min) result.push(css([\"min-height:\", \";\"], getSize(theme, height.min)));\n // backwards compatibile\n if (height.width) result.push(css([\"height:\", \";\"], getSize(theme, height.height)));\n if (height.height) result.push(css([\"height:\", \";\"], getSize(theme, height.height)));\n return result;\n};\nvar heightStringStyle = function heightStringStyle(height, theme) {\n return css([\"height:\", \";\"], getSize(theme, height));\n};\nexport var heightStyle = function heightStyle(height, theme) {\n return typeof height === 'object' ? heightObjectStyle(height, theme) : heightStringStyle(height, theme);\n};","/* eslint-disable no-restricted-imports */\nimport { useLayoutEffect as vanillaUseLayoutEffect, useEffect } from 'react';\n\n/**\n * A substitute for React's useLayoutEffect, which does not generate warnings on\n * SSR. It is named useLayoutEffect so that all eslint rules applying to the\n * original useLayoutEffect would also apply to it.\n * This solution was suggested by Alex Reardon.\n * @see https://medium.com/@alexandereardon/uselayouteffect-and-ssr-192986cdcf7a\n * @see https://github.com/grommet/grommet/issues/4765\n */\nexport var useLayoutEffect = typeof window !== 'undefined' ? vanillaUseLayoutEffect : useEffect;\nexport default useLayoutEffect;","import { useEffect, useState } from 'react';\nexport var useKeyboard = function useKeyboard() {\n var _useState = useState(),\n usingKeyboard = _useState[0],\n setUsingKeyboard = _useState[1];\n useEffect(function () {\n var onMouseDown = function onMouseDown() {\n return setUsingKeyboard(false);\n };\n var onKeyDown = function onKeyDown() {\n return setUsingKeyboard(true);\n };\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('keydown', onKeyDown);\n return function () {\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n return usingKeyboard;\n};\nexport default useKeyboard;","\"use strict\";\n\nexports.__esModule = true;\nexports.generate = exports.base = void 0;\nvar _Actions = require(\"grommet-icons/icons/Actions\");\nvar _AssistListening = require(\"grommet-icons/icons/AssistListening\");\nvar _CircleInformation = require(\"grommet-icons/icons/CircleInformation\");\nvar _ClosedCaption = require(\"grommet-icons/icons/ClosedCaption\");\nvar _Expand = require(\"grommet-icons/icons/Expand\");\nvar _FormClose = require(\"grommet-icons/icons/FormClose\");\nvar _FormDown = require(\"grommet-icons/icons/FormDown\");\nvar _FormNext = require(\"grommet-icons/icons/FormNext\");\nvar _FormPrevious = require(\"grommet-icons/icons/FormPrevious\");\nvar _FormUp = require(\"grommet-icons/icons/FormUp\");\nvar _Next = require(\"grommet-icons/icons/Next\");\nvar _Pause = require(\"grommet-icons/icons/Pause\");\nvar _Play = require(\"grommet-icons/icons/Play\");\nvar _FormPin = require(\"grommet-icons/icons/FormPin\");\nvar _Previous = require(\"grommet-icons/icons/Previous\");\nvar _StatusCriticalSmall = require(\"grommet-icons/icons/StatusCriticalSmall\");\nvar _StatusGoodSmall = require(\"grommet-icons/icons/StatusGoodSmall\");\nvar _StatusWarningSmall = require(\"grommet-icons/icons/StatusWarningSmall\");\nvar _StatusUnknownSmall = require(\"grommet-icons/icons/StatusUnknownSmall\");\nvar _Subtract = require(\"grommet-icons/icons/Subtract\");\nvar _Volume = require(\"grommet-icons/icons/Volume\");\nvar _VolumeLow = require(\"grommet-icons/icons/VolumeLow\");\nvar _base = require(\"grommet-icons/themes/base\");\nvar _object = require(\"../utils/object\");\nvar _mixins = require(\"../utils/mixins\");\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nvar brandColor = '#7D4CDB';\nvar accentColors = ['#6FFFB0', '#FD6FFF', '#81FCED', '#FFCA58'];\nvar neutralColors = ['#00873D', '#3D138D', '#00739D', '#A2423D'];\nvar statusColors = {\n critical: '#FF4040',\n error: '#B30000',\n warning: '#FFAA15',\n ok: '#00C781',\n unknown: '#CCCCCC',\n disabled: '#CCCCCC'\n};\nvar darkColors = ['#333333', '#555555', '#777777', '#999999', '#999999', '#999999'];\nvar lightColors = ['#F8F8F8', '#F2F2F2', '#EDEDED', '#DADADA', '#DADADA', '#DADADA'];\nvar focusColor = accentColors[0];\nvar colors = {\n active: 'rgba(221, 221, 221, 0.5)',\n 'background-back': {\n dark: '#33333308',\n light: '#EDEDED'\n },\n 'background-front': {\n dark: '#444444',\n light: '#FFFFFF'\n },\n 'background-contrast': {\n light: '#33333310',\n dark: '#FFFFFF18'\n },\n 'active-background': 'background-contrast',\n 'active-text': 'text-strong',\n black: '#000000',\n border: {\n dark: 'rgba(255, 255, 255, 0.33)',\n light: 'rgba(0, 0, 0, 0.33)'\n },\n brand: brandColor,\n control: {\n dark: 'accent-1',\n light: 'brand'\n },\n focus: focusColor,\n 'graph-0': 'accent-1',\n 'graph-1': 'neutral-1',\n 'graph-2': 'neutral-2',\n 'graph-3': 'neutral-3',\n 'graph-4': 'neutral-4',\n placeholder: '#AAAAAA',\n selected: 'brand',\n text: {\n dark: '#f8f8f8',\n light: '#444444'\n },\n 'text-strong': {\n dark: '#FFFFFF',\n light: '#000000'\n },\n 'text-weak': {\n dark: '#CCCCCC',\n light: '#555555'\n },\n 'text-xweak': {\n dark: '#BBBBBB',\n light: '#666666'\n },\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n 'selected-background': 'brand',\n 'selected-text': 'text-strong',\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(darkColors, 'dark');\ncolorArray(lightColors, 'light');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nvar generate = exports.generate = function generate(baseSpacing, scale) {\n if (baseSpacing === void 0) {\n baseSpacing = 24;\n }\n if (scale === void 0) {\n scale = 6;\n }\n // 24\n var baseFontSize = baseSpacing * 0.75; // 18\n var fontScale = baseSpacing / scale; // 4\n\n var fontSizing = function fontSizing(factor) {\n return {\n size: baseFontSize + factor * fontScale + \"px\",\n height: baseSpacing + factor * fontScale + \"px\",\n // maxWidth chosen to be ~50 characters wide\n // see: https://ux.stackexchange.com/a/34125\n maxWidth: baseSpacing * (baseFontSize + factor * fontScale) + \"px\"\n };\n };\n var borderWidth = 2;\n var controlBorderWidth = 1;\n var result = (0, _object.deepMerge)(_base.base, {\n global: {\n active: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n animation: {\n duration: '1s',\n jiggle: {\n duration: '0.1s'\n }\n },\n // backgrounds: undefined,\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 2 + \"px\",\n // 12\n xlarge: baseSpacing + \"px\" // 24\n },\n breakpoints: {\n small: {\n value: baseSpacing * 32,\n // 768\n borderSize: {\n xsmall: '1px',\n small: '2px',\n medium: baseSpacing / 6 + \"px\",\n // 4\n large: baseSpacing / 4 + \"px\",\n // 6\n xlarge: baseSpacing / 2 + \"px\" // 12\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: '2px',\n xsmall: baseSpacing / 8 + \"px\",\n // 3\n small: baseSpacing / 4 + \"px\",\n // 6\n medium: baseSpacing / 2 + \"px\",\n // 12\n large: baseSpacing + \"px\",\n // 24\n xlarge: baseSpacing * 2 + \"px\" // 48\n },\n size: {\n xxsmall: baseSpacing + \"px\",\n // 24\n xsmall: baseSpacing * 2 + \"px\",\n // 48\n small: baseSpacing * 4 + \"px\",\n // 96\n medium: baseSpacing * 8 + \"px\",\n // 192\n large: baseSpacing * 16 + \"px\",\n // 384\n xlarge: baseSpacing * 32 + \"px\",\n // 768\n full: '100%'\n }\n },\n medium: {\n value: baseSpacing * 64 // 1536\n },\n large: {} // anything above 'medium'\n },\n // Breakpoints used at Server Side Rendering for the initial rendering\n // These values correspond to the theme breakpoints\n deviceBreakpoints: {\n phone: 'small',\n tablet: 'medium',\n computer: 'large'\n },\n colors: colors,\n control: {\n border: {\n width: controlBorderWidth + \"px\",\n radius: '4px',\n color: 'border'\n },\n disabled: {\n opacity: 0.3\n }\n },\n // The time to wait after the user stopped typing, measured in ms.\n // A half second (500ms) debounce can be a helpful starting point.\n // You want to give the user time to fill out a field, but capture\n // their attention before they move on past it. 2 second (2000ms)\n // might be too long depending on how fast people type, and 200ms\n // would be an eye blink\n debounceDelay: 500,\n drop: {\n // intelligentMargin: undefined,\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '0px'\n },\n // margin: undefined\n shadowSize: 'small',\n // shadowSize is deprecated, use 'elevation'\n zIndex: '20'\n },\n edgeSize: {\n none: '0px',\n hair: '1px',\n // for Chart\n xxsmall: baseSpacing / 8 + \"px\",\n // 3\n xsmall: baseSpacing / 4 + \"px\",\n // 6\n small: baseSpacing / 2 + \"px\",\n // 12\n medium: baseSpacing + \"px\",\n // 24\n large: baseSpacing * 2 + \"px\",\n // 48\n xlarge: baseSpacing * 4 + \"px\",\n // 96\n responsiveBreakpoint: 'small'\n },\n elevation: {\n light: {\n none: 'none',\n xsmall: '0px 1px 2px rgba(0, 0, 0, 0.20)',\n small: '0px 2px 4px rgba(0, 0, 0, 0.20)',\n medium: '0px 4px 8px rgba(0, 0, 0, 0.20)',\n large: '0px 8px 16px rgba(0, 0, 0, 0.20)',\n xlarge: '0px 12px 24px rgba(0, 0, 0, 0.20)'\n },\n dark: {\n none: 'none',\n xsmall: '0px 2px 2px rgba(255, 255, 255, 0.40)',\n small: '0px 4px 4px rgba(255, 255, 255, 0.40)',\n medium: '0px 6px 8px rgba(255, 255, 255, 0.40)',\n large: '0px 8px 16px rgba(255, 255, 255, 0.40)',\n xlarge: '0px 12px 24px rgba(255, 255, 255, 0.40)'\n }\n },\n focus: {\n // shadow or outline are required for accessibility\n border: {\n // remove to only have shadow\n color: 'focus'\n },\n // outline: { color: undefined, size: undefined },\n shadow: {\n color: 'focus',\n size: '2px'\n }\n },\n font: _extends({}, fontSizing(0)),\n hover: {\n background: {\n color: 'active',\n opacity: 'medium'\n },\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n input: {\n padding: {\n horizontal: (0, _mixins.parseMetricToNum)(baseSpacing / 2 + \"px\") - (0, _mixins.parseMetricToNum)(controlBorderWidth + \"px\") + \"px\",\n vertical: (0, _mixins.parseMetricToNum)(baseSpacing / 2 + \"px\") - (0, _mixins.parseMetricToNum)(controlBorderWidth + \"px\") + \"px\"\n },\n font: {\n // size: undefined,\n // height: undefined,\n weight: 600\n },\n // deprecate in v3\n // weight: undefined,\n readOnly: {\n // background: undefined,\n // border: {\n // color: undefined,\n // },\n }\n },\n opacity: {\n strong: 0.8,\n medium: 0.4,\n weak: 0.1\n },\n selected: {\n background: 'selected',\n color: 'white'\n },\n spacing: baseSpacing + \"px\",\n size: {\n xxsmall: baseSpacing * 2 + \"px\",\n // 48\n xsmall: baseSpacing * 4 + \"px\",\n // 96\n small: baseSpacing * 8 + \"px\",\n // 192\n medium: baseSpacing * 16 + \"px\",\n // 384\n large: baseSpacing * 32 + \"px\",\n // 768\n xlarge: baseSpacing * 48 + \"px\",\n // 1152\n xxlarge: baseSpacing * 64 + \"px\",\n // 1536\n full: '100%'\n }\n },\n // icon: {\n // extennd: undefined,\n // matchSize: undefined,\n // size: undefined,\n // },\n accordion: {\n panel: {\n // border: {\n // side: 'bottom',\n // color: 'border',\n // },\n },\n border: {\n side: 'bottom',\n color: 'border'\n },\n heading: {\n level: '4' // level ranges from 1-6\n // margin: undefined\n },\n hover: {\n // background: undefined,\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n // deprecated\n heading: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n }\n }\n },\n icons: {\n collapse: _FormUp.FormUp,\n expand: _FormDown.FormDown\n // color: { dark: undefined, light: undefined },\n }\n },\n anchor: {\n textDecoration: 'none',\n fontWeight: 600,\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n gap: 'small',\n hover: {\n textDecoration: 'underline'\n // fontWeight: undefined,\n // extend: undefined,\n }\n // size: {\n // medium: {\n // color: undefined,\n // fontWeight: undefined,\n // textDecoration: undefined,\n // },\n // },\n // extend: undefined,\n },\n avatar: {\n // extend: undefined,\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n // 18px\n small: baseSpacing + \"px\",\n // 24px\n medium: baseSpacing * 2 + \"px\",\n // default 48px\n large: baseSpacing * 3 + \"px\",\n // 72px\n xlarge: baseSpacing * 4 + \"px\",\n // 96px\n '2xl': baseSpacing * 5 + \"px\",\n // 120px\n '3xl': baseSpacing * 6 + \"px\",\n // 144px\n '4xl': baseSpacing * 7 + \"px\",\n // 168px\n '5xl': baseSpacing * 8 + \"px\" // 192px\n },\n text: {\n size: {\n xsmall: 'small',\n // 14px\n small: 'medium',\n // 18px\n medium: 'large',\n // 22px\n large: 'xlarge',\n // 26px\n xlarge: 'xxlarge',\n // 34px\n '2xl': '3xl',\n // 42px\n '3xl': '4xl',\n // 54px\n '4xl': '5xl',\n // 70px\n '5xl': '6xl' // 90px\n }\n // fontWeight: undefined,\n // extend: undefined\n }\n },\n box: {\n responsiveBreakpoint: 'small' // when we switch rows to columns\n // extend: undefined,\n },\n button: {\n badge: {\n // align: undefined,,\n container: {\n background: 'brand'\n // pad: undefined,\n // extend: undefined,\n },\n size: {\n medium: baseSpacing + \"px\" // 24px\n },\n text: {\n size: {\n medium: 'small' // 14px\n }\n }\n },\n gap: 'small',\n size: {\n small: {\n border: {\n radius: baseSpacing * 0.75 + \"px\"\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth * 2 + \"px\" // 20px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n medium: {\n border: {\n radius: baseSpacing * 0.75 + \"px\" // 18px\n },\n pad: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n // 4px\n horizontal: baseSpacing - borderWidth + \"px\" // 22px\n }\n // iconOnly: {\n // pad: undefined,\n // },\n },\n large: {\n border: {\n radius: baseSpacing + \"px\" // 24px\n },\n pad: {\n vertical: baseSpacing / 4 + borderWidth + \"px\",\n // 8px\n horizontal: baseSpacing + borderWidth * 4 + \"px\" // 32px,\n }\n // iconOnly: {\n // pad: undefined,\n // },\n }\n },\n border: {\n // color: { dark: undefined, light: undefined }\n width: borderWidth + \"px\",\n radius: baseSpacing * 0.75 + \"px\"\n },\n // color: { dark: undefined, light: undefined }\n // default: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // primary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // secondary: {\n // font: {\n // size: undefined,\n // weight: undefined,\n // },\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n // option: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // direction: undefined,\n // icon: undefined,\n // padding: {\n // vertical: undefined,\n // horizontal: undefined,\n // },\n // reverse: undefined,\n // extend: undefined,\n // },\n active: {\n background: 'active-background',\n // border: undefined,\n color: 'active-text'\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n disabled: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n opacity: 0.3\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n },\n // hover: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // default: {},\n // primary: {},\n // secondary: {},\n // },\n padding: {\n vertical: baseSpacing / 4 - borderWidth + \"px\",\n horizontal: baseSpacing - borderWidth + \"px\"\n },\n transition: {\n timing: 'ease-in-out',\n duration: 0.1,\n properties: ['color', 'background-color', 'border-color', 'box-shadow']\n },\n skeleton: {\n width: {\n min: '100px'\n }\n }\n },\n calendar: {\n // daySize must align with global.size\n small: {\n // title: {},\n fontSize: baseFontSize - fontScale + \"px\",\n lineHeight: 1.375,\n daySize: baseSpacing * 8 / 7 + \"px\",\n slideDuration: '0.2s'\n },\n medium: {\n // title: {},\n fontSize: baseFontSize + \"px\",\n lineHeight: 1.45,\n daySize: baseSpacing * 16 / 7 + \"px\",\n slideDuration: '0.5s'\n },\n large: {\n // title: {},\n fontSize: baseFontSize + 3 * fontScale + \"px\",\n lineHeight: 1.11,\n daySize: baseSpacing * 32 / 7 + \"px\",\n slideDuration: '0.8s'\n },\n icons: {\n previous: _Previous.Previous,\n next: _Next.Next,\n small: {\n previous: _FormPrevious.FormPrevious,\n next: _FormNext.FormNext\n }\n },\n heading: {\n level: '4'\n } // level ranges from 1-6\n },\n card: {\n container: {\n round: 'small',\n elevation: 'small'\n // extend: undefined,\n },\n // hover: {\n // container: {\n // elevation: undefined,\n // },\n // },\n header: {},\n body: {},\n footer: {}\n },\n cards: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n }\n },\n carousel: {\n icons: {\n current: _Subtract.Subtract,\n next: _Next.Next,\n previous: _Previous.Previous\n // color: { dark: undefined, light: undefined },\n },\n animation: {\n duration: 1000\n },\n disabled: {\n icons: {\n // color: { dark: undefined, light: undefined },\n }\n }\n },\n chart: {\n color: 'graph-0'\n // extend: undefined,\n },\n checkBox: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n check: {\n // extend: undefined,\n radius: '4px',\n thickness: '4px'\n },\n label: {\n align: 'center'\n },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n // gap: undefined\n hover: {\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n // background: undefined,\n // extend: undefined,\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // checked: undefined,\n // indeterminate: undefined,\n },\n // pad: undefined,\n size: baseSpacing + \"px\",\n toggle: {\n // background: undefined\n color: {\n dark: '#d9d9d9',\n light: '#d9d9d9'\n },\n knob: {\n // extend: undefined,\n },\n radius: baseSpacing + \"px\",\n size: baseSpacing * 2 + \"px\"\n // extend: undefined,\n }\n },\n checkBoxGroup: {\n // container: {\n // // any box props\n // extend: undefined,\n // },\n },\n clock: {\n analog: {\n // extend: undefined,\n hour: {\n color: {\n dark: 'light-2',\n light: 'dark-3'\n },\n width: baseSpacing / 3 + \"px\",\n size: baseSpacing + \"px\",\n shape: 'round'\n },\n minute: {\n color: {\n dark: 'light-4',\n light: 'dark-3'\n },\n width: baseSpacing / 6 + \"px\",\n size: Math.round(baseSpacing / 2) + \"px\",\n shape: 'round'\n },\n second: {\n color: {\n dark: 'accent-1',\n light: 'accent-1'\n },\n width: baseSpacing / 8 + \"px\",\n size: Math.round(baseSpacing / 2.666) + \"px\",\n shape: 'round'\n },\n size: {\n xsmall: baseSpacing * 2 + \"px\",\n small: baseSpacing * 3 + \"px\",\n medium: baseSpacing * 4 + \"px\",\n large: baseSpacing * 6 + \"px\",\n xlarge: baseSpacing * 9 + \"px\",\n xxlarge: baseSpacing * 12 + \"px\",\n huge: baseSpacing * 12 + \"px\" // kept for backwards compatibility\n }\n },\n digital: {\n text: {\n xsmall: {\n size: baseFontSize - 2 * fontScale + \"px\",\n height: 1.5\n },\n small: {\n size: baseFontSize - fontScale + \"px\",\n height: 1.43\n },\n medium: {\n size: baseFontSize + \"px\",\n height: 1.375\n },\n large: {\n size: baseFontSize + fontScale + \"px\",\n height: 1.167\n },\n xlarge: {\n size: baseFontSize + 2 * fontScale + \"px\",\n height: 1.1875\n },\n xxlarge: {\n size: baseFontSize + 4 * fontScale + \"px\",\n height: 1.125\n }\n }\n }\n },\n collapsible: {\n minSpeed: 200,\n baseline: 500\n },\n data: {\n // button: {\n // kind: undefined,\n // },\n },\n dateInput: {\n container: {\n round: 'xxsmall'\n }\n // icon: {\n // size: undefined,\n // },\n },\n dataTable: {\n // body: {\n // extend: undefined,\n // },\n pinned: {\n // body: {\n // background: undefined,\n // extend: undefined,\n // },\n header: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n },\n footer: {\n background: {\n opacity: 'strong'\n }\n // extend: undefined,\n }\n },\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n groupHeader: {\n // background: undefined,\n // border: undefined,\n // pad: undefined,\n },\n groupEnd: {\n border: {\n side: 'bottom',\n size: 'xsmall'\n }\n },\n header: {\n // background: undefined,\n // border: undefined,\n // color: undefined,\n // extend: undefined,\n // font: {\n // weight: undefined,\n // size: undefined,\n // },\n gap: 'small',\n // hover: {\n // background: undefined,\n // },\n // pad: undefined,\n units: {\n color: 'text-xweak',\n margin: {\n left: 'xsmall'\n },\n alignSelf: 'end'\n }\n },\n icons: {\n ascending: _FormDown.FormDown,\n contract: _FormUp.FormUp,\n descending: _FormUp.FormUp,\n expand: _FormDown.FormDown\n // sortable: undefined,\n },\n primary: {\n weight: 'bold'\n },\n resize: {\n border: {\n color: 'border',\n side: 'end'\n }\n // hover: {\n // border: {\n // color: undefined,\n // side: undefined,\n // size: undefined,\n // },\n // },\n }\n },\n diagram: {\n // extend: undefined,\n line: {\n color: 'graph-0'\n }\n },\n // drop: {\n // extend: undefined,\n // maxHeight: undefined,\n // },\n fileInput: {\n // background: {},\n border: {\n // color: undefined,\n side: 'all',\n size: 'small',\n style: 'dashed'\n },\n dragOver: {\n border: {\n color: 'control'\n }\n // extend: undefined,\n },\n hover: {\n border: {\n color: 'brand'\n }\n // extend: undefined,\n },\n icons: {\n remove: _FormClose.FormClose\n },\n // pad: {},\n label: {\n margin: 'small'\n // extend: undefined,\n },\n message: {\n margin: 'small'\n // extend: undefined,\n }\n // extend: undefined,\n },\n formField: {\n border: {\n color: 'border',\n error: {\n color: {\n dark: 'white',\n light: 'status-critical'\n }\n },\n position: 'inner',\n side: 'bottom'\n },\n // checkBox: {\n // pad: undefined,\n // },\n content: {\n // margin: undefined,\n pad: 'small'\n },\n disabled: {\n background: {\n color: 'status-disabled',\n opacity: 'medium'\n }\n // border: {\n // color: undefined,\n // },\n // label: {\n // color: undefined,\n // },\n },\n // focus: {\n // background: {\n // color: undefined,\n // },\n // border: {\n // color: undefined,\n // },\n // },\n error: {\n color: 'status-critical',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // background: undefined,\n // container: {}, // any Box props\n // icon: undefined,\n },\n // extend: undefined,\n help: {\n color: 'dark-3',\n margin: {\n start: 'small'\n }\n },\n info: {\n color: 'text-xweak',\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // container: {}, // any Box props\n // icon: undefined,\n },\n label: {\n margin: {\n vertical: 'xsmall',\n horizontal: 'small'\n }\n // requiredIndicator: undefined,\n },\n margin: {\n bottom: 'small'\n },\n // round: undefined,\n survey: {\n label: {\n margin: {\n bottom: 'xsmall'\n },\n size: 'medium',\n weight: 400\n }\n }\n },\n grommet: {\n // extend: undefined\n },\n header: {\n sticky: {\n zIndex: '20'\n }\n },\n heading: {\n // color: undefined,\n font: {\n // family: undefined\n },\n level: {\n 1: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(4)),\n medium: _extends({}, fontSizing(8)),\n large: _extends({}, fontSizing(16)),\n xlarge: _extends({}, fontSizing(24))\n },\n 2: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(2)),\n medium: _extends({}, fontSizing(4)),\n large: _extends({}, fontSizing(8)),\n xlarge: _extends({}, fontSizing(12))\n },\n 3: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(1)),\n medium: _extends({}, fontSizing(2)),\n large: _extends({}, fontSizing(4)),\n xlarge: _extends({}, fontSizing(6))\n },\n 4: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(0)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(0)),\n xlarge: _extends({}, fontSizing(0))\n },\n 5: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-0.5)),\n medium: _extends({}, fontSizing(-0.5)),\n large: _extends({}, fontSizing(-0.5)),\n xlarge: _extends({}, fontSizing(-0.5))\n },\n 6: {\n font: {\n // family: undefined,\n // weight: undefined,\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(-1)),\n large: _extends({}, fontSizing(-1)),\n xlarge: _extends({}, fontSizing(-1))\n }\n },\n responsiveBreakpoint: 'small',\n // when we scale the font size down\n weight: 600,\n skeleton: {\n width: {\n min: '150px',\n max: '200px'\n }\n }\n },\n layer: {\n background: {\n dark: 'black',\n light: 'white'\n },\n border: {\n radius: '4px'\n // intelligentRounding: undefined,\n },\n container: {\n // elevation: undefined,\n zIndex: '20'\n },\n // extend: undefined,\n overlay: {\n background: 'rgba(0, 0, 0, 0.5)'\n // backdropFilter: undefined,\n },\n responsiveBreakpoint: 'small',\n // when Layer takes over the full screen\n zIndex: '20'\n },\n list: {\n container: {\n // any box props\n gap: 'xsmall'\n // extend: undefined,\n },\n item: {\n // background: undefined,\n border: 'horizontal',\n disabled: {\n color: 'status-disabled',\n cursor: 'default'\n },\n pinned: {\n background: 'background-contrast',\n icon: {\n size: 'medium',\n pad: 'small'\n }\n },\n pad: {\n horizontal: 'medium',\n vertical: 'small'\n }\n // extend: undefined,\n },\n primaryKey: {\n // any text props\n weight: 'bold'\n },\n icons: {\n down: _FormDown.FormDown,\n up: _FormUp.FormUp,\n pin: _FormPin.FormPin\n }\n // extend: undefined,\n },\n maskedInput: {\n // container: {\n // extend: undefined,\n // },\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n menu: {\n // background: undefined,\n // item: undefined,\n // extend: undefined,\n drop: {\n align: {\n top: 'top',\n left: 'left'\n }\n // any drop props\n },\n group: {\n container: {\n pad: {\n vertical: 'xsmall'\n }\n },\n separator: {\n color: 'border',\n size: 'xsmall',\n pad: {\n horizontal: 'small'\n }\n }\n },\n icons: {\n down: _FormDown.FormDown\n // up: undefined,\n // color: { dark: undefined, light: undefined },\n }\n },\n meter: {\n color: 'graph-0'\n // colors: [] || colors: ['graph-0', 'graph-1', 'graph-2', 'graph-3'],\n // extend: undefined,\n },\n nameValueList: {\n gap: {\n column: 'large',\n row: 'small'\n },\n pair: {\n column: {\n gap: {\n column: 'large',\n row: 'medium'\n }\n }\n },\n name: {\n width: 'small'\n },\n value: {\n width: 'medium'\n }\n },\n nameValuePair: {\n column: {\n gap: 'xxsmall'\n },\n name: {\n // any text props\n color: 'text',\n weight: 'bold'\n },\n value: {\n // any text props\n color: 'text'\n }\n },\n notification: {\n actions: {\n // any anchor props\n },\n direction: 'column',\n container: {\n // any box props\n round: 'xsmall',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n background: {\n color: 'background-front'\n }\n },\n global: {\n direction: 'row',\n container: {\n // any box props\n round: 'none',\n pad: {\n horizontal: 'large',\n vertical: 'xsmall'\n }\n }\n },\n toast: {\n // direction: undefined,\n container: {\n // any box props\n elevation: 'medium',\n width: 'medium'\n },\n layer: {\n position: 'top',\n margin: 'medium'\n },\n time: 8000\n },\n iconContainer: {\n // any box props\n pad: {\n right: 'small'\n },\n flex: false\n },\n textContainer: {\n // any box props\n gap: 'medium'\n },\n title: {\n // any text props\n weight: 'bold'\n },\n message: {\n // any text props\n margin: 'none'\n },\n close: {\n icon: _FormClose.FormClose\n },\n critical: {\n icon: _StatusCriticalSmall.StatusCriticalSmall,\n background: {\n color: 'status-critical',\n opacity: 'weak'\n },\n color: 'status-critical',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n warning: {\n icon: _StatusWarningSmall.StatusWarningSmall,\n background: {\n color: 'status-warning',\n opacity: 'weak'\n },\n color: 'status-warning',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n normal: {\n icon: _StatusGoodSmall.StatusGoodSmall,\n background: {\n color: 'status-ok',\n opacity: 'weak'\n },\n color: 'status-ok',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n info: {\n icon: _CircleInformation.CircleInformation,\n background: 'background-contrast',\n color: 'text-strong',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n unknown: {\n icon: _StatusUnknownSmall.StatusUnknownSmall,\n background: {\n color: 'status-unknown',\n opacity: 'weak'\n },\n color: 'status-unknown',\n // global: {},\n toast: {\n background: 'background-front'\n }\n },\n // deprecate \"undefined\" in v3\n // and if undefined, no icon\n undefined: {\n icon: _StatusUnknownSmall.StatusUnknownSmall,\n // background: undefined,\n color: 'status-unknown'\n // global: {},\n // toast: {},\n }\n },\n page: {\n wide: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'xxlarge'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n narrow: {\n alignSelf: 'center',\n width: {\n min: 'medium',\n max: 'large'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n },\n full: {\n alignSelf: 'start',\n width: {\n min: 'medium',\n max: '100%'\n },\n small: {\n pad: {\n horizontal: 'large'\n }\n },\n medium: {\n pad: {\n horizontal: 'medium'\n }\n },\n large: {\n pad: {\n horizontal: 'large'\n }\n }\n }\n },\n pageHeader: {\n actions: {\n // any box props\n align: 'end'\n },\n pad: {\n top: 'large',\n bottom: 'medium'\n },\n parent: {\n // any box props\n align: 'start'\n },\n responsive: {\n actions: {\n // any box props\n align: 'start',\n pad: {\n top: 'small'\n }\n },\n areas: [['parent'], ['title'], ['subtitle'], ['actions']],\n breakpoints: ['small'],\n columns: ['auto'],\n rows: ['auto']\n // gap: undefined,\n },\n subtitle: {\n // any paragraph props\n margin: 'none'\n },\n title: {\n // any heading props\n margin: 'none',\n fill: true\n },\n size: {\n small: {\n pad: {\n top: 'medium',\n bottom: 'small'\n },\n subtitle: {\n size: 'small'\n },\n title: {\n size: 'small'\n }\n },\n // medium: {\n // // pad: undefined,\n // // subtitle: {},\n // // title: {},\n // },\n large: {\n pad: {\n top: 'xlarge',\n bottom: 'large'\n },\n subtitle: {\n size: 'large'\n },\n title: {\n size: 'large'\n }\n }\n },\n small: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['small', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n },\n medium: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'medium'\n }\n },\n large: {\n areas: [['parent', 'parent'], ['title', 'actions'], ['subtitle', 'actions']],\n columns: [['medium', 'flex'], 'auto'],\n rows: ['auto', 'auto', 'auto'],\n gap: {\n row: 'xsmall',\n column: 'large'\n }\n }\n },\n pagination: {\n button: {\n active: {\n background: {\n color: 'active-background'\n }\n },\n color: 'text-strong',\n hover: {\n background: {\n color: 'background-contrast'\n },\n color: undefined\n },\n size: {\n small: {\n border: {\n radius: baseSpacing / 8 + \"px\",\n // 3\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(-1)),\n height: baseSpacing * 1.25 + \"px\",\n width: baseSpacing * 1.25 + \"px\"\n },\n medium: {\n border: {\n radius: baseSpacing / 6 + \"px\",\n // 4\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(0)),\n height: baseSpacing * 1.5 + \"px\",\n width: baseSpacing * 1.5 + \"px\"\n },\n large: {\n border: {\n radius: baseSpacing / 4 + \"px\",\n // 6\n width: '2px'\n },\n pad: {\n vertical: \"4px\",\n horizontal: \"4px\"\n },\n font: _extends({}, fontSizing(1)),\n height: baseSpacing * 2 + \"px\",\n width: baseSpacing * 2 + \"px\"\n }\n }\n },\n // container: {\n // // any box props,\n // extend: undefined,\n // },\n controls: {\n align: 'center',\n direction: 'row',\n gap: 'xxsmall',\n margin: 'none',\n pad: 'none'\n },\n icons: {\n // color: undefined,\n next: _Next.Next,\n previous: _Previous.Previous\n }\n },\n paragraph: {\n font: {\n // family: undefined\n },\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n large: _extends({}, fontSizing(1)),\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4))\n },\n thumbsRating: {\n // dislike: {\n // color: undefined,\n // },\n // like: {\n // color: undefined,\n // },\n },\n spinner: {\n container: {\n animation: 'rotateRight',\n color: 'brand',\n pad: 'small',\n round: 'full',\n size: 'small'\n },\n // icon: undefined\n size: {\n xsmall: baseSpacing * 0.75 + \"px\",\n small: baseSpacing + \"px\",\n // default 24\n medium: baseSpacing * 2 + \"px\",\n large: baseSpacing * 3 + \"px\",\n xlarge: baseSpacing * 4 + \"px\"\n }\n },\n radioButton: {\n border: {\n color: {\n dark: 'rgba(255, 255, 255, 0.5)',\n light: 'rgba(0, 0, 0, 0.15)'\n },\n width: '2px'\n },\n // background: {\n // color: undefined,\n // },\n check: {\n radius: '100%'\n // background: {\n // color: undefined,\n // },\n // color: { dark: undefined, light: undefined },\n // extend: undefined,\n },\n // color: undefined,\n hover: {\n // background: {\n // color: undefined,\n // },\n border: {\n color: {\n dark: 'white',\n light: 'black'\n }\n }\n },\n icon: {\n // size: undefined,\n // extend: undefined,\n },\n icons: {\n // circle: undefined,\n },\n gap: 'small',\n size: baseSpacing + \"px\",\n font: {\n // weight: undefined,\n },\n container: {\n // extend: undefined\n }\n },\n radioButtonGroup: {\n // container: {}, // any box props\n },\n rangeInput: {\n disabled: {\n opacity: 0.3\n // thumb: {\n // color: undefined,\n // },\n // track: {\n // color: undefined,\n // },\n },\n // extend: undefined\n track: {\n height: '4px',\n color: 'border'\n // opacity: undefined,\n // lower: {\n // color: 'undefined',\n // opacity: undefined,\n // },\n // upper: {\n // color: undefined,\n // opacity: undefined,\n // },\n // extend: undefined\n },\n thumb: {\n // color: { dark: undefined, light: undefined },\n // extend: undefined\n }\n // wheel: undefined\n },\n rangeSelector: {\n background: {\n invert: {\n color: 'light-4'\n }\n }\n // edge: {\n // type: undefined,\n // },\n },\n select: {\n // background: undefined,\n clear: {\n container: {\n pad: 'small',\n background: 'background-contrast'\n },\n // any box props\n text: {\n color: 'text-weak'\n } // any text props\n },\n container: {\n // extend: undefined,\n },\n control: {\n // extend: undefined,\n // open: undefined,\n },\n // emptySearchMessage: {\n // container: {}, // any box props\n // text: {}, // any text props\n // },\n icons: {\n // color: { dark: undefined, light: undefined },\n margin: {\n horizontal: 'small'\n },\n down: _FormDown.FormDown\n // up: undefined\n },\n options: {\n container: {\n align: 'start',\n pad: 'small'\n },\n text: {\n margin: 'none'\n }\n },\n // searchInput: undefined,\n step: 20\n },\n selectMultiple: {\n maxInline: 5\n },\n skeleton: {\n border: false,\n colors: {\n dark: ['background', 'background-front'],\n light: ['background', 'background-back']\n }\n },\n skipLinks: {\n position: 'top',\n container: {\n elevation: 'large',\n round: 'small',\n pad: 'medium'\n },\n label: {\n margin: {\n bottom: 'medium'\n },\n size: 'medium'\n }\n },\n starRating: {\n // color: undefined,\n },\n tab: {\n active: {\n color: 'text'\n // background: undefined,\n },\n // background: undefined,\n border: {\n side: 'bottom',\n size: 'small',\n color: {\n dark: 'accent-1',\n light: 'brand'\n },\n active: {\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n disabled: {\n // color: undefined,\n },\n hover: {\n color: {\n dark: 'white',\n light: 'black'\n }\n // extend: undefined,\n }\n },\n color: 'control',\n // disabled: {\n // color: undefined,\n // },\n // extend: undefined,\n hover: {\n // background: undefined,\n // extend: undefined,\n color: {\n dark: 'white',\n light: 'black'\n }\n },\n margin: {\n vertical: 'xxsmall',\n horizontal: 'small'\n },\n pad: {\n bottom: 'xsmall'\n }\n },\n tabs: {\n // background: undefined,\n // extend: undefined,\n // gap: undefined,\n header: {\n // alignSelf: undefined,\n // background: undefined,\n // border: {\n // side: undefined,\n // size: undefined,\n // style: undefined,\n // color: undefined,\n // },\n // extend: undefined,\n },\n panel: {\n // extend: undefined,\n },\n step: {\n small: 1,\n medium: 3,\n large: 3\n }\n },\n table: {\n header: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'bottom'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n },\n body: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n }\n // background: undefined,\n // border: undefined,\n // extend: undefined,\n },\n // row: {\n // hover: {\n // background: undefined,\n // color: undefined,\n // },\n // },\n footer: {\n align: 'start',\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n border: 'top'\n // verticalAlign: undefined,\n // background: undefined,\n // extend: undefined,\n }\n },\n tag: {\n // background: undefined,\n border: true,\n round: 'large',\n // name: undefined,\n pad: {\n horizontal: 'small',\n vertical: 'xsmall'\n },\n remove: {\n margin: {\n right: 'xsmall'\n }\n },\n separator: ' : ',\n size: {\n xsmall: {\n pad: {\n horizontal: baseSpacing / 3 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n small: {\n pad: {\n horizontal: baseSpacing * 0.4 + \"px\",\n vertical: 'xxsmall'\n },\n icon: {\n size: baseSpacing * 0.75 + \"px\"\n }\n },\n large: {\n pad: {\n horizontal: baseSpacing / 3 * 2 + \"px\",\n vertical: \"xsmall\"\n },\n icon: {\n size: baseSpacing * 1.25 + \"px\"\n }\n },\n xlarge: {\n pad: {\n horizontal: baseSpacing * 0.75 + \"px\",\n vertical: 'xsmall'\n },\n icon: {\n size: baseSpacing * 1.5 + \"px\"\n }\n }\n },\n value: {\n weight: 600\n },\n icons: {\n remove: _FormClose.FormClose\n }\n },\n text: {\n font: {\n // family: undefined\n },\n xsmall: _extends({}, fontSizing(-1.5)),\n small: _extends({}, fontSizing(-1)),\n medium: _extends({}, fontSizing(0)),\n // 18px\n large: _extends({}, fontSizing(1)),\n // 22px\n xlarge: _extends({}, fontSizing(2)),\n xxlarge: _extends({}, fontSizing(4)),\n '2xl': _extends({}, fontSizing(4)),\n '3xl': _extends({}, fontSizing(6)),\n '4xl': _extends({}, fontSizing(9)),\n '5xl': _extends({}, fontSizing(13)),\n '6xl': _extends({}, fontSizing(18)),\n skeleton: {\n width: {\n width: '100px',\n min: '100px'\n },\n margin: {\n vertical: 'xsmall'\n },\n colors: {\n dark: ['border', 'border'],\n light: ['background-front', 'background-back']\n }\n }\n },\n textArea: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n textInput: {\n // extend: undefined,\n // disabled: { opacity: undefined },\n },\n tip: {\n content: {\n // any Box props\n background: 'background-contrast',\n elevation: 'small',\n margin: 'xsmall',\n pad: {\n vertical: 'xsmall',\n horizontal: 'small'\n },\n round: 'small'\n },\n drop: {\n // any props for the drop\n align: {\n top: 'bottom'\n },\n // most common use case is Header with Buttons\n background: 'none',\n elevation: 'none',\n margin: 'none'\n }\n },\n video: {\n captions: {\n background: 'rgba(0, 0, 0, 0.7)'\n },\n // controls: { background: undefined },\n icons: {\n closedCaption: _ClosedCaption.ClosedCaption,\n configure: _Actions.Actions,\n fullScreen: _Expand.Expand,\n pause: _Pause.Pause,\n play: _Play.Play,\n reduceVolume: _VolumeLow.VolumeLow,\n volume: _Volume.Volume,\n description: _AssistListening.AssistListening\n // color: { dark: undefined, light: undefined },\n },\n scrubber: {\n color: 'light-4',\n interval: 10\n // track: { color: undefined }\n }\n },\n worldMap: {\n color: 'light-3',\n continent: {\n active: '8px',\n base: '6px'\n },\n hover: {\n color: 'light-4'\n },\n place: {\n active: '20px',\n base: '8px'\n }\n }\n });\n return (0, _object.deepFreeze)(result);\n};\nvar base = exports.base = generate(24);","\"use strict\";\n\nexports.__esModule = true;\nexports.dark = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar _colors = require(\"../utils/colors\");\nvar accentColors = ['#FD6FFF', '#60EB9F', '#60EBE1', '#FFCA58'];\nvar neutralColors = ['#EB6060', '#01C781', '#6095EB', '#FFB200'];\nvar statusColors = {\n critical: '#FF3333',\n error: '#FF3333',\n warning: '#F7E464',\n ok: '#7DD892',\n unknown: '#a8a8a8',\n disabled: '#a8a8a8'\n};\nvar backgroundColor = '#111111';\nvar colors = {\n active: 'rgba(102, 102, 102, 0.5)',\n background: backgroundColor,\n black: '#000000',\n brand: '#FD6FFF',\n control: {\n dark: '#FFCA58',\n light: '#403216'\n },\n focus: '#FFCA58',\n icon: {\n dark: '#f8f8f8',\n light: '#666666'\n },\n placeholder: '#AAAAAA',\n text: {\n dark: '#eeeeee',\n light: '#444444'\n },\n white: '#FFFFFF'\n};\nvar colorArray = function colorArray(array, prefix) {\n return array.forEach(function (color, index) {\n colors[prefix + \"-\" + (index + 1)] = color;\n });\n};\ncolorArray(accentColors, 'accent');\ncolorArray(neutralColors, 'neutral');\nObject.keys(statusColors).forEach(function (color) {\n colors[\"status-\" + color] = statusColors[color];\n});\nvar dark = exports.dark = (0, _object.deepFreeze)({\n global: {\n colors: colors,\n drop: {\n background: '#333333'\n },\n focus: {\n border: {\n color: (0, _styledComponents.css)([\"\", \";\"], function (props) {\n return (0, _colors.normalizeColor)('focus', props.theme);\n }),\n width: '2px'\n }\n },\n font: {\n family: 'Arial'\n },\n input: {\n weight: 700\n }\n },\n anchor: {\n color: 'control'\n },\n layer: {\n background: backgroundColor,\n overlay: {\n background: 'rgba(48, 48, 48, 0.5)'\n }\n }\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.grommet = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar grommet = exports.grommet = (0, _object.deepFreeze)({\n global: {\n colors: {\n background: {\n light: '#ffffff',\n dark: '#000000'\n }\n },\n backgrounds: {\n stack: {\n color: 'light-1',\n image: \"url(https://v2.grommet.io/img/stak-hurrah.svg)\"\n },\n 'gradient-purple-blue': {\n color: 'neutral-3',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #00739D 100% /* neutral-3 */\\n );\",\n rotate: 145\n },\n 'gradient-purple-gold': {\n color: 'neutral-2',\n image: \"linear-gradient(\\n #3D138D 0%, /* neutral-2 */\\n #EB0F79 75%,\\n #FFCA58 100% /* accent-4 */\\n );\"\n }\n },\n font: {\n family: \"-apple-system,\\n BlinkMacSystemFont, \\n \\\"Segoe UI\\\", \\n Roboto, \\n Oxygen, \\n Ubuntu, \\n Cantarell, \\n \\\"Fira Sans\\\", \\n \\\"Droid Sans\\\", \\n \\\"Helvetica Neue\\\", \\n Arial, sans-serif, \\n \\\"Apple Color Emoji\\\", \\n \\\"Segoe UI Emoji\\\", \\n \\\"Segoe UI Symbol\\\"\"\n }\n },\n button: {\n extend: (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return !props.plain && 'font-weight: bold;';\n })\n }\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.hacktoberfest2022 = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _object = require(\"../utils/object\");\nvar hacktoberfest2022 = exports.hacktoberfest2022 = (0, _object.deepFreeze)({\n defaultMode: 'dark',\n global: {\n colors: {\n background: '#160F1D',\n 'background-back': '#000000',\n 'background-front': '#160F1D',\n 'text-strong': '#FFFFFF',\n text: '#E4E1E6',\n 'text-weak': '#76717A',\n grey: '#AFACB2',\n lime: '#C6FC60',\n pink: '#D856A7',\n purple: '#7C7EF4',\n teal: '#73DAFB',\n yellow: '#EDD063',\n darkPurple: '#291E40',\n active: 'purple',\n focus: '#233670',\n brand: 'lime',\n control: 'teal',\n 'graph-0': 'yellow',\n 'graph-1': 'purple',\n 'graph-2': 'teal',\n 'graph-3': 'pink',\n 'graph-4': 'lime',\n // clear unused colors\n icon: undefined,\n 'accent-1': undefined,\n 'accent-2': undefined,\n 'accent-3': undefined,\n 'accent-4': undefined,\n 'neutral-1': undefined,\n 'neutral-2': undefined,\n 'neutral-3': undefined,\n 'neutral-4': undefined,\n 'neutral-5': undefined,\n 'light-1': undefined,\n 'light-2': undefined,\n 'light-3': undefined,\n 'light-4': undefined,\n 'light-5': undefined,\n 'light-6': undefined,\n 'dark-1': undefined,\n 'dark-2': undefined,\n 'dark-3': undefined,\n 'dark-4': undefined,\n 'dark-5': undefined,\n 'dark-6': undefined\n },\n backgrounds: {\n 'gradient-purple-teal': {\n image: \"linear-gradient(\\n #7C7EF4 0%,\\n #73DAFB 100%\\n );\"\n },\n 'gradient-teal-purple': {\n image: \"linear-gradient(\\n #73DAFB 0%,\\n #7C7EF4 100%\\n );\"\n },\n 'gradient-yellow-teal-purple': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 50%,\\n #7C7EF4 100%\\n );\",\n rotate: 90\n },\n 'gradient-yellow-teal': {\n image: \"linear-gradient(\\n #EDD063 0%,\\n #73DAFB 100%\\n );\",\n rotate: 90\n }\n },\n focus: {\n shadow: {\n color: 'focus',\n size: '3px'\n }\n },\n font: {\n family: '\"JetBrains Mono\", monospace',\n face: \"/* latin */\\n@font-face {\\n font-family: 'JetBrains Mono';\\n font-style: normal;\\n font-weight: 400;\\n src: url(https://fonts.gstatic.com/s/jetbrainsmono/v13/tDbY2o-flEEny0FZhsfKu5WU4zr3E_BX0PnT8RD8yKxTOlOTk6OThhvA.woff) format('woff');\\n unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;\\n}\"\n }\n },\n grommet: {\n extend: (0, _styledComponents.css)([\"text-transform:uppercase;\"])\n },\n anchor: {\n color: 'text',\n hover: {\n color: 'text-strong'\n }\n },\n button: {\n border: {\n width: '0px',\n radius: '0px'\n },\n padding: {\n horizontal: '20px',\n vertical: '10px'\n },\n color: 'text-strong',\n size: {\n small: {\n pad: {\n horizontal: '16px',\n vertical: '8px'\n }\n },\n medium: {\n pad: {\n horizontal: '20px',\n vertical: '10px'\n }\n }\n },\n \"default\": {\n color: 'text-strong'\n },\n primary: {\n border: false,\n background: 'gradient-yellow-teal-purple',\n color: 'text'\n },\n hover: {\n border: false\n },\n extend: (0, _styledComponents.css)([\"clip-path:polygon( 12px 0px,100% 0px,100% 72%,calc(100% - 12px) 100%,0px 100%,0px 12px );text-transform:uppercase;&:focus{clip-path:none;}\"])\n },\n heading: {\n extend: (0, _styledComponents.css)([\"text-shadow:rgba(255,215,77,0.6) -1px -1px 6px,rgba(124,127,255,0.6) 1px 1px 6px;\"])\n }\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.hacktoberfest2022 = exports.grommet = exports.generate = exports.dark = exports.base = void 0;\nvar _base = require(\"./base\");\nexports.base = _base.base;\nexports.generate = _base.generate;\nvar _grommet = require(\"./grommet\");\nexports.grommet = _grommet.grommet;\nvar _dark = require(\"./dark\");\nexports.dark = _dark.dark;\nvar _hacktoberfest = require(\"./hacktoberfest2022\");\nexports.hacktoberfest2022 = _hacktoberfest.hacktoberfest2022;","\"use strict\";\n\nexports.__esModule = true;\nexports.withinDropPortal = exports.shouldKeepFocus = exports.setFocusWithoutScroll = exports.makeNodeUnfocusable = exports.makeNodeFocusable = exports.isNodeBeforeScroll = exports.isNodeAfterScroll = exports.isFocusable = exports.getNewContainer = exports.getFirstFocusableDescendant = exports.findVisibleParent = exports.findScrollParents = exports.findScrollParent = exports.findButtonParent = exports.containsFocus = void 0;\nvar findScrollParent = exports.findScrollParent = function findScrollParent(element, horizontal) {\n var result;\n if (element) {\n var parent = element.parentNode;\n while (!result && parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result = parent;\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result = parent;\n }\n parent = parent.parentNode;\n }\n // last scrollable element will be the document\n // if nothing else is scrollable in the page\n if (!result) {\n result = document;\n } else if (result.tagName.toLowerCase() === 'body') {\n result = document;\n }\n }\n return result;\n};\nvar documentTags = ['html', 'body'];\nvar findScrollParents = exports.findScrollParents = function findScrollParents(element, horizontal) {\n var result = [];\n if (element) {\n var parent = element.parentNode;\n while (parent && parent.getBoundingClientRect) {\n var rect = parent.getBoundingClientRect();\n // 10px is to account for borders and scrollbars in a lazy way\n if (horizontal) {\n if (rect.width && parent.scrollWidth > rect.width + 10) {\n result.push(parent);\n }\n } else if (rect.height && parent.scrollHeight > rect.height + 10) {\n result.push(parent);\n }\n parent = parent.parentNode;\n }\n if (result.length && documentTags.includes(result[0].tagName.toLowerCase())) {\n result.length = 0;\n }\n // last scrollable element will be the document\n result.push(document);\n }\n return result;\n};\nvar containsFocus = exports.containsFocus = function containsFocus(node) {\n var root = node.getRootNode();\n var element = root.activeElement;\n while (element) {\n if (element === node) break;\n element = element.parentElement;\n }\n return !!element;\n};\nvar withinDropPortal = exports.withinDropPortal = function withinDropPortal(node, portalContext) {\n var root = node == null ? void 0 : node.getRootNode();\n var element = node;\n var portalId;\n while (element && element !== root) {\n if (element.hasAttribute('data-g-portal-id')) {\n portalId = element.getAttribute('data-g-portal-id');\n element = root;\n } else {\n element = element.parentElement;\n }\n }\n // if portalContext doesn't contain the portalId then the\n // portal is new and node is within a drop that just opened\n if (portalId === undefined || portalContext.indexOf(parseInt(portalId, 10)) !== -1) return false;\n return true;\n};\n\n// Check if the element.tagName is an input, select or textarea\nvar isFocusable = exports.isFocusable = function isFocusable(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName === 'input' || tagName === 'select' || tagName === 'textarea';\n};\n\n// Get the first element that can receive focus\nvar getFirstFocusableDescendant = exports.getFirstFocusableDescendant = function getFirstFocusableDescendant(element) {\n var children = element.getElementsByTagName('*');\n for (var i = 0; i < children.length; i += 1) {\n var child = children[i];\n if (isFocusable(child)) {\n return child;\n }\n }\n return undefined;\n};\nvar shouldKeepFocus = exports.shouldKeepFocus = function shouldKeepFocus(root) {\n var element = root.activeElement;\n if (isFocusable(element)) return true;\n return !!getFirstFocusableDescendant(element);\n};\nvar getNewContainer = exports.getNewContainer = function getNewContainer(target, targetChildPosition) {\n if (target === void 0) {\n target = document.body;\n }\n // setup DOM\n var container = document.createElement('div');\n if (targetChildPosition === 'first') {\n // for SkipLinks\n target.prepend(container);\n } else {\n target.appendChild(container);\n }\n return container;\n};\nvar setFocusWithoutScroll = exports.setFocusWithoutScroll = function setFocusWithoutScroll(element) {\n var x = window.scrollX;\n var y = window.scrollY;\n element.focus();\n window.scrollTo(x, y);\n};\nvar TABINDEX = 'tabindex';\nvar TABINDEX_STATE = 'data-g-tabindex';\nvar makeNodeFocusable = exports.makeNodeFocusable = function makeNodeFocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.removeAttribute('aria-hidden');\n // allow children to receive focus again\n var elements = node.getElementsByTagName('*');\n // only reset elements we've changed in makeNodeUnfocusable()\n Array.prototype.filter.call(elements || [], function (element) {\n return element.hasAttribute(TABINDEX_STATE);\n }).forEach(function (element) {\n var prior = element.getAttribute(TABINDEX_STATE);\n if (prior >= 0) {\n element.setAttribute(TABINDEX, element.getAttribute(TABINDEX_STATE));\n } else if (prior === 'none') {\n element.removeAttribute(TABINDEX);\n }\n element.removeAttribute(TABINDEX_STATE);\n });\n }\n};\nvar autoFocusingTags = /(a|area|input|select|textarea|button|iframe)$/;\nvar makeNodeUnfocusable = exports.makeNodeUnfocusable = function makeNodeUnfocusable(node) {\n // do not touch aria live containers so that announcements work\n if (!node.hasAttribute('aria-live')) {\n node.setAttribute('aria-hidden', true);\n // prevent children to receive focus\n var elements = node.getElementsByTagName('*');\n // first, save off the tabIndex of any element with one\n Array.prototype.filter.call(elements || [], function (element) {\n return element.getAttribute(TABINDEX) !== null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, element.getAttribute(TABINDEX));\n element.setAttribute(TABINDEX, -1);\n });\n // then, if any element is inherently focusable and not handled above,\n // give it a tabIndex of -1 so it can't receive focus\n Array.prototype.filter.call(elements || [], function (element) {\n var currentTag = element.tagName.toLowerCase();\n return currentTag.match(autoFocusingTags) && element.focus && element.getAttribute(TABINDEX_STATE) === null;\n }).forEach(function (element) {\n element.setAttribute(TABINDEX_STATE, 'none');\n element.setAttribute(TABINDEX, -1);\n });\n }\n};\nvar findVisibleParent = exports.findVisibleParent = function findVisibleParent(element) {\n if (element) {\n // Get the closest ancestor element that is positioned.\n return element.offsetParent ? element : findVisibleParent(element.parentElement) || element;\n }\n return undefined;\n};\nvar isNodeAfterScroll = exports.isNodeAfterScroll = function isNodeAfterScroll(node, target) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n bottom = _node$getBoundingClie.bottom;\n // target will be the document from findScrollParent()\n var _ref = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n height: 0,\n top: 0\n },\n height = _ref.height,\n top = _ref.top;\n return bottom >= top + height;\n};\nvar isNodeBeforeScroll = exports.isNodeBeforeScroll = function isNodeBeforeScroll(node, target) {\n var _node$getBoundingClie2 = node.getBoundingClientRect(),\n top = _node$getBoundingClie2.top;\n // target will be the document from findScrollParent()\n var _ref2 = target.getBoundingClientRect ? target.getBoundingClientRect() : {\n top: 0\n },\n targetTop = _ref2.top;\n return top <= targetTop;\n};\nvar findButtonParent = exports.findButtonParent = function findButtonParent(element) {\n if (element && element.nodeName !== 'BUTTON' && element.nodeName !== 'A') return findButtonParent(element.parentElement);\n return element;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.PortalContext = void 0;\nvar _react = _interopRequireDefault(require(\"react\"));\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { \"default\": obj }; }\nvar PortalContext = exports.PortalContext = /*#__PURE__*/_react[\"default\"].createContext([]);","\"use strict\";\n\nexports.__esModule = true;\nexports.normalizeTiming = exports.animationObjectStyle = exports.animationEnding = exports.animationBounds = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar PULSE_SIZES = {\n xsmall: 1.001,\n small: 1.01,\n medium: 1.1,\n large: 1.5,\n xlarge: 2\n};\nvar SLIDE_SIZES = {\n xsmall: 1,\n small: 5,\n medium: 10,\n large: 50,\n xlarge: 200\n};\nvar JIGGLE_SIZES = {\n xsmall: 0.1,\n small: 1,\n medium: 5,\n large: 400,\n xlarge: 1000\n};\nvar ZOOM_SIZES = {\n xsmall: 0.001,\n small: 0.01,\n medium: 0.05,\n large: 0.1,\n xlarge: 0.5\n};\nvar animationBounds = exports.animationBounds = function animationBounds(type, size) {\n if (size === void 0) {\n size = 'medium';\n }\n if (type === 'draw') {\n return ['', \"stroke-dashoffset: 0\"];\n }\n if (type === 'fadeIn') {\n return ['opacity: 0;', 'opacity: 1;'];\n }\n if (type === 'fadeOut') {\n return ['opacity: 1;', 'opacity: 0;'];\n }\n if (type === 'jiggle') {\n var deg = JIGGLE_SIZES[size];\n return [\"transform: rotate(-\" + deg + \"deg);\", \"transform: rotate(\" + deg + \"deg);\"];\n }\n if (type === 'pulse') {\n return ['transform: scale(1);', \"transform: scale(\" + PULSE_SIZES[size] + \")\"];\n }\n if (type === 'rotateRight') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(359deg);\"];\n }\n if (type === 'rotateLeft') {\n return [\"transform: rotate(0deg);\", \"transform: rotate(-359deg);\"];\n }\n if (type === 'flipIn') {\n return ['transform: rotateY(90deg);', 'transform: rotateY(0);'];\n }\n if (type === 'flipOut') {\n return ['transform: rotateY(0);', 'transform: rotateY(90deg);'];\n }\n if (type === 'slideDown') {\n return [\"transform: translateY(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideLeft') {\n return [\"transform: translateX(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideRight') {\n return [\"transform: translateX(-\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'slideUp') {\n return [\"transform: translateY(\" + SLIDE_SIZES[size] + \"%);\", 'transform: none;'];\n }\n if (type === 'zoomIn') {\n return [\"transform: scale(\" + (1 - ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n if (type === 'zoomOut') {\n return [\"transform: scale(\" + (1 + ZOOM_SIZES[size]) + \");\", 'transform: none;'];\n }\n return [];\n};\nvar normalizeTiming = exports.normalizeTiming = function normalizeTiming(time, defaultTiming) {\n return typeof time === 'number' ? time / 1000.0 + \"s\" : time || defaultTiming;\n};\nvar animationEnding = exports.animationEnding = function animationEnding(type) {\n if (type === 'draw') {\n return 'linear forwards';\n }\n if (type === 'jiggle') {\n return 'alternate infinite';\n }\n if (type === 'pulse') {\n return 'alternate infinite';\n }\n if (type === 'rotateRight' || type === 'rotateLeft') {\n return 'infinite linear';\n }\n return 'forwards';\n};\nvar animationObjectStyle = exports.animationObjectStyle = function animationObjectStyle(animation, theme, themeObj) {\n var bounds = animationBounds(animation.type, animation.size);\n var animationTheme = themeObj && themeObj.animation || theme.global.animation;\n if (bounds) {\n var animationTransition = (0, _styledComponents.css)([\"from{\", \";}to{\", \";}\"], bounds[0], bounds[1]);\n var defaultDuration = function defaultDuration() {\n return normalizeTiming(animationTheme[animation.type] ? animationTheme[animation.type].duration : animation.duration, animationTheme.duration);\n };\n return (0, _styledComponents.css)([\"\", \" \", \" \", \" \", \"\"], (0, _styledComponents.keyframes)([\"\", \"\"], animationTransition), normalizeTiming(animation.duration, defaultDuration()), normalizeTiming(animation.delay, '0s'), animationEnding(animation.type));\n }\n return '';\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.selectedStyle = exports.normalizeBackground = exports.getHoverIndicatorStyle = exports.backgroundStyle = exports.backgroundIsDark = exports.backgroundAndTextColors = exports.activeStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _colors = require(\"./colors\");\n// evalStyle() converts a styled-components item into a string\nvar evalStyle = function evalStyle(arg, theme) {\n if (arg && Array.isArray(arg) && typeof arg[0] === 'function') {\n return arg[0]({\n theme: theme\n });\n }\n return arg;\n};\nvar normalizeBackground = exports.normalizeBackground = function normalizeBackground(backgroundArg, theme) {\n var _theme$global$backgro;\n var background = ((_theme$global$backgro = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro[backgroundArg]) || backgroundArg;\n var result = background;\n // If the background has a light or dark object, use that\n if (background) {\n if (theme.dark && background.dark && typeof background.dark !== 'boolean') {\n result = background.dark;\n } else if (!theme.dark && background.light && typeof background.light !== 'boolean') {\n result = background.light;\n }\n result = evalStyle(result, theme);\n }\n return result;\n};\nvar normalizeBackgroundColor = function normalizeBackgroundColor(backgroundArg, theme) {\n var _theme$global$backgro2;\n var background = backgroundArg.color || backgroundArg;\n var result = (0, _colors.normalizeColor)(\n // Background color may be defined by theme.global.backgrounds or\n // theme.global.colors.\n ((_theme$global$backgro2 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro2[background]) || background, theme, backgroundArg.dark);\n return result;\n};\nvar normalizeBackgroundImage = function normalizeBackgroundImage(background, theme) {\n var result;\n if (background.image) {\n var _theme$global$backgro3, _theme$global$backgro4;\n result = normalizeBackground(background.dark ? (_theme$global$backgro3 = theme.global.backgrounds) == null || (_theme$global$backgro3 = _theme$global$backgro3[background.image]) == null ? void 0 : _theme$global$backgro3.dark : (_theme$global$backgro4 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro4[background.image], theme) || background.image;\n } else {\n var _theme$global$backgro5;\n var normalized = normalizeBackground((_theme$global$backgro5 = theme.global.backgrounds) == null ? void 0 : _theme$global$backgro5[background], theme);\n result = typeof normalized === 'object' ? normalizeBackgroundImage(normalized, theme) : normalized;\n }\n return result;\n};\nvar rotateBackground = function rotateBackground(background, theme) {\n var backgroundImage = normalizeBackgroundImage(background, theme);\n var result = backgroundImage;\n if (backgroundImage.lastIndexOf('linear-gradient', 0) === 0) {\n var regex = /\\d{1,}deg\\b,/gm; // Contains rotation specified in degrees. Only targets 'deg' string with a trailing comma. Do not match 'deg' string for hsl, etc..\n result = backgroundImage.lastIndexOf('deg,') >= 0 ? backgroundImage.replace(regex, background.rotate + \"deg,\") : backgroundImage.replace('linear-gradient(', \"linear-gradient(\" + background.rotate + \"deg, \");\n } else {\n console.warn( // eslint-disable-next-line max-len\n \"'background.rotate' property only supports 'background.image' containing a linear-gradient string.\");\n }\n return result;\n};\nvar backgroundIsDark = exports.backgroundIsDark = function backgroundIsDark(backgroundArg, theme) {\n var background = normalizeBackground(backgroundArg, theme);\n var result;\n if (background) {\n if (typeof background === 'object') {\n var color = background.color,\n dark = background.dark,\n opacity = background.opacity;\n if (typeof dark === 'boolean') {\n result = dark;\n } else if (color && (\n // weak opacity means we keep the existing darkness\n !opacity || opacity !== 'weak')) {\n var backgroundColor = (0, _colors.normalizeColor)(background.color, theme);\n if (backgroundColor) {\n result = (0, _colors.colorIsDark)(backgroundColor);\n }\n }\n } else {\n var _color = (0, _colors.normalizeColor)(background, theme);\n if (_color) {\n result = (0, _colors.colorIsDark)(_color);\n }\n }\n }\n return result;\n};\nvar darkContext = function darkContext(backgroundColor) {\n var isDark = (0, _colors.colorIsDark)(backgroundColor);\n if (isDark === undefined) return undefined;\n return isDark ? 'dark' : 'light';\n};\n\n// Returns an array of two CSS colors: [background, color]\n// Either could be undefined.\n// background could be a CSS gradient, like \"linear-gradient(...)\"\nvar backgroundAndTextColors = exports.backgroundAndTextColors = function backgroundAndTextColors(backgroundArg, textArg, theme) {\n if (!backgroundArg) return [undefined, textArg];\n var global = theme.global;\n var background = normalizeBackground(backgroundArg, theme);\n var text = textArg || global.colors.text;\n var backgroundColor;\n var textColor;\n if (typeof background === 'object') {\n if (background.dark === false) {\n textColor = text.light || text;\n } else if (background.dark) {\n textColor = text.dark || text;\n }\n if (background.color) {\n var color = normalizeBackgroundColor(background, theme);\n var opacity = background.opacity === true ? global.opacity.medium : global.opacity[background.opacity] || background.opacity;\n backgroundColor = (0, _colors.getRGBA)(color, opacity) || color;\n\n // If we don't have a textColor already, and we aren't too translucent,\n // set the textColor to have the best contrast against the background\n // color.\n if (!textColor && (opacity === undefined || opacity > 0.3)) {\n var shade = darkContext(backgroundColor, theme);\n textColor = (0, _colors.normalizeColor)(shade && text[shade] || text, theme);\n }\n }\n } else {\n backgroundColor = normalizeBackgroundColor(background, theme);\n var _shade = darkContext(backgroundColor, theme);\n var transparent;\n if (backgroundColor && (0, _colors.canExtractRGBArray)(backgroundColor)) {\n var colorArray = (0, _colors.getRGBArray)(backgroundColor);\n // check if the alpha value is less than 0.5\n if (colorArray[3] < 0.5) transparent = true;\n }\n if (_shade) {\n textColor = (0, _colors.normalizeColor)(text[_shade] || text, theme, _shade === 'dark');\n } else if (transparent && text) {\n textColor = (0, _colors.normalizeColor)(text, theme);\n } else {\n // If we can't determine the shade, we assume this isn't a simple color.\n // It could be a gradient. backgroundStyle() will take care of that case.\n if (backgroundColor !== 'transparent') backgroundColor = undefined;\n if (text) textColor = (0, _colors.normalizeColor)(text, theme);\n }\n }\n // if textArg is false, we don't want the textColor, used for Button hover\n if (textArg === false) textColor = undefined;\n return [backgroundColor, textColor];\n};\nvar backgroundStyle = exports.backgroundStyle = function backgroundStyle(backgroundArg, theme, textColorArg) {\n // for Grommet component, if the background isn't defined, don't set it\n if (backgroundArg === undefined) return undefined;\n var background = normalizeBackground(backgroundArg, theme);\n var _backgroundAndTextCol = backgroundAndTextColors(background, textColorArg, theme),\n backgroundColor = _backgroundAndTextCol[0],\n textColor = _backgroundAndTextCol[1];\n var backgroundImage = background.rotate ? rotateBackground(background, theme) : normalizeBackgroundImage(background, theme);\n var backgroundClipStyle = '';\n if (background.clip) {\n backgroundClipStyle = background.clip === 'text' ? \"-webkit-text-fill-color: transparent; \\n -webkit-background-clip: text; \\n background-clip: text;\" : \"background-clip: \" + background.clip + \";\";\n }\n if (typeof background === 'string' && background.lastIndexOf('url', 0) === 0) {\n return (0, _styledComponents.css)([\"background:\", \" no-repeat center center;background-size:cover;\"], background);\n }\n if (backgroundImage) {\n var backgroundStyles = \"\\n \" + (backgroundColor ? \"background-color: \" + backgroundColor + \";\" : '') + \"\\n background-image: \" + backgroundImage + \";\\n background-repeat: \" + (typeof background === 'object' && background.repeat || 'no-repeat') + \";\\n background-position: \" + (background.position || 'center center') + \";\\n background-size: \" + (background.size || 'cover') + \";\\n \" + backgroundClipStyle + \"\\n \";\n\n // allow both background color and image, in case the image doesn't fill\n // when image and opacity are used together, we need to use pseudo :before\n // to ensure that only image and background color are affected by opacity\n // but not the container contents\n return (0, _styledComponents.css)([\"\", \" \", \"\"], textColor ? \"color: \" + textColor + \";\" : '', !background.opacity ? backgroundStyles : \"position: relative;\\n z-index: 0;\\n &:before {\\n content: '';\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n z-index: -1;\\n border-radius: inherit;\\n \" + backgroundStyles + \"\\n opacity: \" + (background.opacity === true ? theme.global.opacity.medium : theme.global.opacity[background.opacity] || background.opacity) + \";\\n }\");\n }\n if (backgroundColor) {\n return (0, _styledComponents.css)([\"background-color:\", \";\", \"\"], backgroundColor, textColor ? \"color: \" + textColor + \";\" : '');\n }\n if (typeof background === 'string')\n // This case takes care of gradients\n // or theme colors that use CSS names like 'crimson' that we don't parse\n return (0, _styledComponents.css)([\"background:\", \";\"], (0, _colors.normalizeColor)(background, theme));\n return undefined;\n};\nvar activeStyle = exports.activeStyle = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return backgroundStyle((0, _colors.normalizeColor)(props.theme.global.active.background, props.theme), props.theme, props.theme.global.active.color);\n});\nvar selectedStyle = exports.selectedStyle = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n return backgroundStyle((0, _colors.normalizeColor)(props.theme.global.selected.background, props.theme), props.theme, props.theme.global.selected.color);\n});\nvar getHoverIndicatorStyle = exports.getHoverIndicatorStyle = function getHoverIndicatorStyle(hoverIndicator, theme) {\n var background;\n var elevation;\n if (hoverIndicator === true || hoverIndicator === 'background') {\n background = theme.global.hover.background;\n } else if (typeof hoverIndicator === 'object') {\n if (hoverIndicator.elevation || hoverIndicator.background) {\n elevation = hoverIndicator.elevation;\n background = hoverIndicator.background;\n } else background = hoverIndicator;\n } else {\n background = hoverIndicator;\n }\n return (0, _styledComponents.css)([\"\", \" \", \"\"], backgroundStyle(background, theme, theme.global.hover.color), elevation && \"box-shadow: \" + theme.global.elevation[theme.dark ? 'dark' : 'light'][elevation] + \";\");\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.responsiveBorderStyle = exports.borderStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _colors = require(\"./colors\");\nvar _mixins = require(\"./mixins\");\nvar responsiveBorderStyle = exports.responsiveBorderStyle = function responsiveBorderStyle(data, theme) {\n var color = (0, _colors.normalizeColor)(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var breakpoint = theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n var value = breakpoint && (breakpoint.borderSize[borderSize] || borderSize) && style + \" \" + (breakpoint.borderSize[borderSize] || borderSize) + \" \" + color;\n if (!value) return undefined;\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') return \"border-\" + side + \": \" + value + \";\";\n if (side === 'end' || side === 'start') return \"border-inline-\" + side + \": \" + value + \";\";\n if (side === 'vertical') return \"\\n border-left: \" + value + \";\\n border-right: \" + value + \";\\n \";\n if (side === 'horizontal') return \"\\n border-top: \" + value + \";\\n border-bottom: \" + value + \";\\n \";\n if (side === 'between') return undefined; // no-op\n return \"border: \" + value + \";\";\n};\nvar borderStyle = exports.borderStyle = function borderStyle(borderData, responsive, theme) {\n var borderStyles = [];\n (Array.isArray(borderData) ? borderData : [borderData]).forEach(function (data) {\n var styles = [];\n var color = (0, _colors.normalizeColor)(data.color || 'border', theme);\n var borderSize = data.size || 'xsmall';\n var style = data.style || 'solid';\n var side = typeof data === 'string' ? data : data.side || 'all';\n var value = style + \" \" + (theme.global.borderSize[borderSize] || borderSize) + \" \" + color;\n var responsiveStyle = responsive && responsiveBorderStyle(data, theme);\n var breakpoint = responsiveStyle && theme.box.responsiveBreakpoint && theme.global.breakpoints[theme.box.responsiveBreakpoint];\n if (side === 'top' || side === 'bottom' || side === 'left' || side === 'right') {\n styles.push(\"border-\" + side + \": \" + value + \";\");\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'end' || side === 'start') {\n styles.push((0, _styledComponents.css)([\"border-inline-\", \":\", \";\"], side, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'vertical') {\n styles.push((0, _styledComponents.css)([\"border-left:\", \";border-right:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'horizontal') {\n styles.push((0, _styledComponents.css)([\"border-top:\", \";border-bottom:\", \";\"], value, value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n } else if (side === 'between') {\n // no-op\n } else {\n styles.push((0, _styledComponents.css)([\"border:\", \";\"], value));\n if (responsiveStyle) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, responsiveStyle));\n }\n }\n borderStyles.push(styles);\n });\n return borderStyles;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.normalizeColor = exports.getRGBArray = exports.getRGBA = exports.colorIsDark = exports.canExtractRGBArray = void 0;\n// Returns the specific color that should be used according to the theme.\n// If 'dark' is supplied, it takes precedence over 'theme.dark'.\n// Can return undefined.\nvar normalizeColor = exports.normalizeColor = function normalizeColor(color, theme, dark) {\n var colorSpec = theme.global && theme.global.colors[color] !== undefined ? theme.global.colors[color] : color;\n // If the color has a light or dark object, use that\n var result = colorSpec;\n if (colorSpec) {\n if ((dark === true || dark === undefined && theme.dark) && colorSpec.dark !== undefined) {\n result = colorSpec.dark;\n } else if ((dark === false || !theme.dark) && colorSpec.light !== undefined) {\n result = colorSpec.light;\n }\n }\n // allow one level of indirection in color names\n if (result && theme.global && theme.global.colors[result] !== undefined) {\n result = normalizeColor(result, theme, dark);\n }\n return result;\n};\nvar parseHexToRGB = function parseHexToRGB(color) {\n return color.length < 7 // 7 is what's needed for '#RRGGBB'\n ? color.match(/[A-Za-z0-9]{1}/g).map(function (v) {\n return parseInt(\"\" + v + v, 16);\n }) :\n // https://stackoverflow.com/a/42429333\n color.match(/[A-Za-z0-9]{2}/g).map(function (v) {\n return parseInt(v, 16);\n });\n};\n\n// From: https://stackoverflow.com/a/9493060/8513067\n// Converts an HSL color value to RGB. Conversion formula\n// adapted from http://en.wikipedia.org/wiki/HSL_color_space.\n// Assumes h, s, and l are contained in the set [0, 1] and\n// returns r, g, and b in the set [0, 255].\nvar hslToRGB = function hslToRGB(h, s, l) {\n var r;\n var g;\n var b;\n if (s === 0 || s === '0') {\n // achromatic\n r = l;\n g = l;\n b = l;\n } else {\n var hue2rgb = function hue2rgb(p, q, inT) {\n var t = inT;\n if (t < 0) t += 1;\n if (t > 1) t -= 1;\n if (t < 0.16666667) return p + (q - p) * 6 * t;\n if (t < 1 / 2) return q;\n if (t < 0.66666667) return p + (q - p) * (0.66666667 - t) * 6;\n return p;\n };\n var q = l < 0.5 ? l * (1 + s) : l + s - l * s;\n var p = 2 * l - q;\n r = hue2rgb(p, q, h + 0.33333333);\n g = hue2rgb(p, q, h);\n b = hue2rgb(p, q, h - 0.33333333);\n }\n return [Math.round(r * 255), Math.round(g * 255), Math.round(b * 255)];\n};\n\n// allow for alpha: #RGB, #RGBA, #RRGGBB, or #RRGGBBAA\nvar hexExp = /^#[A-Za-z0-9]{3,4}$|^#[A-Za-z0-9]{6,8}$/;\nvar rgbExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?\\)/;\nvar rgbaExp = /^rgba?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([0-9]*)\\s?,\\s?([.0-9]*)\\s?\\)/;\n// e.g. hsl(240, 60%, 50%)\nvar hslExp = /^hsla?\\(\\s?([0-9]*)\\s?,\\s?([0-9]*)%?\\s?,\\s?([0-9]*)%?\\s?.*?\\)/;\nvar canExtractRGBArray = exports.canExtractRGBArray = function canExtractRGBArray(color) {\n return hexExp.test(color) || rgbExp.test(color) || rgbaExp.test(color) || hslExp.test(color);\n};\nvar getRGBArray = exports.getRGBArray = function getRGBArray(color) {\n if (hexExp.test(color)) {\n var _parseHexToRGB = parseHexToRGB(color),\n red = _parseHexToRGB[0],\n green = _parseHexToRGB[1],\n blue = _parseHexToRGB[2],\n alpha = _parseHexToRGB[3];\n return [red, green, blue, alpha !== undefined ? alpha / 255.0 : undefined];\n }\n var match = color.match(rgbExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseInt(v, 10);\n });\n }\n match = color.match(rgbaExp);\n if (match) {\n return match.splice(1).map(function (v) {\n return parseFloat(v, 10);\n });\n }\n match = color.match(hslExp);\n if (match) {\n var _match$splice$map = match.splice(1).map(function (v) {\n return parseInt(v, 10);\n }),\n h = _match$splice$map[0],\n s = _match$splice$map[1],\n l = _match$splice$map[2];\n return hslToRGB(h / 360.0, s / 100.0, l / 100.0);\n }\n return color;\n};\nvar colorIsDark = exports.colorIsDark = function colorIsDark(color) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray = getRGBArray(color),\n red = _getRGBArray[0],\n green = _getRGBArray[1],\n blue = _getRGBArray[2],\n alpha = _getRGBArray[3];\n // if there is an alpha and it's greater than 50%, we can't really tell\n if (alpha < 0.5) return undefined;\n var brightness = (299 * red + 587 * green + 114 * blue) / 1000;\n // From: http://www.had2know.com/technology/color-contrast-calculator-web-design.html\n // Above domain is no longer registered.\n return brightness < 125;\n }\n return undefined;\n};\nvar getRGBA = exports.getRGBA = function getRGBA(color, opacity) {\n if (color && canExtractRGBArray(color)) {\n var _getRGBArray2 = getRGBArray(color),\n red = _getRGBArray2[0],\n green = _getRGBArray2[1],\n blue = _getRGBArray2[2],\n alpha = _getRGBArray2[3];\n var normalizedAlpha;\n if (opacity !== undefined) {\n normalizedAlpha = opacity;\n } else if (alpha !== undefined) {\n normalizedAlpha = alpha;\n } else {\n normalizedAlpha = 1;\n }\n return \"rgba(\" + red + \", \" + green + \", \" + blue + \", \" + normalizedAlpha + \")\";\n }\n return undefined;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.setHoursWithOffset = void 0;\nvar setHoursWithOffset = exports.setHoursWithOffset = function setHoursWithOffset(date) {\n var newDate = new Date(date);\n if ((date == null ? void 0 : date.indexOf('T')) === -1) {\n var offset = newDate.getTimezoneOffset();\n var hour = newDate.getHours();\n newDate.setHours(hour, offset < 0 ? -offset : offset);\n }\n return newDate;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.translateEndAngle = exports.polarToCartesian = exports.baseUnit = exports.arcCommands = void 0;\nvar POST_DECIMAL_DIGITS = 10;\nvar baseUnit = exports.baseUnit = 24;\nvar polarToCartesian = exports.polarToCartesian = function polarToCartesian(centerX, centerY, radius, angleInDegrees) {\n var angleInRadians = (angleInDegrees - 90) * Math.PI / 180.0;\n return {\n x: centerX + radius * Math.cos(angleInRadians),\n y: centerY + radius * Math.sin(angleInRadians)\n };\n};\nvar arcCommands = exports.arcCommands = function arcCommands(centerX, centerY, radius, startAngle, endAngle) {\n // handle that we can't draw a complete circle\n var normalizedEndAngle = endAngle;\n /* \n added endAngle - startAngle >= 360 \n for SemiCircle the endAngle will never be greater then startAngle \n since it starts with a startAngle of 270.\n */\n if (endAngle > startAngle && endAngle - startAngle >= 360) {\n normalizedEndAngle = startAngle + 359.99;\n }\n var start = polarToCartesian(centerX, centerY, radius, normalizedEndAngle);\n var end = polarToCartesian(centerX, centerY, radius, startAngle);\n var arcSweep = normalizedEndAngle - startAngle <= 180 ? '0' : '1';\n var d = ['M', start.x.toFixed(POST_DECIMAL_DIGITS), start.y.toFixed(POST_DECIMAL_DIGITS), 'A', radius.toFixed(POST_DECIMAL_DIGITS), radius.toFixed(POST_DECIMAL_DIGITS), 0, arcSweep, 0, end.x.toFixed(POST_DECIMAL_DIGITS), end.y.toFixed(POST_DECIMAL_DIGITS)].join(' ');\n return d;\n};\n\n/* TranslatedEngAngle will now take the value of the\nstartAngle + anglePer * value and mod by 360. This was added\nto take account the startAngle not being 0. So no matter the\nvalue it will be % 360 to get the correct angle. \n*/\nvar translateEndAngle = exports.translateEndAngle = function translateEndAngle(startAngle, anglePer, value) {\n return Math.max(0, startAngle + anglePer * value) % 360;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.useSizedIcon = void 0;\nvar _react = require(\"react\");\nvar useSizedIcon = exports.useSizedIcon = function useSizedIcon(icon, size, theme) {\n var _theme$icon;\n return icon && theme != null && (_theme$icon = theme.icon) != null && _theme$icon.matchSize && !icon.props.size ? /*#__PURE__*/(0, _react.cloneElement)(icon, {\n size: size\n }) : icon;\n};","\"use strict\";\n\nexports.__esModule = true;\nvar _animation = require(\"./animation\");\nObject.keys(_animation).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _animation[key]) return;\n exports[key] = _animation[key];\n});\nvar _mixins = require(\"./mixins\");\nObject.keys(_mixins).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _mixins[key]) return;\n exports[key] = _mixins[key];\n});\nvar _background = require(\"./background\");\nObject.keys(_background).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _background[key]) return;\n exports[key] = _background[key];\n});\nvar _border = require(\"./border\");\nObject.keys(_border).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _border[key]) return;\n exports[key] = _border[key];\n});\nvar _colors = require(\"./colors\");\nObject.keys(_colors).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _colors[key]) return;\n exports[key] = _colors[key];\n});\nvar _dates = require(\"./dates\");\nObject.keys(_dates).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _dates[key]) return;\n exports[key] = _dates[key];\n});\nvar _DOM = require(\"./DOM\");\nObject.keys(_DOM).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _DOM[key]) return;\n exports[key] = _DOM[key];\n});\nvar _graphics = require(\"./graphics\");\nObject.keys(_graphics).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _graphics[key]) return;\n exports[key] = _graphics[key];\n});\nvar _icon = require(\"./icon\");\nObject.keys(_icon).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _icon[key]) return;\n exports[key] = _icon[key];\n});\nvar _styles = require(\"./styles\");\nObject.keys(_styles).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _styles[key]) return;\n exports[key] = _styles[key];\n});\nvar _object = require(\"./object\");\nObject.keys(_object).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _object[key]) return;\n exports[key] = _object[key];\n});\nvar _pagination = require(\"./pagination\");\nObject.keys(_pagination).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _pagination[key]) return;\n exports[key] = _pagination[key];\n});\nvar _PortalContext = require(\"./PortalContext\");\nObject.keys(_PortalContext).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _PortalContext[key]) return;\n exports[key] = _PortalContext[key];\n});\nvar _readOnly = require(\"./readOnly\");\nObject.keys(_readOnly).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _readOnly[key]) return;\n exports[key] = _readOnly[key];\n});\nvar _refs = require(\"./refs\");\nObject.keys(_refs).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _refs[key]) return;\n exports[key] = _refs[key];\n});\nvar _responsive = require(\"./responsive\");\nObject.keys(_responsive).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _responsive[key]) return;\n exports[key] = _responsive[key];\n});\nvar _useKeyboard = require(\"./use-keyboard\");\nObject.keys(_useKeyboard).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (key in exports && exports[key] === _useKeyboard[key]) return;\n exports[key] = _useKeyboard[key];\n});","\"use strict\";\n\nexports.__esModule = true;\nexports.parseMetricToNum = exports.getAvailableAtBadge = exports.fontSize = exports.findAllByType = exports.edgeToNum = exports.breakpointStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar parseMetricToNum = exports.parseMetricToNum = function parseMetricToNum(metric) {\n if (typeof metric === 'number') return metric;\n if (metric.match(/\\s/) && process.env.NODE_ENV !== 'production') {\n console.warn(\"Invalid single measurement value: \\\"\" + metric + \"\\\"\");\n }\n return parseFloat(metric.match(/\\d+(\\.\\d+)?/), 10);\n};\nvar edgeToNum = exports.edgeToNum = function edgeToNum(size, theme) {\n return size ? parseMetricToNum(theme.global.edgeSize[size] || size) : 0;\n};\nvar fontSize = exports.fontSize = function fontSize(size, lineHeight) {\n return (0, _styledComponents.css)([\"font-size:\", \";line-height:\", \";\"], function (props) {\n return parseMetricToNum(size) / parseMetricToNum(props.theme.global.font.size) * 1 + \"rem\";\n }, function (props) {\n return lineHeight || Math.ceil(parseMetricToNum(size) / parseMetricToNum(props.theme.global.lineHeight)) * (parseMetricToNum(props.theme.global.lineHeight) / parseMetricToNum(size)) + \"px\";\n });\n};\nvar breakpointStyle = exports.breakpointStyle = function breakpointStyle(breakpoint, content) {\n return (0, _styledComponents.css)([\"@media only screen \", \"{\", \";}\"], breakpoint.value && \"and (max-width: \" + breakpoint.value + \"px)\", content);\n};\nvar findAllByType = exports.findAllByType = function findAllByType(component, type) {\n var matches = [];\n if (component.type === type) {\n matches.push(component);\n }\n if (component.children) {\n component.children.forEach(function (child) {\n matches = matches.concat(findAllByType(child, type));\n });\n }\n return matches;\n};\nvar getAvailableAtBadge = exports.getAvailableAtBadge = function getAvailableAtBadge(availableAt, componentType) {\n return [{\n url: \"https://storybook.grommet.io/?selectedKind=\" + componentType + \"-\" + availableAt + \"&full=0&stories=1&panelRight=0\",\n badge: 'https://cdn-images-1.medium.com/fit/c/120/120/1*TD1P0HtIH9zF0UEH28zYtw.png',\n label: 'Storybook'\n }, {\n url: \"https://codesandbox.io/s/github/grommet/grommet-sandbox?initialpath=/\" + availableAt.toLowerCase() + \"&module=%2Fsrc%2F\" + availableAt + \".js\",\n badge: 'https://codesandbox.io/static/img/play-codesandbox.svg',\n label: 'CodeSandbox'\n }];\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.removeUndefined = exports.isObject = exports.deepMerge = exports.deepFreeze = void 0;\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nvar isObject = exports.isObject = function isObject(item) {\n return item && typeof item === 'object' && !Array.isArray(item);\n};\nvar deepFreeze = exports.deepFreeze = function deepFreeze(obj) {\n Object.keys(obj).forEach(function (key) {\n return key && isObject(obj[key]) && Object.freeze(obj[key]);\n });\n return Object.freeze(obj);\n};\nvar deepMerge = exports.deepMerge = function deepMerge(target) {\n for (var _len = arguments.length, sources = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n sources[_key - 1] = arguments[_key];\n }\n if (!sources.length) {\n return target;\n }\n // making sure to not change target (immutable)\n var output = _extends({}, target);\n sources.forEach(function (source) {\n if (isObject(source)) {\n Object.keys(source).forEach(function (key) {\n if (isObject(source[key])) {\n if (!output[key]) {\n output[key] = _extends({}, source[key]);\n } else {\n output[key] = deepMerge(output[key], source[key]);\n }\n } else {\n output[key] = source[key];\n }\n });\n }\n });\n return output;\n};\nvar removeUndefined = exports.removeUndefined = function removeUndefined(obj) {\n var result = {};\n Object.keys(obj).forEach(function (key) {\n if (obj[key] !== undefined) {\n result[key] = obj[key];\n }\n });\n return result;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.usePagination = exports.normalizeShow = void 0;\nvar _react = require(\"react\");\nvar _excluded = [\"data\", \"page\", \"step\"];\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nvar normalizeShow = exports.normalizeShow = function normalizeShow(showProp, step) {\n var page;\n // by default, show refers to the index of an item,\n // but if using pagination, show can take the form of { page: # },\n // where page refers to the page # to show\n if (typeof showProp === 'number') page = Math.ceil((showProp + 1) / step);else if (typeof showProp === 'object' && 'page' in showProp) page = showProp.page;\n return page;\n};\nvar usePagination = exports.usePagination = function usePagination(_ref) {\n var data = _ref.data,\n page = _ref.page,\n step = _ref.step,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n var totalPages = data ? Math.ceil(data.length / step) : 0;\n var _useState = (0, _react.useState)(Math.min(page, totalPages) || 1),\n activePage = _useState[0],\n setActivePage = _useState[1];\n\n // ensure activePage is never lower than 1 to ensure that itemsBeginIndex\n // and itemsEndIndex aren't negative\n if (activePage > totalPages && (data == null ? void 0 : data.length) > 0) setActivePage(Math.max(totalPages, 1));\n var itemsBeginIndex = step * (activePage - 1);\n var itemsEndIndex = itemsBeginIndex + step;\n var currentItems = (0, _react.useMemo)(function () {\n if (Array.isArray(data)) return data.slice(itemsBeginIndex, itemsEndIndex);\n return [];\n }, [data, itemsBeginIndex, itemsEndIndex]);\n var paginationProps = _extends({\n numberItems: data && data.length,\n onChange: function onChange(event) {\n return setActivePage(event.page);\n },\n page: activePage,\n step: step\n }, rest);\n return [currentItems, paginationProps];\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.readOnlyStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _background = require(\"./background\");\nvar _colors = require(\"./colors\");\nvar readOnlyStyle = exports.readOnlyStyle = function readOnlyStyle(theme) {\n var _theme$global$input$r, _theme$global$input$r2, _theme$global$input$r3;\n var styles = [];\n if (theme != null && (_theme$global$input$r = theme.global.input.readOnly) != null && (_theme$global$input$r = _theme$global$input$r.border) != null && _theme$global$input$r.color) styles.push((0, _styledComponents.css)([\"border-color:\", \";\"], (0, _colors.normalizeColor)(theme.global.input.readOnly.border.color, theme)));\n if (theme != null && (_theme$global$input$r2 = theme.global.input.readOnly) != null && _theme$global$input$r2.background) styles.push((0, _background.backgroundStyle)((_theme$global$input$r3 = theme.global.input.readOnly) == null ? void 0 : _theme$global$input$r3.background, theme));\n return styles;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.useForwardedRef = void 0;\nvar _react = require(\"react\");\nvar useForwardedRef = exports.useForwardedRef = function useForwardedRef(ref) {\n var innerRef = (0, _react.useRef)(null);\n (0, _react.useImperativeHandle)(ref, function () {\n return innerRef.current;\n }, [innerRef]);\n return innerRef;\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.isSmall = exports.getDeviceBreakpoint = exports.getBreakpointStyle = exports.getBreakpoint = void 0;\nvar getBreakpoint = exports.getBreakpoint = function getBreakpoint(viewportWidth, theme) {\n var sortedBreakpoints = Object.keys(theme.global.breakpoints).sort(function (a, b) {\n var first = theme.global.breakpoints[a];\n var second = theme.global.breakpoints[b];\n if (!first) return 1;\n if (!second) return -1;\n if (!first.value) return 1;\n if (!second.value) return -1;\n return first.value - second.value;\n });\n\n // the last breakpoint on the sorted array should have\n // no windowWidth boundaries\n var lastBreakpoint = sortedBreakpoints[sortedBreakpoints.length - 1];\n var result = sortedBreakpoints.find(function (name) {\n var breakpoint = theme.global.breakpoints[name];\n return !breakpoint.value || breakpoint.value >= viewportWidth ? name : false;\n });\n return result || lastBreakpoint;\n};\nvar getDeviceBreakpoint = exports.getDeviceBreakpoint = function getDeviceBreakpoint(type, theme) {\n return theme.global.deviceBreakpoints[type];\n};\nvar getBreakpointStyle = exports.getBreakpointStyle = function getBreakpointStyle(theme, breakpointSize) {\n var breakpoint = breakpointSize && theme.global.breakpoints[breakpointSize] || {};\n if (!breakpoint.edgeSize) breakpoint.edgeSize = theme.global.edgeSize;\n if (!breakpoint.borderSize) breakpoint.borderSize = theme.global.borderSize;\n if (!breakpoint.size) breakpoint.size = theme.global.size;\n return breakpoint;\n};\n\n// for checks that look for a small screen size, flag for xsmall\n// as well since we use xsmall in the hpe theme\nvar isSmall = exports.isSmall = function isSmall(size) {\n return ['xsmall', 'small'].includes(size);\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.widthStyle = exports.unfocusStyle = exports.textAlignStyle = exports.sizeStyle = exports.roundStyle = exports.plainInputStyle = exports.overflowStyle = exports.kindPartStyles = exports.inputStyle = exports.inputPadForIcon = exports.heightStyle = exports.getInputPadBySide = exports.genericStyles = exports.focusStyle = exports.fillStyle = exports.edgeStyle = exports.disabledStyle = exports.controlBorderStyle = exports.baseStyle = exports.alignStyle = exports.alignContentStyle = void 0;\nvar _styledComponents = require(\"styled-components\");\nvar _background = require(\"./background\");\nvar _colors = require(\"./colors\");\nvar _responsive = require(\"./responsive\");\nvar _mixins = require(\"./mixins\");\nvar baseStyle = exports.baseStyle = (0, _styledComponents.css)([\"font-family:\", \";font-size:\", \";line-height:\", \";font-weight:\", \";\", \" \", \" box-sizing:border-box;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;\"], function (props) {\n return props.theme.global.font.family;\n}, function (props) {\n return props.theme.global.font.size;\n}, function (props) {\n return props.theme.global.font.height;\n}, function (props) {\n return props.theme.global.font.weight;\n}, function (props) {\n return props.theme.global.font.variant && \"\\n font-variant:\" + props.theme.global.font.variant + \";\\n \";\n}, function (props) {\n return !props.plain && (0, _background.backgroundStyle)(props.theme.baseBackground, props.theme);\n});\nvar controlBorderStyle = exports.controlBorderStyle = (0, _styledComponents.css)([\"border:\", \" solid \", \";border-radius:\", \";\"], function (props) {\n return props.theme.global.control.border.width;\n}, function (props) {\n return (0, _colors.normalizeColor)(props.theme.global.control.border.color || 'border', props.theme);\n}, function (props) {\n return props.theme.global.control.border.radius;\n});\nvar edgeStyle = exports.edgeStyle = function edgeStyle(kind, data, responsive, responsiveBreakpoint, theme) {\n var breakpoint = responsiveBreakpoint && theme.global.breakpoints[responsiveBreakpoint];\n if (typeof data === 'string') {\n return (0, _styledComponents.css)([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[data] || data, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[data] || data) + \";\\n \") : '');\n }\n var result = [];\n var horizontal = data.horizontal,\n vertical = data.vertical,\n top = data.top,\n bottom = data.bottom,\n left = data.left,\n right = data.right;\n\n // if horizontal and vertical are equal OR all sides are equal,\n // we can just return a single css value such as padding: 12px\n // instead of breaking out by sides.\n var horizontalVerticalEqual = horizontal && vertical && horizontal === vertical;\n var allSidesEqual = top && bottom && left && right && top === bottom === left === right;\n if (horizontalVerticalEqual || allSidesEqual) {\n // since the values will be the same between vertical & horizontal OR\n // left, right, top, & bottom, we can just choose one\n var value = horizontalVerticalEqual ? horizontal : top;\n return (0, _styledComponents.css)([\"\", \":\", \";\", \";\"], kind, theme.global.edgeSize[value] || value, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \": \" + (breakpoint.edgeSize[value] || value) + \";\\n \") : '');\n }\n if (horizontal) {\n result.push((0, _styledComponents.css)([\"\", \"-left:\", \";\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[horizontal] || horizontal, kind, theme.global.edgeSize[horizontal] || horizontal, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[horizontal] || horizontal) + \";\\n \") : ''));\n }\n if (vertical) {\n result.push((0, _styledComponents.css)([\"\", \"-top:\", \";\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[vertical] || vertical, kind, theme.global.edgeSize[vertical] || vertical, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[vertical] || vertical) + \";\\n \") : ''));\n }\n if (top) {\n result.push((0, _styledComponents.css)([\"\", \"-top:\", \";\", \";\"], kind, theme.global.edgeSize[top] || top, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-top: \" + (breakpoint.edgeSize[top] || top) + \";\\n \") : ''));\n }\n if (bottom) {\n result.push((0, _styledComponents.css)([\"\", \"-bottom:\", \";\", \";\"], kind, theme.global.edgeSize[bottom] || bottom, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-bottom: \" + (breakpoint.edgeSize[bottom] || bottom) + \";\\n \") : ''));\n }\n if (left) {\n result.push((0, _styledComponents.css)([\"\", \"-left:\", \";\", \";\"], kind, theme.global.edgeSize[left] || left, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-left: \" + (breakpoint.edgeSize[left] || left) + \";\\n \") : ''));\n }\n if (right) {\n result.push((0, _styledComponents.css)([\"\", \"-right:\", \";\", \";\"], kind, theme.global.edgeSize[right] || right, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-right: \" + (breakpoint.edgeSize[right] || right) + \";\\n \") : ''));\n }\n if (data.start) {\n result.push((0, _styledComponents.css)([\"\", \"-inline-start:\", \";\", \";\"], kind, theme.global.edgeSize[data.start] || data.start, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-inline-start: \" + (breakpoint.edgeSize[data.start] || data.start) + \";\\n \") : ''));\n }\n if (data.end) {\n result.push((0, _styledComponents.css)([\"\", \"-inline-end:\", \";\", \";\"], kind, theme.global.edgeSize[data.end] || data.end, responsive && breakpoint ? (0, _mixins.breakpointStyle)(breakpoint, \"\\n \" + kind + \"-inline-end: \" + (breakpoint.edgeSize[data.end] || data.end) + \";\\n \") : ''));\n }\n return result;\n};\nvar fillStyle = exports.fillStyle = function fillStyle(fillProp) {\n if (fillProp === 'horizontal') {\n return 'width: 100%;';\n }\n if (fillProp === 'vertical') {\n return 'height: 100%;';\n }\n if (fillProp) {\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n }\n return undefined;\n};\nvar focusStyles = function focusStyles(props, _temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n forceOutline = _ref.forceOutline,\n justBorder = _ref.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = (0, _colors.normalizeColor)('focus', props.theme);\n if (color) return \"outline: 2px solid \" + color + \";\";\n return ''; // native\n }\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n var _color = (0, _colors.normalizeColor)(focus.outline.color || 'focus', props.theme);\n var size = focus.outline.size || '2px';\n return \"\\n outline-offset: 0px;\\n outline: \" + size + \" solid \" + _color + \";\\n \";\n }\n return \"outline: \" + focus.outline + \";\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n var _color2 = (0, _colors.normalizeColor)(\n // If there is a focus.border.color, use that for shadow too.\n // This is for backwards compatibility in v2.\n focus.border && focus.border.color || focus.shadow.color || 'focus', props.theme);\n var _size = focus.shadow.size || '2px'; // backwards compatible default\n return \"\\n outline: none;\\n box-shadow: 0 0 \" + _size + \" \" + _size + \" \" + _color2 + \";\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: \" + focus.shadow + \";\\n \";\n }\n if (focus.border) {\n var _color3 = (0, _colors.normalizeColor)(focus.border.color || 'focus', props.theme);\n return \"\\n outline: none;\\n border-color: \" + _color3 + \";\\n \";\n }\n return ''; // defensive\n};\nvar unfocusStyles = function unfocusStyles(props, _temp2) {\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n forceOutline = _ref2.forceOutline,\n justBorder = _ref2.justBorder;\n var focus = props.theme.global.focus;\n if (!focus || forceOutline && !focus.outline) {\n var color = (0, _colors.normalizeColor)('focus', props.theme);\n if (color) return \"outline: none;\";\n return ''; // native\n }\n if (focus.outline && (!focus.border || !justBorder)) {\n if (typeof focus.outline === 'object') {\n return \"\\n outline-offset: 0px;\\n outline: none;\\n \";\n }\n return \"outline: none;\";\n }\n if (focus.shadow && (!focus.border || !justBorder)) {\n if (typeof focus.shadow === 'object') {\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n return \"\\n outline: none;\\n box-shadow: none;\\n \";\n }\n if (focus.border) {\n return \"\\n outline: none;\\n border-color: none;\\n \";\n }\n return ''; // defensive\n};\n\n// focus also supports clickable elements inside svg\nvar focusStyle = exports.focusStyle = function focusStyle(_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n forceOutline = _ref3.forceOutline,\n justBorder = _ref3.justBorder,\n skipSvgChildren = _ref3.skipSvgChildren;\n return (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + focusStyles(props) + \"\\n }\";\n }, function (props) {\n return focusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// This is placed next to focusStyle for easy maintainability\n// of code since changes to focusStyle should be reflected in\n// unfocusStyle as well.\n// this function can be used to reset focus styles which is\n// applicable when turning the focus ring off when using the mouse\n// see https://nelo.is/writing/styling-better-focus-states/\nvar unfocusStyle = exports.unfocusStyle = function unfocusStyle(_temp4) {\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n forceOutline = _ref4.forceOutline,\n justBorder = _ref4.justBorder,\n skipSvgChildren = _ref4.skipSvgChildren;\n return (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return !skipSvgChildren && \"\\n > circle,\\n > ellipse,\\n > line,\\n > path,\\n > polygon,\\n > polyline,\\n > rect {\\n \" + unfocusStyles(props) + \"\\n }\";\n }, function (props) {\n return unfocusStyles(props, {\n forceOutline: forceOutline,\n justBorder: justBorder\n });\n }, !forceOutline && \"\\n ::-moz-focus-inner {\\n border: 0;\\n }\\n \");\n};\n\n// For backwards compatibility we need to add back the control border width.\n// Based on how grommet was functioning prior to https://github.com/grommet/grommet/pull/3939,\n// the padding was subtracting the border width from the theme value, but the\n// placeholder was not. Because we're now placing the subtraction into the\n// theme itself, we have to add back in the border width here.\n// This is used for placeholder/icon in TextInput and MaskedInput.\nvar adjustPad = function adjustPad(props, value) {\n return (0, _mixins.parseMetricToNum)((props.theme.global.edgeSize[value] || value) + \"px\") + (0, _mixins.parseMetricToNum)(props.theme.global.control.border.width + \"px\") + \"px\";\n};\nvar getInputPadBySide = exports.getInputPadBySide = function getInputPadBySide(props, side) {\n if (typeof props.theme.global.input.padding !== 'object') {\n var _adjustedPad = adjustPad(props, props.theme.global.input.padding);\n return _adjustedPad;\n }\n var orientation;\n if (side === 'left' || side === 'right') orientation = 'horizontal';else if (side === 'top' || side === 'bottom') orientation = 'vertical';else orientation = undefined;\n\n // if individual side isn't available, fallback to the\n // orientation if possible\n var pad = props.theme.global.input.padding[side] || props.theme.global.input.padding[orientation];\n var adjustedPad = adjustPad(props, pad);\n return adjustedPad;\n};\nvar placeholderColor = (0, _styledComponents.css)([\"color:\", \";\"], function (props) {\n return (0, _colors.normalizeColor)(props.theme.global.colors.placeholder, props.theme);\n});\nvar placeholderStyle = (0, _styledComponents.css)([\"&::-webkit-input-placeholder{\", \";}&::-moz-placeholder{\", \";}&:-ms-input-placeholder{\", \";}\"], placeholderColor, placeholderColor, placeholderColor);\nvar inputSizeStyle = function inputSizeStyle(props) {\n var data = props.theme.text[props.size];\n if (!data) {\n return (0, _styledComponents.css)([\"font-size:\", \";\"], props.size);\n }\n return (0, _styledComponents.css)([\"font-size:\", \";line-height:\", \";\"], data.size, data.height);\n};\nvar inputStyle = exports.inputStyle = (0, _styledComponents.css)([\"box-sizing:border-box;\", \" font-family:inherit;border:none;-webkit-appearance:none;background:transparent;color:inherit;width:100%;\", \" \", \" \", \" margin:0;\", \" &:focus{\", \";}\", \" \", \"::-webkit-search-decoration{-webkit-appearance:none;}&::-moz-focus-inner{border:none;outline:none;}&:-moz-placeholder,&::-moz-placeholder{opacity:1;}\", \"\"], function (props) {\n var _props$theme$text$pro;\n return \"font-size: \" + (props.theme.global.input.font.size ? ((_props$theme$text$pro = props.theme.text[props.theme.global.input.font.size]) == null ? void 0 : _props$theme$text$pro.size) || props.theme.global.input.font.size : 'inherit') + \";\";\n}, function (props) {\n return props.theme.global.input.font.height && \"line-height: \" + props.theme.global.input.font.height + \";\";\n}, function (props) {\n return props.theme.global.input.padding && typeof props.theme.global.input.padding !== 'object' ? // On a breaking change release, this condition could be removed and\n // just the edgeStyle could remain. Currently, this is needed for\n // backwards compatibility since we are placing the calculation in\n // base.js\n \"padding: \" + ((0, _mixins.parseMetricToNum)(props.theme.global.edgeSize[props.theme.global.input.padding] || props.theme.global.input.padding) - (0, _mixins.parseMetricToNum)(props.theme.global.control.border.width)) + \"px;\" : edgeStyle('padding', props.theme.global.input.padding, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return (\n // for backwards compatibility, check if props.theme.global.input.weight\n (props.theme.global.input.weight || props.theme.global.input.font.weight) && (0, _styledComponents.css)([\"font-weight:\", \";\"], props.theme.global.input.weight || props.theme.global.input.font.weight)\n );\n}, function (props) {\n return props.size && inputSizeStyle(props);\n}, function (props) {\n return (!props.plain || props.focusIndicator) && focusStyle();\n}, controlBorderStyle, placeholderStyle, function (props) {\n return props.theme.global.input.extend;\n});\n\n// Apply padding on input to create space for icon.\n// When theme.icon.matchSize is true, the space for the\n// icon should equal the icon dimension + 12px (edgeSize.medium)\n// to ensure there is reasonable space between the icon and value or placeholder\nvar inputPadForIcon = exports.inputPadForIcon = (0, _styledComponents.css)([\"\", \"\"], function (props) {\n var _props$theme, _props$theme$icon;\n var pad = (_props$theme = props.theme) != null && (_props$theme = _props$theme.icon) != null && _props$theme.matchSize ? (0, _mixins.parseMetricToNum)((_props$theme$icon = props.theme.icon) == null || (_props$theme$icon = _props$theme$icon.size) == null ? void 0 : _props$theme$icon[(props == null ? void 0 : props.size) || 'medium']) + (0, _mixins.parseMetricToNum)(props.theme.global.edgeSize.medium) + \"px\" : props.theme.global.edgeSize.large;\n return props.reverse ? \"padding-right: \" + pad + \";\" : \"padding-left: \" + pad + \";\";\n});\nvar overflowStyle = exports.overflowStyle = function overflowStyle(overflowProp) {\n if (typeof overflowProp === 'string') {\n return (0, _styledComponents.css)([\"overflow:\", \";\"], overflowProp);\n }\n return (0, _styledComponents.css)([\"\", \" \", \";\"], overflowProp.horizontal && \"overflow-x: \" + overflowProp.horizontal + \";\", overflowProp.vertical && \"overflow-y: \" + overflowProp.vertical + \";\");\n};\nvar ALIGN_SELF_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch',\n baseline: 'baseline'\n};\nvar genericStyles = exports.genericStyles = (0, _styledComponents.css)([\"\", \" \", \" \", \"\"], function (props) {\n return props.alignSelf && \"align-self: \" + ALIGN_SELF_MAP[props.alignSelf] + \";\";\n}, function (props) {\n return props.gridArea && \"grid-area: \" + props.gridArea + \";\";\n}, function (props) {\n return props.margin && props.theme.global && edgeStyle('margin', props.margin, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n});\nvar disabledStyle = exports.disabledStyle = function disabledStyle(componentStyle) {\n return (0, _styledComponents.css)([\"opacity:\", \";cursor:default;\"], function (props) {\n return componentStyle || props.theme.global.control.disabled.opacity;\n });\n};\nvar sizeStyle = exports.sizeStyle = function sizeStyle(name, value, theme) {\n return (0, _styledComponents.css)([\"\", \":\", \";\"], name, theme.global.size[value] || value);\n};\nvar plainInputStyle = exports.plainInputStyle = (0, _styledComponents.css)([\"outline:none;border:none;\"]);\n\n// CSS for this sub-object in the theme\nvar kindPartStyles = exports.kindPartStyles = function kindPartStyles(obj, theme, colorValue) {\n var styles = [];\n if (obj.padding || obj.pad) {\n // button uses `padding` but other components use Grommet `pad`\n var pad = obj.padding || obj.pad;\n if (pad.vertical || pad.horizontal) styles.push(\"padding: \" + (theme.global.edgeSize[pad.vertical] || pad.vertical || 0) + \" \" + (theme.global.edgeSize[pad.horizontal] || pad.horizontal || 0) + \";\");else styles.push(\"padding: \" + (theme.global.edgeSize[pad] || pad || 0) + \";\");\n }\n if (obj.background) styles.push((0, _background.backgroundStyle)(colorValue || obj.background, theme, obj.color || (Object.prototype.hasOwnProperty.call(obj, 'color') && obj.color === undefined ? false : undefined)));else if (obj.color) styles.push(\"color: \" + (0, _colors.normalizeColor)(obj.color, theme) + \";\");\n if (obj.border) {\n if (obj.border.width) styles.push((0, _styledComponents.css)([\"border-style:solid;border-width:\", \";\"], obj.border.width));\n if (obj.border.color) styles.push((0, _styledComponents.css)([\"border-color:\", \";\"], (0, _colors.normalizeColor)(!obj.background && colorValue || obj.border.color || 'border', theme)));\n if (obj.border.radius) styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], obj.border.radius));\n } else if (obj.border === false) styles.push('border: none;');\n if (colorValue && !obj.border && !obj.background) styles.push(\"color: \" + (0, _colors.normalizeColor)(colorValue, theme) + \";\");\n if (obj.font) {\n if (obj.font.size) {\n styles.push(\"font-size: \" + (theme.text[obj.font.size].size || obj.font.size) + \";\");\n }\n if (obj.font.height) {\n styles.push(\"line-height: \" + obj.font.height + \";\");\n }\n if (obj.font.weight) {\n styles.push(\"font-weight: \" + obj.font.weight + \";\");\n }\n }\n if (obj.opacity) {\n var opacity = obj.opacity === true ? theme.global.opacity.medium : theme.global.opacity[obj.opacity] || obj.opacity;\n styles.push(\"opacity: \" + opacity + \";\");\n }\n if (obj.extend) styles.push(obj.extend);\n return styles;\n};\nvar ROUND_MAP = {\n full: '100%'\n};\nvar roundStyle = exports.roundStyle = function roundStyle(data, responsive, theme) {\n var breakpoint = (0, _responsive.getBreakpointStyle)(theme, theme.box.responsiveBreakpoint);\n var styles = [];\n if (typeof data === 'object') {\n var size = ROUND_MAP[data.size] || theme.global.edgeSize[data.size || 'medium'] || data.size;\n var responsiveSize = responsive && breakpoint && breakpoint.edgeSize[data.size] && (breakpoint.edgeSize[data.size] || data.size);\n if (data.corner === 'top') {\n styles.push((0, _styledComponents.css)([\"border-top-left-radius:\", \";border-top-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-top-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'bottom') {\n styles.push((0, _styledComponents.css)([\"border-bottom-left-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-bottom-left-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'left') {\n styles.push((0, _styledComponents.css)([\"border-top-left-radius:\", \";border-bottom-left-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-left-radius: \" + responsiveSize + \";\\n border-bottom-left-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner === 'right') {\n styles.push((0, _styledComponents.css)([\"border-top-right-radius:\", \";border-bottom-right-radius:\", \";\"], size, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-top-right-radius: \" + responsiveSize + \";\\n border-bottom-right-radius: \" + responsiveSize + \";\\n \"));\n }\n } else if (data.corner) {\n styles.push((0, _styledComponents.css)([\"border-\", \"-radius:\", \";\"], data.corner, size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-\" + data.corner + \"-radius: \" + responsiveSize + \";\\n \"));\n }\n } else {\n styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], size));\n if (responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-radius: \" + responsiveSize + \";\\n \"));\n }\n }\n } else {\n var _size2 = data === true ? 'medium' : data;\n styles.push((0, _styledComponents.css)([\"border-radius:\", \";\"], ROUND_MAP[_size2] || theme.global.edgeSize[_size2] || _size2));\n var _responsiveSize = breakpoint && breakpoint.edgeSize[_size2];\n if (_responsiveSize) {\n styles.push((0, _mixins.breakpointStyle)(breakpoint, \"\\n border-radius: \" + _responsiveSize + \";\\n \"));\n }\n }\n return styles;\n};\nvar TEXT_ALIGN_MAP = {\n center: 'center',\n end: 'right',\n justify: 'justify',\n start: 'left'\n};\nvar textAlignStyle = exports.textAlignStyle = (0, _styledComponents.css)([\"text-align:\", \";\"], function (props) {\n return TEXT_ALIGN_MAP[props.textAlign];\n});\nvar ALIGN_ITEMS_MAP = {\n baseline: 'baseline',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar alignStyle = exports.alignStyle = (0, _styledComponents.css)([\"align-items:\", \";\"], function (props) {\n var _ALIGN_ITEMS_MAP$prop;\n return (_ALIGN_ITEMS_MAP$prop = ALIGN_ITEMS_MAP[props.align]) != null ? _ALIGN_ITEMS_MAP$prop : props.align;\n});\nvar ALIGN_CONTENT_MAP = {\n around: 'space-around',\n baseline: 'baseline',\n between: 'space-between',\n center: 'center',\n evenly: 'space-evenly',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar alignContentStyle = exports.alignContentStyle = (0, _styledComponents.css)([\"align-content:\", \";\"], function (props) {\n var _ALIGN_CONTENT_MAP$pr;\n return (_ALIGN_CONTENT_MAP$pr = ALIGN_CONTENT_MAP[props.alignContent]) != null ? _ALIGN_CONTENT_MAP$pr : props.alignContent;\n});\nvar getSize = function getSize(theme, size) {\n return theme.global.size[size] || size;\n};\nvar widthObjectStyle = function widthObjectStyle(width, theme) {\n var result = [];\n if (width.max) result.push((0, _styledComponents.css)([\"max-width:\", \";\"], getSize(theme, width.max)));\n if (width.min) result.push((0, _styledComponents.css)([\"min-width:\", \";\"], getSize(theme, width.min)));\n if (width.width) result.push((0, _styledComponents.css)([\"width:\", \";\"], getSize(theme, width.width)));\n return result;\n};\nvar widthStringStyle = function widthStringStyle(width, theme) {\n return (0, _styledComponents.css)([\"width:\", \";\"], getSize(theme, width));\n};\nvar widthStyle = exports.widthStyle = function widthStyle(width, theme) {\n return typeof width === 'object' ? widthObjectStyle(width, theme) : widthStringStyle(width, theme);\n};\nvar heightObjectStyle = function heightObjectStyle(height, theme) {\n var result = [];\n if (height.max) result.push((0, _styledComponents.css)([\"max-height:\", \";\"], getSize(theme, height.max)));\n if (height.min) result.push((0, _styledComponents.css)([\"min-height:\", \";\"], getSize(theme, height.min)));\n // backwards compatibile\n if (height.width) result.push((0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height.height)));\n if (height.height) result.push((0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height.height)));\n return result;\n};\nvar heightStringStyle = function heightStringStyle(height, theme) {\n return (0, _styledComponents.css)([\"height:\", \";\"], getSize(theme, height));\n};\nvar heightStyle = exports.heightStyle = function heightStyle(height, theme) {\n return typeof height === 'object' ? heightObjectStyle(height, theme) : heightStringStyle(height, theme);\n};","\"use strict\";\n\nexports.__esModule = true;\nexports.useKeyboard = exports[\"default\"] = void 0;\nvar _react = require(\"react\");\nvar useKeyboard = exports.useKeyboard = function useKeyboard() {\n var _useState = (0, _react.useState)(),\n usingKeyboard = _useState[0],\n setUsingKeyboard = _useState[1];\n (0, _react.useEffect)(function () {\n var onMouseDown = function onMouseDown() {\n return setUsingKeyboard(false);\n };\n var onKeyDown = function onKeyDown() {\n return setUsingKeyboard(true);\n };\n document.addEventListener('mousedown', onMouseDown);\n document.addEventListener('keydown', onKeyDown);\n return function () {\n document.removeEventListener('mousedown', onMouseDown);\n document.removeEventListener('keydown', onKeyDown);\n };\n }, []);\n return usingKeyboard;\n};\nvar _default = exports[\"default\"] = useKeyboard;","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","\nmodule.exports = function load (src, opts, cb) {\n var head = document.head || document.getElementsByTagName('head')[0]\n var script = document.createElement('script')\n\n if (typeof opts === 'function') {\n cb = opts\n opts = {}\n }\n\n opts = opts || {}\n cb = cb || function() {}\n\n script.type = opts.type || 'text/javascript'\n script.charset = opts.charset || 'utf8';\n script.async = 'async' in opts ? !!opts.async : true\n script.src = src\n\n if (opts.attrs) {\n setAttributes(script, opts.attrs)\n }\n\n if (opts.text) {\n script.text = '' + opts.text\n }\n\n var onend = 'onload' in script ? stdOnEnd : ieOnEnd\n onend(script, cb)\n\n // some good legacy browsers (firefox) fail the 'in' detection above\n // so as a fallback we always set onload\n // old IE will ignore this and new IE will set onload\n if (!script.onload) {\n stdOnEnd(script, cb);\n }\n\n head.appendChild(script)\n}\n\nfunction setAttributes(script, attrs) {\n for (var attr in attrs) {\n script.setAttribute(attr, attrs[attr]);\n }\n}\n\nfunction stdOnEnd (script, cb) {\n script.onload = function () {\n this.onerror = this.onload = null\n cb(null, script)\n }\n script.onerror = function () {\n // this.onload = null here is necessary\n // because even IE9 works not like others\n this.onerror = this.onload = null\n cb(new Error('Failed to load ' + this.src), script)\n }\n}\n\nfunction ieOnEnd (script, cb) {\n script.onreadystatechange = function () {\n if (this.readyState != 'complete' && this.readyState != 'loaded') return\n this.onreadystatechange = null\n cb(null, script) // there is no way to catch loading errors in IE8\n }\n}\n","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","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(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 `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","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","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 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 getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","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","var MapCache = require('./_MapCache'),\n setCacheAdd = require('./_setCacheAdd'),\n setCacheHas = require('./_setCacheHas');\n\n/**\n *\n * Creates an array cache object to store unique values.\n *\n * @private\n * @constructor\n * @param {Array} [values] The values to cache.\n */\nfunction SetCache(values) {\n var index = -1,\n length = values == null ? 0 : values.length;\n\n this.__data__ = new MapCache;\n while (++index < length) {\n this.add(values[index]);\n }\n}\n\n// Add methods to `SetCache`.\nSetCache.prototype.add = SetCache.prototype.push = setCacheAdd;\nSetCache.prototype.has = setCacheHas;\n\nmodule.exports = SetCache;\n","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","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Uint8Array = root.Uint8Array;\n\nmodule.exports = Uint8Array;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","/**\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","/**\n * A specialized version of `baseAggregator` for arrays.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction arrayAggregator(array, setter, iteratee, accumulator) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n var value = array[index];\n setter(accumulator, value, iteratee(value), array);\n }\n return accumulator;\n}\n\nmodule.exports = arrayAggregator;\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","/**\n * A specialized version of `_.every` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n */\nfunction arrayEvery(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (!predicate(array[index], index, array)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = arrayEvery;\n","/**\n * A specialized version of `_.filter` for arrays without support for\n * iteratee shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {Array} Returns the new filtered array.\n */\nfunction arrayFilter(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length,\n resIndex = 0,\n result = [];\n\n while (++index < length) {\n var value = array[index];\n if (predicate(value, index, array)) {\n result[resIndex++] = value;\n }\n }\n return result;\n}\n\nmodule.exports = arrayFilter;\n","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","/**\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 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","/**\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","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","/**\n * A specialized version of `_.some` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} predicate The function invoked per iteration.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction arraySome(array, predicate) {\n var index = -1,\n length = array == null ? 0 : array.length;\n\n while (++index < length) {\n if (predicate(array[index], index, array)) {\n return true;\n }\n }\n return false;\n}\n\nmodule.exports = arraySome;\n","/**\n * Converts an ASCII `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction asciiToArray(string) {\n return string.split('');\n}\n\nmodule.exports = asciiToArray;\n","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","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\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 * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\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 assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\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","var baseEach = require('./_baseEach');\n\n/**\n * Aggregates elements of `collection` on `accumulator` with keys transformed\n * by `iteratee` and values set by `setter`.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} setter The function to set `accumulator` values.\n * @param {Function} iteratee The iteratee to transform keys.\n * @param {Object} accumulator The initial aggregated object.\n * @returns {Function} Returns `accumulator`.\n */\nfunction baseAggregator(collection, setter, iteratee, accumulator) {\n baseEach(collection, function(value, key, collection) {\n setter(accumulator, value, iteratee(value), collection);\n });\n return accumulator;\n}\n\nmodule.exports = baseAggregator;\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","var copyObject = require('./_copyObject'),\n keysIn = require('./keysIn');\n\n/**\n * The base implementation of `_.assignIn` 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 baseAssignIn(object, source) {\n return object && copyObject(source, keysIn(source), object);\n}\n\nmodule.exports = baseAssignIn;\n","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 Stack = require('./_Stack'),\n arrayEach = require('./_arrayEach'),\n assignValue = require('./_assignValue'),\n baseAssign = require('./_baseAssign'),\n baseAssignIn = require('./_baseAssignIn'),\n cloneBuffer = require('./_cloneBuffer'),\n copyArray = require('./_copyArray'),\n copySymbols = require('./_copySymbols'),\n copySymbolsIn = require('./_copySymbolsIn'),\n getAllKeys = require('./_getAllKeys'),\n getAllKeysIn = require('./_getAllKeysIn'),\n getTag = require('./_getTag'),\n initCloneArray = require('./_initCloneArray'),\n initCloneByTag = require('./_initCloneByTag'),\n initCloneObject = require('./_initCloneObject'),\n isArray = require('./isArray'),\n isBuffer = require('./isBuffer'),\n isMap = require('./isMap'),\n isObject = require('./isObject'),\n isSet = require('./isSet'),\n keys = require('./keys'),\n keysIn = require('./keysIn');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_FLAT_FLAG = 2,\n CLONE_SYMBOLS_FLAG = 4;\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 genTag = '[object GeneratorFunction]',\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 symbolTag = '[object Symbol]',\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 supported by `_.clone`. */\nvar cloneableTags = {};\ncloneableTags[argsTag] = cloneableTags[arrayTag] =\ncloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] =\ncloneableTags[boolTag] = cloneableTags[dateTag] =\ncloneableTags[float32Tag] = cloneableTags[float64Tag] =\ncloneableTags[int8Tag] = cloneableTags[int16Tag] =\ncloneableTags[int32Tag] = cloneableTags[mapTag] =\ncloneableTags[numberTag] = cloneableTags[objectTag] =\ncloneableTags[regexpTag] = cloneableTags[setTag] =\ncloneableTags[stringTag] = cloneableTags[symbolTag] =\ncloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] =\ncloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;\ncloneableTags[errorTag] = cloneableTags[funcTag] =\ncloneableTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.clone` and `_.cloneDeep` which tracks\n * traversed objects.\n *\n * @private\n * @param {*} value The value to clone.\n * @param {boolean} bitmask The bitmask flags.\n * 1 - Deep clone\n * 2 - Flatten inherited properties\n * 4 - Clone symbols\n * @param {Function} [customizer] The function to customize cloning.\n * @param {string} [key] The key of `value`.\n * @param {Object} [object] The parent object of `value`.\n * @param {Object} [stack] Tracks traversed objects and their clone counterparts.\n * @returns {*} Returns the cloned value.\n */\nfunction baseClone(value, bitmask, customizer, key, object, stack) {\n var result,\n isDeep = bitmask & CLONE_DEEP_FLAG,\n isFlat = bitmask & CLONE_FLAT_FLAG,\n isFull = bitmask & CLONE_SYMBOLS_FLAG;\n\n if (customizer) {\n result = object ? customizer(value, key, object, stack) : customizer(value);\n }\n if (result !== undefined) {\n return result;\n }\n if (!isObject(value)) {\n return value;\n }\n var isArr = isArray(value);\n if (isArr) {\n result = initCloneArray(value);\n if (!isDeep) {\n return copyArray(value, result);\n }\n } else {\n var tag = getTag(value),\n isFunc = tag == funcTag || tag == genTag;\n\n if (isBuffer(value)) {\n return cloneBuffer(value, isDeep);\n }\n if (tag == objectTag || tag == argsTag || (isFunc && !object)) {\n result = (isFlat || isFunc) ? {} : initCloneObject(value);\n if (!isDeep) {\n return isFlat\n ? copySymbolsIn(value, baseAssignIn(result, value))\n : copySymbols(value, baseAssign(result, value));\n }\n } else {\n if (!cloneableTags[tag]) {\n return object ? value : {};\n }\n result = initCloneByTag(value, tag, isDeep);\n }\n }\n // Check for circular references and return its corresponding clone.\n stack || (stack = new Stack);\n var stacked = stack.get(value);\n if (stacked) {\n return stacked;\n }\n stack.set(value, result);\n\n if (isSet(value)) {\n value.forEach(function(subValue) {\n result.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));\n });\n } else if (isMap(value)) {\n value.forEach(function(subValue, key) {\n result.set(key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n }\n\n var keysFunc = isFull\n ? (isFlat ? getAllKeysIn : getAllKeys)\n : (isFlat ? keysIn : keys);\n\n var props = isArr ? undefined : keysFunc(value);\n arrayEach(props || value, function(subValue, key) {\n if (props) {\n key = subValue;\n subValue = value[key];\n }\n // Recursively populate clone (susceptible to call stack limits).\n assignValue(result, key, baseClone(subValue, bitmask, customizer, key, value, stack));\n });\n return result;\n}\n\nmodule.exports = baseClone;\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 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 baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.every` 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 {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`\n */\nfunction baseEvery(collection, predicate) {\n var result = true;\n baseEach(collection, function(value, index, collection) {\n result = !!predicate(value, index, collection);\n return result;\n });\n return result;\n}\n\nmodule.exports = baseEvery;\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 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","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\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 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","var baseFor = require('./_baseFor'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nmodule.exports = baseForOwn;\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","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","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\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","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","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","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","var getTag = require('./_getTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]';\n\n/**\n * The base implementation of `_.isMap` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a map, else `false`.\n */\nfunction baseIsMap(value) {\n return isObjectLike(value) && getTag(value) == mapTag;\n}\n\nmodule.exports = baseIsMap;\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 * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\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 detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\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 */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\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","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","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","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\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 * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var isObject = require('./isObject'),\n isPrototype = require('./_isPrototype'),\n nativeKeysIn = require('./_nativeKeysIn');\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 * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeysIn;\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","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 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 baseIsEqual = require('./_baseIsEqual'),\n get = require('./get'),\n hasIn = require('./hasIn'),\n isKey = require('./_isKey'),\n isStrictComparable = require('./_isStrictComparable'),\n matchesStrictComparable = require('./_matchesStrictComparable'),\n toKey = require('./_toKey');\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 `_.matchesProperty` which doesn't clone `srcValue`.\n *\n * @private\n * @param {string} path The path of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseMatchesProperty(path, srcValue) {\n if (isKey(path) && isStrictComparable(srcValue)) {\n return matchesStrictComparable(toKey(path), srcValue);\n }\n return function(object) {\n var objValue = get(object, path);\n return (objValue === undefined && objValue === srcValue)\n ? hasIn(object, path)\n : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);\n };\n}\n\nmodule.exports = baseMatchesProperty;\n","var Stack = require('./_Stack'),\n assignMergeValue = require('./_assignMergeValue'),\n baseFor = require('./_baseFor'),\n baseMergeDeep = require('./_baseMergeDeep'),\n isObject = require('./isObject'),\n keysIn = require('./keysIn'),\n safeGet = require('./_safeGet');\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\nmodule.exports = baseMerge;\n","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 arrayMap = require('./_arrayMap'),\n baseGet = require('./_baseGet'),\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 isArray = require('./isArray');\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 if (iteratees.length) {\n iteratees = arrayMap(iteratees, function(iteratee) {\n if (isArray(iteratee)) {\n return function(value) {\n return baseGet(value, iteratee.length === 1 ? iteratee[0] : iteratee);\n }\n }\n return iteratee;\n });\n } else {\n iteratees = [identity];\n }\n\n var index = -1;\n iteratees = arrayMap(iteratees, 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","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","/**\n * The base implementation of `_.property` without support for deep paths.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction baseProperty(key) {\n return function(object) {\n return object == null ? undefined : object[key];\n };\n}\n\nmodule.exports = baseProperty;\n","var baseGet = require('./_baseGet');\n\n/**\n * A specialized version of `baseProperty` which supports deep paths.\n *\n * @private\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n */\nfunction basePropertyDeep(path) {\n return function(object) {\n return baseGet(object, path);\n };\n}\n\nmodule.exports = basePropertyDeep;\n","/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeCeil = Math.ceil,\n nativeMax = Math.max;\n\n/**\n * The base implementation of `_.range` and `_.rangeRight` which doesn't\n * coerce arguments.\n *\n * @private\n * @param {number} start The start of the range.\n * @param {number} end The end of the range.\n * @param {number} step The value to increment or decrement by.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Array} Returns the range of numbers.\n */\nfunction baseRange(start, end, step, fromRight) {\n var index = -1,\n length = nativeMax(nativeCeil((end - start) / (step || 1)), 0),\n result = Array(length);\n\n while (length--) {\n result[fromRight ? length : ++index] = start;\n start += step;\n }\n return result;\n}\n\nmodule.exports = baseRange;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","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","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseEach = require('./_baseEach');\n\n/**\n * The base implementation of `_.some` 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 {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n */\nfunction baseSome(collection, predicate) {\n var result;\n\n baseEach(collection, function(value, index, collection) {\n result = predicate(value, index, collection);\n return !result;\n });\n return !!result;\n}\n\nmodule.exports = baseSome;\n","/**\n * The base implementation of `_.sortBy` which uses `comparer` to define the\n * sort order of `array` and replaces criteria objects with their corresponding\n * values.\n *\n * @private\n * @param {Array} array The array to sort.\n * @param {Function} comparer The function to define sort order.\n * @returns {Array} Returns `array`.\n */\nfunction baseSortBy(array, comparer) {\n var length = array.length;\n\n array.sort(comparer);\n while (length--) {\n array[length] = array[length].value;\n }\n return array;\n}\n\nmodule.exports = baseSortBy;\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 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","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\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 SetCache = require('./_SetCache'),\n arrayIncludes = require('./_arrayIncludes'),\n arrayIncludesWith = require('./_arrayIncludesWith'),\n cacheHas = require('./_cacheHas'),\n createSet = require('./_createSet'),\n setToArray = require('./_setToArray');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * The base implementation of `_.uniqBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns the new duplicate free array.\n */\nfunction baseUniq(array, iteratee, comparator) {\n var index = -1,\n includes = arrayIncludes,\n length = array.length,\n isCommon = true,\n result = [],\n seen = result;\n\n if (comparator) {\n isCommon = false;\n includes = arrayIncludesWith;\n }\n else if (length >= LARGE_ARRAY_SIZE) {\n var set = iteratee ? null : createSet(array);\n if (set) {\n return setToArray(set);\n }\n isCommon = false;\n includes = cacheHas;\n seen = new SetCache;\n }\n else {\n seen = iteratee ? [] : result;\n }\n outer:\n while (++index < length) {\n var value = array[index],\n computed = iteratee ? iteratee(value) : value;\n\n value = (comparator || value !== 0) ? value : 0;\n if (isCommon && computed === computed) {\n var seenIndex = seen.length;\n while (seenIndex--) {\n if (seen[seenIndex] === computed) {\n continue outer;\n }\n }\n if (iteratee) {\n seen.push(computed);\n }\n result.push(value);\n }\n else if (!includes(seen, computed, comparator)) {\n if (seen !== result) {\n seen.push(computed);\n }\n result.push(value);\n }\n }\n return result;\n}\n\nmodule.exports = baseUniq;\n","var arrayMap = require('./_arrayMap');\n\n/**\n * The base implementation of `_.values` and `_.valuesIn` which creates an\n * array of `object` property values corresponding to the property names\n * of `props`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array} props The property names to get values for.\n * @returns {Object} Returns the array of property values.\n */\nfunction baseValues(object, props) {\n return arrayMap(props, function(key) {\n return object[key];\n });\n}\n\nmodule.exports = baseValues;\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 isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\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 * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var baseSlice = require('./_baseSlice');\n\n/**\n * Casts `array` to a slice if it's needed.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {number} start The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the cast slice.\n */\nfunction castSlice(array, start, end) {\n var length = array.length;\n end = end === undefined ? length : end;\n return (!start && end >= length) ? array : baseSlice(array, start, end);\n}\n\nmodule.exports = castSlice;\n","var Uint8Array = require('./_Uint8Array');\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\nmodule.exports = cloneArrayBuffer;\n","var root = require('./_root');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined;\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\nmodule.exports = cloneBuffer;\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","/** 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 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","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","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","var compareAscending = require('./_compareAscending');\n\n/**\n * Used by `_.orderBy` to compare multiple properties of a value to another\n * and stable sort them.\n *\n * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,\n * specify an order of \"desc\" for descending or \"asc\" for ascending sort order\n * of corresponding values.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {boolean[]|string[]} orders The order to sort by for each property.\n * @returns {number} Returns the sort order indicator for `object`.\n */\nfunction compareMultiple(object, other, orders) {\n var index = -1,\n objCriteria = object.criteria,\n othCriteria = other.criteria,\n length = objCriteria.length,\n ordersLength = orders.length;\n\n while (++index < length) {\n var result = compareAscending(objCriteria[index], othCriteria[index]);\n if (result) {\n if (index >= ordersLength) {\n return result;\n }\n var order = orders[index];\n return result * (order == 'desc' ? -1 : 1);\n }\n }\n // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications\n // that causes it, under certain circumstances, to provide the same value for\n // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247\n // for more details.\n //\n // This also ensures a stable sort in V8 and other engines.\n // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.\n return object.index - other.index;\n}\n\nmodule.exports = compareMultiple;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\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 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","var copyObject = require('./_copyObject'),\n getSymbolsIn = require('./_getSymbolsIn');\n\n/**\n * Copies own and inherited 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 copySymbolsIn(source, object) {\n return copyObject(source, getSymbolsIn(source), object);\n}\n\nmodule.exports = copySymbolsIn;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var arrayAggregator = require('./_arrayAggregator'),\n baseAggregator = require('./_baseAggregator'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray');\n\n/**\n * Creates a function like `_.groupBy`.\n *\n * @private\n * @param {Function} setter The function to set accumulator values.\n * @param {Function} [initializer] The accumulator object initializer.\n * @returns {Function} Returns the new aggregator function.\n */\nfunction createAggregator(setter, initializer) {\n return function(collection, iteratee) {\n var func = isArray(collection) ? arrayAggregator : baseAggregator,\n accumulator = initializer ? initializer() : {};\n\n return func(collection, setter, baseIteratee(iteratee, 2), accumulator);\n };\n}\n\nmodule.exports = createAggregator;\n","var baseRest = require('./_baseRest'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\nmodule.exports = createAssigner;\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","/**\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 castSlice = require('./_castSlice'),\n hasUnicode = require('./_hasUnicode'),\n stringToArray = require('./_stringToArray'),\n toString = require('./toString');\n\n/**\n * Creates a function like `_.lowerFirst`.\n *\n * @private\n * @param {string} methodName The name of the `String` case method to use.\n * @returns {Function} Returns the new case function.\n */\nfunction createCaseFirst(methodName) {\n return function(string) {\n string = toString(string);\n\n var strSymbols = hasUnicode(string)\n ? stringToArray(string)\n : undefined;\n\n var chr = strSymbols\n ? strSymbols[0]\n : string.charAt(0);\n\n var trailing = strSymbols\n ? castSlice(strSymbols, 1).join('')\n : string.slice(1);\n\n return chr[methodName]() + trailing;\n };\n}\n\nmodule.exports = createCaseFirst;\n","var baseIteratee = require('./_baseIteratee'),\n isArrayLike = require('./isArrayLike'),\n keys = require('./keys');\n\n/**\n * Creates a `_.find` or `_.findLast` function.\n *\n * @private\n * @param {Function} findIndexFunc The function to find the collection index.\n * @returns {Function} Returns the new find function.\n */\nfunction createFind(findIndexFunc) {\n return function(collection, predicate, fromIndex) {\n var iterable = Object(collection);\n if (!isArrayLike(collection)) {\n var iteratee = baseIteratee(predicate, 3);\n collection = keys(collection);\n predicate = function(key) { return iteratee(iterable[key], key, iterable); };\n }\n var index = findIndexFunc(collection, predicate, fromIndex);\n return index > -1 ? iterable[iteratee ? collection[index] : index] : undefined;\n };\n}\n\nmodule.exports = createFind;\n","var baseRange = require('./_baseRange'),\n isIterateeCall = require('./_isIterateeCall'),\n toFinite = require('./toFinite');\n\n/**\n * Creates a `_.range` or `_.rangeRight` function.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new range function.\n */\nfunction createRange(fromRight) {\n return function(start, end, step) {\n if (step && typeof step != 'number' && isIterateeCall(start, end, step)) {\n end = step = undefined;\n }\n // Ensure the sign of `-0` is preserved.\n start = toFinite(start);\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = toFinite(end);\n }\n step = step === undefined ? (start < end ? 1 : -1) : toFinite(step);\n return baseRange(start, end, step, fromRight);\n };\n}\n\nmodule.exports = createRange;\n","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 getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\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 // Check that cyclic values are equal.\n var arrStacked = stack.get(array);\n var othStacked = stack.get(other);\n if (arrStacked && othStacked) {\n return arrStacked == other && othStacked == array;\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 Uint8Array = require('./_Uint8Array'),\n eq = require('./eq'),\n equalArrays = require('./_equalArrays'),\n mapToArray = require('./_mapToArray'),\n setToArray = require('./_setToArray');\n\n/** Used to compose bitmasks for value comparisons. */\nvar COMPARE_PARTIAL_FLAG = 1,\n COMPARE_UNORDERED_FLAG = 2;\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\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\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;\n\n/**\n * A specialized version of `baseIsEqualDeep` for comparing objects of\n * the same `toStringTag`.\n *\n * **Note:** This function only supports comparing values with tags of\n * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.\n *\n * @private\n * @param {Object} object The object to compare.\n * @param {Object} other The other object to compare.\n * @param {string} tag The `toStringTag` of the objects 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 equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {\n switch (tag) {\n case dataViewTag:\n if ((object.byteLength != other.byteLength) ||\n (object.byteOffset != other.byteOffset)) {\n return false;\n }\n object = object.buffer;\n other = other.buffer;\n\n case arrayBufferTag:\n if ((object.byteLength != other.byteLength) ||\n !equalFunc(new Uint8Array(object), new Uint8Array(other))) {\n return false;\n }\n return true;\n\n case boolTag:\n case dateTag:\n case numberTag:\n // Coerce booleans to `1` or `0` and dates to milliseconds.\n // Invalid dates are coerced to `NaN`.\n return eq(+object, +other);\n\n case errorTag:\n return object.name == other.name && object.message == other.message;\n\n case regexpTag:\n case stringTag:\n // Coerce regexes to strings and treat strings, primitives and objects,\n // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring\n // for more details.\n return object == (other + '');\n\n case mapTag:\n var convert = mapToArray;\n\n case setTag:\n var isPartial = bitmask & COMPARE_PARTIAL_FLAG;\n convert || (convert = setToArray);\n\n if (object.size != other.size && !isPartial) {\n return false;\n }\n // Assume cyclic values are equal.\n var stacked = stack.get(object);\n if (stacked) {\n return stacked == other;\n }\n bitmask |= COMPARE_UNORDERED_FLAG;\n\n // Recursively compare objects (susceptible to call stack limits).\n stack.set(object, other);\n var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);\n stack['delete'](object);\n return result;\n\n case symbolTag:\n if (symbolValueOf) {\n return symbolValueOf.call(object) == symbolValueOf.call(other);\n }\n }\n return false;\n}\n\nmodule.exports = equalByTag;\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 // Check that cyclic values are equal.\n var objStacked = stack.get(object);\n var othStacked = stack.get(other);\n if (objStacked && othStacked) {\n return objStacked == other && othStacked == object;\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","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\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","var baseGetAllKeys = require('./_baseGetAllKeys'),\n getSymbolsIn = require('./_getSymbolsIn'),\n keysIn = require('./keysIn');\n\n/**\n * Creates an array of own and inherited enumerable property names and\n * 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 getAllKeysIn(object) {\n return baseGetAllKeys(object, keysIn, getSymbolsIn);\n}\n\nmodule.exports = getAllKeysIn;\n","var isKeyable = require('./_isKeyable');\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 */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var isStrictComparable = require('./_isStrictComparable'),\n keys = require('./keys');\n\n/**\n * Gets the property names, values, and compare flags of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the match data of `object`.\n */\nfunction getMatchData(object) {\n var result = keys(object),\n length = result.length;\n\n while (length--) {\n var key = result[length],\n value = object[key];\n\n result[length] = [key, value, isStrictComparable(value)];\n }\n return result;\n}\n\nmodule.exports = getMatchData;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\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 */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var overArg = require('./_overArg');\n\n/** Built-in value references. */\nvar getPrototype = overArg(Object.getPrototypeOf, Object);\n\nmodule.exports = getPrototype;\n","var Symbol = require('./_Symbol');\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 * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","var arrayFilter = require('./_arrayFilter'),\n stubArray = require('./stubArray');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\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 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 getSymbols = !nativeGetSymbols ? stubArray : function(object) {\n if (object == null) {\n return [];\n }\n object = Object(object);\n return arrayFilter(nativeGetSymbols(object), function(symbol) {\n return propertyIsEnumerable.call(object, symbol);\n });\n};\n\nmodule.exports = getSymbols;\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 DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\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 */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsZWJ = '\\\\u200d';\n\n/** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */\nvar reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']');\n\n/**\n * Checks if `string` contains Unicode symbols.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {boolean} Returns `true` if a symbol is found, else `false`.\n */\nfunction hasUnicode(string) {\n return reHasUnicode.test(string);\n}\n\nmodule.exports = hasUnicode;\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","/**\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 */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","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","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 nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\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 */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\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 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","var baseCreate = require('./_baseCreate'),\n getPrototype = require('./_getPrototype'),\n isPrototype = require('./_isPrototype');\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\nmodule.exports = initCloneObject;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\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 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 isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\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 */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\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 */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\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 */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","var isObject = require('./isObject');\n\n/**\n * Checks if `value` is suitable for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` if suitable for strict\n * equality comparisons, else `false`.\n */\nfunction isStrictComparable(value) {\n return value === value && !isObject(value);\n}\n\nmodule.exports = isStrictComparable;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\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 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","var assocIndexOf = require('./_assocIndexOf');\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 */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","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 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 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 getMapData = require('./_getMapData');\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 */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\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","var getMapData = require('./_getMapData');\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 */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","/**\n * Converts `map` to its key-value pairs.\n *\n * @private\n * @param {Object} map The map to convert.\n * @returns {Array} Returns the key-value pairs.\n */\nfunction mapToArray(map) {\n var index = -1,\n result = Array(map.size);\n\n map.forEach(function(value, key) {\n result[++index] = [key, value];\n });\n return result;\n}\n\nmodule.exports = mapToArray;\n","/**\n * A specialized version of `matchesProperty` for source values suitable\n * for strict equality comparisons, i.e. `===`.\n *\n * @private\n * @param {string} key The key of the property to get.\n * @param {*} srcValue The value to match.\n * @returns {Function} Returns the new spec function.\n */\nfunction matchesStrictComparable(key, srcValue) {\n return function(object) {\n if (object == null) {\n return false;\n }\n return object[key] === srcValue &&\n (srcValue !== undefined || (key in Object(object)));\n };\n}\n\nmodule.exports = matchesStrictComparable;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\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 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 * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = nativeKeysIn;\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","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\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 */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\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","/** 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 * Checks if `value` is in the array cache.\n *\n * @private\n * @name has\n * @memberOf SetCache\n * @param {*} value The value to search for.\n * @returns {number} Returns `true` if `value` is found, else `false`.\n */\nfunction setCacheHas(value) {\n return this.__data__.has(value);\n}\n\nmodule.exports = setCacheHas;\n","/**\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","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","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var ListCache = require('./_ListCache');\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\nmodule.exports = stackClear;\n","/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\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 stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\nmodule.exports = stackDelete;\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 * 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","var ListCache = require('./_ListCache'),\n Map = require('./_Map'),\n MapCache = require('./_MapCache');\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\nmodule.exports = stackSet;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var asciiToArray = require('./_asciiToArray'),\n hasUnicode = require('./_hasUnicode'),\n unicodeToArray = require('./_unicodeToArray');\n\n/**\n * Converts `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction stringToArray(string) {\n return hasUnicode(string)\n ? unicodeToArray(string)\n : asciiToArray(string);\n}\n\nmodule.exports = stringToArray;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\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 */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\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 */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","/** Used to compose unicode character classes. */\nvar rsAstralRange = '\\\\ud800-\\\\udfff',\n rsComboMarksRange = '\\\\u0300-\\\\u036f',\n reComboHalfMarksRange = '\\\\ufe20-\\\\ufe2f',\n rsComboSymbolsRange = '\\\\u20d0-\\\\u20ff',\n rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange,\n rsVarRange = '\\\\ufe0e\\\\ufe0f';\n\n/** Used to compose unicode capture groups. */\nvar rsAstral = '[' + rsAstralRange + ']',\n rsCombo = '[' + rsComboRange + ']',\n rsFitz = '\\\\ud83c[\\\\udffb-\\\\udfff]',\n rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')',\n rsNonAstral = '[^' + rsAstralRange + ']',\n rsRegional = '(?:\\\\ud83c[\\\\udde6-\\\\uddff]){2}',\n rsSurrPair = '[\\\\ud800-\\\\udbff][\\\\udc00-\\\\udfff]',\n rsZWJ = '\\\\u200d';\n\n/** Used to compose unicode regexes. */\nvar reOptMod = rsModifier + '?',\n rsOptVar = '[' + rsVarRange + ']?',\n rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*',\n rsSeq = rsOptVar + reOptMod + rsOptJoin,\n rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')';\n\n/** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */\nvar reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g');\n\n/**\n * Converts a Unicode `string` to an array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the converted array.\n */\nfunction unicodeToArray(string) {\n return string.match(reUnicode) || [];\n}\n\nmodule.exports = unicodeToArray;\n","var baseClone = require('./_baseClone');\n\n/** Used to compose bitmasks for cloning. */\nvar CLONE_DEEP_FLAG = 1,\n CLONE_SYMBOLS_FLAG = 4;\n\n/**\n * This method is like `_.clone` except that it recursively clones `value`.\n *\n * @static\n * @memberOf _\n * @since 1.0.0\n * @category Lang\n * @param {*} value The value to recursively clone.\n * @returns {*} Returns the deep cloned value.\n * @see _.clone\n * @example\n *\n * var objects = [{ 'a': 1 }, { 'b': 2 }];\n *\n * var deep = _.cloneDeep(objects);\n * console.log(deep[0] === objects[0]);\n * // => false\n */\nfunction cloneDeep(value) {\n return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);\n}\n\nmodule.exports = cloneDeep;\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 baseAssignValue = require('./_baseAssignValue'),\n createAggregator = require('./_createAggregator');\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 object composed of keys generated from the results of running\n * each element of `collection` thru `iteratee`. The corresponding value of\n * each key is the number of times the key was returned by `iteratee`. The\n * iteratee is invoked with one argument: (value).\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The iteratee to transform keys.\n * @returns {Object} Returns the composed aggregate object.\n * @example\n *\n * _.countBy([6.1, 4.2, 6.3], Math.floor);\n * // => { '4': 1, '6': 2 }\n *\n * // The `_.property` iteratee shorthand.\n * _.countBy(['one', 'two', 'three'], 'length');\n * // => { '3': 2, '5': 1 }\n */\nvar countBy = createAggregator(function(result, value, key) {\n if (hasOwnProperty.call(result, key)) {\n ++result[key];\n } else {\n baseAssignValue(result, key, 1);\n }\n});\n\nmodule.exports = countBy;\n","var isObject = require('./isObject'),\n now = require('./now'),\n toNumber = require('./toNumber');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n timeWaiting = wait - timeSinceLastCall;\n\n return maxing\n ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke)\n : timeWaiting;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n clearTimeout(timerId);\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\nmodule.exports = debounce;\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 arrayEvery = require('./_arrayEvery'),\n baseEvery = require('./_baseEvery'),\n baseIteratee = require('./_baseIteratee'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **all** elements of `collection`.\n * Iteration is stopped once `predicate` returns falsey. The predicate is\n * invoked with three arguments: (value, index|key, collection).\n *\n * **Note:** This method returns `true` for\n * [empty collections](https://en.wikipedia.org/wiki/Empty_set) because\n * [everything is true](https://en.wikipedia.org/wiki/Vacuous_truth) of\n * elements of empty collections.\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 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if all elements pass the predicate check,\n * else `false`.\n * @example\n *\n * _.every([true, 1, null, 'yes'], Boolean);\n * // => false\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': false },\n * { 'user': 'fred', 'age': 40, 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.every(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.every(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.every(users, 'active');\n * // => false\n */\nfunction every(collection, predicate, guard) {\n var func = isArray(collection) ? arrayEvery : baseEvery;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = every;\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 *\n * // Combining several predicates using `_.overEvery` or `_.overSome`.\n * _.filter(users, _.overSome([{ 'age': 36 }, ['age', 40]]));\n * // => objects for ['fred', '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","var createFind = require('./_createFind'),\n findIndex = require('./findIndex');\n\n/**\n * Iterates over elements of `collection`, returning the first element\n * `predicate` returns truthy for. The predicate is invoked with three\n * arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object} collection The collection to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {*} Returns the matched element, else `undefined`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'age': 36, 'active': true },\n * { 'user': 'fred', 'age': 40, 'active': false },\n * { 'user': 'pebbles', 'age': 1, 'active': true }\n * ];\n *\n * _.find(users, function(o) { return o.age < 40; });\n * // => object for 'barney'\n *\n * // The `_.matches` iteratee shorthand.\n * _.find(users, { 'age': 1, 'active': true });\n * // => object for 'pebbles'\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.find(users, ['active', false]);\n * // => object for 'fred'\n *\n * // The `_.property` iteratee shorthand.\n * _.find(users, 'active');\n * // => object for 'barney'\n */\nvar find = createFind(findIndex);\n\nmodule.exports = find;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIteratee = require('./_baseIteratee'),\n toInteger = require('./toInteger');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * This method is like `_.find` except that it returns the index of the first\n * element `predicate` returns truthy for instead of the element itself.\n *\n * @static\n * @memberOf _\n * @since 1.1.0\n * @category Array\n * @param {Array} array The array to inspect.\n * @param {Function} [predicate=_.identity] The function invoked per iteration.\n * @param {number} [fromIndex=0] The index to search from.\n * @returns {number} Returns the index of the found element, else `-1`.\n * @example\n *\n * var users = [\n * { 'user': 'barney', 'active': false },\n * { 'user': 'fred', 'active': false },\n * { 'user': 'pebbles', 'active': true }\n * ];\n *\n * _.findIndex(users, function(o) { return o.user == 'barney'; });\n * // => 0\n *\n * // The `_.matches` iteratee shorthand.\n * _.findIndex(users, { 'user': 'fred', 'active': false });\n * // => 1\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.findIndex(users, ['active', false]);\n * // => 0\n *\n * // The `_.property` iteratee shorthand.\n * _.findIndex(users, 'active');\n * // => 2\n */\nfunction findIndex(array, predicate, fromIndex) {\n var length = array == null ? 0 : array.length;\n if (!length) {\n return -1;\n }\n var index = fromIndex == null ? 0 : toInteger(fromIndex);\n if (index < 0) {\n index = nativeMax(length + index, 0);\n }\n return baseFindIndex(array, baseIteratee(predicate, 3), index);\n}\n\nmodule.exports = findIndex;\n","var baseFlatten = require('./_baseFlatten'),\n map = require('./map');\n\n/**\n * Creates a flattened array of values by running each element in `collection`\n * thru `iteratee` and flattening the mapped results. The iteratee is invoked\n * with three arguments: (value, index|key, collection).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Collection\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * function duplicate(n) {\n * return [n, n];\n * }\n *\n * _.flatMap([1, 2], duplicate);\n * // => [1, 1, 2, 2]\n */\nfunction flatMap(collection, iteratee) {\n return baseFlatten(map(collection, iteratee), 1);\n}\n\nmodule.exports = flatMap;\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","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","/**\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","var baseIndexOf = require('./_baseIndexOf'),\n isArrayLike = require('./isArrayLike'),\n isString = require('./isString'),\n toInteger = require('./toInteger'),\n values = require('./values');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Checks if `value` is in `collection`. If `collection` is a string, it's\n * checked for a substring of `value`, otherwise\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * is used for equality comparisons. If `fromIndex` is negative, it's used as\n * the offset from the end of `collection`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Collection\n * @param {Array|Object|string} collection The collection to inspect.\n * @param {*} value The value to search for.\n * @param {number} [fromIndex=0] The index to search from.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.reduce`.\n * @returns {boolean} Returns `true` if `value` is found, else `false`.\n * @example\n *\n * _.includes([1, 2, 3], 1);\n * // => true\n *\n * _.includes([1, 2, 3], 1, 2);\n * // => false\n *\n * _.includes({ 'a': 1, 'b': 2 }, 1);\n * // => true\n *\n * _.includes('abcd', 'bc');\n * // => true\n */\nfunction includes(collection, value, fromIndex, guard) {\n collection = isArrayLike(collection) ? collection : values(collection);\n fromIndex = (fromIndex && !guard) ? toInteger(fromIndex) : 0;\n\n var length = collection.length;\n if (fromIndex < 0) {\n fromIndex = nativeMax(length + fromIndex, 0);\n }\n return isString(collection)\n ? (fromIndex <= length && collection.indexOf(value, fromIndex) > -1)\n : (!!length && baseIndexOf(collection, value, fromIndex) > -1);\n}\n\nmodule.exports = includes;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\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/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` 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 `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\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 */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\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 array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","var isArrayLike = require('./isArrayLike'),\n isObjectLike = require('./isObjectLike');\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an 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 an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nmodule.exports = isArrayLikeObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar boolTag = '[object Boolean]';\n\n/**\n * Checks if `value` is classified as a boolean primitive or 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 boolean, else `false`.\n * @example\n *\n * _.isBoolean(false);\n * // => true\n *\n * _.isBoolean(null);\n * // => false\n */\nfunction isBoolean(value) {\n return value === true || value === false ||\n (isObjectLike(value) && baseGetTag(value) == boolTag);\n}\n\nmodule.exports = isBoolean;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\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/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\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 buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\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","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","/** 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","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","var isNumber = require('./isNumber');\n\n/**\n * Checks if `value` is `NaN`.\n *\n * **Note:** This method is based on\n * [`Number.isNaN`](https://mdn.io/Number/isNaN) and is not the same as\n * global [`isNaN`](https://mdn.io/isNaN) which returns `true` for\n * `undefined` and other non-number values.\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 `NaN`, else `false`.\n * @example\n *\n * _.isNaN(NaN);\n * // => true\n *\n * _.isNaN(new Number(NaN));\n * // => true\n *\n * isNaN(undefined);\n * // => true\n *\n * _.isNaN(undefined);\n * // => false\n */\nfunction isNaN(value) {\n // An `NaN` primitive is the only value that is not equal to itself.\n // Perform the `toStringTag` check first to avoid errors with some\n // ActiveX objects in IE.\n return isNumber(value) && value != +value;\n}\n\nmodule.exports = isNaN;\n","/**\n * Checks if `value` is `null` or `undefined`.\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 nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nmodule.exports = isNil;\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 * 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 */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\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 */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\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 baseIsSet = require('./_baseIsSet'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsSet = nodeUtil && nodeUtil.isSet;\n\n/**\n * Checks if `value` is classified as a `Set` 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 set, else `false`.\n * @example\n *\n * _.isSet(new Set);\n * // => true\n *\n * _.isSet(new WeakSet);\n * // => false\n */\nvar isSet = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;\n\nmodule.exports = isSet;\n","var baseGetTag = require('./_baseGetTag'),\n isArray = require('./isArray'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar stringTag = '[object String]';\n\n/**\n * Checks if `value` is classified as a `String` primitive or object.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a string, else `false`.\n * @example\n *\n * _.isString('abc');\n * // => true\n *\n * _.isString(1);\n * // => false\n */\nfunction isString(value) {\n return typeof value == 'string' ||\n (!isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag);\n}\n\nmodule.exports = isString;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\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 */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","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","var arrayLikeKeys = require('./_arrayLikeKeys'),\n baseKeys = require('./_baseKeys'),\n isArrayLike = require('./isArrayLike');\n\n/**\n * Creates an array of the own enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects. See the\n * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * for more details.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\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 * _.keys(new Foo);\n * // => ['a', 'b'] (iteration order is not guaranteed)\n *\n * _.keys('hi');\n * // => ['0', '1']\n */\nfunction keys(object) {\n return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);\n}\n\nmodule.exports = keys;\n","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 * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n baseMap = require('./_baseMap'),\n isArray = require('./isArray');\n\n/**\n * Creates an array of values by running each element in `collection` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, index|key, collection).\n *\n * Many lodash methods are guarded to work as iteratees for methods like\n * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.\n *\n * The guarded methods are:\n * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,\n * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,\n * `sampleSize`, `slice`, `some`, `sortBy`, `split`, `take`, `takeRight`,\n * `template`, `trim`, `trimEnd`, `trimStart`, and `words`\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} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n * @example\n *\n * function square(n) {\n * return n * n;\n * }\n *\n * _.map([4, 8], square);\n * // => [16, 64]\n *\n * _.map({ 'a': 4, 'b': 8 }, square);\n * // => [16, 64] (iteration order is not guaranteed)\n *\n * var users = [\n * { 'user': 'barney' },\n * { 'user': 'fred' }\n * ];\n *\n * // The `_.property` iteratee shorthand.\n * _.map(users, 'user');\n * // => ['barney', 'fred']\n */\nfunction map(collection, iteratee) {\n var func = isArray(collection) ? arrayMap : baseMap;\n return func(collection, baseIteratee(iteratee, 3));\n}\n\nmodule.exports = map;\n","var baseAssignValue = require('./_baseAssignValue'),\n baseForOwn = require('./_baseForOwn'),\n baseIteratee = require('./_baseIteratee');\n\n/**\n * Creates an object with the same keys as `object` and values generated\n * by running each own enumerable string keyed property of `object` thru\n * `iteratee`. The iteratee is invoked with three arguments:\n * (value, key, object).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Object\n * @param {Object} object The object to iterate over.\n * @param {Function} [iteratee=_.identity] The function invoked per iteration.\n * @returns {Object} Returns the new mapped object.\n * @see _.mapKeys\n * @example\n *\n * var users = {\n * 'fred': { 'user': 'fred', 'age': 40 },\n * 'pebbles': { 'user': 'pebbles', 'age': 1 }\n * };\n *\n * _.mapValues(users, function(o) { return o.age; });\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n *\n * // The `_.property` iteratee shorthand.\n * _.mapValues(users, 'age');\n * // => { 'fred': 40, 'pebbles': 1 } (iteration order is not guaranteed)\n */\nfunction mapValues(object, iteratee) {\n var result = {};\n iteratee = baseIteratee(iteratee, 3);\n\n baseForOwn(object, function(value, key, object) {\n baseAssignValue(result, key, iteratee(value, key, object));\n });\n return result;\n}\n\nmodule.exports = mapValues;\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","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\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 `clear`, `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 */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\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 var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var baseMerge = require('./_baseMerge'),\n createAssigner = require('./_createAssigner');\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\nmodule.exports = merge;\n","var baseExtremum = require('./_baseExtremum'),\n baseLt = require('./_baseLt'),\n identity = require('./identity');\n\n/**\n * Computes the minimum 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 minimum value.\n * @example\n *\n * _.min([4, 2, 8, 6]);\n * // => 2\n *\n * _.min([]);\n * // => undefined\n */\nfunction min(array) {\n return (array && array.length)\n ? baseExtremum(array, identity, baseLt)\n : undefined;\n}\n\nmodule.exports = min;\n","/**\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 root = require('./_root');\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\nmodule.exports = now;\n","var arrayMap = require('./_arrayMap'),\n baseIteratee = require('./_baseIteratee'),\n basePickBy = require('./_basePickBy'),\n getAllKeysIn = require('./_getAllKeysIn');\n\n/**\n * Creates an object composed of the `object` properties `predicate` returns\n * truthy for. The predicate is invoked with two arguments: (value, key).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The source object.\n * @param {Function} [predicate=_.identity] The function invoked per property.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pickBy(object, _.isNumber);\n * // => { 'a': 1, 'c': 3 }\n */\nfunction pickBy(object, predicate) {\n if (object == null) {\n return {};\n }\n var props = arrayMap(getAllKeysIn(object), function(prop) {\n return [prop];\n });\n predicate = baseIteratee(predicate);\n return basePickBy(object, props, function(value, path) {\n return predicate(value, path[0]);\n });\n}\n\nmodule.exports = pickBy;\n","var baseProperty = require('./_baseProperty'),\n basePropertyDeep = require('./_basePropertyDeep'),\n isKey = require('./_isKey'),\n toKey = require('./_toKey');\n\n/**\n * Creates a function that returns the value at `path` of a given object.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {Array|string} path The path of the property to get.\n * @returns {Function} Returns the new accessor function.\n * @example\n *\n * var objects = [\n * { 'a': { 'b': 2 } },\n * { 'a': { 'b': 1 } }\n * ];\n *\n * _.map(objects, _.property('a.b'));\n * // => [2, 1]\n *\n * _.map(_.sortBy(objects, _.property(['a', 'b'])), 'a.b');\n * // => [1, 2]\n */\nfunction property(path) {\n return isKey(path) ? baseProperty(toKey(path)) : basePropertyDeep(path);\n}\n\nmodule.exports = property;\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 arraySome = require('./_arraySome'),\n baseIteratee = require('./_baseIteratee'),\n baseSome = require('./_baseSome'),\n isArray = require('./isArray'),\n isIterateeCall = require('./_isIterateeCall');\n\n/**\n * Checks if `predicate` returns truthy for **any** element of `collection`.\n * Iteration is stopped once `predicate` returns truthy. The predicate is\n * invoked with three arguments: (value, index|key, collection).\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 * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {boolean} Returns `true` if any element passes the predicate check,\n * else `false`.\n * @example\n *\n * _.some([null, 0, 'yes', false], Boolean);\n * // => true\n *\n * var users = [\n * { 'user': 'barney', 'active': true },\n * { 'user': 'fred', 'active': false }\n * ];\n *\n * // The `_.matches` iteratee shorthand.\n * _.some(users, { 'user': 'barney', 'active': false });\n * // => false\n *\n * // The `_.matchesProperty` iteratee shorthand.\n * _.some(users, ['active', false]);\n * // => true\n *\n * // The `_.property` iteratee shorthand.\n * _.some(users, 'active');\n * // => true\n */\nfunction some(collection, predicate, guard) {\n var func = isArray(collection) ? arraySome : baseSome;\n if (guard && isIterateeCall(collection, predicate, guard)) {\n predicate = undefined;\n }\n return func(collection, baseIteratee(predicate, 3));\n}\n\nmodule.exports = some;\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': 30 },\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', 30]]\n *\n * _.sortBy(users, ['user', 'age']);\n * // => objects for [['barney', 34], ['barney', 36], ['fred', 30], ['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","/**\n * This method returns a new empty array.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {Array} Returns the new empty array.\n * @example\n *\n * var arrays = _.times(2, _.stubArray);\n *\n * console.log(arrays);\n * // => [[], []]\n *\n * console.log(arrays[0] === arrays[1]);\n * // => false\n */\nfunction stubArray() {\n return [];\n}\n\nmodule.exports = stubArray;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var debounce = require('./debounce'),\n isObject = require('./isObject');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\nmodule.exports = throttle;\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 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","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\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 = baseTrim(value);\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 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 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 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","var createCaseFirst = require('./_createCaseFirst');\n\n/**\n * Converts the first character of `string` to upper case.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.upperFirst('fred');\n * // => 'Fred'\n *\n * _.upperFirst('FRED');\n * // => 'FRED'\n */\nvar upperFirst = createCaseFirst('toUpperCase');\n\nmodule.exports = upperFirst;\n","var baseValues = require('./_baseValues'),\n keys = require('./keys');\n\n/**\n * Creates an array of the own enumerable string keyed property values of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property values.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.values(new Foo);\n * // => [1, 2] (iteration order is not guaranteed)\n *\n * _.values('hi');\n * // => ['h', 'i']\n */\nfunction values(object) {\n return object == null ? [] : baseValues(object, keys(object));\n}\n\nmodule.exports = values;\n","// @flow\n/* eslint-env browser */\nimport type {Window} from '../../types/window.js';\n\n// shim window for the case of requiring the browser bundle in Node\nexport default ((typeof self !== 'undefined' ? self : ({}: any)): Window);\n","// @flow strict\n\ntype Config = {|\n API_URL: string,\n API_URL_REGEX: RegExp,\n API_TILEJSON_REGEX: RegExp,\n API_FONTS_REGEX: RegExp,\n API_SPRITE_REGEX: RegExp,\n API_STYLE_REGEX: RegExp,\n API_CDN_URL_REGEX: RegExp,\n EVENTS_URL: ?string,\n SESSION_PATH: string,\n FEEDBACK_URL: string,\n REQUIRE_ACCESS_TOKEN: boolean,\n TILE_URL_VERSION: string,\n RASTER_URL_PREFIX: string,\n ACCESS_TOKEN: ?string,\n MAX_PARALLEL_IMAGE_REQUESTS: number\n|};\n\nlet mapboxHTTPURLRegex;\n\nconst config: Config = {\n API_URL: 'https://api.mapbox.com',\n get API_URL_REGEX () {\n if (mapboxHTTPURLRegex == null) {\n const prodMapboxHTTPURLRegex = /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/|\\?|$)/i;\n try {\n mapboxHTTPURLRegex = (process.env.API_URL_REGEX != null) ? new RegExp(process.env.API_URL_REGEX) : prodMapboxHTTPURLRegex;\n } catch (e) {\n mapboxHTTPURLRegex = prodMapboxHTTPURLRegex;\n }\n }\n\n return mapboxHTTPURLRegex;\n },\n get API_TILEJSON_REGEX() {\n // https://docs.mapbox.com/api/maps/mapbox-tiling-service/#retrieve-tilejson-metadata\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/v[0-9]*\\/.*\\.json.*$)/i;\n },\n get API_SPRITE_REGEX() {\n // https://docs.mapbox.com/api/maps/styles/#retrieve-a-sprite-image-or-json\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/styles\\/v[0-9]*\\/)(.*\\/sprite.*\\..*$)/i;\n },\n get API_FONTS_REGEX() {\n // https://docs.mapbox.com/api/maps/fonts/#retrieve-font-glyph-ranges\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/fonts\\/v[0-9]*\\/)(.*\\.pbf.*$)/i;\n },\n get API_STYLE_REGEX() {\n // https://docs.mapbox.com/api/maps/styles/#retrieve-a-style\n return /^((https?:)?\\/\\/)?([^\\/]+\\.)?mapbox\\.c(n|om)(\\/styles\\/v[0-9]*\\/)(.*$)/i;\n },\n get API_CDN_URL_REGEX() {\n return /^((https?:)?\\/\\/)?api\\.mapbox\\.c(n|om)(\\/mapbox-gl-js\\/)(.*$)/i;\n },\n get EVENTS_URL() {\n if (!config.API_URL) { return null; }\n try {\n const url = new URL(config.API_URL);\n if (url.hostname === 'api.mapbox.cn') {\n return 'https://events.mapbox.cn/events/v2';\n } else if (url.hostname === 'api.mapbox.com') {\n return 'https://events.mapbox.com/events/v2';\n } else {\n return null;\n }\n } catch (e) {\n return null;\n }\n },\n SESSION_PATH: '/map-sessions/v1',\n FEEDBACK_URL: 'https://apps.mapbox.com/feedback',\n TILE_URL_VERSION: 'v4',\n RASTER_URL_PREFIX: 'raster/v1',\n REQUIRE_ACCESS_TOKEN: true,\n ACCESS_TOKEN: null,\n MAX_PARALLEL_IMAGE_REQUESTS: 16\n};\n\nexport default config;\n","// @flow strict\n\nimport window from './window.js';\n\nconst exported = {\n supported: false,\n testSupport\n};\n\nexport default exported;\n\nlet glForTesting;\nlet webpCheckComplete = false;\nlet webpImgTest;\nlet webpImgTestOnloadComplete = false;\n\nif (window.document) {\n webpImgTest = window.document.createElement('img');\n webpImgTest.onload = function() {\n if (glForTesting) testWebpTextureUpload(glForTesting);\n glForTesting = null;\n webpImgTestOnloadComplete = true;\n };\n webpImgTest.onerror = function() {\n webpCheckComplete = true;\n glForTesting = null;\n };\n webpImgTest.src = 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=';\n}\n\nfunction testSupport(gl: WebGLRenderingContext) {\n if (webpCheckComplete || !webpImgTest) return;\n\n // HTMLImageElement.complete is set when an image is done loading it's source\n // regardless of whether the load was successful or not.\n // It's possible for an error to set HTMLImageElement.complete to true which would trigger\n // testWebpTextureUpload and mistakenly set exported.supported to true in browsers which don't support webp\n // To avoid this, we set a flag in the image's onload handler and only call testWebpTextureUpload\n // after a successful image load event.\n if (webpImgTestOnloadComplete) {\n testWebpTextureUpload(gl);\n } else {\n glForTesting = gl;\n\n }\n}\n\nfunction testWebpTextureUpload(gl: WebGLRenderingContext) {\n // Edge 18 supports WebP but not uploading a WebP image to a gl texture\n // Test support for this before allowing WebP images.\n // https://github.com/mapbox/mapbox-gl-js/issues/7671\n const texture = gl.createTexture();\n gl.bindTexture(gl.TEXTURE_2D, texture);\n\n try {\n gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, webpImgTest);\n\n // The error does not get triggered in Edge if the context is lost\n if (gl.isContextLost()) return;\n\n exported.supported = true;\n } catch (e) {\n // Catch \"Unspecified Error.\" in Edge 18.\n }\n\n gl.deleteTexture(texture);\n\n webpCheckComplete = true;\n}\n","// @flow\n\n/***** START WARNING REMOVAL OR MODIFICATION OF THE\n* FOLLOWING CODE VIOLATES THE MAPBOX TERMS OF SERVICE ******\n* The following code is used to access Mapbox's APIs. Removal or modification\n* of this code can result in higher fees and/or\n* termination of your account with Mapbox.\n*\n* Under the Mapbox Terms of Service, you may not use this code to access Mapbox\n* Mapping APIs other than through Mapbox SDKs.\n*\n* The Mapping APIs documentation is available at https://docs.mapbox.com/api/maps/#maps\n* and the Mapbox Terms of Service are available at https://www.mapbox.com/tos/\n******************************************************************************/\n\ntype SkuTokenObject = {|\n token: string,\n tokenExpiresAt: number\n|};\n\nconst SKU_ID = '01';\n\nfunction createSkuToken(): SkuTokenObject {\n // SKU_ID and TOKEN_VERSION are specified by an internal schema and should not change\n const TOKEN_VERSION = '1';\n const base62chars = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n // sessionRandomizer is a randomized 10-digit base-62 number\n let sessionRandomizer = '';\n for (let i = 0; i < 10; i++) {\n sessionRandomizer += base62chars[Math.floor(Math.random() * 62)];\n }\n const expiration = 12 * 60 * 60 * 1000; // 12 hours\n const token = [TOKEN_VERSION, SKU_ID, sessionRandomizer].join('');\n const tokenExpiresAt = Date.now() + expiration;\n\n return {token, tokenExpiresAt};\n}\n\nexport {createSkuToken, SKU_ID};\n\n/***** END WARNING - REMOVAL OR MODIFICATION OF THE\nPRECEDING CODE VIOLATES THE MAPBOX TERMS OF SERVICE ******/\n","'use strict';\n\nmodule.exports = UnitBezier;\n\nfunction UnitBezier(p1x, p1y, p2x, p2y) {\n // Calculate the polynomial coefficients, implicit first and last control points are (0,0) and (1,1).\n this.cx = 3.0 * p1x;\n this.bx = 3.0 * (p2x - p1x) - this.cx;\n this.ax = 1.0 - this.cx - this.bx;\n\n this.cy = 3.0 * p1y;\n this.by = 3.0 * (p2y - p1y) - this.cy;\n this.ay = 1.0 - this.cy - this.by;\n\n this.p1x = p1x;\n this.p1y = p1y;\n this.p2x = p2x;\n this.p2y = p2y;\n}\n\nUnitBezier.prototype = {\n sampleCurveX: function (t) {\n // `ax t^3 + bx t^2 + cx t' expanded using Horner's rule.\n return ((this.ax * t + this.bx) * t + this.cx) * t;\n },\n\n sampleCurveY: function (t) {\n return ((this.ay * t + this.by) * t + this.cy) * t;\n },\n\n sampleCurveDerivativeX: function (t) {\n return (3.0 * this.ax * t + 2.0 * this.bx) * t + this.cx;\n },\n\n solveCurveX: function (x, epsilon) {\n if (epsilon === undefined) epsilon = 1e-6;\n\n if (x < 0.0) return 0.0;\n if (x > 1.0) return 1.0;\n\n var t = x;\n\n // First try a few iterations of Newton's method - normally very fast.\n for (var i = 0; i < 8; i++) {\n var x2 = this.sampleCurveX(t) - x;\n if (Math.abs(x2) < epsilon) return t;\n\n var d2 = this.sampleCurveDerivativeX(t);\n if (Math.abs(d2) < 1e-6) break;\n\n t = t - x2 / d2;\n }\n\n // Fall back to the bisection method for reliability.\n var t0 = 0.0;\n var t1 = 1.0;\n t = x;\n\n for (i = 0; i < 20; i++) {\n x2 = this.sampleCurveX(t);\n if (Math.abs(x2 - x) < epsilon) break;\n\n if (x > x2) {\n t0 = t;\n } else {\n t1 = t;\n }\n\n t = (t1 - t0) * 0.5 + t0;\n }\n\n return t;\n },\n\n solve: function (x, epsilon) {\n return this.sampleCurveY(this.solveCurveX(x, epsilon));\n }\n};\n","'use strict';\n\nmodule.exports = Point;\n\n/**\n * A standalone point geometry with useful accessor, comparison, and\n * modification methods.\n *\n * @class Point\n * @param {Number} x the x-coordinate. this could be longitude or screen\n * pixels, or any other sort of unit.\n * @param {Number} y the y-coordinate. this could be latitude or screen\n * pixels, or any other sort of unit.\n * @example\n * var point = new Point(-77, 38);\n */\nfunction Point(x, y) {\n this.x = x;\n this.y = y;\n}\n\nPoint.prototype = {\n\n /**\n * Clone this point, returning a new point that can be modified\n * without affecting the old one.\n * @return {Point} the clone\n */\n clone: function() { return new Point(this.x, this.y); },\n\n /**\n * Add this point's x & y coordinates to another point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n add: function(p) { return this.clone()._add(p); },\n\n /**\n * Subtract this point's x & y coordinates to from point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n sub: function(p) { return this.clone()._sub(p); },\n\n /**\n * Multiply this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n multByPoint: function(p) { return this.clone()._multByPoint(p); },\n\n /**\n * Divide this point's x & y coordinates by point,\n * yielding a new point.\n * @param {Point} p the other point\n * @return {Point} output point\n */\n divByPoint: function(p) { return this.clone()._divByPoint(p); },\n\n /**\n * Multiply this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n mult: function(k) { return this.clone()._mult(k); },\n\n /**\n * Divide this point's x & y coordinates by a factor,\n * yielding a new point.\n * @param {Point} k factor\n * @return {Point} output point\n */\n div: function(k) { return this.clone()._div(k); },\n\n /**\n * Rotate this point around the 0, 0 origin by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @return {Point} output point\n */\n rotate: function(a) { return this.clone()._rotate(a); },\n\n /**\n * Rotate this point around p point by an angle a,\n * given in radians\n * @param {Number} a angle to rotate around, in radians\n * @param {Point} p Point to rotate around\n * @return {Point} output point\n */\n rotateAround: function(a,p) { return this.clone()._rotateAround(a,p); },\n\n /**\n * Multiply this point by a 4x1 transformation matrix\n * @param {Array} m transformation matrix\n * @return {Point} output point\n */\n matMult: function(m) { return this.clone()._matMult(m); },\n\n /**\n * Calculate this point but as a unit vector from 0, 0, meaning\n * that the distance from the resulting point to the 0, 0\n * coordinate will be equal to 1 and the angle from the resulting\n * point to the 0, 0 coordinate will be the same as before.\n * @return {Point} unit vector point\n */\n unit: function() { return this.clone()._unit(); },\n\n /**\n * Compute a perpendicular point, where the new y coordinate\n * is the old x coordinate and the new x coordinate is the old y\n * coordinate multiplied by -1\n * @return {Point} perpendicular point\n */\n perp: function() { return this.clone()._perp(); },\n\n /**\n * Return a version of this point with the x & y coordinates\n * rounded to integers.\n * @return {Point} rounded point\n */\n round: function() { return this.clone()._round(); },\n\n /**\n * Return the magitude of this point: this is the Euclidean\n * distance from the 0, 0 coordinate to this point's x and y\n * coordinates.\n * @return {Number} magnitude\n */\n mag: function() {\n return Math.sqrt(this.x * this.x + this.y * this.y);\n },\n\n /**\n * Judge whether this point is equal to another point, returning\n * true or false.\n * @param {Point} other the other point\n * @return {boolean} whether the points are equal\n */\n equals: function(other) {\n return this.x === other.x &&\n this.y === other.y;\n },\n\n /**\n * Calculate the distance from this point to another point\n * @param {Point} p the other point\n * @return {Number} distance\n */\n dist: function(p) {\n return Math.sqrt(this.distSqr(p));\n },\n\n /**\n * Calculate the distance from this point to another point,\n * without the square root step. Useful if you're comparing\n * relative distances.\n * @param {Point} p the other point\n * @return {Number} distance\n */\n distSqr: function(p) {\n var dx = p.x - this.x,\n dy = p.y - this.y;\n return dx * dx + dy * dy;\n },\n\n /**\n * Get the angle from the 0, 0 coordinate to this point, in radians\n * coordinates.\n * @return {Number} angle\n */\n angle: function() {\n return Math.atan2(this.y, this.x);\n },\n\n /**\n * Get the angle from this point to another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleTo: function(b) {\n return Math.atan2(this.y - b.y, this.x - b.x);\n },\n\n /**\n * Get the angle between this point and another point, in radians\n * @param {Point} b the other point\n * @return {Number} angle\n */\n angleWith: function(b) {\n return this.angleWithSep(b.x, b.y);\n },\n\n /*\n * Find the angle of the two vectors, solving the formula for\n * the cross product a x b = |a||b|sin(θ) for θ.\n * @param {Number} x the x-coordinate\n * @param {Number} y the y-coordinate\n * @return {Number} the angle in radians\n */\n angleWithSep: function(x, y) {\n return Math.atan2(\n this.x * y - this.y * x,\n this.x * x + this.y * y);\n },\n\n _matMult: function(m) {\n var x = m[0] * this.x + m[1] * this.y,\n y = m[2] * this.x + m[3] * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _add: function(p) {\n this.x += p.x;\n this.y += p.y;\n return this;\n },\n\n _sub: function(p) {\n this.x -= p.x;\n this.y -= p.y;\n return this;\n },\n\n _mult: function(k) {\n this.x *= k;\n this.y *= k;\n return this;\n },\n\n _div: function(k) {\n this.x /= k;\n this.y /= k;\n return this;\n },\n\n _multByPoint: function(p) {\n this.x *= p.x;\n this.y *= p.y;\n return this;\n },\n\n _divByPoint: function(p) {\n this.x /= p.x;\n this.y /= p.y;\n return this;\n },\n\n _unit: function() {\n this._div(this.mag());\n return this;\n },\n\n _perp: function() {\n var y = this.y;\n this.y = this.x;\n this.x = -y;\n return this;\n },\n\n _rotate: function(angle) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = cos * this.x - sin * this.y,\n y = sin * this.x + cos * this.y;\n this.x = x;\n this.y = y;\n return this;\n },\n\n _rotateAround: function(angle, p) {\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n x = p.x + cos * (this.x - p.x) - sin * (this.y - p.y),\n y = p.y + sin * (this.x - p.x) + cos * (this.y - p.y);\n this.x = x;\n this.y = y;\n return this;\n },\n\n _round: function() {\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n }\n};\n\n/**\n * Construct a point from an array if necessary, otherwise if the input\n * is already a Point, or an unknown type, return it unchanged\n * @param {Array|Point|*} a any kind of input value\n * @return {Point} constructed point, or passed-through value.\n * @example\n * // this\n * var point = Point.convert([0, 1]);\n * // is equivalent to\n * var point = new Point(0, 1);\n */\nPoint.convert = function (a) {\n if (a instanceof Point) {\n return a;\n }\n if (Array.isArray(a)) {\n return new Point(a[0], a[1]);\n }\n return a;\n};\n","// @flow\n\nimport UnitBezier from '@mapbox/unitbezier';\n\nimport Point from '@mapbox/point-geometry';\nimport window from './window.js';\nimport assert from 'assert';\n\nimport type {Callback} from '../types/callback.js';\nimport type {Mat4, Vec4} from 'gl-matrix';\n\nconst DEG_TO_RAD = Math.PI / 180;\nconst RAD_TO_DEG = 180 / Math.PI;\n\n/**\n * Converts an angle in degrees to radians\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param a angle to convert\n * @returns the angle in radians\n * @private\n */\nexport function degToRad(a: number): number {\n return a * DEG_TO_RAD;\n}\n\n/**\n * Converts an angle in radians to degrees\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param a angle to convert\n * @returns the angle in degrees\n * @private\n */\nexport function radToDeg(a: number): number {\n return a * RAD_TO_DEG;\n}\n\nconst TILE_CORNERS = [[0, 0], [1, 0], [1, 1], [0, 1]];\n\n/**\n * Given a particular bearing, returns the corner of the tile thats farthest\n * along the bearing.\n *\n * @param {number} bearing angle in degrees (-180, 180]\n * @returns {QuadCorner}\n * @private\n */\nexport function furthestTileCorner(bearing: number): [number, number] {\n const alignedBearing = ((bearing + 45) + 360) % 360;\n const cornerIdx = Math.round(alignedBearing / 90) % 4;\n return TILE_CORNERS[cornerIdx];\n}\n\n/**\n * @module util\n * @private\n */\n\n/**\n * Given a value `t` that varies between 0 and 1, return\n * an interpolation function that eases between 0 and 1 in a pleasing\n * cubic in-out fashion.\n *\n * @private\n */\nexport function easeCubicInOut(t: number): number {\n if (t <= 0) return 0;\n if (t >= 1) return 1;\n const t2 = t * t,\n t3 = t2 * t;\n return 4 * (t < 0.5 ? t3 : 3 * (t - t2) + t3 - 0.75);\n}\n\n/**\n * Computes an AABB for a set of points.\n *\n * @param {Point[]} points\n * @returns {{ min: Point, max: Point}}\n * @private\n */\nexport function getBounds(points: Point[]): { min: Point, max: Point} {\n let minX = Infinity;\n let minY = Infinity;\n let maxX = -Infinity;\n let maxY = -Infinity;\n for (const p of points) {\n minX = Math.min(minX, p.x);\n minY = Math.min(minY, p.y);\n maxX = Math.max(maxX, p.x);\n maxY = Math.max(maxY, p.y);\n }\n\n return {\n min: new Point(minX, minY),\n max: new Point(maxX, maxY),\n };\n}\n\n/**\n * Returns the square of the 2D distance between an AABB defined by min and max and a point.\n * If point is null or undefined, the AABB distance from the origin (0,0) is returned.\n *\n * @param {Array} min The minimum extent of the AABB.\n * @param {Array} max The maximum extent of the AABB.\n * @param {Array} [point] The point to compute the distance from, may be undefined.\n * @returns {number} The square distance from the AABB, 0.0 if the AABB contains the point.\n */\nexport function getAABBPointSquareDist(min: Array, max: Array, point: ?Array): number {\n let sqDist = 0.0;\n\n for (let i = 0; i < 2; ++i) {\n const v = point ? point[i] : 0.0;\n assert(min[i] < max[i], 'Invalid aabb min and max inputs, min[i] must be < max[i].');\n if (min[i] > v) sqDist += (min[i] - v) * (min[i] - v);\n if (max[i] < v) sqDist += (v - max[i]) * (v - max[i]);\n }\n\n return sqDist;\n}\n\n/**\n * Converts a AABB into a polygon with clockwise winding order.\n *\n * @param {Point} min The top left point.\n * @param {Point} max The bottom right point.\n * @param {number} [buffer=0] The buffer width.\n * @param {boolean} [close=true] Whether to close the polygon or not.\n * @returns {Point[]} The polygon.\n */\nexport function polygonizeBounds(min: Point, max: Point, buffer: number = 0, close: boolean = true): Point[] {\n const offset = new Point(buffer, buffer);\n const minBuf = min.sub(offset);\n const maxBuf = max.add(offset);\n const polygon = [minBuf, new Point(maxBuf.x, minBuf.y), maxBuf, new Point(minBuf.x, maxBuf.y)];\n\n if (close) {\n polygon.push(minBuf.clone());\n }\n return polygon;\n}\n\n/**\n * Takes a convex ring and expands it outward by applying a buffer around it.\n * This function assumes that the ring is in clockwise winding order.\n *\n * @param {Point[]} ring The input ring.\n * @param {number} buffer The buffer width.\n * @returns {Point[]} The expanded ring.\n */\nexport function bufferConvexPolygon(ring: Point[], buffer: number): Point[] {\n assert(ring.length > 2, 'bufferConvexPolygon requires the ring to have atleast 3 points');\n const output = [];\n for (let currIdx = 0; currIdx < ring.length; currIdx++) {\n const prevIdx = wrap(currIdx - 1, -1, ring.length - 1);\n const nextIdx = wrap(currIdx + 1, -1, ring.length - 1);\n const prev = ring[prevIdx];\n const curr = ring[currIdx];\n const next = ring[nextIdx];\n const p1 = prev.sub(curr).unit();\n const p2 = next.sub(curr).unit();\n const interiorAngle = p2.angleWithSep(p1.x, p1.y);\n // Calcuate a vector that points in the direction of the angle bisector between two sides.\n // Scale it based on a right angled triangle constructed at that corner.\n const offset = p1.add(p2).unit().mult(-1 * buffer / Math.sin(interiorAngle / 2));\n output.push(curr.add(offset));\n }\n return output;\n}\n\ntype EaseFunction = (t: number) => number;\n\n/**\n * Given given (x, y), (x1, y1) control points for a bezier curve,\n * return a function that interpolates along that curve.\n *\n * @param p1x control point 1 x coordinate\n * @param p1y control point 1 y coordinate\n * @param p2x control point 2 x coordinate\n * @param p2y control point 2 y coordinate\n * @private\n */\nexport function bezier(p1x: number, p1y: number, p2x: number, p2y: number): EaseFunction {\n const bezier = new UnitBezier(p1x, p1y, p2x, p2y);\n return function(t: number) {\n return bezier.solve(t);\n };\n}\n\n/**\n * A default bezier-curve powered easing function with\n * control points (0.25, 0.1) and (0.25, 1)\n *\n * @private\n */\nexport const ease: EaseFunction = bezier(0.25, 0.1, 0.25, 1);\n\n/**\n * constrain n to the given range via min + max\n *\n * @param n value\n * @param min the minimum value to be returned\n * @param max the maximum value to be returned\n * @returns the clamped value\n * @private\n */\nexport function clamp(n: number, min: number, max: number): number {\n return Math.min(max, Math.max(min, n));\n}\n\n/**\n * Equivalent to GLSL smoothstep.\n *\n * @param {number} e0 The lower edge of the sigmoid\n * @param {number} e1 The upper edge of the sigmoid\n * @param {number} x the value to be interpolated\n * @returns {number} in the range [0, 1]\n * @private\n */\nexport function smoothstep(e0: number, e1: number, x: number): number {\n x = clamp((x - e0) / (e1 - e0), 0, 1);\n return x * x * (3 - 2 * x);\n}\n\n/**\n * constrain n to the given range, excluding the minimum, via modular arithmetic\n *\n * @param n value\n * @param min the minimum value to be returned, exclusive\n * @param max the maximum value to be returned, inclusive\n * @returns constrained number\n * @private\n */\nexport function wrap(n: number, min: number, max: number): number {\n const d = max - min;\n const w = ((n - min) % d + d) % d + min;\n return (w === min) ? max : w;\n}\n\n/**\n * Computes shortest angle in range [-180, 180) between two angles.\n *\n * @param {*} a First angle in degrees\n * @param {*} b Second angle in degrees\n * @returns Shortest angle\n * @private\n */\nexport function shortestAngle(a: number, b: number): number {\n const diff = (b - a + 180) % 360 - 180;\n return diff < -180 ? diff + 360 : diff;\n}\n\n/*\n * Call an asynchronous function on an array of arguments,\n * calling `callback` with the completed results of all calls.\n *\n * @param array input to each call of the async function.\n * @param fn an async function with signature (data, callback)\n * @param callback a callback run after all async work is done.\n * called with an array, containing the results of each async call.\n * @private\n */\nexport function asyncAll
- (\n array: Array
- ,\n fn: (item: Item, fnCallback: Callback) => void,\n callback: Callback>\n): void {\n if (!array.length) { return callback(null, []); }\n let remaining = array.length;\n const results = new Array(array.length);\n let error = null;\n array.forEach((item, i) => {\n fn(item, (err, result) => {\n if (err) error = err;\n results[i] = ((result: any): Result); // https://github.com/facebook/flow/issues/2123\n if (--remaining === 0) callback(error, results);\n });\n });\n}\n\n/*\n * Polyfill for Object.values. Not fully spec compliant, but we don't\n * need it to be.\n *\n * @private\n */\nexport function values(obj: {[key: string]: T}): Array {\n const result = [];\n for (const k in obj) {\n result.push(obj[k]);\n }\n return result;\n}\n\n/*\n * Compute the difference between the keys in one object and the keys\n * in another object.\n *\n * @returns keys difference\n * @private\n */\nexport function keysDifference
(obj: {[key: string]: S}, other: {[key: string]: T}): Array {\n const difference = [];\n for (const i in obj) {\n if (!(i in other)) {\n difference.push(i);\n }\n }\n return difference;\n}\n\n/**\n * Given a destination object and optionally many source objects,\n * copy all properties from the source objects into the destination.\n * The last source object given overrides properties from previous\n * source objects.\n *\n * @param dest destination object\n * @param sources sources from which properties are pulled\n * @private\n */\nexport function extend(dest: Object, ...sources: Array): Object {\n for (const src of sources) {\n for (const k in src) {\n dest[k] = src[k];\n }\n }\n return dest;\n}\n\n/**\n * Given an object and a number of properties as strings, return version\n * of that object with only those properties.\n *\n * @param src the object\n * @param properties an array of property names chosen\n * to appear on the resulting object.\n * @returns object with limited properties.\n * @example\n * var foo = { name: 'Charlie', age: 10 };\n * var justName = pick(foo, ['name']);\n * // justName = { name: 'Charlie' }\n * @private\n */\nexport function pick(src: Object, properties: Array): Object {\n const result = {};\n for (let i = 0; i < properties.length; i++) {\n const k = properties[i];\n if (k in src) {\n result[k] = src[k];\n }\n }\n return result;\n}\n\nlet id = 1;\n\n/**\n * Return a unique numeric id, starting at 1 and incrementing with\n * each call.\n *\n * @returns unique numeric id.\n * @private\n */\nexport function uniqueId(): number {\n return id++;\n}\n\n/**\n * Return a random UUID (v4). Taken from: https://gist.github.com/jed/982883\n * @private\n */\nexport function uuid(): string {\n function b(a: void) {\n return a ? (a ^ Math.random() * (16 >> a / 4)).toString(16) :\n //$FlowFixMe: Flow doesn't like the implied array literal conversion here\n ([1e7] + -[1e3] + -4e3 + -8e3 + -1e11).replace(/[018]/g, b);\n }\n return b();\n}\n\n/**\n * Return whether a given value is a power of two\n * @private\n */\nexport function isPowerOfTwo(value: number): boolean {\n return (Math.log(value) / Math.LN2) % 1 === 0;\n}\n\n/**\n * Return the next power of two, or the input value if already a power of two\n * @private\n */\nexport function nextPowerOfTwo(value: number): number {\n if (value <= 1) return 1;\n return Math.pow(2, Math.ceil(Math.log(value) / Math.LN2));\n}\n\n/**\n * Return the previous power of two, or the input value if already a power of two\n * @private\n */\nexport function prevPowerOfTwo(value: number): number {\n if (value <= 1) return 1;\n return Math.pow(2, Math.floor(Math.log(value) / Math.LN2));\n}\n\n/**\n * Validate a string to match UUID(v4) of the\n * form: xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx\n * @param str string to validate.\n * @private\n */\nexport function validateUuid(str: ?string): boolean {\n return str ? /^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(str) : false;\n}\n\n/**\n * Given an array of member function names as strings, replace all of them\n * with bound versions that will always refer to `context` as `this`. This\n * is useful for classes where otherwise event bindings would reassign\n * `this` to the evented object or some other value: this lets you ensure\n * the `this` value always.\n *\n * @param fns list of member function names\n * @param context the context value\n * @example\n * function MyClass() {\n * bindAll(['ontimer'], this);\n * this.name = 'Tom';\n * }\n * MyClass.prototype.ontimer = function() {\n * alert(this.name);\n * };\n * var myClass = new MyClass();\n * setTimeout(myClass.ontimer, 100);\n * @private\n */\nexport function bindAll(fns: Array, context: Object): void {\n fns.forEach((fn) => {\n if (!context[fn]) { return; }\n context[fn] = context[fn].bind(context);\n });\n}\n\n/**\n * Determine if a string ends with a particular substring\n *\n * @private\n */\nexport function endsWith(string: string, suffix: string): boolean {\n return string.indexOf(suffix, string.length - suffix.length) !== -1;\n}\n\n/**\n * Create an object by mapping all the values of an existing object while\n * preserving their keys.\n *\n * @private\n */\n// $FlowFixMe[missing-this-annot]\nexport function mapObject(input: Object, iterator: Function, context?: Object): Object {\n const output = {};\n for (const key in input) {\n output[key] = iterator.call(context || this, input[key], key, input);\n }\n return output;\n}\n\n/**\n * Create an object by filtering out values of an existing object.\n *\n * @private\n */\n// $FlowFixMe[missing-this-annot]\nexport function filterObject(input: Object, iterator: Function, context?: Object): Object {\n const output = {};\n for (const key in input) {\n if (iterator.call(context || this, input[key], key, input)) {\n output[key] = input[key];\n }\n }\n return output;\n}\n\nimport deepEqual from '../style-spec/util/deep_equal.js';\nexport {deepEqual};\n\n/**\n * Deeply clones two objects.\n *\n * @private\n */\nexport function clone(input: T): T {\n if (Array.isArray(input)) {\n return ((input.map(clone): any): T);\n } else if (typeof input === 'object' && input) {\n return ((mapObject(input, clone): any): T);\n } else {\n return input;\n }\n}\n\n/**\n * Maps a value from a range between [min, max] to the range [outMin, outMax]\n *\n * @private\n */\nexport function mapValue(value: number, min: number, max: number, outMin: number, outMax: number): number {\n return clamp((value - min) / (max - min) * (outMax - outMin) + outMin, outMin, outMax);\n}\n\n/**\n * Check if two arrays have at least one common element.\n *\n * @private\n */\nexport function arraysIntersect(a: Array, b: Array): boolean {\n for (let l = 0; l < a.length; l++) {\n if (b.indexOf(a[l]) >= 0) return true;\n }\n return false;\n}\n\n/**\n * Print a warning message to the console and ensure duplicate warning messages\n * are not printed.\n *\n * @private\n */\nconst warnOnceHistory: {[key: string]: boolean} = {};\n\nexport function warnOnce(message: string): void {\n if (!warnOnceHistory[message]) {\n // console isn't defined in some WebWorkers, see #2558\n if (typeof console !== \"undefined\") console.warn(message);\n warnOnceHistory[message] = true;\n }\n}\n\n/**\n * Indicates if the provided Points are in a counter clockwise (true) or clockwise (false) order\n *\n * @private\n * @returns true for a counter clockwise set of points\n */\n// http://bryceboe.com/2006/10/23/line-segment-intersection-algorithm/\nexport function isCounterClockwise(a: Point, b: Point, c: Point): boolean {\n return (c.y - a.y) * (b.x - a.x) > (b.y - a.y) * (c.x - a.x);\n}\n\n/**\n * Returns the signed area for the polygon ring. Postive areas are exterior rings and\n * have a clockwise winding. Negative areas are interior rings and have a counter clockwise\n * ordering.\n *\n * @private\n * @param ring Exterior or interior ring\n */\nexport function calculateSignedArea(ring: Array): number {\n let sum = 0;\n for (let i = 0, len = ring.length, j = len - 1, p1, p2; i < len; j = i++) {\n p1 = ring[i];\n p2 = ring[j];\n sum += (p2.x - p1.x) * (p1.y + p2.y);\n }\n return sum;\n}\n\n/* global self, WorkerGlobalScope */\n/**\n * Returns true if run in the web-worker context.\n *\n * @private\n * @returns {boolean}\n */\nexport function isWorker(): boolean {\n return typeof WorkerGlobalScope !== 'undefined' && typeof self !== 'undefined' &&\n self instanceof WorkerGlobalScope;\n}\n\n/**\n * Parses data from 'Cache-Control' headers.\n *\n * @private\n * @param cacheControl Value of 'Cache-Control' header\n * @return object containing parsed header info.\n */\n\nexport function parseCacheControl(cacheControl: string): Object {\n // Taken from [Wreck](https://github.com/hapijs/wreck)\n const re = /(?:^|(?:\\s*\\,\\s*))([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)(?:\\=(?:([^\\x00-\\x20\\(\\)<>@\\,;\\:\\\\\"\\/\\[\\]\\?\\=\\{\\}\\x7F]+)|(?:\\\"((?:[^\"\\\\]|\\\\.)*)\\\")))?/g;\n\n const header = {};\n cacheControl.replace(re, ($0, $1, $2, $3) => {\n const value = $2 || $3;\n header[$1] = value ? value.toLowerCase() : true;\n return '';\n });\n\n if (header['max-age']) {\n const maxAge = parseInt(header['max-age'], 10);\n if (isNaN(maxAge)) delete header['max-age'];\n else header['max-age'] = maxAge;\n }\n\n return header;\n}\n\nlet _isSafari = null;\n\nexport function _resetSafariCheckForTest() {\n _isSafari = null;\n}\n\n/**\n * Returns true when run in WebKit derived browsers.\n * This is used as a workaround for a memory leak in Safari caused by using Transferable objects to\n * transfer data between WebWorkers and the main thread.\n * https://github.com/mapbox/mapbox-gl-js/issues/8771\n *\n * This should be removed once the underlying Safari issue is fixed.\n *\n * @private\n * @param scope {WindowOrWorkerGlobalScope} Since this function is used both on the main thread and WebWorker context,\n * let the calling scope pass in the global scope object.\n * @returns {boolean}\n */\nexport function isSafari(scope: any): boolean {\n if (_isSafari == null) {\n const userAgent = scope.navigator ? scope.navigator.userAgent : null;\n _isSafari = !!scope.safari ||\n !!(userAgent && (/\\b(iPad|iPhone|iPod)\\b/.test(userAgent) || (!!userAgent.match('Safari') && !userAgent.match('Chrome'))));\n }\n return _isSafari;\n}\n\nexport function isSafariWithAntialiasingBug(scope: any): ?boolean {\n const userAgent = scope.navigator ? scope.navigator.userAgent : null;\n if (!isSafari(scope)) return false;\n // 15.4 is known to be buggy.\n // 15.5 may or may not include the fix. Mark it as buggy to be on the safe side.\n return userAgent && (userAgent.match('Version/15.4') || userAgent.match('Version/15.5') || userAgent.match(/CPU (OS|iPhone OS) (15_4|15_5) like Mac OS X/));\n}\n\nexport function isFullscreen(): boolean {\n return !!window.document.fullscreenElement || !!window.document.webkitFullscreenElement;\n}\n\nexport function storageAvailable(type: string): boolean {\n try {\n const storage = window[type];\n storage.setItem('_mapbox_test_', 1);\n storage.removeItem('_mapbox_test_');\n return true;\n } catch (e) {\n return false;\n }\n}\n\n// The following methods are from https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem\n//Unicode compliant base64 encoder for strings\nexport function b64EncodeUnicode(str: string): string {\n return window.btoa(\n encodeURIComponent(str).replace(/%([0-9A-F]{2})/g,\n (match, p1) => {\n return String.fromCharCode(Number('0x' + p1)); //eslint-disable-line\n }\n )\n );\n}\n\n// Unicode compliant decoder for base64-encoded strings\nexport function b64DecodeUnicode(str: string): string {\n return decodeURIComponent(window.atob(str).split('').map((c) => {\n return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2); //eslint-disable-line\n }).join(''));\n}\n\nexport function getColumn(matrix: Mat4, col: number): Vec4 {\n return [matrix[col * 4], matrix[col * 4 + 1], matrix[col * 4 + 2], matrix[col * 4 + 3]];\n}\n\nexport function setColumn(matrix: Mat4, col: number, values: Vec4) {\n matrix[col * 4 + 0] = values[0];\n matrix[col * 4 + 1] = values[1];\n matrix[col * 4 + 2] = values[2];\n matrix[col * 4 + 3] = values[3];\n}\n","// @flow\n\nimport {warnOnce, parseCacheControl} from './util.js';\nimport window from './window.js';\n\nimport type Dispatcher from './dispatcher.js';\n\nconst CACHE_NAME = 'mapbox-tiles';\nlet cacheLimit = 500; // 50MB / (100KB/tile) ~= 500 tiles\nlet cacheCheckThreshold = 50;\n\nconst MIN_TIME_UNTIL_EXPIRY = 1000 * 60 * 7; // 7 minutes. Skip caching tiles with a short enough max age.\n\nexport type ResponseOptions = {\n status: number,\n statusText: string,\n headers: Headers\n};\n\n// We're using a global shared cache object. Normally, requesting ad-hoc Cache objects is fine, but\n// Safari has a memory leak in which it fails to release memory when requesting keys() from a Cache\n// object. See https://bugs.webkit.org/show_bug.cgi?id=203991 for more information.\nlet sharedCache: ?Promise;\n\nfunction getCaches() {\n try {\n return window.caches;\n } catch (e) {\n //