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eAAgBA,EAChB2c,UAAWA,GACV/Z,GAAMyO,GAAY,CACnB/L,aAAc6X,EAAY7X,GAC1BtB,MAAOmZ,EAAYnZ,IACnBma,SAAUA,EACVlc,QAAS,SAAiBrB,GAInBb,KACH2D,IAAS,GAELwZ,GAAeA,EAAYzgB,OAAS,IACtC4hB,GAASjX,GAAO,CACd1F,GAAI,6BACJiF,SAAUA,KAEZoY,MAGE/c,GAAUA,EAASpB,KAG3BiB,OAAQ,SAAgBjB,GAKjBA,EAAMsgB,eAAiBtgB,EAAMsgB,gBAAkB3C,GAAQjW,UAC1D5E,IAAS,GACL9B,GAASA,EAAQhB,KAGzBmB,SAAUoc,OAAWjY,EAAY,SAAUtF,GAKzCqf,GAAyBlD,GAAsC,iBAAhBA,IAA6Bnc,EAAMtE,OAAO0H,OACzFmI,GAASvL,EAAMtE,OAAO0H,OACtBob,GAAyBF,IACrBnd,GAAUA,EAASnB,QAErB8e,OAERtO,EAAUzT,YAAc","sources":["webpack://po3/./node_modules/grommet-icons/es6/icons/MailOption.js","webpack://po3/./node_modules/grommet-icons/es6/icons/StatusGood.js","webpack://po3/./node_modules/grommet/es6/components/CheckBox/StyledCheckBox.js","webpack://po3/./node_modules/grommet/es6/components/CheckBox/CheckBox.js","webpack://po3/./node_modules/grommet/es6/components/Form/Form.js","webpack://po3/./node_modules/grommet/es6/components/Form/FormContext.js","webpack://po3/./node_modules/grommet/es6/components/CheckBoxGroup/StyledCheckBoxGroup.js","webpack://po3/./node_modules/grommet/es6/components/CheckBoxGroup/CheckBoxGroup.js","webpack://po3/./node_modules/grommet/es6/components/RadioButton/StyledRadioButton.js","webpack://po3/./node_modules/grommet/es6/components/RadioButton/RadioButton.js","webpack://po3/./node_modules/grommet/es6/components/RadioButtonGroup/RadioButtonGroup.js","webpack://po3/./node_modules/grommet/es6/components/FormField/FormField.js","webpack://po3/./node_modules/grommet/es6/components/Grid/StyledGrid.js","webpack://po3/./node_modules/grommet/es6/components/Grid/Grid.js","webpack://po3/./node_modules/grommet/es6/components/InfiniteScroll/InfiniteScroll.js","webpack://po3/./node_modules/grommet/es6/contexts/AnnounceContext/propTypes.js","webpack://po3/./node_modules/grommet/es6/contexts/AnnounceContext/AnnounceContext.js","webpack://po3/./node_modules/grommet/es6/components/TextInput/StyledTextInput.js","webpack://po3/./node_modules/grommet/es6/components/TextInput/TextInput.js"],"sourcesContent":["function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { StyledIcon } from '../StyledIcon';\nvar MailOption = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(StyledIcon, _extends({\n ref: ref,\n viewBox: \"0 0 24 24\",\n a11yTitle: \"MailOption\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n stroke: \"#000\",\n strokeWidth: \"2\",\n d: \"M1 4h22v16H1V4zm0 1 11 8.5L23 5\"\n }));\n});\nMailOption.displayName = 'MailOption';\nexport { MailOption };","function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nimport React, { forwardRef } from 'react';\nimport { StyledIcon } from '../StyledIcon';\nvar StatusGood = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(StyledIcon, _extends({\n ref: ref,\n viewBox: \"0 0 24 24\",\n a11yTitle: \"StatusGood\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n stroke: \"#000\",\n strokeWidth: \"2\",\n d: \"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10zM7 12l4 3 5-7\"\n }));\n});\nStatusGood.displayName = 'StatusGood';\nexport { StatusGood };","import styled, { css } from 'styled-components';\nimport { edgeStyle, focusStyle, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props'; // Note: since `fillStyle` is only used in one place, `justify-content` was\n// added to it to simplify its logic. If this is ever reused somewhere else,\n// consider the need of separating those once again.\n\nvar fillStyle = function fillStyle() {\n return \"\\n width: 100%;\\n height: 100%;\\n max-width: none;\\n flex: 1 0 auto;\\n justify-content: space-between;\\n \";\n};\n\nvar disabledStyle = \"\\n opacity: 0.5;\\n cursor: default;\\n\";\nvar hoverStyle = css([\":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:\", \";}:hover{background-color:\", \";}\"], function (props) {\n var _props$theme$checkBox, _props$theme$checkBox2;\n\n return normalizeColor((_props$theme$checkBox = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox2 = _props$theme$checkBox.border) == null ? void 0 : _props$theme$checkBox2.color, props.theme);\n}, function (props) {\n var _props$theme$checkBox3, _props$theme$checkBox4;\n\n return normalizeColor(!props.disabled && ((_props$theme$checkBox3 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox4 = _props$theme$checkBox3.background) == null ? void 0 : _props$theme$checkBox4.color), props.theme);\n});\nvar StyledCheckBoxIcon = styled.svg.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxIcon\",\n componentId: \"sc-1dbk5ju-0\"\n})([\"box-sizing:border-box;stroke-width:\", \";stroke:\", \";width:\", \";height:\", \";\", \";\"], function (props) {\n return props.theme.checkBox.check.thickness;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.color || 'control', props.theme);\n}, function (props) {\n return props.theme.checkBox.icon.size || props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.icon.size || props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.icon.extend;\n});\nStyledCheckBoxIcon.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxIcon.defaultProps, defaultProps);\nvar StyledCheckBoxContainer = styled.label.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxContainer\",\n componentId: \"sc-1dbk5ju-1\"\n})([\"display:flex;flex-direction:row;align-items:\", \";user-select:none;\", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], function (props) {\n return props.theme.checkBox.label.align;\n}, function (props) {\n return props.fillProp ? fillStyle() : 'width: fit-content;';\n}, function (props) {\n return (props.pad || props.theme.checkBox.pad) && edgeStyle('padding', props.pad || props.theme.checkBox.pad, props.responsive, props.theme.box.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.disabled && disabledStyle;\n}, function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, hoverStyle, function (props) {\n var _props$theme$checkBox5, _props$theme$checkBox6, _props$theme$checkBox7, _props$theme$checkBox8;\n\n return props.focus && !props.focusIndicator && \"\\n input:not([disabled]) + div,\\n input:not([disabled]) + span {\\n border-color: \" + normalizeColor((_props$theme$checkBox5 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox6 = _props$theme$checkBox5.border) == null ? void 0 : _props$theme$checkBox6.color, props.theme) + \";\\n }\\n \\n background-color: \" + normalizeColor(!props.disabled && ((_props$theme$checkBox7 = props.theme.checkBox.hover) == null ? void 0 : (_props$theme$checkBox8 = _props$theme$checkBox7.background) == null ? void 0 : _props$theme$checkBox8.color), props.theme) + \";\";\n}, function (props) {\n return props.theme.checkBox.extend;\n});\nStyledCheckBoxContainer.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxContainer.defaultProps, defaultProps);\nvar StyledCheckBoxInput = styled.input.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxInput\",\n componentId: \"sc-1dbk5ju-2\"\n})([\"opacity:0;-moz-appearance:none;width:0;height:0;margin:0;\", \":checked + span > span{left:calc( \", \" - \", \" );background:\", \";}\"], function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, function (props) {\n return props.theme.checkBox.toggle.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.color || 'control', props.theme);\n});\nStyledCheckBoxInput.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxInput.defaultProps, defaultProps);\nvar StyledCheckBoxBox = styled.div.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxBox\",\n componentId: \"sc-1dbk5ju-3\"\n})([\"\", \";\", \";\"], function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.checkBox.check.extend;\n});\nStyledCheckBoxBox.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxBox.defaultProps, defaultProps);\nvar StyledCheckBoxToggle = styled.span.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxToggle\",\n componentId: \"sc-1dbk5ju-4\"\n})([\"box-sizing:border-box;vertical-align:middle;display:inline-block;width:\", \";height:\", \";border:\", \" solid;border-color:\", \";border-radius:\", \";background-color:\", \";\", \";\", \";\"], function (props) {\n return props.theme.checkBox.toggle.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.border.color, props.theme);\n}, function (props) {\n return props.theme.checkBox.toggle.radius;\n}, function (props) {\n return props.theme.checkBox.toggle.background ? normalizeColor(props.theme.checkBox.toggle.background, props.theme) : 'transparent';\n}, function (props) {\n return props.focus && props.focusIndicator && focusStyle();\n}, function (props) {\n return props.theme.checkBox.toggle.extend;\n});\nStyledCheckBoxToggle.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxToggle.defaultProps, defaultProps);\nvar StyledCheckBoxKnob = styled.span.withConfig({\n displayName: \"StyledCheckBox__StyledCheckBoxKnob\",\n componentId: \"sc-1dbk5ju-5\"\n})([\"box-sizing:border-box;position:relative;display:inherit;top:-\", \";left:-\", \";transition:all 0.3s;width:\", \";height:\", \";background:\", \";border-radius:\", \";\", \";\"], function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return props.theme.checkBox.border.width;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return props.theme.checkBox.size;\n}, function (props) {\n return normalizeColor(props.theme.checkBox.toggle.color, props.theme);\n}, function (props) {\n return props.theme.checkBox.toggle.radius;\n}, function (props) {\n return props.theme.checkBox.toggle.knob.extend;\n});\nStyledCheckBoxKnob.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxKnob.defaultProps, defaultProps);\nvar StyledCheckBox = styled.div.withConfig({\n displayName: \"StyledCheckBox\",\n componentId: \"sc-1dbk5ju-6\"\n})([\"flex-shrink:0;\"]);\nStyledCheckBox.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBox.defaultProps, defaultProps);\nexport { StyledCheckBoxIcon, StyledCheckBoxContainer, StyledCheckBoxInput, StyledCheckBoxBox, StyledCheckBoxToggle, StyledCheckBoxKnob, StyledCheckBox };","var _excluded = [\"a11yTitle\", \"aria-label\", \"checked\", \"children\", \"defaultChecked\", \"disabled\", \"fill\", \"focus\", \"focusIndicator\", \"id\", \"label\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onMouseEnter\", \"onMouseLeave\", \"onMouseOut\", \"onMouseOver\", \"pad\", \"reverse\", \"toggle\", \"indeterminate\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext, useEffect, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { removeUndefined } from '../../utils/object';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { FormContext } from '../Form/FormContext';\nimport { CheckBoxPropTypes } from './propTypes';\nimport { StyledCheckBox, StyledCheckBoxBox, StyledCheckBoxIcon, StyledCheckBoxContainer, StyledCheckBoxInput, StyledCheckBoxToggle, StyledCheckBoxKnob } from './StyledCheckBox';\nimport { normalizeColor } from '../../utils';\n\nvar stopLabelClick = function stopLabelClick(event) {\n // prevents clicking on the label trigging the event twice\n // https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element\n if (event.target.type !== 'checkbox') {\n event.stopPropagation();\n }\n};\n\nvar CheckBox = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _ref2;\n\n var a11yTitle = _ref.a11yTitle,\n ariaLabel = _ref['aria-label'],\n checkedProp = _ref.checked,\n children = _ref.children,\n _ref$defaultChecked = _ref.defaultChecked,\n defaultChecked = _ref$defaultChecked === void 0 ? false : _ref$defaultChecked,\n disabled = _ref.disabled,\n fill = _ref.fill,\n focusProp = _ref.focus,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n id = _ref.id,\n label = _ref.label,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n _onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n _onMouseEnter = _ref.onMouseEnter,\n _onMouseLeave = _ref.onMouseLeave,\n _onMouseOut = _ref.onMouseOut,\n _onMouseOver = _ref.onMouseOver,\n pad = _ref.pad,\n reverse = _ref.reverse,\n toggle = _ref.toggle,\n indeterminate = _ref.indeterminate,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var formContext = useContext(FormContext);\n\n var _formContext$useFormI = formContext.useFormInput(name, checkedProp, defaultChecked),\n checked = _formContext$useFormI[0],\n setChecked = _formContext$useFormI[1];\n\n var _useState = useState(focusProp),\n focus = _useState[0],\n setFocus = _useState[1];\n\n useEffect(function () {\n return setFocus(focusProp);\n }, [focusProp]);\n useEffect(function () {\n if (checkedProp && indeterminate) {\n console.warn('Checkbox cannot be \"checked\" and \"indeterminate\" at the same time.');\n }\n\n if (toggle && indeterminate) {\n console.warn('Checkbox of type toggle does not have \"indeterminate\" state.');\n }\n }, [checkedProp, toggle, indeterminate]);\n var themeableProps = {\n checked: checked,\n disabled: disabled,\n focus: focus,\n // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a CheckBox is active.\n // If focus = true but focusIndicator = false,\n // we will apply the hover treament.\n focusIndicator: focusIndicator,\n reverse: reverse,\n toggle: toggle,\n indeterminate: indeterminate\n };\n var hidden;\n\n if (disabled && checked) {\n hidden = /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: \"true\"\n });\n }\n\n var _theme$checkBox$icons = theme.checkBox.icons,\n CheckedIcon = _theme$checkBox$icons.checked,\n IndeterminateIcon = _theme$checkBox$icons.indeterminate;\n var borderColor = normalizeColor(theme.checkBox.border.color, theme);\n\n if (checked) {\n borderColor = normalizeColor(theme.checkBox.color || 'control', theme);\n }\n\n var visual = toggle ? /*#__PURE__*/React.createElement(StyledCheckBoxToggle, themeableProps, /*#__PURE__*/React.createElement(StyledCheckBoxKnob, themeableProps)) : /*#__PURE__*/React.createElement(StyledCheckBoxBox, _extends({\n as: Box,\n align: \"center\",\n justify: \"center\",\n width: theme.checkBox.size,\n height: theme.checkBox.size,\n border: {\n size: theme.checkBox.border.width,\n color: borderColor\n },\n round: theme.checkBox.check.radius\n }, themeableProps), !indeterminate && checked && (CheckedIcon ? /*#__PURE__*/React.createElement(CheckedIcon, {\n theme: theme,\n as: StyledCheckBoxIcon\n }) : /*#__PURE__*/React.createElement(StyledCheckBoxIcon, _extends({\n theme: theme,\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, themeableProps), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n d: \"M6,11.3 L10.3,16 L18,6.2\"\n }))), !checked && indeterminate && (IndeterminateIcon ? /*#__PURE__*/React.createElement(IndeterminateIcon, {\n theme: theme,\n as: StyledCheckBoxIcon\n }) : /*#__PURE__*/React.createElement(StyledCheckBoxIcon, _extends({\n theme: theme,\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, themeableProps), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"none\",\n d: \"M6,12 L18,12\"\n }))));\n var side = reverse ? 'left' : 'right';\n var checkBoxNode = /*#__PURE__*/React.createElement(StyledCheckBox, _extends({\n as: Box,\n align: \"center\",\n justify: \"center\",\n margin: label && (_ref2 = {}, _ref2[side] = theme.checkBox.gap || 'small', _ref2)\n }, themeableProps), /*#__PURE__*/React.createElement(StyledCheckBoxInput, _extends({}, rest, {\n ref: ref,\n type: \"checkbox\"\n }, removeUndefined({\n id: id,\n name: name,\n checked: checked,\n disabled: disabled\n }), themeableProps, {\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 setChecked(event.target.checked);\n if (_onChange) _onChange(event);\n }\n })), children ? children({\n checked: checked,\n indeterminate: indeterminate\n }) : visual, hidden);\n var normalizedLabel = typeof label === 'string' ? /*#__PURE__*/React.createElement(\"span\", null, label) : label;\n var first = reverse ? normalizedLabel : checkBoxNode;\n var second = reverse ? checkBoxNode : normalizedLabel;\n return /*#__PURE__*/React.createElement(StyledCheckBoxContainer, _extends({\n \"aria-label\": ariaLabel || a11yTitle,\n fillProp: fill,\n reverse: reverse\n }, removeUndefined({\n htmlFor: id,\n disabled: disabled\n }), {\n checked: checked,\n onClick: stopLabelClick,\n pad: pad,\n onMouseEnter: function onMouseEnter(event) {\n return _onMouseEnter == null ? void 0 : _onMouseEnter(event);\n },\n onMouseOver: function onMouseOver(event) {\n return _onMouseOver == null ? void 0 : _onMouseOver(event);\n },\n onMouseLeave: function onMouseLeave(event) {\n return _onMouseLeave == null ? void 0 : _onMouseLeave(event);\n },\n onMouseOut: function onMouseOut(event) {\n return _onMouseOut == null ? void 0 : _onMouseOut(event);\n }\n }, themeableProps), first, second);\n});\nCheckBox.displayName = 'CheckBox';\nexport { CheckBox };","var _excluded = [\"children\", \"errors\", \"infos\", \"messages\", \"onChange\", \"onReset\", \"onSubmit\", \"onValidate\", \"validate\", \"value\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { FormContext } from './FormContext';\nimport { FormPropTypes } from './propTypes';\nvar defaultValue = {};\nvar defaultTouched = {};\nvar defaultValidationResults = {\n errors: {},\n infos: {}\n}; // validations is an array from Object.entries()\n\nvar validate = function validate(validations, value, omitValid) {\n var nextErrors = {};\n var nextInfos = {};\n validations.forEach(function (_ref) {\n var name = _ref[0],\n validation = _ref[1];\n\n if (!omitValid) {\n nextErrors[name] = undefined;\n nextInfos[name] = undefined;\n }\n\n var result = validation(value[name], value); // typeof error === 'object' is implied for both cases of error with\n // a status message and for an error object that is a react node\n\n if (typeof result === 'object') {\n if (result.status === 'info') {\n nextInfos[name] = result.message;\n } else {\n nextErrors[name] = result.message || result; // could be a node\n }\n } else if (typeof result === 'string') {\n nextErrors[name] = result;\n }\n });\n return [nextErrors, nextInfos];\n};\n\nvar Form = /*#__PURE__*/forwardRef(function (_ref2, ref) {\n var children = _ref2.children,\n _ref2$errors = _ref2.errors,\n errorsProp = _ref2$errors === void 0 ? defaultValidationResults.errors : _ref2$errors,\n _ref2$infos = _ref2.infos,\n infosProp = _ref2$infos === void 0 ? defaultValidationResults.infos : _ref2$infos,\n messages = _ref2.messages,\n onChange = _ref2.onChange,\n _onReset = _ref2.onReset,\n _onSubmit = _ref2.onSubmit,\n onValidate = _ref2.onValidate,\n _ref2$validate = _ref2.validate,\n validateOn = _ref2$validate === void 0 ? 'submit' : _ref2$validate,\n valueProp = _ref2.value,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n\n var _useState = useState(valueProp || defaultValue),\n valueState = _useState[0],\n setValueState = _useState[1];\n\n var value = useMemo(function () {\n return valueProp || valueState;\n }, [valueProp, valueState]);\n\n var _useState2 = useState(defaultTouched),\n touched = _useState2[0],\n setTouched = _useState2[1];\n\n var _useState3 = useState(defaultValidationResults),\n validationResults = _useState3[0],\n setValidationResults = _useState3[1]; // when onBlur input validation is triggered, we need to complete any\n // potential click events before running the onBlur validation.\n // otherwise, click events like reset, etc. may not be registered.\n // for a detailed scenario/discussion,\n // see: https://github.com/grommet/grommet/issues/4863\n // the value of pendingValidation is the name of the FormField\n // awaiting validation.\n\n\n var _useState4 = useState(undefined),\n pendingValidation = _useState4[0],\n setPendingValidation = _useState4[1];\n\n useEffect(function () {\n setPendingValidation(undefined);\n setValidationResults({\n errors: errorsProp,\n infos: infosProp\n });\n }, [errorsProp, infosProp]);\n var validations = useRef({});\n var requiredFields = useRef([]);\n var buildValid = useCallback(function (nextErrors) {\n var valid = false;\n valid = requiredFields.current.filter(function (n) {\n return Object.keys(validations.current).includes(n);\n }).every(function (field) {\n return value[field] && (value[field] !== '' || value[field] !== false);\n });\n if (Object.keys(nextErrors).length > 0) valid = false;\n return valid;\n }, [value]); // Remove any errors that we don't have any validations for anymore.\n\n var filterErrorValidations = function filterErrorValidations(errors) {\n var nextErrors = errors;\n return Object.keys(nextErrors).filter(function (n) {\n return !validations.current[n] || nextErrors[n] === undefined;\n }).forEach(function (n) {\n return delete nextErrors[n];\n });\n }; // Remove any infos that we don't have any validations for anymore.\n\n\n var filterInfoValidations = function filterInfoValidations(infos) {\n var nextInfos = infos;\n return Object.keys(nextInfos).filter(function (n) {\n return !validations.current[n] || nextInfos[n] === undefined;\n }).forEach(function (n) {\n return delete nextInfos[n];\n });\n }; // On initial mount, when validateOn is change or blur,\n // set validation results for any set fields and calculate whether\n // the form is valid overall.\n\n\n useEffect(function () {\n var validationsForSetFields = Object.entries(validations.current).filter(function (_ref3) {\n var n = _ref3[0];\n return value[n];\n });\n\n if (validationsForSetFields.length > 0 && validateOn !== 'submit') {\n var _validate = validate(validationsForSetFields, value),\n errors = _validate[0],\n infos = _validate[1];\n\n filterErrorValidations(errors);\n filterInfoValidations(infos);\n var nextValidationResults = {\n errors: errors,\n infos: infos,\n valid: buildValid(errors)\n };\n if (onValidate) onValidate(nextValidationResults);\n setValidationResults(nextValidationResults);\n } // We only want to run this for the value we have on initial mount.\n // We don't want subsequent changes to the value to re-run this.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, []); // Currently, onBlur validation will trigger after a timeout of 120ms.\n\n useEffect(function () {\n var timer = setTimeout(function () {\n if (pendingValidation) {\n // run validations on the pending one and any other touched fields\n var _validate2 = validate(Object.entries(validations.current).filter(function (_ref4) {\n var n = _ref4[0];\n return touched[n] || pendingValidation.includes(n);\n }), value),\n validatedErrors = _validate2[0],\n validatedInfos = _validate2[1];\n\n setPendingValidation(undefined);\n setValidationResults(function (prevValidationResults) {\n // keep any previous errors and infos for untouched keys,\n // these may have come from a submit\n var nextErrors = _extends({}, prevValidationResults.errors, validatedErrors);\n\n var nextInfos = _extends({}, prevValidationResults.infos, validatedInfos);\n\n filterErrorValidations(nextErrors);\n filterInfoValidations(nextInfos);\n var nextValidationResults = {\n errors: nextErrors,\n infos: nextInfos,\n valid: buildValid(nextErrors)\n };\n if (onValidate) onValidate(nextValidationResults);\n return nextValidationResults;\n });\n } // a timeout is needed to ensure that a click event (like one on a reset\n // button) completes prior to running the validation. without a timeout,\n // the blur will always complete and trigger a validation prematurely\n // The following values have been empirically tested, but 120 was\n // selected because it is the largest value\n // Chrome: 100, Safari: 120, Firefox: 80\n\n }, 120);\n return function () {\n return clearTimeout(timer);\n };\n }, [buildValid, pendingValidation, onValidate, touched, value, requiredFields]); // clear any errors when value changes\n\n useEffect(function () {\n if (validateOn !== 'change') setPendingValidation(undefined);\n setValidationResults(function (prevValidationResults) {\n var _validate3 = validate(Object.entries(validations.current).filter(function (_ref5) {\n var n = _ref5[0];\n return prevValidationResults.errors[n] || prevValidationResults.infos[n];\n }), value),\n nextErrors = _validate3[0],\n nextInfos = _validate3[1];\n\n return {\n errors: _extends({}, prevValidationResults.errors, nextErrors),\n infos: _extends({}, prevValidationResults.infos, nextInfos)\n };\n });\n }, [touched, validateOn, value]); // There are three basic patterns of handling form input value state:\n //\n // 1 - form controlled\n //\n // In this model, the caller sets `value` and `onChange` properties\n // on the Form component to supply the values used by the input fields.\n // In useFormContext(), componentValue would be undefined and formValue\n // is be set to whatever the form state has. Whenever the form state\n // changes, we update the contextValue so the input component will use\n // that. When the input component changes, we will call update() to\n // update the form state.\n //\n // 2 - input controlled\n //\n // In this model, the caller sets `value` and `onChange` properties\n // on the input components, like TextInput, to supply the value for it.\n // In useFormContext(), componentValue is this value and we ensure to\n // update the form state, via update(), and set the contextValue from\n // the componentValue. When the input component changes, we will\n // call update() to update the form state.\n //\n // 3 - uncontrolled\n //\n // In this model, the caller doesn't set a `value` or `onChange` property\n // at either the form or input component levels.\n // In useFormContext(), componentValue is undefined and valueProp is\n // undefined and nothing much happens here. That is, unless the\n // calling component needs to know the state in order to work, such\n // as CheckBox or Select. In this case, those components supply\n // an initialValue, which will trigger updating the contextValue so\n // they can have access to it.\n //\n\n var useFormInput = function useFormInput(name, componentValue, initialValue) {\n var _useState5 = useState(initialValue),\n inputValue = _useState5[0],\n setInputValue = _useState5[1];\n\n var formValue = name ? value[name] : undefined; // for dynamic forms, we need to track when an input has been added to\n // the form value. if the input is unmounted, we will delete its key/value\n // from the form value.\n\n var keyCreated = useRef(false); // This effect is for pattern #2, where the controlled input\n // component is driving the value via componentValue.\n\n useEffect(function () {\n if (name && // we have somewhere to put this\n componentValue !== undefined && // input driving\n componentValue !== formValue // don't already have it\n ) {\n setValueState(function (prevValue) {\n var nextValue = _extends({}, prevValue);\n\n nextValue[name] = componentValue;\n return nextValue;\n }); // don't onChange on programmatic changes\n }\n }, [componentValue, formValue, name]); // on unmount, if the form is uncontrolled, remove the key/value\n // from the form value\n\n useEffect(function () {\n return function () {\n if (keyCreated.current) {\n keyCreated.current = false;\n setValueState(function (prevValue) {\n var nextValue = _extends({}, prevValue);\n\n delete nextValue[name];\n return nextValue;\n });\n }\n };\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [] // only run onmount and unmount\n );\n var useValue;\n if (componentValue !== undefined) // input component drives, pattern #2\n useValue = componentValue;else if (valueProp && name && formValue !== undefined) // form drives, pattern #1\n useValue = formValue;else if (formValue === undefined && name) // form has reset, so reset input value as well\n useValue = initialValue;else useValue = inputValue;\n return [useValue, function (nextComponentValue) {\n if (name) {\n // we have somewhere to put this\n var nextTouched = _extends({}, touched);\n\n nextTouched[name] = true;\n\n if (!touched[name]) {\n // don't update if not needed\n setTouched(nextTouched);\n }\n\n var nextValue = _extends({}, value); // if nextValue doesn't have a key for name, this must be\n // uncontrolled form. we will flag this field was added so\n // we know to remove its value from the form if it is dynamically\n // removed\n\n\n if (!(name in nextValue)) keyCreated.current = true;\n nextValue[name] = nextComponentValue;\n setValueState(nextValue);\n if (onChange) onChange(nextValue, {\n touched: nextTouched\n });\n }\n\n if (initialValue !== undefined) setInputValue(nextComponentValue);\n }];\n };\n\n var useFormField = function useFormField(_ref6) {\n var errorArg = _ref6.error,\n infoArg = _ref6.info,\n name = _ref6.name,\n required = _ref6.required,\n disabled = _ref6.disabled,\n validateArg = _ref6.validate;\n var error = disabled ? undefined : errorArg || validationResults.errors[name];\n var info = infoArg || validationResults.infos[name];\n useEffect(function () {\n var validateSingle = function validateSingle(aValidate, value2, data) {\n var result;\n\n if (typeof aValidate === 'function') {\n result = aValidate(value2, data);\n } else if (aValidate.regexp) {\n if (!aValidate.regexp.test(value2)) {\n result = aValidate.message || format({\n id: 'form.invalid',\n messages: messages\n });\n\n if (aValidate.status) {\n result = {\n message: result,\n status: aValidate.status\n };\n }\n }\n }\n\n return result;\n };\n\n var validateField = function validateField(value2, data) {\n var result;\n\n if (required && (value2 === undefined || value2 === '' || value2 === false || Array.isArray(value2) && !value2.length)) {\n result = format({\n id: 'form.required',\n messages: messages\n });\n } else if (validateArg) {\n if (Array.isArray(validateArg)) {\n validateArg.some(function (aValidate) {\n result = validateSingle(aValidate, value2, data);\n return !!result;\n });\n } else {\n result = validateSingle(validateArg, value2, data);\n }\n }\n\n return result;\n };\n\n var index = requiredFields.current.indexOf(name);\n\n if (required) {\n if (index === -1) requiredFields.current.push(name);\n } else if (index !== -1) requiredFields.current.splice(index, 1);\n\n if (validateArg || required) {\n if (disabled) {\n return undefined;\n }\n\n validations.current[name] = validateField;\n return function () {\n return delete validations.current[name];\n };\n }\n\n return undefined;\n }, [error, name, required, validateArg, disabled]);\n return {\n error: error,\n info: info,\n inForm: true,\n onBlur: validateOn === 'blur' ? function () {\n return setPendingValidation(pendingValidation ? [].concat(pendingValidation, [name]) : [name]);\n } : undefined,\n onChange: validateOn === 'change' ? function () {\n return setPendingValidation(pendingValidation ? [].concat(pendingValidation, [name]) : [name]);\n } : undefined\n };\n };\n\n return /*#__PURE__*/React.createElement(\"form\", _extends({\n ref: ref\n }, rest, {\n onReset: function onReset(event) {\n setPendingValidation(undefined);\n\n if (!valueProp) {\n setValueState(defaultValue);\n if (onChange) onChange(defaultValue, {\n touched: defaultTouched\n });\n }\n\n setTouched(defaultTouched);\n setValidationResults(defaultValidationResults);\n\n if (_onReset) {\n event.persist(); // extract from React's synthetic event pool\n\n var adjustedEvent = event;\n adjustedEvent.value = defaultValue;\n\n _onReset(adjustedEvent);\n }\n },\n onSubmit: function onSubmit(event) {\n // Don't submit the form via browser form action. We don't want it\n // if the validation fails. And, we assume a javascript action handler\n // otherwise.\n event.preventDefault();\n setPendingValidation(undefined);\n\n var _validate4 = validate(Object.entries(validations.current), value, true),\n nextErrors = _validate4[0],\n nextInfos = _validate4[1];\n\n setValidationResults(function () {\n var nextValidationResults = {\n errors: nextErrors,\n infos: nextInfos,\n // Show form's validity when clicking on Submit\n valid: buildValid(nextErrors)\n };\n if (onValidate) onValidate(nextValidationResults);\n return nextValidationResults;\n });\n\n if (Object.keys(nextErrors).length === 0 && _onSubmit) {\n event.persist(); // extract from React's synthetic event pool\n\n var adjustedEvent = event;\n adjustedEvent.value = value;\n adjustedEvent.touched = touched;\n\n _onSubmit(adjustedEvent);\n }\n }\n }), /*#__PURE__*/React.createElement(FormContext.Provider, {\n value: {\n useFormField: useFormField,\n useFormInput: useFormInput\n }\n }, children));\n});\nForm.displayName = 'Form';\nexport { Form };","import React, { useState } from 'react'; // When not a descendant of a Form, FormContext still provides a basic\n// useFormInput. It doesn't do anything for components like TextInput.\n// But, it does store the value for components like CheckBox or Select\n// where the grommet component needs to know the value in order to\n// render custom visuals.\n\nvar useFormInput = function useFormInput(_, valueProp, initialValue) {\n var _useState = useState(valueProp !== undefined ? valueProp : initialValue),\n value = _useState[0],\n setValue = _useState[1];\n\n return [valueProp !== undefined ? valueProp : value, function (nextValue) {\n if (initialValue !== undefined) setValue(nextValue);\n }];\n};\n\nvar useFormField = function useFormField(_ref) {\n var error = _ref.error,\n info = _ref.info,\n disabled = _ref.disabled;\n return {\n error: error,\n info: info,\n disabled: disabled\n };\n};\n\nexport var FormContext = /*#__PURE__*/React.createContext({\n useFormField: useFormField,\n useFormInput: useFormInput\n});","import styled from 'styled-components';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nvar StyledCheckBoxGroup = styled(Box).withConfig({\n displayName: \"StyledCheckBoxGroup\",\n componentId: \"sc-2nhc5d-0\"\n})([\"\", \"\"], function (props) {\n return props.theme.checkBoxGroup && props.theme.checkBoxGroup.container && props.theme.checkBoxGroup.container.extend;\n});\nStyledCheckBoxGroup.defaultProps = {};\nObject.setPrototypeOf(StyledCheckBoxGroup.defaultProps, defaultProps);\nexport { StyledCheckBoxGroup };","var _excluded = [\"children\", \"value\", \"disabled\", \"focusIndicator\", \"gap\", \"labelKey\", \"valueKey\", \"onChange\", \"options\", \"name\"],\n _excluded2 = [\"value\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { CheckBox } from '../CheckBox';\nimport { FormContext } from '../Form/FormContext';\nimport { StyledCheckBoxGroup } from './StyledCheckBoxGroup';\nimport { CheckBoxGroupPropTypes } from './propTypes';\nvar CheckBoxGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n valueProp = _ref.value,\n disabledProp = _ref.disabled,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n gap = _ref.gap,\n labelKey = _ref.labelKey,\n valueKey = _ref.valueKey,\n onChange = _ref.onChange,\n optionsProp = _ref.options,\n name = _ref.name,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var formContext = useContext(FormContext);\n var theme = useContext(ThemeContext) || defaultProps.theme; // In case option is a string, normalize it to be an object\n\n var options = optionsProp.map(function (option) {\n return typeof option === 'string' ? {\n disabled: disabledProp,\n value: option,\n label: option\n } : option;\n }); // 'value' is an array of checked valueKeys\n\n var _formContext$useFormI = formContext.useFormInput(name, valueProp, []),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1]; // Logic is necessary to maintain a proper data structure for Form logic\n\n\n var onCheckBoxChange = function onCheckBoxChange(event, optionValue, option) {\n // deep copy of value\n var nextValue = JSON.parse(JSON.stringify(value)) || [];\n var optionIndex = nextValue.indexOf(optionValue); // If the value option isn't in the array, add it.\n // Otherwise, remove it.\n\n if (optionIndex < 0) nextValue.push(optionValue);else nextValue.splice(optionIndex, 1);\n setValue(nextValue); // Similar functionality to Select onChange()\n\n if (onChange) {\n event.persist(); // extract from React synthetic event pool\n\n var adjustedEvent = event;\n adjustedEvent.value = nextValue;\n adjustedEvent.option = option;\n onChange(adjustedEvent);\n }\n };\n\n return /*#__PURE__*/React.createElement(StyledCheckBoxGroup, _extends({\n ref: ref,\n role: \"group\"\n }, theme.checkBoxGroup.container, {\n gap: gap || (theme.checkBoxGroup.container && theme.checkBoxGroup.container.gap ? theme.checkBoxGroup.container.gap : 'small') // consistent with RadioButtonGroup default\n\n }, rest), options.map(function (option, index) {\n var optionValue = option.value;\n var label = labelKey ? option[labelKey] : option.label;\n var valueOption = valueKey ? option[valueKey] : optionValue;\n var checked = value.indexOf(valueOption) >= 0;\n var disabled = disabledProp || option.disabled;\n var key = label + \"-\" + valueOption;\n if (option.checked) console.warn( // eslint-disable-next-line max-len\n \"'checked' prop of an individual CheckBox shouldn't be used in a CheckBoxGroup component. Use the CheckBoxGroup 'value' prop instead.\"); // value shouldn't propagate the input field and the onChange option\n\n var omit = option.value,\n optionRest = _objectWithoutPropertiesLoose(option, _excluded2);\n\n var optionProps = _extends({}, optionRest, {\n label: label,\n disabled: disabled\n });\n\n return /*#__PURE__*/React.createElement(CheckBox, _extends({\n key: key\n }, optionProps, {\n disabled: disabled,\n checked: checked // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a CheckBox is active.\n // In CheckBox, if focus = true but focusIndicator = false,\n // we will apply the hover treament.\n ,\n focusIndicator: focusIndicator,\n label: label,\n onChange: function onChange(event) {\n return onCheckBoxChange(event, valueOption, optionProps);\n }\n }), children ? function (state) {\n return children(options[index], state);\n } : null);\n }));\n});\nCheckBoxGroup.displayName = 'CheckBoxGroup';\nexport { CheckBoxGroup };","import styled, { css } from 'styled-components';\nimport { focusStyle, normalizeColor } from '../../utils';\nimport { defaultProps } from '../../default-props';\nvar disabledStyle = \"\\n opacity: 0.5;\\n cursor: default;\\n\";\nvar StyledRadioButtonContainer = styled.label.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonContainer\",\n componentId: \"g1f6ld-0\"\n})([\"display:flex;flex-direction:row;align-items:center;user-select:none;width:fit-content;\", \" \", \":hover input:not([disabled]) + div,:hover input:not([disabled]) + span{border-color:\", \";}:hover{background-color:\", \";}\", \" \", \";\"], function (props) {\n return props.disabled && disabledStyle;\n}, function (props) {\n return !props.disabled && 'cursor: pointer;';\n}, function (props) {\n return normalizeColor(props.theme.radioButton.hover.border.color, props.theme);\n}, function (props) {\n return normalizeColor(!props.disabled && props.theme.radioButton.hover && props.theme.radioButton.hover.background && props.theme.radioButton.hover.background.color, props.theme);\n}, function (props) {\n return props.focus && !props.focusIndicator && \"\\n input:not([disabled]) + div,\\n input:not([disabled]) + span {\\n border-color: \" + normalizeColor(props.theme.radioButton.hover.border.color, props.theme) + \";\\n }\\n background-color: \" + normalizeColor(!props.disabled && props.theme.radioButton.hover && props.theme.radioButton.hover.background && props.theme.radioButton.hover.background.color, props.theme) + \";\\n \";\n}, function (props) {\n return props.theme.radioButton.container.extend;\n});\nStyledRadioButtonContainer.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonContainer.defaultProps, defaultProps);\nvar StyledRadioButtonInput = styled.input.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonInput\",\n componentId: \"g1f6ld-1\"\n})([\"opacity:0;-moz-appearance:none;width:0;height:0;margin:0;\", \";\"], function (props) {\n return !props.disabled && 'cursor: pointer;';\n});\nStyledRadioButtonInput.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonInput.defaultProps, defaultProps);\nvar StyledRadioButtonLabel = styled.span.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonLabel\",\n componentId: \"g1f6ld-2\"\n})([\"\", \"\"], function (props) {\n return props.theme.radioButton.font.weight && css([\"font-weight:\", \";\"], props.theme.radioButton.font.weight);\n});\nStyledRadioButtonLabel.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonLabel.defaultProps, defaultProps);\nvar StyledRadioButtonIcon = styled.svg.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonIcon\",\n componentId: \"g1f6ld-3\"\n})([\"box-sizing:border-box;width:\", \";height:\", \";fill:\", \";\", \";\"], function (props) {\n return props.theme.radioButton.icon.size || props.theme.radioButton.size;\n}, function (props) {\n return props.theme.radioButton.icon.size || props.theme.radioButton.size;\n}, function (props) {\n return normalizeColor(props.theme.radioButton.check.color || 'control', props.theme);\n}, function (props) {\n return props.theme.radioButton.icon.extend;\n});\nStyledRadioButtonIcon.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonIcon.defaultProps, defaultProps);\nvar StyledRadioButtonBox = styled.div.withConfig({\n displayName: \"StyledRadioButton__StyledRadioButtonBox\",\n componentId: \"g1f6ld-4\"\n})([\"background-color:\", \";\", \";\", \";\"], function (props) {\n return props.theme.radioButton.check.background && props.theme.radioButton.check.background.color;\n}, function (props) {\n return props.focus && focusStyle();\n}, function (props) {\n return props.theme.radioButton.check.extend;\n});\nStyledRadioButtonBox.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButtonBox.defaultProps, defaultProps);\nvar StyledRadioButton = styled.div.withConfig({\n displayName: \"StyledRadioButton\",\n componentId: \"g1f6ld-5\"\n})([\"\", \";\"], function (props) {\n return props.theme.radioButton && props.theme.radioButton.extend;\n});\nStyledRadioButton.defaultProps = {};\nObject.setPrototypeOf(StyledRadioButton.defaultProps, defaultProps);\nexport { StyledRadioButtonContainer, StyledRadioButtonInput, StyledRadioButtonLabel, StyledRadioButtonIcon, StyledRadioButtonBox, StyledRadioButton };","var _excluded = [\"a11yTitle\", \"checked\", \"children\", \"disabled\", \"focus\", \"focusIndicator\", \"id\", \"label\", \"name\", \"onChange\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { Box } from '../Box';\nimport { defaultProps } from '../../default-props';\nimport { normalizeColor, removeUndefined } from '../../utils';\nimport { StyledRadioButton, StyledRadioButtonContainer, StyledRadioButtonIcon, StyledRadioButtonInput, StyledRadioButtonLabel, StyledRadioButtonBox } from './StyledRadioButton';\nimport { RadioButtonPropTypes } from './propTypes';\nvar RadioButton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n checked = _ref.checked,\n children = _ref.children,\n disabled = _ref.disabled,\n focus = _ref.focus,\n focusIndicator = _ref.focusIndicator,\n id = _ref.id,\n label = _ref.label,\n name = _ref.name,\n onChange = _ref.onChange,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n var _useState = useState(),\n hover = _useState[0],\n setHover = _useState[1];\n\n var normalizedLabel = typeof label === 'string' ? /*#__PURE__*/React.createElement(StyledRadioButtonLabel, null, label) : label;\n var Icon = theme.radioButton.icons.circle;\n var borderColor = normalizeColor(theme.radioButton.border.color, theme);\n\n if (checked) {\n borderColor = normalizeColor(theme.radioButton.color || 'control', theme);\n }\n\n return /*#__PURE__*/React.createElement(StyledRadioButtonContainer, _extends({}, removeUndefined({\n htmlFor: id,\n disabled: disabled\n }), {\n onClick: function onClick(event) {\n // prevents clicking on the label trigging the event twice\n // https://stackoverflow.com/questions/24501497/why-the-onclick-element-will-trigger-twice-for-label-element\n if (event.target.type !== 'radio') {\n event.stopPropagation();\n }\n },\n focus: focus,\n focusIndicator: focusIndicator,\n onMouseEnter: function onMouseEnter() {\n return setHover(true);\n },\n onMouseLeave: function onMouseLeave() {\n return setHover(false);\n }\n }), /*#__PURE__*/React.createElement(StyledRadioButton, {\n as: Box,\n flex: false,\n margin: label ? {\n right: theme.radioButton.gap || 'small'\n } : undefined\n }, /*#__PURE__*/React.createElement(StyledRadioButtonInput, _extends({\n \"aria-label\": a11yTitle\n }, rest, {\n ref: ref,\n type: \"radio\"\n }, removeUndefined({\n id: id,\n name: name,\n checked: checked,\n disabled: disabled,\n onChange: onChange\n }))), children ? children({\n checked: checked,\n focus: focus && focusIndicator,\n hover: hover\n }) : /*#__PURE__*/React.createElement(StyledRadioButtonBox, {\n focus: focus && focusIndicator,\n as: Box,\n align: \"center\",\n justify: \"center\",\n width: theme.radioButton.size,\n height: theme.radioButton.size,\n border: {\n size: theme.radioButton.border.width,\n color: borderColor\n },\n round: theme.radioButton.check.radius\n }, checked && (Icon ? /*#__PURE__*/React.createElement(Icon, {\n as: StyledRadioButtonIcon\n }) : /*#__PURE__*/React.createElement(StyledRadioButtonIcon, {\n viewBox: \"0 0 24 24\",\n preserveAspectRatio: \"xMidYMid meet\"\n }, /*#__PURE__*/React.createElement(\"circle\", {\n cx: 12,\n cy: 12,\n r: 6\n }))))), normalizedLabel);\n});\nRadioButton.displayName = 'RadioButton';\nexport { RadioButton };","var _excluded = [\"children\", \"defaultValue\", \"disabled\", \"focusIndicator\", \"name\", \"onChange\", \"options\", \"value\", \"gap\"],\n _excluded2 = [\"disabled\", \"id\", \"label\", \"value\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useContext, useEffect, useRef, useState } from 'react';\nimport { ThemeContext } from 'styled-components';\nimport { FormContext } from '../Form/FormContext';\nimport { defaultProps } from '../../default-props';\nimport { Keyboard } from '../Keyboard';\nimport { Box } from '../Box';\nimport { RadioButton } from '../RadioButton';\nimport { RadioButtonGroupPropTypes } from './propTypes';\nvar RadioButtonGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n defaultValue = _ref.defaultValue,\n disabled = _ref.disabled,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n name = _ref.name,\n _onChange = _ref.onChange,\n optionsProp = _ref.options,\n valueProp = _ref.value,\n gap = _ref.gap,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var formContext = useContext(FormContext);\n var theme = useContext(ThemeContext) || defaultProps.theme; // normalize options to always use an object\n\n var options = optionsProp.map(function (o) {\n return typeof o !== 'object' ? {\n disabled: disabled,\n id: rest.id ? rest.id + \"-\" + o : \"\" + o,\n // force string\n label: typeof o !== 'string' ? JSON.stringify(o) : o,\n value: o\n } : _extends({\n disabled: disabled\n }, o);\n });\n\n var _formContext$useFormI = formContext.useFormInput(name, valueProp, defaultValue || ''),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1]; // track if focus is on one of the radio buttons\n\n\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n\n var optionRefs = useRef([]);\n var valueIndex = React.useMemo(function () {\n var result;\n options.some(function (option, index) {\n if (option.value === value) {\n result = index;\n return true;\n }\n\n return false;\n });\n return result;\n }, [options, value]);\n useEffect(function () {\n // if tab comes back to RadioButtonGroup when there still is no selection,\n // we want focus to be on the first RadioButton\n if (focus && !valueIndex) {\n optionRefs.current[0].focus();\n }\n }, [focus, valueIndex]);\n\n var onNext = function onNext() {\n if (valueIndex !== undefined && valueIndex < options.length - 1) {\n var nextIndex = valueIndex + 1; // ensure change event occurs\n\n optionRefs.current[nextIndex].click();\n }\n };\n\n var onPrevious = function onPrevious() {\n if (valueIndex > 0) {\n var nextIndex = valueIndex - 1; // ensure change event occurs\n\n optionRefs.current[nextIndex].click();\n }\n };\n\n var onFocus = function onFocus() {\n // Delay just a wee bit so Chrome doesn't missing turning the button on.\n // Chrome behaves differently in that focus is given to radio buttons\n // when the user selects one, unlike Safari and Firefox.\n setTimeout(function () {\n setFocus(true);\n }, 1);\n };\n\n var onBlur = function onBlur() {\n return setFocus(false);\n };\n\n return /*#__PURE__*/React.createElement(Keyboard, {\n target: \"document\",\n onUp: focus ? onPrevious : undefined,\n onDown: focus ? onNext : undefined,\n onLeft: focus ? onPrevious : undefined,\n onRight: focus ? onNext : undefined\n }, /*#__PURE__*/React.createElement(Box, _extends({\n ref: ref,\n role: \"radiogroup\"\n }, theme.radioButtonGroup.container, {\n gap: gap || (theme.radioButtonGroup.container && theme.radioButtonGroup.container.gap ? theme.radioButtonGroup.container.gap : 'small')\n }, rest), options.map(function (_ref2, index) {\n var optionDisabled = _ref2.disabled,\n id = _ref2.id,\n label = _ref2.label,\n optionValue = _ref2.value,\n optionRest = _objectWithoutPropertiesLoose(_ref2, _excluded2); // if focus is within the RadioButtonGroup, determine\n // which radio button should be the active one\n\n\n var focusable = optionValue === value || value === undefined && !index || value === '' && index === 0;\n return /*#__PURE__*/React.createElement(RadioButton, _extends({\n ref: function ref(aRef) {\n optionRefs.current[index] = aRef;\n },\n key: optionValue,\n name: name,\n label: !children ? label : undefined,\n disabled: optionDisabled,\n checked: optionValue === value,\n focus: focus && focusable // when contained in a FormField, focusIndicator = false,\n // so that the FormField has focus style. However, we still\n // need to visually indicate when a RadioButton is active.\n // In RadioButton, if focus = true but focusIndicator = false,\n // we will apply the hover treament.\n ,\n focusIndicator: focusIndicator,\n id: id,\n value: optionValue,\n onFocus: onFocus,\n onBlur: onBlur,\n onChange: function onChange(event) {\n setValue(optionValue);\n if (_onChange) _onChange(event);\n },\n tabIndex: focusable ? '0' : '-1' // necessary for Firefox\n\n }, optionRest), children ? function (state) {\n return children(optionsProp[index], state);\n } : null);\n })));\n});\nRadioButtonGroup.displayName = 'RadioButtonGroup';\nexport { RadioButtonGroup };","var _excluded = [\"error\", \"info\", \"message\", \"type\"],\n _excluded2 = [\"component\", \"disabled\", \"invalid\", \"name\", \"onChange\"],\n _excluded3 = [\"children\", \"className\", \"component\", \"contentProps\", \"disabled\", \"error\", \"help\", \"htmlFor\", \"info\", \"label\", \"margin\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"pad\", \"required\", \"style\", \"validate\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { Children, cloneElement, forwardRef, useContext, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { containsFocus } from '../../utils/DOM';\nimport { focusStyle } from '../../utils/styles';\nimport { parseMetricToNum } from '../../utils/mixins';\nimport { useForwardedRef } from '../../utils/refs';\nimport { Box } from '../Box';\nimport { CheckBox } from '../CheckBox';\nimport { CheckBoxGroup } from '../CheckBoxGroup';\nimport { RadioButtonGroup } from '../RadioButtonGroup';\nimport { Text } from '../Text';\nimport { TextInput } from '../TextInput';\nimport { FormContext } from '../Form/FormContext';\nimport { FormFieldPropTypes } from './propTypes';\nvar grommetInputNames = ['CheckBox', 'CheckBoxGroup', 'TextInput', 'Select', 'MaskedInput', 'TextArea', 'DateInput', 'FileInput', 'RadioButtonGroup'];\nvar grommetInputPadNames = ['CheckBox', 'CheckBoxGroup', 'RadioButtonGroup', 'RangeInput'];\n\nvar isGrommetInput = function isGrommetInput(comp) {\n return comp && (grommetInputNames.indexOf(comp.displayName) !== -1 || grommetInputPadNames.indexOf(comp.displayName) !== -1);\n};\n\nvar FormFieldBox = styled(Box).withConfig({\n displayName: \"FormField__FormFieldBox\",\n componentId: \"m9hood-0\"\n})([\"\", \" \", \"\"], function (props) {\n return props.focus && focusStyle({\n justBorder: true\n });\n}, function (props) {\n return props.theme.formField && props.theme.formField.extend;\n});\nvar FormFieldContentBox = styled(Box).withConfig({\n displayName: \"FormField__FormFieldContentBox\",\n componentId: \"m9hood-1\"\n})([\"\", \"\"], function (props) {\n return props.focus && focusStyle({\n justBorder: true\n });\n});\nvar StyledMessageContainer = styled(Box).withConfig({\n displayName: \"FormField__StyledMessageContainer\",\n componentId: \"m9hood-2\"\n})([\"\", \"\"], function (props) {\n return props.messageType && props.theme.formField[props.messageType].container && props.theme.formField[props.messageType].container.extend;\n});\n\nvar Message = function Message(_ref) {\n var error = _ref.error,\n info = _ref.info,\n message = _ref.message,\n type = _ref.type,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n if (message) {\n var icon;\n var containerProps;\n\n if (type) {\n icon = theme.formField[type] && theme.formField[type].icon;\n containerProps = theme.formField[type] && theme.formField[type].container;\n }\n\n var messageContent;\n if (typeof message === 'string') messageContent = /*#__PURE__*/React.createElement(Text, rest, message);else messageContent = /*#__PURE__*/React.createElement(Box, rest, message);\n return icon || containerProps ? /*#__PURE__*/React.createElement(StyledMessageContainer, _extends({\n direction: \"row\",\n messageType: type\n }, containerProps), icon && /*#__PURE__*/React.createElement(Box, {\n flex: false\n }, icon), messageContent) : messageContent;\n }\n\n return null;\n};\n\nvar Input = function Input(_ref2) {\n var component = _ref2.component,\n disabled = _ref2.disabled,\n invalid = _ref2.invalid,\n name = _ref2.name,\n _onChange = _ref2.onChange,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n var formContext = useContext(FormContext);\n\n var _formContext$useFormI = formContext.useFormInput(name, rest.value),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n var InputComponent = component || TextInput; // Grommet input components already check for FormContext\n // and, using their `name`, end up calling the useFormInput.setValue()\n // already. For custom components, we expect they will call\n // this onChange() and we'll call setValue() here, primarily\n // for backwards compatibility.\n\n var extraProps = isGrommetInput(InputComponent) ? {\n focusIndicator: false,\n onChange: _onChange,\n plain: true\n } : {\n value: value,\n onChange: function onChange(event) {\n setValue(event.value !== undefined ? event.value : event.target.value);\n if (_onChange) _onChange(event);\n }\n };\n return /*#__PURE__*/React.createElement(InputComponent, _extends({\n name: name,\n disabled: disabled,\n \"aria-invalid\": invalid || undefined\n }, rest, extraProps));\n};\n\nvar debounce = function debounce(func, wait) {\n var timeout;\n return function executedFunction() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var later = function later() {\n timeout = null;\n func.apply(void 0, args);\n };\n\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n };\n};\n\nvar FormField = /*#__PURE__*/forwardRef(function (_ref3, ref) {\n var children = _ref3.children,\n className = _ref3.className,\n component = _ref3.component,\n contentProps = _ref3.contentProps,\n disabled = _ref3.disabled,\n errorProp = _ref3.error,\n help = _ref3.help,\n htmlFor = _ref3.htmlFor,\n infoProp = _ref3.info,\n label = _ref3.label,\n margin = _ref3.margin,\n name = _ref3.name,\n _onBlur = _ref3.onBlur,\n onChange = _ref3.onChange,\n _onFocus = _ref3.onFocus,\n pad = _ref3.pad,\n required = _ref3.required,\n style = _ref3.style,\n validate = _ref3.validate,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded3);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n var formContext = useContext(FormContext);\n\n var _formContext$useFormF = formContext.useFormField({\n disabled: disabled,\n error: errorProp,\n info: infoProp,\n name: name,\n required: required,\n validate: validate\n }),\n error = _formContext$useFormF.error,\n info = _formContext$useFormF.info,\n inForm = _formContext$useFormF.inForm,\n contextOnBlur = _formContext$useFormF.onBlur,\n contextOnChange = _formContext$useFormF.onChange;\n\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n\n var formFieldRef = useForwardedRef(ref);\n var formFieldTheme = theme.formField;\n var themeBorder = formFieldTheme.border; // This is here for backwards compatibility. In case the child is a grommet\n // input component, set plain and focusIndicator props, if they aren't\n // already set.\n\n var wantContentPad = component && (component === CheckBox || component === CheckBoxGroup || component === RadioButtonGroup);\n var contents = themeBorder && children && Children.map(children, function (child) {\n if (child && child.type && grommetInputPadNames.indexOf(child.type.displayName) !== -1) {\n wantContentPad = true;\n }\n\n if (child && child.type && grommetInputNames.indexOf(child.type.displayName) !== -1 && child.props.plain === undefined && child.props.focusIndicator === undefined) {\n return /*#__PURE__*/cloneElement(child, {\n plain: true,\n focusIndicator: false\n });\n }\n\n return child;\n }) || children; // put rest on container, unless we use internal Input\n\n var containerRest = rest;\n\n if (inForm) {\n if (!contents) containerRest = {};\n contents = contents || /*#__PURE__*/React.createElement(Input, _extends({\n component: component,\n disabled: disabled,\n invalid: !!error,\n name: name,\n label: component === CheckBox ? label : undefined\n }, rest));\n }\n\n var themeContentProps = _extends({}, formFieldTheme.content);\n\n if (!pad && !wantContentPad) {\n themeContentProps.pad = undefined;\n }\n\n if (themeBorder && themeBorder.position === 'inner') {\n if (error && formFieldTheme.error) {\n themeContentProps.background = formFieldTheme.error.background;\n } else if (disabled && formFieldTheme.disabled) {\n themeContentProps.background = formFieldTheme.disabled.background;\n }\n } // fileinput handle\n // use fileinput plain use formfield to drive the border\n\n\n var isFileInputComponent;\n if (children && Children.forEach(children, function (child) {\n if (child && child.type && 'FileInput'.indexOf(child.type.displayName) !== -1) isFileInputComponent = true;\n })) ;\n\n if (!themeBorder) {\n contents = /*#__PURE__*/React.createElement(Box, _extends({}, themeContentProps, contentProps), contents);\n }\n\n var borderColor;\n\n if (disabled && formFieldTheme.disabled.border && formFieldTheme.disabled.border.color) {\n borderColor = formFieldTheme.disabled.border.color;\n } else if ( // backward compatibility check\n error && themeBorder && themeBorder.error.color || error && formFieldTheme.error && formFieldTheme.error.border) {\n if (themeBorder.error.color && formFieldTheme.error.border === undefined) {\n borderColor = themeBorder.error.color || 'status-critical';\n } else if (formFieldTheme.error.border && formFieldTheme.error.border.color) {\n borderColor = formFieldTheme.error.border.color || 'status-critical';\n }\n } else if (focus && formFieldTheme.focus && formFieldTheme.focus.border && formFieldTheme.focus.border.color) {\n borderColor = formFieldTheme.focus.border.color;\n } else {\n borderColor = themeBorder && themeBorder.color || 'border';\n }\n\n var labelStyle = _extends({}, formFieldTheme.label);\n\n if (disabled) {\n labelStyle.color = formFieldTheme.disabled && formFieldTheme.disabled.label ? formFieldTheme.disabled.label.color : labelStyle.color;\n }\n\n var abut;\n var abutMargin;\n var outerStyle = style; // If fileinput is wrapped in a formfield we want to use\n // the border style from the fileInput.theme. We also do not\n // want the foocus around the formfield since the the focus\n // is on the anchor/button inside fileinput\n\n if (themeBorder) {\n var innerProps = themeBorder.position === 'inner' ? {\n border: _extends({}, themeBorder, {\n size: isFileInputComponent ? theme.fileInput.border.size : undefined,\n style: isFileInputComponent ? theme.fileInput.border.style : undefined,\n side: isFileInputComponent ? theme.fileInput.border.side : themeBorder.side || 'bottom',\n color: borderColor\n }),\n round: formFieldTheme.round,\n focus: isFileInputComponent ? undefined : focus\n } : {};\n contents = /*#__PURE__*/React.createElement(FormFieldContentBox, _extends({}, themeContentProps, innerProps, contentProps), contents);\n var mergedMargin = margin || formFieldTheme.margin;\n abut = themeBorder.position === 'outer' && (themeBorder.side === 'all' || themeBorder.side === 'horizontal' || !themeBorder.side) && !(mergedMargin && (typeof mergedMargin === 'string' && mergedMargin !== 'none' || mergedMargin.bottom && mergedMargin.bottom !== 'none' || mergedMargin.horizontal && mergedMargin.horizontal !== 'none'));\n\n if (abut) {\n // marginBottom is set to overlap adjacent fields\n abutMargin = {\n bottom: '-1px'\n };\n\n if (margin) {\n abutMargin = margin;\n } else if (themeBorder.size) {\n // if the user defines a margin,\n // then the default margin below will be overridden\n abutMargin = {\n bottom: \"-\" + parseMetricToNum(theme.global.borderSize[themeBorder.size] || themeBorder.size) + \"px\"\n };\n }\n\n outerStyle = _extends({\n position: focus ? 'relative' : undefined,\n zIndex: focus ? 10 : undefined\n }, style);\n }\n }\n\n var outerBackground;\n\n if (themeBorder && themeBorder.position === 'outer') {\n if (error && formFieldTheme.error && formFieldTheme.error.background) {\n outerBackground = formFieldTheme.error.background;\n } else if (focus && formFieldTheme.focus && formFieldTheme.focus.background && formFieldTheme.focus.background.color) {\n outerBackground = formFieldTheme.focus.background.color;\n } else if (disabled && formFieldTheme.disabled && formFieldTheme.disabled.background) {\n outerBackground = formFieldTheme.disabled.background;\n }\n }\n\n var outerProps = themeBorder && themeBorder.position === 'outer' ? {\n border: _extends({}, themeBorder, {\n color: borderColor\n }),\n round: formFieldTheme.round,\n focus: focus\n } : {};\n var requiredIndicator = theme.formField.label.requiredIndicator;\n if (requiredIndicator === true) // a11yTitle necessary so screenreader announces as \"required\"\n // as opposed to \"star\"\n // accessibility resource: https://www.deque.com/blog/anatomy-of-accessible-forms-required-form-fields/\n requiredIndicator = /*#__PURE__*/React.createElement(Text, {\n a11yTitle: \"required\"\n }, \"*\");\n return /*#__PURE__*/React.createElement(FormFieldBox, _extends({\n ref: formFieldRef,\n className: className,\n background: outerBackground,\n margin: abut ? abutMargin : margin || _extends({}, formFieldTheme.margin)\n }, outerProps, {\n style: outerStyle,\n onFocus: function onFocus(event) {\n setFocus(containsFocus(formFieldRef.current));\n if (_onFocus) _onFocus(event);\n },\n onBlur: function onBlur(event) {\n setFocus(false);\n if (contextOnBlur) contextOnBlur(event);\n if (_onBlur) _onBlur(event);\n },\n onChange: contextOnChange || onChange ? function (event) {\n event.persist();\n if (onChange) onChange(event);\n\n if (contextOnChange) {\n var debouncedFn = debounce(function () {\n contextOnChange(event); // A half second (500ms) debounce can be a helpful starting\n // point. You want to give the user time to fill out a\n // field, but capture their attention before they move on\n // past it. 2 second (2000ms) might be too long depending\n // on how fast people type, and 200ms would be an eye blink\n }, 500);\n debouncedFn();\n }\n } : undefined\n }, containerRest), label && component !== CheckBox || help ? /*#__PURE__*/React.createElement(React.Fragment, null, label && component !== CheckBox && /*#__PURE__*/React.createElement(Text, _extends({\n as: \"label\",\n htmlFor: htmlFor\n }, labelStyle), label, required && requiredIndicator ? requiredIndicator : undefined), /*#__PURE__*/React.createElement(Message, _extends({\n message: help\n }, formFieldTheme.help))) : undefined, contents, /*#__PURE__*/React.createElement(Message, _extends({\n type: \"error\",\n message: error\n }, formFieldTheme.error)), /*#__PURE__*/React.createElement(Message, _extends({\n type: \"info\",\n message: info\n }, formFieldTheme.info)));\n});\nFormField.displayName = 'FormField';\nexport { FormField };","import styled, { css } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { alignContentStyle, alignStyle, borderStyle, edgeStyle, genericStyles, heightStyle, widthStyle } from '../../utils';\n\nvar fillStyle = function fillStyle(fill) {\n if (!fill) {\n return fill;\n }\n\n if (fill === 'horizontal') {\n return 'width: 100%;';\n }\n\n if (fill === 'vertical') {\n return 'height: 100%;';\n }\n\n return \"\\n width: 100%;\\n height: 100%;\\n \";\n};\n\nvar JUSTIFY_MAP = {\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar justifyStyle = css([\"justify-items:\", \";\"], function (props) {\n return JUSTIFY_MAP[props.justify];\n});\nvar JUSTIFY_CONTENT_MAP = {\n around: 'space-around',\n between: 'space-between',\n center: 'center',\n end: 'flex-end',\n start: 'flex-start',\n stretch: 'stretch'\n};\nvar justifyContentStyle = css([\"justify-content:\", \";\"], function (props) {\n return JUSTIFY_CONTENT_MAP[props.justifyContent];\n});\n\nvar gapSizes = function gapSizes(props) {\n var result = [];\n\n if (typeof props.gap === 'string') {\n var size = props.theme.global.edgeSize[props.gap] || props.gap;\n result[0] = size;\n result[1] = size;\n } else if (props.gap) {\n if (props.gap.row) result[0] = props.theme.global.edgeSize[props.gap.row] || props.gap.row;\n if (props.gap.column) result[1] = props.theme.global.edgeSize[props.gap.column] || props.gap.column;\n }\n\n return result;\n};\n\nvar gapStyle = function gapStyle(props) {\n var sizes = gapSizes(props);\n\n if (sizes[0] !== undefined && sizes[1] !== undefined) {\n return \"grid-gap: \" + sizes[0] + \" \" + sizes[1] + \";\";\n }\n\n if (sizes[0] !== undefined) {\n return \"grid-row-gap: \" + sizes[0] + \";\";\n }\n\n if (sizes[1] !== undefined) {\n return \"grid-column-gap: \" + sizes[1] + \";\";\n }\n\n return '';\n};\n\nvar SIZE_MAP = {\n flex: '1fr',\n full: '100%',\n '1/2': '50%',\n '1/4': '25%',\n '2/4': '50%',\n '3/4': '75%',\n '1/3': '33.33%',\n '2/3': '66.66%'\n};\n\nvar normalizeSize = function normalizeSize(size, props) {\n return SIZE_MAP[size] || props.theme.global.size[size] || size;\n};\n\nvar getRepeatCount = function getRepeatCount(count) {\n return typeof count === 'number' ? count : \"auto-\" + (count || 'fit');\n};\n\nvar getRepeatSize = function getRepeatSize(size, props) {\n if (size === 'flex') return '1fr';\n var gaps = gapSizes(props);\n var min;\n var max;\n var minFill;\n\n if (Array.isArray(size)) {\n var _size$ = size[0],\n minSize = _size$ === void 0 ? 'auto' : _size$,\n _size$2 = size[1],\n maxSize = _size$2 === void 0 ? 'auto' : _size$2;\n min = normalizeSize(minSize, props);\n if (min.search(/px/) !== -1) minFill = true;\n max = normalizeSize(maxSize, props);\n\n if (gaps[1] !== undefined) {\n // account for the column gap when using fractional sizes, e.g. 1/3\n if (minSize.indexOf('/') !== -1) min = \"calc(\" + min + \" - (\" + gaps[1] + \" * (1 - \" + minSize + \")))\";\n if (maxSize.indexOf('/') !== -1) max = \"calc(\" + max + \" - (\" + gaps[1] + \" * (1 - \" + maxSize + \")))\";\n }\n } else {\n min = normalizeSize(size, props);\n if (min.search(/px/) !== -1) minFill = true;\n max = '1fr';\n\n if (gaps[1] !== undefined) {\n // account for column gap with fractional sizes, e.g. 1/3\n if (size.indexOf('/') !== -1) min = \"calc(\" + min + \" - (\" + gaps[1] + \" * (1 - \" + size + \")))\";\n }\n }\n\n if (minFill) {\n // ensure we never go beyond the container width,\n // for mobile/narrow situations\n min = \"min(\" + min + \", 100%)\";\n }\n\n return \"minmax(\" + min + \", \" + max + \")\";\n};\n\nvar columnsStyle = function columnsStyle(props) {\n if (Array.isArray(props.columns)) {\n return css([\"grid-template-columns:\", \";\"], props.columns.map(function (s) {\n if (Array.isArray(s)) {\n return \"minmax(\" + normalizeSize(s[0], props) + \", \" + normalizeSize(s[1], props) + \")\";\n }\n\n return normalizeSize(s, props);\n }).join(' '));\n }\n\n if (typeof props.columns === 'object') {\n return css([\"grid-template-columns:repeat( \", \",\", \" );\"], getRepeatCount(props.columns.count), getRepeatSize(props.columns.size, props));\n }\n\n return css([\"grid-template-columns:repeat( auto-fill,\", \" );\"], getRepeatSize(props.columns, props));\n};\n\nvar rowsStyle = function rowsStyle(props) {\n if (Array.isArray(props.rowsProp)) {\n return css([\"grid-template-rows:\", \";\"], props.rowsProp.map(function (s) {\n if (Array.isArray(s)) {\n return \"minmax(\" + normalizeSize(s[0], props) + \", \" + normalizeSize(s[1], props) + \")\";\n }\n\n return normalizeSize(s, props);\n }).join(' '));\n }\n\n return css([\"grid-auto-rows:\", \";\"], props.theme.global.size[props.rowsProp]);\n};\n\nvar areasStyle = function areasStyle(props) {\n // translate areas objects into grid-template-areas syntax\n if (!Array.isArray(props.rowsProp) || !Array.isArray(props.columns)) {\n console.warn('Grid `areas` requires `rows` and `columns` to be arrays.');\n }\n\n if (Array.isArray(props.areas) && props.areas.every(function (area) {\n return Array.isArray(area);\n })) {\n return \"grid-template-areas: \" + props.areas.map(function (area) {\n return \"\\\"\" + area.join(' ') + \"\\\"\";\n }).join(' ') + \";\";\n }\n\n var cells = props.rowsProp.map(function () {\n return props.columns.map(function () {\n return '.';\n });\n });\n props.areas.forEach(function (area) {\n for (var row = area.start[1]; row <= area.end[1]; row += 1) {\n for (var column = area.start[0]; column <= area.end[0]; column += 1) {\n cells[row][column] = area.name;\n }\n }\n });\n return \"grid-template-areas: \" + cells.map(function (r) {\n return \"\\\"\" + r.join(' ') + \"\\\"\";\n }).join(' ') + \";\";\n};\n\nvar StyledGrid = styled.div.attrs(function (props) {\n return {\n 'aria-label': props.a11yTitleProp\n };\n}).withConfig({\n displayName: \"StyledGrid\",\n componentId: \"sc-1wofa1l-0\"\n})([\"display:grid;box-sizing:border-box;\", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \" \", \"\"], genericStyles, function (props) {\n return props.border && (Array.isArray(props.border) ? props.border.map(function (border) {\n return borderStyle(border, props.responsive, props.theme);\n }) : borderStyle(props.border, props.responsive, props.theme));\n}, function (props) {\n return fillStyle(props.fillContainer);\n}, function (props) {\n return props.align && alignStyle;\n}, function (props) {\n return props.alignContent && alignContentStyle;\n}, function (props) {\n return props.areas && areasStyle(props);\n}, function (props) {\n return props.columns && columnsStyle(props);\n}, function (props) {\n return props.gap && gapStyle(props);\n}, function (props) {\n return props.justify && justifyStyle;\n}, function (props) {\n return props.justifyContent && justifyContentStyle;\n}, function (props) {\n return props.pad && edgeStyle('padding', props.pad, props.responsive, props.theme.global.edgeSize.responsiveBreakpoint, props.theme);\n}, function (props) {\n return props.rowsProp && rowsStyle(props);\n}, function (props) {\n return props.heightProp && heightStyle(props.heightProp, props.theme);\n}, function (props) {\n return props.widthProp && widthStyle(props.widthProp, props.theme);\n}, function (props) {\n return props.theme.grid && props.theme.grid.extend;\n});\nStyledGrid.defaultProps = {};\nObject.setPrototypeOf(StyledGrid.defaultProps, defaultProps);\nexport { StyledGrid };","var _excluded = [\"a11yTitle\", \"aria-label\", \"border\", \"fill\", \"height\", \"responsive\", \"rows\", \"tag\", \"as\", \"width\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef } from 'react';\nimport { StyledGrid } from './StyledGrid';\nimport { GridPropTypes } from './propTypes';\nvar Grid = /*#__PURE__*/forwardRef(function (props, ref) {\n var a11yTitle = props.a11yTitle,\n ariaLabel = props['aria-label'],\n border = props.border,\n fill = props.fill,\n height = props.height,\n _props$responsive = props.responsive,\n responsive = _props$responsive === void 0 ? true : _props$responsive,\n rows = props.rows,\n tag = props.tag,\n as = props.as,\n width = props.width,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n return /*#__PURE__*/React.createElement(StyledGrid, _extends({\n ref: ref,\n a11yTitleProp: ariaLabel || a11yTitle,\n as: !as && tag ? tag : as,\n border: border,\n fillContainer: fill,\n heightProp: height,\n responsive: responsive,\n rowsProp: rows,\n widthProp: width\n }, rest));\n});\nGrid.displayName = 'Grid';\nGrid.available = typeof window !== 'undefined' && window.CSS && window.CSS.supports && window.CSS.supports('display', 'grid');\nexport { Grid };","import React, { useEffect, useMemo, useRef, useState } from 'react';\nimport { useLayoutEffect } from '../../utils/use-isomorphic-layout-effect';\nimport { findScrollParent, findScrollParents, isNodeAfterScroll, isNodeBeforeScroll } from '../../utils';\nimport { Box } from '../Box';\nimport { InfiniteScrollPropTypes } from './propTypes';\n\nvar calculateLastPageBound = function calculateLastPageBound(show, step) {\n return show ? Math.floor((show + step) / step) - 1 : 0;\n};\n\nvar InfiniteScroll = function InfiniteScroll(_ref) {\n var children = _ref.children,\n _ref$items = _ref.items,\n items = _ref$items === void 0 ? [] : _ref$items,\n onMore = _ref.onMore,\n renderMarker = _ref.renderMarker,\n replace = _ref.replace,\n show = _ref.show,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 50 : _ref$step; // item index to be made visible initially\n\n var _useState = useState(),\n scrollShow = _useState[0],\n setScrollShow = _useState[1]; // the last page we have items for\n\n\n var lastPage = useMemo(function () {\n return Math.floor(items.length / step);\n }, [items.length, step]); // the pages we are rendering\n\n var _useState2 = useState([0, calculateLastPageBound(show, step)]),\n renderPageBounds = _useState2[0],\n setRenderPageBounds = _useState2[1]; // the heights of the pages, approximated after we render the first page\n // and then updated for pages that have rendered\n\n\n var _useState3 = useState([]),\n pageHeights = _useState3[0],\n setPageHeights = _useState3[1]; // what we're waiting for onMore to give us\n\n\n var _useState4 = useState(0),\n pendingLength = _useState4[0],\n setPendingLength = _useState4[1];\n\n var aboveMarkerRef = useRef(); // only when replacing\n\n var belowMarkerRef = useRef(); // scroll and resize handling\n\n useEffect(function () {\n var scrollParents;\n\n var evaluate = function evaluate() {\n if (!scrollParents) return;\n var scrollParent = scrollParents[0]; // Determine the scroll position of the scroll container\n\n var top;\n var height;\n\n if (scrollParent === document) {\n top = document.documentElement.scrollTop || document.body.scrollTop;\n height = window.innerHeight;\n } else {\n top = scrollParent.scrollTop;\n var rect = scrollParent.getBoundingClientRect();\n height = rect.height;\n }\n\n var offset = height / 4; // so we pre-load when the user scrolls slowly\n // Use the pageHeights to determine what pages we should render based\n // on the current scroll window.\n\n var nextBeginPage = 0;\n var index = 0;\n var pagesHeight = pageHeights[index] || 0;\n\n while (pageHeights[index + 1] && pagesHeight < top - offset) {\n index += 1;\n nextBeginPage += 1;\n pagesHeight += pageHeights[index];\n }\n\n var nextEndPage = nextBeginPage;\n\n while (pageHeights[index] !== undefined && pagesHeight < top + height + offset) {\n index += 1;\n nextEndPage += 1; // when we haven't rendered the nextEndPage and we aren't replacing,\n // we might not have a height for it yet\n\n pagesHeight += pageHeights[index] || 0;\n }\n\n if (!replace) {\n // when not replacing, never shrink bounds\n nextBeginPage = 0;\n nextEndPage = Math.max(renderPageBounds[1], nextEndPage);\n }\n\n if (show) {\n // ensure we try to render any show page\n var showPage = calculateLastPageBound(show, step);\n nextBeginPage = Math.min(showPage, nextBeginPage);\n nextEndPage = Math.max(showPage, nextEndPage);\n }\n\n if (nextBeginPage !== renderPageBounds[0] || nextEndPage !== renderPageBounds[1]) {\n setRenderPageBounds([nextBeginPage, nextEndPage]);\n }\n };\n\n var timer;\n\n var debounce = function debounce() {\n clearTimeout(timer);\n timer = setTimeout(evaluate, 10);\n }; // might not be there yet or might have already rendered everything\n\n\n if (belowMarkerRef.current) {\n scrollParents = findScrollParents(belowMarkerRef.current);\n scrollParents.forEach(function (sp) {\n return sp.addEventListener('scroll', debounce);\n });\n }\n\n window.addEventListener('resize', debounce);\n evaluate();\n return function () {\n if (scrollParents) {\n scrollParents.forEach(function (sp) {\n return sp.removeEventListener('scroll', debounce);\n });\n }\n\n window.removeEventListener('resize', debounce);\n clearTimeout(timer);\n };\n }, [pageHeights, renderPageBounds, replace, show, step]); // check if we need to ask for more\n\n useEffect(function () {\n if (onMore && renderPageBounds[1] === lastPage && items.length >= pendingLength) {\n // remember we've asked for more, so we don't keep asking if it takes\n // a while\n setPendingLength(items.length + 1);\n onMore();\n }\n }, [items.length, lastPage, onMore, pendingLength, renderPageBounds, step]);\n useEffect(function () {\n if (items.length === 0 && lastPage === 0 && pendingLength !== 0) {\n setPageHeights([]);\n setPendingLength(0);\n setRenderPageBounds([0, calculateLastPageBound(show, step)]);\n }\n }, [lastPage, pendingLength, show, step, items.length]); // scroll to any 'show'\n\n useLayoutEffect(function () {\n // ride out any animation delays, 100ms empirically measured\n var timer = setTimeout(function () {\n if (show && belowMarkerRef.current && show !== scrollShow) {\n // calculate show index based on beginPage\n var showIndex = show - renderPageBounds[0] * step + (renderPageBounds[0] ? 1 : 0);\n var showNode = belowMarkerRef.current.parentNode.children.item(showIndex);\n\n if (showNode) {\n var scrollParent = findScrollParent(showNode);\n\n if (isNodeBeforeScroll(showNode, scrollParent)) {\n showNode.scrollIntoView(true);\n } else if (isNodeAfterScroll(showNode, scrollParent)) {\n showNode.scrollIntoView(false);\n } // clean up after having shown\n\n\n setScrollShow(show);\n }\n }\n }, 100);\n return function () {\n return clearTimeout(timer);\n }; // Omitting scrollShow as a dependency due to concern that setScrollShow\n // is being called within the timer. If left included, re-renders and other\n // dependency values could change in an unpredictable manner during timer\n // and potentially result in an infinite loop.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [renderPageBounds, show, step]); // calculate and keep track of page heights\n\n useLayoutEffect(function () {\n // if don't have a belowMarker, we must have rendered everything already\n if (!belowMarkerRef.current) return; // calculate page heights for rendered pages\n\n var rendered = belowMarkerRef.current.parentNode.children; // ensure we've rendered the state we have\n // above? + items in rendered pages + below === rendered DOM elements length\n\n if ((aboveMarkerRef.current ? 1 : 0) + (renderPageBounds[1] - renderPageBounds[0] + 1) * step + 1 === rendered.length) {\n var nextPageHeights; // step through each page\n\n var i = renderPageBounds[0];\n var lastBottom;\n\n while (i <= renderPageBounds[1]) {\n var topIndex = (aboveMarkerRef.current ? 1 : 0) + (i - renderPageBounds[0]) * step;\n var bottomIndex = Math.min(topIndex + step - 1, rendered.length - 1); // we use lastBottom for top to ensure grid layouts work\n\n var top = lastBottom !== undefined ? lastBottom : rendered.item(topIndex).getBoundingClientRect().top;\n\n var _rendered$item$getBou = rendered.item(bottomIndex).getBoundingClientRect(),\n bottom = _rendered$item$getBou.bottom;\n\n var height = bottom - top;\n\n if (bottom && (!pageHeights || pageHeights[i] !== height)) {\n if (!nextPageHeights) nextPageHeights = [].concat(pageHeights || []);\n nextPageHeights[i] = height;\n }\n\n lastBottom = bottom;\n i += 1;\n } // estimate page heights for pages we haven't rendered yet\n\n\n while (replace && i <= lastPage) {\n if (!pageHeights[i] && pageHeights[i] !== pageHeights[0]) {\n if (!nextPageHeights) nextPageHeights = [].concat(pageHeights || []);\n var _nextPageHeights = nextPageHeights;\n nextPageHeights[i] = _nextPageHeights[0];\n }\n\n i += 1;\n }\n\n if (nextPageHeights) setPageHeights(nextPageHeights);\n }\n }, [lastPage, pageHeights, renderPageBounds, replace, step]); // calculate the height above the first rendered page using the pageHeights\n\n var aboveHeight = useMemo(function () {\n if (!replace) return 0;\n var height = 0;\n var i = 0;\n\n while (i < renderPageBounds[0]) {\n height += pageHeights[i] || 0;\n i += 1;\n }\n\n return height;\n }, [pageHeights, renderPageBounds, replace]); // calculate the height below the last rendered page using the pageHeights\n\n var belowHeight = useMemo(function () {\n if (!replace) return 0;\n var height = 0;\n var i = renderPageBounds[1] + 1;\n\n while (i <= lastPage) {\n height += pageHeights[i] || 0;\n i += 1;\n }\n\n return height;\n }, [lastPage, pageHeights, renderPageBounds, replace]);\n var firstIndex = renderPageBounds[0] * step;\n var lastIndex = Math.min((renderPageBounds[1] + 1) * step, items.length) - 1;\n var result = [];\n\n if (aboveHeight) {\n var marker = /*#__PURE__*/React.createElement(Box, {\n key: \"above\",\n ref: aboveMarkerRef,\n flex: false,\n height: aboveHeight + \"px\"\n });\n\n if (renderMarker) {\n // need to give it a key\n marker = /*#__PURE__*/React.cloneElement(renderMarker(marker), {\n key: 'above'\n });\n }\n\n result.push(marker);\n }\n\n items.slice(firstIndex, lastIndex + 1).forEach(function (item, index) {\n var itemsIndex = firstIndex + index;\n var child = children(item, itemsIndex);\n result.push(child);\n });\n\n if (replace || renderPageBounds[1] < lastPage || onMore) {\n var _marker = /*#__PURE__*/React.createElement(Box, {\n key: \"below\",\n ref: !renderMarker && belowMarkerRef || undefined,\n flex: false,\n height: (belowHeight || 0) + \"px\"\n });\n\n if (renderMarker) {\n // need to give it a key\n var renderedMarker = renderMarker(_marker);\n _marker = /*#__PURE__*/React.cloneElement(renderedMarker, {\n key: 'below',\n // We need to make sure our belowMarkerRef is tied to a component\n // that has the same parent as the items being rendered. This is so\n // we can use belowMarkerRef.current.parentNode.children to\n // get a reference to the items in the DOM for calculating pageHeights.\n //\n // Since the caller might have included a ref in what their\n // renderMarker returns, we have to take care of both refs.\n // https://github.com/facebook/react/issues/8873#issuecomment-489579878\n ref: function ref(node) {\n // Keep your own reference\n belowMarkerRef.current = node; // Call the original ref, if any\n\n var ref = renderedMarker.ref;\n\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref !== null) {\n ref.current = node;\n }\n }\n });\n }\n\n result.push(_marker);\n }\n\n return result;\n};\n\nexport { InfiniteScroll };","import PropTypes from 'prop-types';\nvar PropType = {};\n\nif (process.env.NODE_ENV !== 'production') {\n PropType = {\n children: PropTypes.func\n };\n}\n\nexport var AnnounceContextPropTypes = PropType;","import React from 'react';\nimport { AnnounceContextPropTypes } from './propTypes';\n\nvar createAnnouncer = function createAnnouncer() {\n var announcer = document.createElement('div');\n announcer.id = 'grommet-announcer';\n announcer.style.left = '-100%';\n announcer.style.right = '100%';\n announcer.style.position = 'fixed';\n announcer.style['z-index'] = '-1';\n document.body.insertBefore(announcer, document.body.firstChild);\n return announcer;\n};\n\nexport var AnnounceContext = /*#__PURE__*/React.createContext(function (message, mode, timeout) {\n if (mode === void 0) {\n mode = 'polite';\n }\n\n if (timeout === void 0) {\n timeout = 500;\n } // we only create a new container if we don't have one already\n // we create a separate node so that grommet does not set aria-hidden to it\n\n\n var announcer = document.body.querySelector(\"#grommet-announcer[aria-live]\") || createAnnouncer();\n announcer.setAttribute('aria-live', 'off');\n announcer.innerHTML = message;\n announcer.setAttribute('aria-live', mode);\n setTimeout(function () {\n announcer.innerHTML = '';\n }, timeout);\n});\nAnnounceContext.propTypes = AnnounceContextPropTypes;","import styled, { css } from 'styled-components';\nimport { disabledStyle, getInputPadBySide, inputStyle, parseMetricToNum, plainInputStyle, textAlignStyle } from '../../utils';\nimport { defaultProps } from '../../default-props';\n\nvar getPlainStyle = function getPlainStyle(plain) {\n if (plain === 'full') {\n return css([\"\", \" padding:0;\"], plainInputStyle);\n }\n\n return plain && plainInputStyle;\n};\n\nvar StyledTextInput = styled.input.withConfig({\n displayName: \"StyledTextInput\",\n componentId: \"sc-1x30a0s-0\"\n})([\"\", \" \", \" \", \" \", \" \", \" \", \";\"], inputStyle, function (props) {\n return getPlainStyle(props.plain);\n}, function (props) {\n return props.icon && (props.reverse ? \"padding-right: \" + props.theme.global.edgeSize.large + \";\" : \"padding-left: \" + props.theme.global.edgeSize.large + \";\");\n}, function (props) {\n return props.disabled && disabledStyle(props.theme.textInput.disabled && props.theme.textInput.disabled.opacity);\n}, function (props) {\n return props.textAlign && textAlignStyle;\n}, function (props) {\n return props.theme.textInput && props.theme.textInput.extend;\n});\nStyledTextInput.defaultProps = {};\nObject.setPrototypeOf(StyledTextInput.defaultProps, defaultProps);\nvar StyledTextInputContainer = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledTextInputContainer\",\n componentId: \"sc-1x30a0s-1\"\n})([\"position:relative;width:100%;\", \";\"], function (props) {\n return props.theme.textInput && props.theme.textInput.container && props.theme.textInput.container.extend;\n});\nStyledTextInputContainer.defaultProps = {};\nObject.setPrototypeOf(StyledTextInputContainer.defaultProps, defaultProps);\nvar StyledPlaceholder = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledPlaceholder\",\n componentId: \"sc-1x30a0s-2\"\n})([\"position:absolute;left:\", \"px;top:50%;transform:translateY(-50%);display:flex;justify-content:center;pointer-events:none;\", \";\"], function (props) {\n return parseMetricToNum(getInputPadBySide(props, 'left')) - parseMetricToNum(props.theme.global.control.border.width);\n}, function (props) {\n return props.theme.textInput && props.theme.textInput.placeholder && props.theme.textInput.placeholder.extend;\n});\nStyledPlaceholder.defaultProps = {};\nObject.setPrototypeOf(StyledPlaceholder.defaultProps, defaultProps);\nvar StyledIcon = styled.div.withConfig({\n displayName: \"StyledTextInput__StyledIcon\",\n componentId: \"sc-1x30a0s-3\"\n})([\"position:absolute;display:flex;justify:center;top:50%;transform:translateY(-50%);pointer-events:none;\", \"\"], function (props) {\n return props.reverse ? \"right: \" + getInputPadBySide(props, 'right') + \";\" : \"left: \" + getInputPadBySide(props, 'left') + \";\";\n});\nvar StyledSuggestions = styled.ol.withConfig({\n displayName: \"StyledTextInput__StyledSuggestions\",\n componentId: \"sc-1x30a0s-4\"\n})([\"border-top-left-radius:0;border-top-right-radius:0;margin:0;padding:0;list-style-type:none;\", \";\"], function (props) {\n return props.theme.textInput && props.theme.textInput.suggestions && props.theme.textInput.suggestions.extend;\n});\nStyledSuggestions.defaultProps = {};\nObject.setPrototypeOf(StyledSuggestions.defaultProps, defaultProps);\nexport { StyledTextInput, StyledTextInputContainer, StyledPlaceholder, StyledIcon, StyledSuggestions };","var _excluded = [\"a11yTitle\", \"defaultSuggestion\", \"defaultValue\", \"dropAlign\", \"dropHeight\", \"dropTarget\", \"dropProps\", \"focusIndicator\", \"icon\", \"id\", \"messages\", \"name\", \"onBlur\", \"onChange\", \"onFocus\", \"onKeyDown\", \"onSelect\", \"onSuggestionSelect\", \"onSuggestionsClose\", \"onSuggestionsOpen\", \"placeholder\", \"plain\", \"readOnly\", \"reverse\", \"suggestions\", \"textAlign\", \"value\"];\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nimport React, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from 'react';\nimport styled, { ThemeContext } from 'styled-components';\nimport { defaultProps } from '../../default-props';\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Drop } from '../Drop';\nimport { InfiniteScroll } from '../InfiniteScroll';\nimport { Keyboard } from '../Keyboard';\nimport { FormContext } from '../Form/FormContext';\nimport { AnnounceContext } from '../../contexts';\nimport { isNodeAfterScroll, isNodeBeforeScroll, sizeStyle, useForwardedRef } from '../../utils';\nimport { StyledTextInput, StyledTextInputContainer, StyledPlaceholder, StyledIcon, StyledSuggestions } from './StyledTextInput';\nimport { MessageContext } from '../../contexts/MessageContext';\nimport { TextInputPropTypes } from './propTypes';\n\nvar renderLabel = function renderLabel(suggestion) {\n if (suggestion && typeof suggestion === 'object') {\n return suggestion.label || suggestion.value;\n }\n\n return suggestion;\n};\n\nvar stringLabel = function stringLabel(suggestion) {\n if (suggestion && typeof suggestion === 'object') {\n if (suggestion.label && typeof suggestion.label === 'string') {\n return suggestion.label;\n }\n\n return suggestion.value;\n }\n\n return suggestion;\n};\n\nvar ContainerBox = styled(Box).withConfig({\n displayName: \"TextInput__ContainerBox\",\n componentId: \"sc-1ai0c08-0\"\n})([\"\", \";@media screen and (-ms-high-contrast:active),(-ms-high-contrast:none){width:100%;}\"], function (props) {\n return props.dropHeight ? sizeStyle('max-height', props.dropHeight, props.theme) : 'max-height: inherit;';\n});\nvar defaultDropAlign = {\n top: 'bottom',\n left: 'left'\n};\nvar TextInput = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var a11yTitle = _ref.a11yTitle,\n defaultSuggestion = _ref.defaultSuggestion,\n defaultValue = _ref.defaultValue,\n _ref$dropAlign = _ref.dropAlign,\n dropAlign = _ref$dropAlign === void 0 ? defaultDropAlign : _ref$dropAlign,\n dropHeight = _ref.dropHeight,\n dropTarget = _ref.dropTarget,\n dropProps = _ref.dropProps,\n _ref$focusIndicator = _ref.focusIndicator,\n focusIndicator = _ref$focusIndicator === void 0 ? true : _ref$focusIndicator,\n icon = _ref.icon,\n id = _ref.id,\n messages = _ref.messages,\n name = _ref.name,\n _onBlur = _ref.onBlur,\n onChange = _ref.onChange,\n _onFocus = _ref.onFocus,\n onKeyDown = _ref.onKeyDown,\n onSelect = _ref.onSelect,\n onSuggestionSelect = _ref.onSuggestionSelect,\n onSuggestionsClose = _ref.onSuggestionsClose,\n onSuggestionsOpen = _ref.onSuggestionsOpen,\n placeholder = _ref.placeholder,\n plain = _ref.plain,\n readOnly = _ref.readOnly,\n reverse = _ref.reverse,\n suggestions = _ref.suggestions,\n textAlign = _ref.textAlign,\n valueProp = _ref.value,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var theme = useContext(ThemeContext) || defaultProps.theme;\n\n var _useContext = useContext(MessageContext),\n format = _useContext.format;\n\n var announce = useContext(AnnounceContext);\n var formContext = useContext(FormContext);\n var inputRef = useForwardedRef(ref);\n var dropRef = useRef();\n var suggestionsRef = useRef(); // if this is a readOnly property, don't set a name with the form context\n // this allows Select to control the form context for the name.\n\n var _formContext$useFormI = formContext.useFormInput(readOnly ? undefined : name, valueProp),\n value = _formContext$useFormI[0],\n setValue = _formContext$useFormI[1];\n\n var _useState = useState(),\n focus = _useState[0],\n setFocus = _useState[1];\n\n var _useState2 = useState(false),\n showDrop = _useState2[0],\n setShowDrop = _useState2[1];\n\n var handleSuggestionSelect = useMemo(function () {\n return onSelect && !onSuggestionSelect ? onSelect : onSuggestionSelect;\n }, [onSelect, onSuggestionSelect]);\n var handleTextSelect = useMemo(function () {\n return onSelect && onSuggestionSelect ? onSelect : undefined;\n }, [onSelect, onSuggestionSelect]);\n\n var _useState3 = useState(),\n suggestionsAtClose = _useState3[0],\n setSuggestionsAtClose = _useState3[1];\n\n var openDrop = useCallback(function () {\n setShowDrop(true);\n announce(format({\n id: 'textInput.suggestionIsOpen',\n messages: messages\n }));\n announce(suggestions.length + \" \" + format({\n id: 'textInput.suggestionsCount',\n messages: messages\n }));\n if (onSuggestionsOpen) onSuggestionsOpen();\n }, [announce, messages, format, onSuggestionsOpen, suggestions]);\n var closeDrop = useCallback(function () {\n setSuggestionsAtClose(suggestions); // must be before closing drop\n\n setShowDrop(false);\n if (onSuggestionsClose) onSuggestionsClose();\n }, [onSuggestionsClose, suggestions]); // Handle scenarios where we have focus, the drop isn't showing,\n // and the suggestions change. We don't want to open the drop if\n // the drop has been closed by onEsc and the suggestions haven't\n // changed. So, we remember the suggestions we are showing when\n // the drop was closed and only re-open it when the suggestions\n // subsequently change.\n\n useEffect(function () {\n if (focus && !showDrop && suggestions && suggestions.length && (!suggestionsAtClose || suggestionsAtClose.length !== suggestions.length)) {\n openDrop();\n }\n }, [focus, openDrop, showDrop, suggestions, suggestionsAtClose]); // if we have no suggestions, close drop if it's open\n\n useEffect(function () {\n if (showDrop && (!suggestions || !suggestions.length)) closeDrop();\n }, [closeDrop, showDrop, suggestions]);\n var valueSuggestionIndex = useMemo(function () {\n return suggestions ? suggestions.map(function (suggestion) {\n return typeof suggestion === 'object' ? suggestion.value : suggestion;\n }).indexOf(value) : -1;\n }, [suggestions, value]); // choose the best suggestion, either the explicit default or the one\n // that matches the current value\n\n var resetSuggestionIndex = useMemo(function () {\n if (valueSuggestionIndex === -1 && typeof defaultSuggestion === 'number') {\n return defaultSuggestion;\n }\n\n return valueSuggestionIndex;\n }, [defaultSuggestion, valueSuggestionIndex]); // activeSuggestionIndex unifies mouse and keyboard interaction of\n // the suggestions\n\n var _useState4 = useState(resetSuggestionIndex),\n activeSuggestionIndex = _useState4[0],\n setActiveSuggestionIndex = _useState4[1]; // Only update active suggestion index when the mouse actually moves,\n // not when suggestions are moving under the mouse.\n\n\n var _useState5 = useState(),\n mouseMovedSinceLastKey = _useState5[0],\n setMouseMovedSinceLastKey = _useState5[1]; // set activeSuggestionIndex when value changes\n\n\n useEffect(function () {\n return setActiveSuggestionIndex(valueSuggestionIndex);\n }, [valueSuggestionIndex]); // reset activeSuggestionIndex when the drop is closed\n\n useEffect(function () {\n if (!showDrop) setActiveSuggestionIndex(resetSuggestionIndex);\n }, [resetSuggestionIndex, showDrop]); // announce active suggestion\n\n useEffect(function () {\n if (activeSuggestionIndex >= 0) {\n var label = stringLabel(suggestions[activeSuggestionIndex]);\n announce(label + \" \" + format({\n id: 'textInput.enterSelect',\n messages: messages\n }));\n }\n }, [activeSuggestionIndex, announce, messages, format, suggestions]); // make sure activeSuggestion is visible in scroll\n\n useEffect(function () {\n var timer = setTimeout(function () {\n var list = suggestionsRef.current;\n\n if (showDrop && activeSuggestionIndex !== -1 && list) {\n var container = list.parentNode;\n var item = list.children[activeSuggestionIndex];\n\n if (container.scrollTo) {\n if (isNodeAfterScroll(item, container)) container.scrollTo(0, item.offsetTop - (container.getBoundingClientRect().height - item.getBoundingClientRect().height));else if (isNodeBeforeScroll(item, container)) container.scrollTo(0, item.offsetTop);\n }\n }\n }, 50); // delay to allow Drop to animate in\n\n return function () {\n return clearTimeout(timer);\n };\n }, [activeSuggestionIndex, showDrop]);\n\n var setValueFromSuggestion = function setValueFromSuggestion(event, suggestion) {\n // if we stole the focus in the drop, perhaps by interacting with\n // a suggestion button or the scrollbar, give it back\n inputRef.current.focus();\n inputRef.current.value = suggestion; // needed for uncontrolled cases\n\n closeDrop();\n\n if (handleSuggestionSelect) {\n if (event.persist) event.persist();\n var adjustedEvent = event;\n adjustedEvent.suggestion = suggestion;\n handleSuggestionSelect(adjustedEvent);\n }\n\n setValue(suggestion);\n };\n\n var onNextSuggestion = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = Math.min(activeSuggestionIndex + 1, suggestions.length - 1);\n setActiveSuggestionIndex(nextActiveIndex);\n setMouseMovedSinceLastKey(false);\n }, [activeSuggestionIndex, suggestions]);\n var onPreviousSuggestion = useCallback(function (event) {\n event.preventDefault();\n var nextActiveIndex = Math.max(activeSuggestionIndex - 1, 0);\n setActiveSuggestionIndex(nextActiveIndex);\n setMouseMovedSinceLastKey(false);\n }, [activeSuggestionIndex]);\n\n var _useState6 = useState(placeholder && typeof placeholder !== 'string' && !(inputRef.current && inputRef.current.value) && !value),\n showStyledPlaceholder = _useState6[0],\n setShowStyledPlaceholder = _useState6[1];\n\n var drop;\n var extraProps = {\n onSelect: handleTextSelect\n };\n\n if (showDrop) {\n drop = /*#__PURE__*/React.createElement(Drop, _extends({\n ref: dropRef,\n id: id ? \"text-input-drop__\" + id : undefined,\n align: dropAlign,\n responsive: false,\n target: dropTarget || inputRef.current,\n onClickOutside: closeDrop,\n onEsc: closeDrop\n }, dropProps), /*#__PURE__*/React.createElement(ContainerBox, {\n overflow: \"auto\",\n dropHeight: dropHeight,\n onMouseMove: function onMouseMove() {\n return setMouseMovedSinceLastKey(true);\n }\n }, /*#__PURE__*/React.createElement(StyledSuggestions, {\n ref: suggestionsRef\n }, /*#__PURE__*/React.createElement(InfiniteScroll, {\n items: suggestions,\n step: theme.select.step,\n show: activeSuggestionIndex !== -1 ? activeSuggestionIndex : undefined\n }, function (suggestion, index, itemRef) {\n // Determine whether the label is done as a child or\n // as an option Button kind property.\n var renderedLabel = renderLabel(suggestion);\n var child;\n if (typeof renderedLabel !== 'string') // must be an element rendered by suggestions.label\n child = renderedLabel;else if (!theme.button.option) // don't have theme support, need to layout here\n child = /*#__PURE__*/React.createElement(Box, {\n align: \"start\",\n pad: \"small\"\n }, renderedLabel); // if we have a child, turn on plain\n\n return /*#__PURE__*/React.createElement(\"li\", {\n key: stringLabel(suggestion) + \"-\" + index,\n ref: itemRef\n }, /*#__PURE__*/React.createElement(Button, {\n active: activeSuggestionIndex === index,\n fill: true,\n plain: !child ? undefined : true,\n align: \"start\",\n kind: !child ? 'option' : undefined,\n label: !child ? renderedLabel : undefined,\n onClick: function onClick(event) {\n return setValueFromSuggestion(event, suggestion);\n },\n onMouseMove: mouseMovedSinceLastKey && activeSuggestionIndex !== index ? function () {\n return setActiveSuggestionIndex(index);\n } : undefined\n }, child));\n }))));\n }\n\n var keyboardProps = {\n onKeyDown: onKeyDown\n };\n\n if (showDrop) {\n keyboardProps.onEnter = function (event) {\n // prevent submitting forms via Enter when the drop is open\n event.preventDefault();\n if (activeSuggestionIndex >= 0) setValueFromSuggestion(event, suggestions[activeSuggestionIndex]);else closeDrop();\n };\n\n if (activeSuggestionIndex > 0) keyboardProps.onUp = onPreviousSuggestion;\n if (activeSuggestionIndex < suggestions.length - 1) keyboardProps.onDown = onNextSuggestion;\n keyboardProps.onTab = closeDrop;\n } else if (suggestions && suggestions.length > 0) {\n keyboardProps.onDown = openDrop;\n } // For the Keyboard target below, if we have focus,\n // either on the input element or within the drop,\n // then we set the target to the document,\n // otherwise we only listen to onDown on the input element itself,\n // primarily for tests.\n\n\n return /*#__PURE__*/React.createElement(StyledTextInputContainer, {\n plain: plain\n }, showStyledPlaceholder && /*#__PURE__*/React.createElement(StyledPlaceholder, null, placeholder), icon && /*#__PURE__*/React.createElement(StyledIcon, {\n reverse: reverse,\n theme: theme\n }, icon), /*#__PURE__*/React.createElement(Keyboard, _extends({\n target: focus ? 'document' : undefined\n }, keyboardProps), /*#__PURE__*/React.createElement(StyledTextInput, _extends({\n \"aria-label\": a11yTitle,\n ref: inputRef,\n id: id,\n name: name,\n autoComplete: \"off\",\n plain: plain,\n placeholder: typeof placeholder === 'string' ? placeholder : undefined,\n icon: icon,\n reverse: reverse,\n focus: focus,\n focusIndicator: focusIndicator,\n textAlign: textAlign\n }, rest, extraProps, {\n defaultValue: renderLabel(defaultValue),\n value: renderLabel(value),\n readOnly: readOnly,\n onFocus: function onFocus(event) {\n // Don't do anything if we are acting like we already have\n // focus. This can happen when this input loses focus temporarily\n // to our drop, see onBlur() handler below.\n if (!focus) {\n setFocus(true);\n\n if (suggestions && suggestions.length > 0) {\n announce(format({\n id: 'textInput.suggestionsExist',\n messages: messages\n }));\n openDrop();\n }\n\n if (_onFocus) _onFocus(event);\n }\n },\n onBlur: function onBlur(event) {\n // Only treat it as a blur if the element receiving focus\n // isn't in our drop. The relatedTarget will be our drop\n // when the user clicks on a suggestion or interacts with the\n // scrollbar in the drop.\n if (!event.relatedTarget || event.relatedTarget !== dropRef.current) {\n setFocus(false);\n if (_onBlur) _onBlur(event);\n }\n },\n onChange: readOnly ? undefined : function (event) {\n // when TextInput is not contained in a Form, no re-render\n // will come from this onChange and remove the placeholder\n // so we need to update state to ensure the styled\n // placeholder only appears when there is no value\n setShowStyledPlaceholder(placeholder && typeof placeholder !== 'string' && !event.target.value);\n setValue(event.target.value);\n setActiveSuggestionIndex(resetSuggestionIndex);\n if (onChange) onChange(event);\n }\n }))), drop);\n});\nTextInput.displayName = 'TextInput';\nexport { TextInput };"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","MailOption","forwardRef","props","ref","viewBox","a11yTitle","fill","stroke","strokeWidth","d","displayName","StatusGood","hoverStyle","css","_props$theme$checkBox","_props$theme$checkBox2","theme","checkBox","hover","border","color","_props$theme$checkBox3","_props$theme$checkBox4","disabled","background","StyledCheckBoxIcon","componentId","check","thickness","icon","size","extend","defaultProps","setPrototypeOf","StyledCheckBoxContainer","label","align","fillProp","pad","responsive","box","responsiveBreakpoint","_props$theme$checkBox5","_props$theme$checkBox6","_props$theme$checkBox7","_props$theme$checkBox8","focus","focusIndicator","StyledCheckBoxInput","toggle","StyledCheckBoxBox","StyledCheckBoxToggle","width","radius","StyledCheckBoxKnob","knob","StyledCheckBox","_excluded","stopLabelClick","event","type","stopPropagation","CheckBox","_ref","_ref2","ariaLabel","checkedProp","checked","children","_ref$defaultChecked","defaultChecked","focusProp","_ref$focusIndicator","id","name","_onBlur","onBlur","_onChange","onChange","_onFocus","onFocus","_onMouseEnter","onMouseEnter","_onMouseLeave","onMouseLeave","_onMouseOut","onMouseOut","_onMouseOver","onMouseOver","reverse","indeterminate","rest","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","useContext","ThemeContext","_formContext$useFormI","FormContext","useFormInput","setChecked","_useState","useState","setFocus","useEffect","console","warn","hidden","themeableProps","value","_theme$checkBox$icons","icons","CheckedIcon","IndeterminateIcon","borderColor","visual","as","Box","justify","height","round","preserveAspectRatio","side","checkBoxNode","margin","gap","normalizedLabel","first","second","htmlFor","onClick","defaultValue","defaultTouched","defaultValidationResults","errors","infos","validate","validations","omitValid","nextErrors","nextInfos","forEach","validation","undefined","result","status","message","Form","_ref2$errors","errorsProp","_ref2$infos","infosProp","messages","_onReset","onReset","_onSubmit","onSubmit","onValidate","_ref2$validate","validateOn","valueProp","format","valueState","setValueState","useMemo","_useState2","touched","setTouched","_useState3","validationResults","setValidationResults","_useState4","pendingValidation","setPendingValidation","useRef","requiredFields","buildValid","useCallback","valid","current","filter","n","includes","every","field","filterErrorValidations","filterInfoValidations","validationsForSetFields","entries","_ref3","_validate","nextValidationResults","timer","setTimeout","_validate2","_ref4","validatedErrors","validatedInfos","prevValidationResults","clearTimeout","_validate3","_ref5","persist","adjustedEvent","preventDefault","_validate4","useFormField","_ref6","errorArg","error","infoArg","info","required","validateArg","validateSingle","aValidate","value2","data","regexp","test","index","push","splice","Array","isArray","some","inForm","concat","componentValue","initialValue","_useState5","inputValue","setInputValue","formValue","keyCreated","prevValue","nextValue","nextComponentValue","nextTouched","_","setValue","StyledCheckBoxGroup","withConfig","checkBoxGroup","container","_excluded2","CheckBoxGroup","disabledProp","labelKey","valueKey","optionsProp","options","formContext","map","option","onCheckBoxChange","optionValue","JSON","parse","stringify","optionIndex","role","valueOption","optionProps","state","StyledRadioButtonContainer","radioButton","StyledRadioButtonInput","StyledRadioButtonLabel","font","weight","StyledRadioButtonIcon","StyledRadioButtonBox","StyledRadioButton","RadioButton","setHover","Icon","circle","flex","right","cx","cy","r","RadioButtonGroup","o","optionRefs","valueIndex","onNext","nextIndex","click","onPrevious","Keyboard","onUp","onDown","onLeft","onRight","radioButtonGroup","optionDisabled","optionRest","focusable","aRef","tabIndex","_excluded3","grommetInputNames","grommetInputPadNames","FormFieldBox","justBorder","formField","FormFieldContentBox","StyledMessageContainer","messageType","Message","containerProps","messageContent","Text","direction","Input","comp","component","invalid","InputComponent","TextInput","extraProps","plain","FormField","className","contentProps","errorProp","help","infoProp","style","_formContext$useFormF","contextOnBlur","contextOnChange","formFieldRef","formFieldTheme","themeBorder","wantContentPad","contents","Children","child","cloneElement","containerRest","isFileInputComponent","themeContentProps","content","position","abut","abutMargin","labelStyle","outerBackground","outerStyle","innerProps","fileInput","mergedMargin","bottom","horizontal","global","borderSize","zIndex","outerProps","requiredIndicator","func","wait","timeout","_len","args","_key","later","JUSTIFY_MAP","center","end","start","stretch","justifyStyle","JUSTIFY_CONTENT_MAP","around","between","justifyContentStyle","justifyContent","gapSizes","edgeSize","row","column","SIZE_MAP","full","normalizeSize","getRepeatSize","min","max","minFill","gaps","_size$","minSize","_size$2","maxSize","search","StyledGrid","a11yTitleProp","fillContainer","alignContent","areas","rowsProp","columns","area","join","cells","areasStyle","s","count","columnsStyle","sizes","gapStyle","rowsStyle","heightProp","widthProp","grid","Grid","_props$responsive","rows","tag","available","window","CSS","supports","calculateLastPageBound","show","step","Math","floor","InfiniteScroll","_ref$items","items","onMore","renderMarker","replace","_ref$step","scrollShow","setScrollShow","lastPage","renderPageBounds","setRenderPageBounds","pageHeights","setPageHeights","pendingLength","setPendingLength","aboveMarkerRef","belowMarkerRef","scrollParents","evaluate","top","scrollParent","document","documentElement","scrollTop","body","innerHeight","getBoundingClientRect","offset","nextBeginPage","pagesHeight","nextEndPage","showPage","debounce","sp","addEventListener","removeEventListener","showIndex","showNode","parentNode","item","scrollIntoView","rendered","nextPageHeights","lastBottom","topIndex","bottomIndex","_nextPageHeights","aboveHeight","belowHeight","firstIndex","lastIndex","marker","slice","_marker","renderedMarker","node","AnnounceContextPropTypes","AnnounceContext","mode","announcer","querySelector","createElement","left","insertBefore","firstChild","createAnnouncer","setAttribute","innerHTML","propTypes","StyledTextInput","large","textInput","opacity","textAlign","StyledTextInputContainer","StyledPlaceholder","control","placeholder","StyledIcon","StyledSuggestions","suggestions","renderLabel","suggestion","stringLabel","ContainerBox","dropHeight","defaultDropAlign","defaultSuggestion","_ref$dropAlign","dropAlign","dropTarget","dropProps","onKeyDown","onSelect","onSuggestionSelect","onSuggestionsClose","onSuggestionsOpen","readOnly","MessageContext","announce","inputRef","dropRef","suggestionsRef","showDrop","setShowDrop","handleSuggestionSelect","handleTextSelect","suggestionsAtClose","setSuggestionsAtClose","openDrop","closeDrop","valueSuggestionIndex","resetSuggestionIndex","activeSuggestionIndex","setActiveSuggestionIndex","mouseMovedSinceLastKey","setMouseMovedSinceLastKey","list","scrollTo","offsetTop","drop","setValueFromSuggestion","onNextSuggestion","nextActiveIndex","onPreviousSuggestion","_useState6","showStyledPlaceholder","setShowStyledPlaceholder","Drop","onClickOutside","onEsc","overflow","onMouseMove","select","itemRef","renderedLabel","button","Button","active","kind","keyboardProps","onEnter","onTab","autoComplete","relatedTarget"],"sourceRoot":""}