{"version":3,"sources":["../node_modules/react-final-form-listeners/dist/react-final-form-listeners.es.js","../node_modules/babel-preset-react-app/node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","../node_modules/@reach/utils/noop/dist/reach-utils-noop.esm.js","../node_modules/tabbable/index.js","../node_modules/@reach/utils/context/dist/reach-utils-context.esm.js","../node_modules/@reach/descendants/dist/reach-descendants.esm.js","../node_modules/@reach/popover/dist/reach-popover.esm.js","../node_modules/@reach/combobox/dist/reach-combobox.esm.js","../node_modules/@reach/utils/use-update-effect/dist/reach-utils-use-update-effect.esm.js","../node_modules/@reach/utils/use-stateful-ref-value/dist/reach-utils-use-stateful-ref-value.esm.js","../node_modules/react-use/esm/useDebounce.js","../node_modules/react-use/esm/useTimeoutFn.js","../node_modules/react-use/esm/useInterval.js"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_inheritsLoose","subClass","superClass","create","constructor","__proto__","Component","OnBlurState","_React$Component","props","_this","state","previous","meta","active","_proto","componentDidUpdate","_this$props","children","setState","render","OnBlur","_ref","name","createElement","Field","subscription","OnChangeState","input","value","OnChange","allowNull","_taggedTemplateLiteral","strings","raw","slice","freeze","defineProperties","noop","candidateSelectors","candidateSelector","join","matches","Element","msMatchesSelector","webkitMatchesSelector","tabbable","el","options","candidate","candidateTabindex","regularTabbables","orderedTabbables","candidates","querySelectorAll","includeContainer","Array","unshift","isNodeMatchingSelectorTabbable","getTabindex","push","documentOrder","tabIndex","node","sort","sortOrderedTabbables","map","a","concat","isNodeMatchingSelectorFocusable","isInput","type","isRadio","checked","nodes","getCheckedRadio","ownerDocument","isTabbableRadio","isNonTabbableRadio","disabled","isHiddenInput","offsetParent","getComputedStyle","visibility","isHidden","isTabbable","Error","isFocusable","focusableCandidateSelector","tabindexAttr","parseInt","getAttribute","isNaN","contentEditable","isContentEditable","b","tagName","module","exports","createNamedContext","defaultValue","createContext","_excluded","createDescendantContext","initialValue","descendants","registerDescendant","unregisterDescendant","DescendantProvider","Ctx","context","items","set","useCallback","_ref2","element","explicitIndex","index","rest","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","newItems","find","item","findIndex","Boolean","compareDocumentPosition","Node","DOCUMENT_POSITION_PRECEDING","newItem","filter","Provider","useMemo","Popover","forwardRef","ref","Portal","PopoverImpl","forwardedRef","_ref$as","as","Comp","targetRef","_ref$position","position","positionDefault","_ref$unstable_observa","unstable_observableRefs","popoverRef","useRef","popoverRect","useRect","observe","hidden","targetRect","useComposedRefs","triggerRef","getOwnerDocument","current","handleKeyDown","event","shiftKey","shiftTabbedFromElementAfterTrigger","focusLastTabbableInPopover","shiftTabbedOutOfPopover","focusTriggerRef","shiftTabbedToBrowserChrome","disableTabbablesInPopover","tabbedFromTriggerToPopover","focusFirstPopoverTabbable","tabbedOutOfPopover","focusTabbableAfterTrigger","tabbedToBrowserChrome","getElementAfterTrigger","elements","targetIndex","elementAfterTrigger","contains","activeElement","preventDefault","focus","last","_triggerRef$current","useEffect","addEventListener","removeEventListener","restoreTabIndexTuplés","forEach","enableTabbablesInPopover","useSimulateTabNavigationForReactTree","style","getStyles","_len","_key","getTopPosition","isDirectionUp","top","height","window","pageYOffset","_getCollisions","getCollisions","directionRight","directionUp","left","right","width","pageXOffset","positionMatchWidth","offsetLeft","offsetBottom","collisions","innerWidth","bottom","innerHeight","directionLeft","directionDown","combineChunks","chunks","first","second","start","reduce","processedChunks","nextChunk","prevChunk","pop","end","endIndex","Math","max","highlight","defaultFindChunks","_ref3","autoEscape","caseSensitive","_ref3$sanitize","sanitize","defaultSanitize","searchWords","textToHighlight","searchWord","replace","match","regex","RegExp","exec","lastIndex","fillInChunks","_ref4","chunksToHighlight","totalLength","allChunks","append","chunk","string","_on","_on2","_on3","_on4","_states","HighlightWords","findAll","_ref$caseSensitive","_ref$findChunks","findChunks","_excluded2","_excluded3","_excluded4","_excluded5","IDLE","SUGGESTING","NAVIGATING","INTERACTING","CLEAR","CHANGE","INITIAL_CHANGE","NAVIGATE","SELECT_WITH_KEYBOARD","SELECT_WITH_CLICK","ESCAPE","BLUR","INTERACT","FOCUS","OPEN_WITH_BUTTON","OPEN_WITH_INPUT_CLICK","CLOSE_WITH_BUTTON","stateChart","initial","states","on","reducer","data","nextState","lastEventType","navigationValue","findNavigationValue","isControlled","stateData","persistSelection","ComboboxDescendantContext","ComboboxContext","OptionContext","Combobox","_data$navigationValue","onSelect","_ref$openOnFocus","openOnFocus","ariaLabel","ariaLabelledby","_useDescendantsInit","useState","setOptions","inputRef","buttonRef","autocompletePropRef","persistSelectionRef","_useReducerMachine","chart","initialData","_React$useState","_React$useReducer","useReducer","dispatch","payload","currentState","useReducerMachine","transition","useIsomorphicLayoutEffect","_inputRef$current2","useFocusManagement","id","useId","listboxId","makeId","isControlledRef","isExpanded","includes","popoverIsExpanded","comboboxId","useCheckStyles","getDataState","undefined","isFunction","ComboboxInput","_ref2$as","_ref2$selectOnClick","selectOnClick","_ref2$autocomplete","autocomplete","onClick","onChange","onKeyDown","onBlur","onFocus","controlledValue","initialControlledValue","controlledValueChangedRef","effect","deps","mounted","useUpdateEffect","_React$useContext","useContext","_React$useContext$dat","selectOnClickRef","useKeyDown","handleBlur","useBlur","handleValueChange","trim","inputValue","String","makeHash","role","composeEventHandlers","_inputRef$current","select","ComboboxPopover","_ref3$as","_ref3$portal","portal","_ref3$position","_React$useContext2","sharedProps","ComboboxList","_ref4$persistSelectio","_ref4$as","_React$useContext3","ComboboxOption","_ref5","_ref5$as","indexProp","_React$useContext4","_useStatefulRefValue","initialState","_useState","refValue","useStatefulRefValue","handleRefSet","descendant","forceUpdate","useForceUpdate","values","useDescendant","isActive","ComboboxOptionText","contextValue","results","str","split","Fragment","result","ctx","_React$useContext8","_ref7","getFirstOption","getLastOption","next","prev","_React$useContext9","popover","button","relatedTarget","hash","charCodeAt","toLowerCase","useDebounce","fn","ms","_a","ready","timeout","callback","isReady","clearTimeout","setTimeout","clear","useTimeoutFn","cancel","reset","useInterval","delay","savedCallback","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,+EG9sCA,SAASC,EAAYC,EAAIC,EAAItE,QAC7B,IAAPsE,IAAiBA,EAAK,QACb,IAATtE,IAAmBA,EAAO,IAC9B,IAAIuE,ECJO,SAAsBF,EAAIC,QAC1B,IAAPA,IAAiBA,EAAK,GAC1B,IAAIE,EAAQ1R,kBAAO,GACf2R,EAAU3R,mBACV4R,EAAW5R,iBAAOuR,GAClBM,EAAUpU,uBAAY,WAAc,OAAOiU,EAAMjR,UAAY,IAC7DjD,EAAMC,uBAAY,WAClBiU,EAAMjR,SAAU,EAChBkR,EAAQlR,SAAWqR,aAAaH,EAAQlR,SACxCkR,EAAQlR,QAAUsR,YAAW,WACzBL,EAAMjR,SAAU,EAChBmR,EAASnR,YACV+Q,KACJ,CAACA,IACAQ,EAAQvU,uBAAY,WACpBiU,EAAMjR,QAAU,KAChBkR,EAAQlR,SAAWqR,aAAaH,EAAQlR,WACzC,IAUH,OARAyB,qBAAU,WACN0P,EAASnR,QAAU8Q,IACpB,CAACA,IAEJrP,qBAAU,WAEN,OADA1E,IACOwU,IACR,CAACR,IACG,CAACK,EAASG,EAAOxU,GDvBfyU,CAAaV,EAAIC,GAAKK,EAAUJ,EAAG,GAAIS,EAAST,EAAG,GAAIU,EAAQV,EAAG,GAE3E,OADAvP,oBAAUiQ,EAAOjF,GACV,CAAC2E,EAASK,K,kCEPrB,WAceE,IAbG,SAAUR,EAAUS,GAClC,IAAIC,EAAgBtS,kBAAO,eAC3BkC,qBAAU,WACNoQ,EAAc7R,QAAUmR,KAE5B1P,qBAAU,WACN,GAAc,OAAVmQ,EAAgB,CAChB,IAAIE,EAAaC,aAAY,WAAc,OAAOF,EAAc7R,YAAc4R,GAAS,GACvF,OAAO,WAAc,OAAOI,cAAcF,OAG/C,CAACF","file":"static/js/17.5a0207dd.chunk.js","sourcesContent":["import { createElement, Component } from 'react';\nimport { Field } from 'react-final-form';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nvar ExternallyChangedState =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(ExternallyChangedState, _React$Component);\n\n function ExternallyChangedState(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n previous: props.input.value,\n externallyChanged: false\n };\n return _this;\n }\n\n var _proto = ExternallyChangedState.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props = this.props,\n value = _this$props.input.value,\n active = _this$props.meta.active;\n var previous = this.state.previous;\n\n if (value !== previous) {\n this.setState({\n previous: value,\n externallyChanged: !active\n });\n }\n };\n\n _proto.render = function render() {\n return this.props.children(this.state.externallyChanged);\n };\n\n return ExternallyChangedState;\n}(Component);\n\nvar ExternallyChanged = function ExternallyChanged(_ref) {\n var name = _ref.name,\n children = _ref.children;\n return createElement(Field, {\n name: name,\n subscription: {\n active: true,\n value: true\n },\n allowNull: true,\n render: function render(props) {\n return createElement(ExternallyChangedState, _extends({}, props, {\n children: children\n }));\n }\n });\n};\n\nvar OnBlurState =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(OnBlurState, _React$Component);\n\n function OnBlurState(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n previous: !!props.meta.active\n };\n return _this;\n }\n\n var _proto = OnBlurState.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props = this.props,\n children = _this$props.children,\n active = _this$props.meta.active;\n var previous = this.state.previous;\n\n if (previous && !active) {\n children();\n }\n\n if (previous !== active) {\n this.setState({\n previous: active\n });\n }\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return OnBlurState;\n}(Component);\n\nvar OnBlur = function OnBlur(_ref) {\n var name = _ref.name,\n children = _ref.children;\n return createElement(Field, {\n name: name,\n subscription: {\n active: true\n },\n render: function render(props) {\n return createElement(OnBlurState, _extends({}, props, {\n children: children\n }));\n }\n });\n};\n\nvar OnChangeState =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(OnChangeState, _React$Component);\n\n function OnChangeState(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n previous: props.input.value\n };\n return _this;\n }\n\n var _proto = OnChangeState.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props = this.props,\n children = _this$props.children,\n value = _this$props.input.value;\n var previous = this.state.previous;\n\n if (value !== previous) {\n this.setState({\n previous: value\n });\n children(value, previous);\n }\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return OnChangeState;\n}(Component);\n\nvar OnChange = function OnChange(_ref) {\n var name = _ref.name,\n children = _ref.children;\n return createElement(Field, {\n name: name,\n subscription: {\n value: true\n },\n allowNull: true,\n render: function render(props) {\n return createElement(OnChangeState, _extends({}, props, {\n children: children\n }));\n }\n });\n};\n\nvar OnFocusState =\n/*#__PURE__*/\nfunction (_React$Component) {\n _inheritsLoose(OnFocusState, _React$Component);\n\n function OnFocusState(props) {\n var _this;\n\n _this = _React$Component.call(this, props) || this;\n _this.state = {\n previous: !!props.meta.active\n };\n return _this;\n }\n\n var _proto = OnFocusState.prototype;\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this$props = this.props,\n children = _this$props.children,\n active = _this$props.meta.active;\n var previous = this.state.previous;\n\n if (active && !previous) {\n this.setState({\n previous: active\n });\n children();\n } else if (!active && previous) {\n this.setState({\n previous: active\n });\n }\n };\n\n _proto.render = function render() {\n return null;\n };\n\n return OnFocusState;\n}(Component);\n\nvar OnFocus = function OnFocus(_ref) {\n var name = _ref.name,\n children = _ref.children;\n return createElement(Field, {\n name: name,\n subscription: {\n active: true\n },\n render: function render(props) {\n return createElement(OnFocusState, _extends({}, props, {\n children: children\n }));\n }\n });\n};\n\nexport { ExternallyChanged, OnBlur, OnChange, OnFocus };\n","export default function _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}","function noop() {}\n\nexport { noop };\n","var candidateSelectors = [\n 'input',\n 'select',\n 'textarea',\n 'a[href]',\n 'button',\n '[tabindex]',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]:not([contenteditable=\"false\"])',\n];\nvar candidateSelector = candidateSelectors.join(',');\n\nvar matches = typeof Element === 'undefined'\n ? function () {}\n : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nfunction tabbable(el, options) {\n options = options || {};\n\n var regularTabbables = [];\n var orderedTabbables = [];\n\n var candidates = el.querySelectorAll(candidateSelector);\n\n if (options.includeContainer) {\n if (matches.call(el, candidateSelector)) {\n candidates = Array.prototype.slice.apply(candidates);\n candidates.unshift(el);\n }\n }\n\n var i, candidate, candidateTabindex;\n for (i = 0; i < candidates.length; i++) {\n candidate = candidates[i];\n\n if (!isNodeMatchingSelectorTabbable(candidate)) continue;\n\n candidateTabindex = getTabindex(candidate);\n if (candidateTabindex === 0) {\n regularTabbables.push(candidate);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n node: candidate,\n });\n }\n }\n\n var tabbableNodes = orderedTabbables\n .sort(sortOrderedTabbables)\n .map(function(a) { return a.node })\n .concat(regularTabbables);\n\n return tabbableNodes;\n}\n\ntabbable.isTabbable = isTabbable;\ntabbable.isFocusable = isFocusable;\n\nfunction isNodeMatchingSelectorTabbable(node) {\n if (\n !isNodeMatchingSelectorFocusable(node)\n || isNonTabbableRadio(node)\n || getTabindex(node) < 0\n ) {\n return false;\n }\n return true;\n}\n\nfunction isTabbable(node) {\n if (!node) throw new Error('No node provided');\n if (matches.call(node, candidateSelector) === false) return false;\n return isNodeMatchingSelectorTabbable(node);\n}\n\nfunction isNodeMatchingSelectorFocusable(node) {\n if (\n node.disabled\n || isHiddenInput(node)\n || isHidden(node)\n ) {\n return false;\n }\n return true;\n}\n\nvar focusableCandidateSelector = candidateSelectors.concat('iframe').join(',');\nfunction isFocusable(node) {\n if (!node) throw new Error('No node provided');\n if (matches.call(node, focusableCandidateSelector) === false) return false;\n return isNodeMatchingSelectorFocusable(node);\n}\n\nfunction getTabindex(node) {\n var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);\n if (!isNaN(tabindexAttr)) return tabindexAttr;\n // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if (isContentEditable(node)) return 0;\n return node.tabIndex;\n}\n\nfunction sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n}\n\nfunction isContentEditable(node) {\n return node.contentEditable === 'true';\n}\n\nfunction isInput(node) {\n return node.tagName === 'INPUT';\n}\n\nfunction isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n}\n\nfunction isRadio(node) {\n return isInput(node) && node.type === 'radio';\n}\n\nfunction isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n}\n\nfunction getCheckedRadio(nodes) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked) {\n return nodes[i];\n }\n }\n}\n\nfunction isTabbableRadio(node) {\n if (!node.name) return true;\n // This won't account for the edge case where you have radio groups with the same\n // in separate forms on the same page.\n var radioSet = node.ownerDocument.querySelectorAll('input[type=\"radio\"][name=\"' + node.name + '\"]');\n var checked = getCheckedRadio(radioSet);\n return !checked || checked === node;\n}\n\nfunction isHidden(node) {\n // offsetParent being null will allow detecting cases where an element is invisible or inside an invisible element,\n // as long as the element does not use position: fixed. For them, their visibility has to be checked directly as well.\n return node.offsetParent === null || getComputedStyle(node).visibility === 'hidden';\n}\n\nmodule.exports = tabbable;\n","import { createContext } from 'react';\n\nfunction createNamedContext(name, defaultValue) {\n var Ctx = /*#__PURE__*/createContext(defaultValue);\n\n if (process.env.NODE_ENV !== \"production\") {\n Ctx.displayName = name;\n }\n\n return Ctx;\n}\n\nexport { createNamedContext };\n","import { useContext, useState, useCallback, createElement, useMemo } from 'react';\nimport { useForceUpdate } from '@reach/utils/use-force-update';\nimport { useIsomorphicLayoutEffect } from '@reach/utils/use-isomorphic-layout-effect';\nimport { createNamedContext } from '@reach/utils/context';\nimport { noop } from '@reach/utils/noop';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar _excluded = [\"element\", \"index\"];\n\nfunction createDescendantContext(name, initialValue) {\n if (initialValue === void 0) {\n initialValue = {};\n }\n\n var descendants = [];\n return createNamedContext(name, _extends({\n descendants: descendants,\n registerDescendant: noop,\n unregisterDescendant: noop\n }, initialValue));\n}\n/**\n * This hook registers our descendant by passing it into an array. We can then\n * search that array by to find its index when registering it in the component.\n * We use this for focus management, keyboard navigation, and typeahead\n * functionality for some components.\n *\n * The hook accepts the element node and (optionally) a key. The key is useful\n * if multiple descendants have identical text values and we need to\n * differentiate siblings for some reason.\n *\n * Our main goals with this are:\n * 1) maximum composability,\n * 2) minimal API friction\n * 3) SSR compatibility*\n * 4) concurrent safe\n * 5) index always up-to-date with the tree despite changes\n * 6) works with memoization of any component in the tree (hopefully)\n *\n * As for SSR, the good news is that we don't actually need the index on the\n * server for most use-cases, as we are only using it to determine the order of\n * composed descendants for keyboard navigation. However, in the few cases where\n * this is not the case, we can require an explicit index from the app.\n */\n\n\nfunction useDescendant(descendant, context, indexProp) {\n var forceUpdate = useForceUpdate();\n\n var _React$useContext = useContext(context),\n registerDescendant = _React$useContext.registerDescendant,\n unregisterDescendant = _React$useContext.unregisterDescendant,\n descendants = _React$useContext.descendants; // This will initially return -1 because we haven't registered the descendant\n // on the first render. After we register, this will then return the correct\n // index on the following render and we will re-register descendants so that\n // everything is up-to-date before the user interacts with a collection.\n\n\n var index = indexProp != null ? indexProp : descendants.findIndex(function (item) {\n return item.element === descendant.element;\n }); // Prevent any flashing\n\n useIsomorphicLayoutEffect(function () {\n if (!descendant.element) forceUpdate();\n registerDescendant(_extends({}, descendant, {\n index: index\n }));\n return function () {\n unregisterDescendant(descendant.element);\n };\n }, [descendant, forceUpdate, index, registerDescendant, unregisterDescendant].concat(Object.values(descendant)));\n return index;\n}\n\nfunction useDescendantsInit() {\n return useState([]);\n}\n\nfunction useDescendants(ctx) {\n return useContext(ctx).descendants;\n}\n\nfunction DescendantProvider(_ref) {\n var Ctx = _ref.context,\n children = _ref.children,\n items = _ref.items,\n set = _ref.set;\n var registerDescendant = useCallback(function (_ref2) {\n var element = _ref2.element,\n explicitIndex = _ref2.index,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded);\n\n if (!element) {\n return;\n }\n\n set(function (items) {\n var newItems;\n\n if (explicitIndex != null) {\n return [].concat(items, [_extends({}, rest, {\n element: element,\n index: explicitIndex\n })]).sort(function (a, b) {\n return a.index - b.index;\n });\n } else if (items.length === 0) {\n // If there are no items, register at index 0 and bail.\n newItems = [_extends({}, rest, {\n element: element,\n index: 0\n })];\n } else if (items.find(function (item) {\n return item.element === element;\n })) {\n // If the element is already registered, just use the same array\n newItems = items;\n } else {\n // When registering a descendant, we need to make sure we insert in\n // into the array in the same order that it appears in the DOM. So as\n // new descendants are added or maybe some are removed, we always know\n // that the array is up-to-date and correct.\n //\n // So here we look at our registered descendants and see if the new\n // element we are adding appears earlier than an existing descendant's\n // DOM node via `node.compareDocumentPosition`. If it does, we insert\n // the new element at this index. Because `registerDescendant` will be\n // called in an effect every time the descendants state value changes,\n // we should be sure that this index is accurate when descendent\n // elements come or go from our component.\n var index = items.findIndex(function (item) {\n if (!item.element || !element) {\n return false;\n } // Does this element's DOM node appear before another item in the\n // array in our DOM tree? If so, return true to grab the index at\n // this point in the array so we know where to insert the new\n // element.\n\n\n return Boolean(item.element.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_PRECEDING);\n });\n\n var newItem = _extends({}, rest, {\n element: element,\n index: index\n }); // If an index is not found we will push the element to the end.\n\n\n if (index === -1) {\n newItems = [].concat(items, [newItem]);\n } else {\n newItems = [].concat(items.slice(0, index), [newItem], items.slice(index));\n }\n }\n\n return newItems.map(function (item, index) {\n return _extends({}, item, {\n index: index\n });\n });\n });\n }, // set is a state setter initialized by the useDescendantsInit hook.\n // We can safely ignore the lint warning here because it will not change\n // between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n var unregisterDescendant = useCallback(function (element) {\n if (!element) {\n return;\n }\n\n set(function (items) {\n return items.filter(function (item) {\n return element !== item.element;\n });\n });\n }, // set is a state setter initialized by the useDescendantsInit hook.\n // We can safely ignore the lint warning here because it will not change\n // between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n []);\n return /*#__PURE__*/createElement(Ctx.Provider, {\n value: useMemo(function () {\n return {\n descendants: items,\n registerDescendant: registerDescendant,\n unregisterDescendant: unregisterDescendant\n };\n }, [items, registerDescendant, unregisterDescendant])\n }, children);\n}\n/**\n * Testing this as an abstraction for compound components that use keyboard\n * navigation. Hoping this will help us prevent bugs and mismatched behavior\n * across various components, but it may also prove to be too messy of an\n * abstraction in the end.\n *\n * Currently used in:\n * - Tabs\n * - Accordion\n *\n * @param context\n * @param options\n */\n\n\nfunction useDescendantKeyDown(context, options) {\n var _React$useContext2 = useContext(context),\n descendants = _React$useContext2.descendants;\n\n var callback = options.callback,\n currentIndex = options.currentIndex,\n filter = options.filter,\n _options$key = options.key,\n key = _options$key === void 0 ? \"index\" : _options$key,\n _options$orientation = options.orientation,\n orientation = _options$orientation === void 0 ? \"vertical\" : _options$orientation,\n _options$rotate = options.rotate,\n rotate = _options$rotate === void 0 ? true : _options$rotate,\n _options$rtl = options.rtl,\n rtl = _options$rtl === void 0 ? false : _options$rtl;\n return function handleKeyDown(event) {\n if (![\"ArrowDown\", \"ArrowUp\", \"ArrowLeft\", \"ArrowRight\", \"PageUp\", \"PageDown\", \"Home\", \"End\"].includes(event.key)) {\n return;\n }\n\n var index = currentIndex != null ? currentIndex : -1; // If we use a filter function, we need to re-index our descendants array\n // so that filtered descendent elements aren't selected.\n\n var selectableDescendants = filter ? descendants.filter(filter) : descendants; // We need some options for any of this to work!\n\n if (!selectableDescendants.length) {\n return;\n }\n\n var selectableIndex = selectableDescendants.findIndex(function (descendant) {\n return descendant.index === currentIndex;\n });\n\n function getNextOption() {\n var atBottom = index === getLastOption().index;\n return atBottom ? rotate ? getFirstOption() : selectableDescendants[selectableIndex] : selectableDescendants[(selectableIndex + 1) % selectableDescendants.length];\n }\n\n function getPreviousOption() {\n var atTop = index === getFirstOption().index;\n return atTop ? rotate ? getLastOption() : selectableDescendants[selectableIndex] : selectableDescendants[(selectableIndex - 1 + selectableDescendants.length) % selectableDescendants.length];\n }\n\n function getFirstOption() {\n return selectableDescendants[0];\n }\n\n function getLastOption() {\n return selectableDescendants[selectableDescendants.length - 1];\n }\n\n switch (event.key) {\n case \"ArrowDown\":\n if (orientation === \"vertical\" || orientation === \"both\") {\n event.preventDefault();\n var next = getNextOption();\n callback(key === \"option\" ? next : next[key]);\n }\n\n break;\n\n case \"ArrowUp\":\n if (orientation === \"vertical\" || orientation === \"both\") {\n event.preventDefault();\n var prev = getPreviousOption();\n callback(key === \"option\" ? prev : prev[key]);\n }\n\n break;\n\n case \"ArrowLeft\":\n if (orientation === \"horizontal\" || orientation === \"both\") {\n event.preventDefault();\n var nextOrPrev = (rtl ? getNextOption : getPreviousOption)();\n callback(key === \"option\" ? nextOrPrev : nextOrPrev[key]);\n }\n\n break;\n\n case \"ArrowRight\":\n if (orientation === \"horizontal\" || orientation === \"both\") {\n event.preventDefault();\n var prevOrNext = (rtl ? getPreviousOption : getNextOption)();\n callback(key === \"option\" ? prevOrNext : prevOrNext[key]);\n }\n\n break;\n\n case \"PageUp\":\n event.preventDefault();\n var prevOrFirst = (event.ctrlKey ? getPreviousOption : getFirstOption)();\n callback(key === \"option\" ? prevOrFirst : prevOrFirst[key]);\n break;\n\n case \"Home\":\n event.preventDefault();\n var first = getFirstOption();\n callback(key === \"option\" ? first : first[key]);\n break;\n\n case \"PageDown\":\n event.preventDefault();\n var nextOrLast = (event.ctrlKey ? getNextOption : getLastOption)();\n callback(key === \"option\" ? nextOrLast : nextOrLast[key]);\n break;\n\n case \"End\":\n event.preventDefault();\n var last = getLastOption();\n callback(key === \"option\" ? last : last[key]);\n break;\n }\n };\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport { DescendantProvider, createDescendantContext, useDescendant, useDescendantKeyDown, useDescendants, useDescendantsInit };\n","import { forwardRef, createElement, useRef, useEffect } from 'react';\nimport { Portal } from '@reach/portal';\nimport { useRect } from '@reach/rect';\nimport { getOwnerDocument } from '@reach/utils/owner-document';\nimport { useComposedRefs } from '@reach/utils/compose-refs';\nimport tabbable from 'tabbable';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar _excluded = [\"as\", \"targetRef\", \"position\", \"unstable_observableRefs\"];\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Popover\n */\nvar Popover = /*#__PURE__*/forwardRef(function Popover(props, ref) {\n return /*#__PURE__*/createElement(Portal, null, /*#__PURE__*/createElement(PopoverImpl, _extends({\n ref: ref\n }, props)));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n Popover.displayName = \"Popover\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * PopoverImpl\n *\n * Popover is conditionally rendered so we can't start measuring until it shows\n * up, so useRect needs to live down here not up in Popover\n */\n\n\nvar PopoverImpl = /*#__PURE__*/forwardRef(function PopoverImpl(_ref, forwardedRef) {\n var _ref$as = _ref.as,\n Comp = _ref$as === void 0 ? \"div\" : _ref$as,\n targetRef = _ref.targetRef,\n _ref$position = _ref.position,\n position = _ref$position === void 0 ? positionDefault : _ref$position,\n _ref$unstable_observa = _ref.unstable_observableRefs,\n unstable_observableRefs = _ref$unstable_observa === void 0 ? [] : _ref$unstable_observa,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var popoverRef = useRef(null);\n var popoverRect = useRect(popoverRef, {\n observe: !props.hidden\n });\n var targetRect = useRect(targetRef, {\n observe: !props.hidden\n });\n var ref = useComposedRefs(popoverRef, forwardedRef);\n useSimulateTabNavigationForReactTree(targetRef, popoverRef);\n return /*#__PURE__*/createElement(Comp, _extends({\n \"data-reach-popover\": \"\",\n ref: ref\n }, props, {\n style: _extends({\n position: \"absolute\"\n }, getStyles.apply(void 0, [position, targetRect, popoverRect].concat(unstable_observableRefs)), props.style)\n }));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n PopoverImpl.displayName = \"PopoverImpl\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction getStyles(position, targetRect, popoverRect) {\n for (var _len = arguments.length, unstable_observableRefs = new Array(_len > 3 ? _len - 3 : 0), _key = 3; _key < _len; _key++) {\n unstable_observableRefs[_key - 3] = arguments[_key];\n }\n\n return popoverRect ? position.apply(void 0, [targetRect, popoverRect].concat(unstable_observableRefs.map(function (ref) {\n return ref.current;\n }))) : {\n visibility: \"hidden\"\n };\n}\n\nfunction getTopPosition(targetRect, popoverRect, isDirectionUp) {\n return {\n top: isDirectionUp ? targetRect.top - popoverRect.height + window.pageYOffset + \"px\" : targetRect.top + targetRect.height + window.pageYOffset + \"px\"\n };\n}\n\nvar positionDefault = function positionDefault(targetRect, popoverRect) {\n if (!targetRect || !popoverRect) {\n return {};\n }\n\n var _getCollisions = getCollisions(targetRect, popoverRect),\n directionRight = _getCollisions.directionRight,\n directionUp = _getCollisions.directionUp;\n\n return _extends({\n left: directionRight ? targetRect.right - popoverRect.width + window.pageXOffset + \"px\" : targetRect.left + window.pageXOffset + \"px\"\n }, getTopPosition(targetRect, popoverRect, directionUp));\n};\n\nvar positionRight = function positionRight(targetRect, popoverRect) {\n if (!targetRect || !popoverRect) {\n return {};\n }\n\n var _getCollisions2 = getCollisions(targetRect, popoverRect),\n directionLeft = _getCollisions2.directionLeft,\n directionUp = _getCollisions2.directionUp;\n\n return _extends({\n left: directionLeft ? targetRect.left + window.pageXOffset + \"px\" : targetRect.right - popoverRect.width + window.pageXOffset + \"px\"\n }, getTopPosition(targetRect, popoverRect, directionUp));\n};\n\nvar positionMatchWidth = function positionMatchWidth(targetRect, popoverRect) {\n if (!targetRect || !popoverRect) {\n return {};\n }\n\n var _getCollisions3 = getCollisions(targetRect, popoverRect),\n directionUp = _getCollisions3.directionUp;\n\n return _extends({\n width: targetRect.width,\n left: targetRect.left\n }, getTopPosition(targetRect, popoverRect, directionUp));\n};\n\nfunction getCollisions(targetRect, popoverRect, offsetLeft, offsetBottom) {\n if (offsetLeft === void 0) {\n offsetLeft = 0;\n }\n\n if (offsetBottom === void 0) {\n offsetBottom = 0;\n }\n\n var collisions = {\n top: targetRect.top - popoverRect.height < 0,\n right: window.innerWidth < targetRect.left + popoverRect.width - offsetLeft,\n bottom: window.innerHeight < targetRect.bottom + popoverRect.height - offsetBottom,\n left: targetRect.left + targetRect.width - popoverRect.width < 0\n };\n var directionRight = collisions.right && !collisions.left;\n var directionLeft = collisions.left && !collisions.right;\n var directionUp = collisions.bottom && !collisions.top;\n var directionDown = collisions.top && !collisions.bottom;\n return {\n directionRight: directionRight,\n directionLeft: directionLeft,\n directionUp: directionUp,\n directionDown: directionDown\n };\n} // Heads up, my jQuery past haunts this function. This hook scopes the tab\n// order to the React element tree, instead of the DOM tree. This way, when the\n// user navigates with tab from the targetRef, the tab order moves into the\n// popup, and then out of the popup back to the rest of the document.\n// (We call targetRef, triggerRef inside this function to avoid confusion with\n// event.target)\n\n\nfunction useSimulateTabNavigationForReactTree(triggerRef, popoverRef) {\n var ownerDocument = getOwnerDocument(triggerRef.current);\n\n function handleKeyDown(event) {\n if (event.key === \"Tab\" && popoverRef.current && tabbable(popoverRef.current).length === 0) {\n return;\n }\n\n if (event.key === \"Tab\" && event.shiftKey) {\n if (shiftTabbedFromElementAfterTrigger(event)) {\n focusLastTabbableInPopover(event);\n } else if (shiftTabbedOutOfPopover(event)) {\n focusTriggerRef(event);\n } else if (shiftTabbedToBrowserChrome(event)) {\n disableTabbablesInPopover();\n }\n } else if (event.key === \"Tab\") {\n if (tabbedFromTriggerToPopover()) {\n focusFirstPopoverTabbable(event);\n } else if (tabbedOutOfPopover()) {\n focusTabbableAfterTrigger(event);\n } else if (tabbedToBrowserChrome(event)) {\n disableTabbablesInPopover();\n }\n }\n }\n\n useEffect(function () {\n ownerDocument.addEventListener(\"keydown\", handleKeyDown);\n return function () {\n ownerDocument.removeEventListener(\"keydown\", handleKeyDown);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n function getElementAfterTrigger() {\n var elements = tabbable(ownerDocument);\n var targetIndex = elements && triggerRef.current ? elements.indexOf(triggerRef.current) : -1;\n var elementAfterTrigger = elements && elements[targetIndex + 1];\n return popoverRef.current && popoverRef.current.contains(elementAfterTrigger || null) ? false : elementAfterTrigger;\n }\n\n function tabbedFromTriggerToPopover() {\n return triggerRef.current ? triggerRef.current === ownerDocument.activeElement : false;\n }\n\n function focusFirstPopoverTabbable(event) {\n var elements = popoverRef.current && tabbable(popoverRef.current);\n\n if (elements && elements[0]) {\n event.preventDefault();\n elements[0].focus();\n }\n }\n\n function tabbedOutOfPopover() {\n var inPopover = popoverRef.current ? popoverRef.current.contains(ownerDocument.activeElement || null) : false;\n\n if (inPopover) {\n var elements = popoverRef.current && tabbable(popoverRef.current);\n return Boolean(elements && elements[elements.length - 1] === ownerDocument.activeElement);\n }\n\n return false;\n }\n\n function focusTabbableAfterTrigger(event) {\n var elementAfterTrigger = getElementAfterTrigger();\n\n if (elementAfterTrigger) {\n event.preventDefault();\n elementAfterTrigger.focus();\n }\n }\n\n function shiftTabbedFromElementAfterTrigger(event) {\n if (!event.shiftKey) return;\n var elementAfterTrigger = getElementAfterTrigger();\n return event.target === elementAfterTrigger;\n }\n\n function focusLastTabbableInPopover(event) {\n var elements = popoverRef.current && tabbable(popoverRef.current);\n var last = elements && elements[elements.length - 1];\n\n if (last) {\n event.preventDefault();\n last.focus();\n }\n }\n\n function shiftTabbedOutOfPopover(event) {\n var elements = popoverRef.current && tabbable(popoverRef.current);\n\n if (elements) {\n return elements.length === 0 ? false : event.target === elements[0];\n }\n\n return false;\n }\n\n function focusTriggerRef(event) {\n var _triggerRef$current;\n\n event.preventDefault();\n (_triggerRef$current = triggerRef.current) == null ? void 0 : _triggerRef$current.focus();\n }\n\n function tabbedToBrowserChrome(event) {\n var elements = popoverRef.current ? tabbable(ownerDocument).filter(function (element) {\n return !popoverRef.current.contains(element);\n }) : null;\n return elements ? event.target === elements[elements.length - 1] : false;\n }\n\n function shiftTabbedToBrowserChrome(event) {\n // we're assuming the popover will never contain the first tabbable\n // element, and it better not, because the trigger needs to be tabbable!\n return event.target === tabbable(ownerDocument)[0];\n }\n\n var restoreTabIndexTuplés = [];\n\n function disableTabbablesInPopover() {\n var elements = popoverRef.current && tabbable(popoverRef.current);\n\n if (elements) {\n elements.forEach(function (element) {\n restoreTabIndexTuplés.push([element, element.tabIndex]);\n element.tabIndex = -1;\n });\n ownerDocument.addEventListener(\"focusin\", enableTabbablesInPopover);\n }\n }\n\n function enableTabbablesInPopover() {\n ownerDocument.removeEventListener(\"focusin\", enableTabbablesInPopover);\n restoreTabIndexTuplés.forEach(function (_ref2) {\n var element = _ref2[0],\n tabIndex = _ref2[1];\n element.tabIndex = tabIndex;\n });\n }\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport default Popover;\nexport { Popover, getCollisions, positionDefault, positionMatchWidth, positionRight };\n","import { forwardRef, useRef, createElement, useContext, useEffect, useCallback, useMemo, Fragment, useState, useReducer } from 'react';\nimport PropTypes from 'prop-types';\nimport { useIsomorphicLayoutEffect } from '@reach/utils/use-isomorphic-layout-effect';\nimport { createNamedContext } from '@reach/utils/context';\nimport { isFunction } from '@reach/utils/type-check';\nimport { makeId } from '@reach/utils/make-id';\nimport { noop } from '@reach/utils/noop';\nimport { useCheckStyles } from '@reach/utils/dev-utils';\nimport { useComposedRefs } from '@reach/utils/compose-refs';\nimport { useUpdateEffect } from '@reach/utils/use-update-effect';\nimport { useStatefulRefValue } from '@reach/utils/use-stateful-ref-value';\nimport { composeEventHandlers } from '@reach/utils/compose-event-handlers';\nimport { createDescendantContext, useDescendantsInit, DescendantProvider, useDescendant, useDescendants } from '@reach/descendants';\nimport { useId } from '@reach/auto-id';\nimport { Popover, positionMatchWidth } from '@reach/popover';\nimport warning from 'tiny-warning';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\n// Forked from https://github.com/bvaughn/highlight-words-core\n\n/**\n * Creates an array of chunk objects representing both higlightable and non\n * highlightable pieces of text that match each search word.\n *\n * @return Array of \"chunk\" objects\n */\nfunction findAll(_ref) {\n var autoEscape = _ref.autoEscape,\n _ref$caseSensitive = _ref.caseSensitive,\n caseSensitive = _ref$caseSensitive === void 0 ? false : _ref$caseSensitive,\n _ref$findChunks = _ref.findChunks,\n findChunks = _ref$findChunks === void 0 ? defaultFindChunks : _ref$findChunks,\n sanitize = _ref.sanitize,\n searchWords = _ref.searchWords,\n textToHighlight = _ref.textToHighlight;\n return fillInChunks({\n chunksToHighlight: combineChunks({\n chunks: findChunks({\n autoEscape: autoEscape,\n caseSensitive: caseSensitive,\n sanitize: sanitize,\n searchWords: searchWords,\n textToHighlight: textToHighlight\n })\n }),\n totalLength: textToHighlight ? textToHighlight.length : 0\n });\n}\n/**\n * Takes an array of \"chunk\" objects and combines chunks that overlap into\n * single chunks.\n *\n * @return Array of \"chunk\" objects\n */\n\n\nfunction combineChunks(_ref2) {\n var chunks = _ref2.chunks;\n return chunks.sort(function (first, second) {\n return first.start - second.start;\n }).reduce(function (processedChunks, nextChunk) {\n // First chunk just goes straight in the array...\n if (processedChunks.length === 0) {\n return [nextChunk];\n } else {\n // ... subsequent chunks get checked to see if they overlap...\n var prevChunk = processedChunks.pop();\n\n if (nextChunk.start <= prevChunk.end) {\n // It may be the case that prevChunk completely surrounds nextChunk, so take the\n // largest of the end indeces.\n var endIndex = Math.max(prevChunk.end, nextChunk.end);\n processedChunks.push({\n highlight: false,\n start: prevChunk.start,\n end: endIndex\n });\n } else {\n processedChunks.push(prevChunk, nextChunk);\n }\n\n return processedChunks;\n }\n }, []);\n}\n/**\n * Examine text for any matches. If we find matches, add them to the returned\n * array as a \"chunk\" object.\n *\n * @return Array of \"chunk\" objects\n */\n\n\nfunction defaultFindChunks(_ref3) {\n var autoEscape = _ref3.autoEscape,\n caseSensitive = _ref3.caseSensitive,\n _ref3$sanitize = _ref3.sanitize,\n sanitize = _ref3$sanitize === void 0 ? defaultSanitize : _ref3$sanitize,\n searchWords = _ref3.searchWords,\n textToHighlight = _ref3.textToHighlight;\n textToHighlight = sanitize(textToHighlight || \"\");\n return searchWords.filter(function (searchWord) {\n return searchWord;\n }) // Remove empty words\n .reduce(function (chunks, searchWord) {\n searchWord = sanitize(searchWord);\n\n if (autoEscape) {\n searchWord = escapeRegExpFn(searchWord);\n }\n\n var regex = new RegExp(searchWord, caseSensitive ? \"g\" : \"gi\");\n var match;\n\n while (match = regex.exec(textToHighlight || \"\")) {\n var start = match.index;\n var end = regex.lastIndex; // We do not return zero-length matches\n\n if (end > start) {\n chunks.push({\n highlight: false,\n start: start,\n end: end\n });\n } // Prevent browsers like Firefox from getting stuck in an infinite loop\n // See http://www.regexguru.com/2008/04/watch-out-for-zero-length-matches/\n\n\n if (match.index === regex.lastIndex) {\n regex.lastIndex++;\n }\n }\n\n return chunks;\n }, []);\n}\n/**\n * Given a set of chunks to highlight, create an additional set of chunks\n * to represent the bits of text between the highlighted text.\n *\n * @return Array of \"chunk\" objects\n */\n\n\nfunction fillInChunks(_ref4) {\n var chunksToHighlight = _ref4.chunksToHighlight,\n totalLength = _ref4.totalLength;\n var allChunks = [];\n\n if (chunksToHighlight.length === 0) {\n append(0, totalLength, false);\n } else {\n var lastIndex = 0;\n chunksToHighlight.forEach(function (chunk) {\n append(lastIndex, chunk.start, false);\n append(chunk.start, chunk.end, true);\n lastIndex = chunk.end;\n });\n append(lastIndex, totalLength, false);\n }\n\n return allChunks;\n\n function append(start, end, highlight) {\n if (end - start > 0) {\n allChunks.push({\n start: start,\n end: end,\n highlight: highlight\n });\n }\n }\n}\n\nfunction defaultSanitize(string) {\n return string;\n}\n\nfunction escapeRegExpFn(string) {\n return string.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, \"\\\\$&\");\n}\n\nvar HighlightWords = {\n combineChunks: combineChunks,\n fillInChunks: fillInChunks,\n findAll: findAll,\n findChunks: defaultFindChunks\n};\n\nvar _excluded = [\"onSelect\", \"openOnFocus\", \"children\", \"as\", \"aria-label\", \"aria-labelledby\"],\n _excluded2 = [\"as\", \"selectOnClick\", \"autocomplete\", \"onClick\", \"onChange\", \"onKeyDown\", \"onBlur\", \"onFocus\", \"value\"],\n _excluded3 = [\"as\", \"children\", \"portal\", \"onKeyDown\", \"onBlur\", \"position\"],\n _excluded4 = [\"persistSelection\", \"as\"],\n _excluded5 = [\"as\", \"children\", \"index\", \"value\", \"onClick\"],\n _excluded6 = [\"as\", \"onClick\", \"onKeyDown\"];\n\nvar _on, _on2, _on3, _on4, _states;\n// States\n// Nothing going on, waiting for the user to type or use the arrow keys\n\nvar IDLE = \"IDLE\"; // The component is suggesting options as the user types\n\nvar SUGGESTING = \"SUGGESTING\"; // The user is using the keyboard to navigate the list, not typing\n\nvar NAVIGATING = \"NAVIGATING\"; // The user is interacting with arbitrary elements inside the popup that\n// are not ComboboxInputs\n\nvar INTERACTING = \"INTERACTING\"; ////////////////////////////////////////////////////////////////////////////////\n// Events\n// User cleared the value w/ backspace, but input still has focus\n\nvar CLEAR = \"CLEAR\"; // User is typing\n\nvar CHANGE = \"CHANGE\"; // Initial input value change handler for syncing user state with state machine\n// Prevents initial change from sending the user to the NAVIGATING state\n// https://github.com/reach/reach-ui/issues/464\n\nvar INITIAL_CHANGE = \"INITIAL_CHANGE\"; // User is navigating w/ the keyboard\n\nvar NAVIGATE = \"NAVIGATE\"; // User can be navigating with keyboard and then click instead, we want the\n// value from the click, not the current nav item\n\nvar SELECT_WITH_KEYBOARD = \"SELECT_WITH_KEYBOARD\";\nvar SELECT_WITH_CLICK = \"SELECT_WITH_CLICK\"; // Pretty self-explanatory, user can hit escape or blur to close the popover\n\nvar ESCAPE = \"ESCAPE\";\nvar BLUR = \"BLUR\"; // The user left the input to interact with arbitrary elements inside the popup\n\nvar INTERACT = \"INTERACT\";\nvar FOCUS = \"FOCUS\";\nvar OPEN_WITH_BUTTON = \"OPEN_WITH_BUTTON\";\nvar OPEN_WITH_INPUT_CLICK = \"OPEN_WITH_INPUT_CLICK\";\nvar CLOSE_WITH_BUTTON = \"CLOSE_WITH_BUTTON\"; ////////////////////////////////////////////////////////////////////////////////\n\nvar stateChart = {\n initial: IDLE,\n states: (_states = {}, _states[IDLE] = {\n on: (_on = {}, _on[BLUR] = IDLE, _on[CLEAR] = IDLE, _on[CHANGE] = SUGGESTING, _on[INITIAL_CHANGE] = IDLE, _on[FOCUS] = SUGGESTING, _on[NAVIGATE] = NAVIGATING, _on[OPEN_WITH_BUTTON] = SUGGESTING, _on[OPEN_WITH_INPUT_CLICK] = SUGGESTING, _on)\n }, _states[SUGGESTING] = {\n on: (_on2 = {}, _on2[CHANGE] = SUGGESTING, _on2[FOCUS] = SUGGESTING, _on2[NAVIGATE] = NAVIGATING, _on2[CLEAR] = IDLE, _on2[ESCAPE] = IDLE, _on2[BLUR] = IDLE, _on2[SELECT_WITH_CLICK] = IDLE, _on2[INTERACT] = INTERACTING, _on2[CLOSE_WITH_BUTTON] = IDLE, _on2)\n }, _states[NAVIGATING] = {\n on: (_on3 = {}, _on3[CHANGE] = SUGGESTING, _on3[FOCUS] = SUGGESTING, _on3[CLEAR] = IDLE, _on3[BLUR] = IDLE, _on3[ESCAPE] = IDLE, _on3[NAVIGATE] = NAVIGATING, _on3[SELECT_WITH_CLICK] = IDLE, _on3[SELECT_WITH_KEYBOARD] = IDLE, _on3[CLOSE_WITH_BUTTON] = IDLE, _on3[INTERACT] = INTERACTING, _on3)\n }, _states[INTERACTING] = {\n on: (_on4 = {}, _on4[CLEAR] = IDLE, _on4[CHANGE] = SUGGESTING, _on4[FOCUS] = SUGGESTING, _on4[BLUR] = IDLE, _on4[ESCAPE] = IDLE, _on4[NAVIGATE] = NAVIGATING, _on4[CLOSE_WITH_BUTTON] = IDLE, _on4[SELECT_WITH_CLICK] = IDLE, _on4)\n }, _states)\n};\n\nvar reducer = function reducer(data, event) {\n var nextState = _extends({}, data, {\n lastEventType: event.type\n });\n\n switch (event.type) {\n case CHANGE:\n case INITIAL_CHANGE:\n return _extends({}, nextState, {\n navigationValue: null,\n value: event.value\n });\n\n case NAVIGATE:\n case OPEN_WITH_BUTTON:\n case OPEN_WITH_INPUT_CLICK:\n return _extends({}, nextState, {\n navigationValue: findNavigationValue(nextState, event)\n });\n\n case CLEAR:\n return _extends({}, nextState, {\n value: \"\",\n navigationValue: null\n });\n\n case BLUR:\n case ESCAPE:\n return _extends({}, nextState, {\n navigationValue: null\n });\n\n case SELECT_WITH_CLICK:\n return _extends({}, nextState, {\n // if controlled, \"set\" the input to what it already has, and let the\n // user do whatever they want\n value: event.isControlled ? data.value : event.value,\n navigationValue: null\n });\n\n case SELECT_WITH_KEYBOARD:\n return _extends({}, nextState, {\n // if controlled, \"set\" the input to what it already has, and let the\n // user do whatever they want\n value: event.isControlled ? data.value : data.navigationValue,\n navigationValue: null\n });\n\n case CLOSE_WITH_BUTTON:\n return _extends({}, nextState, {\n navigationValue: null\n });\n\n case INTERACT:\n return nextState;\n\n case FOCUS:\n return _extends({}, nextState, {\n navigationValue: findNavigationValue(nextState, event)\n });\n\n default:\n return nextState;\n }\n};\n\nfunction popoverIsExpanded(state) {\n return [SUGGESTING, NAVIGATING, INTERACTING].includes(state);\n}\n/**\n * When we open a list, set the navigation value to the value in the input, if\n * it's in the list, then it'll automatically be highlighted.\n *\n * @param stateData\n * @param event\n */\n\n\nfunction findNavigationValue(stateData, event) {\n // @ts-ignore\n if (event.value) {\n // @ts-ignore\n return event.value; // @ts-ignore\n } else if (event.persistSelection) {\n return stateData.value;\n } else {\n return null;\n }\n}\n\nvar ComboboxDescendantContext = /*#__PURE__*/createDescendantContext(\"ComboboxDescendantContext\");\nvar ComboboxContext = /*#__PURE__*/createNamedContext(\"ComboboxContext\", {}); // Allows us to put the option's value on context so that ComboboxOptionText\n// can work it's highlight text magic no matter what else is rendered around\n// it.\n\nvar OptionContext = /*#__PURE__*/createNamedContext(\"OptionContext\", {}); ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Combobox\n *\n * @see Docs https://reach.tech/combobox#combobox\n */\n\nvar Combobox = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {\n var _data$navigationValue;\n\n var onSelect = _ref.onSelect,\n _ref$openOnFocus = _ref.openOnFocus,\n openOnFocus = _ref$openOnFocus === void 0 ? false : _ref$openOnFocus,\n children = _ref.children,\n _ref$as = _ref.as,\n Comp = _ref$as === void 0 ? \"div\" : _ref$as,\n ariaLabel = _ref[\"aria-label\"],\n ariaLabelledby = _ref[\"aria-labelledby\"],\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var _useDescendantsInit = useDescendantsInit(),\n options = _useDescendantsInit[0],\n setOptions = _useDescendantsInit[1]; // Need this to focus it\n\n\n var inputRef = useRef();\n var popoverRef = useRef();\n var buttonRef = useRef(); // When we don't want cycle back to\n // the user's value while navigating (because it's always the user's value),\n // but we need to know this in useKeyDown which is far away from the prop\n // here, so we do something sneaky and write it to this ref on context so we\n // can use it anywhere else 😛. Another new trick for me and I'm excited\n // about this one too!\n\n var autocompletePropRef = useRef(false);\n var persistSelectionRef = useRef(false);\n var defaultData = {\n // The value the user has typed. We derive this also when the developer is\n // controlling the value of ComboboxInput.\n value: \"\",\n // the value the user has navigated to with the keyboard\n navigationValue: null\n };\n\n var _useReducerMachine = useReducerMachine(stateChart, reducer, defaultData),\n state = _useReducerMachine[0],\n data = _useReducerMachine[1],\n transition = _useReducerMachine[2];\n\n useFocusManagement(data.lastEventType, inputRef);\n var id = useId(props.id);\n var listboxId = id ? makeId(\"listbox\", id) : \"listbox\";\n var isControlledRef = useRef(false);\n var isExpanded = popoverIsExpanded(state);\n var context = {\n ariaLabel: ariaLabel,\n ariaLabelledby: ariaLabelledby,\n autocompletePropRef: autocompletePropRef,\n buttonRef: buttonRef,\n comboboxId: id,\n data: data,\n inputRef: inputRef,\n isExpanded: isExpanded,\n listboxId: listboxId,\n onSelect: onSelect || noop,\n openOnFocus: openOnFocus,\n persistSelectionRef: persistSelectionRef,\n popoverRef: popoverRef,\n state: state,\n transition: transition,\n isControlledRef: isControlledRef\n };\n useCheckStyles(\"combobox\");\n return /*#__PURE__*/createElement(DescendantProvider, {\n context: ComboboxDescendantContext,\n items: options,\n set: setOptions\n }, /*#__PURE__*/createElement(ComboboxContext.Provider, {\n value: context\n }, /*#__PURE__*/createElement(Comp, _extends({}, props, {\n \"data-reach-combobox\": \"\",\n \"data-state\": getDataState(state),\n \"data-expanded\": isExpanded || undefined,\n ref: forwardedRef\n }), isFunction(children) ? children({\n id: id,\n isExpanded: isExpanded,\n navigationValue: (_data$navigationValue = data.navigationValue) != null ? _data$navigationValue : null,\n state: state\n }) : children)));\n});\n/**\n * @see Docs https://reach.tech/combobox#combobox-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n Combobox.displayName = \"Combobox\";\n Combobox.propTypes = {\n as: PropTypes.any,\n onSelect: PropTypes.func,\n openOnFocus: PropTypes.bool\n };\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxInput\n *\n * Wraps an `` with a couple extra props that work with the combobox.\n *\n * @see Docs https://reach.tech/combobox#comboboxinput\n */\n\n\nvar ComboboxInput = /*#__PURE__*/forwardRef(function (_ref2, forwardedRef) {\n var _ref2$as = _ref2.as,\n Comp = _ref2$as === void 0 ? \"input\" : _ref2$as,\n _ref2$selectOnClick = _ref2.selectOnClick,\n selectOnClick = _ref2$selectOnClick === void 0 ? false : _ref2$selectOnClick,\n _ref2$autocomplete = _ref2.autocomplete,\n autocomplete = _ref2$autocomplete === void 0 ? true : _ref2$autocomplete,\n onClick = _ref2.onClick,\n onChange = _ref2.onChange,\n onKeyDown = _ref2.onKeyDown,\n onBlur = _ref2.onBlur,\n onFocus = _ref2.onFocus,\n controlledValue = _ref2.value,\n props = _objectWithoutPropertiesLoose(_ref2, _excluded2);\n\n // https://github.com/reach/reach-ui/issues/464\n var _React$useRef = useRef(controlledValue),\n initialControlledValue = _React$useRef.current;\n\n var controlledValueChangedRef = useRef(false);\n useUpdateEffect(function () {\n controlledValueChangedRef.current = true;\n }, [controlledValue]);\n\n var _React$useContext = useContext(ComboboxContext),\n _React$useContext$dat = _React$useContext.data,\n navigationValue = _React$useContext$dat.navigationValue,\n value = _React$useContext$dat.value,\n lastEventType = _React$useContext$dat.lastEventType,\n inputRef = _React$useContext.inputRef,\n state = _React$useContext.state,\n transition = _React$useContext.transition,\n listboxId = _React$useContext.listboxId,\n autocompletePropRef = _React$useContext.autocompletePropRef,\n openOnFocus = _React$useContext.openOnFocus,\n isExpanded = _React$useContext.isExpanded,\n ariaLabel = _React$useContext.ariaLabel,\n ariaLabelledby = _React$useContext.ariaLabelledby,\n persistSelectionRef = _React$useContext.persistSelectionRef,\n isControlledRef = _React$useContext.isControlledRef;\n\n var ref = useComposedRefs(inputRef, forwardedRef); // Because we close the List on blur, we need to track if the blur is\n // caused by clicking inside the list, and if so, don't close the List.\n\n var selectOnClickRef = useRef(false);\n var handleKeyDown = useKeyDown();\n var handleBlur = useBlur();\n var isControlled = typeof controlledValue !== \"undefined\";\n var wasInitiallyControlled = typeof initialControlledValue !== \"undefined\";\n\n if (process.env.NODE_ENV !== \"production\") {\n process.env.NODE_ENV !== \"production\" ? warning(!(!isControlled && wasInitiallyControlled), \"ComboboxInput is changing from controlled to uncontrolled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in.\") : void 0;\n process.env.NODE_ENV !== \"production\" ? warning(!(isControlled && !wasInitiallyControlled), \"ComboboxInput is changing from uncontrolled to controlled. ComboboxInput should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled ComboboxInput for the lifetime of the component. Check the `value` prop being passed in.\") : void 0;\n }\n\n useEffect(function () {\n isControlledRef.current = isControlled; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isControlled]); // Layout effect should be SSR-safe here because we don't actually do\n // anything with this ref that involves rendering until after we've\n // let the client hydrate in nested components.\n\n useIsomorphicLayoutEffect(function () {\n autocompletePropRef.current = autocomplete;\n }, [autocomplete, autocompletePropRef]);\n var handleValueChange = useCallback(function (value) {\n if (value.trim() === \"\") {\n transition(CLEAR, {\n isControlled: isControlled\n });\n } else if (value === initialControlledValue && !controlledValueChangedRef.current) {\n transition(INITIAL_CHANGE, {\n value: value\n });\n } else {\n transition(CHANGE, {\n value: value\n });\n }\n }, [initialControlledValue, transition, isControlled]);\n useEffect(function () {\n // If they are controlling the value we still need to do our transitions,\n // so we have this derived state to emulate onChange of the input as we\n // receive new `value`s ...[*]\n if (isControlled && controlledValue !== value && ( // https://github.com/reach/reach-ui/issues/481\n controlledValue.trim() === \"\" ? (value || \"\").trim() !== \"\" : true)) {\n handleValueChange(controlledValue);\n }\n }, [controlledValue, handleValueChange, isControlled, value]); // [*]... and when controlled, we don't trigger handleValueChange as the\n // user types, instead the developer controls it with the normal input\n // onChange prop\n\n function handleChange(event) {\n var value = event.target.value;\n\n if (!isControlled) {\n handleValueChange(value);\n }\n }\n\n function handleFocus() {\n if (selectOnClick) {\n selectOnClickRef.current = true;\n } // If we select an option with click, useFocusManagement will focus the\n // input, in those cases we don't want to cause the menu to open back up,\n // so we guard behind these states.\n\n\n if (openOnFocus && lastEventType !== SELECT_WITH_CLICK) {\n transition(FOCUS, {\n persistSelection: persistSelectionRef.current\n });\n }\n }\n\n function handleClick() {\n if (selectOnClickRef.current) {\n var _inputRef$current;\n\n selectOnClickRef.current = false;\n (_inputRef$current = inputRef.current) == null ? void 0 : _inputRef$current.select();\n }\n\n if (openOnFocus && state === IDLE) {\n transition(OPEN_WITH_INPUT_CLICK);\n }\n }\n\n var inputValue = autocomplete && (state === NAVIGATING || state === INTERACTING) ? // When idle, we don't have a navigationValue on ArrowUp/Down\n navigationValue || controlledValue || value : controlledValue || value;\n return /*#__PURE__*/createElement(Comp, _extends({\n \"aria-activedescendant\": navigationValue ? String(makeHash(navigationValue)) : undefined,\n \"aria-autocomplete\": \"both\",\n \"aria-controls\": listboxId,\n \"aria-expanded\": isExpanded,\n \"aria-haspopup\": \"listbox\",\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabel ? undefined : ariaLabelledby,\n role: \"combobox\"\n }, props, {\n \"data-reach-combobox-input\": \"\",\n \"data-state\": getDataState(state),\n ref: ref,\n onBlur: composeEventHandlers(onBlur, handleBlur),\n onChange: composeEventHandlers(onChange, handleChange),\n onClick: composeEventHandlers(onClick, handleClick),\n onFocus: composeEventHandlers(onFocus, handleFocus),\n onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown),\n value: inputValue || \"\"\n }));\n});\n/**\n * @see Docs https://reach.tech/combobox#comboboxinput-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxInput.displayName = \"ComboboxInput\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxPopover\n *\n * Contains the popup that renders the list. Because some UI needs to render\n * more than the list in the popup, you need to render one of these around the\n * list. For example, maybe you want to render the number of results suggested.\n *\n * @see Docs https://reach.tech/combobox#comboboxpopover\n */\n\n\nvar ComboboxPopover = /*#__PURE__*/forwardRef(function (_ref3, forwardedRef) {\n var _ref3$as = _ref3.as,\n Comp = _ref3$as === void 0 ? \"div\" : _ref3$as,\n children = _ref3.children,\n _ref3$portal = _ref3.portal,\n portal = _ref3$portal === void 0 ? true : _ref3$portal,\n onKeyDown = _ref3.onKeyDown,\n onBlur = _ref3.onBlur,\n _ref3$position = _ref3.position,\n position = _ref3$position === void 0 ? positionMatchWidth : _ref3$position,\n props = _objectWithoutPropertiesLoose(_ref3, _excluded3);\n\n var _React$useContext2 = useContext(ComboboxContext),\n popoverRef = _React$useContext2.popoverRef,\n inputRef = _React$useContext2.inputRef,\n isExpanded = _React$useContext2.isExpanded,\n state = _React$useContext2.state;\n\n var ref = useComposedRefs(popoverRef, forwardedRef);\n var handleKeyDown = useKeyDown();\n var handleBlur = useBlur();\n var sharedProps = {\n \"data-reach-combobox-popover\": \"\",\n \"data-state\": getDataState(state),\n onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown),\n onBlur: composeEventHandlers(onBlur, handleBlur),\n // Instead of conditionally rendering the popover we use the `hidden` prop\n // because we don't want to unmount on close (from escape or onSelect).\n // However, the developer can conditionally render the ComboboxPopover if\n // they do want to cause mount/unmount based on the app's own data (like\n // results.length or whatever).\n hidden: !isExpanded,\n tabIndex: -1,\n children: children\n };\n return portal ? /*#__PURE__*/createElement(Popover, _extends({\n as: Comp\n }, props, {\n ref: ref,\n \"data-expanded\": isExpanded || undefined,\n position: position,\n targetRef: inputRef\n }, sharedProps)) : /*#__PURE__*/createElement(Comp, _extends({\n ref: ref\n }, props, sharedProps));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxPopover.displayName = \"ComboboxPopover\";\n}\n/**\n * @see Docs https://reach.tech/combobox#comboboxpopover-props\n */\n\n\n////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxList\n *\n * Contains the `ComboboxOption` elements and sets up the proper aria attributes\n * for the list.\n *\n * @see Docs https://reach.tech/combobox#comboboxlist\n */\nvar ComboboxList = /*#__PURE__*/forwardRef(function (_ref4, forwardedRef) {\n var _ref4$persistSelectio = _ref4.persistSelection,\n persistSelection = _ref4$persistSelectio === void 0 ? false : _ref4$persistSelectio,\n _ref4$as = _ref4.as,\n Comp = _ref4$as === void 0 ? \"ul\" : _ref4$as,\n props = _objectWithoutPropertiesLoose(_ref4, _excluded4);\n\n var _React$useContext3 = useContext(ComboboxContext),\n persistSelectionRef = _React$useContext3.persistSelectionRef,\n listboxId = _React$useContext3.listboxId;\n\n if (persistSelection) {\n persistSelectionRef.current = true;\n }\n\n return /*#__PURE__*/createElement(Comp, _extends({\n role: \"listbox\"\n }, props, {\n ref: forwardedRef,\n \"data-reach-combobox-list\": \"\",\n id: listboxId\n }));\n});\n/**\n * @see Docs https://reach.tech/combobox#comboboxlist-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxList.displayName = \"ComboboxList\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxOption\n *\n * An option that is suggested to the user as they interact with the combobox.\n *\n * @see Docs https://reach.tech/combobox#comboboxoption\n */\n\n\nvar ComboboxOption = /*#__PURE__*/forwardRef(function (_ref5, forwardedRef) {\n var _ref5$as = _ref5.as,\n Comp = _ref5$as === void 0 ? \"li\" : _ref5$as,\n children = _ref5.children,\n indexProp = _ref5.index,\n value = _ref5.value,\n onClick = _ref5.onClick,\n props = _objectWithoutPropertiesLoose(_ref5, _excluded5);\n\n var _React$useContext4 = useContext(ComboboxContext),\n onSelect = _React$useContext4.onSelect,\n navigationValue = _React$useContext4.data.navigationValue,\n transition = _React$useContext4.transition,\n isControlledRef = _React$useContext4.isControlledRef;\n\n var ownRef = useRef(null);\n\n var _useStatefulRefValue = useStatefulRefValue(ownRef, null),\n element = _useStatefulRefValue[0],\n handleRefSet = _useStatefulRefValue[1];\n\n var descendant = useMemo(function () {\n return {\n element: element,\n value: value\n };\n }, [value, element]);\n var index = useDescendant(descendant, ComboboxDescendantContext, indexProp);\n var ref = useComposedRefs(forwardedRef, handleRefSet);\n var isActive = navigationValue === value;\n\n var handleClick = function handleClick() {\n onSelect && onSelect(value);\n transition(SELECT_WITH_CLICK, {\n value: value,\n isControlled: isControlledRef.current\n });\n };\n\n return /*#__PURE__*/createElement(OptionContext.Provider, {\n value: {\n value: value,\n index: index\n }\n }, /*#__PURE__*/createElement(Comp, _extends({\n \"aria-selected\": isActive,\n role: \"option\"\n }, props, {\n \"data-reach-combobox-option\": \"\",\n ref: ref,\n id: String(makeHash(value)),\n \"data-highlighted\": isActive ? \"\" : undefined // Without this the menu will close from `onBlur`, but with it the\n // element can be `document.activeElement` and then our focus checks in\n // onBlur will work as intended\n ,\n tabIndex: -1,\n onClick: composeEventHandlers(onClick, handleClick)\n }), children ? isFunction(children) ? children({\n value: value,\n index: index\n }) : children : /*#__PURE__*/createElement(ComboboxOptionText, null)));\n});\n/**\n * @see Docs https://reach.tech/combobox#comboboxoption-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxOption.displayName = \"ComboboxOption\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxOptionText\n *\n * Renders the value of a `ComboboxOption` as text but with spans wrapping the\n * matching and non-matching segments of text.\n *\n * We don't forwardRef or spread props because we render multiple spans or null,\n * should be fine 🤙\n *\n * @example\n * \n * 🌧 \n * \n *\n * @see Docs https://reach.tech/combobox#comboboxoptiontext\n */\n\n\nfunction ComboboxOptionText() {\n var _React$useContext5 = useContext(OptionContext),\n value = _React$useContext5.value;\n\n var _React$useContext6 = useContext(ComboboxContext),\n contextValue = _React$useContext6.data.value;\n\n var results = useMemo(function () {\n return HighlightWords.findAll({\n searchWords: escapeRegexp(contextValue || \"\").split(/\\s+/),\n textToHighlight: value\n });\n }, [contextValue, value]);\n return /*#__PURE__*/createElement(Fragment, null, results.length ? results.map(function (result, index) {\n var str = value.slice(result.start, result.end);\n return /*#__PURE__*/createElement(\"span\", {\n key: index,\n \"data-reach-combobox-option-text\": \"\",\n \"data-user-value\": result.highlight ? true : undefined,\n \"data-suggested-value\": result.highlight ? undefined : true\n }, str);\n }) : value);\n}\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxOptionText.displayName = \"ComboboxOptionText\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * ComboboxButton\n */\n\n\nvar ComboboxButton = /*#__PURE__*/forwardRef(function (_ref6, forwardedRef) {\n var _ref6$as = _ref6.as,\n Comp = _ref6$as === void 0 ? \"button\" : _ref6$as,\n onClick = _ref6.onClick,\n onKeyDown = _ref6.onKeyDown,\n props = _objectWithoutPropertiesLoose(_ref6, _excluded6);\n\n var _React$useContext7 = useContext(ComboboxContext),\n transition = _React$useContext7.transition,\n state = _React$useContext7.state,\n buttonRef = _React$useContext7.buttonRef,\n listboxId = _React$useContext7.listboxId,\n isExpanded = _React$useContext7.isExpanded;\n\n var ref = useComposedRefs(buttonRef, forwardedRef);\n var handleKeyDown = useKeyDown();\n\n var handleClick = function handleClick() {\n if (state === IDLE) {\n transition(OPEN_WITH_BUTTON);\n } else {\n transition(CLOSE_WITH_BUTTON);\n }\n };\n\n return /*#__PURE__*/createElement(Comp, _extends({\n \"aria-controls\": listboxId,\n \"aria-haspopup\": \"listbox\",\n \"aria-expanded\": isExpanded\n }, props, {\n \"data-reach-combobox-button\": \"\",\n ref: ref,\n onClick: composeEventHandlers(onClick, handleClick),\n onKeyDown: composeEventHandlers(onKeyDown, handleKeyDown)\n }));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n ComboboxButton.displayName = \"ComboboxButton\";\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Move focus back to the input if we start navigating w/ the\n * keyboard after focus has moved to any focusable content in\n * the popup.\n *\n * @param lastEventType\n * @param inputRef\n */\n\n\nfunction useFocusManagement(lastEventType, inputRef) {\n // useLayoutEffect so that the cursor goes to the end of the input instead\n // of awkwardly at the beginning, unclear to me why 🤷‍♂️\n //\n // Should be safe to use here since we're just focusing an input.\n useIsomorphicLayoutEffect(function () {\n if (lastEventType === NAVIGATE || lastEventType === ESCAPE || lastEventType === SELECT_WITH_CLICK || lastEventType === OPEN_WITH_BUTTON) {\n var _inputRef$current2;\n\n (_inputRef$current2 = inputRef.current) == null ? void 0 : _inputRef$current2.focus();\n }\n }, [inputRef, lastEventType]);\n}\n/**\n * We want the same events when the input or the popup have focus (HOW COOL ARE\n * HOOKS BTW?) This is probably the hairiest piece but it's not bad.\n */\n\n\nfunction useKeyDown() {\n var _React$useContext8 = useContext(ComboboxContext),\n navigationValue = _React$useContext8.data.navigationValue,\n onSelect = _React$useContext8.onSelect,\n state = _React$useContext8.state,\n transition = _React$useContext8.transition,\n autocompletePropRef = _React$useContext8.autocompletePropRef,\n persistSelectionRef = _React$useContext8.persistSelectionRef,\n isControlledRef = _React$useContext8.isControlledRef;\n\n var options = useDescendants(ComboboxDescendantContext);\n return function handleKeyDown(event) {\n var index = options.findIndex(function (_ref7) {\n var value = _ref7.value;\n return value === navigationValue;\n });\n\n function getNextOption() {\n var atBottom = index === options.length - 1;\n\n if (atBottom) {\n if (autocompletePropRef.current) {\n // Go back to the value the user has typed because we are\n // autocompleting and they need to be able to get back to what\n // they had typed w/o having to backspace out.\n return null;\n } else {\n // cycle through\n return getFirstOption();\n }\n } else {\n // Go to the next item in the list\n return options[(index + 1) % options.length];\n }\n }\n\n function getPreviousOption() {\n var atTop = index === 0;\n\n if (atTop) {\n if (autocompletePropRef.current) {\n // Go back to the value the user has typed because we are\n // autocompleting and they need to be able to get back to what\n // they had typed w/o having to backspace out.\n return null;\n } else {\n // cycle through\n return getLastOption();\n }\n } else if (index === -1) {\n // displaying the user's value, so go select the last one\n return getLastOption();\n } else {\n // normal case, select previous\n return options[(index - 1 + options.length) % options.length];\n }\n }\n\n function getFirstOption() {\n return options[0];\n }\n\n function getLastOption() {\n return options[options.length - 1];\n }\n\n switch (event.key) {\n case \"ArrowDown\":\n // Don't scroll the page\n event.preventDefault();\n\n if (!options || !options.length) {\n return;\n }\n\n if (state === IDLE) {\n // Opening a closed list\n transition(NAVIGATE, {\n persistSelection: persistSelectionRef.current\n });\n } else {\n var next = getNextOption();\n transition(NAVIGATE, {\n value: next ? next.value : null\n });\n }\n\n break;\n // A lot of duplicate code with ArrowDown up next, I'm already over it.\n\n case \"ArrowUp\":\n // Don't scroll the page\n event.preventDefault();\n\n if (!options || options.length === 0) {\n return;\n }\n\n if (state === IDLE) {\n transition(NAVIGATE);\n } else {\n var prev = getPreviousOption();\n transition(NAVIGATE, {\n value: prev ? prev.value : null\n });\n }\n\n break;\n\n case \"Home\":\n case \"PageUp\":\n // Don't scroll the page\n event.preventDefault();\n\n if (!options || options.length === 0) {\n return;\n }\n\n if (state === IDLE) {\n transition(NAVIGATE);\n } else {\n transition(NAVIGATE, {\n value: getFirstOption().value\n });\n }\n\n break;\n\n case \"End\":\n case \"PageDown\":\n // Don't scroll the page\n event.preventDefault();\n\n if (!options || options.length === 0) {\n return;\n }\n\n if (state === IDLE) {\n transition(NAVIGATE);\n } else {\n transition(NAVIGATE, {\n value: getLastOption().value\n });\n }\n\n break;\n\n case \"Escape\":\n if (state !== IDLE) {\n transition(ESCAPE);\n }\n\n break;\n\n case \"Enter\":\n if (state === NAVIGATING && navigationValue !== null) {\n // don't want to submit forms\n event.preventDefault();\n onSelect && onSelect(navigationValue);\n transition(SELECT_WITH_KEYBOARD, {\n isControlled: isControlledRef.current\n });\n }\n\n break;\n }\n };\n}\n\nfunction useBlur() {\n var _React$useContext9 = useContext(ComboboxContext),\n state = _React$useContext9.state,\n transition = _React$useContext9.transition,\n popoverRef = _React$useContext9.popoverRef,\n inputRef = _React$useContext9.inputRef,\n buttonRef = _React$useContext9.buttonRef;\n\n return function handleBlur(event) {\n var popover = popoverRef.current;\n var input = inputRef.current;\n var button = buttonRef.current;\n var activeElement = event.relatedTarget; // we on want to close only if focus propss outside the combobox\n\n if (activeElement !== input && activeElement !== button && popover) {\n if (popover.contains(activeElement)) {\n // focus landed inside the combobox, keep it open\n if (state !== INTERACTING) {\n transition(INTERACT);\n }\n } else {\n // focus landed outside the combobox, close it.\n transition(BLUR);\n }\n }\n };\n}\n/**\n * This manages transitions between states with a built in reducer to manage\n * the data that goes with those transitions.\n *\n * @param chart\n * @param reducer\n * @param initialData\n */\n\n\nfunction useReducerMachine(chart, reducer, initialData) {\n var _React$useState = useState(chart.initial),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var _React$useReducer = useReducer(reducer, initialData),\n data = _React$useReducer[0],\n dispatch = _React$useReducer[1];\n\n var transition = function transition(event, payload) {\n if (payload === void 0) {\n payload = {};\n }\n\n var currentState = chart.states[state];\n var nextState = currentState && currentState.on[event];\n\n if (nextState) {\n dispatch(_extends({\n type: event,\n state: state,\n nextState: state\n }, payload));\n setState(nextState);\n return;\n }\n };\n\n return [state, data, transition];\n}\n/**\n * We don't want to track the active descendant with indexes because nothing is\n * more annoying in a combobox than having it change values RIGHT AS YOU HIT\n * ENTER. That only happens if you use the index as your data, rather than\n * *your data as your data*. We use this to generate a unique ID based on the\n * value of each item. This function is short, sweet, and good enough™ (I also\n * don't know how it works, tbqh)\n *\n * @see https://stackoverflow.com/questions/6122571/simple-non-secure-hash-function-for-javascript\n * @param str\n */\n\n\nfunction makeHash(str) {\n var hash = 0;\n\n if (str.length === 0) {\n return hash;\n }\n\n for (var i = 0; i < str.length; i++) {\n var _char = str.charCodeAt(i);\n\n hash = (hash << 5) - hash + _char;\n hash = hash & hash;\n }\n\n return hash;\n} // function getActiveElement(node: Element | null | undefined) {\n// let activeElement: Element | null = null;\n// try {\n// // If Element.getRootNode is supported, we'll retrieve either the root\n// // Document or shadow root depending on where the component is rendered.\n// // https://github.com/reach/reach-ui/issues/787\n// activeElement = (node?.getRootNode() as ShadowRoot | Document)\n// .activeElement;\n// } finally {\n// return activeElement || (node?.ownerDocument || document).activeElement;\n// }\n// }\n\n\nfunction getDataState(state) {\n return state.toLowerCase();\n}\n/**\n * Escape regexp special characters in `str`\n *\n * @see https://github.com/component/escape-regexp/blob/5ce923c1510c9802b3da972c90b6861dd2829b6b/index.js\n * @param str\n */\n\n\nfunction escapeRegexp(str) {\n return String(str).replace(/([.*+?=^!:${}()|[\\]/\\\\])/g, \"\\\\$1\");\n} //////////////////////////\n//////////////////////////////////////////////////////\n\n/**\n * A hook that exposes data for a given `Combobox` component to its descendants.\n *\n * @see Docs https://reach.tech/combobox#usecomboboxcontext\n */\n\nfunction useComboboxContext() {\n var _React$useContext10 = useContext(ComboboxContext),\n isExpanded = _React$useContext10.isExpanded,\n comboboxId = _React$useContext10.comboboxId,\n data = _React$useContext10.data,\n state = _React$useContext10.state;\n\n var navigationValue = data.navigationValue;\n return useMemo(function () {\n return {\n id: comboboxId,\n isExpanded: isExpanded,\n navigationValue: navigationValue != null ? navigationValue : null,\n state: state\n };\n }, [comboboxId, isExpanded, navigationValue, state]);\n}\n/**\n * A hook that exposes data for a given `ComboboxOption` component to its descendants.\n *\n * @see Docs https://reach.tech/combobox#usecomboboxcontext\n */\n\nfunction useComboboxOptionContext() {\n var _React$useContext11 = useContext(OptionContext),\n value = _React$useContext11.value,\n index = _React$useContext11.index;\n\n return useMemo(function () {\n return {\n value: value,\n index: index\n };\n }, [value, index]);\n} ////////////////////////////////////////////////////////////////////////////////\n// Well alright, you made it all the way here to like 1100 lines of code (geez,\n// what the heck?). Have a great day :D\n////////////////////////////////////////////////////////////////////////////////\n// Types\n\nexport { Combobox, ComboboxButton, ComboboxInput, ComboboxList, ComboboxOption, ComboboxOptionText, ComboboxPopover, escapeRegexp, useKeyDown as unstable_useKeyDown, useComboboxContext, useComboboxOptionContext };\n","import { useRef, useEffect } from 'react';\n\n/**\n * Call an effect after a component update, skipping the initial mount.\n *\n * @param effect Effect to call\n * @param deps Effect dependency list\n */\nfunction useUpdateEffect(effect, deps) {\n var mounted = useRef(false);\n useEffect(function () {\n if (mounted.current) {\n effect();\n } else {\n mounted.current = true;\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, deps);\n}\n\nexport { useUpdateEffect };\n","import { useState, useCallback } from 'react';\n\nfunction useStatefulRefValue(ref, initialState) {\n var _useState = useState(initialState),\n state = _useState[0],\n setState = _useState[1];\n\n var callbackRef = useCallback(function (refValue) {\n ref.current = refValue;\n setState(refValue); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n return [state, callbackRef];\n}\n\nexport { useStatefulRefValue };\n","import { useEffect } from 'react';\nimport useTimeoutFn from './useTimeoutFn';\nexport default function useDebounce(fn, ms, deps) {\n if (ms === void 0) { ms = 0; }\n if (deps === void 0) { deps = []; }\n var _a = useTimeoutFn(fn, ms), isReady = _a[0], cancel = _a[1], reset = _a[2];\n useEffect(reset, deps);\n return [isReady, cancel];\n}\n","import { useCallback, useEffect, useRef } from 'react';\nexport default function useTimeoutFn(fn, ms) {\n if (ms === void 0) { ms = 0; }\n var ready = useRef(false);\n var timeout = useRef();\n var callback = useRef(fn);\n var isReady = useCallback(function () { return ready.current; }, []);\n var set = useCallback(function () {\n ready.current = false;\n timeout.current && clearTimeout(timeout.current);\n timeout.current = setTimeout(function () {\n ready.current = true;\n callback.current();\n }, ms);\n }, [ms]);\n var clear = useCallback(function () {\n ready.current = null;\n timeout.current && clearTimeout(timeout.current);\n }, []);\n // update ref when function changes\n useEffect(function () {\n callback.current = fn;\n }, [fn]);\n // set on mount, clear on unmount\n useEffect(function () {\n set();\n return clear;\n }, [ms]);\n return [isReady, clear, set];\n}\n","import { useEffect, useRef } from 'react';\nvar useInterval = function (callback, delay) {\n var savedCallback = useRef(function () { });\n useEffect(function () {\n savedCallback.current = callback;\n });\n useEffect(function () {\n if (delay !== null) {\n var interval_1 = setInterval(function () { return savedCallback.current(); }, delay || 0);\n return function () { return clearInterval(interval_1); };\n }\n return undefined;\n }, [delay]);\n};\nexport default useInterval;\n"],"sourceRoot":""}