mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
276 KiB
JSON
1 line
276 KiB
JSON
{"ast":null,"code":"import _extends from '@babel/runtime/helpers/esm/extends';\nimport { a as _objectSpread2, s as supportsPassiveEvents, b as clearIndicatorCSS, d as containerCSS, e as css$1, f as dropdownIndicatorCSS, g as groupCSS, h as groupHeadingCSS, i as indicatorsContainerCSS, j as indicatorSeparatorCSS, k as inputCSS, l as loadingIndicatorCSS, m as loadingMessageCSS, n as menuCSS, o as menuListCSS, p as menuPortalCSS, q as multiValueCSS, r as multiValueLabelCSS, t as multiValueRemoveCSS, u as noOptionsMessageCSS, v as optionCSS, w as placeholderCSS, x as css$2, y as valueContainerCSS, z as isTouchCapable, A as isMobileDevice, _ as _createSuper, B as classNames, C as defaultComponents, D as isDocumentElement, E as cleanValue, F as scrollIntoView, G as noop, M as MenuPlacer } from './index-4bd03571.esm.js';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\nimport React, { useMemo, useRef, useCallback, useEffect, Component } from 'react';\nimport { jsx, css } from '@emotion/react';\nimport memoizeOne from 'memoize-one';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n}\n\nvar _ref = process.env.NODE_ENV === \"production\" ? {\n name: \"7pg0cj-a11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap\"\n} : {\n name: \"1f43avz-a11yText-A11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFJIiwiZmlsZSI6IkExMXlUZXh0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcbi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgdHlwZSBFbGVtZW50Q29uZmlnIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vLyBBc3Npc3RpdmUgdGV4dCB0byBkZXNjcmliZSB2aXN1YWwgZWxlbWVudHMuIEhpZGRlbiBmb3Igc2lnaHRlZCB1c2Vycy5cbmNvbnN0IEExMXlUZXh0ID0gKHByb3BzOiBFbGVtZW50Q29uZmlnPCdzcGFuJz4pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};\n\nvar A11yText = function A11yText(props) {\n return jsx(\"span\", _extends({\n css: _ref\n }, props));\n};\n\nvar defaultAriaLiveMessages = {\n guidance: function guidance(props) {\n var isSearchable = props.isSearchable,\n isMulti = props.isMulti,\n isDisabled = props.isDisabled,\n tabSelectsValue = props.tabSelectsValue,\n context = props.context;\n\n switch (context) {\n case 'menu':\n return \"Use Up and Down to choose options\".concat(isDisabled ? '' : ', press Enter to select the currently focused option', \", press Escape to exit the menu\").concat(tabSelectsValue ? ', press Tab to select the option and exit the menu' : '', \".\");\n\n case 'input':\n return \"\".concat(props['aria-label'] || 'Select', \" is focused \").concat(isSearchable ? ',type to refine list' : '', \", press Down to open the menu, \").concat(isMulti ? ' press left to focus selected values' : '');\n\n case 'value':\n return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';\n\n default:\n return '';\n }\n },\n onChange: function onChange(props) {\n var action = props.action,\n _props$label = props.label,\n label = _props$label === void 0 ? '' : _props$label,\n isDisabled = props.isDisabled;\n\n switch (action) {\n case 'deselect-option':\n case 'pop-value':\n case 'remove-value':\n return \"option \".concat(label, \", deselected.\");\n\n case 'select-option':\n return isDisabled ? \"option \".concat(label, \" is disabled. Select another option.\") : \"option \".concat(label, \", selected.\");\n\n default:\n return '';\n }\n },\n onFocus: function onFocus(props) {\n var context = props.context,\n _props$focused = props.focused,\n focused = _props$focused === void 0 ? {} : _props$focused,\n options = props.options,\n _props$label2 = props.label,\n label = _props$label2 === void 0 ? '' : _props$label2,\n selectValue = props.selectValue,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected;\n\n var getArrayIndex = function getArrayIndex(arr, item) {\n return arr && arr.length ? \"\".concat(arr.indexOf(item) + 1, \" of \").concat(arr.length) : '';\n };\n\n if (context === 'value' && selectValue) {\n return \"value \".concat(label, \" focused, \").concat(getArrayIndex(selectValue, focused), \".\");\n }\n\n if (context === 'menu') {\n var disabled = isDisabled ? ' disabled' : '';\n var status = \"\".concat(isSelected ? 'selected' : 'focused').concat(disabled);\n return \"option \".concat(label, \" \").concat(status, \", \").concat(getArrayIndex(options, focused), \".\");\n }\n\n return '';\n },\n onFilter: function onFilter(props) {\n var inputValue = props.inputValue,\n resultsMessage = props.resultsMessage;\n return \"\".concat(resultsMessage).concat(inputValue ? ' for search term ' + inputValue : '', \".\");\n }\n};\n\nvar LiveRegion = function LiveRegion(props) {\n var ariaSelection = props.ariaSelection,\n focusedOption = props.focusedOption,\n focusedValue = props.focusedValue,\n focusableOptions = props.focusableOptions,\n isFocused = props.isFocused,\n selectValue = props.selectValue,\n selectProps = props.selectProps;\n var ariaLiveMessages = selectProps.ariaLiveMessages,\n getOptionLabel = selectProps.getOptionLabel,\n inputValue = selectProps.inputValue,\n isMulti = selectProps.isMulti,\n isOptionDisabled = selectProps.isOptionDisabled,\n isSearchable = selectProps.isSearchable,\n menuIsOpen = selectProps.menuIsOpen,\n options = selectProps.options,\n screenReaderStatus = selectProps.screenReaderStatus,\n tabSelectsValue = selectProps.tabSelectsValue;\n var ariaLabel = selectProps['aria-label'];\n var ariaLive = selectProps['aria-live']; // Update aria live message configuration when prop changes\n\n var messages = useMemo(function () {\n return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});\n }, [ariaLiveMessages]); // Update aria live selected option when prop changes\n\n var ariaSelected = useMemo(function () {\n var message = '';\n\n if (ariaSelection && messages.onChange) {\n var option = ariaSelection.option,\n removedValue = ariaSelection.removedValue,\n value = ariaSelection.value; // select-option when !isMulti does not return option so we assume selected option is value\n\n var asOption = function asOption(val) {\n return !Array.isArray(val) ? val : null;\n };\n\n var selected = removedValue || option || asOption(value);\n\n var onChangeProps = _objectSpread2({\n isDisabled: selected && isOptionDisabled(selected),\n label: selected ? getOptionLabel(selected) : ''\n }, ariaSelection);\n\n message = messages.onChange(onChangeProps);\n }\n\n return message;\n }, [ariaSelection, isOptionDisabled, getOptionLabel, messages]);\n var ariaFocused = useMemo(function () {\n var focusMsg = '';\n var focused = focusedOption || focusedValue;\n var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));\n\n if (focused && messages.onFocus) {\n var onFocusProps = {\n focused: focused,\n label: getOptionLabel(focused),\n isDisabled: isOptionDisabled(focused),\n isSelected: isSelected,\n options: options,\n context: focused === focusedOption ? 'menu' : 'value',\n selectValue: selectValue\n };\n focusMsg = messages.onFocus(onFocusProps);\n }\n\n return focusMsg;\n }, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, options, selectValue]);\n var ariaResults = useMemo(function () {\n var resultsMsg = '';\n\n if (menuIsOpen && options.length && messages.onFilter) {\n var resultsMessage = screenReaderStatus({\n count: focusableOptions.length\n });\n resultsMsg = messages.onFilter({\n inputValue: inputValue,\n resultsMessage: resultsMessage\n });\n }\n\n return resultsMsg;\n }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus]);\n var ariaGuidance = useMemo(function () {\n var guidanceMsg = '';\n\n if (messages.guidance) {\n var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input';\n guidanceMsg = messages.guidance({\n 'aria-label': ariaLabel,\n context: context,\n isDisabled: focusedOption && isOptionDisabled(focusedOption),\n isMulti: isMulti,\n isSearchable: isSearchable,\n tabSelectsValue: tabSelectsValue\n });\n }\n\n return guidanceMsg;\n }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, tabSelectsValue]);\n var ariaContext = \"\".concat(ariaFocused, \" \").concat(ariaResults, \" \").concat(ariaGuidance);\n return jsx(A11yText, {\n \"aria-live\": ariaLive,\n \"aria-atomic\": \"false\",\n \"aria-relevant\": \"additions text\"\n }, isFocused && jsx(React.Fragment, null, jsx(\"span\", {\n id: \"aria-selection\"\n }, ariaSelected), jsx(\"span\", {\n id: \"aria-context\"\n }, ariaContext)));\n};\n\nvar diacritics = [{\n base: 'A',\n letters: \"A\\u24B6\\uFF21\\xC0\\xC1\\xC2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\xC3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\xC4\\u01DE\\u1EA2\\xC5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F\"\n}, {\n base: 'AA',\n letters: \"\\uA732\"\n}, {\n base: 'AE',\n letters: \"\\xC6\\u01FC\\u01E2\"\n}, {\n base: 'AO',\n letters: \"\\uA734\"\n}, {\n base: 'AU',\n letters: \"\\uA736\"\n}, {\n base: 'AV',\n letters: \"\\uA738\\uA73A\"\n}, {\n base: 'AY',\n letters: \"\\uA73C\"\n}, {\n base: 'B',\n letters: \"B\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181\"\n}, {\n base: 'C',\n letters: \"C\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\xC7\\u1E08\\u0187\\u023B\\uA73E\"\n}, {\n base: 'D',\n letters: \"D\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\"\n}, {\n base: 'DZ',\n letters: \"\\u01F1\\u01C4\"\n}, {\n base: 'Dz',\n letters: \"\\u01F2\\u01C5\"\n}, {\n base: 'E',\n letters: \"E\\u24BA\\uFF25\\xC8\\xC9\\xCA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\xCB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E\"\n}, {\n base: 'F',\n letters: \"F\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B\"\n}, {\n base: 'G',\n letters: \"G\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E\"\n}, {\n base: 'H',\n letters: \"H\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D\"\n}, {\n base: 'I',\n letters: \"I\\u24BE\\uFF29\\xCC\\xCD\\xCE\\u0128\\u012A\\u012C\\u0130\\xCF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197\"\n}, {\n base: 'J',\n letters: \"J\\u24BF\\uFF2A\\u0134\\u0248\"\n}, {\n base: 'K',\n letters: \"K\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2\"\n}, {\n base: 'L',\n letters: \"L\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780\"\n}, {\n base: 'LJ',\n letters: \"\\u01C7\"\n}, {\n base: 'Lj',\n letters: \"\\u01C8\"\n}, {\n base: 'M',\n letters: \"M\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C\"\n}, {\n base: 'N',\n letters: \"N\\u24C3\\uFF2E\\u01F8\\u0143\\xD1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4\"\n}, {\n base: 'NJ',\n letters: \"\\u01CA\"\n}, {\n base: 'Nj',\n letters: \"\\u01CB\"\n}, {\n base: 'O',\n letters: \"O\\u24C4\\uFF2F\\xD2\\xD3\\xD4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\xD5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\xD6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\xD8\\u01FE\\u0186\\u019F\\uA74A\\uA74C\"\n}, {\n base: 'OI',\n letters: \"\\u01A2\"\n}, {\n base: 'OO',\n letters: \"\\uA74E\"\n}, {\n base: 'OU',\n letters: \"\\u0222\"\n}, {\n base: 'P',\n letters: \"P\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754\"\n}, {\n base: 'Q',\n letters: \"Q\\u24C6\\uFF31\\uA756\\uA758\\u024A\"\n}, {\n base: 'R',\n letters: \"R\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782\"\n}, {\n base: 'S',\n letters: \"S\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784\"\n}, {\n base: 'T',\n letters: \"T\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786\"\n}, {\n base: 'TZ',\n letters: \"\\uA728\"\n}, {\n base: 'U',\n letters: \"U\\u24CA\\uFF35\\xD9\\xDA\\xDB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\xDC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244\"\n}, {\n base: 'V',\n letters: \"V\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245\"\n}, {\n base: 'VY',\n letters: \"\\uA760\"\n}, {\n base: 'W',\n letters: \"W\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72\"\n}, {\n base: 'X',\n letters: \"X\\u24CD\\uFF38\\u1E8A\\u1E8C\"\n}, {\n base: 'Y',\n letters: \"Y\\u24CE\\uFF39\\u1EF2\\xDD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE\"\n}, {\n base: 'Z',\n letters: \"Z\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762\"\n}, {\n base: 'a',\n letters: \"a\\u24D0\\uFF41\\u1E9A\\xE0\\xE1\\xE2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\xE3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\xE4\\u01DF\\u1EA3\\xE5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250\"\n}, {\n base: 'aa',\n letters: \"\\uA733\"\n}, {\n base: 'ae',\n letters: \"\\xE6\\u01FD\\u01E3\"\n}, {\n base: 'ao',\n letters: \"\\uA735\"\n}, {\n base: 'au',\n letters: \"\\uA737\"\n}, {\n base: 'av',\n letters: \"\\uA739\\uA73B\"\n}, {\n base: 'ay',\n letters: \"\\uA73D\"\n}, {\n base: 'b',\n letters: \"b\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253\"\n}, {\n base: 'c',\n letters: \"c\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\xE7\\u1E09\\u0188\\u023C\\uA73F\\u2184\"\n}, {\n base: 'd',\n letters: \"d\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A\"\n}, {\n base: 'dz',\n letters: \"\\u01F3\\u01C6\"\n}, {\n base: 'e',\n letters: \"e\\u24D4\\uFF45\\xE8\\xE9\\xEA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\xEB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD\"\n}, {\n base: 'f',\n letters: \"f\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C\"\n}, {\n base: 'g',\n letters: \"g\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F\"\n}, {\n base: 'h',\n letters: \"h\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265\"\n}, {\n base: 'hv',\n letters: \"\\u0195\"\n}, {\n base: 'i',\n letters: \"i\\u24D8\\uFF49\\xEC\\xED\\xEE\\u0129\\u012B\\u012D\\xEF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131\"\n}, {\n base: 'j',\n letters: \"j\\u24D9\\uFF4A\\u0135\\u01F0\\u0249\"\n}, {\n base: 'k',\n letters: \"k\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3\"\n}, {\n base: 'l',\n letters: \"l\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747\"\n}, {\n base: 'lj',\n letters: \"\\u01C9\"\n}, {\n base: 'm',\n letters: \"m\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F\"\n}, {\n base: 'n',\n letters: \"n\\u24DD\\uFF4E\\u01F9\\u0144\\xF1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5\"\n}, {\n base: 'nj',\n letters: \"\\u01CC\"\n}, {\n base: 'o',\n letters: \"o\\u24DE\\uFF4F\\xF2\\xF3\\xF4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\xF5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\xF6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\xF8\\u01FF\\u0254\\uA74B\\uA74D\\u0275\"\n}, {\n base: 'oi',\n letters: \"\\u01A3\"\n}, {\n base: 'ou',\n letters: \"\\u0223\"\n}, {\n base: 'oo',\n letters: \"\\uA74F\"\n}, {\n base: 'p',\n letters: \"p\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755\"\n}, {\n base: 'q',\n letters: \"q\\u24E0\\uFF51\\u024B\\uA757\\uA759\"\n}, {\n base: 'r',\n letters: \"r\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783\"\n}, {\n base: 's',\n letters: \"s\\u24E2\\uFF53\\xDF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B\"\n}, {\n base: 't',\n letters: \"t\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787\"\n}, {\n base: 'tz',\n letters: \"\\uA729\"\n}, {\n base: 'u',\n letters: \"u\\u24E4\\uFF55\\xF9\\xFA\\xFB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\xFC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289\"\n}, {\n base: 'v',\n letters: \"v\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C\"\n}, {\n base: 'vy',\n letters: \"\\uA761\"\n}, {\n base: 'w',\n letters: \"w\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73\"\n}, {\n base: 'x',\n letters: \"x\\u24E7\\uFF58\\u1E8B\\u1E8D\"\n}, {\n base: 'y',\n letters: \"y\\u24E8\\uFF59\\u1EF3\\xFD\\u0177\\u1EF9\\u0233\\u1E8F\\xFF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF\"\n}, {\n base: 'z',\n letters: \"z\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763\"\n}];\nvar anyDiacritic = new RegExp('[' + diacritics.map(function (d) {\n return d.letters;\n}).join('') + ']', 'g');\nvar diacriticToBase = {};\n\nfor (var i = 0; i < diacritics.length; i++) {\n var diacritic = diacritics[i];\n\n for (var j = 0; j < diacritic.letters.length; j++) {\n diacriticToBase[diacritic.letters[j]] = diacritic.base;\n }\n}\n\nvar stripDiacritics = function stripDiacritics(str) {\n return str.replace(anyDiacritic, function (match) {\n return diacriticToBase[match];\n });\n};\n\nvar memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics);\n\nvar trimString = function trimString(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar defaultStringify = function defaultStringify(option) {\n return \"\".concat(option.label, \" \").concat(option.value);\n};\n\nvar createFilter = function createFilter(config) {\n return function (option, rawInput) {\n var _ignoreCase$ignoreAcc = _objectSpread2({\n ignoreCase: true,\n ignoreAccents: true,\n stringify: defaultStringify,\n trim: true,\n matchFrom: 'any'\n }, config),\n ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n stringify = _ignoreCase$ignoreAcc.stringify,\n trim = _ignoreCase$ignoreAcc.trim,\n matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n var input = trim ? trimString(rawInput) : rawInput;\n var candidate = trim ? trimString(stringify(option)) : stringify(option);\n\n if (ignoreCase) {\n input = input.toLowerCase();\n candidate = candidate.toLowerCase();\n }\n\n if (ignoreAccents) {\n input = memoizedStripDiacriticsForInput(input);\n candidate = stripDiacritics(candidate);\n }\n\n return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n };\n};\n\nfunction DummyInput(_ref) {\n _ref.in;\n _ref.out;\n _ref.onExited;\n _ref.appear;\n _ref.enter;\n _ref.exit;\n var innerRef = _ref.innerRef;\n _ref.emotion;\n\n var props = _objectWithoutProperties(_ref, [\"in\", \"out\", \"onExited\", \"appear\", \"enter\", \"exit\", \"innerRef\", \"emotion\"]);\n\n return jsx(\"input\", _extends({\n ref: innerRef\n }, props, {\n css: /*#__PURE__*/css({\n label: 'dummyInput',\n // get rid of any default styles\n background: 0,\n border: 0,\n fontSize: 'inherit',\n outline: 0,\n padding: 0,\n // important! without `width` browsers won't allow focus\n width: 1,\n // remove cursor on desktop\n color: 'transparent',\n // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n left: -100,\n opacity: 0,\n position: 'relative',\n transform: 'scale(0)'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:DummyInput;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJNIiwiZmlsZSI6IkR1bW15SW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbjogaW5Qcm9wLFxuICBvdXQsXG4gIG9uRXhpdGVkLFxuICBhcHBlYXIsXG4gIGVudGVyLFxuICBleGl0LFxuICBpbm5lclJlZixcbiAgZW1vdGlvbixcbiAgLi4ucHJvcHNcbn06IGFueSkge1xuICByZXR1cm4gKFxuICAgIDxpbnB1dFxuICAgICAgcmVmPXtpbm5lclJlZn1cbiAgICAgIHsuLi5wcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSgwKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */\")\n }));\n}\n\nvar cancelScroll = function cancelScroll(event) {\n event.preventDefault();\n event.stopPropagation();\n};\n\nfunction useScrollCapture(_ref) {\n var isEnabled = _ref.isEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var isBottom = useRef(false);\n var isTop = useRef(false);\n var touchStart = useRef(0);\n var scrollTarget = useRef(null);\n var handleEventDelta = useCallback(function (event, delta) {\n // Reference should never be `null` at this point, but flow complains otherwise\n if (scrollTarget.current === null) return;\n var _scrollTarget$current = scrollTarget.current,\n scrollTop = _scrollTarget$current.scrollTop,\n scrollHeight = _scrollTarget$current.scrollHeight,\n clientHeight = _scrollTarget$current.clientHeight;\n var target = scrollTarget.current;\n var isDeltaPositive = delta > 0;\n var availableScroll = scrollHeight - clientHeight - scrollTop;\n var shouldCancelScroll = false; // reset bottom/top flags\n\n if (availableScroll > delta && isBottom.current) {\n if (onBottomLeave) onBottomLeave(event);\n isBottom.current = false;\n }\n\n if (isDeltaPositive && isTop.current) {\n if (onTopLeave) onTopLeave(event);\n isTop.current = false;\n } // bottom limit\n\n\n if (isDeltaPositive && delta > availableScroll) {\n if (onBottomArrive && !isBottom.current) {\n onBottomArrive(event);\n }\n\n target.scrollTop = scrollHeight;\n shouldCancelScroll = true;\n isBottom.current = true; // top limit\n } else if (!isDeltaPositive && -delta > scrollTop) {\n if (onTopArrive && !isTop.current) {\n onTopArrive(event);\n }\n\n target.scrollTop = 0;\n shouldCancelScroll = true;\n isTop.current = true;\n } // cancel scroll\n\n\n if (shouldCancelScroll) {\n cancelScroll(event);\n }\n }, []);\n var onWheel = useCallback(function (event) {\n handleEventDelta(event, event.deltaY);\n }, [handleEventDelta]);\n var onTouchStart = useCallback(function (event) {\n // set touch start so we can calculate touchmove delta\n touchStart.current = event.changedTouches[0].clientY;\n }, []);\n var onTouchMove = useCallback(function (event) {\n var deltaY = touchStart.current - event.changedTouches[0].clientY;\n handleEventDelta(event, deltaY);\n }, [handleEventDelta]);\n var startListening = useCallback(function (el) {\n // bail early if no element is available to attach to\n if (!el) return;\n var notPassive = supportsPassiveEvents ? {\n passive: false\n } : false; // all the if statements are to appease Flow 😢\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('wheel', onWheel, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchstart', onTouchStart, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchmove', onTouchMove, notPassive);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n var stopListening = useCallback(function (el) {\n // bail early if no element is available to detach from\n if (!el) return; // all the if statements are to appease Flow 😢\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('wheel', onWheel, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchstart', onTouchStart, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchmove', onTouchMove, false);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n startListening(element);\n return function () {\n stopListening(element);\n };\n }, [isEnabled, startListening, stopListening]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\nvar LOCK_STYLES = {\n boxSizing: 'border-box',\n // account for possible declaration `width: 100%;` on body\n overflow: 'hidden',\n position: 'relative',\n height: '100%'\n};\n\nfunction preventTouchMove(e) {\n e.preventDefault();\n}\n\nfunction allowTouchMove(e) {\n e.stopPropagation();\n}\n\nfunction preventInertiaScroll() {\n var top = this.scrollTop;\n var totalScroll = this.scrollHeight;\n var currentScroll = top + this.offsetHeight;\n\n if (top === 0) {\n this.scrollTop = 1;\n } else if (currentScroll === totalScroll) {\n this.scrollTop = top - 1;\n }\n} // `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\n\n\nfunction isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar activeScrollLocks = 0;\nvar listenerOptions = {\n capture: false,\n passive: false\n};\n\nfunction useScrollLock(_ref) {\n var isEnabled = _ref.isEnabled,\n _ref$accountForScroll = _ref.accountForScrollbars,\n accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;\n var originalStyles = useRef({});\n var scrollTarget = useRef(null);\n var addScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style;\n\n if (accountForScrollbars) {\n // store any styles already applied to the body\n STYLE_KEYS.forEach(function (key) {\n var val = targetStyle && targetStyle[key];\n originalStyles.current[key] = val;\n });\n } // apply the lock styles and padding if this is the first scroll lock\n\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0;\n var clientWidth = document.body ? document.body.clientWidth : 0;\n var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n Object.keys(LOCK_STYLES).forEach(function (key) {\n var val = LOCK_STYLES[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n\n if (targetStyle) {\n targetStyle.paddingRight = \"\".concat(adjustedPadding, \"px\");\n }\n } // account for touch devices\n\n\n if (target && isTouchDevice()) {\n // Mobile Safari ignores { overflow: hidden } declaration on the body.\n target.addEventListener('touchmove', preventTouchMove, listenerOptions); // Allow scroll on provided target\n\n if (touchScrollTarget) {\n touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.addEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n } // increment active scroll locks\n\n\n activeScrollLocks += 1;\n }, []);\n var removeScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style; // safely decrement active scroll locks\n\n activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n STYLE_KEYS.forEach(function (key) {\n var val = originalStyles.current[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n } // remove touch listeners\n\n\n if (target && isTouchDevice()) {\n target.removeEventListener('touchmove', preventTouchMove, listenerOptions);\n\n if (touchScrollTarget) {\n touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.removeEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n }\n }, []);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n addScrollLock(element);\n return function () {\n removeScrollLock(element);\n };\n }, [isEnabled, addScrollLock, removeScrollLock]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__$1() {\n return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\";\n}\n\nvar blurSelectInput = function blurSelectInput() {\n return document.activeElement && document.activeElement.blur();\n};\n\nvar _ref2 = process.env.NODE_ENV === \"production\" ? {\n name: \"1kfdb0e\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0\"\n} : {\n name: \"bp8cua-ScrollManager\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0RVIiwiZmlsZSI6IlNjcm9sbE1hbmFnZXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgUmVhY3QsIHsgdHlwZSBFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHVzZVNjcm9sbENhcHR1cmUgZnJvbSAnLi91c2VTY3JvbGxDY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U2Nyb2xsQ2FwdHVyZSh7XG4gICAgaXNFbmFibGVkOiBjYXB0dXJlRW5hYmxlZCxcbiAgICBvbkJvdHRvbUFycml2ZSxcbiAgICBvbkJvdHRvbUxlYXZlLFxuICAgIG9uVG9wQXJyaXZlLFxuICAgIG9uVG9wTGVhdmUsXG4gIH0pO1xuICBjb25zdCBzZXRTY3JvbGxMb2NrVGFyZ2V0ID0gdXNlU2Nyb2xsTG9jayh7IGlzRW5hYmxlZDogbG9ja0VuYWJsZWQgfSk7XG5cbiAgY29uc3QgdGFyZ2V0UmVmID0gZWxlbWVudCA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1\n};\n\nfunction ScrollManager(_ref) {\n var children = _ref.children,\n lockEnabled = _ref.lockEnabled,\n _ref$captureEnabled = _ref.captureEnabled,\n captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var setScrollCaptureTarget = useScrollCapture({\n isEnabled: captureEnabled,\n onBottomArrive: onBottomArrive,\n onBottomLeave: onBottomLeave,\n onTopArrive: onTopArrive,\n onTopLeave: onTopLeave\n });\n var setScrollLockTarget = useScrollLock({\n isEnabled: lockEnabled\n });\n\n var targetRef = function targetRef(element) {\n setScrollCaptureTarget(element);\n setScrollLockTarget(element);\n };\n\n return jsx(React.Fragment, null, lockEnabled && jsx(\"div\", {\n onClick: blurSelectInput,\n css: _ref2\n }), children(targetRef));\n}\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n return group.label;\n};\n\nvar getOptionLabel = function getOptionLabel(option) {\n return option.label;\n};\n\nvar getOptionValue = function getOptionValue(option) {\n return option.value;\n};\n\nvar isOptionDisabled = function isOptionDisabled(option) {\n return !!option.isDisabled;\n};\n\nvar defaultStyles = {\n clearIndicator: clearIndicatorCSS,\n container: containerCSS,\n control: css$1,\n dropdownIndicator: dropdownIndicatorCSS,\n group: groupCSS,\n groupHeading: groupHeadingCSS,\n indicatorsContainer: indicatorsContainerCSS,\n indicatorSeparator: indicatorSeparatorCSS,\n input: inputCSS,\n loadingIndicator: loadingIndicatorCSS,\n loadingMessage: loadingMessageCSS,\n menu: menuCSS,\n menuList: menuListCSS,\n menuPortal: menuPortalCSS,\n multiValue: multiValueCSS,\n multiValueLabel: multiValueLabelCSS,\n multiValueRemove: multiValueRemoveCSS,\n noOptionsMessage: noOptionsMessageCSS,\n option: optionCSS,\n placeholder: placeholderCSS,\n singleValue: css$2,\n valueContainer: valueContainerCSS\n}; // Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // initialize with source styles\n\n var styles = _objectSpread2({}, source); // massage in target styles\n\n\n Object.keys(target).forEach(function (key) {\n if (source[key]) {\n styles[key] = function (rsCss, props) {\n return target[key](source[key](rsCss, props), props);\n };\n } else {\n styles[key] = target[key];\n }\n });\n return styles;\n}\n\nvar colors = {\n primary: '#2684FF',\n primary75: '#4C9AFF',\n primary50: '#B2D4FF',\n primary25: '#DEEBFF',\n danger: '#DE350B',\n dangerLight: '#FFBDAD',\n neutral0: 'hsl(0, 0%, 100%)',\n neutral5: 'hsl(0, 0%, 95%)',\n neutral10: 'hsl(0, 0%, 90%)',\n neutral20: 'hsl(0, 0%, 80%)',\n neutral30: 'hsl(0, 0%, 70%)',\n neutral40: 'hsl(0, 0%, 60%)',\n neutral50: 'hsl(0, 0%, 50%)',\n neutral60: 'hsl(0, 0%, 40%)',\n neutral70: 'hsl(0, 0%, 30%)',\n neutral80: 'hsl(0, 0%, 20%)',\n neutral90: 'hsl(0, 0%, 10%)'\n};\nvar borderRadius = 4; // Used to calculate consistent margin/padding on elements\n\nvar baseUnit = 4; // The minimum height of the control\n\nvar controlHeight = 38; // The amount of space between the control and menu */\n\nvar menuGutter = baseUnit * 2;\nvar spacing = {\n baseUnit: baseUnit,\n controlHeight: controlHeight,\n menuGutter: menuGutter\n};\nvar defaultTheme = {\n borderRadius: borderRadius,\n colors: colors,\n spacing: spacing\n};\nvar defaultProps = {\n 'aria-live': 'polite',\n backspaceRemovesValue: true,\n blurInputOnSelect: isTouchCapable(),\n captureMenuScroll: !isTouchCapable(),\n closeMenuOnSelect: true,\n closeMenuOnScroll: false,\n components: {},\n controlShouldRenderValue: true,\n escapeClearsValue: false,\n filterOption: createFilter(),\n formatGroupLabel: formatGroupLabel,\n getOptionLabel: getOptionLabel,\n getOptionValue: getOptionValue,\n isDisabled: false,\n isLoading: false,\n isMulti: false,\n isRtl: false,\n isSearchable: true,\n isOptionDisabled: isOptionDisabled,\n loadingMessage: function loadingMessage() {\n return 'Loading...';\n },\n maxMenuHeight: 300,\n minMenuHeight: 140,\n menuIsOpen: false,\n menuPlacement: 'bottom',\n menuPosition: 'absolute',\n menuShouldBlockScroll: false,\n menuShouldScrollIntoView: !isMobileDevice(),\n noOptionsMessage: function noOptionsMessage() {\n return 'No options';\n },\n openMenuOnFocus: false,\n openMenuOnClick: true,\n options: [],\n pageSize: 5,\n placeholder: 'Select...',\n screenReaderStatus: function screenReaderStatus(_ref) {\n var count = _ref.count;\n return \"\".concat(count, \" result\").concat(count !== 1 ? 's' : '', \" available\");\n },\n styles: {},\n tabIndex: '0',\n tabSelectsValue: true\n};\n\nfunction toCategorizedOption(props, option, selectValue, index) {\n var isDisabled = _isOptionDisabled(props, option, selectValue);\n\n var isSelected = _isOptionSelected(props, option, selectValue);\n\n var label = getOptionLabel$1(props, option);\n var value = getOptionValue$1(props, option);\n return {\n type: 'option',\n data: option,\n isDisabled: isDisabled,\n isSelected: isSelected,\n label: label,\n value: value,\n index: index\n };\n}\n\nfunction buildCategorizedOptions(props, selectValue) {\n return props.options.map(function (groupOrOption, groupOrOptionIndex) {\n if (groupOrOption.options) {\n var categorizedOptions = groupOrOption.options.map(function (option, optionIndex) {\n return toCategorizedOption(props, option, selectValue, optionIndex);\n }).filter(function (categorizedOption) {\n return isFocusable(props, categorizedOption);\n });\n return categorizedOptions.length > 0 ? {\n type: 'group',\n data: groupOrOption,\n options: categorizedOptions,\n index: groupOrOptionIndex\n } : undefined;\n }\n\n var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex);\n return isFocusable(props, categorizedOption) ? categorizedOption : undefined;\n }) // Flow limitation (see https://github.com/facebook/flow/issues/1414)\n .filter(function (categorizedOption) {\n return !!categorizedOption;\n });\n}\n\nfunction buildFocusableOptionsFromCategorizedOptions(categorizedOptions) {\n return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) {\n if (categorizedOption.type === 'group') {\n optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) {\n return option.data;\n })));\n } else {\n optionsAccumulator.push(categorizedOption.data);\n }\n\n return optionsAccumulator;\n }, []);\n}\n\nfunction buildFocusableOptions(props, selectValue) {\n return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue));\n}\n\nfunction isFocusable(props, categorizedOption) {\n var _props$inputValue = props.inputValue,\n inputValue = _props$inputValue === void 0 ? '' : _props$inputValue;\n var data = categorizedOption.data,\n isSelected = categorizedOption.isSelected,\n label = categorizedOption.label,\n value = categorizedOption.value;\n return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, {\n label: label,\n value: value,\n data: data\n }, inputValue);\n}\n\nfunction getNextFocusedValue(state, nextSelectValue) {\n var focusedValue = state.focusedValue,\n lastSelectValue = state.selectValue;\n var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n\n if (lastFocusedIndex > -1) {\n var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n\n if (nextFocusedIndex > -1) {\n // the focused value is still in the selectValue, return it\n return focusedValue;\n } else if (lastFocusedIndex < nextSelectValue.length) {\n // the focusedValue is not present in the next selectValue array by\n // reference, so return the new value at the same index\n return nextSelectValue[lastFocusedIndex];\n }\n }\n\n return null;\n}\n\nfunction getNextFocusedOption(state, options) {\n var lastFocusedOption = state.focusedOption;\n return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n}\n\nvar getOptionLabel$1 = function getOptionLabel(props, data) {\n return props.getOptionLabel(data);\n};\n\nvar getOptionValue$1 = function getOptionValue(props, data) {\n return props.getOptionValue(data);\n};\n\nfunction _isOptionDisabled(props, option, selectValue) {\n return typeof props.isOptionDisabled === 'function' ? props.isOptionDisabled(option, selectValue) : false;\n}\n\nfunction _isOptionSelected(props, option, selectValue) {\n if (selectValue.indexOf(option) > -1) return true;\n\n if (typeof props.isOptionSelected === 'function') {\n return props.isOptionSelected(option, selectValue);\n }\n\n var candidate = getOptionValue$1(props, option);\n return selectValue.some(function (i) {\n return getOptionValue$1(props, i) === candidate;\n });\n}\n\nfunction _filterOption(props, option, inputValue) {\n return props.filterOption ? props.filterOption(option, inputValue) : true;\n}\n\nvar shouldHideSelectedOptions = function shouldHideSelectedOptions(props) {\n var hideSelectedOptions = props.hideSelectedOptions,\n isMulti = props.isMulti;\n if (hideSelectedOptions === undefined) return isMulti;\n return hideSelectedOptions;\n};\n\nvar instanceId = 1;\n\nvar Select = /*#__PURE__*/function (_Component) {\n _inherits(Select, _Component);\n\n var _super = _createSuper(Select); // Misc. Instance Properties\n // ------------------------------\n // TODO\n // Refs\n // ------------------------------\n // Lifecycle\n // ------------------------------\n\n\n function Select(_props) {\n var _this;\n\n _classCallCheck(this, Select);\n\n _this = _super.call(this, _props);\n _this.state = {\n ariaSelection: null,\n focusedOption: null,\n focusedValue: null,\n inputIsHidden: false,\n isFocused: false,\n selectValue: [],\n clearFocusValueOnUpdate: false,\n inputIsHiddenAfterUpdate: undefined,\n prevProps: undefined\n };\n _this.blockOptionHover = false;\n _this.isComposing = false;\n _this.commonProps = void 0;\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n _this.instancePrefix = '';\n _this.openAfterFocus = false;\n _this.scrollToFocusedOptionOnUpdate = false;\n _this.userIsDragging = void 0;\n _this.controlRef = null;\n\n _this.getControlRef = function (ref) {\n _this.controlRef = ref;\n };\n\n _this.focusedOptionRef = null;\n\n _this.getFocusedOptionRef = function (ref) {\n _this.focusedOptionRef = ref;\n };\n\n _this.menuListRef = null;\n\n _this.getMenuListRef = function (ref) {\n _this.menuListRef = ref;\n };\n\n _this.inputRef = null;\n\n _this.getInputRef = function (ref) {\n _this.inputRef = ref;\n };\n\n _this.focus = _this.focusInput;\n _this.blur = _this.blurInput;\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n name = _this$props.name;\n actionMeta.name = name;\n\n _this.ariaOnChange(newValue, actionMeta);\n\n onChange(newValue, actionMeta);\n };\n\n _this.setValue = function (newValue) {\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';\n var option = arguments.length > 2 ? arguments[2] : undefined;\n var _this$props2 = _this.props,\n closeMenuOnSelect = _this$props2.closeMenuOnSelect,\n isMulti = _this$props2.isMulti;\n\n _this.onInputChange('', {\n action: 'set-value'\n });\n\n if (closeMenuOnSelect) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } // when the select value should change, we should reset focusedValue\n\n\n _this.setState({\n clearFocusValueOnUpdate: true\n });\n\n _this.onChange(newValue, {\n action: action,\n option: option\n });\n };\n\n _this.selectOption = function (newValue) {\n var _this$props3 = _this.props,\n blurInputOnSelect = _this$props3.blurInputOnSelect,\n isMulti = _this$props3.isMulti,\n name = _this$props3.name;\n var selectValue = _this.state.selectValue;\n\n var deselected = isMulti && _this.isOptionSelected(newValue, selectValue);\n\n var isDisabled = _this.isOptionDisabled(newValue, selectValue);\n\n if (deselected) {\n var candidate = _this.getOptionValue(newValue);\n\n _this.setValue(selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n }), 'deselect-option', newValue);\n } else if (!isDisabled) {\n // Select option if option is not disabled\n if (isMulti) {\n _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);\n } else {\n _this.setValue(newValue, 'select-option');\n }\n } else {\n _this.ariaOnChange(newValue, {\n action: 'select-option',\n name: name\n });\n\n return;\n }\n\n if (blurInputOnSelect) {\n _this.blurInput();\n }\n };\n\n _this.removeValue = function (removedValue) {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n\n var candidate = _this.getOptionValue(removedValue);\n\n var newValueArray = selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n });\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'remove-value',\n removedValue: removedValue\n });\n\n _this.focusInput();\n };\n\n _this.clearValue = function () {\n var selectValue = _this.state.selectValue;\n\n _this.onChange(_this.props.isMulti ? [] : null, {\n action: 'clear',\n removedValues: selectValue\n });\n };\n\n _this.popValue = function () {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n var lastSelectedValue = selectValue[selectValue.length - 1];\n var newValueArray = selectValue.slice(0, selectValue.length - 1);\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'pop-value',\n removedValue: lastSelectedValue\n });\n };\n\n _this.getValue = function () {\n return _this.state.selectValue;\n };\n\n _this.cx = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args));\n };\n\n _this.getOptionLabel = function (data) {\n return getOptionLabel$1(_this.props, data);\n };\n\n _this.getOptionValue = function (data) {\n return getOptionValue$1(_this.props, data);\n };\n\n _this.getStyles = function (key, props) {\n var base = defaultStyles[key](props);\n base.boxSizing = 'border-box';\n var custom = _this.props.styles[key];\n return custom ? custom(base, props) : base;\n };\n\n _this.getElementId = function (element) {\n return \"\".concat(_this.instancePrefix, \"-\").concat(element);\n };\n\n _this.getComponents = function () {\n return defaultComponents(_this.props);\n };\n\n _this.buildCategorizedOptions = function () {\n return buildCategorizedOptions(_this.props, _this.state.selectValue);\n };\n\n _this.getCategorizedOptions = function () {\n return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : [];\n };\n\n _this.buildFocusableOptions = function () {\n return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions());\n };\n\n _this.getFocusableOptions = function () {\n return _this.props.menuIsOpen ? _this.buildFocusableOptions() : [];\n };\n\n _this.ariaOnChange = function (value, actionMeta) {\n _this.setState({\n ariaSelection: _objectSpread2({\n value: value\n }, actionMeta)\n });\n };\n\n _this.onMenuMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n _this.focusInput();\n };\n\n _this.onMenuMouseMove = function (event) {\n _this.blockOptionHover = false;\n };\n\n _this.onControlMouseDown = function (event) {\n var openMenuOnClick = _this.props.openMenuOnClick;\n\n if (!_this.state.isFocused) {\n if (openMenuOnClick) {\n _this.openAfterFocus = true;\n }\n\n _this.focusInput();\n } else if (!_this.props.menuIsOpen) {\n if (openMenuOnClick) {\n _this.openMenu('first');\n }\n } else {\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n _this.onMenuClose();\n }\n }\n\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n event.preventDefault();\n }\n };\n\n _this.onDropdownIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n if (_this.props.isDisabled) return;\n var _this$props4 = _this.props,\n isMulti = _this$props4.isMulti,\n menuIsOpen = _this$props4.menuIsOpen;\n\n _this.focusInput();\n\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } else {\n _this.openMenu('first');\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n _this.onClearIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n _this.clearValue();\n\n event.stopPropagation();\n _this.openAfterFocus = false;\n\n if (event.type === 'touchend') {\n _this.focusInput();\n } else {\n setTimeout(function () {\n return _this.focusInput();\n });\n }\n };\n\n _this.onScroll = function (event) {\n if (typeof _this.props.closeMenuOnScroll === 'boolean') {\n if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n _this.props.onMenuClose();\n }\n } else if (typeof _this.props.closeMenuOnScroll === 'function') {\n if (_this.props.closeMenuOnScroll(event)) {\n _this.props.onMenuClose();\n }\n }\n };\n\n _this.onCompositionStart = function () {\n _this.isComposing = true;\n };\n\n _this.onCompositionEnd = function () {\n _this.isComposing = false;\n };\n\n _this.onTouchStart = function (_ref2) {\n var touches = _ref2.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n _this.initialTouchX = touch.clientX;\n _this.initialTouchY = touch.clientY;\n _this.userIsDragging = false;\n };\n\n _this.onTouchMove = function (_ref3) {\n var touches = _ref3.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n var deltaX = Math.abs(touch.clientX - _this.initialTouchX);\n var deltaY = Math.abs(touch.clientY - _this.initialTouchY);\n var moveThreshold = 5;\n _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n };\n\n _this.onTouchEnd = function (event) {\n if (_this.userIsDragging) return; // close the menu if the user taps outside\n // we're checking on event.target here instead of event.currentTarget, because we want to assert information\n // on events on child elements, not the document (which we've attached this handler to).\n\n if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {\n _this.blurInput();\n } // reset move vars\n\n\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n };\n\n _this.onControlTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onControlMouseDown(event);\n };\n\n _this.onClearIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onClearIndicatorMouseDown(event);\n };\n\n _this.onDropdownIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onDropdownIndicatorMouseDown(event);\n };\n\n _this.handleInputChange = function (event) {\n var inputValue = event.currentTarget.value;\n\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange(inputValue, {\n action: 'input-change'\n });\n\n if (!_this.props.menuIsOpen) {\n _this.onMenuOpen();\n }\n };\n\n _this.onInputFocus = function (event) {\n if (_this.props.onFocus) {\n _this.props.onFocus(event);\n }\n\n _this.setState({\n inputIsHiddenAfterUpdate: false,\n isFocused: true\n });\n\n if (_this.openAfterFocus || _this.props.openMenuOnFocus) {\n _this.openMenu('first');\n }\n\n _this.openAfterFocus = false;\n };\n\n _this.onInputBlur = function (event) {\n if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {\n _this.inputRef.focus();\n\n return;\n }\n\n if (_this.props.onBlur) {\n _this.props.onBlur(event);\n }\n\n _this.onInputChange('', {\n action: 'input-blur'\n });\n\n _this.onMenuClose();\n\n _this.setState({\n focusedValue: null,\n isFocused: false\n });\n };\n\n _this.onOptionHover = function (focusedOption) {\n if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {\n return;\n }\n\n _this.setState({\n focusedOption: focusedOption\n });\n };\n\n _this.shouldHideSelectedOptions = function () {\n return shouldHideSelectedOptions(_this.props);\n };\n\n _this.onKeyDown = function (event) {\n var _this$props5 = _this.props,\n isMulti = _this$props5.isMulti,\n backspaceRemovesValue = _this$props5.backspaceRemovesValue,\n escapeClearsValue = _this$props5.escapeClearsValue,\n inputValue = _this$props5.inputValue,\n isClearable = _this$props5.isClearable,\n isDisabled = _this$props5.isDisabled,\n menuIsOpen = _this$props5.menuIsOpen,\n onKeyDown = _this$props5.onKeyDown,\n tabSelectsValue = _this$props5.tabSelectsValue,\n openMenuOnFocus = _this$props5.openMenuOnFocus;\n var _this$state = _this.state,\n focusedOption = _this$state.focusedOption,\n focusedValue = _this$state.focusedValue,\n selectValue = _this$state.selectValue;\n if (isDisabled) return;\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n\n if (event.defaultPrevented) {\n return;\n }\n } // Block option hover events when the user has just pressed a key\n\n\n _this.blockOptionHover = true;\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('previous');\n\n break;\n\n case 'ArrowRight':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('next');\n\n break;\n\n case 'Delete':\n case 'Backspace':\n if (inputValue) return;\n\n if (focusedValue) {\n _this.removeValue(focusedValue);\n } else {\n if (!backspaceRemovesValue) return;\n\n if (isMulti) {\n _this.popValue();\n } else if (isClearable) {\n _this.clearValue();\n }\n }\n\n break;\n\n case 'Tab':\n if (_this.isComposing) return;\n\n if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused\n // option is already selected; it breaks the flow of navigation\n openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {\n return;\n }\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'Enter':\n if (event.keyCode === 229) {\n // ignore the keydown event from an Input Method Editor(IME)\n // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n break;\n }\n\n if (menuIsOpen) {\n if (!focusedOption) return;\n if (_this.isComposing) return;\n\n _this.selectOption(focusedOption);\n\n break;\n }\n\n return;\n\n case 'Escape':\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange('', {\n action: 'menu-close'\n });\n\n _this.onMenuClose();\n } else if (isClearable && escapeClearsValue) {\n _this.clearValue();\n }\n\n break;\n\n case ' ':\n // space\n if (inputValue) {\n return;\n }\n\n if (!menuIsOpen) {\n _this.openMenu('first');\n\n break;\n }\n\n if (!focusedOption) return;\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'ArrowUp':\n if (menuIsOpen) {\n _this.focusOption('up');\n } else {\n _this.openMenu('last');\n }\n\n break;\n\n case 'ArrowDown':\n if (menuIsOpen) {\n _this.focusOption('down');\n } else {\n _this.openMenu('first');\n }\n\n break;\n\n case 'PageUp':\n if (!menuIsOpen) return;\n\n _this.focusOption('pageup');\n\n break;\n\n case 'PageDown':\n if (!menuIsOpen) return;\n\n _this.focusOption('pagedown');\n\n break;\n\n case 'Home':\n if (!menuIsOpen) return;\n\n _this.focusOption('first');\n\n break;\n\n case 'End':\n if (!menuIsOpen) return;\n\n _this.focusOption('last');\n\n break;\n\n default:\n return;\n }\n\n event.preventDefault();\n };\n\n _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n _this.state.selectValue = cleanValue(_props.value);\n return _this;\n }\n\n _createClass(Select, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startListeningComposition();\n this.startListeningToTouch();\n\n if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n // Listen to all scroll events, and filter them out inside of 'onScroll'\n document.addEventListener('scroll', this.onScroll, true);\n }\n\n if (this.props.autoFocus) {\n this.focusInput();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props6 = this.props,\n isDisabled = _this$props6.isDisabled,\n menuIsOpen = _this$props6.menuIsOpen;\n var isFocused = this.state.isFocused;\n\n if ( // ensure focus is restored correctly when the control becomes enabled\n isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens\n isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n this.focusInput();\n }\n\n if (isFocused && isDisabled && !prevProps.isDisabled) {\n // ensure select state gets blurred in case Select is programatically disabled while focused\n this.setState({\n isFocused: false\n }, this.onMenuClose);\n } // scroll the focused option into view if necessary\n\n\n if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n scrollIntoView(this.menuListRef, this.focusedOptionRef);\n this.scrollToFocusedOptionOnUpdate = false;\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.stopListeningComposition();\n this.stopListeningToTouch();\n document.removeEventListener('scroll', this.onScroll, true);\n } // ==============================\n // Consumer Handlers\n // ==============================\n\n }, {\n key: \"onMenuOpen\",\n value: function onMenuOpen() {\n this.props.onMenuOpen();\n }\n }, {\n key: \"onMenuClose\",\n value: function onMenuClose() {\n this.onInputChange('', {\n action: 'menu-close'\n });\n this.props.onMenuClose();\n }\n }, {\n key: \"onInputChange\",\n value: function onInputChange(newValue, actionMeta) {\n this.props.onInputChange(newValue, actionMeta);\n } // ==============================\n // Methods\n // ==============================\n\n }, {\n key: \"focusInput\",\n value: function focusInput() {\n if (!this.inputRef) return;\n this.inputRef.focus();\n }\n }, {\n key: \"blurInput\",\n value: function blurInput() {\n if (!this.inputRef) return;\n this.inputRef.blur();\n } // aliased for consumers\n\n }, {\n key: \"openMenu\",\n value: function openMenu(focusOption) {\n var _this2 = this;\n\n var _this$state2 = this.state,\n selectValue = _this$state2.selectValue,\n isFocused = _this$state2.isFocused;\n var focusableOptions = this.buildFocusableOptions();\n var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1;\n\n if (!this.props.isMulti) {\n var selectedIndex = focusableOptions.indexOf(selectValue[0]);\n\n if (selectedIndex > -1) {\n openAtIndex = selectedIndex;\n }\n } // only scroll if the menu isn't already open\n\n\n this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);\n this.setState({\n inputIsHiddenAfterUpdate: false,\n focusedValue: null,\n focusedOption: focusableOptions[openAtIndex]\n }, function () {\n return _this2.onMenuOpen();\n });\n }\n }, {\n key: \"focusValue\",\n value: function focusValue(direction) {\n var _this$state3 = this.state,\n selectValue = _this$state3.selectValue,\n focusedValue = _this$state3.focusedValue; // Only multiselects support value focusing\n\n if (!this.props.isMulti) return;\n this.setState({\n focusedOption: null\n });\n var focusedIndex = selectValue.indexOf(focusedValue);\n\n if (!focusedValue) {\n focusedIndex = -1;\n }\n\n var lastIndex = selectValue.length - 1;\n var nextFocus = -1;\n if (!selectValue.length) return;\n\n switch (direction) {\n case 'previous':\n if (focusedIndex === 0) {\n // don't cycle from the start to the end\n nextFocus = 0;\n } else if (focusedIndex === -1) {\n // if nothing is focused, focus the last value first\n nextFocus = lastIndex;\n } else {\n nextFocus = focusedIndex - 1;\n }\n\n break;\n\n case 'next':\n if (focusedIndex > -1 && focusedIndex < lastIndex) {\n nextFocus = focusedIndex + 1;\n }\n\n break;\n }\n\n this.setState({\n inputIsHidden: nextFocus !== -1,\n focusedValue: selectValue[nextFocus]\n });\n }\n }, {\n key: \"focusOption\",\n value: function focusOption() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';\n var pageSize = this.props.pageSize;\n var focusedOption = this.state.focusedOption;\n var options = this.getFocusableOptions();\n if (!options.length) return;\n var nextFocus = 0; // handles 'first'\n\n var focusedIndex = options.indexOf(focusedOption);\n\n if (!focusedOption) {\n focusedIndex = -1;\n }\n\n if (direction === 'up') {\n nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n } else if (direction === 'down') {\n nextFocus = (focusedIndex + 1) % options.length;\n } else if (direction === 'pageup') {\n nextFocus = focusedIndex - pageSize;\n if (nextFocus < 0) nextFocus = 0;\n } else if (direction === 'pagedown') {\n nextFocus = focusedIndex + pageSize;\n if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n } else if (direction === 'last') {\n nextFocus = options.length - 1;\n }\n\n this.scrollToFocusedOptionOnUpdate = true;\n this.setState({\n focusedOption: options[nextFocus],\n focusedValue: null\n });\n }\n }, {\n key: \"getTheme\",\n value: // ==============================\n // Getters\n // ==============================\n function getTheme() {\n // Use the default theme if there are no customizations.\n if (!this.props.theme) {\n return defaultTheme;\n } // If the theme prop is a function, assume the function\n // knows how to merge the passed-in default theme with\n // its own modifications.\n\n\n if (typeof this.props.theme === 'function') {\n return this.props.theme(defaultTheme);\n } // Otherwise, if a plain theme object was passed in,\n // overlay it with the default theme.\n\n\n return _objectSpread2(_objectSpread2({}, defaultTheme), this.props.theme);\n }\n }, {\n key: \"getCommonProps\",\n value: function getCommonProps() {\n var clearValue = this.clearValue,\n cx = this.cx,\n getStyles = this.getStyles,\n getValue = this.getValue,\n selectOption = this.selectOption,\n setValue = this.setValue,\n props = this.props;\n var isMulti = props.isMulti,\n isRtl = props.isRtl,\n options = props.options;\n var hasValue = this.hasValue();\n return {\n clearValue: clearValue,\n cx: cx,\n getStyles: getStyles,\n getValue: getValue,\n hasValue: hasValue,\n isMulti: isMulti,\n isRtl: isRtl,\n options: options,\n selectOption: selectOption,\n selectProps: props,\n setValue: setValue,\n theme: this.getTheme()\n };\n }\n }, {\n key: \"hasValue\",\n value: function hasValue() {\n var selectValue = this.state.selectValue;\n return selectValue.length > 0;\n }\n }, {\n key: \"hasOptions\",\n value: function hasOptions() {\n return !!this.getFocusableOptions().length;\n }\n }, {\n key: \"isClearable\",\n value: function isClearable() {\n var _this$props7 = this.props,\n isClearable = _this$props7.isClearable,\n isMulti = _this$props7.isMulti; // single select, by default, IS NOT clearable\n // multi select, by default, IS clearable\n\n if (isClearable === undefined) return isMulti;\n return isClearable;\n }\n }, {\n key: \"isOptionDisabled\",\n value: function isOptionDisabled(option, selectValue) {\n return _isOptionDisabled(this.props, option, selectValue);\n }\n }, {\n key: \"isOptionSelected\",\n value: function isOptionSelected(option, selectValue) {\n return _isOptionSelected(this.props, option, selectValue);\n }\n }, {\n key: \"filterOption\",\n value: function filterOption(option, inputValue) {\n return _filterOption(this.props, option, inputValue);\n }\n }, {\n key: \"formatOptionLabel\",\n value: function formatOptionLabel(data, context) {\n if (typeof this.props.formatOptionLabel === 'function') {\n var inputValue = this.props.inputValue;\n var selectValue = this.state.selectValue;\n return this.props.formatOptionLabel(data, {\n context: context,\n inputValue: inputValue,\n selectValue: selectValue\n });\n } else {\n return this.getOptionLabel(data);\n }\n }\n }, {\n key: \"formatGroupLabel\",\n value: function formatGroupLabel(data) {\n return this.props.formatGroupLabel(data);\n } // ==============================\n // Mouse Handlers\n // ==============================\n\n }, {\n key: \"startListeningComposition\",\n value: // ==============================\n // Composition Handlers\n // ==============================\n function startListeningComposition() {\n if (document && document.addEventListener) {\n document.addEventListener('compositionstart', this.onCompositionStart, false);\n document.addEventListener('compositionend', this.onCompositionEnd, false);\n }\n }\n }, {\n key: \"stopListeningComposition\",\n value: function stopListeningComposition() {\n if (document && document.removeEventListener) {\n document.removeEventListener('compositionstart', this.onCompositionStart);\n document.removeEventListener('compositionend', this.onCompositionEnd);\n }\n }\n }, {\n key: \"startListeningToTouch\",\n value: // ==============================\n // Touch Handlers\n // ==============================\n function startListeningToTouch() {\n if (document && document.addEventListener) {\n document.addEventListener('touchstart', this.onTouchStart, false);\n document.addEventListener('touchmove', this.onTouchMove, false);\n document.addEventListener('touchend', this.onTouchEnd, false);\n }\n }\n }, {\n key: \"stopListeningToTouch\",\n value: function stopListeningToTouch() {\n if (document && document.removeEventListener) {\n document.removeEventListener('touchstart', this.onTouchStart);\n document.removeEventListener('touchmove', this.onTouchMove);\n document.removeEventListener('touchend', this.onTouchEnd);\n }\n }\n }, {\n key: \"renderInput\",\n value: // ==============================\n // Renderers\n // ==============================\n function renderInput() {\n var _this$props8 = this.props,\n isDisabled = _this$props8.isDisabled,\n isSearchable = _this$props8.isSearchable,\n inputId = _this$props8.inputId,\n inputValue = _this$props8.inputValue,\n tabIndex = _this$props8.tabIndex,\n form = _this$props8.form;\n\n var _this$getComponents = this.getComponents(),\n Input = _this$getComponents.Input;\n\n var inputIsHidden = this.state.inputIsHidden;\n var commonProps = this.commonProps;\n var id = inputId || this.getElementId('input'); // aria attributes makes the JSX \"noisy\", separated for clarity\n\n var ariaAttributes = {\n 'aria-autocomplete': 'list',\n 'aria-label': this.props['aria-label'],\n 'aria-labelledby': this.props['aria-labelledby']\n };\n\n if (!isSearchable) {\n // use a dummy input to maintain focus/blur functionality\n return /*#__PURE__*/React.createElement(DummyInput, _extends({\n id: id,\n innerRef: this.getInputRef,\n onBlur: this.onInputBlur,\n onChange: noop,\n onFocus: this.onInputFocus,\n readOnly: true,\n disabled: isDisabled,\n tabIndex: tabIndex,\n form: form,\n value: \"\"\n }, ariaAttributes));\n }\n\n return /*#__PURE__*/React.createElement(Input, _extends({}, commonProps, {\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n id: id,\n innerRef: this.getInputRef,\n isDisabled: isDisabled,\n isHidden: inputIsHidden,\n onBlur: this.onInputBlur,\n onChange: this.handleInputChange,\n onFocus: this.onInputFocus,\n spellCheck: \"false\",\n tabIndex: tabIndex,\n form: form,\n type: \"text\",\n value: inputValue\n }, ariaAttributes));\n }\n }, {\n key: \"renderPlaceholderOrValue\",\n value: function renderPlaceholderOrValue() {\n var _this3 = this;\n\n var _this$getComponents2 = this.getComponents(),\n MultiValue = _this$getComponents2.MultiValue,\n MultiValueContainer = _this$getComponents2.MultiValueContainer,\n MultiValueLabel = _this$getComponents2.MultiValueLabel,\n MultiValueRemove = _this$getComponents2.MultiValueRemove,\n SingleValue = _this$getComponents2.SingleValue,\n Placeholder = _this$getComponents2.Placeholder;\n\n var commonProps = this.commonProps;\n var _this$props9 = this.props,\n controlShouldRenderValue = _this$props9.controlShouldRenderValue,\n isDisabled = _this$props9.isDisabled,\n isMulti = _this$props9.isMulti,\n inputValue = _this$props9.inputValue,\n placeholder = _this$props9.placeholder;\n var _this$state4 = this.state,\n selectValue = _this$state4.selectValue,\n focusedValue = _this$state4.focusedValue,\n isFocused = _this$state4.isFocused;\n\n if (!this.hasValue() || !controlShouldRenderValue) {\n return inputValue ? null : /*#__PURE__*/React.createElement(Placeholder, _extends({}, commonProps, {\n key: \"placeholder\",\n isDisabled: isDisabled,\n isFocused: isFocused\n }), placeholder);\n }\n\n if (isMulti) {\n var selectValues = selectValue.map(function (opt, index) {\n var isOptionFocused = opt === focusedValue;\n return /*#__PURE__*/React.createElement(MultiValue, _extends({}, commonProps, {\n components: {\n Container: MultiValueContainer,\n Label: MultiValueLabel,\n Remove: MultiValueRemove\n },\n isFocused: isOptionFocused,\n isDisabled: isDisabled,\n key: \"\".concat(_this3.getOptionValue(opt)).concat(index),\n index: index,\n removeProps: {\n onClick: function onClick() {\n return _this3.removeValue(opt);\n },\n onTouchEnd: function onTouchEnd() {\n return _this3.removeValue(opt);\n },\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n data: opt\n }), _this3.formatOptionLabel(opt, 'value'));\n });\n return selectValues;\n }\n\n if (inputValue) {\n return null;\n }\n\n var singleValue = selectValue[0];\n return /*#__PURE__*/React.createElement(SingleValue, _extends({}, commonProps, {\n data: singleValue,\n isDisabled: isDisabled\n }), this.formatOptionLabel(singleValue, 'value'));\n }\n }, {\n key: \"renderClearIndicator\",\n value: function renderClearIndicator() {\n var _this$getComponents3 = this.getComponents(),\n ClearIndicator = _this$getComponents3.ClearIndicator;\n\n var commonProps = this.commonProps;\n var _this$props10 = this.props,\n isDisabled = _this$props10.isDisabled,\n isLoading = _this$props10.isLoading;\n var isFocused = this.state.isFocused;\n\n if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n return null;\n }\n\n var innerProps = {\n onMouseDown: this.onClearIndicatorMouseDown,\n onTouchEnd: this.onClearIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderLoadingIndicator\",\n value: function renderLoadingIndicator() {\n var _this$getComponents4 = this.getComponents(),\n LoadingIndicator = _this$getComponents4.LoadingIndicator;\n\n var commonProps = this.commonProps;\n var _this$props11 = this.props,\n isDisabled = _this$props11.isDisabled,\n isLoading = _this$props11.isLoading;\n var isFocused = this.state.isFocused;\n if (!LoadingIndicator || !isLoading) return null;\n var innerProps = {\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderIndicatorSeparator\",\n value: function renderIndicatorSeparator() {\n var _this$getComponents5 = this.getComponents(),\n DropdownIndicator = _this$getComponents5.DropdownIndicator,\n IndicatorSeparator = _this$getComponents5.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator\n\n\n if (!DropdownIndicator || !IndicatorSeparator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n return /*#__PURE__*/React.createElement(IndicatorSeparator, _extends({}, commonProps, {\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderDropdownIndicator\",\n value: function renderDropdownIndicator() {\n var _this$getComponents6 = this.getComponents(),\n DropdownIndicator = _this$getComponents6.DropdownIndicator;\n\n if (!DropdownIndicator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n var innerProps = {\n onMouseDown: this.onDropdownIndicatorMouseDown,\n onTouchEnd: this.onDropdownIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(DropdownIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this4 = this;\n\n var _this$getComponents7 = this.getComponents(),\n Group = _this$getComponents7.Group,\n GroupHeading = _this$getComponents7.GroupHeading,\n Menu = _this$getComponents7.Menu,\n MenuList = _this$getComponents7.MenuList,\n MenuPortal = _this$getComponents7.MenuPortal,\n LoadingMessage = _this$getComponents7.LoadingMessage,\n NoOptionsMessage = _this$getComponents7.NoOptionsMessage,\n Option = _this$getComponents7.Option;\n\n var commonProps = this.commonProps;\n var focusedOption = this.state.focusedOption;\n var _this$props12 = this.props,\n captureMenuScroll = _this$props12.captureMenuScroll,\n inputValue = _this$props12.inputValue,\n isLoading = _this$props12.isLoading,\n loadingMessage = _this$props12.loadingMessage,\n minMenuHeight = _this$props12.minMenuHeight,\n maxMenuHeight = _this$props12.maxMenuHeight,\n menuIsOpen = _this$props12.menuIsOpen,\n menuPlacement = _this$props12.menuPlacement,\n menuPosition = _this$props12.menuPosition,\n menuPortalTarget = _this$props12.menuPortalTarget,\n menuShouldBlockScroll = _this$props12.menuShouldBlockScroll,\n menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView,\n noOptionsMessage = _this$props12.noOptionsMessage,\n onMenuScrollToTop = _this$props12.onMenuScrollToTop,\n onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;\n if (!menuIsOpen) return null; // TODO: Internal Option Type here\n\n var render = function render(props, id) {\n var type = props.type,\n data = props.data,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected,\n label = props.label,\n value = props.value;\n var isFocused = focusedOption === data;\n var onHover = isDisabled ? undefined : function () {\n return _this4.onOptionHover(data);\n };\n var onSelect = isDisabled ? undefined : function () {\n return _this4.selectOption(data);\n };\n var optionId = \"\".concat(_this4.getElementId('option'), \"-\").concat(id);\n var innerProps = {\n id: optionId,\n onClick: onSelect,\n onMouseMove: onHover,\n onMouseOver: onHover,\n tabIndex: -1\n };\n return /*#__PURE__*/React.createElement(Option, _extends({}, commonProps, {\n innerProps: innerProps,\n data: data,\n isDisabled: isDisabled,\n isSelected: isSelected,\n key: optionId,\n label: label,\n type: type,\n value: value,\n isFocused: isFocused,\n innerRef: isFocused ? _this4.getFocusedOptionRef : undefined\n }), _this4.formatOptionLabel(props.data, 'menu'));\n };\n\n var menuUI;\n\n if (this.hasOptions()) {\n menuUI = this.getCategorizedOptions().map(function (item) {\n if (item.type === 'group') {\n var data = item.data,\n options = item.options,\n groupIndex = item.index;\n var groupId = \"\".concat(_this4.getElementId('group'), \"-\").concat(groupIndex);\n var headingId = \"\".concat(groupId, \"-heading\");\n return /*#__PURE__*/React.createElement(Group, _extends({}, commonProps, {\n key: groupId,\n data: data,\n options: options,\n Heading: GroupHeading,\n headingProps: {\n id: headingId,\n data: item.data\n },\n label: _this4.formatGroupLabel(item.data)\n }), item.options.map(function (option) {\n return render(option, \"\".concat(groupIndex, \"-\").concat(option.index));\n }));\n } else if (item.type === 'option') {\n return render(item, \"\".concat(item.index));\n }\n });\n } else if (isLoading) {\n var message = loadingMessage({\n inputValue: inputValue\n });\n if (message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(LoadingMessage, commonProps, message);\n } else {\n var _message = noOptionsMessage({\n inputValue: inputValue\n });\n\n if (_message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(NoOptionsMessage, commonProps, _message);\n }\n\n var menuPlacementProps = {\n minMenuHeight: minMenuHeight,\n maxMenuHeight: maxMenuHeight,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition,\n menuShouldScrollIntoView: menuShouldScrollIntoView\n };\n var menuElement = /*#__PURE__*/React.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {\n var ref = _ref4.ref,\n _ref4$placerProps = _ref4.placerProps,\n placement = _ref4$placerProps.placement,\n maxHeight = _ref4$placerProps.maxHeight;\n return /*#__PURE__*/React.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {\n innerRef: ref,\n innerProps: {\n onMouseDown: _this4.onMenuMouseDown,\n onMouseMove: _this4.onMenuMouseMove\n },\n isLoading: isLoading,\n placement: placement\n }), /*#__PURE__*/React.createElement(ScrollManager, {\n captureEnabled: captureMenuScroll,\n onTopArrive: onMenuScrollToTop,\n onBottomArrive: onMenuScrollToBottom,\n lockEnabled: menuShouldBlockScroll\n }, function (scrollTargetRef) {\n return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {\n innerRef: function innerRef(instance) {\n _this4.getMenuListRef(instance);\n\n scrollTargetRef(instance);\n },\n isLoading: isLoading,\n maxHeight: maxHeight,\n focusedOption: focusedOption\n }), menuUI);\n }));\n }); // positioning behaviour is almost identical for portalled and fixed,\n // so we use the same component. the actual portalling logic is forked\n // within the component based on `menuPosition`\n\n return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React.createElement(MenuPortal, _extends({}, commonProps, {\n appendTo: menuPortalTarget,\n controlElement: this.controlRef,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition\n }), menuElement) : menuElement;\n }\n }, {\n key: \"renderFormField\",\n value: function renderFormField() {\n var _this5 = this;\n\n var _this$props13 = this.props,\n delimiter = _this$props13.delimiter,\n isDisabled = _this$props13.isDisabled,\n isMulti = _this$props13.isMulti,\n name = _this$props13.name;\n var selectValue = this.state.selectValue;\n if (!name || isDisabled) return;\n\n if (isMulti) {\n if (delimiter) {\n var value = selectValue.map(function (opt) {\n return _this5.getOptionValue(opt);\n }).join(delimiter);\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: value\n });\n } else {\n var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n return /*#__PURE__*/React.createElement(\"input\", {\n key: \"i-\".concat(i),\n name: name,\n type: \"hidden\",\n value: _this5.getOptionValue(opt)\n });\n }) : /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\"\n });\n return /*#__PURE__*/React.createElement(\"div\", null, input);\n }\n } else {\n var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: _value\n });\n }\n }\n }, {\n key: \"renderLiveRegion\",\n value: function renderLiveRegion() {\n var commonProps = this.commonProps;\n var _this$state5 = this.state,\n ariaSelection = _this$state5.ariaSelection,\n focusedOption = _this$state5.focusedOption,\n focusedValue = _this$state5.focusedValue,\n isFocused = _this$state5.isFocused,\n selectValue = _this$state5.selectValue;\n var focusableOptions = this.getFocusableOptions();\n return /*#__PURE__*/React.createElement(LiveRegion, _extends({}, commonProps, {\n ariaSelection: ariaSelection,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n isFocused: isFocused,\n selectValue: selectValue,\n focusableOptions: focusableOptions\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$getComponents8 = this.getComponents(),\n Control = _this$getComponents8.Control,\n IndicatorsContainer = _this$getComponents8.IndicatorsContainer,\n SelectContainer = _this$getComponents8.SelectContainer,\n ValueContainer = _this$getComponents8.ValueContainer;\n\n var _this$props14 = this.props,\n className = _this$props14.className,\n id = _this$props14.id,\n isDisabled = _this$props14.isDisabled,\n menuIsOpen = _this$props14.menuIsOpen;\n var isFocused = this.state.isFocused;\n var commonProps = this.commonProps = this.getCommonProps();\n return /*#__PURE__*/React.createElement(SelectContainer, _extends({}, commonProps, {\n className: className,\n innerProps: {\n id: id,\n onKeyDown: this.onKeyDown\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }), this.renderLiveRegion(), /*#__PURE__*/React.createElement(Control, _extends({}, commonProps, {\n innerRef: this.getControlRef,\n innerProps: {\n onMouseDown: this.onControlMouseDown,\n onTouchEnd: this.onControlTouchEnd\n },\n isDisabled: isDisabled,\n isFocused: isFocused,\n menuIsOpen: menuIsOpen\n }), /*#__PURE__*/React.createElement(ValueContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React.createElement(IndicatorsContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(props, state) {\n var prevProps = state.prevProps,\n clearFocusValueOnUpdate = state.clearFocusValueOnUpdate,\n inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate;\n var options = props.options,\n value = props.value,\n menuIsOpen = props.menuIsOpen,\n inputValue = props.inputValue;\n var newMenuOptionsState = {};\n\n if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {\n var selectValue = cleanValue(value);\n var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];\n var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;\n var focusedOption = getNextFocusedOption(state, focusableOptions);\n newMenuOptionsState = {\n selectValue: selectValue,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n clearFocusValueOnUpdate: false\n };\n } // some updates should toggle the state of the input visibility\n\n\n var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {\n inputIsHidden: inputIsHiddenAfterUpdate,\n inputIsHiddenAfterUpdate: undefined\n } : {};\n return _objectSpread2(_objectSpread2(_objectSpread2({}, newMenuOptionsState), newInputIsHiddenState), {}, {\n prevProps: props\n });\n }\n }]);\n\n return Select;\n}(Component);\n\nSelect.defaultProps = defaultProps;\nexport { Select as S, getOptionLabel as a, defaultProps as b, createFilter as c, defaultTheme as d, getOptionValue as g, mergeStyles as m };","map":{"version":3,"sources":["/app/node_modules/react-select/dist/Select-dbb12e54.esm.js"],"names":["_extends","a","_objectSpread2","s","supportsPassiveEvents","b","clearIndicatorCSS","d","containerCSS","e","css$1","f","dropdownIndicatorCSS","g","groupCSS","h","groupHeadingCSS","i","indicatorsContainerCSS","j","indicatorSeparatorCSS","k","inputCSS","l","loadingIndicatorCSS","m","loadingMessageCSS","n","menuCSS","o","menuListCSS","p","menuPortalCSS","q","multiValueCSS","r","multiValueLabelCSS","t","multiValueRemoveCSS","u","noOptionsMessageCSS","v","optionCSS","w","placeholderCSS","x","css$2","y","valueContainerCSS","z","isTouchCapable","A","isMobileDevice","_","_createSuper","B","classNames","C","defaultComponents","D","isDocumentElement","E","cleanValue","F","scrollIntoView","G","noop","M","MenuPlacer","_classCallCheck","_createClass","_inherits","_toConsumableArray","React","useMemo","useRef","useCallback","useEffect","Component","jsx","css","memoizeOne","_objectWithoutProperties","_EMOTION_STRINGIFIED_CSS_ERROR__","_ref","process","env","NODE_ENV","name","styles","map","toString","A11yText","props","defaultAriaLiveMessages","guidance","isSearchable","isMulti","isDisabled","tabSelectsValue","context","concat","onChange","action","_props$label","label","onFocus","_props$focused","focused","options","_props$label2","selectValue","isSelected","getArrayIndex","arr","item","length","indexOf","disabled","status","onFilter","inputValue","resultsMessage","LiveRegion","ariaSelection","focusedOption","focusedValue","focusableOptions","isFocused","selectProps","ariaLiveMessages","getOptionLabel","isOptionDisabled","menuIsOpen","screenReaderStatus","ariaLabel","ariaLive","messages","ariaSelected","message","option","removedValue","value","asOption","val","Array","isArray","selected","onChangeProps","ariaFocused","focusMsg","includes","onFocusProps","ariaResults","resultsMsg","count","ariaGuidance","guidanceMsg","ariaContext","Fragment","id","diacritics","base","letters","anyDiacritic","RegExp","join","diacriticToBase","diacritic","stripDiacritics","str","replace","match","memoizedStripDiacriticsForInput","trimString","defaultStringify","createFilter","config","rawInput","_ignoreCase$ignoreAcc","ignoreCase","ignoreAccents","stringify","trim","matchFrom","input","candidate","toLowerCase","substr","DummyInput","in","out","onExited","appear","enter","exit","innerRef","emotion","ref","background","border","fontSize","outline","padding","width","color","left","opacity","position","transform","cancelScroll","event","preventDefault","stopPropagation","useScrollCapture","isEnabled","onBottomArrive","onBottomLeave","onTopArrive","onTopLeave","isBottom","isTop","touchStart","scrollTarget","handleEventDelta","delta","current","_scrollTarget$current","scrollTop","scrollHeight","clientHeight","target","isDeltaPositive","availableScroll","shouldCancelScroll","onWheel","deltaY","onTouchStart","changedTouches","clientY","onTouchMove","startListening","el","notPassive","passive","addEventListener","stopListening","removeEventListener","element","STYLE_KEYS","LOCK_STYLES","boxSizing","overflow","height","preventTouchMove","allowTouchMove","preventInertiaScroll","top","totalScroll","currentScroll","offsetHeight","isTouchDevice","window","navigator","maxTouchPoints","canUseDOM","document","createElement","activeScrollLocks","listenerOptions","capture","useScrollLock","_ref$accountForScroll","accountForScrollbars","originalStyles","addScrollLock","touchScrollTarget","body","targetStyle","style","forEach","key","currentPadding","parseInt","paddingRight","clientWidth","adjustedPadding","innerWidth","Object","keys","removeScrollLock","Math","max","_EMOTION_STRINGIFIED_CSS_ERROR__$1","blurSelectInput","activeElement","blur","_ref2","ScrollManager","children","lockEnabled","_ref$captureEnabled","captureEnabled","setScrollCaptureTarget","setScrollLockTarget","targetRef","onClick","formatGroupLabel","group","getOptionValue","defaultStyles","clearIndicator","container","control","dropdownIndicator","groupHeading","indicatorsContainer","indicatorSeparator","loadingIndicator","loadingMessage","menu","menuList","menuPortal","multiValue","multiValueLabel","multiValueRemove","noOptionsMessage","placeholder","singleValue","valueContainer","mergeStyles","source","arguments","undefined","rsCss","colors","primary","primary75","primary50","primary25","danger","dangerLight","neutral0","neutral5","neutral10","neutral20","neutral30","neutral40","neutral50","neutral60","neutral70","neutral80","neutral90","borderRadius","baseUnit","controlHeight","menuGutter","spacing","defaultTheme","defaultProps","backspaceRemovesValue","blurInputOnSelect","captureMenuScroll","closeMenuOnSelect","closeMenuOnScroll","components","controlShouldRenderValue","escapeClearsValue","filterOption","isLoading","isRtl","maxMenuHeight","minMenuHeight","menuPlacement","menuPosition","menuShouldBlockScroll","menuShouldScrollIntoView","openMenuOnFocus","openMenuOnClick","pageSize","tabIndex","toCategorizedOption","index","_isOptionDisabled","_isOptionSelected","getOptionLabel$1","getOptionValue$1","type","data","buildCategorizedOptions","groupOrOption","groupOrOptionIndex","categorizedOptions","optionIndex","filter","categorizedOption","isFocusable","buildFocusableOptionsFromCategorizedOptions","reduce","optionsAccumulator","push","apply","buildFocusableOptions","_props$inputValue","shouldHideSelectedOptions","_filterOption","getNextFocusedValue","state","nextSelectValue","lastSelectValue","lastFocusedIndex","nextFocusedIndex","getNextFocusedOption","lastFocusedOption","isOptionSelected","some","hideSelectedOptions","instanceId","Select","_Component","_super","_props","_this","call","inputIsHidden","clearFocusValueOnUpdate","inputIsHiddenAfterUpdate","prevProps","blockOptionHover","isComposing","commonProps","initialTouchX","initialTouchY","instancePrefix","openAfterFocus","scrollToFocusedOptionOnUpdate","userIsDragging","controlRef","getControlRef","focusedOptionRef","getFocusedOptionRef","menuListRef","getMenuListRef","inputRef","getInputRef","focus","focusInput","blurInput","newValue","actionMeta","_this$props","ariaOnChange","setValue","_this$props2","onInputChange","setState","onMenuClose","selectOption","_this$props3","deselected","removeValue","newValueArray","clearValue","removedValues","popValue","lastSelectedValue","slice","getValue","cx","_len","args","_key","classNamePrefix","getStyles","custom","getElementId","getComponents","getCategorizedOptions","getFocusableOptions","onMenuMouseDown","button","onMenuMouseMove","onControlMouseDown","openMenu","tagName","onDropdownIndicatorMouseDown","_this$props4","onClearIndicatorMouseDown","setTimeout","onScroll","HTMLElement","onCompositionStart","onCompositionEnd","touches","touch","clientX","_ref3","deltaX","abs","moveThreshold","onTouchEnd","contains","onControlTouchEnd","onClearIndicatorTouchEnd","onDropdownIndicatorTouchEnd","handleInputChange","currentTarget","onMenuOpen","onInputFocus","onInputBlur","onBlur","onOptionHover","onKeyDown","_this$props5","isClearable","_this$state","defaultPrevented","focusValue","shiftKey","keyCode","focusOption","componentDidMount","startListeningComposition","startListeningToTouch","autoFocus","componentDidUpdate","_this$props6","componentWillUnmount","stopListeningComposition","stopListeningToTouch","_this2","_this$state2","openAtIndex","selectedIndex","direction","_this$state3","focusedIndex","lastIndex","nextFocus","getTheme","theme","getCommonProps","hasValue","hasOptions","_this$props7","formatOptionLabel","renderInput","_this$props8","inputId","form","_this$getComponents","Input","ariaAttributes","readOnly","autoCapitalize","autoComplete","autoCorrect","isHidden","spellCheck","renderPlaceholderOrValue","_this3","_this$getComponents2","MultiValue","MultiValueContainer","MultiValueLabel","MultiValueRemove","SingleValue","Placeholder","_this$props9","_this$state4","selectValues","opt","isOptionFocused","Container","Label","Remove","removeProps","onMouseDown","renderClearIndicator","_this$getComponents3","ClearIndicator","_this$props10","innerProps","renderLoadingIndicator","_this$getComponents4","LoadingIndicator","_this$props11","renderIndicatorSeparator","_this$getComponents5","DropdownIndicator","IndicatorSeparator","renderDropdownIndicator","_this$getComponents6","renderMenu","_this4","_this$getComponents7","Group","GroupHeading","Menu","MenuList","MenuPortal","LoadingMessage","NoOptionsMessage","Option","_this$props12","menuPortalTarget","onMenuScrollToTop","onMenuScrollToBottom","render","onHover","onSelect","optionId","onMouseMove","onMouseOver","menuUI","groupIndex","groupId","headingId","Heading","headingProps","_message","menuPlacementProps","menuElement","_ref4","_ref4$placerProps","placerProps","placement","maxHeight","scrollTargetRef","instance","appendTo","controlElement","renderFormField","_this5","_this$props13","delimiter","_value","renderLiveRegion","_this$state5","_this$getComponents8","Control","IndicatorsContainer","SelectContainer","ValueContainer","_this$props14","className","getDerivedStateFromProps","newMenuOptionsState","newInputIsHiddenState","S","c"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,SAASC,CAAC,IAAIC,cAAd,EAA8BC,CAAC,IAAIC,qBAAnC,EAA0DC,CAAC,IAAIC,iBAA/D,EAAkFC,CAAC,IAAIC,YAAvF,EAAqGC,CAAC,IAAIC,KAA1G,EAAiHC,CAAC,IAAIC,oBAAtH,EAA4IC,CAAC,IAAIC,QAAjJ,EAA2JC,CAAC,IAAIC,eAAhK,EAAiLC,CAAC,IAAIC,sBAAtL,EAA8MC,CAAC,IAAIC,qBAAnN,EAA0OC,CAAC,IAAIC,QA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AAhF;AACA,YAAIe,YAAY,GAAG2S,uBAAuB,GAAGnB,mBAAmB,CAACC,KAAD,EAAQxS,WAAR,CAAtB,GAA6C,IAAvF;AACA,YAAIc,aAAa,GAAG+R,oBAAoB,CAACL,KAAD,EAAQxR,gBAAR,CAAxC;AACAwgB,QAAAA,mBAAmB,GAAG;AACpBxhB,UAAAA,WAAW,EAAEA,WADO;AAEpBc,UAAAA,aAAa,EAAEA,aAFK;AAGpBC,UAAAA,YAAY,EAAEA,YAHM;AAIpB2S,UAAAA,uBAAuB,EAAE;AAJL,SAAtB;AAMD,OArBoD,CAqBnD;;;AAGF,UAAI+N,qBAAqB,GAAG9N,wBAAwB,IAAI,IAA5B,IAAoC7U,KAAK,KAAK8U,SAA9C,GAA0D;AACpFH,QAAAA,aAAa,EAAEE,wBADqE;AAEpFA,QAAAA,wBAAwB,EAAE7F;AAF0D,OAA1D,GAGxB,EAHJ;AAIA,aAAO3U,cAAc,CAACA,cAAc,CAACA,cAAc,CAAC,EAAD,EAAKqoB,mBAAL,CAAf,EAA0CC,qBAA1C,CAAf,EAAiF,EAAjF,EAAqF;AACxG7N,QAAAA,SAAS,EAAE9U;AAD6F,OAArF,CAArB;AAGD;AAjCE,GAAD,CAr0BQ,CAAZ;;AAy2BA,SAAOqU,MAAP;AACD,CArgDyB,CAqgDxBpV,SArgDwB,CAA1B;;AAugDAoV,MAAM,CAAC3D,YAAP,GAAsBA,YAAtB;AAEA,SAAS2D,MAAM,IAAIuO,CAAnB,EAAsBtgB,cAAc,IAAIlI,CAAxC,EAA2CsW,YAAY,IAAIlW,CAA3D,EAA8D2K,YAAY,IAAI0d,CAA9E,EAAiFpS,YAAY,IAAI/V,CAAjG,EAAoG8S,cAAc,IAAIxS,CAAtH,EAAyH6T,WAAW,IAAIjT,CAAxI","sourcesContent":["import _extends from '@babel/runtime/helpers/esm/extends';\nimport { a as _objectSpread2, s as supportsPassiveEvents, b as clearIndicatorCSS, d as containerCSS, e as css$1, f as dropdownIndicatorCSS, g as groupCSS, h as groupHeadingCSS, i as indicatorsContainerCSS, j as indicatorSeparatorCSS, k as inputCSS, l as loadingIndicatorCSS, m as loadingMessageCSS, n as menuCSS, o as menuListCSS, p as menuPortalCSS, q as multiValueCSS, r as multiValueLabelCSS, t as multiValueRemoveCSS, u as noOptionsMessageCSS, v as optionCSS, w as placeholderCSS, x as css$2, y as valueContainerCSS, z as isTouchCapable, A as isMobileDevice, _ as _createSuper, B as classNames, C as defaultComponents, D as isDocumentElement, E as cleanValue, F as scrollIntoView, G as noop, M as MenuPlacer } from './index-4bd03571.esm.js';\nimport _classCallCheck from '@babel/runtime/helpers/esm/classCallCheck';\nimport _createClass from '@babel/runtime/helpers/esm/createClass';\nimport _inherits from '@babel/runtime/helpers/esm/inherits';\nimport _toConsumableArray from '@babel/runtime/helpers/esm/toConsumableArray';\nimport React, { useMemo, useRef, useCallback, useEffect, Component } from 'react';\nimport { jsx, css } from '@emotion/react';\nimport memoizeOne from 'memoize-one';\nimport _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n\nvar _ref = process.env.NODE_ENV === \"production\" ? {\n name: \"7pg0cj-a11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap\"\n} : {\n name: \"1f43avz-a11yText-A11yText\",\n styles: \"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVFJIiwiZmlsZSI6IkExMXlUZXh0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQGZsb3dcbi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgdHlwZSBFbGVtZW50Q29uZmlnIH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuXG4vLyBBc3Npc3RpdmUgdGV4dCB0byBkZXNjcmliZSB2aXN1YWwgZWxlbWVudHMuIEhpZGRlbiBmb3Igc2lnaHRlZCB1c2Vycy5cbmNvbnN0IEExMXlUZXh0ID0gKHByb3BzOiBFbGVtZW50Q29uZmlnPCdzcGFuJz4pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__\n};\n\nvar A11yText = function A11yText(props) {\n return jsx(\"span\", _extends({\n css: _ref\n }, props));\n};\n\nvar defaultAriaLiveMessages = {\n guidance: function guidance(props) {\n var isSearchable = props.isSearchable,\n isMulti = props.isMulti,\n isDisabled = props.isDisabled,\n tabSelectsValue = props.tabSelectsValue,\n context = props.context;\n\n switch (context) {\n case 'menu':\n return \"Use Up and Down to choose options\".concat(isDisabled ? '' : ', press Enter to select the currently focused option', \", press Escape to exit the menu\").concat(tabSelectsValue ? ', press Tab to select the option and exit the menu' : '', \".\");\n\n case 'input':\n return \"\".concat(props['aria-label'] || 'Select', \" is focused \").concat(isSearchable ? ',type to refine list' : '', \", press Down to open the menu, \").concat(isMulti ? ' press left to focus selected values' : '');\n\n case 'value':\n return 'Use left and right to toggle between focused values, press Backspace to remove the currently focused value';\n\n default:\n return '';\n }\n },\n onChange: function onChange(props) {\n var action = props.action,\n _props$label = props.label,\n label = _props$label === void 0 ? '' : _props$label,\n isDisabled = props.isDisabled;\n\n switch (action) {\n case 'deselect-option':\n case 'pop-value':\n case 'remove-value':\n return \"option \".concat(label, \", deselected.\");\n\n case 'select-option':\n return isDisabled ? \"option \".concat(label, \" is disabled. Select another option.\") : \"option \".concat(label, \", selected.\");\n\n default:\n return '';\n }\n },\n onFocus: function onFocus(props) {\n var context = props.context,\n _props$focused = props.focused,\n focused = _props$focused === void 0 ? {} : _props$focused,\n options = props.options,\n _props$label2 = props.label,\n label = _props$label2 === void 0 ? '' : _props$label2,\n selectValue = props.selectValue,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected;\n\n var getArrayIndex = function getArrayIndex(arr, item) {\n return arr && arr.length ? \"\".concat(arr.indexOf(item) + 1, \" of \").concat(arr.length) : '';\n };\n\n if (context === 'value' && selectValue) {\n return \"value \".concat(label, \" focused, \").concat(getArrayIndex(selectValue, focused), \".\");\n }\n\n if (context === 'menu') {\n var disabled = isDisabled ? ' disabled' : '';\n var status = \"\".concat(isSelected ? 'selected' : 'focused').concat(disabled);\n return \"option \".concat(label, \" \").concat(status, \", \").concat(getArrayIndex(options, focused), \".\");\n }\n\n return '';\n },\n onFilter: function onFilter(props) {\n var inputValue = props.inputValue,\n resultsMessage = props.resultsMessage;\n return \"\".concat(resultsMessage).concat(inputValue ? ' for search term ' + inputValue : '', \".\");\n }\n};\n\nvar LiveRegion = function LiveRegion(props) {\n var ariaSelection = props.ariaSelection,\n focusedOption = props.focusedOption,\n focusedValue = props.focusedValue,\n focusableOptions = props.focusableOptions,\n isFocused = props.isFocused,\n selectValue = props.selectValue,\n selectProps = props.selectProps;\n var ariaLiveMessages = selectProps.ariaLiveMessages,\n getOptionLabel = selectProps.getOptionLabel,\n inputValue = selectProps.inputValue,\n isMulti = selectProps.isMulti,\n isOptionDisabled = selectProps.isOptionDisabled,\n isSearchable = selectProps.isSearchable,\n menuIsOpen = selectProps.menuIsOpen,\n options = selectProps.options,\n screenReaderStatus = selectProps.screenReaderStatus,\n tabSelectsValue = selectProps.tabSelectsValue;\n var ariaLabel = selectProps['aria-label'];\n var ariaLive = selectProps['aria-live']; // Update aria live message configuration when prop changes\n\n var messages = useMemo(function () {\n return _objectSpread2(_objectSpread2({}, defaultAriaLiveMessages), ariaLiveMessages || {});\n }, [ariaLiveMessages]); // Update aria live selected option when prop changes\n\n var ariaSelected = useMemo(function () {\n var message = '';\n\n if (ariaSelection && messages.onChange) {\n var option = ariaSelection.option,\n removedValue = ariaSelection.removedValue,\n value = ariaSelection.value; // select-option when !isMulti does not return option so we assume selected option is value\n\n var asOption = function asOption(val) {\n return !Array.isArray(val) ? val : null;\n };\n\n var selected = removedValue || option || asOption(value);\n\n var onChangeProps = _objectSpread2({\n isDisabled: selected && isOptionDisabled(selected),\n label: selected ? getOptionLabel(selected) : ''\n }, ariaSelection);\n\n message = messages.onChange(onChangeProps);\n }\n\n return message;\n }, [ariaSelection, isOptionDisabled, getOptionLabel, messages]);\n var ariaFocused = useMemo(function () {\n var focusMsg = '';\n var focused = focusedOption || focusedValue;\n var isSelected = !!(focusedOption && selectValue && selectValue.includes(focusedOption));\n\n if (focused && messages.onFocus) {\n var onFocusProps = {\n focused: focused,\n label: getOptionLabel(focused),\n isDisabled: isOptionDisabled(focused),\n isSelected: isSelected,\n options: options,\n context: focused === focusedOption ? 'menu' : 'value',\n selectValue: selectValue\n };\n focusMsg = messages.onFocus(onFocusProps);\n }\n\n return focusMsg;\n }, [focusedOption, focusedValue, getOptionLabel, isOptionDisabled, messages, options, selectValue]);\n var ariaResults = useMemo(function () {\n var resultsMsg = '';\n\n if (menuIsOpen && options.length && messages.onFilter) {\n var resultsMessage = screenReaderStatus({\n count: focusableOptions.length\n });\n resultsMsg = messages.onFilter({\n inputValue: inputValue,\n resultsMessage: resultsMessage\n });\n }\n\n return resultsMsg;\n }, [focusableOptions, inputValue, menuIsOpen, messages, options, screenReaderStatus]);\n var ariaGuidance = useMemo(function () {\n var guidanceMsg = '';\n\n if (messages.guidance) {\n var context = focusedValue ? 'value' : menuIsOpen ? 'menu' : 'input';\n guidanceMsg = messages.guidance({\n 'aria-label': ariaLabel,\n context: context,\n isDisabled: focusedOption && isOptionDisabled(focusedOption),\n isMulti: isMulti,\n isSearchable: isSearchable,\n tabSelectsValue: tabSelectsValue\n });\n }\n\n return guidanceMsg;\n }, [ariaLabel, focusedOption, focusedValue, isMulti, isOptionDisabled, isSearchable, menuIsOpen, messages, tabSelectsValue]);\n var ariaContext = \"\".concat(ariaFocused, \" \").concat(ariaResults, \" \").concat(ariaGuidance);\n return jsx(A11yText, {\n \"aria-live\": ariaLive,\n \"aria-atomic\": \"false\",\n \"aria-relevant\": \"additions text\"\n }, isFocused && jsx(React.Fragment, null, jsx(\"span\", {\n id: \"aria-selection\"\n }, ariaSelected), jsx(\"span\", {\n id: \"aria-context\"\n }, ariaContext)));\n};\n\nvar diacritics = [{\n base: 'A',\n letters: \"A\\u24B6\\uFF21\\xC0\\xC1\\xC2\\u1EA6\\u1EA4\\u1EAA\\u1EA8\\xC3\\u0100\\u0102\\u1EB0\\u1EAE\\u1EB4\\u1EB2\\u0226\\u01E0\\xC4\\u01DE\\u1EA2\\xC5\\u01FA\\u01CD\\u0200\\u0202\\u1EA0\\u1EAC\\u1EB6\\u1E00\\u0104\\u023A\\u2C6F\"\n}, {\n base: 'AA',\n letters: \"\\uA732\"\n}, {\n base: 'AE',\n letters: \"\\xC6\\u01FC\\u01E2\"\n}, {\n base: 'AO',\n letters: \"\\uA734\"\n}, {\n base: 'AU',\n letters: \"\\uA736\"\n}, {\n base: 'AV',\n letters: \"\\uA738\\uA73A\"\n}, {\n base: 'AY',\n letters: \"\\uA73C\"\n}, {\n base: 'B',\n letters: \"B\\u24B7\\uFF22\\u1E02\\u1E04\\u1E06\\u0243\\u0182\\u0181\"\n}, {\n base: 'C',\n letters: \"C\\u24B8\\uFF23\\u0106\\u0108\\u010A\\u010C\\xC7\\u1E08\\u0187\\u023B\\uA73E\"\n}, {\n base: 'D',\n letters: \"D\\u24B9\\uFF24\\u1E0A\\u010E\\u1E0C\\u1E10\\u1E12\\u1E0E\\u0110\\u018B\\u018A\\u0189\\uA779\"\n}, {\n base: 'DZ',\n letters: \"\\u01F1\\u01C4\"\n}, {\n base: 'Dz',\n letters: \"\\u01F2\\u01C5\"\n}, {\n base: 'E',\n letters: \"E\\u24BA\\uFF25\\xC8\\xC9\\xCA\\u1EC0\\u1EBE\\u1EC4\\u1EC2\\u1EBC\\u0112\\u1E14\\u1E16\\u0114\\u0116\\xCB\\u1EBA\\u011A\\u0204\\u0206\\u1EB8\\u1EC6\\u0228\\u1E1C\\u0118\\u1E18\\u1E1A\\u0190\\u018E\"\n}, {\n base: 'F',\n letters: \"F\\u24BB\\uFF26\\u1E1E\\u0191\\uA77B\"\n}, {\n base: 'G',\n letters: \"G\\u24BC\\uFF27\\u01F4\\u011C\\u1E20\\u011E\\u0120\\u01E6\\u0122\\u01E4\\u0193\\uA7A0\\uA77D\\uA77E\"\n}, {\n base: 'H',\n letters: \"H\\u24BD\\uFF28\\u0124\\u1E22\\u1E26\\u021E\\u1E24\\u1E28\\u1E2A\\u0126\\u2C67\\u2C75\\uA78D\"\n}, {\n base: 'I',\n letters: \"I\\u24BE\\uFF29\\xCC\\xCD\\xCE\\u0128\\u012A\\u012C\\u0130\\xCF\\u1E2E\\u1EC8\\u01CF\\u0208\\u020A\\u1ECA\\u012E\\u1E2C\\u0197\"\n}, {\n base: 'J',\n letters: \"J\\u24BF\\uFF2A\\u0134\\u0248\"\n}, {\n base: 'K',\n letters: \"K\\u24C0\\uFF2B\\u1E30\\u01E8\\u1E32\\u0136\\u1E34\\u0198\\u2C69\\uA740\\uA742\\uA744\\uA7A2\"\n}, {\n base: 'L',\n letters: \"L\\u24C1\\uFF2C\\u013F\\u0139\\u013D\\u1E36\\u1E38\\u013B\\u1E3C\\u1E3A\\u0141\\u023D\\u2C62\\u2C60\\uA748\\uA746\\uA780\"\n}, {\n base: 'LJ',\n letters: \"\\u01C7\"\n}, {\n base: 'Lj',\n letters: \"\\u01C8\"\n}, {\n base: 'M',\n letters: \"M\\u24C2\\uFF2D\\u1E3E\\u1E40\\u1E42\\u2C6E\\u019C\"\n}, {\n base: 'N',\n letters: \"N\\u24C3\\uFF2E\\u01F8\\u0143\\xD1\\u1E44\\u0147\\u1E46\\u0145\\u1E4A\\u1E48\\u0220\\u019D\\uA790\\uA7A4\"\n}, {\n base: 'NJ',\n letters: \"\\u01CA\"\n}, {\n base: 'Nj',\n letters: \"\\u01CB\"\n}, {\n base: 'O',\n letters: \"O\\u24C4\\uFF2F\\xD2\\xD3\\xD4\\u1ED2\\u1ED0\\u1ED6\\u1ED4\\xD5\\u1E4C\\u022C\\u1E4E\\u014C\\u1E50\\u1E52\\u014E\\u022E\\u0230\\xD6\\u022A\\u1ECE\\u0150\\u01D1\\u020C\\u020E\\u01A0\\u1EDC\\u1EDA\\u1EE0\\u1EDE\\u1EE2\\u1ECC\\u1ED8\\u01EA\\u01EC\\xD8\\u01FE\\u0186\\u019F\\uA74A\\uA74C\"\n}, {\n base: 'OI',\n letters: \"\\u01A2\"\n}, {\n base: 'OO',\n letters: \"\\uA74E\"\n}, {\n base: 'OU',\n letters: \"\\u0222\"\n}, {\n base: 'P',\n letters: \"P\\u24C5\\uFF30\\u1E54\\u1E56\\u01A4\\u2C63\\uA750\\uA752\\uA754\"\n}, {\n base: 'Q',\n letters: \"Q\\u24C6\\uFF31\\uA756\\uA758\\u024A\"\n}, {\n base: 'R',\n letters: \"R\\u24C7\\uFF32\\u0154\\u1E58\\u0158\\u0210\\u0212\\u1E5A\\u1E5C\\u0156\\u1E5E\\u024C\\u2C64\\uA75A\\uA7A6\\uA782\"\n}, {\n base: 'S',\n letters: \"S\\u24C8\\uFF33\\u1E9E\\u015A\\u1E64\\u015C\\u1E60\\u0160\\u1E66\\u1E62\\u1E68\\u0218\\u015E\\u2C7E\\uA7A8\\uA784\"\n}, {\n base: 'T',\n letters: \"T\\u24C9\\uFF34\\u1E6A\\u0164\\u1E6C\\u021A\\u0162\\u1E70\\u1E6E\\u0166\\u01AC\\u01AE\\u023E\\uA786\"\n}, {\n base: 'TZ',\n letters: \"\\uA728\"\n}, {\n base: 'U',\n letters: \"U\\u24CA\\uFF35\\xD9\\xDA\\xDB\\u0168\\u1E78\\u016A\\u1E7A\\u016C\\xDC\\u01DB\\u01D7\\u01D5\\u01D9\\u1EE6\\u016E\\u0170\\u01D3\\u0214\\u0216\\u01AF\\u1EEA\\u1EE8\\u1EEE\\u1EEC\\u1EF0\\u1EE4\\u1E72\\u0172\\u1E76\\u1E74\\u0244\"\n}, {\n base: 'V',\n letters: \"V\\u24CB\\uFF36\\u1E7C\\u1E7E\\u01B2\\uA75E\\u0245\"\n}, {\n base: 'VY',\n letters: \"\\uA760\"\n}, {\n base: 'W',\n letters: \"W\\u24CC\\uFF37\\u1E80\\u1E82\\u0174\\u1E86\\u1E84\\u1E88\\u2C72\"\n}, {\n base: 'X',\n letters: \"X\\u24CD\\uFF38\\u1E8A\\u1E8C\"\n}, {\n base: 'Y',\n letters: \"Y\\u24CE\\uFF39\\u1EF2\\xDD\\u0176\\u1EF8\\u0232\\u1E8E\\u0178\\u1EF6\\u1EF4\\u01B3\\u024E\\u1EFE\"\n}, {\n base: 'Z',\n letters: \"Z\\u24CF\\uFF3A\\u0179\\u1E90\\u017B\\u017D\\u1E92\\u1E94\\u01B5\\u0224\\u2C7F\\u2C6B\\uA762\"\n}, {\n base: 'a',\n letters: \"a\\u24D0\\uFF41\\u1E9A\\xE0\\xE1\\xE2\\u1EA7\\u1EA5\\u1EAB\\u1EA9\\xE3\\u0101\\u0103\\u1EB1\\u1EAF\\u1EB5\\u1EB3\\u0227\\u01E1\\xE4\\u01DF\\u1EA3\\xE5\\u01FB\\u01CE\\u0201\\u0203\\u1EA1\\u1EAD\\u1EB7\\u1E01\\u0105\\u2C65\\u0250\"\n}, {\n base: 'aa',\n letters: \"\\uA733\"\n}, {\n base: 'ae',\n letters: \"\\xE6\\u01FD\\u01E3\"\n}, {\n base: 'ao',\n letters: \"\\uA735\"\n}, {\n base: 'au',\n letters: \"\\uA737\"\n}, {\n base: 'av',\n letters: \"\\uA739\\uA73B\"\n}, {\n base: 'ay',\n letters: \"\\uA73D\"\n}, {\n base: 'b',\n letters: \"b\\u24D1\\uFF42\\u1E03\\u1E05\\u1E07\\u0180\\u0183\\u0253\"\n}, {\n base: 'c',\n letters: \"c\\u24D2\\uFF43\\u0107\\u0109\\u010B\\u010D\\xE7\\u1E09\\u0188\\u023C\\uA73F\\u2184\"\n}, {\n base: 'd',\n letters: \"d\\u24D3\\uFF44\\u1E0B\\u010F\\u1E0D\\u1E11\\u1E13\\u1E0F\\u0111\\u018C\\u0256\\u0257\\uA77A\"\n}, {\n base: 'dz',\n letters: \"\\u01F3\\u01C6\"\n}, {\n base: 'e',\n letters: \"e\\u24D4\\uFF45\\xE8\\xE9\\xEA\\u1EC1\\u1EBF\\u1EC5\\u1EC3\\u1EBD\\u0113\\u1E15\\u1E17\\u0115\\u0117\\xEB\\u1EBB\\u011B\\u0205\\u0207\\u1EB9\\u1EC7\\u0229\\u1E1D\\u0119\\u1E19\\u1E1B\\u0247\\u025B\\u01DD\"\n}, {\n base: 'f',\n letters: \"f\\u24D5\\uFF46\\u1E1F\\u0192\\uA77C\"\n}, {\n base: 'g',\n letters: \"g\\u24D6\\uFF47\\u01F5\\u011D\\u1E21\\u011F\\u0121\\u01E7\\u0123\\u01E5\\u0260\\uA7A1\\u1D79\\uA77F\"\n}, {\n base: 'h',\n letters: \"h\\u24D7\\uFF48\\u0125\\u1E23\\u1E27\\u021F\\u1E25\\u1E29\\u1E2B\\u1E96\\u0127\\u2C68\\u2C76\\u0265\"\n}, {\n base: 'hv',\n letters: \"\\u0195\"\n}, {\n base: 'i',\n letters: \"i\\u24D8\\uFF49\\xEC\\xED\\xEE\\u0129\\u012B\\u012D\\xEF\\u1E2F\\u1EC9\\u01D0\\u0209\\u020B\\u1ECB\\u012F\\u1E2D\\u0268\\u0131\"\n}, {\n base: 'j',\n letters: \"j\\u24D9\\uFF4A\\u0135\\u01F0\\u0249\"\n}, {\n base: 'k',\n letters: \"k\\u24DA\\uFF4B\\u1E31\\u01E9\\u1E33\\u0137\\u1E35\\u0199\\u2C6A\\uA741\\uA743\\uA745\\uA7A3\"\n}, {\n base: 'l',\n letters: \"l\\u24DB\\uFF4C\\u0140\\u013A\\u013E\\u1E37\\u1E39\\u013C\\u1E3D\\u1E3B\\u017F\\u0142\\u019A\\u026B\\u2C61\\uA749\\uA781\\uA747\"\n}, {\n base: 'lj',\n letters: \"\\u01C9\"\n}, {\n base: 'm',\n letters: \"m\\u24DC\\uFF4D\\u1E3F\\u1E41\\u1E43\\u0271\\u026F\"\n}, {\n base: 'n',\n letters: \"n\\u24DD\\uFF4E\\u01F9\\u0144\\xF1\\u1E45\\u0148\\u1E47\\u0146\\u1E4B\\u1E49\\u019E\\u0272\\u0149\\uA791\\uA7A5\"\n}, {\n base: 'nj',\n letters: \"\\u01CC\"\n}, {\n base: 'o',\n letters: \"o\\u24DE\\uFF4F\\xF2\\xF3\\xF4\\u1ED3\\u1ED1\\u1ED7\\u1ED5\\xF5\\u1E4D\\u022D\\u1E4F\\u014D\\u1E51\\u1E53\\u014F\\u022F\\u0231\\xF6\\u022B\\u1ECF\\u0151\\u01D2\\u020D\\u020F\\u01A1\\u1EDD\\u1EDB\\u1EE1\\u1EDF\\u1EE3\\u1ECD\\u1ED9\\u01EB\\u01ED\\xF8\\u01FF\\u0254\\uA74B\\uA74D\\u0275\"\n}, {\n base: 'oi',\n letters: \"\\u01A3\"\n}, {\n base: 'ou',\n letters: \"\\u0223\"\n}, {\n base: 'oo',\n letters: \"\\uA74F\"\n}, {\n base: 'p',\n letters: \"p\\u24DF\\uFF50\\u1E55\\u1E57\\u01A5\\u1D7D\\uA751\\uA753\\uA755\"\n}, {\n base: 'q',\n letters: \"q\\u24E0\\uFF51\\u024B\\uA757\\uA759\"\n}, {\n base: 'r',\n letters: \"r\\u24E1\\uFF52\\u0155\\u1E59\\u0159\\u0211\\u0213\\u1E5B\\u1E5D\\u0157\\u1E5F\\u024D\\u027D\\uA75B\\uA7A7\\uA783\"\n}, {\n base: 's',\n letters: \"s\\u24E2\\uFF53\\xDF\\u015B\\u1E65\\u015D\\u1E61\\u0161\\u1E67\\u1E63\\u1E69\\u0219\\u015F\\u023F\\uA7A9\\uA785\\u1E9B\"\n}, {\n base: 't',\n letters: \"t\\u24E3\\uFF54\\u1E6B\\u1E97\\u0165\\u1E6D\\u021B\\u0163\\u1E71\\u1E6F\\u0167\\u01AD\\u0288\\u2C66\\uA787\"\n}, {\n base: 'tz',\n letters: \"\\uA729\"\n}, {\n base: 'u',\n letters: \"u\\u24E4\\uFF55\\xF9\\xFA\\xFB\\u0169\\u1E79\\u016B\\u1E7B\\u016D\\xFC\\u01DC\\u01D8\\u01D6\\u01DA\\u1EE7\\u016F\\u0171\\u01D4\\u0215\\u0217\\u01B0\\u1EEB\\u1EE9\\u1EEF\\u1EED\\u1EF1\\u1EE5\\u1E73\\u0173\\u1E77\\u1E75\\u0289\"\n}, {\n base: 'v',\n letters: \"v\\u24E5\\uFF56\\u1E7D\\u1E7F\\u028B\\uA75F\\u028C\"\n}, {\n base: 'vy',\n letters: \"\\uA761\"\n}, {\n base: 'w',\n letters: \"w\\u24E6\\uFF57\\u1E81\\u1E83\\u0175\\u1E87\\u1E85\\u1E98\\u1E89\\u2C73\"\n}, {\n base: 'x',\n letters: \"x\\u24E7\\uFF58\\u1E8B\\u1E8D\"\n}, {\n base: 'y',\n letters: \"y\\u24E8\\uFF59\\u1EF3\\xFD\\u0177\\u1EF9\\u0233\\u1E8F\\xFF\\u1EF7\\u1E99\\u1EF5\\u01B4\\u024F\\u1EFF\"\n}, {\n base: 'z',\n letters: \"z\\u24E9\\uFF5A\\u017A\\u1E91\\u017C\\u017E\\u1E93\\u1E95\\u01B6\\u0225\\u0240\\u2C6C\\uA763\"\n}];\nvar anyDiacritic = new RegExp('[' + diacritics.map(function (d) {\n return d.letters;\n}).join('') + ']', 'g');\nvar diacriticToBase = {};\n\nfor (var i = 0; i < diacritics.length; i++) {\n var diacritic = diacritics[i];\n\n for (var j = 0; j < diacritic.letters.length; j++) {\n diacriticToBase[diacritic.letters[j]] = diacritic.base;\n }\n}\n\nvar stripDiacritics = function stripDiacritics(str) {\n return str.replace(anyDiacritic, function (match) {\n return diacriticToBase[match];\n });\n};\n\nvar memoizedStripDiacriticsForInput = memoizeOne(stripDiacritics);\n\nvar trimString = function trimString(str) {\n return str.replace(/^\\s+|\\s+$/g, '');\n};\n\nvar defaultStringify = function defaultStringify(option) {\n return \"\".concat(option.label, \" \").concat(option.value);\n};\n\nvar createFilter = function createFilter(config) {\n return function (option, rawInput) {\n var _ignoreCase$ignoreAcc = _objectSpread2({\n ignoreCase: true,\n ignoreAccents: true,\n stringify: defaultStringify,\n trim: true,\n matchFrom: 'any'\n }, config),\n ignoreCase = _ignoreCase$ignoreAcc.ignoreCase,\n ignoreAccents = _ignoreCase$ignoreAcc.ignoreAccents,\n stringify = _ignoreCase$ignoreAcc.stringify,\n trim = _ignoreCase$ignoreAcc.trim,\n matchFrom = _ignoreCase$ignoreAcc.matchFrom;\n\n var input = trim ? trimString(rawInput) : rawInput;\n var candidate = trim ? trimString(stringify(option)) : stringify(option);\n\n if (ignoreCase) {\n input = input.toLowerCase();\n candidate = candidate.toLowerCase();\n }\n\n if (ignoreAccents) {\n input = memoizedStripDiacriticsForInput(input);\n candidate = stripDiacritics(candidate);\n }\n\n return matchFrom === 'start' ? candidate.substr(0, input.length) === input : candidate.indexOf(input) > -1;\n };\n};\n\nfunction DummyInput(_ref) {\n _ref.in;\n _ref.out;\n _ref.onExited;\n _ref.appear;\n _ref.enter;\n _ref.exit;\n var innerRef = _ref.innerRef;\n _ref.emotion;\n var props = _objectWithoutProperties(_ref, [\"in\", \"out\", \"onExited\", \"appear\", \"enter\", \"exit\", \"innerRef\", \"emotion\"]);\n\n return jsx(\"input\", _extends({\n ref: innerRef\n }, props, {\n css: /*#__PURE__*/css({\n label: 'dummyInput',\n // get rid of any default styles\n background: 0,\n border: 0,\n fontSize: 'inherit',\n outline: 0,\n padding: 0,\n // important! without `width` browsers won't allow focus\n width: 1,\n // remove cursor on desktop\n color: 'transparent',\n // remove cursor on mobile whilst maintaining \"scroll into view\" behaviour\n left: -100,\n opacity: 0,\n position: 'relative',\n transform: 'scale(0)'\n }, process.env.NODE_ENV === \"production\" ? \"\" : \";label:DummyInput;\", process.env.NODE_ENV === \"production\" ? \"\" : \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBbUJNIiwiZmlsZSI6IkR1bW15SW5wdXQuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmV4cG9ydCBkZWZhdWx0IGZ1bmN0aW9uIER1bW15SW5wdXQoe1xuICBpbjogaW5Qcm9wLFxuICBvdXQsXG4gIG9uRXhpdGVkLFxuICBhcHBlYXIsXG4gIGVudGVyLFxuICBleGl0LFxuICBpbm5lclJlZixcbiAgZW1vdGlvbixcbiAgLi4ucHJvcHNcbn06IGFueSkge1xuICByZXR1cm4gKFxuICAgIDxpbnB1dFxuICAgICAgcmVmPXtpbm5lclJlZn1cbiAgICAgIHsuLi5wcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSgwKScsXG4gICAgICB9fVxuICAgIC8+XG4gICk7XG59XG4iXX0= */\")\n }));\n}\n\nvar cancelScroll = function cancelScroll(event) {\n event.preventDefault();\n event.stopPropagation();\n};\n\nfunction useScrollCapture(_ref) {\n var isEnabled = _ref.isEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var isBottom = useRef(false);\n var isTop = useRef(false);\n var touchStart = useRef(0);\n var scrollTarget = useRef(null);\n var handleEventDelta = useCallback(function (event, delta) {\n // Reference should never be `null` at this point, but flow complains otherwise\n if (scrollTarget.current === null) return;\n var _scrollTarget$current = scrollTarget.current,\n scrollTop = _scrollTarget$current.scrollTop,\n scrollHeight = _scrollTarget$current.scrollHeight,\n clientHeight = _scrollTarget$current.clientHeight;\n var target = scrollTarget.current;\n var isDeltaPositive = delta > 0;\n var availableScroll = scrollHeight - clientHeight - scrollTop;\n var shouldCancelScroll = false; // reset bottom/top flags\n\n if (availableScroll > delta && isBottom.current) {\n if (onBottomLeave) onBottomLeave(event);\n isBottom.current = false;\n }\n\n if (isDeltaPositive && isTop.current) {\n if (onTopLeave) onTopLeave(event);\n isTop.current = false;\n } // bottom limit\n\n\n if (isDeltaPositive && delta > availableScroll) {\n if (onBottomArrive && !isBottom.current) {\n onBottomArrive(event);\n }\n\n target.scrollTop = scrollHeight;\n shouldCancelScroll = true;\n isBottom.current = true; // top limit\n } else if (!isDeltaPositive && -delta > scrollTop) {\n if (onTopArrive && !isTop.current) {\n onTopArrive(event);\n }\n\n target.scrollTop = 0;\n shouldCancelScroll = true;\n isTop.current = true;\n } // cancel scroll\n\n\n if (shouldCancelScroll) {\n cancelScroll(event);\n }\n }, []);\n var onWheel = useCallback(function (event) {\n handleEventDelta(event, event.deltaY);\n }, [handleEventDelta]);\n var onTouchStart = useCallback(function (event) {\n // set touch start so we can calculate touchmove delta\n touchStart.current = event.changedTouches[0].clientY;\n }, []);\n var onTouchMove = useCallback(function (event) {\n var deltaY = touchStart.current - event.changedTouches[0].clientY;\n handleEventDelta(event, deltaY);\n }, [handleEventDelta]);\n var startListening = useCallback(function (el) {\n // bail early if no element is available to attach to\n if (!el) return;\n var notPassive = supportsPassiveEvents ? {\n passive: false\n } : false; // all the if statements are to appease Flow 😢\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('wheel', onWheel, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchstart', onTouchStart, notPassive);\n }\n\n if (typeof el.addEventListener === 'function') {\n el.addEventListener('touchmove', onTouchMove, notPassive);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n var stopListening = useCallback(function (el) {\n // bail early if no element is available to detach from\n if (!el) return; // all the if statements are to appease Flow 😢\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('wheel', onWheel, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchstart', onTouchStart, false);\n }\n\n if (typeof el.removeEventListener === 'function') {\n el.removeEventListener('touchmove', onTouchMove, false);\n }\n }, [onTouchMove, onTouchStart, onWheel]);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n startListening(element);\n return function () {\n stopListening(element);\n };\n }, [isEnabled, startListening, stopListening]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nvar STYLE_KEYS = ['boxSizing', 'height', 'overflow', 'paddingRight', 'position'];\nvar LOCK_STYLES = {\n boxSizing: 'border-box',\n // account for possible declaration `width: 100%;` on body\n overflow: 'hidden',\n position: 'relative',\n height: '100%'\n};\n\nfunction preventTouchMove(e) {\n e.preventDefault();\n}\n\nfunction allowTouchMove(e) {\n e.stopPropagation();\n}\n\nfunction preventInertiaScroll() {\n var top = this.scrollTop;\n var totalScroll = this.scrollHeight;\n var currentScroll = top + this.offsetHeight;\n\n if (top === 0) {\n this.scrollTop = 1;\n } else if (currentScroll === totalScroll) {\n this.scrollTop = top - 1;\n }\n} // `ontouchstart` check works on most browsers\n// `maxTouchPoints` works on IE10/11 and Surface\n\n\nfunction isTouchDevice() {\n return 'ontouchstart' in window || navigator.maxTouchPoints;\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nvar activeScrollLocks = 0;\nvar listenerOptions = {\n capture: false,\n passive: false\n};\nfunction useScrollLock(_ref) {\n var isEnabled = _ref.isEnabled,\n _ref$accountForScroll = _ref.accountForScrollbars,\n accountForScrollbars = _ref$accountForScroll === void 0 ? true : _ref$accountForScroll;\n var originalStyles = useRef({});\n var scrollTarget = useRef(null);\n var addScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style;\n\n if (accountForScrollbars) {\n // store any styles already applied to the body\n STYLE_KEYS.forEach(function (key) {\n var val = targetStyle && targetStyle[key];\n originalStyles.current[key] = val;\n });\n } // apply the lock styles and padding if this is the first scroll lock\n\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n var currentPadding = parseInt(originalStyles.current.paddingRight, 10) || 0;\n var clientWidth = document.body ? document.body.clientWidth : 0;\n var adjustedPadding = window.innerWidth - clientWidth + currentPadding || 0;\n Object.keys(LOCK_STYLES).forEach(function (key) {\n var val = LOCK_STYLES[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n\n if (targetStyle) {\n targetStyle.paddingRight = \"\".concat(adjustedPadding, \"px\");\n }\n } // account for touch devices\n\n\n if (target && isTouchDevice()) {\n // Mobile Safari ignores { overflow: hidden } declaration on the body.\n target.addEventListener('touchmove', preventTouchMove, listenerOptions); // Allow scroll on provided target\n\n if (touchScrollTarget) {\n touchScrollTarget.addEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.addEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n } // increment active scroll locks\n\n\n activeScrollLocks += 1;\n }, []);\n var removeScrollLock = useCallback(function (touchScrollTarget) {\n if (!canUseDOM) return;\n var target = document.body;\n var targetStyle = target && target.style; // safely decrement active scroll locks\n\n activeScrollLocks = Math.max(activeScrollLocks - 1, 0); // reapply original body styles, if any\n\n if (accountForScrollbars && activeScrollLocks < 1) {\n STYLE_KEYS.forEach(function (key) {\n var val = originalStyles.current[key];\n\n if (targetStyle) {\n targetStyle[key] = val;\n }\n });\n } // remove touch listeners\n\n\n if (target && isTouchDevice()) {\n target.removeEventListener('touchmove', preventTouchMove, listenerOptions);\n\n if (touchScrollTarget) {\n touchScrollTarget.removeEventListener('touchstart', preventInertiaScroll, listenerOptions);\n touchScrollTarget.removeEventListener('touchmove', allowTouchMove, listenerOptions);\n }\n }\n }, []);\n useEffect(function () {\n if (!isEnabled) return;\n var element = scrollTarget.current;\n addScrollLock(element);\n return function () {\n removeScrollLock(element);\n };\n }, [isEnabled, addScrollLock, removeScrollLock]);\n return function (element) {\n scrollTarget.current = element;\n };\n}\n\nfunction _EMOTION_STRINGIFIED_CSS_ERROR__$1() { return \"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop).\"; }\n\nvar blurSelectInput = function blurSelectInput() {\n return document.activeElement && document.activeElement.blur();\n};\n\nvar _ref2 = process.env.NODE_ENV === \"production\" ? {\n name: \"1kfdb0e\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0\"\n} : {\n name: \"bp8cua-ScrollManager\",\n styles: \"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;\",\n map: \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBa0RVIiwiZmlsZSI6IlNjcm9sbE1hbmFnZXIuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBAZmxvd1xuLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgUmVhY3QsIHsgdHlwZSBFbGVtZW50IH0gZnJvbSAncmVhY3QnO1xuaW1wb3J0IHVzZVNjcm9sbENhcHR1cmUgZnJvbSAnLi91c2VTY3JvbGxDYXB0dXJlJztcbmltcG9ydCB1c2VTY3JvbGxMb2NrIGZyb20gJy4vdXNlU2Nyb2xsTG9jayc7XG5cbnR5cGUgUmVmQ2FsbGJhY2s8VD4gPSAoVCB8IG51bGwpID0+IHZvaWQ7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNoaWxkcmVuOiAoUmVmQ2FsbGJhY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3JvbGxMb2NrVGFyZ2V0ID0gdXNlU2Nyb2xsTG9jayh7IGlzRW5hYmxlZDogbG9ja0VuYWJsZWQgfSk7XG5cbiAgY29uc3QgdGFyZ2V0UmVmID0gZWxlbWVudCA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPFJlYWN0LkZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvUmVhY3QuRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */\",\n toString: _EMOTION_STRINGIFIED_CSS_ERROR__$1\n};\n\nfunction ScrollManager(_ref) {\n var children = _ref.children,\n lockEnabled = _ref.lockEnabled,\n _ref$captureEnabled = _ref.captureEnabled,\n captureEnabled = _ref$captureEnabled === void 0 ? true : _ref$captureEnabled,\n onBottomArrive = _ref.onBottomArrive,\n onBottomLeave = _ref.onBottomLeave,\n onTopArrive = _ref.onTopArrive,\n onTopLeave = _ref.onTopLeave;\n var setScrollCaptureTarget = useScrollCapture({\n isEnabled: captureEnabled,\n onBottomArrive: onBottomArrive,\n onBottomLeave: onBottomLeave,\n onTopArrive: onTopArrive,\n onTopLeave: onTopLeave\n });\n var setScrollLockTarget = useScrollLock({\n isEnabled: lockEnabled\n });\n\n var targetRef = function targetRef(element) {\n setScrollCaptureTarget(element);\n setScrollLockTarget(element);\n };\n\n return jsx(React.Fragment, null, lockEnabled && jsx(\"div\", {\n onClick: blurSelectInput,\n css: _ref2\n }), children(targetRef));\n}\n\nvar formatGroupLabel = function formatGroupLabel(group) {\n return group.label;\n};\nvar getOptionLabel = function getOptionLabel(option) {\n return option.label;\n};\nvar getOptionValue = function getOptionValue(option) {\n return option.value;\n};\nvar isOptionDisabled = function isOptionDisabled(option) {\n return !!option.isDisabled;\n};\n\nvar defaultStyles = {\n clearIndicator: clearIndicatorCSS,\n container: containerCSS,\n control: css$1,\n dropdownIndicator: dropdownIndicatorCSS,\n group: groupCSS,\n groupHeading: groupHeadingCSS,\n indicatorsContainer: indicatorsContainerCSS,\n indicatorSeparator: indicatorSeparatorCSS,\n input: inputCSS,\n loadingIndicator: loadingIndicatorCSS,\n loadingMessage: loadingMessageCSS,\n menu: menuCSS,\n menuList: menuListCSS,\n menuPortal: menuPortalCSS,\n multiValue: multiValueCSS,\n multiValueLabel: multiValueLabelCSS,\n multiValueRemove: multiValueRemoveCSS,\n noOptionsMessage: noOptionsMessageCSS,\n option: optionCSS,\n placeholder: placeholderCSS,\n singleValue: css$2,\n valueContainer: valueContainerCSS\n}; // Merge Utility\n// Allows consumers to extend a base Select with additional styles\n\nfunction mergeStyles(source) {\n var target = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n // initialize with source styles\n var styles = _objectSpread2({}, source); // massage in target styles\n\n\n Object.keys(target).forEach(function (key) {\n if (source[key]) {\n styles[key] = function (rsCss, props) {\n return target[key](source[key](rsCss, props), props);\n };\n } else {\n styles[key] = target[key];\n }\n });\n return styles;\n}\n\nvar colors = {\n primary: '#2684FF',\n primary75: '#4C9AFF',\n primary50: '#B2D4FF',\n primary25: '#DEEBFF',\n danger: '#DE350B',\n dangerLight: '#FFBDAD',\n neutral0: 'hsl(0, 0%, 100%)',\n neutral5: 'hsl(0, 0%, 95%)',\n neutral10: 'hsl(0, 0%, 90%)',\n neutral20: 'hsl(0, 0%, 80%)',\n neutral30: 'hsl(0, 0%, 70%)',\n neutral40: 'hsl(0, 0%, 60%)',\n neutral50: 'hsl(0, 0%, 50%)',\n neutral60: 'hsl(0, 0%, 40%)',\n neutral70: 'hsl(0, 0%, 30%)',\n neutral80: 'hsl(0, 0%, 20%)',\n neutral90: 'hsl(0, 0%, 10%)'\n};\nvar borderRadius = 4; // Used to calculate consistent margin/padding on elements\n\nvar baseUnit = 4; // The minimum height of the control\n\nvar controlHeight = 38; // The amount of space between the control and menu */\n\nvar menuGutter = baseUnit * 2;\nvar spacing = {\n baseUnit: baseUnit,\n controlHeight: controlHeight,\n menuGutter: menuGutter\n};\nvar defaultTheme = {\n borderRadius: borderRadius,\n colors: colors,\n spacing: spacing\n};\n\nvar defaultProps = {\n 'aria-live': 'polite',\n backspaceRemovesValue: true,\n blurInputOnSelect: isTouchCapable(),\n captureMenuScroll: !isTouchCapable(),\n closeMenuOnSelect: true,\n closeMenuOnScroll: false,\n components: {},\n controlShouldRenderValue: true,\n escapeClearsValue: false,\n filterOption: createFilter(),\n formatGroupLabel: formatGroupLabel,\n getOptionLabel: getOptionLabel,\n getOptionValue: getOptionValue,\n isDisabled: false,\n isLoading: false,\n isMulti: false,\n isRtl: false,\n isSearchable: true,\n isOptionDisabled: isOptionDisabled,\n loadingMessage: function loadingMessage() {\n return 'Loading...';\n },\n maxMenuHeight: 300,\n minMenuHeight: 140,\n menuIsOpen: false,\n menuPlacement: 'bottom',\n menuPosition: 'absolute',\n menuShouldBlockScroll: false,\n menuShouldScrollIntoView: !isMobileDevice(),\n noOptionsMessage: function noOptionsMessage() {\n return 'No options';\n },\n openMenuOnFocus: false,\n openMenuOnClick: true,\n options: [],\n pageSize: 5,\n placeholder: 'Select...',\n screenReaderStatus: function screenReaderStatus(_ref) {\n var count = _ref.count;\n return \"\".concat(count, \" result\").concat(count !== 1 ? 's' : '', \" available\");\n },\n styles: {},\n tabIndex: '0',\n tabSelectsValue: true\n};\n\nfunction toCategorizedOption(props, option, selectValue, index) {\n var isDisabled = _isOptionDisabled(props, option, selectValue);\n\n var isSelected = _isOptionSelected(props, option, selectValue);\n\n var label = getOptionLabel$1(props, option);\n var value = getOptionValue$1(props, option);\n return {\n type: 'option',\n data: option,\n isDisabled: isDisabled,\n isSelected: isSelected,\n label: label,\n value: value,\n index: index\n };\n}\n\nfunction buildCategorizedOptions(props, selectValue) {\n return props.options.map(function (groupOrOption, groupOrOptionIndex) {\n if (groupOrOption.options) {\n var categorizedOptions = groupOrOption.options.map(function (option, optionIndex) {\n return toCategorizedOption(props, option, selectValue, optionIndex);\n }).filter(function (categorizedOption) {\n return isFocusable(props, categorizedOption);\n });\n return categorizedOptions.length > 0 ? {\n type: 'group',\n data: groupOrOption,\n options: categorizedOptions,\n index: groupOrOptionIndex\n } : undefined;\n }\n\n var categorizedOption = toCategorizedOption(props, groupOrOption, selectValue, groupOrOptionIndex);\n return isFocusable(props, categorizedOption) ? categorizedOption : undefined;\n }) // Flow limitation (see https://github.com/facebook/flow/issues/1414)\n .filter(function (categorizedOption) {\n return !!categorizedOption;\n });\n}\n\nfunction buildFocusableOptionsFromCategorizedOptions(categorizedOptions) {\n return categorizedOptions.reduce(function (optionsAccumulator, categorizedOption) {\n if (categorizedOption.type === 'group') {\n optionsAccumulator.push.apply(optionsAccumulator, _toConsumableArray(categorizedOption.options.map(function (option) {\n return option.data;\n })));\n } else {\n optionsAccumulator.push(categorizedOption.data);\n }\n\n return optionsAccumulator;\n }, []);\n}\n\nfunction buildFocusableOptions(props, selectValue) {\n return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(props, selectValue));\n}\n\nfunction isFocusable(props, categorizedOption) {\n var _props$inputValue = props.inputValue,\n inputValue = _props$inputValue === void 0 ? '' : _props$inputValue;\n var data = categorizedOption.data,\n isSelected = categorizedOption.isSelected,\n label = categorizedOption.label,\n value = categorizedOption.value;\n return (!shouldHideSelectedOptions(props) || !isSelected) && _filterOption(props, {\n label: label,\n value: value,\n data: data\n }, inputValue);\n}\n\nfunction getNextFocusedValue(state, nextSelectValue) {\n var focusedValue = state.focusedValue,\n lastSelectValue = state.selectValue;\n var lastFocusedIndex = lastSelectValue.indexOf(focusedValue);\n\n if (lastFocusedIndex > -1) {\n var nextFocusedIndex = nextSelectValue.indexOf(focusedValue);\n\n if (nextFocusedIndex > -1) {\n // the focused value is still in the selectValue, return it\n return focusedValue;\n } else if (lastFocusedIndex < nextSelectValue.length) {\n // the focusedValue is not present in the next selectValue array by\n // reference, so return the new value at the same index\n return nextSelectValue[lastFocusedIndex];\n }\n }\n\n return null;\n}\n\nfunction getNextFocusedOption(state, options) {\n var lastFocusedOption = state.focusedOption;\n return lastFocusedOption && options.indexOf(lastFocusedOption) > -1 ? lastFocusedOption : options[0];\n}\n\nvar getOptionLabel$1 = function getOptionLabel(props, data) {\n return props.getOptionLabel(data);\n};\n\nvar getOptionValue$1 = function getOptionValue(props, data) {\n return props.getOptionValue(data);\n};\n\nfunction _isOptionDisabled(props, option, selectValue) {\n return typeof props.isOptionDisabled === 'function' ? props.isOptionDisabled(option, selectValue) : false;\n}\n\nfunction _isOptionSelected(props, option, selectValue) {\n if (selectValue.indexOf(option) > -1) return true;\n\n if (typeof props.isOptionSelected === 'function') {\n return props.isOptionSelected(option, selectValue);\n }\n\n var candidate = getOptionValue$1(props, option);\n return selectValue.some(function (i) {\n return getOptionValue$1(props, i) === candidate;\n });\n}\n\nfunction _filterOption(props, option, inputValue) {\n return props.filterOption ? props.filterOption(option, inputValue) : true;\n}\n\nvar shouldHideSelectedOptions = function shouldHideSelectedOptions(props) {\n var hideSelectedOptions = props.hideSelectedOptions,\n isMulti = props.isMulti;\n if (hideSelectedOptions === undefined) return isMulti;\n return hideSelectedOptions;\n};\n\nvar instanceId = 1;\n\nvar Select = /*#__PURE__*/function (_Component) {\n _inherits(Select, _Component);\n\n var _super = _createSuper(Select);\n\n // Misc. Instance Properties\n // ------------------------------\n // TODO\n // Refs\n // ------------------------------\n // Lifecycle\n // ------------------------------\n function Select(_props) {\n var _this;\n\n _classCallCheck(this, Select);\n\n _this = _super.call(this, _props);\n _this.state = {\n ariaSelection: null,\n focusedOption: null,\n focusedValue: null,\n inputIsHidden: false,\n isFocused: false,\n selectValue: [],\n clearFocusValueOnUpdate: false,\n inputIsHiddenAfterUpdate: undefined,\n prevProps: undefined\n };\n _this.blockOptionHover = false;\n _this.isComposing = false;\n _this.commonProps = void 0;\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n _this.instancePrefix = '';\n _this.openAfterFocus = false;\n _this.scrollToFocusedOptionOnUpdate = false;\n _this.userIsDragging = void 0;\n _this.controlRef = null;\n\n _this.getControlRef = function (ref) {\n _this.controlRef = ref;\n };\n\n _this.focusedOptionRef = null;\n\n _this.getFocusedOptionRef = function (ref) {\n _this.focusedOptionRef = ref;\n };\n\n _this.menuListRef = null;\n\n _this.getMenuListRef = function (ref) {\n _this.menuListRef = ref;\n };\n\n _this.inputRef = null;\n\n _this.getInputRef = function (ref) {\n _this.inputRef = ref;\n };\n\n _this.focus = _this.focusInput;\n _this.blur = _this.blurInput;\n\n _this.onChange = function (newValue, actionMeta) {\n var _this$props = _this.props,\n onChange = _this$props.onChange,\n name = _this$props.name;\n actionMeta.name = name;\n\n _this.ariaOnChange(newValue, actionMeta);\n\n onChange(newValue, actionMeta);\n };\n\n _this.setValue = function (newValue) {\n var action = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'set-value';\n var option = arguments.length > 2 ? arguments[2] : undefined;\n var _this$props2 = _this.props,\n closeMenuOnSelect = _this$props2.closeMenuOnSelect,\n isMulti = _this$props2.isMulti;\n\n _this.onInputChange('', {\n action: 'set-value'\n });\n\n if (closeMenuOnSelect) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } // when the select value should change, we should reset focusedValue\n\n\n _this.setState({\n clearFocusValueOnUpdate: true\n });\n\n _this.onChange(newValue, {\n action: action,\n option: option\n });\n };\n\n _this.selectOption = function (newValue) {\n var _this$props3 = _this.props,\n blurInputOnSelect = _this$props3.blurInputOnSelect,\n isMulti = _this$props3.isMulti,\n name = _this$props3.name;\n var selectValue = _this.state.selectValue;\n\n var deselected = isMulti && _this.isOptionSelected(newValue, selectValue);\n\n var isDisabled = _this.isOptionDisabled(newValue, selectValue);\n\n if (deselected) {\n var candidate = _this.getOptionValue(newValue);\n\n _this.setValue(selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n }), 'deselect-option', newValue);\n } else if (!isDisabled) {\n // Select option if option is not disabled\n if (isMulti) {\n _this.setValue([].concat(_toConsumableArray(selectValue), [newValue]), 'select-option', newValue);\n } else {\n _this.setValue(newValue, 'select-option');\n }\n } else {\n _this.ariaOnChange(newValue, {\n action: 'select-option',\n name: name\n });\n\n return;\n }\n\n if (blurInputOnSelect) {\n _this.blurInput();\n }\n };\n\n _this.removeValue = function (removedValue) {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n\n var candidate = _this.getOptionValue(removedValue);\n\n var newValueArray = selectValue.filter(function (i) {\n return _this.getOptionValue(i) !== candidate;\n });\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'remove-value',\n removedValue: removedValue\n });\n\n _this.focusInput();\n };\n\n _this.clearValue = function () {\n var selectValue = _this.state.selectValue;\n\n _this.onChange(_this.props.isMulti ? [] : null, {\n action: 'clear',\n removedValues: selectValue\n });\n };\n\n _this.popValue = function () {\n var isMulti = _this.props.isMulti;\n var selectValue = _this.state.selectValue;\n var lastSelectedValue = selectValue[selectValue.length - 1];\n var newValueArray = selectValue.slice(0, selectValue.length - 1);\n var newValue = isMulti ? newValueArray : newValueArray[0] || null;\n\n _this.onChange(newValue, {\n action: 'pop-value',\n removedValue: lastSelectedValue\n });\n };\n\n _this.getValue = function () {\n return _this.state.selectValue;\n };\n\n _this.cx = function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return classNames.apply(void 0, [_this.props.classNamePrefix].concat(args));\n };\n\n _this.getOptionLabel = function (data) {\n return getOptionLabel$1(_this.props, data);\n };\n\n _this.getOptionValue = function (data) {\n return getOptionValue$1(_this.props, data);\n };\n\n _this.getStyles = function (key, props) {\n var base = defaultStyles[key](props);\n base.boxSizing = 'border-box';\n var custom = _this.props.styles[key];\n return custom ? custom(base, props) : base;\n };\n\n _this.getElementId = function (element) {\n return \"\".concat(_this.instancePrefix, \"-\").concat(element);\n };\n\n _this.getComponents = function () {\n return defaultComponents(_this.props);\n };\n\n _this.buildCategorizedOptions = function () {\n return buildCategorizedOptions(_this.props, _this.state.selectValue);\n };\n\n _this.getCategorizedOptions = function () {\n return _this.props.menuIsOpen ? _this.buildCategorizedOptions() : [];\n };\n\n _this.buildFocusableOptions = function () {\n return buildFocusableOptionsFromCategorizedOptions(_this.buildCategorizedOptions());\n };\n\n _this.getFocusableOptions = function () {\n return _this.props.menuIsOpen ? _this.buildFocusableOptions() : [];\n };\n\n _this.ariaOnChange = function (value, actionMeta) {\n _this.setState({\n ariaSelection: _objectSpread2({\n value: value\n }, actionMeta)\n });\n };\n\n _this.onMenuMouseDown = function (event) {\n if (event.button !== 0) {\n return;\n }\n\n event.stopPropagation();\n event.preventDefault();\n\n _this.focusInput();\n };\n\n _this.onMenuMouseMove = function (event) {\n _this.blockOptionHover = false;\n };\n\n _this.onControlMouseDown = function (event) {\n var openMenuOnClick = _this.props.openMenuOnClick;\n\n if (!_this.state.isFocused) {\n if (openMenuOnClick) {\n _this.openAfterFocus = true;\n }\n\n _this.focusInput();\n } else if (!_this.props.menuIsOpen) {\n if (openMenuOnClick) {\n _this.openMenu('first');\n }\n } else {\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n _this.onMenuClose();\n }\n }\n\n if ( // $FlowFixMe\n event.target.tagName !== 'INPUT' && event.target.tagName !== 'TEXTAREA') {\n event.preventDefault();\n }\n };\n\n _this.onDropdownIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n if (_this.props.isDisabled) return;\n var _this$props4 = _this.props,\n isMulti = _this$props4.isMulti,\n menuIsOpen = _this$props4.menuIsOpen;\n\n _this.focusInput();\n\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: !isMulti\n });\n\n _this.onMenuClose();\n } else {\n _this.openMenu('first');\n }\n\n event.preventDefault();\n event.stopPropagation();\n };\n\n _this.onClearIndicatorMouseDown = function (event) {\n // ignore mouse events that weren't triggered by the primary button\n if (event && event.type === 'mousedown' && event.button !== 0) {\n return;\n }\n\n _this.clearValue();\n\n event.stopPropagation();\n _this.openAfterFocus = false;\n\n if (event.type === 'touchend') {\n _this.focusInput();\n } else {\n setTimeout(function () {\n return _this.focusInput();\n });\n }\n };\n\n _this.onScroll = function (event) {\n if (typeof _this.props.closeMenuOnScroll === 'boolean') {\n if (event.target instanceof HTMLElement && isDocumentElement(event.target)) {\n _this.props.onMenuClose();\n }\n } else if (typeof _this.props.closeMenuOnScroll === 'function') {\n if (_this.props.closeMenuOnScroll(event)) {\n _this.props.onMenuClose();\n }\n }\n };\n\n _this.onCompositionStart = function () {\n _this.isComposing = true;\n };\n\n _this.onCompositionEnd = function () {\n _this.isComposing = false;\n };\n\n _this.onTouchStart = function (_ref2) {\n var touches = _ref2.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n _this.initialTouchX = touch.clientX;\n _this.initialTouchY = touch.clientY;\n _this.userIsDragging = false;\n };\n\n _this.onTouchMove = function (_ref3) {\n var touches = _ref3.touches;\n var touch = touches && touches.item(0);\n\n if (!touch) {\n return;\n }\n\n var deltaX = Math.abs(touch.clientX - _this.initialTouchX);\n var deltaY = Math.abs(touch.clientY - _this.initialTouchY);\n var moveThreshold = 5;\n _this.userIsDragging = deltaX > moveThreshold || deltaY > moveThreshold;\n };\n\n _this.onTouchEnd = function (event) {\n if (_this.userIsDragging) return; // close the menu if the user taps outside\n // we're checking on event.target here instead of event.currentTarget, because we want to assert information\n // on events on child elements, not the document (which we've attached this handler to).\n\n if (_this.controlRef && !_this.controlRef.contains(event.target) && _this.menuListRef && !_this.menuListRef.contains(event.target)) {\n _this.blurInput();\n } // reset move vars\n\n\n _this.initialTouchX = 0;\n _this.initialTouchY = 0;\n };\n\n _this.onControlTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onControlMouseDown(event);\n };\n\n _this.onClearIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onClearIndicatorMouseDown(event);\n };\n\n _this.onDropdownIndicatorTouchEnd = function (event) {\n if (_this.userIsDragging) return;\n\n _this.onDropdownIndicatorMouseDown(event);\n };\n\n _this.handleInputChange = function (event) {\n var inputValue = event.currentTarget.value;\n\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange(inputValue, {\n action: 'input-change'\n });\n\n if (!_this.props.menuIsOpen) {\n _this.onMenuOpen();\n }\n };\n\n _this.onInputFocus = function (event) {\n if (_this.props.onFocus) {\n _this.props.onFocus(event);\n }\n\n _this.setState({\n inputIsHiddenAfterUpdate: false,\n isFocused: true\n });\n\n if (_this.openAfterFocus || _this.props.openMenuOnFocus) {\n _this.openMenu('first');\n }\n\n _this.openAfterFocus = false;\n };\n\n _this.onInputBlur = function (event) {\n if (_this.menuListRef && _this.menuListRef.contains(document.activeElement)) {\n _this.inputRef.focus();\n\n return;\n }\n\n if (_this.props.onBlur) {\n _this.props.onBlur(event);\n }\n\n _this.onInputChange('', {\n action: 'input-blur'\n });\n\n _this.onMenuClose();\n\n _this.setState({\n focusedValue: null,\n isFocused: false\n });\n };\n\n _this.onOptionHover = function (focusedOption) {\n if (_this.blockOptionHover || _this.state.focusedOption === focusedOption) {\n return;\n }\n\n _this.setState({\n focusedOption: focusedOption\n });\n };\n\n _this.shouldHideSelectedOptions = function () {\n return shouldHideSelectedOptions(_this.props);\n };\n\n _this.onKeyDown = function (event) {\n var _this$props5 = _this.props,\n isMulti = _this$props5.isMulti,\n backspaceRemovesValue = _this$props5.backspaceRemovesValue,\n escapeClearsValue = _this$props5.escapeClearsValue,\n inputValue = _this$props5.inputValue,\n isClearable = _this$props5.isClearable,\n isDisabled = _this$props5.isDisabled,\n menuIsOpen = _this$props5.menuIsOpen,\n onKeyDown = _this$props5.onKeyDown,\n tabSelectsValue = _this$props5.tabSelectsValue,\n openMenuOnFocus = _this$props5.openMenuOnFocus;\n var _this$state = _this.state,\n focusedOption = _this$state.focusedOption,\n focusedValue = _this$state.focusedValue,\n selectValue = _this$state.selectValue;\n if (isDisabled) return;\n\n if (typeof onKeyDown === 'function') {\n onKeyDown(event);\n\n if (event.defaultPrevented) {\n return;\n }\n } // Block option hover events when the user has just pressed a key\n\n\n _this.blockOptionHover = true;\n\n switch (event.key) {\n case 'ArrowLeft':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('previous');\n\n break;\n\n case 'ArrowRight':\n if (!isMulti || inputValue) return;\n\n _this.focusValue('next');\n\n break;\n\n case 'Delete':\n case 'Backspace':\n if (inputValue) return;\n\n if (focusedValue) {\n _this.removeValue(focusedValue);\n } else {\n if (!backspaceRemovesValue) return;\n\n if (isMulti) {\n _this.popValue();\n } else if (isClearable) {\n _this.clearValue();\n }\n }\n\n break;\n\n case 'Tab':\n if (_this.isComposing) return;\n\n if (event.shiftKey || !menuIsOpen || !tabSelectsValue || !focusedOption || // don't capture the event if the menu opens on focus and the focused\n // option is already selected; it breaks the flow of navigation\n openMenuOnFocus && _this.isOptionSelected(focusedOption, selectValue)) {\n return;\n }\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'Enter':\n if (event.keyCode === 229) {\n // ignore the keydown event from an Input Method Editor(IME)\n // ref. https://www.w3.org/TR/uievents/#determine-keydown-keyup-keyCode\n break;\n }\n\n if (menuIsOpen) {\n if (!focusedOption) return;\n if (_this.isComposing) return;\n\n _this.selectOption(focusedOption);\n\n break;\n }\n\n return;\n\n case 'Escape':\n if (menuIsOpen) {\n _this.setState({\n inputIsHiddenAfterUpdate: false\n });\n\n _this.onInputChange('', {\n action: 'menu-close'\n });\n\n _this.onMenuClose();\n } else if (isClearable && escapeClearsValue) {\n _this.clearValue();\n }\n\n break;\n\n case ' ':\n // space\n if (inputValue) {\n return;\n }\n\n if (!menuIsOpen) {\n _this.openMenu('first');\n\n break;\n }\n\n if (!focusedOption) return;\n\n _this.selectOption(focusedOption);\n\n break;\n\n case 'ArrowUp':\n if (menuIsOpen) {\n _this.focusOption('up');\n } else {\n _this.openMenu('last');\n }\n\n break;\n\n case 'ArrowDown':\n if (menuIsOpen) {\n _this.focusOption('down');\n } else {\n _this.openMenu('first');\n }\n\n break;\n\n case 'PageUp':\n if (!menuIsOpen) return;\n\n _this.focusOption('pageup');\n\n break;\n\n case 'PageDown':\n if (!menuIsOpen) return;\n\n _this.focusOption('pagedown');\n\n break;\n\n case 'Home':\n if (!menuIsOpen) return;\n\n _this.focusOption('first');\n\n break;\n\n case 'End':\n if (!menuIsOpen) return;\n\n _this.focusOption('last');\n\n break;\n\n default:\n return;\n }\n\n event.preventDefault();\n };\n\n _this.instancePrefix = 'react-select-' + (_this.props.instanceId || ++instanceId);\n _this.state.selectValue = cleanValue(_props.value);\n return _this;\n }\n\n _createClass(Select, [{\n key: \"componentDidMount\",\n value: function componentDidMount() {\n this.startListeningComposition();\n this.startListeningToTouch();\n\n if (this.props.closeMenuOnScroll && document && document.addEventListener) {\n // Listen to all scroll events, and filter them out inside of 'onScroll'\n document.addEventListener('scroll', this.onScroll, true);\n }\n\n if (this.props.autoFocus) {\n this.focusInput();\n }\n }\n }, {\n key: \"componentDidUpdate\",\n value: function componentDidUpdate(prevProps) {\n var _this$props6 = this.props,\n isDisabled = _this$props6.isDisabled,\n menuIsOpen = _this$props6.menuIsOpen;\n var isFocused = this.state.isFocused;\n\n if ( // ensure focus is restored correctly when the control becomes enabled\n isFocused && !isDisabled && prevProps.isDisabled || // ensure focus is on the Input when the menu opens\n isFocused && menuIsOpen && !prevProps.menuIsOpen) {\n this.focusInput();\n }\n\n if (isFocused && isDisabled && !prevProps.isDisabled) {\n // ensure select state gets blurred in case Select is programatically disabled while focused\n this.setState({\n isFocused: false\n }, this.onMenuClose);\n } // scroll the focused option into view if necessary\n\n\n if (this.menuListRef && this.focusedOptionRef && this.scrollToFocusedOptionOnUpdate) {\n scrollIntoView(this.menuListRef, this.focusedOptionRef);\n this.scrollToFocusedOptionOnUpdate = false;\n }\n }\n }, {\n key: \"componentWillUnmount\",\n value: function componentWillUnmount() {\n this.stopListeningComposition();\n this.stopListeningToTouch();\n document.removeEventListener('scroll', this.onScroll, true);\n } // ==============================\n // Consumer Handlers\n // ==============================\n\n }, {\n key: \"onMenuOpen\",\n value: function onMenuOpen() {\n this.props.onMenuOpen();\n }\n }, {\n key: \"onMenuClose\",\n value: function onMenuClose() {\n this.onInputChange('', {\n action: 'menu-close'\n });\n this.props.onMenuClose();\n }\n }, {\n key: \"onInputChange\",\n value: function onInputChange(newValue, actionMeta) {\n this.props.onInputChange(newValue, actionMeta);\n } // ==============================\n // Methods\n // ==============================\n\n }, {\n key: \"focusInput\",\n value: function focusInput() {\n if (!this.inputRef) return;\n this.inputRef.focus();\n }\n }, {\n key: \"blurInput\",\n value: function blurInput() {\n if (!this.inputRef) return;\n this.inputRef.blur();\n } // aliased for consumers\n\n }, {\n key: \"openMenu\",\n value: function openMenu(focusOption) {\n var _this2 = this;\n\n var _this$state2 = this.state,\n selectValue = _this$state2.selectValue,\n isFocused = _this$state2.isFocused;\n var focusableOptions = this.buildFocusableOptions();\n var openAtIndex = focusOption === 'first' ? 0 : focusableOptions.length - 1;\n\n if (!this.props.isMulti) {\n var selectedIndex = focusableOptions.indexOf(selectValue[0]);\n\n if (selectedIndex > -1) {\n openAtIndex = selectedIndex;\n }\n } // only scroll if the menu isn't already open\n\n\n this.scrollToFocusedOptionOnUpdate = !(isFocused && this.menuListRef);\n this.setState({\n inputIsHiddenAfterUpdate: false,\n focusedValue: null,\n focusedOption: focusableOptions[openAtIndex]\n }, function () {\n return _this2.onMenuOpen();\n });\n }\n }, {\n key: \"focusValue\",\n value: function focusValue(direction) {\n var _this$state3 = this.state,\n selectValue = _this$state3.selectValue,\n focusedValue = _this$state3.focusedValue; // Only multiselects support value focusing\n\n if (!this.props.isMulti) return;\n this.setState({\n focusedOption: null\n });\n var focusedIndex = selectValue.indexOf(focusedValue);\n\n if (!focusedValue) {\n focusedIndex = -1;\n }\n\n var lastIndex = selectValue.length - 1;\n var nextFocus = -1;\n if (!selectValue.length) return;\n\n switch (direction) {\n case 'previous':\n if (focusedIndex === 0) {\n // don't cycle from the start to the end\n nextFocus = 0;\n } else if (focusedIndex === -1) {\n // if nothing is focused, focus the last value first\n nextFocus = lastIndex;\n } else {\n nextFocus = focusedIndex - 1;\n }\n\n break;\n\n case 'next':\n if (focusedIndex > -1 && focusedIndex < lastIndex) {\n nextFocus = focusedIndex + 1;\n }\n\n break;\n }\n\n this.setState({\n inputIsHidden: nextFocus !== -1,\n focusedValue: selectValue[nextFocus]\n });\n }\n }, {\n key: \"focusOption\",\n value: function focusOption() {\n var direction = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'first';\n var pageSize = this.props.pageSize;\n var focusedOption = this.state.focusedOption;\n var options = this.getFocusableOptions();\n if (!options.length) return;\n var nextFocus = 0; // handles 'first'\n\n var focusedIndex = options.indexOf(focusedOption);\n\n if (!focusedOption) {\n focusedIndex = -1;\n }\n\n if (direction === 'up') {\n nextFocus = focusedIndex > 0 ? focusedIndex - 1 : options.length - 1;\n } else if (direction === 'down') {\n nextFocus = (focusedIndex + 1) % options.length;\n } else if (direction === 'pageup') {\n nextFocus = focusedIndex - pageSize;\n if (nextFocus < 0) nextFocus = 0;\n } else if (direction === 'pagedown') {\n nextFocus = focusedIndex + pageSize;\n if (nextFocus > options.length - 1) nextFocus = options.length - 1;\n } else if (direction === 'last') {\n nextFocus = options.length - 1;\n }\n\n this.scrollToFocusedOptionOnUpdate = true;\n this.setState({\n focusedOption: options[nextFocus],\n focusedValue: null\n });\n }\n }, {\n key: \"getTheme\",\n value: // ==============================\n // Getters\n // ==============================\n function getTheme() {\n // Use the default theme if there are no customizations.\n if (!this.props.theme) {\n return defaultTheme;\n } // If the theme prop is a function, assume the function\n // knows how to merge the passed-in default theme with\n // its own modifications.\n\n\n if (typeof this.props.theme === 'function') {\n return this.props.theme(defaultTheme);\n } // Otherwise, if a plain theme object was passed in,\n // overlay it with the default theme.\n\n\n return _objectSpread2(_objectSpread2({}, defaultTheme), this.props.theme);\n }\n }, {\n key: \"getCommonProps\",\n value: function getCommonProps() {\n var clearValue = this.clearValue,\n cx = this.cx,\n getStyles = this.getStyles,\n getValue = this.getValue,\n selectOption = this.selectOption,\n setValue = this.setValue,\n props = this.props;\n var isMulti = props.isMulti,\n isRtl = props.isRtl,\n options = props.options;\n var hasValue = this.hasValue();\n return {\n clearValue: clearValue,\n cx: cx,\n getStyles: getStyles,\n getValue: getValue,\n hasValue: hasValue,\n isMulti: isMulti,\n isRtl: isRtl,\n options: options,\n selectOption: selectOption,\n selectProps: props,\n setValue: setValue,\n theme: this.getTheme()\n };\n }\n }, {\n key: \"hasValue\",\n value: function hasValue() {\n var selectValue = this.state.selectValue;\n return selectValue.length > 0;\n }\n }, {\n key: \"hasOptions\",\n value: function hasOptions() {\n return !!this.getFocusableOptions().length;\n }\n }, {\n key: \"isClearable\",\n value: function isClearable() {\n var _this$props7 = this.props,\n isClearable = _this$props7.isClearable,\n isMulti = _this$props7.isMulti; // single select, by default, IS NOT clearable\n // multi select, by default, IS clearable\n\n if (isClearable === undefined) return isMulti;\n return isClearable;\n }\n }, {\n key: \"isOptionDisabled\",\n value: function isOptionDisabled(option, selectValue) {\n return _isOptionDisabled(this.props, option, selectValue);\n }\n }, {\n key: \"isOptionSelected\",\n value: function isOptionSelected(option, selectValue) {\n return _isOptionSelected(this.props, option, selectValue);\n }\n }, {\n key: \"filterOption\",\n value: function filterOption(option, inputValue) {\n return _filterOption(this.props, option, inputValue);\n }\n }, {\n key: \"formatOptionLabel\",\n value: function formatOptionLabel(data, context) {\n if (typeof this.props.formatOptionLabel === 'function') {\n var inputValue = this.props.inputValue;\n var selectValue = this.state.selectValue;\n return this.props.formatOptionLabel(data, {\n context: context,\n inputValue: inputValue,\n selectValue: selectValue\n });\n } else {\n return this.getOptionLabel(data);\n }\n }\n }, {\n key: \"formatGroupLabel\",\n value: function formatGroupLabel(data) {\n return this.props.formatGroupLabel(data);\n } // ==============================\n // Mouse Handlers\n // ==============================\n\n }, {\n key: \"startListeningComposition\",\n value: // ==============================\n // Composition Handlers\n // ==============================\n function startListeningComposition() {\n if (document && document.addEventListener) {\n document.addEventListener('compositionstart', this.onCompositionStart, false);\n document.addEventListener('compositionend', this.onCompositionEnd, false);\n }\n }\n }, {\n key: \"stopListeningComposition\",\n value: function stopListeningComposition() {\n if (document && document.removeEventListener) {\n document.removeEventListener('compositionstart', this.onCompositionStart);\n document.removeEventListener('compositionend', this.onCompositionEnd);\n }\n }\n }, {\n key: \"startListeningToTouch\",\n value: // ==============================\n // Touch Handlers\n // ==============================\n function startListeningToTouch() {\n if (document && document.addEventListener) {\n document.addEventListener('touchstart', this.onTouchStart, false);\n document.addEventListener('touchmove', this.onTouchMove, false);\n document.addEventListener('touchend', this.onTouchEnd, false);\n }\n }\n }, {\n key: \"stopListeningToTouch\",\n value: function stopListeningToTouch() {\n if (document && document.removeEventListener) {\n document.removeEventListener('touchstart', this.onTouchStart);\n document.removeEventListener('touchmove', this.onTouchMove);\n document.removeEventListener('touchend', this.onTouchEnd);\n }\n }\n }, {\n key: \"renderInput\",\n value: // ==============================\n // Renderers\n // ==============================\n function renderInput() {\n var _this$props8 = this.props,\n isDisabled = _this$props8.isDisabled,\n isSearchable = _this$props8.isSearchable,\n inputId = _this$props8.inputId,\n inputValue = _this$props8.inputValue,\n tabIndex = _this$props8.tabIndex,\n form = _this$props8.form;\n\n var _this$getComponents = this.getComponents(),\n Input = _this$getComponents.Input;\n\n var inputIsHidden = this.state.inputIsHidden;\n var commonProps = this.commonProps;\n var id = inputId || this.getElementId('input'); // aria attributes makes the JSX \"noisy\", separated for clarity\n\n var ariaAttributes = {\n 'aria-autocomplete': 'list',\n 'aria-label': this.props['aria-label'],\n 'aria-labelledby': this.props['aria-labelledby']\n };\n\n if (!isSearchable) {\n // use a dummy input to maintain focus/blur functionality\n return /*#__PURE__*/React.createElement(DummyInput, _extends({\n id: id,\n innerRef: this.getInputRef,\n onBlur: this.onInputBlur,\n onChange: noop,\n onFocus: this.onInputFocus,\n readOnly: true,\n disabled: isDisabled,\n tabIndex: tabIndex,\n form: form,\n value: \"\"\n }, ariaAttributes));\n }\n\n return /*#__PURE__*/React.createElement(Input, _extends({}, commonProps, {\n autoCapitalize: \"none\",\n autoComplete: \"off\",\n autoCorrect: \"off\",\n id: id,\n innerRef: this.getInputRef,\n isDisabled: isDisabled,\n isHidden: inputIsHidden,\n onBlur: this.onInputBlur,\n onChange: this.handleInputChange,\n onFocus: this.onInputFocus,\n spellCheck: \"false\",\n tabIndex: tabIndex,\n form: form,\n type: \"text\",\n value: inputValue\n }, ariaAttributes));\n }\n }, {\n key: \"renderPlaceholderOrValue\",\n value: function renderPlaceholderOrValue() {\n var _this3 = this;\n\n var _this$getComponents2 = this.getComponents(),\n MultiValue = _this$getComponents2.MultiValue,\n MultiValueContainer = _this$getComponents2.MultiValueContainer,\n MultiValueLabel = _this$getComponents2.MultiValueLabel,\n MultiValueRemove = _this$getComponents2.MultiValueRemove,\n SingleValue = _this$getComponents2.SingleValue,\n Placeholder = _this$getComponents2.Placeholder;\n\n var commonProps = this.commonProps;\n var _this$props9 = this.props,\n controlShouldRenderValue = _this$props9.controlShouldRenderValue,\n isDisabled = _this$props9.isDisabled,\n isMulti = _this$props9.isMulti,\n inputValue = _this$props9.inputValue,\n placeholder = _this$props9.placeholder;\n var _this$state4 = this.state,\n selectValue = _this$state4.selectValue,\n focusedValue = _this$state4.focusedValue,\n isFocused = _this$state4.isFocused;\n\n if (!this.hasValue() || !controlShouldRenderValue) {\n return inputValue ? null : /*#__PURE__*/React.createElement(Placeholder, _extends({}, commonProps, {\n key: \"placeholder\",\n isDisabled: isDisabled,\n isFocused: isFocused\n }), placeholder);\n }\n\n if (isMulti) {\n var selectValues = selectValue.map(function (opt, index) {\n var isOptionFocused = opt === focusedValue;\n return /*#__PURE__*/React.createElement(MultiValue, _extends({}, commonProps, {\n components: {\n Container: MultiValueContainer,\n Label: MultiValueLabel,\n Remove: MultiValueRemove\n },\n isFocused: isOptionFocused,\n isDisabled: isDisabled,\n key: \"\".concat(_this3.getOptionValue(opt)).concat(index),\n index: index,\n removeProps: {\n onClick: function onClick() {\n return _this3.removeValue(opt);\n },\n onTouchEnd: function onTouchEnd() {\n return _this3.removeValue(opt);\n },\n onMouseDown: function onMouseDown(e) {\n e.preventDefault();\n e.stopPropagation();\n }\n },\n data: opt\n }), _this3.formatOptionLabel(opt, 'value'));\n });\n return selectValues;\n }\n\n if (inputValue) {\n return null;\n }\n\n var singleValue = selectValue[0];\n return /*#__PURE__*/React.createElement(SingleValue, _extends({}, commonProps, {\n data: singleValue,\n isDisabled: isDisabled\n }), this.formatOptionLabel(singleValue, 'value'));\n }\n }, {\n key: \"renderClearIndicator\",\n value: function renderClearIndicator() {\n var _this$getComponents3 = this.getComponents(),\n ClearIndicator = _this$getComponents3.ClearIndicator;\n\n var commonProps = this.commonProps;\n var _this$props10 = this.props,\n isDisabled = _this$props10.isDisabled,\n isLoading = _this$props10.isLoading;\n var isFocused = this.state.isFocused;\n\n if (!this.isClearable() || !ClearIndicator || isDisabled || !this.hasValue() || isLoading) {\n return null;\n }\n\n var innerProps = {\n onMouseDown: this.onClearIndicatorMouseDown,\n onTouchEnd: this.onClearIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(ClearIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderLoadingIndicator\",\n value: function renderLoadingIndicator() {\n var _this$getComponents4 = this.getComponents(),\n LoadingIndicator = _this$getComponents4.LoadingIndicator;\n\n var commonProps = this.commonProps;\n var _this$props11 = this.props,\n isDisabled = _this$props11.isDisabled,\n isLoading = _this$props11.isLoading;\n var isFocused = this.state.isFocused;\n if (!LoadingIndicator || !isLoading) return null;\n var innerProps = {\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(LoadingIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderIndicatorSeparator\",\n value: function renderIndicatorSeparator() {\n var _this$getComponents5 = this.getComponents(),\n DropdownIndicator = _this$getComponents5.DropdownIndicator,\n IndicatorSeparator = _this$getComponents5.IndicatorSeparator; // separator doesn't make sense without the dropdown indicator\n\n\n if (!DropdownIndicator || !IndicatorSeparator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n return /*#__PURE__*/React.createElement(IndicatorSeparator, _extends({}, commonProps, {\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderDropdownIndicator\",\n value: function renderDropdownIndicator() {\n var _this$getComponents6 = this.getComponents(),\n DropdownIndicator = _this$getComponents6.DropdownIndicator;\n\n if (!DropdownIndicator) return null;\n var commonProps = this.commonProps;\n var isDisabled = this.props.isDisabled;\n var isFocused = this.state.isFocused;\n var innerProps = {\n onMouseDown: this.onDropdownIndicatorMouseDown,\n onTouchEnd: this.onDropdownIndicatorTouchEnd,\n 'aria-hidden': 'true'\n };\n return /*#__PURE__*/React.createElement(DropdownIndicator, _extends({}, commonProps, {\n innerProps: innerProps,\n isDisabled: isDisabled,\n isFocused: isFocused\n }));\n }\n }, {\n key: \"renderMenu\",\n value: function renderMenu() {\n var _this4 = this;\n\n var _this$getComponents7 = this.getComponents(),\n Group = _this$getComponents7.Group,\n GroupHeading = _this$getComponents7.GroupHeading,\n Menu = _this$getComponents7.Menu,\n MenuList = _this$getComponents7.MenuList,\n MenuPortal = _this$getComponents7.MenuPortal,\n LoadingMessage = _this$getComponents7.LoadingMessage,\n NoOptionsMessage = _this$getComponents7.NoOptionsMessage,\n Option = _this$getComponents7.Option;\n\n var commonProps = this.commonProps;\n var focusedOption = this.state.focusedOption;\n var _this$props12 = this.props,\n captureMenuScroll = _this$props12.captureMenuScroll,\n inputValue = _this$props12.inputValue,\n isLoading = _this$props12.isLoading,\n loadingMessage = _this$props12.loadingMessage,\n minMenuHeight = _this$props12.minMenuHeight,\n maxMenuHeight = _this$props12.maxMenuHeight,\n menuIsOpen = _this$props12.menuIsOpen,\n menuPlacement = _this$props12.menuPlacement,\n menuPosition = _this$props12.menuPosition,\n menuPortalTarget = _this$props12.menuPortalTarget,\n menuShouldBlockScroll = _this$props12.menuShouldBlockScroll,\n menuShouldScrollIntoView = _this$props12.menuShouldScrollIntoView,\n noOptionsMessage = _this$props12.noOptionsMessage,\n onMenuScrollToTop = _this$props12.onMenuScrollToTop,\n onMenuScrollToBottom = _this$props12.onMenuScrollToBottom;\n if (!menuIsOpen) return null; // TODO: Internal Option Type here\n\n var render = function render(props, id) {\n var type = props.type,\n data = props.data,\n isDisabled = props.isDisabled,\n isSelected = props.isSelected,\n label = props.label,\n value = props.value;\n var isFocused = focusedOption === data;\n var onHover = isDisabled ? undefined : function () {\n return _this4.onOptionHover(data);\n };\n var onSelect = isDisabled ? undefined : function () {\n return _this4.selectOption(data);\n };\n var optionId = \"\".concat(_this4.getElementId('option'), \"-\").concat(id);\n var innerProps = {\n id: optionId,\n onClick: onSelect,\n onMouseMove: onHover,\n onMouseOver: onHover,\n tabIndex: -1\n };\n return /*#__PURE__*/React.createElement(Option, _extends({}, commonProps, {\n innerProps: innerProps,\n data: data,\n isDisabled: isDisabled,\n isSelected: isSelected,\n key: optionId,\n label: label,\n type: type,\n value: value,\n isFocused: isFocused,\n innerRef: isFocused ? _this4.getFocusedOptionRef : undefined\n }), _this4.formatOptionLabel(props.data, 'menu'));\n };\n\n var menuUI;\n\n if (this.hasOptions()) {\n menuUI = this.getCategorizedOptions().map(function (item) {\n if (item.type === 'group') {\n var data = item.data,\n options = item.options,\n groupIndex = item.index;\n var groupId = \"\".concat(_this4.getElementId('group'), \"-\").concat(groupIndex);\n var headingId = \"\".concat(groupId, \"-heading\");\n return /*#__PURE__*/React.createElement(Group, _extends({}, commonProps, {\n key: groupId,\n data: data,\n options: options,\n Heading: GroupHeading,\n headingProps: {\n id: headingId,\n data: item.data\n },\n label: _this4.formatGroupLabel(item.data)\n }), item.options.map(function (option) {\n return render(option, \"\".concat(groupIndex, \"-\").concat(option.index));\n }));\n } else if (item.type === 'option') {\n return render(item, \"\".concat(item.index));\n }\n });\n } else if (isLoading) {\n var message = loadingMessage({\n inputValue: inputValue\n });\n if (message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(LoadingMessage, commonProps, message);\n } else {\n var _message = noOptionsMessage({\n inputValue: inputValue\n });\n\n if (_message === null) return null;\n menuUI = /*#__PURE__*/React.createElement(NoOptionsMessage, commonProps, _message);\n }\n\n var menuPlacementProps = {\n minMenuHeight: minMenuHeight,\n maxMenuHeight: maxMenuHeight,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition,\n menuShouldScrollIntoView: menuShouldScrollIntoView\n };\n var menuElement = /*#__PURE__*/React.createElement(MenuPlacer, _extends({}, commonProps, menuPlacementProps), function (_ref4) {\n var ref = _ref4.ref,\n _ref4$placerProps = _ref4.placerProps,\n placement = _ref4$placerProps.placement,\n maxHeight = _ref4$placerProps.maxHeight;\n return /*#__PURE__*/React.createElement(Menu, _extends({}, commonProps, menuPlacementProps, {\n innerRef: ref,\n innerProps: {\n onMouseDown: _this4.onMenuMouseDown,\n onMouseMove: _this4.onMenuMouseMove\n },\n isLoading: isLoading,\n placement: placement\n }), /*#__PURE__*/React.createElement(ScrollManager, {\n captureEnabled: captureMenuScroll,\n onTopArrive: onMenuScrollToTop,\n onBottomArrive: onMenuScrollToBottom,\n lockEnabled: menuShouldBlockScroll\n }, function (scrollTargetRef) {\n return /*#__PURE__*/React.createElement(MenuList, _extends({}, commonProps, {\n innerRef: function innerRef(instance) {\n _this4.getMenuListRef(instance);\n\n scrollTargetRef(instance);\n },\n isLoading: isLoading,\n maxHeight: maxHeight,\n focusedOption: focusedOption\n }), menuUI);\n }));\n }); // positioning behaviour is almost identical for portalled and fixed,\n // so we use the same component. the actual portalling logic is forked\n // within the component based on `menuPosition`\n\n return menuPortalTarget || menuPosition === 'fixed' ? /*#__PURE__*/React.createElement(MenuPortal, _extends({}, commonProps, {\n appendTo: menuPortalTarget,\n controlElement: this.controlRef,\n menuPlacement: menuPlacement,\n menuPosition: menuPosition\n }), menuElement) : menuElement;\n }\n }, {\n key: \"renderFormField\",\n value: function renderFormField() {\n var _this5 = this;\n\n var _this$props13 = this.props,\n delimiter = _this$props13.delimiter,\n isDisabled = _this$props13.isDisabled,\n isMulti = _this$props13.isMulti,\n name = _this$props13.name;\n var selectValue = this.state.selectValue;\n if (!name || isDisabled) return;\n\n if (isMulti) {\n if (delimiter) {\n var value = selectValue.map(function (opt) {\n return _this5.getOptionValue(opt);\n }).join(delimiter);\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: value\n });\n } else {\n var input = selectValue.length > 0 ? selectValue.map(function (opt, i) {\n return /*#__PURE__*/React.createElement(\"input\", {\n key: \"i-\".concat(i),\n name: name,\n type: \"hidden\",\n value: _this5.getOptionValue(opt)\n });\n }) : /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\"\n });\n return /*#__PURE__*/React.createElement(\"div\", null, input);\n }\n } else {\n var _value = selectValue[0] ? this.getOptionValue(selectValue[0]) : '';\n\n return /*#__PURE__*/React.createElement(\"input\", {\n name: name,\n type: \"hidden\",\n value: _value\n });\n }\n }\n }, {\n key: \"renderLiveRegion\",\n value: function renderLiveRegion() {\n var commonProps = this.commonProps;\n var _this$state5 = this.state,\n ariaSelection = _this$state5.ariaSelection,\n focusedOption = _this$state5.focusedOption,\n focusedValue = _this$state5.focusedValue,\n isFocused = _this$state5.isFocused,\n selectValue = _this$state5.selectValue;\n var focusableOptions = this.getFocusableOptions();\n return /*#__PURE__*/React.createElement(LiveRegion, _extends({}, commonProps, {\n ariaSelection: ariaSelection,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n isFocused: isFocused,\n selectValue: selectValue,\n focusableOptions: focusableOptions\n }));\n }\n }, {\n key: \"render\",\n value: function render() {\n var _this$getComponents8 = this.getComponents(),\n Control = _this$getComponents8.Control,\n IndicatorsContainer = _this$getComponents8.IndicatorsContainer,\n SelectContainer = _this$getComponents8.SelectContainer,\n ValueContainer = _this$getComponents8.ValueContainer;\n\n var _this$props14 = this.props,\n className = _this$props14.className,\n id = _this$props14.id,\n isDisabled = _this$props14.isDisabled,\n menuIsOpen = _this$props14.menuIsOpen;\n var isFocused = this.state.isFocused;\n var commonProps = this.commonProps = this.getCommonProps();\n return /*#__PURE__*/React.createElement(SelectContainer, _extends({}, commonProps, {\n className: className,\n innerProps: {\n id: id,\n onKeyDown: this.onKeyDown\n },\n isDisabled: isDisabled,\n isFocused: isFocused\n }), this.renderLiveRegion(), /*#__PURE__*/React.createElement(Control, _extends({}, commonProps, {\n innerRef: this.getControlRef,\n innerProps: {\n onMouseDown: this.onControlMouseDown,\n onTouchEnd: this.onControlTouchEnd\n },\n isDisabled: isDisabled,\n isFocused: isFocused,\n menuIsOpen: menuIsOpen\n }), /*#__PURE__*/React.createElement(ValueContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderPlaceholderOrValue(), this.renderInput()), /*#__PURE__*/React.createElement(IndicatorsContainer, _extends({}, commonProps, {\n isDisabled: isDisabled\n }), this.renderClearIndicator(), this.renderLoadingIndicator(), this.renderIndicatorSeparator(), this.renderDropdownIndicator())), this.renderMenu(), this.renderFormField());\n }\n }], [{\n key: \"getDerivedStateFromProps\",\n value: function getDerivedStateFromProps(props, state) {\n var prevProps = state.prevProps,\n clearFocusValueOnUpdate = state.clearFocusValueOnUpdate,\n inputIsHiddenAfterUpdate = state.inputIsHiddenAfterUpdate;\n var options = props.options,\n value = props.value,\n menuIsOpen = props.menuIsOpen,\n inputValue = props.inputValue;\n var newMenuOptionsState = {};\n\n if (prevProps && (value !== prevProps.value || options !== prevProps.options || menuIsOpen !== prevProps.menuIsOpen || inputValue !== prevProps.inputValue)) {\n var selectValue = cleanValue(value);\n var focusableOptions = menuIsOpen ? buildFocusableOptions(props, selectValue) : [];\n var focusedValue = clearFocusValueOnUpdate ? getNextFocusedValue(state, selectValue) : null;\n var focusedOption = getNextFocusedOption(state, focusableOptions);\n newMenuOptionsState = {\n selectValue: selectValue,\n focusedOption: focusedOption,\n focusedValue: focusedValue,\n clearFocusValueOnUpdate: false\n };\n } // some updates should toggle the state of the input visibility\n\n\n var newInputIsHiddenState = inputIsHiddenAfterUpdate != null && props !== prevProps ? {\n inputIsHidden: inputIsHiddenAfterUpdate,\n inputIsHiddenAfterUpdate: undefined\n } : {};\n return _objectSpread2(_objectSpread2(_objectSpread2({}, newMenuOptionsState), newInputIsHiddenState), {}, {\n prevProps: props\n });\n }\n }]);\n\n return Select;\n}(Component);\n\nSelect.defaultProps = defaultProps;\n\nexport { Select as S, getOptionLabel as a, defaultProps as b, createFilter as c, defaultTheme as d, getOptionValue as g, mergeStyles as m };\n"]},"metadata":{},"sourceType":"module"} |