{"version":3,"file":"BaseAutosuggest.cjs","sources":["../../../../../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/index.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.production.min.js","../../../../../../node_modules/.pnpm/react-is@18.3.1/node_modules/react-is/cjs/react-is.development.js","../../../../../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js","../../../../../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js","../../../../../../node_modules/.pnpm/compute-scroll-into-view@3.1.1/node_modules/compute-scroll-into-view/dist/index.js","../../../../../../node_modules/.pnpm/downshift@9.4.0_react@18.3.1/node_modules/downshift/dist/downshift.esm.mjs","../../../../../../node_modules/.pnpm/@babel+runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../../src/components/autosuggest/BaseAutosuggest.tsx"],"sourcesContent":["function _objectWithoutPropertiesLoose(r, e) {\n  if (null == r) return {};\n  var t = {};\n  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n    if (-1 !== e.indexOf(n)) continue;\n    t[n] = r[n];\n  }\n  return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _extends() {\n  return _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","function _setPrototypeOf(t, e) {\n  return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n    return t.__proto__ = e, t;\n  }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n  module.exports = require('./cjs/react-is.production.min.js');\n} else {\n  module.exports = require('./cjs/react-is.development.js');\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","/**\n * @license React\n * react-is.development.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nif (process.env.NODE_ENV !== \"production\") {\n  (function() {\n'use strict';\n\n// ATTENTION\n// When adding new symbols to this file,\n// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'\n// The Symbol used to tag the ReactElement-like types.\nvar REACT_ELEMENT_TYPE = Symbol.for('react.element');\nvar REACT_PORTAL_TYPE = Symbol.for('react.portal');\nvar REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');\nvar REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');\nvar REACT_PROFILER_TYPE = Symbol.for('react.profiler');\nvar REACT_PROVIDER_TYPE = Symbol.for('react.provider');\nvar REACT_CONTEXT_TYPE = Symbol.for('react.context');\nvar REACT_SERVER_CONTEXT_TYPE = Symbol.for('react.server_context');\nvar REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');\nvar REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');\nvar REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');\nvar REACT_MEMO_TYPE = Symbol.for('react.memo');\nvar REACT_LAZY_TYPE = Symbol.for('react.lazy');\nvar REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');\n\n// -----------------------------------------------------------------------------\n\nvar enableScopeAPI = false; // Experimental Create Event Handle API.\nvar enableCacheElement = false;\nvar enableTransitionTracing = false; // No known bugs, but needs performance testing\n\nvar enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber\n// stuff. Intended to enable React core members to more easily debug scheduling\n// issues in DEV builds.\n\nvar enableDebugTracing = false; // Track which Fiber(s) schedule render work.\n\nvar REACT_MODULE_REFERENCE;\n\n{\n  REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');\n}\n\nfunction isValidElementType(type) {\n  if (typeof type === 'string' || typeof type === 'function') {\n    return true;\n  } // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).\n\n\n  if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing  || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden  || type === REACT_OFFSCREEN_TYPE || enableScopeAPI  || enableCacheElement  || enableTransitionTracing ) {\n    return true;\n  }\n\n  if (typeof type === 'object' && type !== null) {\n    if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object\n    // types supported by any Flight configuration anywhere since\n    // we don't know which Flight build this will end up being used\n    // with.\n    type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {\n      return true;\n    }\n  }\n\n  return false;\n}\n\nfunction typeOf(object) {\n  if (typeof object === 'object' && object !== null) {\n    var $$typeof = object.$$typeof;\n\n    switch ($$typeof) {\n      case REACT_ELEMENT_TYPE:\n        var type = object.type;\n\n        switch (type) {\n          case REACT_FRAGMENT_TYPE:\n          case REACT_PROFILER_TYPE:\n          case REACT_STRICT_MODE_TYPE:\n          case REACT_SUSPENSE_TYPE:\n          case REACT_SUSPENSE_LIST_TYPE:\n            return type;\n\n          default:\n            var $$typeofType = type && type.$$typeof;\n\n            switch ($$typeofType) {\n              case REACT_SERVER_CONTEXT_TYPE:\n              case REACT_CONTEXT_TYPE:\n              case REACT_FORWARD_REF_TYPE:\n              case REACT_LAZY_TYPE:\n              case REACT_MEMO_TYPE:\n              case REACT_PROVIDER_TYPE:\n                return $$typeofType;\n\n              default:\n                return $$typeof;\n            }\n\n        }\n\n      case REACT_PORTAL_TYPE:\n        return $$typeof;\n    }\n  }\n\n  return undefined;\n}\nvar ContextConsumer = REACT_CONTEXT_TYPE;\nvar ContextProvider = REACT_PROVIDER_TYPE;\nvar Element = REACT_ELEMENT_TYPE;\nvar ForwardRef = REACT_FORWARD_REF_TYPE;\nvar Fragment = REACT_FRAGMENT_TYPE;\nvar Lazy = REACT_LAZY_TYPE;\nvar Memo = REACT_MEMO_TYPE;\nvar Portal = REACT_PORTAL_TYPE;\nvar Profiler = REACT_PROFILER_TYPE;\nvar StrictMode = REACT_STRICT_MODE_TYPE;\nvar Suspense = REACT_SUSPENSE_TYPE;\nvar SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nvar hasWarnedAboutDeprecatedIsAsyncMode = false;\nvar hasWarnedAboutDeprecatedIsConcurrentMode = false; // AsyncMode should be deprecated\n\nfunction isAsyncMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsAsyncMode) {\n      hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint\n\n      console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n    }\n  }\n\n  return false;\n}\nfunction isConcurrentMode(object) {\n  {\n    if (!hasWarnedAboutDeprecatedIsConcurrentMode) {\n      hasWarnedAboutDeprecatedIsConcurrentMode = true; // Using console['warn'] to evade Babel and ESLint\n\n      console['warn']('The ReactIs.isConcurrentMode() alias has been deprecated, ' + 'and will be removed in React 18+.');\n    }\n  }\n\n  return false;\n}\nfunction isContextConsumer(object) {\n  return typeOf(object) === REACT_CONTEXT_TYPE;\n}\nfunction isContextProvider(object) {\n  return typeOf(object) === REACT_PROVIDER_TYPE;\n}\nfunction isElement(object) {\n  return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;\n}\nfunction isForwardRef(object) {\n  return typeOf(object) === REACT_FORWARD_REF_TYPE;\n}\nfunction isFragment(object) {\n  return typeOf(object) === REACT_FRAGMENT_TYPE;\n}\nfunction isLazy(object) {\n  return typeOf(object) === REACT_LAZY_TYPE;\n}\nfunction isMemo(object) {\n  return typeOf(object) === REACT_MEMO_TYPE;\n}\nfunction isPortal(object) {\n  return typeOf(object) === REACT_PORTAL_TYPE;\n}\nfunction isProfiler(object) {\n  return typeOf(object) === REACT_PROFILER_TYPE;\n}\nfunction isStrictMode(object) {\n  return typeOf(object) === REACT_STRICT_MODE_TYPE;\n}\nfunction isSuspense(object) {\n  return typeOf(object) === REACT_SUSPENSE_TYPE;\n}\nfunction isSuspenseList(object) {\n  return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n}\n\nexports.ContextConsumer = ContextConsumer;\nexports.ContextProvider = ContextProvider;\nexports.Element = Element;\nexports.ForwardRef = ForwardRef;\nexports.Fragment = Fragment;\nexports.Lazy = Lazy;\nexports.Memo = Memo;\nexports.Portal = Portal;\nexports.Profiler = Profiler;\nexports.StrictMode = StrictMode;\nexports.Suspense = Suspense;\nexports.SuspenseList = SuspenseList;\nexports.isAsyncMode = isAsyncMode;\nexports.isConcurrentMode = isConcurrentMode;\nexports.isContextConsumer = isContextConsumer;\nexports.isContextProvider = isContextProvider;\nexports.isElement = isElement;\nexports.isForwardRef = isForwardRef;\nexports.isFragment = isFragment;\nexports.isLazy = isLazy;\nexports.isMemo = isMemo;\nexports.isPortal = isPortal;\nexports.isProfiler = isProfiler;\nexports.isStrictMode = isStrictMode;\nexports.isSuspense = isSuspense;\nexports.isSuspenseList = isSuspenseList;\nexports.isValidElementType = isValidElementType;\nexports.typeOf = typeOf;\n  })();\n}\n","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc');  // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","module.exports = Function.call.bind(Object.prototype.hasOwnProperty);\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar has = require('./lib/has');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) {}\n  };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n  return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n  /* global Symbol */\n  var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n  var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n  /**\n   * Returns the iterator method function contained on the iterable object.\n   *\n   * Be sure to invoke the function with the iterable as context:\n   *\n   *     var iteratorFn = getIteratorFn(myIterable);\n   *     if (iteratorFn) {\n   *       var iterator = iteratorFn.call(myIterable);\n   *       ...\n   *     }\n   *\n   * @param {?object} maybeIterable\n   * @return {?function}\n   */\n  function getIteratorFn(maybeIterable) {\n    var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n    if (typeof iteratorFn === 'function') {\n      return iteratorFn;\n    }\n  }\n\n  /**\n   * Collection of methods that allow declaration and validation of props that are\n   * supplied to React components. Example usage:\n   *\n   *   var Props = require('ReactPropTypes');\n   *   var MyArticle = React.createClass({\n   *     propTypes: {\n   *       // An optional string prop named \"description\".\n   *       description: Props.string,\n   *\n   *       // A required enum prop named \"category\".\n   *       category: Props.oneOf(['News','Photos']).isRequired,\n   *\n   *       // A prop named \"dialog\" that requires an instance of Dialog.\n   *       dialog: Props.instanceOf(Dialog).isRequired\n   *     },\n   *     render: function() { ... }\n   *   });\n   *\n   * A more formal specification of how these methods are used:\n   *\n   *   type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n   *   decl := ReactPropTypes.{type}(.isRequired)?\n   *\n   * Each and every declaration produces a function with the same signature. This\n   * allows the creation of custom validation functions. For example:\n   *\n   *  var MyLink = React.createClass({\n   *    propTypes: {\n   *      // An optional string or URI prop named \"href\".\n   *      href: function(props, propName, componentName) {\n   *        var propValue = props[propName];\n   *        if (propValue != null && typeof propValue !== 'string' &&\n   *            !(propValue instanceof URI)) {\n   *          return new Error(\n   *            'Expected a string or an URI for ' + propName + ' in ' +\n   *            componentName\n   *          );\n   *        }\n   *      }\n   *    },\n   *    render: function() {...}\n   *  });\n   *\n   * @internal\n   */\n\n  var ANONYMOUS = '<<anonymous>>';\n\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n  var ReactPropTypes = {\n    array: createPrimitiveTypeChecker('array'),\n    bigint: createPrimitiveTypeChecker('bigint'),\n    bool: createPrimitiveTypeChecker('boolean'),\n    func: createPrimitiveTypeChecker('function'),\n    number: createPrimitiveTypeChecker('number'),\n    object: createPrimitiveTypeChecker('object'),\n    string: createPrimitiveTypeChecker('string'),\n    symbol: createPrimitiveTypeChecker('symbol'),\n\n    any: createAnyTypeChecker(),\n    arrayOf: createArrayOfTypeChecker,\n    element: createElementTypeChecker(),\n    elementType: createElementTypeTypeChecker(),\n    instanceOf: createInstanceTypeChecker,\n    node: createNodeChecker(),\n    objectOf: createObjectOfTypeChecker,\n    oneOf: createEnumTypeChecker,\n    oneOfType: createUnionTypeChecker,\n    shape: createShapeTypeChecker,\n    exact: createStrictShapeTypeChecker,\n  };\n\n  /**\n   * inlined Object.is polyfill to avoid requiring consumers ship their own\n   * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n   */\n  /*eslint-disable no-self-compare*/\n  function is(x, y) {\n    // SameValue algorithm\n    if (x === y) {\n      // Steps 1-5, 7-10\n      // Steps 6.b-6.e: +0 != -0\n      return x !== 0 || 1 / x === 1 / y;\n    } else {\n      // Step 6.a: NaN == NaN\n      return x !== x && y !== y;\n    }\n  }\n  /*eslint-enable no-self-compare*/\n\n  /**\n   * We use an Error-like object for backward compatibility as people may call\n   * PropTypes directly and inspect their output. However, we don't use real\n   * Errors anymore. We don't inspect their stack anyway, and creating them\n   * is prohibitively expensive if they are created too often, such as what\n   * happens in oneOfType() for any type before the one that matched.\n   */\n  function PropTypeError(message, data) {\n    this.message = message;\n    this.data = data && typeof data === 'object' ? data: {};\n    this.stack = '';\n  }\n  // Make `instanceof Error` still work for returned errors.\n  PropTypeError.prototype = Error.prototype;\n\n  function createChainableTypeChecker(validate) {\n    if (process.env.NODE_ENV !== 'production') {\n      var manualPropTypeCallCache = {};\n      var manualPropTypeWarningCount = 0;\n    }\n    function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n      componentName = componentName || ANONYMOUS;\n      propFullName = propFullName || propName;\n\n      if (secret !== ReactPropTypesSecret) {\n        if (throwOnDirectAccess) {\n          // New behavior only for users of `prop-types` package\n          var err = new Error(\n            'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n            'Use `PropTypes.checkPropTypes()` to call them. ' +\n            'Read more at http://fb.me/use-check-prop-types'\n          );\n          err.name = 'Invariant Violation';\n          throw err;\n        } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n          // Old behavior for people using React.PropTypes\n          var cacheKey = componentName + ':' + propName;\n          if (\n            !manualPropTypeCallCache[cacheKey] &&\n            // Avoid spamming the console because they are often not actionable except for lib authors\n            manualPropTypeWarningCount < 3\n          ) {\n            printWarning(\n              'You are manually calling a React.PropTypes validation ' +\n              'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n              'and will throw in the standalone `prop-types` package. ' +\n              'You may be seeing this warning due to a third-party PropTypes ' +\n              'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n            );\n            manualPropTypeCallCache[cacheKey] = true;\n            manualPropTypeWarningCount++;\n          }\n        }\n      }\n      if (props[propName] == null) {\n        if (isRequired) {\n          if (props[propName] === null) {\n            return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n          }\n          return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n        }\n        return null;\n      } else {\n        return validate(props, propName, componentName, location, propFullName);\n      }\n    }\n\n    var chainedCheckType = checkType.bind(null, false);\n    chainedCheckType.isRequired = checkType.bind(null, true);\n\n    return chainedCheckType;\n  }\n\n  function createPrimitiveTypeChecker(expectedType) {\n    function validate(props, propName, componentName, location, propFullName, secret) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== expectedType) {\n        // `propValue` being instance of, say, date/regexp, pass the 'object'\n        // check, but we can offer a more precise error message here rather than\n        // 'of type `object`'.\n        var preciseType = getPreciseType(propValue);\n\n        return new PropTypeError(\n          'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),\n          {expectedType: expectedType}\n        );\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createAnyTypeChecker() {\n    return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n  }\n\n  function createArrayOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n      }\n      var propValue = props[propName];\n      if (!Array.isArray(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n      }\n      for (var i = 0; i < propValue.length; i++) {\n        var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n        if (error instanceof Error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!isValidElement(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createElementTypeTypeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      if (!ReactIs.isValidElementType(propValue)) {\n        var propType = getPropType(propValue);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createInstanceTypeChecker(expectedClass) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!(props[propName] instanceof expectedClass)) {\n        var expectedClassName = expectedClass.name || ANONYMOUS;\n        var actualClassName = getClassName(props[propName]);\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createEnumTypeChecker(expectedValues) {\n    if (!Array.isArray(expectedValues)) {\n      if (process.env.NODE_ENV !== 'production') {\n        if (arguments.length > 1) {\n          printWarning(\n            'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n            'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n          );\n        } else {\n          printWarning('Invalid argument supplied to oneOf, expected an array.');\n        }\n      }\n      return emptyFunctionThatReturnsNull;\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      for (var i = 0; i < expectedValues.length; i++) {\n        if (is(propValue, expectedValues[i])) {\n          return null;\n        }\n      }\n\n      var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n        var type = getPreciseType(value);\n        if (type === 'symbol') {\n          return String(value);\n        }\n        return value;\n      });\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createObjectOfTypeChecker(typeChecker) {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (typeof typeChecker !== 'function') {\n        return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n      }\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n      }\n      for (var key in propValue) {\n        if (has(propValue, key)) {\n          var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n          if (error instanceof Error) {\n            return error;\n          }\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createUnionTypeChecker(arrayOfTypeCheckers) {\n    if (!Array.isArray(arrayOfTypeCheckers)) {\n      process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n      return emptyFunctionThatReturnsNull;\n    }\n\n    for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n      var checker = arrayOfTypeCheckers[i];\n      if (typeof checker !== 'function') {\n        printWarning(\n          'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n          'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n        );\n        return emptyFunctionThatReturnsNull;\n      }\n    }\n\n    function validate(props, propName, componentName, location, propFullName) {\n      var expectedTypes = [];\n      for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n        var checker = arrayOfTypeCheckers[i];\n        var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);\n        if (checkerResult == null) {\n          return null;\n        }\n        if (checkerResult.data && has(checkerResult.data, 'expectedType')) {\n          expectedTypes.push(checkerResult.data.expectedType);\n        }\n      }\n      var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';\n      return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createNodeChecker() {\n    function validate(props, propName, componentName, location, propFullName) {\n      if (!isNode(props[propName])) {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function invalidValidatorError(componentName, location, propFullName, key, type) {\n    return new PropTypeError(\n      (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +\n      'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'\n    );\n  }\n\n  function createShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      for (var key in shapeTypes) {\n        var checker = shapeTypes[key];\n        if (typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n    return createChainableTypeChecker(validate);\n  }\n\n  function createStrictShapeTypeChecker(shapeTypes) {\n    function validate(props, propName, componentName, location, propFullName) {\n      var propValue = props[propName];\n      var propType = getPropType(propValue);\n      if (propType !== 'object') {\n        return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n      }\n      // We need to check all keys in case some are required but missing from props.\n      var allKeys = assign({}, props[propName], shapeTypes);\n      for (var key in allKeys) {\n        var checker = shapeTypes[key];\n        if (has(shapeTypes, key) && typeof checker !== 'function') {\n          return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));\n        }\n        if (!checker) {\n          return new PropTypeError(\n            'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n            '\\nBad object: ' + JSON.stringify(props[propName], null, '  ') +\n            '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, '  ')\n          );\n        }\n        var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n        if (error) {\n          return error;\n        }\n      }\n      return null;\n    }\n\n    return createChainableTypeChecker(validate);\n  }\n\n  function isNode(propValue) {\n    switch (typeof propValue) {\n      case 'number':\n      case 'string':\n      case 'undefined':\n        return true;\n      case 'boolean':\n        return !propValue;\n      case 'object':\n        if (Array.isArray(propValue)) {\n          return propValue.every(isNode);\n        }\n        if (propValue === null || isValidElement(propValue)) {\n          return true;\n        }\n\n        var iteratorFn = getIteratorFn(propValue);\n        if (iteratorFn) {\n          var iterator = iteratorFn.call(propValue);\n          var step;\n          if (iteratorFn !== propValue.entries) {\n            while (!(step = iterator.next()).done) {\n              if (!isNode(step.value)) {\n                return false;\n              }\n            }\n          } else {\n            // Iterator will provide entry [k,v] tuples rather than values.\n            while (!(step = iterator.next()).done) {\n              var entry = step.value;\n              if (entry) {\n                if (!isNode(entry[1])) {\n                  return false;\n                }\n              }\n            }\n          }\n        } else {\n          return false;\n        }\n\n        return true;\n      default:\n        return false;\n    }\n  }\n\n  function isSymbol(propType, propValue) {\n    // Native Symbol.\n    if (propType === 'symbol') {\n      return true;\n    }\n\n    // falsy value can't be a Symbol\n    if (!propValue) {\n      return false;\n    }\n\n    // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n    if (propValue['@@toStringTag'] === 'Symbol') {\n      return true;\n    }\n\n    // Fallback for non-spec compliant Symbols which are polyfilled.\n    if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n      return true;\n    }\n\n    return false;\n  }\n\n  // Equivalent of `typeof` but with special handling for array and regexp.\n  function getPropType(propValue) {\n    var propType = typeof propValue;\n    if (Array.isArray(propValue)) {\n      return 'array';\n    }\n    if (propValue instanceof RegExp) {\n      // Old webkits (at least until Android 4.0) return 'function' rather than\n      // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n      // passes PropTypes.object.\n      return 'object';\n    }\n    if (isSymbol(propType, propValue)) {\n      return 'symbol';\n    }\n    return propType;\n  }\n\n  // This handles more types than `getPropType`. Only used for error messages.\n  // See `createPrimitiveTypeChecker`.\n  function getPreciseType(propValue) {\n    if (typeof propValue === 'undefined' || propValue === null) {\n      return '' + propValue;\n    }\n    var propType = getPropType(propValue);\n    if (propType === 'object') {\n      if (propValue instanceof Date) {\n        return 'date';\n      } else if (propValue instanceof RegExp) {\n        return 'regexp';\n      }\n    }\n    return propType;\n  }\n\n  // Returns a string that is postfixed to a warning about an invalid type.\n  // For example, \"undefined\" or \"of type array\"\n  function getPostfixForTypeWarning(value) {\n    var type = getPreciseType(value);\n    switch (type) {\n      case 'array':\n      case 'object':\n        return 'an ' + type;\n      case 'boolean':\n      case 'date':\n      case 'regexp':\n        return 'a ' + type;\n      default:\n        return type;\n    }\n  }\n\n  // Returns class name of the object, if any.\n  function getClassName(propValue) {\n    if (!propValue.constructor || !propValue.constructor.name) {\n      return ANONYMOUS;\n    }\n    return propValue.constructor.name;\n  }\n\n  ReactPropTypes.checkPropTypes = checkPropTypes;\n  ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n  var loggedTypeFailures = {};\n  var has = require('./lib/has');\n\n  printWarning = function(text) {\n    var message = 'Warning: ' + text;\n    if (typeof console !== 'undefined') {\n      console.error(message);\n    }\n    try {\n      // --- Welcome to debugging React ---\n      // This error was thrown as a convenience so that you can use this stack\n      // to find the callsite that caused this warning to fire.\n      throw new Error(message);\n    } catch (x) { /**/ }\n  };\n}\n\n/**\n * Assert that the values match with the type specs.\n * Error messages are memorized and will only be shown once.\n *\n * @param {object} typeSpecs Map of name to a ReactPropType\n * @param {object} values Runtime values that need to be type-checked\n * @param {string} location e.g. \"prop\", \"context\", \"child context\"\n * @param {string} componentName Name of the component for error messages.\n * @param {?Function} getStack Returns the component stack.\n * @private\n */\nfunction checkPropTypes(typeSpecs, values, location, componentName, getStack) {\n  if (process.env.NODE_ENV !== 'production') {\n    for (var typeSpecName in typeSpecs) {\n      if (has(typeSpecs, typeSpecName)) {\n        var error;\n        // Prop type validation may throw. In case they do, we don't want to\n        // fail the render phase where it didn't fail before. So we log it.\n        // After these have been cleaned up, we'll let them throw.\n        try {\n          // This is intentionally an invariant that gets caught. It's the same\n          // behavior as without this statement except with a better message.\n          if (typeof typeSpecs[typeSpecName] !== 'function') {\n            var err = Error(\n              (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +\n              'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +\n              'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'\n            );\n            err.name = 'Invariant Violation';\n            throw err;\n          }\n          error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);\n        } catch (ex) {\n          error = ex;\n        }\n        if (error && !(error instanceof Error)) {\n          printWarning(\n            (componentName || 'React class') + ': type specification of ' +\n            location + ' `' + typeSpecName + '` is invalid; the type checker ' +\n            'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +\n            'You may have forgotten to pass an argument to the type checker ' +\n            'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +\n            'shape all require an argument).'\n          );\n        }\n        if (error instanceof Error && !(error.message in loggedTypeFailures)) {\n          // Only monitor this failure once because there tends to be a lot of the\n          // same error.\n          loggedTypeFailures[error.message] = true;\n\n          var stack = getStack ? getStack() : '';\n\n          printWarning(\n            'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')\n          );\n        }\n      }\n    }\n  }\n}\n\n/**\n * Resets warning cache when testing.\n *\n * @private\n */\ncheckPropTypes.resetWarningCache = function() {\n  if (process.env.NODE_ENV !== 'production') {\n    loggedTypeFailures = {};\n  }\n}\n\nmodule.exports = checkPropTypes;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n  var ReactIs = require('react-is');\n\n  // By explicitly using `prop-types` you are opting into new development behavior.\n  // http://fb.me/prop-types-in-prod\n  var throwOnDirectAccess = true;\n  module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n  // By explicitly using `prop-types` you are opting into new production behavior.\n  // http://fb.me/prop-types-in-prod\n  module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n  function shim(props, propName, componentName, location, propFullName, secret) {\n    if (secret === ReactPropTypesSecret) {\n      // It is still safe when called from React.\n      return;\n    }\n    var err = new Error(\n      'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n      'Use PropTypes.checkPropTypes() to call them. ' +\n      'Read more at http://fb.me/use-check-prop-types'\n    );\n    err.name = 'Invariant Violation';\n    throw err;\n  };\n  shim.isRequired = shim;\n  function getShim() {\n    return shim;\n  };\n  // Important!\n  // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n  var ReactPropTypes = {\n    array: shim,\n    bigint: shim,\n    bool: shim,\n    func: shim,\n    number: shim,\n    object: shim,\n    string: shim,\n    symbol: shim,\n\n    any: shim,\n    arrayOf: getShim,\n    element: shim,\n    elementType: shim,\n    instanceOf: getShim,\n    node: shim,\n    objectOf: getShim,\n    oneOf: getShim,\n    oneOfType: getShim,\n    shape: getShim,\n    exact: getShim,\n\n    checkPropTypes: emptyFunctionWithReset,\n    resetWarningCache: emptyFunction\n  };\n\n  ReactPropTypes.PropTypes = ReactPropTypes;\n\n  return ReactPropTypes;\n};\n","const t=t=>\"object\"==typeof t&&null!=t&&1===t.nodeType,e=(t,e)=>(!e||\"hidden\"!==t)&&(\"visible\"!==t&&\"clip\"!==t),n=(t,n)=>{if(t.clientHeight<t.scrollHeight||t.clientWidth<t.scrollWidth){const o=getComputedStyle(t,null);return e(o.overflowY,n)||e(o.overflowX,n)||(t=>{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeight<t.scrollHeight||e.clientWidth<t.scrollWidth)})(t)}return!1},o=(t,e,n,o,l,r,i,s)=>r<t&&i>e||r>t&&i<e?0:r<=t&&s<=n||i>=e&&s>=n?r-t-o:i>e&&s<n||r<t&&s>n?i-e+l:0,l=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},r=(e,r)=>{var i,s,d,h;if(\"undefined\"==typeof document)return[];const{scrollMode:c,block:f,inline:u,boundary:a,skipOverflowHiddenElements:g}=r,p=\"function\"==typeof a?a:t=>t!==a;if(!t(e))throw new TypeError(\"Invalid target\");const m=document.scrollingElement||document.documentElement,w=[];let W=e;for(;t(W)&&p(W);){if(W=l(W),W===m){w.push(W);break}null!=W&&W===document.body&&n(W)&&!n(document.documentElement)||null!=W&&n(W,g)&&w.push(W)}const b=null!=(s=null==(i=window.visualViewport)?void 0:i.width)?s:innerWidth,H=null!=(h=null==(d=window.visualViewport)?void 0:d.height)?h:innerHeight,{scrollX:y,scrollY:M}=window,{height:v,width:E,top:x,right:C,bottom:I,left:R}=e.getBoundingClientRect(),{top:T,right:B,bottom:F,left:V}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(e);let k=\"start\"===f||\"nearest\"===f?x-T:\"end\"===f?I+F:x+v/2-T+F,D=\"center\"===u?R+E/2-V+B:\"end\"===u?C+B:R-V;const L=[];for(let t=0;t<w.length;t++){const e=w[t],{height:l,width:r,top:i,right:s,bottom:d,left:h}=e.getBoundingClientRect();if(\"if-needed\"===c&&x>=0&&R>=0&&I<=H&&C<=b&&(e===m&&!n(e)||x>=i&&I<=d&&R>=h&&C<=s))return L;const a=getComputedStyle(e),g=parseInt(a.borderLeftWidth,10),p=parseInt(a.borderTopWidth,10),W=parseInt(a.borderRightWidth,10),T=parseInt(a.borderBottomWidth,10);let B=0,F=0;const V=\"offsetWidth\"in e?e.offsetWidth-e.clientWidth-g-W:0,S=\"offsetHeight\"in e?e.offsetHeight-e.clientHeight-p-T:0,X=\"offsetWidth\"in e?0===e.offsetWidth?0:r/e.offsetWidth:0,Y=\"offsetHeight\"in e?0===e.offsetHeight?0:l/e.offsetHeight:0;if(m===e)B=\"start\"===f?k:\"end\"===f?k-H:\"nearest\"===f?o(M,M+H,H,p,T,M+k,M+k+v,v):k-H/2,F=\"start\"===u?D:\"center\"===u?D-b/2:\"end\"===u?D-b:o(y,y+b,b,g,W,y+D,y+D+E,E),B=Math.max(0,B+M),F=Math.max(0,F+y);else{B=\"start\"===f?k-i-p:\"end\"===f?k-d+T+S:\"nearest\"===f?o(i,d,l,p,T+S,k,k+v,v):k-(i+l/2)+S/2,F=\"start\"===u?D-h-g:\"center\"===u?D-(h+r/2)+V/2:\"end\"===u?D-s+W+V:o(h,s,r,g,W+V,D,D+E,E);const{scrollLeft:t,scrollTop:n}=e;B=0===Y?0:Math.max(0,Math.min(n+B/Y,e.scrollHeight-l/Y+S)),F=0===X?0:Math.max(0,Math.min(t+F/X,e.scrollWidth-r/X+V)),k+=n-B,D+=t-F}L.push({el:e,top:B,left:F})}return L};export{r as compute};//# sourceMappingURL=index.js.map\n","import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport PropTypes from 'prop-types';\nimport * as React from 'react';\nimport { cloneElement, Component, useRef, useEffect, useCallback, useMemo } from 'react';\nimport { isForwardRef } from 'react-is';\nimport { compute } from 'compute-scroll-into-view';\n\nvar unknown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_unknown__' : 0;\nvar mouseUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_mouseup__' : 1;\nvar itemMouseEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_item_mouseenter__' : 2;\nvar keyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_up__' : 3;\nvar keyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_down__' : 4;\nvar keyDownEscape = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_escape__' : 5;\nvar keyDownEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_enter__' : 6;\nvar keyDownHome = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_home__' : 7;\nvar keyDownEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_end__' : 8;\nvar clickItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_item__' : 9;\nvar blurInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_input__' : 10;\nvar changeInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_change_input__' : 11;\nvar keyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_space_button__' : 12;\nvar clickButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_button__' : 13;\nvar blurButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_button__' : 14;\nvar controlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_controlled_prop_updated_selected_item__' : 15;\nvar touchEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_touchend__' : 16;\n\nvar stateChangeTypes$4 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  blurButton: blurButton,\n  blurInput: blurInput,\n  changeInput: changeInput,\n  clickButton: clickButton,\n  clickItem: clickItem,\n  controlledPropUpdatedSelectedItem: controlledPropUpdatedSelectedItem,\n  itemMouseEnter: itemMouseEnter,\n  keyDownArrowDown: keyDownArrowDown,\n  keyDownArrowUp: keyDownArrowUp,\n  keyDownEnd: keyDownEnd,\n  keyDownEnter: keyDownEnter,\n  keyDownEscape: keyDownEscape,\n  keyDownHome: keyDownHome,\n  keyDownSpaceButton: keyDownSpaceButton,\n  mouseUp: mouseUp,\n  touchEnd: touchEnd,\n  unknown: unknown\n});\n\nvar idCounter = 0;\n\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {string} the unique ID\n */\nfunction generateId() {\n  return String(idCounter++);\n}\n\n/**\n * Resets idCounter to 0. Used for SSR.\n */\nfunction resetIdCounter() {\n  // istanbul ignore next\n  if ('useId' in React) {\n    console.warn(\"It is not necessary to call resetIdCounter when using React 18+\");\n    return;\n  }\n  idCounter = 0;\n}\n\n// istanbul ignore next\nvar canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';\n\n// React Native supports layout effects even though it does not have a DOM.\n// istanbul ignore next\nvar useIsomorphicLayoutEffect = canUseDOM || false ? React.useLayoutEffect : React.useEffect;\n\nfunction useLatestRef(value) {\n  var ref = React.useRef(value);\n  useIsomorphicLayoutEffect(function () {\n    ref.current = value;\n  }, [value]);\n  return ref;\n}\n\nfunction handleRefs() {\n  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n    refs[_key] = arguments[_key];\n  }\n  return function (node) {\n    refs.forEach(function (ref) {\n      if (typeof ref === 'function') {\n        ref(node);\n      } else if (ref) {\n        ref.current = node;\n      }\n    });\n  };\n}\n\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param fns the event handler functions\n * @return the event handler to add to an element\n */\nfunction callAllEventHandlers() {\n  for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {\n    fns[_key] = arguments[_key];\n  }\n  return function (event) {\n    for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n      args[_key2 - 1] = arguments[_key2];\n    }\n    return fns.some(function (fn) {\n      if (fn) {\n        fn.apply(void 0, [event].concat(args));\n      }\n      return event.preventDownshiftDefault || event.hasOwnProperty('nativeEvent') && event.nativeEvent.preventDownshiftDefault;\n    });\n  };\n}\n\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n */\nfunction debounce(fn, time) {\n  var timeoutId;\n  function cancel() {\n    if (timeoutId) {\n      clearTimeout(timeoutId);\n    }\n  }\n  function wrapper() {\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n    cancel();\n    timeoutId = setTimeout(function () {\n      timeoutId = null;\n      fn.apply(void 0, args);\n    }, time);\n  }\n  wrapper.cancel = cancel;\n  return wrapper;\n}\n\nvar cleanupStatus = debounce(function (document) {\n  getStatusDiv(document).textContent = '';\n}, 500);\n\n/**\n * Get the status node or create it if it does not already exist.\n */\nfunction getStatusDiv(document) {\n  var statusDiv = document.getElementById('a11y-status-message');\n  if (statusDiv) {\n    return statusDiv;\n  }\n  statusDiv = document.createElement('div');\n  statusDiv.setAttribute('id', 'a11y-status-message');\n  statusDiv.setAttribute('role', 'status');\n  statusDiv.setAttribute('aria-live', 'polite');\n  statusDiv.setAttribute('aria-relevant', 'additions text');\n  Object.assign(statusDiv.style, {\n    border: '0',\n    clip: 'rect(0 0 0 0)',\n    height: '1px',\n    margin: '-1px',\n    overflow: 'hidden',\n    padding: '0',\n    position: 'absolute',\n    width: '1px'\n  });\n  document.body.appendChild(statusDiv);\n  return statusDiv;\n}\n\n/**\n * Sets aria live status to a div element that's visually hidden.\n */\nfunction setStatus(status, document) {\n  if (!status || !document) {\n    return;\n  }\n  var div = getStatusDiv(document);\n  div.textContent = status;\n  cleanupStatus(document);\n}\n\n/**\n * Removes the status element from the DOM\n */\nfunction cleanupStatusDiv(document) {\n  var statusDiv = document == null ? void 0 : document.getElementById('a11y-status-message');\n  if (statusDiv) {\n    statusDiv.remove();\n  }\n}\n\nfunction noop() {}\n\n// eslint-disable-next-line import/no-mutable-exports\nvar validatePropTypes$1 = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n  validatePropTypes$1 = function validatePropTypes(options, caller, propTypes) {\n    PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name);\n  };\n}\n\n/**\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param state The state of the component/hook.\n * @param props The props that may contain controlled values.\n * @returns The merged controlled state.\n */\nfunction getState(state, props) {\n  if (!props) {\n    return state;\n  }\n  var keys = Object.keys(state);\n  return keys.reduce(function (newState, key) {\n    // state keys could be in props, but with value undefined, which means they should be ignored.\n    // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n    if (props[key] !== undefined) {\n      newState[key] = props[key];\n    }\n    return newState;\n  }, _extends({}, state));\n}\n\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node the element that should scroll into view\n * @param {HTMLElement} menuNode the menu element of the component\n */\nfunction scrollIntoView(node, menuNode) {\n  if (!node) {\n    return;\n  }\n  var actions = compute(node, {\n    boundary: menuNode,\n    block: 'nearest',\n    scrollMode: 'if-needed'\n  });\n  actions.forEach(function (_ref) {\n    var el = _ref.el,\n      top = _ref.top,\n      left = _ref.left;\n    el.scrollTop = top;\n    el.scrollLeft = left;\n  });\n}\n\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param event a keyboardEvent object\n * @return keyboard key\n */\nfunction normalizeArrowKey(event) {\n  var key = event.key,\n    keyCode = event.keyCode;\n  /* istanbul ignore next (ie) */\n  if (keyCode >= 37 && keyCode <= 40 && !key.startsWith('Arrow')) {\n    return \"Arrow\" + key;\n  }\n  return key;\n}\n\n/**\n * Returns the next non-disabled highlightedIndex value.\n *\n * @param start The current highlightedIndex.\n * @param backwards If true, it will search backwards from the start.\n * @param items The items array.\n * @param isItemDisabled Function that tells if an item is disabled or not.\n * @param circular If the search reaches the end, if it can search again starting from the other end.\n * @returns The next non-disabled index.\n */\nfunction getNonDisabledIndex(start, backwards, items, isItemDisabled, circular) {\n  if (circular === void 0) {\n    circular = false;\n  }\n  var count = items.length;\n  if (backwards) {\n    for (var index = start; index >= 0; index--) {\n      if (!isItemDisabled(items[index], index)) {\n        return index;\n      }\n    }\n  } else {\n    for (var _index = start; _index < count; _index++) {\n      if (!isItemDisabled(items[_index], _index)) {\n        return _index;\n      }\n    }\n  }\n  if (circular) {\n    return getNonDisabledIndex(backwards ? count - 1 : 0, backwards, items, isItemDisabled);\n  }\n  return -1;\n}\n\n/**\n * Returns the next non-disabled highlightedIndex value.\n *\n * @param start The current highlightedIndex.\n * @param offset The offset from the current highlightedIndex to start searching.\n * @param items The items array.\n * @param isItemDisabled Function that tells if an item is disabled or not.\n * @param circular If the search reaches the end, if it can search again starting from the other end.\n * @returns The next highlightedIndex.\n */\nfunction getHighlightedIndex(start, offset, items, isItemDisabled, circular) {\n  if (circular === void 0) {\n    circular = false;\n  }\n  var count = items.length;\n  if (count === 0) {\n    return -1;\n  }\n  var itemsLastIndex = count - 1;\n  if (typeof start !== 'number' || start < 0 || start > itemsLastIndex) {\n    start = offset > 0 ? -1 : itemsLastIndex + 1;\n  }\n  var current = start + offset;\n  if (current < 0) {\n    current = circular ? itemsLastIndex : 0;\n  } else if (current > itemsLastIndex) {\n    current = circular ? 0 : itemsLastIndex;\n  }\n  var highlightedIndex = getNonDisabledIndex(current, offset < 0, items, isItemDisabled, circular);\n  if (highlightedIndex === -1) {\n    return start >= count ? -1 : start;\n  }\n  return highlightedIndex;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\n// eslint-disable-next-line import/no-mutable-exports\nvar validateControlledUnchanged = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n  validateControlledUnchanged = function validateControlledUnchanged(state, prevProps, nextProps) {\n    var warningDescription = \"This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props\";\n    Object.keys(state).forEach(function (propKey) {\n      if (prevProps[propKey] !== undefined && nextProps[propKey] === undefined) {\n        // eslint-disable-next-line no-console\n        console.error(\"downshift: A component has changed the controlled prop \\\"\" + propKey + \"\\\" to be uncontrolled. \" + warningDescription);\n      } else if (prevProps[propKey] === undefined && nextProps[propKey] !== undefined) {\n        // eslint-disable-next-line no-console\n        console.error(\"downshift: A component has changed the uncontrolled prop \\\"\" + propKey + \"\\\" to be controlled. \" + warningDescription);\n      }\n    });\n  };\n}\n\n/**\n * Checks if event target is within the downshift elements.\n *\n * @param target Target to check.\n * @param downshiftElements The elements that form downshift (list, toggle button etc).\n * @param environment The window context where downshift renders.\n * @param checkActiveElement Whether to also check activeElement.\n *\n * @returns Whether or not the target is within downshift elements.\n */\nfunction targetWithinDownshift(target, downshiftElements, environment, checkActiveElement) {\n  if (checkActiveElement === void 0) {\n    checkActiveElement = true;\n  }\n  return !!environment && downshiftElements.some(function (contextNode) {\n    return contextNode && (isOrContainsNode(contextNode, target, environment) || checkActiveElement && isOrContainsNode(contextNode, environment.document.activeElement, environment));\n  });\n}\n\n/**\n * @param parent the parent node\n * @param child the child node\n * @param environment The window context where downshift renders.\n * @return Whether the parent is the child or the child is in the parent\n */\nfunction isOrContainsNode(parent, child, environment) {\n  var result = parent === child || child instanceof environment.Node && parent.contains(child);\n  return result;\n}\n\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\nfunction cbToCb(cb) {\n  return typeof cb === 'function' ? cb : noop;\n}\n\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specify if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage(_ref) {\n  var isOpen = _ref.isOpen,\n    resultCount = _ref.resultCount,\n    previousResultCount = _ref.previousResultCount;\n  if (!isOpen) {\n    return '';\n  }\n  if (!resultCount) {\n    return 'No results are available.';\n  }\n  if (resultCount !== previousResultCount) {\n    return resultCount + \" result\" + (resultCount === 1 ? ' is' : 's are') + \" available, use up and down arrow keys to navigate. Press Enter key to select.\";\n  }\n  return '';\n}\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\nfunction unwrapArray(arg, defaultValue) {\n  arg = Array.isArray(arg) ? /* istanbul ignore next (preact) */arg[0] : arg;\n  if (!arg && defaultValue) {\n    return defaultValue;\n  } else {\n    return arg;\n  }\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\nfunction isDOMElement(element) {\n\n  // then we assume this is react\n  return typeof element.type === 'string';\n}\n\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\nfunction getElementProps(element) {\n  return element.props;\n}\n\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\nfunction requiredProp(fnName, propName) {\n  // eslint-disable-next-line no-console\n  console.error(\"The property \\\"\" + propName + \"\\\" is required in \\\"\" + fnName + \"\\\"\");\n}\nvar stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type'];\n/**\n * @param {Object} state the state object\n * @return {Object} state that is relevant to downshift\n */\nfunction pickState(state) {\n  if (state === void 0) {\n    state = {};\n  }\n  var result = {};\n  stateKeys.forEach(function (k) {\n    if (state.hasOwnProperty(k)) {\n      result[k] = state[k];\n    }\n  });\n  return result;\n}\n\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\nfunction isPlainObject(obj) {\n  return Object.prototype.toString.call(obj) === '[object Object]';\n}\n\nvar _excluded$4 = [\"refKey\", \"ref\"],\n  _excluded2$4 = [\"onClick\", \"onPress\", \"onKeyDown\", \"onKeyUp\", \"onBlur\"],\n  _excluded3$3 = [\"onKeyDown\", \"onBlur\", \"onChange\", \"onInput\", \"onChangeText\"],\n  _excluded4$2 = [\"refKey\", \"ref\"],\n  _excluded5 = [\"onMouseMove\", \"onMouseDown\", \"onClick\", \"onPress\", \"index\", \"item\"];\nvar Downshift = /*#__PURE__*/function () {\n  var Downshift = /*#__PURE__*/function (_Component) {\n    function Downshift(_props) {\n      var _this;\n      _this = _Component.call(this, _props) || this;\n      // fancy destructuring + defaults + aliases\n      // this basically says each value of state should either be set to\n      // the initial value or the default value if the initial value is not provided\n      _this.id = _this.props.id || \"downshift-\" + generateId();\n      _this.menuId = _this.props.menuId || _this.id + \"-menu\";\n      _this.labelId = _this.props.labelId || _this.id + \"-label\";\n      _this.inputId = _this.props.inputId || _this.id + \"-input\";\n      _this.getItemId = _this.props.getItemId || function (index) {\n        return _this.id + \"-item-\" + index;\n      };\n      _this.items = [];\n      // itemCount can be changed asynchronously\n      // from within downshift (so it can't come from a prop)\n      // this is why we store it as an instance and use\n      // getItemCount rather than just use items.length\n      // (to support windowing + async)\n      _this.itemCount = null;\n      _this.previousResultCount = 0;\n      _this.timeoutIds = [];\n      /**\n       * @param {Function} fn the function to call after the time\n       * @param {Number} time the time to wait\n       */\n      _this.internalSetTimeout = function (fn, time) {\n        var id = setTimeout(function () {\n          _this.timeoutIds = _this.timeoutIds.filter(function (i) {\n            return i !== id;\n          });\n          fn();\n        }, time);\n        _this.timeoutIds.push(id);\n      };\n      _this.setItemCount = function (count) {\n        _this.itemCount = count;\n      };\n      _this.unsetItemCount = function () {\n        _this.itemCount = null;\n      };\n      _this.isItemDisabled = function (_item, index) {\n        var currentElementNode = _this.getItemNodeFromIndex(index);\n        return currentElementNode && currentElementNode.hasAttribute('disabled');\n      };\n      _this.setHighlightedIndex = function (highlightedIndex, otherStateToSet) {\n        if (highlightedIndex === void 0) {\n          highlightedIndex = _this.props.defaultHighlightedIndex;\n        }\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n        otherStateToSet = pickState(otherStateToSet);\n        _this.internalSetState(_extends({\n          highlightedIndex: highlightedIndex\n        }, otherStateToSet));\n      };\n      _this.clearSelection = function (cb) {\n        _this.internalSetState({\n          selectedItem: null,\n          inputValue: '',\n          highlightedIndex: _this.props.defaultHighlightedIndex,\n          isOpen: _this.props.defaultIsOpen\n        }, cb);\n      };\n      _this.selectItem = function (item, otherStateToSet, cb) {\n        otherStateToSet = pickState(otherStateToSet);\n        _this.internalSetState(_extends({\n          isOpen: _this.props.defaultIsOpen,\n          highlightedIndex: _this.props.defaultHighlightedIndex,\n          selectedItem: item,\n          inputValue: _this.props.itemToString(item)\n        }, otherStateToSet), cb);\n      };\n      _this.selectItemAtIndex = function (itemIndex, otherStateToSet, cb) {\n        var item = _this.items[itemIndex];\n        if (item == null) {\n          return;\n        }\n        _this.selectItem(item, otherStateToSet, cb);\n      };\n      _this.selectHighlightedItem = function (otherStateToSet, cb) {\n        return _this.selectItemAtIndex(_this.getState().highlightedIndex, otherStateToSet, cb);\n      };\n      // any piece of our state can live in two places:\n      // 1. Uncontrolled: it's internal (this.state)\n      //    We will call this.setState to update that state\n      // 2. Controlled: it's external (this.props)\n      //    We will call this.props.onStateChange to update that state\n      //\n      // In addition, we'll call this.props.onChange if the\n      // selectedItem is changed.\n      _this.internalSetState = function (stateToSet, cb) {\n        var isItemSelected, onChangeArg;\n        var onStateChangeArg = {};\n        var isStateToSetFunction = typeof stateToSet === 'function';\n\n        // we want to call `onInputValueChange` before the `setState` call\n        // so someone controlling the `inputValue` state gets notified of\n        // the input change as soon as possible. This avoids issues with\n        // preserving the cursor position.\n        // See https://github.com/downshift-js/downshift/issues/217 for more info.\n        if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n          _this.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), stateToSet));\n        }\n        return _this.setState(function (state) {\n          var _newStateToSet;\n          state = _this.getState(state);\n          var newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet;\n\n          // Your own function that could modify the state that will be set.\n          newStateToSet = _this.props.stateReducer(state, newStateToSet);\n\n          // checks if an item is selected, regardless of if it's different from\n          // what was selected before\n          // used to determine if onSelect and onChange callbacks should be called\n          isItemSelected = newStateToSet.hasOwnProperty('selectedItem');\n          // this keeps track of the object we want to call with setState\n          var nextState = {};\n          // we need to call on change if the outside world is controlling any of our state\n          // and we're trying to update that state. OR if the selection has changed and we're\n          // trying to update the selection\n          if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {\n            onChangeArg = newStateToSet.selectedItem;\n          }\n          (_newStateToSet = newStateToSet).type || (_newStateToSet.type = unknown);\n          Object.keys(newStateToSet).forEach(function (key) {\n            // onStateChangeArg should only have the state that is\n            // actually changing\n            if (state[key] !== newStateToSet[key]) {\n              onStateChangeArg[key] = newStateToSet[key];\n            }\n            // the type is useful for the onStateChangeArg\n            // but we don't actually want to set it in internal state.\n            // this is an undocumented feature for now... Not all internalSetState\n            // calls support it and I'm not certain we want them to yet.\n            // But it enables users controlling the isOpen state to know when\n            // the isOpen state changes due to mouseup events which is quite handy.\n            if (key === 'type') {\n              return;\n            }\n            newStateToSet[key];\n            // if it's coming from props, then we don't care to set it internally\n            if (_this.props[key] === undefined) {\n              nextState[key] = newStateToSet[key];\n            }\n          });\n\n          // if stateToSet is a function, then we weren't able to call onInputValueChange\n          // earlier, so we'll call it now that we know what the inputValue state will be.\n          if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {\n            _this.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), newStateToSet));\n          }\n          return nextState;\n        }, function () {\n          // call the provided callback if it's a function\n          cbToCb(cb)();\n\n          // only call the onStateChange and onChange callbacks if\n          // we have relevant information to pass them.\n          var hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;\n          if (hasMoreStateThanType) {\n            _this.props.onStateChange(onStateChangeArg, _this.getStateAndHelpers());\n          }\n          if (isItemSelected) {\n            _this.props.onSelect(stateToSet.selectedItem, _this.getStateAndHelpers());\n          }\n          if (onChangeArg !== undefined) {\n            _this.props.onChange(onChangeArg, _this.getStateAndHelpers());\n          }\n          // this is currently undocumented and therefore subject to change\n          // We'll try to not break it, but just be warned.\n          _this.props.onUserAction(onStateChangeArg, _this.getStateAndHelpers());\n        });\n      };\n      //////////////////////////// ROOT\n      _this.rootRef = function (node) {\n        return _this._rootNode = node;\n      };\n      _this.getRootProps = function (_temp, _temp2) {\n        var _extends2;\n        var _ref = _temp === void 0 ? {} : _temp,\n          _ref$refKey = _ref.refKey,\n          refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n          ref = _ref.ref,\n          rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);\n        var _ref2 = _temp2 === void 0 ? {} : _temp2,\n          _ref2$suppressRefErro = _ref2.suppressRefError,\n          suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n        // this is used in the render to know whether the user has called getRootProps.\n        // It uses that to know whether to apply the props automatically\n        _this.getRootProps.called = true;\n        _this.getRootProps.refKey = refKey;\n        _this.getRootProps.suppressRefError = suppressRefError;\n        var _this$getState = _this.getState(),\n          isOpen = _this$getState.isOpen;\n        return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, _this.rootRef), _extends2.role = 'combobox', _extends2['aria-expanded'] = isOpen, _extends2['aria-haspopup'] = 'listbox', _extends2['aria-owns'] = isOpen ? _this.menuId : undefined, _extends2['aria-labelledby'] = _this.labelId, _extends2), rest);\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ROOT\n      _this.keyDownHandlers = {\n        ArrowDown: function ArrowDown(event) {\n          var _this2 = this;\n          event.preventDefault();\n          if (this.getState().isOpen) {\n            var amount = event.shiftKey ? 5 : 1;\n            this.moveHighlightedIndex(amount, {\n              type: keyDownArrowDown\n            });\n          } else {\n            this.internalSetState({\n              isOpen: true,\n              type: keyDownArrowDown\n            }, function () {\n              var itemCount = _this2.getItemCount();\n              if (itemCount > 0) {\n                var _this2$getState = _this2.getState(),\n                  highlightedIndex = _this2$getState.highlightedIndex;\n                var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, 1, {\n                  length: itemCount\n                }, _this2.isItemDisabled, true);\n                _this2.setHighlightedIndex(nextHighlightedIndex, {\n                  type: keyDownArrowDown\n                });\n              }\n            });\n          }\n        },\n        ArrowUp: function ArrowUp(event) {\n          var _this3 = this;\n          event.preventDefault();\n          if (this.getState().isOpen) {\n            var amount = event.shiftKey ? -5 : -1;\n            this.moveHighlightedIndex(amount, {\n              type: keyDownArrowUp\n            });\n          } else {\n            this.internalSetState({\n              isOpen: true,\n              type: keyDownArrowUp\n            }, function () {\n              var itemCount = _this3.getItemCount();\n              if (itemCount > 0) {\n                var _this3$getState = _this3.getState(),\n                  highlightedIndex = _this3$getState.highlightedIndex;\n                var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, -1, {\n                  length: itemCount\n                }, _this3.isItemDisabled, true);\n                _this3.setHighlightedIndex(nextHighlightedIndex, {\n                  type: keyDownArrowUp\n                });\n              }\n            });\n          }\n        },\n        Enter: function Enter(event) {\n          if (event.which === 229) {\n            return;\n          }\n          var _this$getState2 = this.getState(),\n            isOpen = _this$getState2.isOpen,\n            highlightedIndex = _this$getState2.highlightedIndex;\n          if (isOpen && highlightedIndex != null) {\n            event.preventDefault();\n            var item = this.items[highlightedIndex];\n            var itemNode = this.getItemNodeFromIndex(highlightedIndex);\n            if (item == null || itemNode && itemNode.hasAttribute('disabled')) {\n              return;\n            }\n            this.selectHighlightedItem({\n              type: keyDownEnter\n            });\n          }\n        },\n        Escape: function Escape(event) {\n          event.preventDefault();\n          this.reset(_extends({\n            type: keyDownEscape\n          }, !this.state.isOpen && {\n            selectedItem: null,\n            inputValue: ''\n          }));\n        }\n      };\n      //////////////////////////// BUTTON\n      _this.buttonKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n        ' ': function _(event) {\n          event.preventDefault();\n          this.toggleMenu({\n            type: keyDownSpaceButton\n          });\n        }\n      });\n      _this.inputKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n        Home: function Home(event) {\n          var _this$getState3 = this.getState(),\n            isOpen = _this$getState3.isOpen;\n          if (!isOpen) {\n            return;\n          }\n          event.preventDefault();\n          var itemCount = this.getItemCount();\n          if (itemCount <= 0 || !isOpen) {\n            return;\n          }\n\n          // get next non-disabled starting downwards from 0 if that's disabled.\n          var newHighlightedIndex = getNonDisabledIndex(0, false, {\n            length: itemCount\n          }, this.isItemDisabled);\n          this.setHighlightedIndex(newHighlightedIndex, {\n            type: keyDownHome\n          });\n        },\n        End: function End(event) {\n          var _this$getState4 = this.getState(),\n            isOpen = _this$getState4.isOpen;\n          if (!isOpen) {\n            return;\n          }\n          event.preventDefault();\n          var itemCount = this.getItemCount();\n          if (itemCount <= 0 || !isOpen) {\n            return;\n          }\n\n          // get next non-disabled starting upwards from last index if that's disabled.\n          var newHighlightedIndex = getNonDisabledIndex(itemCount - 1, true, {\n            length: itemCount\n          }, this.isItemDisabled);\n          this.setHighlightedIndex(newHighlightedIndex, {\n            type: keyDownEnd\n          });\n        }\n      });\n      _this.getToggleButtonProps = function (_temp3) {\n        var _ref3 = _temp3 === void 0 ? {} : _temp3,\n          onClick = _ref3.onClick;\n          _ref3.onPress;\n          var onKeyDown = _ref3.onKeyDown,\n          onKeyUp = _ref3.onKeyUp,\n          onBlur = _ref3.onBlur,\n          rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$4);\n        var _this$getState5 = _this.getState(),\n          isOpen = _this$getState5.isOpen;\n        var enabledEventHandlers = {\n          onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),\n          onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),\n          onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),\n          onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)\n        };\n        var eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n        return _extends({\n          type: 'button',\n          role: 'button',\n          'aria-label': isOpen ? 'close menu' : 'open menu',\n          'aria-haspopup': true,\n          'data-toggle': true\n        }, eventHandlers, rest);\n      };\n      _this.buttonHandleKeyUp = function (event) {\n        // Prevent click event from emitting in Firefox\n        event.preventDefault();\n      };\n      _this.buttonHandleKeyDown = function (event) {\n        var key = normalizeArrowKey(event);\n        if (_this.buttonKeyDownHandlers[key]) {\n          _this.buttonKeyDownHandlers[key].call(_this, event);\n        }\n      };\n      _this.buttonHandleClick = function (event) {\n        event.preventDefault();\n        // handle odd case for Safari and Firefox which\n        // don't give the button the focus properly.\n        /* istanbul ignore if (can't reasonably test this) */\n        if (_this.props.environment) {\n          var _this$props$environme = _this.props.environment.document,\n            body = _this$props$environme.body,\n            activeElement = _this$props$environme.activeElement;\n          if (body && body === activeElement) {\n            event.target.focus();\n          }\n        }\n        // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n        // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n        // when building for production and should therefore have no impact on production code.\n        if (process.env.NODE_ENV === 'test') {\n          _this.toggleMenu({\n            type: clickButton\n          });\n        } else {\n          // Ensure that toggle of menu occurs after the potential blur event in iOS\n          _this.internalSetTimeout(function () {\n            return _this.toggleMenu({\n              type: clickButton\n            });\n          });\n        }\n      };\n      _this.buttonHandleBlur = function (event) {\n        var blurTarget = event.target; // Save blur target for comparison with activeElement later\n        // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n        _this.internalSetTimeout(function () {\n          if (_this.isMouseDown || !_this.props.environment) {\n            return;\n          }\n          var activeElement = _this.props.environment.document.activeElement;\n          if ((activeElement == null || activeElement.id !== _this.inputId) && activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n          ) {\n            _this.reset({\n              type: blurButton\n            });\n          }\n        });\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ BUTTON\n      /////////////////////////////// LABEL\n      _this.getLabelProps = function (props) {\n        return _extends({\n          htmlFor: _this.inputId,\n          id: _this.labelId\n        }, props);\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ LABEL\n      /////////////////////////////// INPUT\n      _this.getInputProps = function (_temp4) {\n        var _ref4 = _temp4 === void 0 ? {} : _temp4,\n          onKeyDown = _ref4.onKeyDown,\n          onBlur = _ref4.onBlur,\n          onChange = _ref4.onChange,\n          onInput = _ref4.onInput;\n          _ref4.onChangeText;\n          var rest = _objectWithoutPropertiesLoose(_ref4, _excluded3$3);\n        var onChangeKey;\n        var eventHandlers = {};\n\n        /* istanbul ignore next (preact) */\n        {\n          onChangeKey = 'onChange';\n        }\n        var _this$getState6 = _this.getState(),\n          inputValue = _this$getState6.inputValue,\n          isOpen = _this$getState6.isOpen,\n          highlightedIndex = _this$getState6.highlightedIndex;\n        if (!rest.disabled) {\n          var _eventHandlers;\n          eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, _this.inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, _this.inputHandleBlur), _eventHandlers);\n        }\n        return _extends({\n          'aria-autocomplete': 'list',\n          'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : undefined,\n          'aria-controls': isOpen ? _this.menuId : undefined,\n          'aria-labelledby': rest && rest['aria-label'] ? undefined : _this.labelId,\n          // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n          // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n          autoComplete: 'off',\n          value: inputValue,\n          id: _this.inputId\n        }, eventHandlers, rest);\n      };\n      _this.inputHandleKeyDown = function (event) {\n        var key = normalizeArrowKey(event);\n        if (key && _this.inputKeyDownHandlers[key]) {\n          _this.inputKeyDownHandlers[key].call(_this, event);\n        }\n      };\n      _this.inputHandleChange = function (event) {\n        _this.internalSetState({\n          type: changeInput,\n          isOpen: true,\n          inputValue: event.target.value,\n          highlightedIndex: _this.props.defaultHighlightedIndex\n        });\n      };\n      _this.inputHandleBlur = function () {\n        // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n        _this.internalSetTimeout(function () {\n          var _activeElement$datase;\n          if (_this.isMouseDown || !_this.props.environment) {\n            return;\n          }\n          var activeElement = _this.props.environment.document.activeElement;\n          var downshiftButtonIsActive = (activeElement == null || (_activeElement$datase = activeElement.dataset) == null ? void 0 : _activeElement$datase.toggle) && _this._rootNode && _this._rootNode.contains(activeElement);\n          if (!downshiftButtonIsActive) {\n            _this.reset({\n              type: blurInput\n            });\n          }\n        });\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ INPUT\n      /////////////////////////////// MENU\n      _this.menuRef = function (node) {\n        _this._menuNode = node;\n      };\n      _this.getMenuProps = function (_temp5, _temp6) {\n        var _extends3;\n        var _ref5 = _temp5 === void 0 ? {} : _temp5,\n          _ref5$refKey = _ref5.refKey,\n          refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n          ref = _ref5.ref,\n          props = _objectWithoutPropertiesLoose(_ref5, _excluded4$2);\n        var _ref6 = _temp6 === void 0 ? {} : _temp6,\n          _ref6$suppressRefErro = _ref6.suppressRefError,\n          suppressRefError = _ref6$suppressRefErro === void 0 ? false : _ref6$suppressRefErro;\n        _this.getMenuProps.called = true;\n        _this.getMenuProps.refKey = refKey;\n        _this.getMenuProps.suppressRefError = suppressRefError;\n        return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, _this.menuRef), _extends3.role = 'listbox', _extends3['aria-labelledby'] = props && props['aria-label'] ? undefined : _this.labelId, _extends3.id = _this.menuId, _extends3), props);\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ MENU\n      /////////////////////////////// ITEM\n      _this.getItemProps = function (_temp7) {\n        var _enabledEventHandlers;\n        var _ref7 = _temp7 === void 0 ? {} : _temp7,\n          onMouseMove = _ref7.onMouseMove,\n          onMouseDown = _ref7.onMouseDown,\n          onClick = _ref7.onClick;\n          _ref7.onPress;\n          var index = _ref7.index,\n          _ref7$item = _ref7.item,\n          item = _ref7$item === void 0 ? process.env.NODE_ENV === 'production' ? /* istanbul ignore next */undefined : requiredProp('getItemProps', 'item') : _ref7$item,\n          rest = _objectWithoutPropertiesLoose(_ref7, _excluded5);\n        if (index === undefined) {\n          _this.items.push(item);\n          index = _this.items.indexOf(item);\n        } else {\n          _this.items[index] = item;\n        }\n        var onSelectKey = 'onClick';\n        var customClickHandler = onClick;\n        var enabledEventHandlers = (_enabledEventHandlers = {\n          // onMouseMove is used over onMouseEnter here. onMouseMove\n          // is only triggered on actual mouse movement while onMouseEnter\n          // can fire on DOM changes, interrupting keyboard navigation\n          onMouseMove: callAllEventHandlers(onMouseMove, function () {\n            if (index === _this.getState().highlightedIndex) {\n              return;\n            }\n            _this.setHighlightedIndex(index, {\n              type: itemMouseEnter\n            });\n\n            // We never want to manually scroll when changing state based\n            // on `onMouseMove` because we will be moving the element out\n            // from under the user which is currently scrolling/moving the\n            // cursor\n            _this.avoidScrolling = true;\n            _this.internalSetTimeout(function () {\n              return _this.avoidScrolling = false;\n            }, 250);\n          }),\n          onMouseDown: callAllEventHandlers(onMouseDown, function (event) {\n            // This prevents the activeElement from being changed\n            // to the item so it can remain with the current activeElement\n            // which is a more common use case.\n            event.preventDefault();\n          })\n        }, _enabledEventHandlers[onSelectKey] = callAllEventHandlers(customClickHandler, function () {\n          _this.selectItemAtIndex(index, {\n            type: clickItem\n          });\n        }), _enabledEventHandlers);\n\n        // Passing down the onMouseDown handler to prevent redirect\n        // of the activeElement if clicking on disabled items\n        var eventHandlers = rest.disabled ? {\n          onMouseDown: enabledEventHandlers.onMouseDown\n        } : enabledEventHandlers;\n        return _extends({\n          id: _this.getItemId(index),\n          role: 'option',\n          'aria-selected': _this.getState().highlightedIndex === index\n        }, eventHandlers, rest);\n      };\n      //\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ ITEM\n      _this.clearItems = function () {\n        _this.items = [];\n      };\n      _this.reset = function (otherStateToSet, cb) {\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n        otherStateToSet = pickState(otherStateToSet);\n        _this.internalSetState(function (_ref8) {\n          var selectedItem = _ref8.selectedItem;\n          return _extends({\n            isOpen: _this.props.defaultIsOpen,\n            highlightedIndex: _this.props.defaultHighlightedIndex,\n            inputValue: _this.props.itemToString(selectedItem)\n          }, otherStateToSet);\n        }, cb);\n      };\n      _this.toggleMenu = function (otherStateToSet, cb) {\n        if (otherStateToSet === void 0) {\n          otherStateToSet = {};\n        }\n        otherStateToSet = pickState(otherStateToSet);\n        _this.internalSetState(function (_ref9) {\n          var isOpen = _ref9.isOpen;\n          return _extends({\n            isOpen: !isOpen\n          }, isOpen && {\n            highlightedIndex: _this.props.defaultHighlightedIndex\n          }, otherStateToSet);\n        }, function () {\n          var _this$getState7 = _this.getState(),\n            isOpen = _this$getState7.isOpen,\n            highlightedIndex = _this$getState7.highlightedIndex;\n          if (isOpen) {\n            if (_this.getItemCount() > 0 && typeof highlightedIndex === 'number') {\n              _this.setHighlightedIndex(highlightedIndex, otherStateToSet);\n            }\n          }\n          cbToCb(cb)();\n        });\n      };\n      _this.openMenu = function (cb) {\n        _this.internalSetState({\n          isOpen: true\n        }, cb);\n      };\n      _this.closeMenu = function (cb) {\n        _this.internalSetState({\n          isOpen: false\n        }, cb);\n      };\n      _this.updateStatus = debounce(function () {\n        var _this$props;\n        if (!((_this$props = _this.props) != null && (_this$props = _this$props.environment) != null && _this$props.document)) {\n          return;\n        }\n        var state = _this.getState();\n        var item = _this.items[state.highlightedIndex];\n        var resultCount = _this.getItemCount();\n        var status = _this.props.getA11yStatusMessage(_extends({\n          itemToString: _this.props.itemToString,\n          previousResultCount: _this.previousResultCount,\n          resultCount: resultCount,\n          highlightedItem: item\n        }, state));\n        _this.previousResultCount = resultCount;\n        setStatus(status, _this.props.environment.document);\n      }, 200);\n      var _this$props2 = _this.props,\n        defaultHighlightedIndex = _this$props2.defaultHighlightedIndex,\n        _this$props2$initialH = _this$props2.initialHighlightedIndex,\n        _highlightedIndex = _this$props2$initialH === void 0 ? defaultHighlightedIndex : _this$props2$initialH,\n        defaultIsOpen = _this$props2.defaultIsOpen,\n        _this$props2$initialI = _this$props2.initialIsOpen,\n        _isOpen = _this$props2$initialI === void 0 ? defaultIsOpen : _this$props2$initialI,\n        _this$props2$initialI2 = _this$props2.initialInputValue,\n        _inputValue = _this$props2$initialI2 === void 0 ? '' : _this$props2$initialI2,\n        _this$props2$initialS = _this$props2.initialSelectedItem,\n        _selectedItem = _this$props2$initialS === void 0 ? null : _this$props2$initialS;\n      var _state = _this.getState({\n        highlightedIndex: _highlightedIndex,\n        isOpen: _isOpen,\n        inputValue: _inputValue,\n        selectedItem: _selectedItem\n      });\n      if (_state.selectedItem != null && _this.props.initialInputValue === undefined) {\n        _state.inputValue = _this.props.itemToString(_state.selectedItem);\n      }\n      _this.state = _state;\n      return _this;\n    }\n    _inheritsLoose(Downshift, _Component);\n    var _proto = Downshift.prototype;\n    /**\n     * Clear all running timeouts\n     */\n    _proto.internalClearTimeouts = function internalClearTimeouts() {\n      this.timeoutIds.forEach(function (id) {\n        clearTimeout(id);\n      });\n      this.timeoutIds = [];\n    }\n\n    /**\n     * Gets the state based on internal state or props\n     * If a state value is passed via props, then that\n     * is the value given, otherwise it's retrieved from\n     * stateToMerge\n     *\n     * @param {Object} stateToMerge defaults to this.state\n     * @return {Object} the state\n     */;\n    _proto.getState = function getState$1(stateToMerge) {\n      if (stateToMerge === void 0) {\n        stateToMerge = this.state;\n      }\n      return getState(stateToMerge, this.props);\n    };\n    _proto.getItemCount = function getItemCount() {\n      // things read better this way. They're in priority order:\n      // 1. `this.itemCount`\n      // 2. `this.props.itemCount`\n      // 3. `this.items.length`\n      var itemCount = this.items.length;\n      if (this.itemCount != null) {\n        itemCount = this.itemCount;\n      } else if (this.props.itemCount !== undefined) {\n        itemCount = this.props.itemCount;\n      }\n      return itemCount;\n    };\n    _proto.getItemNodeFromIndex = function getItemNodeFromIndex(index) {\n      return this.props.environment ? this.props.environment.document.getElementById(this.getItemId(index)) : null;\n    };\n    _proto.scrollHighlightedItemIntoView = function scrollHighlightedItemIntoView() {\n      /* istanbul ignore else (react-native) */\n      {\n        var node = this.getItemNodeFromIndex(this.getState().highlightedIndex);\n        this.props.scrollIntoView(node, this._menuNode);\n      }\n    };\n    _proto.moveHighlightedIndex = function moveHighlightedIndex(amount, otherStateToSet) {\n      var itemCount = this.getItemCount();\n      var _this$getState8 = this.getState(),\n        highlightedIndex = _this$getState8.highlightedIndex;\n      if (itemCount > 0) {\n        var nextHighlightedIndex = getHighlightedIndex(highlightedIndex, amount, {\n          length: itemCount\n        }, this.isItemDisabled, true);\n        this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet);\n      }\n    };\n    _proto.getStateAndHelpers = function getStateAndHelpers() {\n      var _this$getState9 = this.getState(),\n        highlightedIndex = _this$getState9.highlightedIndex,\n        inputValue = _this$getState9.inputValue,\n        selectedItem = _this$getState9.selectedItem,\n        isOpen = _this$getState9.isOpen;\n      var itemToString = this.props.itemToString;\n      var id = this.id;\n      var getRootProps = this.getRootProps,\n        getToggleButtonProps = this.getToggleButtonProps,\n        getLabelProps = this.getLabelProps,\n        getMenuProps = this.getMenuProps,\n        getInputProps = this.getInputProps,\n        getItemProps = this.getItemProps,\n        openMenu = this.openMenu,\n        closeMenu = this.closeMenu,\n        toggleMenu = this.toggleMenu,\n        selectItem = this.selectItem,\n        selectItemAtIndex = this.selectItemAtIndex,\n        selectHighlightedItem = this.selectHighlightedItem,\n        setHighlightedIndex = this.setHighlightedIndex,\n        clearSelection = this.clearSelection,\n        clearItems = this.clearItems,\n        reset = this.reset,\n        setItemCount = this.setItemCount,\n        unsetItemCount = this.unsetItemCount,\n        setState = this.internalSetState;\n      return {\n        // prop getters\n        getRootProps: getRootProps,\n        getToggleButtonProps: getToggleButtonProps,\n        getLabelProps: getLabelProps,\n        getMenuProps: getMenuProps,\n        getInputProps: getInputProps,\n        getItemProps: getItemProps,\n        // actions\n        reset: reset,\n        openMenu: openMenu,\n        closeMenu: closeMenu,\n        toggleMenu: toggleMenu,\n        selectItem: selectItem,\n        selectItemAtIndex: selectItemAtIndex,\n        selectHighlightedItem: selectHighlightedItem,\n        setHighlightedIndex: setHighlightedIndex,\n        clearSelection: clearSelection,\n        clearItems: clearItems,\n        setItemCount: setItemCount,\n        unsetItemCount: unsetItemCount,\n        setState: setState,\n        // props\n        itemToString: itemToString,\n        // derived\n        id: id,\n        // state\n        highlightedIndex: highlightedIndex,\n        inputValue: inputValue,\n        isOpen: isOpen,\n        selectedItem: selectedItem\n      };\n    };\n    _proto.componentDidMount = function componentDidMount() {\n      var _this4 = this;\n      /* istanbul ignore if (react-native) */\n      if (process.env.NODE_ENV !== 'production' && true && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n        validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n      }\n\n      /* istanbul ignore if (react-native or SSR) */\n      if (!this.props.environment) {\n        this.cleanup = function () {\n          _this4.internalClearTimeouts();\n        };\n      } else {\n        // this.isMouseDown helps us track whether the mouse is currently held down.\n        // This is useful when the user clicks on an item in the list, but holds the mouse\n        // down long enough for the list to disappear (because the blur event fires on the input)\n        // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n        // trigger hiding the menu.\n        var onMouseDown = function onMouseDown() {\n          _this4.isMouseDown = true;\n        };\n        var onMouseUp = function onMouseUp(event) {\n          _this4.isMouseDown = false;\n          // if the target element or the activeElement is within a downshift node\n          // then we don't want to reset downshift\n          var contextWithinDownshift = targetWithinDownshift(event.target, [_this4._rootNode, _this4._menuNode], _this4.props.environment);\n          if (!contextWithinDownshift && _this4.getState().isOpen) {\n            _this4.reset({\n              type: mouseUp\n            }, function () {\n              return _this4.props.onOuterClick(_this4.getStateAndHelpers());\n            });\n          }\n        };\n        // Touching an element in iOS gives focus and hover states, but touching out of\n        // the element will remove hover, and persist the focus state, resulting in the\n        // blur event not being triggered.\n        // this.isTouchMove helps us track whether the user is tapping or swiping on a touch screen.\n        // If the user taps outside of Downshift, the component should be reset,\n        // but not if the user is swiping\n        var onTouchStart = function onTouchStart() {\n          _this4.isTouchMove = false;\n        };\n        var onTouchMove = function onTouchMove() {\n          _this4.isTouchMove = true;\n        };\n        var onTouchEnd = function onTouchEnd(event) {\n          var contextWithinDownshift = targetWithinDownshift(event.target, [_this4._rootNode, _this4._menuNode], _this4.props.environment, false);\n          if (!_this4.isTouchMove && !contextWithinDownshift && _this4.getState().isOpen) {\n            _this4.reset({\n              type: touchEnd\n            }, function () {\n              return _this4.props.onOuterClick(_this4.getStateAndHelpers());\n            });\n          }\n        };\n        var environment = this.props.environment;\n        environment.addEventListener('mousedown', onMouseDown);\n        environment.addEventListener('mouseup', onMouseUp);\n        environment.addEventListener('touchstart', onTouchStart);\n        environment.addEventListener('touchmove', onTouchMove);\n        environment.addEventListener('touchend', onTouchEnd);\n        this.cleanup = function () {\n          _this4.internalClearTimeouts();\n          _this4.updateStatus.cancel();\n          environment.removeEventListener('mousedown', onMouseDown);\n          environment.removeEventListener('mouseup', onMouseUp);\n          environment.removeEventListener('touchstart', onTouchStart);\n          environment.removeEventListener('touchmove', onTouchMove);\n          environment.removeEventListener('touchend', onTouchEnd);\n        };\n      }\n    };\n    _proto.shouldScroll = function shouldScroll(prevState, prevProps) {\n      var _ref0 = this.props.highlightedIndex === undefined ? this.getState() : this.props,\n        currentHighlightedIndex = _ref0.highlightedIndex;\n      var _ref1 = prevProps.highlightedIndex === undefined ? prevState : prevProps,\n        prevHighlightedIndex = _ref1.highlightedIndex;\n      var scrollWhenOpen = currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen;\n      var scrollWhenNavigating = currentHighlightedIndex !== prevHighlightedIndex;\n      return scrollWhenOpen || scrollWhenNavigating;\n    };\n    _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n      if (process.env.NODE_ENV !== 'production') {\n        validateControlledUnchanged(this.state, prevProps, this.props);\n        /* istanbul ignore if (react-native) */\n        if (this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n          validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n        }\n      }\n      if (this.props.selectedItem !== undefined && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) {\n        this.internalSetState({\n          type: controlledPropUpdatedSelectedItem,\n          inputValue: this.props.itemToString(this.props.selectedItem)\n        });\n      }\n      if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) {\n        this.scrollHighlightedItemIntoView();\n      }\n\n      /* istanbul ignore else (react-native) */\n      {\n        this.updateStatus();\n      }\n    };\n    _proto.componentWillUnmount = function componentWillUnmount() {\n      this.cleanup(); // avoids memory leak\n    };\n    _proto.render = function render() {\n      var children = unwrapArray(this.props.children, noop);\n      // because the items are rerendered every time we call the children\n      // we clear this out each render and it will be populated again as\n      // getItemProps is called.\n      this.clearItems();\n      // we reset this so we know whether the user calls getRootProps during\n      // this render. If they do then we don't need to do anything,\n      // if they don't then we need to clone the element they return and\n      // apply the props for them.\n      this.getRootProps.called = false;\n      this.getRootProps.refKey = undefined;\n      this.getRootProps.suppressRefError = undefined;\n      // we do something similar for getMenuProps\n      this.getMenuProps.called = false;\n      this.getMenuProps.refKey = undefined;\n      this.getMenuProps.suppressRefError = undefined;\n      // we do something similar for getLabelProps\n      this.getLabelProps.called = false;\n      // and something similar for getInputProps\n      this.getInputProps.called = false;\n      var element = unwrapArray(children(this.getStateAndHelpers()));\n      if (!element) {\n        return null;\n      }\n      if (this.getRootProps.called || this.props.suppressRefError) {\n        if (process.env.NODE_ENV !== 'production' && !this.getRootProps.suppressRefError && !this.props.suppressRefError) {\n          validateGetRootPropsCalledCorrectly(element, this.getRootProps);\n        }\n        return element;\n      } else if (isDOMElement(element)) {\n        // they didn't apply the root props, but we can clone\n        // this and apply the props ourselves\n        return /*#__PURE__*/cloneElement(element, this.getRootProps(getElementProps(element)));\n      }\n\n      /* istanbul ignore else */\n      if (process.env.NODE_ENV !== 'production') {\n        // they didn't apply the root props, but they need to\n        // otherwise we can't query around the autocomplete\n\n        throw new Error('downshift: If you return a non-DOM element, you must apply the getRootProps function');\n      }\n\n      /* istanbul ignore next */\n      return undefined;\n    };\n    return Downshift;\n  }(Component);\n  Downshift.defaultProps = {\n    defaultHighlightedIndex: null,\n    defaultIsOpen: false,\n    getA11yStatusMessage: getA11yStatusMessage,\n    itemToString: function itemToString(i) {\n      if (i == null) {\n        return '';\n      }\n      if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) {\n        // eslint-disable-next-line no-console\n        console.warn('downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.', 'The object that was passed:', i);\n      }\n      return String(i);\n    },\n    onStateChange: noop,\n    onInputValueChange: noop,\n    onUserAction: noop,\n    onChange: noop,\n    onSelect: noop,\n    onOuterClick: noop,\n    selectedItemChanged: function selectedItemChanged(prevItem, item) {\n      return prevItem !== item;\n    },\n    environment: /* istanbul ignore next (ssr) */\n    typeof window === 'undefined' || false ? undefined : window,\n    stateReducer: function stateReducer(state, stateToSet) {\n      return stateToSet;\n    },\n    suppressRefError: false,\n    scrollIntoView: scrollIntoView\n  };\n  Downshift.stateChangeTypes = stateChangeTypes$4;\n  return Downshift;\n}();\nprocess.env.NODE_ENV !== \"production\" ? Downshift.propTypes = {\n  children: PropTypes.func,\n  defaultHighlightedIndex: PropTypes.number,\n  defaultIsOpen: PropTypes.bool,\n  initialHighlightedIndex: PropTypes.number,\n  initialSelectedItem: PropTypes.any,\n  initialInputValue: PropTypes.string,\n  initialIsOpen: PropTypes.bool,\n  getA11yStatusMessage: PropTypes.func,\n  itemToString: PropTypes.func,\n  onChange: PropTypes.func,\n  onSelect: PropTypes.func,\n  onStateChange: PropTypes.func,\n  onInputValueChange: PropTypes.func,\n  onUserAction: PropTypes.func,\n  onOuterClick: PropTypes.func,\n  selectedItemChanged: PropTypes.func,\n  stateReducer: PropTypes.func,\n  itemCount: PropTypes.number,\n  id: PropTypes.string,\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func.isRequired,\n    removeEventListener: PropTypes.func.isRequired,\n    document: PropTypes.shape({\n      createElement: PropTypes.func.isRequired,\n      getElementById: PropTypes.func.isRequired,\n      activeElement: PropTypes.any.isRequired,\n      body: PropTypes.any.isRequired\n    }).isRequired,\n    Node: PropTypes.func.isRequired\n  }),\n  suppressRefError: PropTypes.bool,\n  scrollIntoView: PropTypes.func,\n  // things we keep in state for uncontrolled components\n  // but can accept as props for controlled components\n  /* eslint-disable react/no-unused-prop-types */\n  selectedItem: PropTypes.any,\n  isOpen: PropTypes.bool,\n  inputValue: PropTypes.string,\n  highlightedIndex: PropTypes.number,\n  labelId: PropTypes.string,\n  inputId: PropTypes.string,\n  menuId: PropTypes.string,\n  getItemId: PropTypes.func\n  /* eslint-enable react/no-unused-prop-types */\n} : void 0;\nfunction validateGetMenuPropsCalledCorrectly(node, _ref10) {\n  var refKey = _ref10.refKey;\n  if (!node) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from getMenuProps was not applied correctly on your menu element.\");\n  }\n}\nfunction validateGetRootPropsCalledCorrectly(element, _ref11) {\n  var refKey = _ref11.refKey;\n  var refKeySpecified = refKey !== 'ref';\n  var isComposite = !isDOMElement(element);\n  if (isComposite && !refKeySpecified && !isForwardRef(element)) {\n    // eslint-disable-next-line no-console\n    console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');\n  } else if (!isComposite && refKeySpecified) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \\\"\" + refKey + \"\\\"\");\n  }\n  if (!isForwardRef(element) && !getElementProps(element)[refKey]) {\n    // eslint-disable-next-line no-console\n    console.error(\"downshift: You must apply the ref prop \\\"\" + refKey + \"\\\" from getRootProps onto your root element.\");\n  }\n}\n\nfunction capitalizeString(string) {\n  return \"\" + string.slice(0, 1).toUpperCase() + string.slice(1);\n}\n\nfunction callOnChangeProps(action, props, state, newState) {\n  var type = action.type;\n  var changes = {};\n  var keys = Object.keys(state);\n  for (var _i = 0, _keys = keys; _i < _keys.length; _i++) {\n    var key = _keys[_i];\n    invokeOnChangeHandler(key, action, props, state, newState);\n    if (newState[key] !== state[key]) {\n      changes[key] = newState[key];\n    }\n  }\n  if (typeof props.onStateChange === 'function' && Object.keys(changes).length) {\n    props.onStateChange(_extends({\n      type: type\n    }, changes));\n  }\n}\nfunction invokeOnChangeHandler(key, action, props, state, newState) {\n  if (newState[key] === state[key]) {\n    return;\n  }\n  var handlerKey = \"on\" + capitalizeString(key) + \"Change\";\n  var handler = props[handlerKey];\n  if (typeof handler !== 'function') {\n    return;\n  }\n  var type = action.type;\n  handler(_extends({\n    type: type\n  }, newState));\n}\n\n/**\n * Computes the controlled state using a the previous state, props,\n * two reducers, one from downshift and an optional one from the user.\n * Also calls the onChange handlers for state values that have changed.\n *\n * @param reducer Reducer function from downshift.\n * @param props The hook props, also passed to createInitialState.\n * @param createInitialState Function that returns the initial state.\n * @param isStateEqual Function that checks if a previous state is equal to the next.\n * @returns An array with the state and an action dispatcher.\n */\nfunction useEnhancedReducer(reducer, props, createInitialState, isStateEqual) {\n  var prevStateRef = React.useRef({});\n  var enhancedReducer = React.useCallback(function (_ref, action) {\n    var state = _ref.state;\n    state = getState(state, action.props);\n    var changes = reducer(state, action);\n    var newState = action.props.stateReducer(state, _extends({}, action, {\n      changes: changes\n    }));\n    return {\n      state: _extends({}, state, newState),\n      lastAction: action\n    };\n  }, [reducer]);\n  var _React$useReducer = React.useReducer(enhancedReducer, props, function (p) {\n      return {\n        state: createInitialState(p),\n        lastAction: undefined\n      };\n    }),\n    _React$useReducer$ = _React$useReducer[0],\n    state = _React$useReducer$.state,\n    lastAction = _React$useReducer$.lastAction,\n    dispatch = _React$useReducer[1];\n  var propsRef = useLatestRef(props);\n  var dispatchWithProps = React.useCallback(function (action) {\n    return dispatch(_extends({}, action, {\n      props: propsRef.current\n    }));\n  }, [propsRef]);\n  React.useEffect(function () {\n    if (lastAction) {\n      var prevState = getState(prevStateRef.current, lastAction.props);\n      var shouldCallOnChangeProps = !isStateEqual(prevState, state);\n      if (shouldCallOnChangeProps) {\n        callOnChangeProps(lastAction, lastAction.props, prevState, state);\n      }\n    }\n    prevStateRef.current = state;\n  }, [state, lastAction, isStateEqual]);\n  return [state, dispatchWithProps];\n}\n\n/**\n * Wraps the useEnhancedReducer and applies the controlled prop values before\n * returning the new state.\n * @param reducer Reducer function from downshift.\n * @param props The hook props, also passed to createInitialState.\n * @param createInitialState Function that returns the initial state.\n * @param isStateEqual Function that checks if a previous state is equal to the next.\n * @returns An array with the state and an action dispatcher.\n */\nfunction useControlledReducer$1(reducer, props, createInitialState, isStateEqual) {\n  var _useEnhancedReducer = useEnhancedReducer(reducer, props, createInitialState, isStateEqual),\n    state = _useEnhancedReducer[0],\n    dispatch = _useEnhancedReducer[1];\n  return [getState(state, props), dispatch];\n}\n\n/**\n * Returns both the item and index when both or either is passed.\n *\n * @param itemProp The item which could be undefined.\n * @param indexProp The index which could be undefined.\n * @param items The array of items to get the item based on index.\n * @param errorMessage The error to be thrown if index and item could not be returned for any reason.\n * @returns An array with item and index.\n */\nfunction getItemAndIndex(itemProp, indexProp, items, errorMessage) {\n  if (itemProp !== undefined && indexProp !== undefined) {\n    return [itemProp, indexProp];\n  }\n  if (itemProp !== undefined) {\n    var index = items.indexOf(itemProp);\n    if (index < 0) {\n      throw new Error(errorMessage);\n    }\n    return [itemProp, items.indexOf(itemProp)];\n  }\n  if (indexProp !== undefined) {\n    var item = items[indexProp];\n    if (item === undefined) {\n      throw new Error(errorMessage);\n    }\n    return [item, indexProp];\n  }\n  throw new Error(errorMessage);\n}\n\n/**\n * Tracks if it's the first render.\n */\nfunction useIsInitialMount() {\n  var isInitialMountRef = React.useRef(true);\n  React.useEffect(function () {\n    isInitialMountRef.current = false;\n    return function () {\n      isInitialMountRef.current = true;\n    };\n  }, []);\n\n  // eslint-disable-next-line react-hooks/refs\n  return isInitialMountRef.current;\n}\n\n// Shared between all exports.\nvar propTypes$4 = {\n  environment: PropTypes.shape({\n    addEventListener: PropTypes.func.isRequired,\n    removeEventListener: PropTypes.func.isRequired,\n    document: PropTypes.shape({\n      createElement: PropTypes.func.isRequired,\n      getElementById: PropTypes.func.isRequired,\n      activeElement: PropTypes.any.isRequired,\n      body: PropTypes.any.isRequired\n    }).isRequired,\n    Node: PropTypes.func.isRequired\n  }),\n  itemToKey: PropTypes.func,\n  stateReducer: PropTypes.func\n};\n\n/**\n * Returns the default value based on the defaultProp and defaultStateValue.\n *\n * @param defaultProp The default prop value.\n * @param defaultStateValue The default state value.\n * @returns The resolved default value.\n */\nfunction getDefaultValue(defaultProp, defaultStateValue) {\n  return defaultProp === undefined ? defaultStateValue : defaultProp;\n}\n\n/**\n * Returns the initial value for a state variable, based on the following precedence:\n * 1. The controlled value (if it's not undefined)\n * 2. The initialValue (if it's not undefined)\n * 3. The defaultValue (if it's not undefined)\n * 4. The defaultStateValue\n *\n * @param value The controlled value of the state variable.\n * @param initialValue The initial value of the state variable.\n * @param defaultValue The default value of the state variable.\n * @param defaultStateValue The default state value to use if all other values are undefined.\n * @returns The initial value for the state variable.\n */\nfunction getInitialValue(value, initialValue, defaultValue, defaultStateValue) {\n  if (value !== undefined) {\n    return value;\n  }\n  if (initialValue !== undefined) {\n    return initialValue;\n  }\n  if (defaultValue !== undefined) {\n    return defaultValue;\n  }\n  return defaultStateValue;\n}\n\n/**\n * Debounced call for updating the a11y message.\n */\nvar updateA11yStatus = debounce(function (status, document) {\n  setStatus(status, document);\n}, 200);\n\n/**\n * Adds an a11y aria live status message if getA11yStatusMessage is passed.\n * @param getA11yStatusMessage The function that builds the status message.\n * @param options The options to be passed to getA11yStatusMessage if called.\n * @param dependencyArray The dependency array that triggers the status message setter via useEffect.\n * @param environment The environment object containing the document.\n */\nfunction useA11yMessageStatus(getA11yStatusMessage, options, dependencyArray, environment) {\n  var document = environment == null ? void 0 : environment.document;\n  var isInitialMount = useIsInitialMount();\n\n  // Adds an a11y aria live status message if getA11yStatusMessage is passed.\n  React.useEffect(function () {\n    if (!getA11yStatusMessage || isInitialMount || false || !document) {\n      return;\n    }\n    var status = getA11yStatusMessage(options);\n    updateA11yStatus(status, document);\n\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, dependencyArray);\n\n  // Cleanup the status message container.\n  React.useEffect(function () {\n    return function () {\n      updateA11yStatus.cancel();\n      cleanupStatusDiv(document);\n    };\n  }, [document]);\n}\n\n// Shared between useSelect, useCombobox, Downshift.\nvar dropdownPropTypes = _extends({}, propTypes$4, {\n  getA11yStatusMessage: PropTypes.func,\n  highlightedIndex: PropTypes.number,\n  defaultHighlightedIndex: PropTypes.number,\n  initialHighlightedIndex: PropTypes.number,\n  isOpen: PropTypes.bool,\n  defaultIsOpen: PropTypes.bool,\n  initialIsOpen: PropTypes.bool,\n  selectedItem: PropTypes.any,\n  initialSelectedItem: PropTypes.any,\n  defaultSelectedItem: PropTypes.any,\n  id: PropTypes.string,\n  labelId: PropTypes.string,\n  menuId: PropTypes.string,\n  getItemId: PropTypes.func,\n  toggleButtonId: PropTypes.string,\n  onSelectedItemChange: PropTypes.func,\n  onHighlightedIndexChange: PropTypes.func,\n  onStateChange: PropTypes.func,\n  onIsOpenChange: PropTypes.func,\n  scrollIntoView: PropTypes.func\n});\n\nvar dropdownDefaultProps = {\n  itemToString: function itemToString(item) {\n    return item ? String(item) : '';\n  },\n  itemToKey: function itemToKey(item) {\n    return item;\n  },\n  isItemDisabled: function isItemDisabled(_item) {\n    return false;\n  },\n  stateReducer: function stateReducer(_state, actionAndChanges) {\n    return actionAndChanges.changes;\n  },\n  scrollIntoView: scrollIntoView,\n  environment: /* istanbul ignore next (ssr) */\n  typeof window === 'undefined' || false ? undefined : window\n};\n\nvar dropdownDefaultStateValues = {\n  highlightedIndex: -1,\n  isOpen: false,\n  selectedItem: null,\n  inputValue: ''\n};\n\n// https://github.com/downshift-js/downshift/issues/1674#issuecomment-3924320872\nvar SafeReact$1 = _extends({}, React);\nvar reactUseId$1 = SafeReact$1.useId;\nvar useElementIds$1 = typeof reactUseId$1 === 'function' ? useElementIdsR18$1 : useElementIdsLegacy$1;\nfunction useElementIdsR18$1(_ref) {\n  var id = _ref.id,\n    labelId = _ref.labelId,\n    menuId = _ref.menuId,\n    getItemId = _ref.getItemId,\n    toggleButtonId = _ref.toggleButtonId,\n    inputId = _ref.inputId;\n  var reactId = \"downshift-\" + reactUseId$1();\n  if (!id) {\n    id = reactId;\n  }\n  var elementIds = React.useMemo(function () {\n    return {\n      labelId: labelId != null ? labelId : id + \"-label\",\n      menuId: menuId != null ? menuId : id + \"-menu\",\n      getItemId: getItemId != null ? getItemId : function (index) {\n        return id + \"-item-\" + index;\n      },\n      toggleButtonId: toggleButtonId != null ? toggleButtonId : id + \"-toggle-button\",\n      inputId: inputId != null ? inputId : id + \"-input\"\n    };\n  }, [getItemId, id, inputId, labelId, menuId, toggleButtonId]);\n  return elementIds;\n}\nfunction useElementIdsLegacy$1(_ref2) {\n  var id = _ref2.id,\n    labelId = _ref2.labelId,\n    menuId = _ref2.menuId,\n    getItemId = _ref2.getItemId,\n    toggleButtonId = _ref2.toggleButtonId,\n    inputId = _ref2.inputId;\n  var _React$useState = React.useState(function () {\n      return id != null ? id : \"downshift-\" + generateId();\n    }),\n    baseId = _React$useState[0];\n  var elementIds = React.useMemo(function () {\n    return {\n      labelId: labelId != null ? labelId : baseId + \"-label\",\n      menuId: menuId != null ? menuId : baseId + \"-menu\",\n      getItemId: getItemId != null ? getItemId : function (index) {\n        return baseId + \"-item-\" + index;\n      },\n      toggleButtonId: toggleButtonId != null ? toggleButtonId : baseId + \"-toggle-button\",\n      inputId: inputId != null ? inputId : baseId + \"-input\"\n    };\n  }, [getItemId, inputId, labelId, menuId, toggleButtonId, baseId]);\n  return elementIds;\n}\n\n/**\n * Returns the new highlightedIndex based on the defaultHighlightedIndex prop, if it's not disabled.\n *\n * @param props Props passed to the hook.\n * @returns The highlighted index.\n */\nfunction getDefaultHighlightedIndex(items, isItemDisabled, defaultHighlightedIndex) {\n  var highlightedIndex = getDefaultValue(defaultHighlightedIndex, dropdownDefaultStateValues.highlightedIndex);\n  if (items[highlightedIndex] && isItemDisabled(items[highlightedIndex], highlightedIndex)) {\n    return -1;\n  }\n  return highlightedIndex;\n}\n\n/**\n * Handles selection on Enter / Alt + ArrowUp. Closes the menu and resets the highlighted index, unless there is a highlighted.\n * In that case, selects the item and resets to defaults for open state and highlighted idex.\n *\n * @param props The Dropdown props.\n * @param highlightedIndex The index from the state.\n * @param inputValue Also return the input value for state.\n * @returns The changes for the state.\n */\nfunction getChangesOnSelection(items, itemToString, defaultIsOpen, defaultHighlightedIndex, highlightedIndex, inputValue) {\n  var shouldSelect = items.length && highlightedIndex >= 0;\n  return _extends({\n    isOpen: false,\n    highlightedIndex: -1\n  }, shouldSelect && _extends({\n    selectedItem: items[highlightedIndex],\n    isOpen: getDefaultValue(defaultIsOpen, dropdownDefaultStateValues.isOpen),\n    highlightedIndex: getDefaultValue(defaultHighlightedIndex, dropdownDefaultStateValues.highlightedIndex)\n  }, inputValue && {\n    inputValue: itemToString(items[highlightedIndex])\n  }));\n}\n\n/* eslint-disable max-params */\n/**\n * Returns the highlighted index when the menu is opened.\n * Takes into account the initialHighlightedIndex, defaultHighlightedIndex,\n * selectedItem, and the open direction offset.\n *\n * @param items The list of items.\n * @param initialHighlightedIndex The initial highlighted index prop.\n * @param defaultHighlightedIndex The default highlighted index prop.\n * @param isItemDisabled Callback to determine if an item is disabled.\n * @param itemToKey Callback to get a unique key from an item.\n * @param selectedItem The currently selected item.\n * @param highlightedIndex The current highlighted index from state.\n * @param offset The direction of navigation: positive opens downward, negative opens upward.\n * @returns The new highlighted index.\n */\nfunction getHighlightedIndexOnOpen(items, initialHighlightedIndex, defaultHighlightedIndex, isItemDisabled, itemToKey, selectedItem, highlightedIndex, offset) {\n  if (items.length === 0) {\n    return -1;\n  }\n\n  // initialHighlightedIndex will give value to highlightedIndex on initial state only.\n  if (initialHighlightedIndex !== undefined && highlightedIndex === initialHighlightedIndex && (initialHighlightedIndex === -1 || items[initialHighlightedIndex] !== undefined && !isItemDisabled(items[initialHighlightedIndex], initialHighlightedIndex))) {\n    return initialHighlightedIndex;\n  }\n  if (defaultHighlightedIndex !== undefined && (defaultHighlightedIndex === -1 || items[defaultHighlightedIndex] !== undefined && !isItemDisabled(items[defaultHighlightedIndex], defaultHighlightedIndex))) {\n    return defaultHighlightedIndex;\n  }\n  if (selectedItem) {\n    return items.findIndex(function (item) {\n      return itemToKey(selectedItem) === itemToKey(item);\n    });\n  }\n  if (offset < 0 && items[items.length - 1] && !isItemDisabled(items[items.length - 1], items.length - 1)) {\n    return items.length - 1;\n  }\n  if (offset > 0 && items[0] && !isItemDisabled(items[0], 0)) {\n    return 0;\n  }\n  return -1;\n}\n\nfunction getInitialState$3(props) {\n  var selectedItem = getInitialValue(props.selectedItem, props.initialSelectedItem, props.defaultSelectedItem, dropdownDefaultStateValues.selectedItem);\n  var isOpen = getInitialValue(props.isOpen, props.initialIsOpen, props.defaultIsOpen, dropdownDefaultStateValues.isOpen);\n  var highlightedIndex = getInitialHighlightedIndex(props);\n  var inputValue = getInitialValue(props.inputValue, props.initialInputValue, props.defaultInputValue, dropdownDefaultStateValues.inputValue);\n  return {\n    highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.findIndex(function (item) {\n      return props.itemToKey(item) === props.itemToKey(selectedItem);\n    }) : highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\n/**\n * Returns the new highlightedIndex based on the initialHighlightedIndex prop, if not disabled.\n * @param props Props from useCombobox or useSelect.\n * @returns The highlighted index.\n */\nfunction getInitialHighlightedIndex(props) {\n  var highlightedIndex = getInitialValue(props.highlightedIndex, props.initialHighlightedIndex, props.defaultHighlightedIndex, dropdownDefaultStateValues.highlightedIndex);\n  if (highlightedIndex > -1 && props.items[highlightedIndex] && props.isItemDisabled(props.items[highlightedIndex], highlightedIndex)) {\n    return -1;\n  }\n  return highlightedIndex;\n}\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n// eslint-disable-next-line import/no-mutable-exports\nvar useControlPropsValidator = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n  useControlPropsValidator = function useControlPropsValidator(_ref) {\n    var props = _ref.props,\n      state = _ref.state;\n    // used for checking when props are moving from controlled to uncontrolled.\n    var prevPropsRef = React.useRef(props);\n    var isInitialMount = useIsInitialMount();\n    React.useEffect(function () {\n      if (isInitialMount) {\n        return;\n      }\n      validateControlledUnchanged(state, prevPropsRef.current, props);\n      prevPropsRef.current = props;\n    }, [state, props, isInitialMount]);\n  };\n}\n\n/**\n * Tracks mouse and touch events, such as mouseDown, touchMove and touchEnd.\n *\n * @param environment The environment to add the event listeners to, for instance window.\n * @param handleBlur The function that is called if mouseDown or touchEnd occured outside the downshiftElements.\n * @param downshiftRefs The refs for the elements that should not trigger a blur action from mouseDown or touchEnd.\n * @returns A ref holding the mouse and touch events information. Read `.current` only inside event handlers/effects.\n */\nfunction useMouseAndTouchTracker(environment, handleBlur, downshiftRefs) {\n  var mouseAndTouchTrackersRef = React.useRef({\n    isMouseDown: false,\n    isTouchMove: false,\n    isTouchEnd: false\n  });\n  var getDownshiftElements = React.useCallback(function () {\n    return downshiftRefs.map(function (ref) {\n      return ref.current;\n    });\n  }, [downshiftRefs]);\n  React.useEffect(function () {\n    if (!environment) {\n      return noop;\n    }\n    function onMouseDown() {\n      mouseAndTouchTrackersRef.current.isTouchEnd = false; // reset this one.\n      mouseAndTouchTrackersRef.current.isMouseDown = true;\n    }\n    function onMouseUp(event) {\n      mouseAndTouchTrackersRef.current.isMouseDown = false;\n      if (!targetWithinDownshift(event.target, getDownshiftElements(), environment)) {\n        handleBlur();\n      }\n    }\n    function onTouchStart() {\n      mouseAndTouchTrackersRef.current.isTouchEnd = false;\n      mouseAndTouchTrackersRef.current.isTouchMove = false;\n    }\n    function onTouchMove() {\n      mouseAndTouchTrackersRef.current.isTouchMove = true;\n    }\n    function onTouchEnd(event) {\n      mouseAndTouchTrackersRef.current.isTouchEnd = true;\n      if (!mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, getDownshiftElements(), environment, false)) {\n        handleBlur();\n      }\n    }\n    environment.addEventListener('mousedown', onMouseDown);\n    environment.addEventListener('mouseup', onMouseUp);\n    environment.addEventListener('touchstart', onTouchStart);\n    environment.addEventListener('touchmove', onTouchMove);\n    environment.addEventListener('touchend', onTouchEnd);\n    return function cleanup() {\n      environment.removeEventListener('mousedown', onMouseDown);\n      environment.removeEventListener('mouseup', onMouseUp);\n      environment.removeEventListener('touchstart', onTouchStart);\n      environment.removeEventListener('touchmove', onTouchMove);\n      environment.removeEventListener('touchend', onTouchEnd);\n    };\n  }, [environment, getDownshiftElements, handleBlur]);\n  return mouseAndTouchTrackersRef;\n}\n\n/* istanbul ignore next */\n// eslint-disable-next-line import/no-mutable-exports\nvar useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n  return noop;\n};\n/**\n * Custom hook that checks if getter props are called correctly.\n *\n * @param propKeys Getter prop names to be handled.\n * @returns Setter function called inside getter props to set call information.\n */\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n  useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n    for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {\n      propKeys[_key] = arguments[_key];\n    }\n    var getterPropsCalledRef = React.useRef(propKeys.reduce(function (acc, propKey) {\n      acc[propKey] = {};\n      return acc;\n    }, {}));\n    React.useEffect(function () {\n      Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {\n        var propCallInfo = getterPropsCalledRef.current[propKey];\n        if (!Object.keys(propCallInfo).length) {\n          // eslint-disable-next-line no-console\n          console.error(\"downshift: You forgot to call the \" + propKey + \" getter function on your component / element.\");\n          return;\n        }\n        var suppressRefError = propCallInfo.suppressRefError,\n          refKey = propCallInfo.refKey,\n          elementRef = propCallInfo.elementRef;\n        if (suppressRefError) {\n          return;\n        }\n        if (!(elementRef != null && elementRef.current)) {\n          // eslint-disable-next-line no-console\n          console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from \" + propKey + \" was not applied correctly on your element.\");\n        }\n      });\n    }, []);\n    var setGetterPropCallInfo = React.useCallback(function (propKey, suppressRefError, refKey, elementRef) {\n      getterPropsCalledRef.current[propKey] = {\n        suppressRefError: suppressRefError,\n        refKey: refKey,\n        elementRef: elementRef\n      };\n    }, []);\n    return setGetterPropCallInfo;\n  };\n}\n\n/**\n * Utility hook that scrolls an item from a menu into view.\n * @param scrollIntoView The function that does the scroll.\n * @param highlightedIndex The index of the item that should be scrolled.\n * @param isOpen If the menu is open or not.\n * @param menuRef The ref to the menu element.\n * @param itemsRef The ref to the object containing item elements.\n * @param getItemId The function to get the item id from index.\n * @returns Function that when called prevents the scroll.\n */\nfunction useScrollIntoView(scrollIntoView, highlightedIndex, isOpen, menuRef, itemsRef, getItemId) {\n  // used not to scroll on highlight by mouse.\n  var shouldScrollRef = React.useRef(true);\n  // Scroll on highlighted item if change comes from keyboard.\n  useIsomorphicLayoutEffect(function () {\n    if (highlightedIndex < 0 || !isOpen || !Object.keys(itemsRef.current).length) {\n      return;\n    }\n    if (shouldScrollRef.current) {\n      var itemElement = itemsRef.current[getItemId(highlightedIndex)];\n      if (itemElement && menuRef.current) {\n        scrollIntoView(itemElement, menuRef.current);\n      }\n    } else {\n      shouldScrollRef.current = true;\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps -- intentionally only re-runs when highlightedIndex changes; other params are refs/stable values that don't trigger scrolling\n  }, [highlightedIndex]);\n  return React.useCallback(function preventScroll() {\n    shouldScrollRef.current = false;\n  }, []);\n}\n\n/**\n * Check if a state is equal for dropdowns, by comparing isOpen, inputValue, highlightedIndex and selected item.\n * Used by useSelect and useCombobox.\n *\n * @param prevState The previous dropdown state.\n * @param newState The new dropdown state.\n * @returns Whether the states are deeply equal.\n */\nfunction isDropdownStateEqual(prevState, newState) {\n  return prevState.isOpen === newState.isOpen && prevState.inputValue === newState.inputValue && prevState.highlightedIndex === newState.highlightedIndex && prevState.selectedItem === newState.selectedItem;\n}\n\nfunction downshiftCommonReducer(state, props, action, stateChangeTypes) {\n  var type = action.type;\n  var changes;\n  switch (type) {\n    case stateChangeTypes.ItemMouseMove:\n      changes = {\n        highlightedIndex: action.disabled ? -1 : action.index\n      };\n      break;\n    case stateChangeTypes.MenuMouseLeave:\n      changes = {\n        highlightedIndex: -1\n      };\n      break;\n    case stateChangeTypes.ToggleButtonClick:\n    case stateChangeTypes.FunctionToggleMenu:\n      changes = {\n        isOpen: !state.isOpen,\n        highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, 0)\n      };\n      break;\n    case stateChangeTypes.FunctionOpenMenu:\n      changes = {\n        isOpen: true,\n        highlightedIndex: getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, 0)\n      };\n      break;\n    case stateChangeTypes.FunctionCloseMenu:\n      changes = {\n        isOpen: false\n      };\n      break;\n    case stateChangeTypes.FunctionSetHighlightedIndex:\n      {\n        var highlightedIndex = action.highlightedIndex;\n        changes = {\n          highlightedIndex: props.isItemDisabled(props.items[highlightedIndex], highlightedIndex) ? -1 : highlightedIndex\n        };\n      }\n      break;\n    case stateChangeTypes.FunctionSetInputValue:\n      changes = {\n        inputValue: action.inputValue\n      };\n      break;\n    case stateChangeTypes.FunctionReset:\n      changes = {\n        highlightedIndex: getDefaultHighlightedIndex(props.items, props.isItemDisabled, props.defaultHighlightedIndex),\n        isOpen: getDefaultValue(props.defaultIsOpen, dropdownDefaultStateValues.isOpen),\n        selectedItem: getDefaultValue(props.defaultSelectedItem, dropdownDefaultStateValues.selectedItem),\n        inputValue: getDefaultValue(props.defaultInputValue, dropdownDefaultStateValues.inputValue)\n      };\n      break;\n    default:\n      throw new Error('Reducer called without proper action type.');\n  }\n  return _extends({}, state, changes);\n}\n\nvar propTypes$3 = _extends({}, dropdownPropTypes, {\n  items: PropTypes.array.isRequired,\n  isItemDisabled: PropTypes.func\n});\n\nfunction getItemIndexByCharacterKey(_ref) {\n  var keysSoFar = _ref.keysSoFar,\n    highlightedIndex = _ref.highlightedIndex,\n    items = _ref.items,\n    itemToString = _ref.itemToString,\n    isItemDisabled = _ref.isItemDisabled;\n  var lowerCasedKeysSoFar = keysSoFar.toLowerCase();\n  for (var _index = 0; _index < items.length; _index++) {\n    // if we already have a search query in progress, we also consider the current highlighted item.\n    var offsetIndex = (_index + highlightedIndex + (keysSoFar.length < 2 ? 1 : 0)) % items.length;\n    var _item = items[offsetIndex];\n    if (_item !== undefined && itemToString(_item).toLowerCase().startsWith(lowerCasedKeysSoFar) && !isItemDisabled(_item, offsetIndex)) {\n      return offsetIndex;\n    }\n  }\n  return highlightedIndex;\n}\n\nvar ToggleButtonClick$1 = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 0;\nvar ToggleButtonKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_down__' : 1;\nvar ToggleButtonKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_up__' : 2;\nvar ToggleButtonKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_character__' : 3;\nvar ToggleButtonKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_escape__' : 4;\nvar ToggleButtonKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_home__' : 5;\nvar ToggleButtonKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_end__' : 6;\nvar ToggleButtonKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_enter__' : 7;\nvar ToggleButtonKeyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_space_button__' : 8;\nvar ToggleButtonKeyDownPageUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_page_up__' : 9;\nvar ToggleButtonKeyDownPageDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_page_down__' : 10;\nvar ToggleButtonBlur = process.env.NODE_ENV !== \"production\" ? '__togglebutton_blur__' : 11;\nvar MenuMouseLeave$1 = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 12;\nvar ItemMouseMove$1 = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 13;\nvar ItemClick$1 = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 14;\nvar FunctionToggleMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 15;\nvar FunctionOpenMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 16;\nvar FunctionCloseMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 17;\nvar FunctionSetHighlightedIndex$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 18;\nvar FunctionSelectItem$1 = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 19;\nvar FunctionSetInputValue$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 20;\nvar FunctionReset$2 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 21;\n\nvar stateChangeTypes$3 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  FunctionCloseMenu: FunctionCloseMenu$1,\n  FunctionOpenMenu: FunctionOpenMenu$1,\n  FunctionReset: FunctionReset$2,\n  FunctionSelectItem: FunctionSelectItem$1,\n  FunctionSetHighlightedIndex: FunctionSetHighlightedIndex$1,\n  FunctionSetInputValue: FunctionSetInputValue$1,\n  FunctionToggleMenu: FunctionToggleMenu$1,\n  ItemClick: ItemClick$1,\n  ItemMouseMove: ItemMouseMove$1,\n  MenuMouseLeave: MenuMouseLeave$1,\n  ToggleButtonBlur: ToggleButtonBlur,\n  ToggleButtonClick: ToggleButtonClick$1,\n  ToggleButtonKeyDownArrowDown: ToggleButtonKeyDownArrowDown,\n  ToggleButtonKeyDownArrowUp: ToggleButtonKeyDownArrowUp,\n  ToggleButtonKeyDownCharacter: ToggleButtonKeyDownCharacter,\n  ToggleButtonKeyDownEnd: ToggleButtonKeyDownEnd,\n  ToggleButtonKeyDownEnter: ToggleButtonKeyDownEnter,\n  ToggleButtonKeyDownEscape: ToggleButtonKeyDownEscape,\n  ToggleButtonKeyDownHome: ToggleButtonKeyDownHome,\n  ToggleButtonKeyDownPageDown: ToggleButtonKeyDownPageDown,\n  ToggleButtonKeyDownPageUp: ToggleButtonKeyDownPageUp,\n  ToggleButtonKeyDownSpaceButton: ToggleButtonKeyDownSpaceButton\n});\n\n/* eslint-disable complexity */\nfunction downshiftSelectReducer(state, action) {\n  var type = action.type,\n    props = action.props;\n  var changes;\n  switch (type) {\n    case ItemClick$1:\n      changes = {\n        isOpen: getDefaultValue(props.defaultIsOpen, dropdownDefaultStateValues.isOpen),\n        highlightedIndex: getDefaultHighlightedIndex(props.items, props.isItemDisabled, props.defaultHighlightedIndex),\n        selectedItem: props.items[action.index]\n      };\n      break;\n    case ToggleButtonKeyDownCharacter:\n      {\n        var lowercasedKey = action.key;\n        var inputValue = \"\" + state.inputValue + lowercasedKey;\n        var prevHighlightedIndex = !state.isOpen && state.selectedItem ? props.items.findIndex(function (item) {\n          return props.itemToKey(item) === props.itemToKey(state.selectedItem);\n        }) : state.highlightedIndex;\n        var highlightedIndex = getItemIndexByCharacterKey({\n          keysSoFar: inputValue,\n          highlightedIndex: prevHighlightedIndex,\n          items: props.items,\n          itemToString: props.itemToString,\n          isItemDisabled: props.isItemDisabled\n        });\n        changes = {\n          inputValue: inputValue,\n          highlightedIndex: highlightedIndex,\n          isOpen: true\n        };\n      }\n      break;\n    case ToggleButtonKeyDownArrowDown:\n      {\n        var altKey = action.altKey;\n        var _highlightedIndex = state.isOpen ? getHighlightedIndex(state.highlightedIndex, 1, props.items, props.isItemDisabled) : altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, 1);\n        changes = {\n          highlightedIndex: _highlightedIndex,\n          isOpen: true\n        };\n      }\n      break;\n    case ToggleButtonKeyDownArrowUp:\n      {\n        var _altKey = action.altKey;\n        if (state.isOpen && _altKey) {\n          changes = getChangesOnSelection(props.items, props.itemToString, props.defaultIsOpen, props.defaultHighlightedIndex, state.highlightedIndex, false);\n        } else {\n          var _highlightedIndex2 = state.isOpen ? getHighlightedIndex(state.highlightedIndex, -1, props.items, props.isItemDisabled) : getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, -1);\n          changes = {\n            highlightedIndex: _highlightedIndex2,\n            isOpen: true\n          };\n        }\n      }\n      break;\n    // only triggered when menu is open.\n    case ToggleButtonKeyDownEnter:\n    case ToggleButtonKeyDownSpaceButton:\n      changes = getChangesOnSelection(props.items, props.itemToString, props.defaultIsOpen, props.defaultHighlightedIndex, state.highlightedIndex, false);\n      break;\n    case ToggleButtonKeyDownHome:\n      changes = {\n        highlightedIndex: getNonDisabledIndex(0, false, props.items, props.isItemDisabled),\n        isOpen: true\n      };\n      break;\n    case ToggleButtonKeyDownEnd:\n      changes = {\n        highlightedIndex: getNonDisabledIndex(props.items.length - 1, true, props.items, props.isItemDisabled),\n        isOpen: true\n      };\n      break;\n    case ToggleButtonKeyDownPageUp:\n      changes = {\n        highlightedIndex: getHighlightedIndex(state.highlightedIndex, -10, props.items, props.isItemDisabled)\n      };\n      break;\n    case ToggleButtonKeyDownPageDown:\n      changes = {\n        highlightedIndex: getHighlightedIndex(state.highlightedIndex, 10, props.items, props.isItemDisabled)\n      };\n      break;\n    case ToggleButtonKeyDownEscape:\n      changes = {\n        isOpen: false,\n        highlightedIndex: -1\n      };\n      break;\n    case ToggleButtonBlur:\n      changes = _extends({\n        isOpen: false,\n        highlightedIndex: -1\n      }, state.highlightedIndex >= 0 && props.items.length && {\n        selectedItem: props.items[state.highlightedIndex]\n      });\n      break;\n    case FunctionSelectItem$1:\n      changes = {\n        selectedItem: action.selectedItem\n      };\n      break;\n    default:\n      return downshiftCommonReducer(state, props, action, stateChangeTypes$3);\n  }\n  return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nvar _excluded$3 = [\"onClick\"],\n  _excluded2$3 = [\"onMouseLeave\", \"refKey\", \"ref\", \"aria-label\"],\n  _excluded3$2 = [\"onBlur\", \"onClick\", \"onPress\", \"onKeyDown\", \"refKey\", \"ref\"],\n  _excluded4$1 = [\"item\", \"index\", \"onMouseMove\", \"onClick\", \"onMouseDown\", \"onPress\", \"refKey\", \"disabled\", \"ref\"];\nuseSelect.stateChangeTypes = stateChangeTypes$3;\nfunction useSelect(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n  validatePropTypes$1(userProps, useSelect, propTypes$3);\n  // Props defaults and destructuring.\n  var props = _extends({}, dropdownDefaultProps, userProps);\n  var items = props.items,\n    isItemDisabled = props.isItemDisabled,\n    scrollIntoView = props.scrollIntoView,\n    environment = props.environment,\n    getA11yStatusMessage = props.getA11yStatusMessage;\n  // Initial state depending on controlled props.\n  var _useControlledReducer = useControlledReducer$1(downshiftSelectReducer, props, getInitialState$3, isDropdownStateEqual),\n    state = _useControlledReducer[0],\n    dispatch = _useControlledReducer[1];\n  var isOpen = state.isOpen,\n    highlightedIndex = state.highlightedIndex,\n    selectedItem = state.selectedItem,\n    inputValue = state.inputValue;\n\n  // Element refs.\n  var toggleButtonRef = useRef(null);\n  var menuRef = useRef(null);\n  var itemsRef = useRef({});\n\n  // used to keep the inputValue clearTimeout object between renders.\n  var clearTimeoutRef = useRef(null);\n  // prevent id re-generation between renders.\n  var elementIds = useElementIds$1(props);\n  /**\n   * Ref to read `state` in handlers to preserve referential identity.\n   * Only to be used in handlers and effects.\n   * **never access this in getters**\n   */\n  var stateRef = useLatestRef(state);\n\n  // Effects.\n  // Adds an a11y aria live status message if getA11yStatusMessage is passed.\n  useA11yMessageStatus(getA11yStatusMessage, state, [isOpen, highlightedIndex, selectedItem, inputValue], environment);\n  // Scroll on highlighted item if change comes from keyboard.\n  var preventScroll = useScrollIntoView(scrollIntoView, highlightedIndex, isOpen, menuRef, itemsRef, elementIds.getItemId);\n  // Sets cleanup for the keysSoFar callback, debounced after 500ms.\n  useEffect(function () {\n    // init the clean function here as we need access to dispatch.\n    clearTimeoutRef.current = debounce(function (outerDispatch) {\n      outerDispatch({\n        type: FunctionSetInputValue$1,\n        inputValue: ''\n      });\n    }, 500);\n\n    // Cancel any pending debounced calls on mount\n    return function () {\n      var _clearTimeoutRef$curr;\n      (_clearTimeoutRef$curr = clearTimeoutRef.current) == null || _clearTimeoutRef$curr.cancel();\n    };\n  }, []);\n  // Invokes the keysSoFar callback set up above.\n  useEffect(function () {\n    if (!inputValue) {\n      return;\n    }\n    clearTimeoutRef.current == null || clearTimeoutRef.current(dispatch);\n  }, [dispatch, inputValue]);\n  useControlPropsValidator({\n    props: props,\n    state: state\n  });\n  // Focus the toggle button on first render if required.\n  useEffect(function () {\n    var focusOnOpen = getInitialValue(props.isOpen, props.initialIsOpen, props.defaultIsOpen, dropdownDefaultStateValues.isOpen);\n    if (focusOnOpen && toggleButtonRef.current) {\n      toggleButtonRef.current.focus();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  var handleBlurInTracker = useCallback(function handleBlur() {\n    if (stateRef.current.isOpen) {\n      dispatch({\n        type: ToggleButtonBlur\n      });\n    }\n  }, [dispatch, stateRef]);\n  var downshiftRefs = useMemo(function () {\n    return [menuRef, toggleButtonRef];\n  }, []);\n  var mouseAndTouchTrackers = useMouseAndTouchTracker(environment, handleBlurInTracker, downshiftRefs);\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getMenuProps', 'getToggleButtonProps');\n  // Reset itemRefs on close.\n  useEffect(function () {\n    if (!isOpen) {\n      itemsRef.current = {};\n    }\n  }, [isOpen]);\n\n  // Event handler functions.\n  var toggleButtonKeyDownHandlers = useMemo(function () {\n    return {\n      ArrowDown: function ArrowDown(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownArrowDown,\n          altKey: event.altKey\n        });\n      },\n      ArrowUp: function ArrowUp(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownArrowUp,\n          altKey: event.altKey\n        });\n      },\n      Home: function Home(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownHome\n        });\n      },\n      End: function End(event) {\n        event.preventDefault();\n        dispatch({\n          type: ToggleButtonKeyDownEnd\n        });\n      },\n      Escape: function Escape() {\n        if (stateRef.current.isOpen) {\n          dispatch({\n            type: ToggleButtonKeyDownEscape\n          });\n        }\n      },\n      Enter: function Enter(event) {\n        event.preventDefault();\n        dispatch({\n          type: stateRef.current.isOpen ? ToggleButtonKeyDownEnter : ToggleButtonClick$1\n        });\n      },\n      PageUp: function PageUp(event) {\n        if (stateRef.current.isOpen) {\n          event.preventDefault();\n          dispatch({\n            type: ToggleButtonKeyDownPageUp\n          });\n        }\n      },\n      PageDown: function PageDown(event) {\n        if (stateRef.current.isOpen) {\n          event.preventDefault();\n          dispatch({\n            type: ToggleButtonKeyDownPageDown\n          });\n        }\n      },\n      ' ': function _(event) {\n        event.preventDefault();\n        var currentState = stateRef.current;\n        if (!currentState.isOpen) {\n          dispatch({\n            type: ToggleButtonClick$1\n          });\n          return;\n        }\n        if (currentState.inputValue) {\n          dispatch({\n            type: ToggleButtonKeyDownCharacter,\n            key: ' '\n          });\n        } else {\n          dispatch({\n            type: ToggleButtonKeyDownSpaceButton\n          });\n        }\n      }\n    };\n  }, [dispatch, stateRef]);\n\n  // Getter functions.\n  var getLabelProps = useCallback(function (labelProps) {\n    var _ref = labelProps != null ? labelProps : {},\n      onClick = _ref.onClick,\n      rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);\n    var labelHandleClick = function labelHandleClick() {\n      var _toggleButtonRef$curr;\n      (_toggleButtonRef$curr = toggleButtonRef.current) == null || _toggleButtonRef$curr.focus();\n    };\n    return _extends({\n      id: elementIds.labelId,\n      htmlFor: elementIds.toggleButtonId,\n      onClick: callAllEventHandlers(onClick, labelHandleClick)\n    }, rest);\n  }, [elementIds]);\n  var getMenuProps = useCallback(function (menuProps, otherProps) {\n    var _extends2;\n    var _ref2 = menuProps != null ? menuProps : {},\n      onMouseLeave = _ref2.onMouseLeave,\n      _ref2$refKey = _ref2.refKey,\n      refKey = _ref2$refKey === void 0 ? 'ref' : _ref2$refKey,\n      ref = _ref2.ref,\n      ariaLabel = _ref2['aria-label'],\n      rest = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);\n    var _ref3 = otherProps != null ? otherProps : {},\n      _ref3$suppressRefErro = _ref3.suppressRefError,\n      suppressRefError = _ref3$suppressRefErro === void 0 ? false : _ref3$suppressRefErro;\n    var menuHandleMouseLeave = function menuHandleMouseLeave() {\n      dispatch({\n        type: MenuMouseLeave$1\n      });\n    };\n    setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n      menuRef.current = menuNode;\n    }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-label'] = ariaLabel, _extends2['aria-labelledby'] = ariaLabel ? undefined : \"\" + elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, menuHandleMouseLeave), _extends2), rest);\n  }, [dispatch, setGetterPropCallInfo, elementIds]);\n  var getToggleButtonProps = useCallback(function (toggleButtonProps, otherProps) {\n    var _extends3;\n    var _ref4 = toggleButtonProps != null ? toggleButtonProps : {},\n      onBlur = _ref4.onBlur,\n      onClick = _ref4.onClick;\n      _ref4.onPress;\n      var onKeyDown = _ref4.onKeyDown,\n      _ref4$refKey = _ref4.refKey,\n      refKey = _ref4$refKey === void 0 ? 'ref' : _ref4$refKey,\n      ref = _ref4.ref,\n      rest = _objectWithoutPropertiesLoose(_ref4, _excluded3$2);\n    var _ref5 = otherProps != null ? otherProps : {},\n      _ref5$suppressRefErro = _ref5.suppressRefError,\n      suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;\n    var toggleButtonHandleClick = function toggleButtonHandleClick() {\n      dispatch({\n        type: ToggleButtonClick$1\n      });\n    };\n    var toggleButtonHandleBlur = function toggleButtonHandleBlur() {\n      if (stateRef.current.isOpen && !mouseAndTouchTrackers.current.isMouseDown) {\n        dispatch({\n          type: ToggleButtonBlur\n        });\n      }\n    };\n    var toggleButtonHandleKeyDown = function toggleButtonHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n      if (key && key in toggleButtonKeyDownHandlers) {\n        toggleButtonKeyDownHandlers[key](event);\n      } else if (/^\\S{1}$/.test(key)) {\n        dispatch({\n          type: ToggleButtonKeyDownCharacter,\n          key: key\n        });\n      }\n    };\n    var toggleProps = _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (toggleButtonNode) {\n      toggleButtonRef.current = toggleButtonNode;\n    }), _extends3['aria-activedescendant'] = isOpen && highlightedIndex > -1 ? elementIds.getItemId(highlightedIndex) : '', _extends3['aria-controls'] = elementIds.menuId, _extends3['aria-expanded'] = isOpen, _extends3['aria-haspopup'] = 'listbox', _extends3['aria-labelledby'] = rest['aria-label'] ? undefined : \"\" + elementIds.labelId, _extends3.id = elementIds.toggleButtonId, _extends3.role = 'combobox', _extends3.tabIndex = 0, _extends3.onBlur = callAllEventHandlers(onBlur, toggleButtonHandleBlur), _extends3), rest);\n    if (!rest.disabled) {\n      /* istanbul ignore if (react-native) */\n      {\n        Object.assign(toggleProps, {\n          onClick: callAllEventHandlers(onClick, toggleButtonHandleClick),\n          onKeyDown: callAllEventHandlers(onKeyDown, toggleButtonHandleKeyDown)\n        });\n      }\n    }\n    setGetterPropCallInfo('getToggleButtonProps', suppressRefError, refKey, toggleButtonRef);\n    return toggleProps;\n  }, [dispatch, elementIds, isOpen, highlightedIndex, mouseAndTouchTrackers, setGetterPropCallInfo, toggleButtonKeyDownHandlers, stateRef]);\n  var getItemProps = useCallback(function (itemProps) {\n    var _extends4;\n    var _ref6 = itemProps != null ? itemProps : {},\n      itemProp = _ref6.item,\n      indexProp = _ref6.index,\n      onMouseMove = _ref6.onMouseMove,\n      onClick = _ref6.onClick,\n      onMouseDown = _ref6.onMouseDown;\n      _ref6.onPress;\n      var _ref6$refKey = _ref6.refKey,\n      refKey = _ref6$refKey === void 0 ? 'ref' : _ref6$refKey,\n      disabledProp = _ref6.disabled,\n      ref = _ref6.ref,\n      rest = _objectWithoutPropertiesLoose(_ref6, _excluded4$1);\n    if (disabledProp !== undefined) {\n      console.warn('Passing \"disabled\" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useSelect.');\n    }\n    var _getItemAndIndex = getItemAndIndex(itemProp, indexProp, items, 'Pass either item or index to getItemProps!'),\n      item = _getItemAndIndex[0],\n      index = _getItemAndIndex[1];\n    var disabled = isItemDisabled(item, index);\n    var itemHandleMouseMove = function itemHandleMouseMove() {\n      if (mouseAndTouchTrackers.current.isTouchEnd || index === stateRef.current.highlightedIndex) {\n        return;\n      }\n      preventScroll();\n      dispatch({\n        type: ItemMouseMove$1,\n        index: index,\n        disabled: disabled\n      });\n    };\n    var itemHandleClick = function itemHandleClick() {\n      dispatch({\n        type: ItemClick$1,\n        index: index\n      });\n    };\n    var itemHandleMouseDown = function itemHandleMouseDown(e) {\n      return e.preventDefault();\n    }; // keep focus on the toggle after item click select.\n\n    var resultItemProps = _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (itemNode) {\n      if (itemNode) {\n        itemsRef.current[elementIds.getItemId(index)] = itemNode;\n      }\n    }), _extends4['aria-disabled'] = disabled, _extends4['aria-selected'] = item === selectedItem, _extends4.id = elementIds.getItemId(index), _extends4.role = 'option', _extends4.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove), _extends4.onMouseDown = callAllEventHandlers(onMouseDown, itemHandleMouseDown), _extends4), rest);\n    if (!disabled) {\n      /* istanbul ignore next (react-native) */\n      {\n        Object.assign(resultItemProps, {\n          onClick: callAllEventHandlers(onClick, itemHandleClick)\n        });\n      }\n    }\n    return resultItemProps;\n  }, [items, isItemDisabled, selectedItem, elementIds, mouseAndTouchTrackers, preventScroll, dispatch, stateRef]);\n\n  // Action functions.\n  var toggleMenu = useCallback(function () {\n    dispatch({\n      type: FunctionToggleMenu$1\n    });\n  }, [dispatch]);\n  var closeMenu = useCallback(function () {\n    dispatch({\n      type: FunctionCloseMenu$1\n    });\n  }, [dispatch]);\n  var openMenu = useCallback(function () {\n    dispatch({\n      type: FunctionOpenMenu$1\n    });\n  }, [dispatch]);\n  var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n    dispatch({\n      type: FunctionSetHighlightedIndex$1,\n      highlightedIndex: newHighlightedIndex\n    });\n  }, [dispatch]);\n  var selectItem = useCallback(function (newSelectedItem) {\n    dispatch({\n      type: FunctionSelectItem$1,\n      selectedItem: newSelectedItem\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset$2\n    });\n  }, [dispatch]);\n  var setInputValue = useCallback(function (newInputValue) {\n    dispatch({\n      type: FunctionSetInputValue$1,\n      inputValue: newInputValue\n    });\n  }, [dispatch]);\n  return {\n    // prop getters.\n    getToggleButtonProps: getToggleButtonProps,\n    getLabelProps: getLabelProps,\n    getMenuProps: getMenuProps,\n    getItemProps: getItemProps,\n    // actions.\n    toggleMenu: toggleMenu,\n    openMenu: openMenu,\n    closeMenu: closeMenu,\n    setHighlightedIndex: setHighlightedIndex,\n    selectItem: selectItem,\n    reset: reset,\n    setInputValue: setInputValue,\n    // state.\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\nfunction getInitialState$2(props) {\n  var initialState = getInitialState$3(props);\n  var selectedItem = initialState.selectedItem;\n  var inputValue = initialState.inputValue;\n  if (inputValue === '' && selectedItem && props.defaultInputValue === undefined && props.initialInputValue === undefined && props.inputValue === undefined) {\n    inputValue = props.itemToString(selectedItem);\n  }\n  return _extends({}, initialState, {\n    inputValue: inputValue\n  });\n}\n\nvar InputKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_down__' : 0;\nvar InputKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_up__' : 1;\nvar InputKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__input_keydown_escape__' : 2;\nvar InputKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__input_keydown_home__' : 3;\nvar InputKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__input_keydown_end__' : 4;\nvar InputKeyDownPageUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_page_up__' : 5;\nvar InputKeyDownPageDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_page_down__' : 6;\nvar InputKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__input_keydown_enter__' : 7;\nvar InputChange = process.env.NODE_ENV !== \"production\" ? '__input_change__' : 8;\nvar InputBlur = process.env.NODE_ENV !== \"production\" ? '__input_blur__' : 9;\nvar InputClick = process.env.NODE_ENV !== \"production\" ? '__input_click__' : 10;\nvar MenuMouseLeave = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 11;\nvar ItemMouseMove = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 12;\nvar ItemClick = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 13;\nvar ToggleButtonClick = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 14;\nvar FunctionToggleMenu = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 15;\nvar FunctionOpenMenu = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 16;\nvar FunctionCloseMenu = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 17;\nvar FunctionSetHighlightedIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 18;\nvar FunctionSelectItem = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 19;\nvar FunctionSetInputValue = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 20;\nvar FunctionReset$1 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 21;\nvar ControlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__controlled_prop_updated_selected_item__' : 22;\n\nvar stateChangeTypes$2 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  ControlledPropUpdatedSelectedItem: ControlledPropUpdatedSelectedItem,\n  FunctionCloseMenu: FunctionCloseMenu,\n  FunctionOpenMenu: FunctionOpenMenu,\n  FunctionReset: FunctionReset$1,\n  FunctionSelectItem: FunctionSelectItem,\n  FunctionSetHighlightedIndex: FunctionSetHighlightedIndex,\n  FunctionSetInputValue: FunctionSetInputValue,\n  FunctionToggleMenu: FunctionToggleMenu,\n  InputBlur: InputBlur,\n  InputChange: InputChange,\n  InputClick: InputClick,\n  InputKeyDownArrowDown: InputKeyDownArrowDown,\n  InputKeyDownArrowUp: InputKeyDownArrowUp,\n  InputKeyDownEnd: InputKeyDownEnd,\n  InputKeyDownEnter: InputKeyDownEnter,\n  InputKeyDownEscape: InputKeyDownEscape,\n  InputKeyDownHome: InputKeyDownHome,\n  InputKeyDownPageDown: InputKeyDownPageDown,\n  InputKeyDownPageUp: InputKeyDownPageUp,\n  ItemClick: ItemClick,\n  ItemMouseMove: ItemMouseMove,\n  MenuMouseLeave: MenuMouseLeave,\n  ToggleButtonClick: ToggleButtonClick\n});\n\n/**\n * The useCombobox version of useControlledReducer, which also\n * checks if the controlled prop selectedItem changed between\n * renders. If so, it will also update inputValue with its\n * string equivalent. It uses the common useEnhancedReducer to\n * compute the rest of the state.\n *\n * @param reducer Reducer function from downshift.\n * @param props The hook props, also passed to createInitialState.\n * @param createInitialState Function that returns the initial state.\n * @param isStateEqual Function that checks if a previous state is equal to the next.\n * @returns An array with the state and an action dispatcher.\n */\nfunction useControlledReducer(reducer, props, createInitialState, isStateEqual) {\n  var previousSelectedItemRef = useRef(null);\n  var _useEnhancedReducer = useEnhancedReducer(reducer, props, createInitialState, isStateEqual),\n    state = _useEnhancedReducer[0],\n    dispatch = _useEnhancedReducer[1];\n  var isInitialMount = useIsInitialMount();\n  useEffect(function () {\n    if (props.selectedItem === undefined) {\n      return;\n    }\n    if (!isInitialMount // on first mount we already have the proper inputValue for a initial selected item.\n    ) {\n      var shouldCallDispatch = props.itemToKey(props.selectedItem) !== props.itemToKey(previousSelectedItemRef.current);\n      if (shouldCallDispatch) {\n        dispatch({\n          type: ControlledPropUpdatedSelectedItem,\n          inputValue: props.itemToString(props.selectedItem)\n        });\n      }\n    }\n    previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [state.selectedItem, props.selectedItem]);\n  return [getState(state, props), dispatch];\n}\n\nvar propTypes$2 = _extends({}, dropdownPropTypes, {\n  items: PropTypes.array.isRequired,\n  isItemDisabled: PropTypes.func,\n  inputValue: PropTypes.string,\n  defaultInputValue: PropTypes.string,\n  initialInputValue: PropTypes.string,\n  inputId: PropTypes.string,\n  onInputValueChange: PropTypes.func\n});\n\n/* eslint-disable complexity */\nfunction downshiftUseComboboxReducer(state, action) {\n  var type = action.type,\n    props = action.props;\n  var changes;\n  switch (type) {\n    case ItemClick:\n      changes = {\n        isOpen: getDefaultValue(props.defaultIsOpen, dropdownDefaultStateValues.isOpen),\n        highlightedIndex: getDefaultHighlightedIndex(props.items, props.isItemDisabled, props.defaultHighlightedIndex),\n        selectedItem: props.items[action.index],\n        inputValue: props.itemToString(props.items[action.index])\n      };\n      break;\n    case InputKeyDownArrowDown:\n      if (state.isOpen) {\n        changes = {\n          highlightedIndex: getHighlightedIndex(state.highlightedIndex, 1, props.items, props.isItemDisabled, true)\n        };\n      } else {\n        changes = {\n          highlightedIndex: action.altKey && state.selectedItem == null ? -1 : getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, 1),\n          isOpen: props.items.length >= 0\n        };\n      }\n      break;\n    case InputKeyDownArrowUp:\n      if (state.isOpen) {\n        if (action.altKey) {\n          changes = getChangesOnSelection(props.items, props.itemToString, props.defaultIsOpen, props.defaultHighlightedIndex, state.highlightedIndex, true);\n        } else {\n          changes = {\n            highlightedIndex: getHighlightedIndex(state.highlightedIndex, -1, props.items, props.isItemDisabled, true)\n          };\n        }\n      } else {\n        changes = {\n          highlightedIndex: getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, -1),\n          isOpen: props.items.length >= 0\n        };\n      }\n      break;\n    case InputKeyDownEnter:\n      changes = getChangesOnSelection(props.items, props.itemToString, props.defaultIsOpen, props.defaultHighlightedIndex, state.highlightedIndex, true);\n      break;\n    case InputKeyDownEscape:\n      changes = _extends({\n        isOpen: false,\n        highlightedIndex: -1\n      }, !state.isOpen && {\n        selectedItem: null,\n        inputValue: ''\n      });\n      break;\n    case InputKeyDownPageUp:\n      changes = {\n        highlightedIndex: getHighlightedIndex(state.highlightedIndex, -10, props.items, props.isItemDisabled, true)\n      };\n      break;\n    case InputKeyDownPageDown:\n      changes = {\n        highlightedIndex: getHighlightedIndex(state.highlightedIndex, 10, props.items, props.isItemDisabled, true)\n      };\n      break;\n    case InputKeyDownHome:\n      changes = {\n        highlightedIndex: getNonDisabledIndex(0, false, props.items, props.isItemDisabled)\n      };\n      break;\n    case InputKeyDownEnd:\n      changes = {\n        highlightedIndex: getNonDisabledIndex(props.items.length - 1, true, props.items, props.isItemDisabled)\n      };\n      break;\n    case InputBlur:\n      changes = _extends({\n        isOpen: false,\n        highlightedIndex: -1\n      }, state.highlightedIndex >= 0 && props.items.length && action.selectItem && {\n        selectedItem: props.items[state.highlightedIndex],\n        inputValue: props.itemToString(props.items[state.highlightedIndex])\n      });\n      break;\n    case InputChange:\n      changes = {\n        isOpen: true,\n        highlightedIndex: getDefaultHighlightedIndex(props.items, props.isItemDisabled, props.defaultHighlightedIndex),\n        inputValue: action.inputValue\n      };\n      break;\n    case InputClick:\n      changes = {\n        isOpen: !state.isOpen,\n        highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props.items, props.initialHighlightedIndex, props.defaultHighlightedIndex, props.isItemDisabled, props.itemToKey, state.selectedItem, state.highlightedIndex, 0)\n      };\n      break;\n    case FunctionSelectItem:\n      changes = {\n        selectedItem: action.selectedItem,\n        inputValue: props.itemToString(action.selectedItem)\n      };\n      break;\n    case ControlledPropUpdatedSelectedItem:\n      changes = {\n        inputValue: action.inputValue\n      };\n      break;\n    default:\n      return downshiftCommonReducer(state, props, action, stateChangeTypes$2);\n  }\n  return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nvar _excluded$2 = [\"onMouseLeave\", \"refKey\", \"ref\", \"aria-label\"],\n  _excluded2$2 = [\"item\", \"index\", \"refKey\", \"ref\", \"onMouseMove\", \"onMouseDown\", \"onClick\", \"onPress\", \"disabled\"],\n  _excluded3$1 = [\"onClick\", \"onPress\", \"refKey\", \"ref\"],\n  _excluded4 = [\"aria-label\", \"onKeyDown\", \"onChange\", \"onInput\", \"onBlur\", \"onChangeText\", \"onClick\", \"refKey\", \"ref\"];\nuseCombobox.stateChangeTypes = stateChangeTypes$2;\nfunction useCombobox(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n  validatePropTypes$1(userProps, useCombobox, propTypes$2);\n  // Props defaults and destructuring.\n  var props = _extends({}, dropdownDefaultProps, userProps);\n  var items = props.items,\n    isItemDisabled = props.isItemDisabled,\n    scrollIntoView = props.scrollIntoView,\n    environment = props.environment,\n    getA11yStatusMessage = props.getA11yStatusMessage;\n  // Initial state depending on controlled props.\n  var _useControlledReducer = useControlledReducer(downshiftUseComboboxReducer, props, getInitialState$2, isDropdownStateEqual),\n    state = _useControlledReducer[0],\n    dispatch = _useControlledReducer[1];\n  var isOpen = state.isOpen,\n    highlightedIndex = state.highlightedIndex,\n    selectedItem = state.selectedItem,\n    inputValue = state.inputValue;\n\n  // Element refs.\n  var menuRef = useRef(null);\n  var itemsRef = useRef({});\n  var inputRef = useRef(null);\n  var toggleButtonRef = useRef(null);\n  var isInitialMount = useIsInitialMount();\n\n  // prevent id re-generation between renders.\n  var elementIds = useElementIds$1(props);\n  // used to keep track of how many items we had on previous cycle.\n  var previousResultCountRef = useRef();\n  /**\n   * Ref to read `state` in handlers to preserve referential identity.\n   * Only to be used in handlers and effects.\n   * **never access this in getters**\n   */\n  var stateRef = useLatestRef(state);\n\n  // Effects.\n  // Adds an a11y aria live status message if getA11yStatusMessage is passed.\n  useA11yMessageStatus(getA11yStatusMessage, state, [isOpen, highlightedIndex, selectedItem, inputValue], environment);\n  // Scroll on highlighted item if change comes from keyboard.\n  var preventScroll = useScrollIntoView(scrollIntoView, highlightedIndex, isOpen, menuRef, itemsRef, elementIds.getItemId);\n  useControlPropsValidator({\n    state: state,\n    props: props\n  });\n  // Focus the input on first render if required.\n  useEffect(function () {\n    var focusOnOpen = getInitialValue(props.isOpen, props.initialIsOpen, props.defaultIsOpen, dropdownDefaultStateValues.isOpen);\n    if (focusOnOpen && inputRef.current) {\n      inputRef.current.focus();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, []);\n  useEffect(function () {\n    if (!isInitialMount) {\n      previousResultCountRef.current = items.length;\n    }\n  });\n  var handleBlurInTracker = useCallback(function handleBlur() {\n    if (stateRef.current.isOpen) {\n      dispatch({\n        type: InputBlur\n      });\n    }\n  }, [dispatch, stateRef]);\n  var downshiftRefs = useMemo(function () {\n    return [menuRef, toggleButtonRef, inputRef];\n  }, []);\n  var mouseAndTouchTrackers = useMouseAndTouchTracker(environment, handleBlurInTracker, downshiftRefs);\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getInputProps', 'getMenuProps');\n  // Reset itemRefs on close.\n  useEffect(function () {\n    if (!isOpen) {\n      itemsRef.current = {};\n    }\n  }, [isOpen]);\n  // Reset itemRefs on close.\n  useEffect(function () {\n    var _inputRef$current;\n    if (!isOpen || !(environment != null && environment.document) || !((_inputRef$current = inputRef.current) != null && _inputRef$current.focus)) {\n      return;\n    }\n    if (environment.document.activeElement !== inputRef.current) {\n      inputRef.current.focus();\n    }\n  }, [isOpen, environment]);\n\n  /* Event handler functions */\n  var inputKeyDownHandlers = useMemo(function () {\n    return {\n      ArrowDown: function ArrowDown(event) {\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownArrowDown,\n          altKey: event.altKey\n        });\n      },\n      ArrowUp: function ArrowUp(event) {\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownArrowUp,\n          altKey: event.altKey\n        });\n      },\n      Home: function Home(event) {\n        if (!stateRef.current.isOpen) {\n          return;\n        }\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownHome\n        });\n      },\n      End: function End(event) {\n        if (!stateRef.current.isOpen) {\n          return;\n        }\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownEnd\n        });\n      },\n      Escape: function Escape(event) {\n        var latestState = stateRef.current;\n        if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) {\n          event.preventDefault();\n          dispatch({\n            type: InputKeyDownEscape\n          });\n        }\n      },\n      Enter: function Enter(event) {\n        var latestState = stateRef.current;\n        // if closed or no highlighted index, do nothing.\n        if (!latestState.isOpen || event.which === 229 // if IME composing, wait for next Enter keydown event.\n        ) {\n          return;\n        }\n        event.preventDefault();\n        dispatch({\n          type: InputKeyDownEnter\n        });\n      },\n      PageUp: function PageUp(event) {\n        if (stateRef.current.isOpen) {\n          event.preventDefault();\n          dispatch({\n            type: InputKeyDownPageUp\n          });\n        }\n      },\n      PageDown: function PageDown(event) {\n        if (stateRef.current.isOpen) {\n          event.preventDefault();\n          dispatch({\n            type: InputKeyDownPageDown\n          });\n        }\n      }\n    };\n  }, [dispatch, stateRef]);\n\n  // Getter props.\n  var getLabelProps = useCallback(function (labelProps) {\n    return _extends({\n      id: elementIds.labelId,\n      htmlFor: elementIds.inputId\n    }, labelProps);\n  }, [elementIds]);\n  var getMenuProps = useCallback(function (menuProps, otherProps) {\n    var _extends2;\n    var _ref = menuProps != null ? menuProps : {},\n      onMouseLeave = _ref.onMouseLeave,\n      _ref$refKey = _ref.refKey,\n      refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n      ref = _ref.ref,\n      ariaLabel = _ref['aria-label'],\n      rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n    var _ref2 = otherProps != null ? otherProps : {},\n      _ref2$suppressRefErro = _ref2.suppressRefError,\n      suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n    setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n      menuRef.current = menuNode;\n    }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-label'] = ariaLabel, _extends2['aria-labelledby'] = ariaLabel ? undefined : \"\" + elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, function () {\n      dispatch({\n        type: MenuMouseLeave\n      });\n    }), _extends2), rest);\n  }, [dispatch, setGetterPropCallInfo, elementIds]);\n  var getItemProps = useCallback(function (itemProps) {\n    var _extends3, _ref4;\n    var _ref3 = itemProps != null ? itemProps : {},\n      itemProp = _ref3.item,\n      indexProp = _ref3.index,\n      _ref3$refKey = _ref3.refKey,\n      refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n      ref = _ref3.ref,\n      onMouseMove = _ref3.onMouseMove,\n      onMouseDown = _ref3.onMouseDown,\n      onClick = _ref3.onClick;\n      _ref3.onPress;\n      var disabledProp = _ref3.disabled,\n      rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);\n    if (disabledProp !== undefined) {\n      console.warn('Passing \"disabled\" as an argument to getItemProps is not supported anymore. Please use the isItemDisabled prop from useCombobox.');\n    }\n    var _getItemAndIndex = getItemAndIndex(itemProp, indexProp, items, 'Pass either item or index to getItemProps!'),\n      item = _getItemAndIndex[0],\n      index = _getItemAndIndex[1];\n    var disabled = isItemDisabled(item, index);\n    var onSelectKey = 'onClick';\n    var customClickHandler = onClick;\n    var itemHandleMouseMove = function itemHandleMouseMove() {\n      if (mouseAndTouchTrackers.current.isTouchEnd || index === stateRef.current.highlightedIndex) {\n        return;\n      }\n      preventScroll();\n      dispatch({\n        type: ItemMouseMove,\n        index: index,\n        disabled: disabled\n      });\n    };\n    var itemHandleClick = function itemHandleClick() {\n      dispatch({\n        type: ItemClick,\n        index: index\n      });\n    };\n    var itemHandleMouseDown = function itemHandleMouseDown(e) {\n      return e.preventDefault();\n    }; // keep focus on the input after item click select.\n\n    return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (itemNode) {\n      if (itemNode) {\n        itemsRef.current[elementIds.getItemId(index)] = itemNode;\n      }\n    }), _extends3['aria-disabled'] = disabled, _extends3['aria-selected'] = index === highlightedIndex, _extends3.id = elementIds.getItemId(index), _extends3.role = 'option', _extends3), !disabled && (_ref4 = {}, _ref4[onSelectKey] = callAllEventHandlers(customClickHandler, itemHandleClick), _ref4), {\n      onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove),\n      onMouseDown: callAllEventHandlers(onMouseDown, itemHandleMouseDown)\n    }, rest);\n  }, [dispatch, elementIds, items, isItemDisabled, highlightedIndex, mouseAndTouchTrackers, preventScroll, stateRef]);\n  var getToggleButtonProps = useCallback(function (toggleButtonProps) {\n    var _extends4;\n    var _ref5 = toggleButtonProps != null ? toggleButtonProps : {},\n      onClick = _ref5.onClick;\n      _ref5.onPress;\n      var _ref5$refKey = _ref5.refKey,\n      refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n      ref = _ref5.ref,\n      rest = _objectWithoutPropertiesLoose(_ref5, _excluded3$1);\n    var toggleButtonHandleClick = function toggleButtonHandleClick() {\n      dispatch({\n        type: ToggleButtonClick\n      });\n    };\n    return _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (toggleButtonNode) {\n      toggleButtonRef.current = toggleButtonNode;\n    }), _extends4['aria-controls'] = elementIds.menuId, _extends4['aria-expanded'] = isOpen, _extends4.id = elementIds.toggleButtonId, _extends4.tabIndex = -1, _extends4), !rest.disabled && _extends({}, {\n      onClick: callAllEventHandlers(onClick, toggleButtonHandleClick)\n    }), rest);\n  }, [dispatch, isOpen, elementIds]);\n  var getInputProps = useCallback(function (inputProps, otherProps) {\n    var _extends5;\n    var _ref6 = inputProps != null ? inputProps : {},\n      ariaLabel = _ref6['aria-label'],\n      onKeyDown = _ref6.onKeyDown,\n      onChange = _ref6.onChange,\n      onInput = _ref6.onInput,\n      onBlur = _ref6.onBlur;\n      _ref6.onChangeText;\n      var onClick = _ref6.onClick,\n      _ref6$refKey = _ref6.refKey,\n      refKey = _ref6$refKey === void 0 ? 'ref' : _ref6$refKey,\n      ref = _ref6.ref,\n      rest = _objectWithoutPropertiesLoose(_ref6, _excluded4);\n    var _ref7 = otherProps != null ? otherProps : {},\n      _ref7$suppressRefErro = _ref7.suppressRefError,\n      suppressRefError = _ref7$suppressRefErro === void 0 ? false : _ref7$suppressRefErro;\n    setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef);\n    var inputHandleKeyDown = function inputHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n      if (key && key in inputKeyDownHandlers) {\n        var validKey = key;\n        inputKeyDownHandlers[validKey](event);\n      }\n    };\n    var inputHandleChange = function inputHandleChange(event) {\n      dispatch({\n        type: InputChange,\n        inputValue: event.target.value\n      });\n    };\n    var inputHandleBlur = function inputHandleBlur(event) {\n      /* istanbul ignore else */\n      if (environment != null && environment.document && stateRef.current.isOpen && !mouseAndTouchTrackers.current.isMouseDown) {\n        var isBlurByTabChange = event.relatedTarget === null && environment.document.activeElement !== environment.document.body;\n        dispatch({\n          type: InputBlur,\n          selectItem: !isBlurByTabChange\n        });\n      }\n    };\n    var inputHandleClick = function inputHandleClick() {\n      dispatch({\n        type: InputClick\n      });\n    };\n\n    /* istanbul ignore next (preact) */\n    var onChangeKey = 'onChange';\n    var eventHandlers = {};\n    if (!rest.disabled) {\n      var _eventHandlers;\n      eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, inputHandleBlur), _eventHandlers.onClick = callAllEventHandlers(onClick, inputHandleClick), _eventHandlers);\n    }\n    return _extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function (inputNode) {\n      inputRef.current = inputNode;\n    }), _extends5['aria-activedescendant'] = isOpen && highlightedIndex > -1 ? elementIds.getItemId(highlightedIndex) : '', _extends5['aria-autocomplete'] = 'list', _extends5['aria-controls'] = elementIds.menuId, _extends5['aria-expanded'] = isOpen, _extends5['aria-labelledby'] = ariaLabel ? undefined : elementIds.labelId, _extends5['aria-label'] = ariaLabel, _extends5.autoComplete = 'off', _extends5.id = elementIds.inputId, _extends5.role = 'combobox', _extends5.value = inputValue, _extends5), eventHandlers, rest);\n  }, [dispatch, elementIds, environment, inputKeyDownHandlers, isOpen, highlightedIndex, inputValue, mouseAndTouchTrackers, setGetterPropCallInfo, stateRef]);\n\n  // returns\n  var toggleMenu = useCallback(function () {\n    dispatch({\n      type: FunctionToggleMenu\n    });\n  }, [dispatch]);\n  var closeMenu = useCallback(function () {\n    dispatch({\n      type: FunctionCloseMenu\n    });\n  }, [dispatch]);\n  var openMenu = useCallback(function () {\n    dispatch({\n      type: FunctionOpenMenu\n    });\n  }, [dispatch]);\n  var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n    dispatch({\n      type: FunctionSetHighlightedIndex,\n      highlightedIndex: newHighlightedIndex\n    });\n  }, [dispatch]);\n  var selectItem = useCallback(function (newSelectedItem) {\n    dispatch({\n      type: FunctionSelectItem,\n      selectedItem: newSelectedItem\n    });\n  }, [dispatch]);\n  var setInputValue = useCallback(function (newInputValue) {\n    dispatch({\n      type: FunctionSetInputValue,\n      inputValue: newInputValue\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset$1\n    });\n  }, [dispatch]);\n  return {\n    // prop getters.\n    getItemProps: getItemProps,\n    getLabelProps: getLabelProps,\n    getMenuProps: getMenuProps,\n    getInputProps: getInputProps,\n    getToggleButtonProps: getToggleButtonProps,\n    // actions.\n    toggleMenu: toggleMenu,\n    openMenu: openMenu,\n    closeMenu: closeMenu,\n    setHighlightedIndex: setHighlightedIndex,\n    setInputValue: setInputValue,\n    selectItem: selectItem,\n    reset: reset,\n    // state.\n    highlightedIndex: highlightedIndex,\n    isOpen: isOpen,\n    selectedItem: selectedItem,\n    inputValue: inputValue\n  };\n}\n\nvar defaultStateValues = {\n  activeIndex: -1,\n  selectedItems: []\n};\n\n/**\n * Gets the initial state based on the provided props. It uses initial, default\n * and controlled props related to state in order to compute the initial value.\n *\n * @param {Object} props Props passed to the hook.\n * @returns {Object} The initial state.\n */\nfunction getInitialState$1(props) {\n  var activeIndex = getInitialValue(props.activeIndex, props.initialActiveIndex, props.defaultActiveIndex, defaultStateValues.activeIndex);\n  var selectedItems = getInitialValue(props.selectedItems, props.initialSelectedItems, props.defaultSelectedItems, defaultStateValues.selectedItems);\n  return {\n    activeIndex: activeIndex,\n    selectedItems: selectedItems\n  };\n}\n\n/**\n * Returns true if dropdown keydown operation is permitted. Should not be\n * allowed on keydown with modifier keys (ctrl, alt, shift, meta), on\n * input element with text content that is either highlighted or selection\n * cursor is not at the starting position.\n *\n * @param {KeyboardEvent} event The event from keydown.\n * @returns {boolean} Whether the operation is allowed.\n */\nfunction isKeyDownOperationPermitted(event) {\n  if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n    return false;\n  }\n  var element = event.target;\n  if (element instanceof HTMLInputElement &&\n  // if element is a text input\n  element.value !== '' && (\n  // and we have text in it\n  // and cursor is either not at the start or is currently highlighting text.\n  element.selectionStart !== 0 || element.selectionEnd !== 0)) {\n    return false;\n  }\n  return true;\n}\n\n/**\n * Check if a state is equal for taglist, by comparing active index and selected items.\n * Used by useSelect and useCombobox.\n *\n * @param {Object} prevState\n * @param {Object} newState\n * @returns {boolean} Wheather the states are deeply equal.\n */\nfunction isStateEqual$1(prevState, newState) {\n  return prevState.selectedItems === newState.selectedItems && prevState.activeIndex === newState.activeIndex;\n}\nvar propTypes$1 = {\n  stateReducer: dropdownPropTypes.stateReducer,\n  itemToKey: dropdownPropTypes.itemToKey,\n  environment: dropdownPropTypes.environment,\n  selectedItems: PropTypes.array,\n  initialSelectedItems: PropTypes.array,\n  defaultSelectedItems: PropTypes.array,\n  getA11yStatusMessage: PropTypes.func,\n  activeIndex: PropTypes.number,\n  initialActiveIndex: PropTypes.number,\n  defaultActiveIndex: PropTypes.number,\n  onActiveIndexChange: PropTypes.func,\n  onSelectedItemsChange: PropTypes.func,\n  keyNavigationNext: PropTypes.string,\n  keyNavigationPrevious: PropTypes.string\n};\nvar defaultProps = {\n  itemToKey: dropdownDefaultProps.itemToKey,\n  stateReducer: dropdownDefaultProps.stateReducer,\n  environment: dropdownDefaultProps.environment,\n  keyNavigationNext: 'ArrowRight',\n  keyNavigationPrevious: 'ArrowLeft'\n};\n\n// eslint-disable-next-line import/no-mutable-exports\nvar validatePropTypes = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n  validatePropTypes = function validatePropTypes(options, caller) {\n    PropTypes.checkPropTypes(propTypes$1, options, 'prop', caller.name);\n  };\n}\n\nvar SelectedItemClick = process.env.NODE_ENV !== \"production\" ? '__selected_item_click__' : 0;\nvar SelectedItemKeyDownDelete = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_delete__' : 1;\nvar SelectedItemKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_backspace__' : 2;\nvar SelectedItemKeyDownNavigationNext = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_next__' : 3;\nvar SelectedItemKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_previous__' : 4;\nvar DropdownKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_navigation_previous__' : 5;\nvar DropdownKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_backspace__' : 6;\nvar DropdownClick = process.env.NODE_ENV !== \"production\" ? '__dropdown_click__' : 7;\nvar FunctionAddSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_add_selected_item__' : 8;\nvar FunctionRemoveSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_remove_selected_item__' : 9;\nvar FunctionSetSelectedItems = process.env.NODE_ENV !== \"production\" ? '__function_set_selected_items__' : 10;\nvar FunctionSetActiveIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_active_index__' : 11;\nvar FunctionReset = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 12;\n\nvar stateChangeTypes$1 = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  DropdownClick: DropdownClick,\n  DropdownKeyDownBackspace: DropdownKeyDownBackspace,\n  DropdownKeyDownNavigationPrevious: DropdownKeyDownNavigationPrevious,\n  FunctionAddSelectedItem: FunctionAddSelectedItem,\n  FunctionRemoveSelectedItem: FunctionRemoveSelectedItem,\n  FunctionReset: FunctionReset,\n  FunctionSetActiveIndex: FunctionSetActiveIndex,\n  FunctionSetSelectedItems: FunctionSetSelectedItems,\n  SelectedItemClick: SelectedItemClick,\n  SelectedItemKeyDownBackspace: SelectedItemKeyDownBackspace,\n  SelectedItemKeyDownDelete: SelectedItemKeyDownDelete,\n  SelectedItemKeyDownNavigationNext: SelectedItemKeyDownNavigationNext,\n  SelectedItemKeyDownNavigationPrevious: SelectedItemKeyDownNavigationPrevious\n});\n\n/* eslint-disable complexity */\nfunction downshiftMultipleSelectionReducer(state, action) {\n  var type = action.type,\n    index = action.index,\n    selectedItem = action.selectedItem,\n    props = action.props;\n  var activeIndex = state.activeIndex,\n    selectedItems = state.selectedItems;\n  var changes;\n  switch (type) {\n    case SelectedItemClick:\n      changes = {\n        activeIndex: index\n      };\n      break;\n    case SelectedItemKeyDownNavigationPrevious:\n      changes = {\n        activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1\n      };\n      break;\n    case SelectedItemKeyDownNavigationNext:\n      changes = {\n        activeIndex: activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1\n      };\n      break;\n    case SelectedItemKeyDownBackspace:\n    case SelectedItemKeyDownDelete:\n      {\n        if (activeIndex < 0) {\n          break;\n        }\n        var newActiveIndex = activeIndex;\n        if (selectedItems.length === 1) {\n          newActiveIndex = -1;\n        } else if (activeIndex === selectedItems.length - 1) {\n          newActiveIndex = selectedItems.length - 2;\n        }\n        changes = _extends({\n          selectedItems: [].concat(selectedItems.slice(0, activeIndex), selectedItems.slice(activeIndex + 1))\n        }, {\n          activeIndex: newActiveIndex\n        });\n        break;\n      }\n    case DropdownKeyDownNavigationPrevious:\n      changes = {\n        activeIndex: selectedItems.length - 1\n      };\n      break;\n    case DropdownKeyDownBackspace:\n      changes = {\n        selectedItems: selectedItems.slice(0, selectedItems.length - 1)\n      };\n      break;\n    case FunctionAddSelectedItem:\n      changes = {\n        selectedItems: [].concat(selectedItems, [selectedItem])\n      };\n      break;\n    case DropdownClick:\n      changes = {\n        activeIndex: -1\n      };\n      break;\n    case FunctionRemoveSelectedItem:\n      {\n        var _newActiveIndex = activeIndex;\n        var selectedItemIndex = selectedItems.findIndex(function (item) {\n          return props.itemToKey(item) === props.itemToKey(selectedItem);\n        });\n        if (selectedItemIndex < 0) {\n          break;\n        }\n        if (selectedItems.length === 1) {\n          _newActiveIndex = -1;\n        } else if (selectedItemIndex === selectedItems.length - 1) {\n          _newActiveIndex = selectedItems.length - 2;\n        }\n        changes = {\n          selectedItems: [].concat(selectedItems.slice(0, selectedItemIndex), selectedItems.slice(selectedItemIndex + 1)),\n          activeIndex: _newActiveIndex\n        };\n        break;\n      }\n    case FunctionSetSelectedItems:\n      {\n        var newSelectedItems = action.selectedItems;\n        changes = {\n          selectedItems: newSelectedItems\n        };\n        break;\n      }\n    case FunctionSetActiveIndex:\n      {\n        var _newActiveIndex2 = action.activeIndex;\n        changes = {\n          activeIndex: _newActiveIndex2\n        };\n        break;\n      }\n    case FunctionReset:\n      changes = {\n        activeIndex: getDefaultValue(props.defaultActiveIndex, defaultStateValues.activeIndex),\n        selectedItems: getDefaultValue(props.defaultSelectedItems, defaultStateValues.selectedItems)\n      };\n      break;\n    default:\n      throw new Error('Reducer called without proper action type.');\n  }\n  return _extends({}, state, changes);\n}\n\nvar _excluded$1 = [\"refKey\", \"ref\", \"onClick\", \"onKeyDown\", \"selectedItem\", \"index\"],\n  _excluded2$1 = [\"refKey\", \"ref\", \"onKeyDown\", \"onClick\", \"preventKeyAction\"];\nuseMultipleSelection.stateChangeTypes = stateChangeTypes$1;\nfunction useMultipleSelection(userProps) {\n  if (userProps === void 0) {\n    userProps = {};\n  }\n  validatePropTypes(userProps, useMultipleSelection);\n  // Props defaults and destructuring.\n  var props = _extends({}, defaultProps, userProps);\n  var getA11yStatusMessage = props.getA11yStatusMessage,\n    environment = props.environment,\n    keyNavigationNext = props.keyNavigationNext,\n    keyNavigationPrevious = props.keyNavigationPrevious;\n\n  // Reducer init.\n  var _useControlledReducer = useControlledReducer$1(downshiftMultipleSelectionReducer, props, getInitialState$1, isStateEqual$1),\n    state = _useControlledReducer[0],\n    dispatch = _useControlledReducer[1];\n  var activeIndex = state.activeIndex,\n    selectedItems = state.selectedItems;\n\n  // Refs.\n  var isInitialMount = useIsInitialMount();\n  var dropdownRef = useRef(null);\n  // Map of selected-item index -> DOM node. Populated by the ref callback in\n  // getSelectedItemProps and read by the focus effect. Keyed by\n  // index so we never reset it during render.\n  var selectedItemRefs = useRef(null);\n  if (selectedItemRefs.current === null) {\n    selectedItemRefs.current = new Map();\n  }\n\n  // Effects.\n  // Adds an a11y aria live status message if getA11yStatusMessage is passed.\n  useA11yMessageStatus(getA11yStatusMessage, state, [activeIndex, selectedItems], environment);\n  // Sets focus on active item.\n  useEffect(function () {\n    if (isInitialMount) {\n      return;\n    }\n    if (activeIndex === -1 && dropdownRef.current) {\n      dropdownRef.current.focus();\n    } else {\n      var _selectedItemRefs$cur;\n      (_selectedItemRefs$cur = selectedItemRefs.current.get(activeIndex)) == null || _selectedItemRefs$cur.focus();\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [activeIndex]);\n  useControlPropsValidator({\n    props: props,\n    state: state\n  });\n  var setGetterPropCallInfo = useGetterPropsCalledChecker('getDropdownProps');\n\n  // Event handler functions.\n  var selectedItemKeyDownHandlers = useMemo(function () {\n    var _ref;\n    return _ref = {}, _ref[keyNavigationPrevious] = function () {\n      dispatch({\n        type: SelectedItemKeyDownNavigationPrevious\n      });\n    }, _ref[keyNavigationNext] = function () {\n      dispatch({\n        type: SelectedItemKeyDownNavigationNext\n      });\n    }, _ref.Delete = function Delete() {\n      dispatch({\n        type: SelectedItemKeyDownDelete\n      });\n    }, _ref.Backspace = function Backspace() {\n      dispatch({\n        type: SelectedItemKeyDownBackspace\n      });\n    }, _ref;\n  }, [dispatch, keyNavigationNext, keyNavigationPrevious]);\n  var dropdownKeyDownHandlers = useMemo(function () {\n    var _ref2;\n    return _ref2 = {}, _ref2[keyNavigationPrevious] = function (event) {\n      if (isKeyDownOperationPermitted(event)) {\n        dispatch({\n          type: DropdownKeyDownNavigationPrevious\n        });\n      }\n    }, _ref2.Backspace = function Backspace(event) {\n      if (isKeyDownOperationPermitted(event)) {\n        dispatch({\n          type: DropdownKeyDownBackspace\n        });\n      }\n    }, _ref2;\n  }, [dispatch, keyNavigationPrevious]);\n\n  // Getter props.\n  var getSelectedItemProps = useCallback(function (_temp) {\n    var _extends2;\n    var _ref3 = _temp === void 0 ? {} : _temp,\n      _ref3$refKey = _ref3.refKey,\n      refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n      ref = _ref3.ref,\n      onClick = _ref3.onClick,\n      onKeyDown = _ref3.onKeyDown,\n      selectedItemProp = _ref3.selectedItem,\n      indexProp = _ref3.index,\n      rest = _objectWithoutPropertiesLoose(_ref3, _excluded$1);\n    var _getItemAndIndex = getItemAndIndex(selectedItemProp, indexProp, selectedItems, 'Pass either item or index to getSelectedItemProps!'),\n      index = _getItemAndIndex[1];\n    var isFocusable = index > -1 && index === activeIndex;\n    var selectedItemHandleClick = function selectedItemHandleClick() {\n      dispatch({\n        type: SelectedItemClick,\n        index: index\n      });\n    };\n    var selectedItemHandleKeyDown = function selectedItemHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n      if (key && selectedItemKeyDownHandlers[key]) {\n        selectedItemKeyDownHandlers[key](event);\n      }\n    };\n    return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (selectedItemNode) {\n      if (selectedItemNode) {\n        selectedItemRefs.current.set(index, selectedItemNode);\n      } else {\n        selectedItemRefs.current[\"delete\"](index);\n      }\n    }), _extends2.tabIndex = isFocusable ? 0 : -1, _extends2.onClick = callAllEventHandlers(onClick, selectedItemHandleClick), _extends2.onKeyDown = callAllEventHandlers(onKeyDown, selectedItemHandleKeyDown), _extends2), rest);\n  }, [dispatch, selectedItems, activeIndex, selectedItemKeyDownHandlers]);\n  var getDropdownProps = useCallback(function (_temp2, _temp3) {\n    var _extends3;\n    var _ref4 = _temp2 === void 0 ? {} : _temp2,\n      _ref4$refKey = _ref4.refKey,\n      refKey = _ref4$refKey === void 0 ? 'ref' : _ref4$refKey,\n      ref = _ref4.ref,\n      onKeyDown = _ref4.onKeyDown,\n      onClick = _ref4.onClick,\n      _ref4$preventKeyActio = _ref4.preventKeyAction,\n      preventKeyAction = _ref4$preventKeyActio === void 0 ? false : _ref4$preventKeyActio,\n      rest = _objectWithoutPropertiesLoose(_ref4, _excluded2$1);\n    var _ref5 = _temp3 === void 0 ? {} : _temp3,\n      _ref5$suppressRefErro = _ref5.suppressRefError,\n      suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;\n    setGetterPropCallInfo('getDropdownProps', suppressRefError, refKey, dropdownRef);\n    var dropdownHandleKeyDown = function dropdownHandleKeyDown(event) {\n      var key = normalizeArrowKey(event);\n      if (key && dropdownKeyDownHandlers[key]) {\n        dropdownKeyDownHandlers[key](event);\n      }\n    };\n    var dropdownHandleClick = function dropdownHandleClick() {\n      dispatch({\n        type: DropdownClick\n      });\n    };\n    return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (dropdownNode) {\n      if (dropdownNode) {\n        dropdownRef.current = dropdownNode;\n      }\n    }), _extends3), !preventKeyAction && {\n      onKeyDown: callAllEventHandlers(onKeyDown, dropdownHandleKeyDown),\n      onClick: callAllEventHandlers(onClick, dropdownHandleClick)\n    }, rest);\n  }, [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo]);\n\n  // returns\n  var addSelectedItem = useCallback(function (selectedItem) {\n    dispatch({\n      type: FunctionAddSelectedItem,\n      selectedItem: selectedItem\n    });\n  }, [dispatch]);\n  var removeSelectedItem = useCallback(function (selectedItem) {\n    dispatch({\n      type: FunctionRemoveSelectedItem,\n      selectedItem: selectedItem\n    });\n  }, [dispatch]);\n  var setSelectedItems = useCallback(function (newSelectedItems) {\n    dispatch({\n      type: FunctionSetSelectedItems,\n      selectedItems: newSelectedItems\n    });\n  }, [dispatch]);\n  var setActiveIndex = useCallback(function (newActiveIndex) {\n    dispatch({\n      type: FunctionSetActiveIndex,\n      activeIndex: newActiveIndex\n    });\n  }, [dispatch]);\n  var reset = useCallback(function () {\n    dispatch({\n      type: FunctionReset\n    });\n  }, [dispatch]);\n  return {\n    getSelectedItemProps: getSelectedItemProps,\n    getDropdownProps: getDropdownProps,\n    addSelectedItem: addSelectedItem,\n    removeSelectedItem: removeSelectedItem,\n    setSelectedItems: setSelectedItems,\n    setActiveIndex: setActiveIndex,\n    reset: reset,\n    selectedItems: selectedItems,\n    activeIndex: activeIndex\n  };\n}\n\nvar TagClick = process.env.NODE_ENV !== \"production\" ? '__tag_click__' : 0;\nvar TagGroupKeyDownArrowLeft = process.env.NODE_ENV !== \"production\" ? '__taggroup_keydown_arrowleft__' : 1;\nvar TagGroupKeyDownArrowRight = process.env.NODE_ENV !== \"production\" ? '__taggroup_keydown_arrowright__' : 2;\nvar TagGroupKeyDownDelete = process.env.NODE_ENV !== \"production\" ? '__taggroup_keydown_delete__' : 3;\nvar TagGroupKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__taggroup_keydown_backspace__' : 4;\nvar TagRemoveClick = process.env.NODE_ENV !== \"production\" ? '__tagremove_click__' : 5;\nvar FunctionAddItem = process.env.NODE_ENV !== \"production\" ? '__function_add_item__' : 6;\n\nvar stateChangeTypes = /*#__PURE__*/Object.freeze({\n  __proto__: null,\n  FunctionAddItem: FunctionAddItem,\n  TagClick: TagClick,\n  TagGroupKeyDownArrowLeft: TagGroupKeyDownArrowLeft,\n  TagGroupKeyDownArrowRight: TagGroupKeyDownArrowRight,\n  TagGroupKeyDownBackspace: TagGroupKeyDownBackspace,\n  TagGroupKeyDownDelete: TagGroupKeyDownDelete,\n  TagRemoveClick: TagRemoveClick\n});\n\nfunction useTagGroupReducer(state, action) {\n  var type = action.type;\n  var changes;\n  switch (type) {\n    case TagClick:\n      changes = {\n        activeIndex: action.index\n      };\n      break;\n    case TagGroupKeyDownArrowLeft:\n      changes = {\n        activeIndex: state.activeIndex === 0 ? state.items.length - 1 : state.activeIndex - 1\n      };\n      break;\n    case TagGroupKeyDownArrowRight:\n      changes = {\n        activeIndex: state.activeIndex === state.items.length - 1 ? 0 : state.activeIndex + 1\n      };\n      break;\n    case TagGroupKeyDownBackspace:\n    case TagGroupKeyDownDelete:\n      {\n        var newItems = [].concat(state.items.slice(0, state.activeIndex), state.items.slice(state.activeIndex + 1));\n        var newActiveIndex = newItems.length === 0 ? -1 : newItems.length === state.activeIndex ? state.activeIndex - 1 : state.activeIndex;\n        changes = {\n          items: [].concat(state.items.slice(0, state.activeIndex), state.items.slice(state.activeIndex + 1)),\n          activeIndex: newActiveIndex\n        };\n        break;\n      }\n    case TagRemoveClick:\n      {\n        var _newItems = [].concat(state.items.slice(0, action.index), state.items.slice(action.index + 1));\n        var _newActiveIndex = _newItems.length === 0 ? -1 : _newItems.length === action.index ? action.index - 1 : action.index;\n        changes = {\n          items: _newItems,\n          activeIndex: _newActiveIndex\n        };\n      }\n      break;\n    case FunctionAddItem:\n      {\n        var _newItems2 = [];\n        if (action.index === undefined) {\n          _newItems2 = [].concat(state.items, [action.item]);\n        } else {\n          _newItems2 = [].concat(state.items.slice(0, action.index), [action.item], state.items.slice(action.index));\n        }\n        var _newActiveIndex2 = state.activeIndex === -1 ? _newItems2.length - 1 : state.activeIndex;\n        changes = {\n          items: _newItems2,\n          activeIndex: _newActiveIndex2\n        };\n        break;\n      }\n    default:\n      throw new Error('Invalid useTagGroup reducer action.');\n  }\n  return _extends({}, state, changes);\n}\n\n// https://github.com/downshift-js/downshift/issues/1674#issuecomment-3924320872\nvar SafeReact = _extends({}, React);\nvar reactUseId = SafeReact.useId;\n\n// istanbul ignore next\nvar useElementIds = typeof reactUseId === 'function' ? useElementIdsR18 : useElementIdsLegacy;\nfunction useElementIdsR18(_ref) {\n  var id = _ref.id,\n    tagGroupId = _ref.tagGroupId,\n    getTagId = _ref.getTagId;\n  var reactId = \"downshift-\" + reactUseId();\n  if (!id) {\n    id = reactId;\n  }\n  var elementIds = React.useMemo(function () {\n    return {\n      tagGroupId: tagGroupId != null ? tagGroupId : id + \"-tag-group\",\n      getTagId: getTagId != null ? getTagId : function (index) {\n        return id + \"-tag-\" + index;\n      }\n    };\n  }, [getTagId, id, tagGroupId]);\n  return elementIds;\n}\nfunction useElementIdsLegacy(_ref2) {\n  var id = _ref2.id,\n    getTagId = _ref2.getTagId,\n    tagGroupId = _ref2.tagGroupId;\n  var _React$useState = React.useState(function () {\n      return id != null ? id : \"downshift-\" + generateId();\n    }),\n    baseId = _React$useState[0];\n  var elementIds = React.useMemo(function () {\n    return {\n      tagGroupId: tagGroupId != null ? tagGroupId : baseId + \"-tag-group\",\n      getTagId: getTagId != null ? getTagId : function (index) {\n        return baseId + \"-tag-\" + index;\n      }\n    };\n  }, [getTagId, baseId, tagGroupId]);\n  return elementIds;\n}\n\nfunction getInitialState(props) {\n  var _ref, _props$items, _ref2, _props$activeIndex;\n  var items = (_ref = (_props$items = props.items) != null ? _props$items : props.initialItems) != null ? _ref : [];\n  var activeIndex = (_ref2 = (_props$activeIndex = props.activeIndex) != null ? _props$activeIndex : props.initialActiveIndex) != null ? _ref2 : items.length === 0 ? -1 : 0;\n  return {\n    activeIndex: activeIndex,\n    items: items\n  };\n}\n\nfunction isStateEqual(oldState, newState) {\n  return oldState.activeIndex === newState.activeIndex && oldState.items === newState.items;\n}\n\nvar A11Y_DESCRIPTION_ELEMENT_ID = 'tag-group-a11y-description';\nfunction useAccessibleDescription(document, description) {\n  React.useEffect(function () {\n    if (!document) {\n      return;\n    }\n    var accessibleDescriptionElement = document.createElement('div');\n    accessibleDescriptionElement.setAttribute('id', A11Y_DESCRIPTION_ELEMENT_ID);\n    accessibleDescriptionElement.style.display = 'none';\n    accessibleDescriptionElement.textContent = description;\n    document.body.appendChild(accessibleDescriptionElement);\n    return function () {\n      accessibleDescriptionElement.remove();\n    };\n  }, [description, document]);\n}\n\nfunction getMergedProps(userProps) {\n  return _extends({\n    stateReducer: function stateReducer(_s, _ref) {\n      var changes = _ref.changes;\n      return changes;\n    },\n    environment: /* istanbul ignore next (ssr) */\n    typeof window === 'undefined' || false ? undefined : window,\n    removeElementDescription: 'Press Delete or Backspace to remove tag.'\n  }, userProps);\n}\n\n/**\n * Focuses the tag at activeIndex when it changes or when an item is removed.\n */\nfunction useRovingTagFocus(activeIndex, itemsLength, getTagId) {\n  var itemRefs = React.useRef({});\n  var previousActiveIndexRef = React.useRef(activeIndex);\n  var previousItemsLengthRef = React.useRef(itemsLength);\n  React.useEffect(function () {\n    if (activeIndex !== -1 && previousActiveIndexRef.current !== -1 && activeIndex !== previousActiveIndexRef.current || previousItemsLengthRef.current === itemsLength + 1) {\n      var _itemRefs$current$get;\n      (_itemRefs$current$get = itemRefs.current[getTagId(activeIndex)]) == null || _itemRefs$current$get.focus();\n    }\n    previousActiveIndexRef.current = activeIndex;\n    previousItemsLengthRef.current = itemsLength;\n  }, [activeIndex, getTagId, itemsLength]);\n  return itemRefs;\n}\n\nvar propTypes = {\n  isItemDisabled: PropTypes.func\n};\n\nvar _excluded = [\"onKeyDown\"],\n  _excluded2 = [\"index\", \"refKey\", \"ref\", \"onClick\"],\n  _excluded3 = [\"index\", \"onClick\"];\nvar _useTagGroup = function useTagGroup(userProps) {\n  var _props$environment;\n  if (userProps === void 0) {\n    userProps = {};\n  }\n  /* State and Props */\n\n  validatePropTypes$1(userProps, _useTagGroup, propTypes);\n  var props = getMergedProps(userProps);\n  var _useControlledReducer = useControlledReducer$1(useTagGroupReducer, props, getInitialState, isStateEqual),\n    state = _useControlledReducer[0],\n    dispatch = _useControlledReducer[1];\n  var activeIndex = state.activeIndex,\n    items = state.items;\n\n  /* Refs */\n\n  var elementIds = useElementIds({\n    getTagId: props.getTagId,\n    id: props.id,\n    tagGroupId: props.tagGroupId\n  });\n\n  /* Effects */\n\n  useAccessibleDescription((_props$environment = props.environment) == null ? void 0 : _props$environment.document, props.removeElementDescription);\n  var itemRefs = useRovingTagFocus(activeIndex, items.length, elementIds.getTagId);\n\n  /* Getter functions */\n\n  var getTagGroupProps = useCallback(function (options) {\n    var _ref = options != null ? options : {},\n      onKeyDown = _ref.onKeyDown,\n      rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n    var handleKeyDown = function handleKeyDown(e) {\n      switch (e.key) {\n        case 'ArrowLeft':\n          dispatch({\n            type: TagGroupKeyDownArrowLeft\n          });\n          break;\n        case 'ArrowRight':\n          dispatch({\n            type: TagGroupKeyDownArrowRight\n          });\n          break;\n        case 'Delete':\n          dispatch({\n            type: TagGroupKeyDownDelete\n          });\n          break;\n        case 'Backspace':\n          dispatch({\n            type: TagGroupKeyDownBackspace\n          });\n          break;\n      }\n    };\n    var tagGroupProps = _extends({\n      id: elementIds.tagGroupId,\n      'aria-live': 'polite',\n      'aria-atomic': 'false',\n      'aria-relevant': 'additions',\n      role: 'listbox',\n      onKeyDown: callAllEventHandlers(onKeyDown, handleKeyDown)\n    }, rest);\n    return tagGroupProps;\n  }, [dispatch, elementIds.tagGroupId]);\n  var getTagProps = useCallback(function (options) {\n    var _extends2;\n    var index = options.index,\n      _options$refKey = options.refKey,\n      refKey = _options$refKey === void 0 ? 'ref' : _options$refKey,\n      ref = options.ref,\n      onClick = options.onClick,\n      rest = _objectWithoutPropertiesLoose(options, _excluded2);\n    if (!Number.isInteger(index) || index < 0) {\n      throw new Error('Pass correct item index to getTagProps!');\n    }\n    var handleClick = function handleClick() {\n      dispatch({\n        type: TagClick,\n        index: index\n      });\n    };\n    var tagId = elementIds.getTagId(index);\n    return _extends((_extends2 = {\n      'aria-describedby': A11Y_DESCRIPTION_ELEMENT_ID\n    }, _extends2[refKey] = handleRefs(ref, function (itemNode) {\n      if (itemNode) {\n        itemRefs.current[tagId] = itemNode;\n      }\n    }), _extends2['aria-labelledby'] = tagId, _extends2.role = 'option', _extends2.id = tagId, _extends2.onClick = callAllEventHandlers(onClick, handleClick), _extends2.tabIndex = activeIndex === index ? 0 : -1, _extends2), rest);\n  }, [dispatch, elementIds, activeIndex, itemRefs]);\n  var getTagRemoveProps = useCallback(function (options) {\n    var index = options.index,\n      onClick = options.onClick,\n      rest = _objectWithoutPropertiesLoose(options, _excluded3);\n    if (!Number.isInteger(index) || index < 0) {\n      throw new Error('Pass correct item index to getTagRemoveProps!');\n    }\n    var handleClick = function handleClick(event) {\n      event.stopPropagation();\n      dispatch({\n        type: TagRemoveClick,\n        index: index\n      });\n    };\n    var tagId = elementIds.getTagId(index);\n    var tagRemoveId = tagId + \"-remove\";\n    return _extends({\n      id: tagRemoveId,\n      tabIndex: -1,\n      'aria-labelledby': tagRemoveId + \" \" + tagId,\n      onClick: callAllEventHandlers(onClick, handleClick)\n    }, rest);\n  }, [elementIds, dispatch]);\n\n  /* Imperative Functions */\n\n  var addItem = useCallback(function (item, index) {\n    dispatch({\n      type: FunctionAddItem,\n      item: item,\n      index: index\n    });\n  }, [dispatch]);\n  return {\n    activeIndex: activeIndex,\n    addItem: addItem,\n    getTagGroupProps: getTagGroupProps,\n    getTagProps: getTagProps,\n    getTagRemoveProps: getTagRemoveProps,\n    items: items\n  };\n};\n_useTagGroup.stateChangeTypes = stateChangeTypes;\n\nexport { Downshift as default, resetIdCounter, useCombobox, useMultipleSelection, useSelect, _useTagGroup as useTagGroup };\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n  t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","import clsx from \"clsx\";\nimport {\n    type Callback,\n    default as Downshift,\n    type DownshiftProps,\n    type PropGetters,\n} from \"downshift\";\nimport React, { type ReactNode } from \"react\";\nimport { useId } from \"../../hooks/useId/useId.js\";\nimport { InputGroup } from \"../input-group/InputGroup.js\";\nimport ControllerButton from \"./ControllerButton.js\";\nimport Menu from \"./Menu.js\";\nimport type { CommonProps } from \"./types.js\";\n\nconst KEY_ENTER = 13;\n\ntype BaseAutosuggestProps<T> = CommonProps & {\n    itemToString: (item: T | null) => string;\n    items: T[];\n    downshiftProps: DownshiftProps<T>;\n    showDropdownControllerButton?: boolean;\n    onConfirm?: () => void;\n    noHits?: { text: ReactNode; items: T[] };\n};\ninterface Props extends PropGetters<any>, DownshiftProps<any> {\n    clearSelection: (cb?: Callback) => void;\n}\n\nfunction BaseAutosuggest<T>({\n    className = \"\",\n    label,\n    labelProps,\n    tooltip,\n    supportLabelProps,\n    inputId,\n    labelId,\n    leadText,\n    errorLabel,\n    helpLabel,\n    variant,\n    noHitsMessage,\n    maxNumberOfHits,\n    placeholder,\n    itemToString,\n    items,\n    downshiftProps,\n    showDropdownControllerButton = false,\n    onConfirm = () => {\n        /* noop */\n    },\n    noHits,\n}: BaseAutosuggestProps<T>): JSX.Element {\n    const uid = useId(inputId || \"jkl-text-input\", {\n        generateSuffix: !inputId,\n    });\n    const lid = useId(labelId || \"jkl-label\", { generateSuffix: !labelId });\n\n    const customLabelProps = {\n        inputId: uid,\n        labelId: lid,\n    };\n\n    return (\n        /* @ts-ignore-next-line det er noe rart og ancient med downshift */\n        <Downshift\n            {...downshiftProps}\n            {...customLabelProps}\n            itemToString={itemToString}\n        >\n            {({\n                getInputProps,\n                getToggleButtonProps,\n                getItemProps,\n                getLabelProps,\n                getMenuProps,\n                getRootProps,\n                selectedItem,\n                isOpen,\n                highlightedIndex,\n                clearSelection,\n            }: Props) => {\n                return (\n                    <InputGroup\n                        {...getRootProps()}\n                        label={label}\n                        className={clsx(\"jkl-autosuggest\", className)}\n                        data-size={variant}\n                        labelProps={{\n                            variant,\n                            ...labelProps,\n                            ...getLabelProps({\n                                id: lid,\n                            }),\n                        }}\n                        supportLabelProps={supportLabelProps}\n                        tooltip={tooltip}\n                        errorLabel={errorLabel}\n                        helpLabel={helpLabel}\n                        render={(inputProps) => (\n                            <>\n                                {leadText && (\n                                    <p className=\"jkl-spacing-24--bottom\">\n                                        {leadText}\n                                    </p>\n                                )}\n                                <div\n                                    className=\"jkl-text-input-wrapper\"\n                                    data-invalid={!!errorLabel}\n                                >\n                                    <input\n                                        {...inputProps}\n                                        {...getInputProps({\n                                            id: inputProps.id,\n                                            placeholder,\n                                            className: \"jkl-text-input__input\",\n                                            onKeyDown: (e) => {\n                                                if (\n                                                    e.keyCode === KEY_ENTER &&\n                                                    !isOpen\n                                                ) {\n                                                    onConfirm();\n                                                }\n                                            },\n                                        })}\n                                        data-testid=\"autosuggest__input\"\n                                    />\n                                    {showDropdownControllerButton && (\n                                        <ControllerButton\n                                            {...getToggleButtonProps()}\n                                            hasSelectedItem={!!selectedItem}\n                                            clearSelection={clearSelection}\n                                        />\n                                    )}\n                                    {isOpen && (\n                                        <Menu\n                                            downshiftProps={{\n                                                getMenuProps,\n                                                getItemProps,\n                                            }}\n                                            highlightedIndex={highlightedIndex}\n                                            items={items}\n                                            itemToString={itemToString}\n                                            noHitsMessage={noHitsMessage}\n                                            maxNumberOfHits={maxNumberOfHits}\n                                            noHits={noHits}\n                                        />\n                                    )}\n                                </div>\n                            </>\n                        )}\n                    />\n                );\n            }}\n        </Downshift>\n    );\n}\n\nexport default BaseAutosuggest;\n"],"names":["_objectWithoutPropertiesLoose","r","e","t","n","hasOwnProperty","call","indexOf","_extends","Object","assign","bind","arguments","length","apply","_setPrototypeOf","setPrototypeOf","__proto__","process","env","NODE_ENV","reactIsModule","exports","u","b","Symbol","for","c","d","f","g","h","k","l","m","p","q","v","a","$$typeof","type","reactIs_production_min","ContextConsumer","Element","ForwardRef","Fragment","Lazy","Memo","Portal","Profiler","Suspense","SuspenseList","isAsyncMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isMemo","isPortal","isStrictMode","isSuspense","isSuspenseList","isValidElementType","getModuleId","typeOf","require$$0","REACT_MODULE_REFERENCE","REACT_ELEMENT_TYPE","REACT_PORTAL_TYPE","REACT_FRAGMENT_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_PROVIDER_TYPE","REACT_CONTEXT_TYPE","REACT_SERVER_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_OFFSCREEN_TYPE","object","$$typeofType","ContextProvider","StrictMode","hasWarnedAboutDeprecatedIsAsyncMode","hasWarnedAboutDeprecatedIsConcurrentMode","reactIs_development","console","warn","isConcurrentMode","isProfiler","getOwnPropertySymbols","prototype","propIsEnumerable","propertyIsEnumerable","objectAssign","test1","String","getOwnPropertyNames","test2","i","fromCharCode","map","join","test3","split","forEach","letter","keys","shouldUseNative","target","source","from","symbols","to","val","TypeError","toObject","s","key","ReactPropTypesSecret_1","has","Function","ReactIs","require$$1","ReactPropTypesSecret","require$$2","require$$3","checkPropTypes","printWarning","loggedTypeFailures","text","message","error","Error","typeSpecs","values","location","componentName","getStack","typeSpecName","err","name","ex","stack","resetWarningCache","checkPropTypes_1","require$$4","emptyFunctionThatReturnsNull","factoryWithTypeCheckers","isValidElement","throwOnDirectAccess","ITERATOR_SYMBOL","iterator","ANONYMOUS","ReactPropTypes","array","createPrimitiveTypeChecker","bigint","bool","func","number","string","symbol","any","createChainableTypeChecker","arrayOf","typeChecker","props","propName","propFullName","PropTypeError","propValue","Array","isArray","getPropType","element","elementType","instanceOf","expectedClass","expectedClassName","actualClassName","constructor","getClassName","node","isNode","objectOf","propType","oneOf","expectedValues","is","valuesString","JSON","stringify","value","getPreciseType","oneOfType","arrayOfTypeCheckers","checker","getPostfixForTypeWarning","expectedTypes","checkerResult","data","push","expectedType","shape","shapeTypes","invalidValidatorError","exact","allKeys","x","y","this","validate","manualPropTypeCallCache","manualPropTypeWarningCount","checkType","isRequired","secret","cacheKey","chainedCheckType","every","iteratorFn","maybeIterable","getIteratorFn","step","entries","next","done","entry","RegExp","isSymbol","Date","PropTypes","propTypesModule","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","getShim","nodeType","clientHeight","scrollHeight","clientWidth","scrollWidth","o","getComputedStyle","overflowY","overflowX","ownerDocument","defaultView","frameElement","parentElement","getRootNode","host","unknown","mouseUp","itemMouseEnter","keyDownArrowUp","keyDownArrowDown","keyDownEscape","keyDownEnter","keyDownHome","keyDownEnd","clickItem","blurInput","changeInput","keyDownSpaceButton","clickButton","blurButton","controlledPropUpdatedSelectedItem","touchEnd","stateChangeTypes$4","freeze","idCounter","handleRefs","_len","refs","_key","ref","current","callAllEventHandlers","fns","event","_len2","args","_key2","some","fn","concat","preventDownshiftDefault","nativeEvent","debounce","time","timeoutId","cancel","clearTimeout","wrapper","setTimeout","cleanupStatus","document","getStatusDiv","textContent","statusDiv","getElementById","createElement","setAttribute","style","border","clip","height","margin","overflow","padding","position","width","body","appendChild","setStatus","status","noop","scrollIntoView","menuNode","actions","inline","boundary","skipOverflowHiddenElements","scrollingElement","documentElement","w","W","window","visualViewport","innerWidth","H","innerHeight","scrollX","scrollY","M","E","top","right","C","bottom","I","left","R","getBoundingClientRect","T","B","V","parseFloat","scrollMarginTop","scrollMarginRight","scrollMarginBottom","scrollMarginLeft","D","L","parseInt","borderLeftWidth","borderTopWidth","borderRightWidth","borderBottomWidth","F","offsetWidth","S","offsetHeight","X","Y","Math","max","scrollLeft","scrollTop","min","el","compute","_ref","normalizeArrowKey","keyCode","startsWith","getNonDisabledIndex","start","backwards","items","isItemDisabled","circular","count","index","_index","getHighlightedIndex","offset","itemsLastIndex","highlightedIndex","validateControlledUnchanged","targetWithinDownshift","downshiftElements","environment","checkActiveElement","contextNode","isOrContainsNode","activeElement","parent","child","Node","contains","cbToCb","cb","getA11yStatusMessage","isOpen","resultCount","previousResultCount","unwrapArray","arg","defaultValue","isDOMElement","getElementProps","state","prevProps","nextProps","warningDescription","propKey","stateKeys","pickState","result","_excluded$4","_excluded2$4","_excluded3$3","_excluded4$2","_excluded5","Downshift","_Component","_props","_this","id","menuId","labelId","inputId","getItemId","itemCount","timeoutIds","internalSetTimeout","filter","setItemCount","unsetItemCount","_item","currentElementNode","getItemNodeFromIndex","hasAttribute","setHighlightedIndex","otherStateToSet","defaultHighlightedIndex","internalSetState","clearSelection","selectedItem","inputValue","defaultIsOpen","selectItem","item","itemToString","selectItemAtIndex","itemIndex","selectHighlightedItem","getState","stateToSet","isItemSelected","onChangeArg","onStateChangeArg","isStateToSetFunction","onInputValueChange","getStateAndHelpers","setState","_newStateToSet","newStateToSet","stateReducer","nextState","onStateChange","onSelect","onChange","onUserAction","rootRef","_rootNode","getRootProps","_temp","_temp2","_extends2","_ref$refKey","refKey","rest","_ref2$suppressRefErro","suppressRefError","called","role","keyDownHandlers","ArrowDown","_this2","preventDefault","amount","shiftKey","moveHighlightedIndex","getItemCount","nextHighlightedIndex","ArrowUp","_this3","Enter","which","_this$getState2","itemNode","Escape","reset","buttonKeyDownHandlers","toggleMenu","inputKeyDownHandlers","Home","newHighlightedIndex","End","getToggleButtonProps","_temp3","_ref3","onClick","onPress","onKeyDown","onKeyUp","onBlur","enabledEventHandlers","buttonHandleClick","buttonHandleKeyDown","buttonHandleKeyUp","buttonHandleBlur","disabled","_this$props$environme","focus","blurTarget","isMouseDown","getLabelProps","htmlFor","getInputProps","_temp4","_ref4","onInput","onChangeText","eventHandlers","_eventHandlers","_this$getState6","inputHandleChange","inputHandleKeyDown","inputHandleBlur","autoComplete","_activeElement$datase","dataset","toggle","menuRef","_menuNode","getMenuProps","_temp5","_temp6","_extends3","_ref5","_ref5$refKey","_ref6$suppressRefErro","getItemProps","_temp7","_enabledEventHandlers","_ref7","onMouseMove","onMouseDown","_ref7$item","fnName","requiredProp","customClickHandler","avoidScrolling","clearItems","_ref8","_ref9","_this$getState7","openMenu","closeMenu","updateStatus","_this$props","highlightedItem","_this$props2","_this$props2$initialH","initialHighlightedIndex","_highlightedIndex","_this$props2$initialI","initialIsOpen","_isOpen","_this$props2$initialI2","initialInputValue","_inputValue","_this$props2$initialS","initialSelectedItem","_selectedItem","_state","create","_inheritsLoose","_proto","internalClearTimeouts","stateToMerge","reduce","newState","scrollHighlightedItemIntoView","_this$getState9","componentDidMount","_this4","validateGetMenuPropsCalledCorrectly","onMouseUp","onOuterClick","onTouchStart","isTouchMove","onTouchMove","onTouchEnd","contextWithinDownshift","addEventListener","cleanup","removeEventListener","shouldScroll","prevState","currentHighlightedIndex","prevHighlightedIndex","componentDidUpdate","selectedItemChanged","componentWillUnmount","render","children","_ref11","refKeySpecified","isComposite","validateGetRootPropsCalledCorrectly","cloneElement","Component","defaultProps","obj","toString","isPlainObject","prevItem","stateChangeTypes","_ref10","propTypes","propTypes$4","itemToKey","dropdownPropTypes","defaultSelectedItem","toggleButtonId","onSelectedItemChange","onHighlightedIndexChange","onIsOpenChange","React","useId","defaultInputValue","className","label","labelProps","tooltip","supportLabelProps","leadText","errorLabel","helpLabel","variant","noHitsMessage","maxNumberOfHits","placeholder","downshiftProps","showDropdownControllerButton","onConfirm","noHits","uid","generateSuffix","lid","customLabelProps","jsx","InputGroup","clsx","inputProps","jsxs","ControllerButton","hasSelectedItem","Menu"],"mappings":"khBAAA,SAASA,EAA8BC,EAAGC,GACxC,GAAI,MAAQD,EAAG,MAAO,CAAA,EACtB,IAAIE,EAAI,CAAA,EACR,IAAA,IAASC,KAAKH,EAAG,GAAI,CAAA,EAAGI,eAAeC,KAAKL,EAAGG,GAAI,CACjD,QAAWF,EAAEK,QAAQH,GAAI,SACzBD,EAAEC,GAAKH,EAAEG,EACX,CACA,OAAOD,CACT,CCRA,SAASK,IACP,OAAOA,EAAWC,OAAOC,OAASD,OAAOC,OAAOC,OAAS,SAAUP,GACjE,QAASF,EAAI,EAAGA,EAAIU,UAAUC,OAAQX,IAAK,CACzC,IAAIC,EAAIS,UAAUV,GAClB,IAAA,IAASD,KAAKE,GAAAA,IAAQE,eAAeC,KAAKH,EAAGF,KAAOG,EAAEH,GAAKE,EAAEF,GAC/D,CACA,OAAOG,CACT,EAAGI,EAASM,MAAM,KAAMF,UAC1B,CCRA,SAASG,EAAgBZ,EAAGD,GAC1B,OAAOa,EAAkBN,OAAOO,eAAiBP,OAAOO,eAAeL,OAAS,SAAUR,EAAGD,GAC3F,OAAOC,EAAEc,UAAYf,EAAGC,CAC1B,GAAmBA,EAAGD,EACxB,6GCF6B,eAAzBgB,QAAQC,IAAIC,SACdC,EAAAC,qCCMW,IAA4bC,EAAxbC,EAAEC,OAAOC,IAAI,iBAAiBC,EAAEF,OAAOC,IAAI,gBAAgBE,EAAEH,OAAOC,IAAI,kBAAkBxB,EAAEuB,OAAOC,IAAI,qBAAqBG,EAAEJ,OAAOC,IAAI,kBAAkBI,EAAEL,OAAOC,IAAI,kBAAkBK,EAAEN,OAAOC,IAAI,iBAAiBM,EAAEP,OAAOC,IAAI,wBAAwBO,EAAER,OAAOC,IAAI,qBAAqBQ,EAAET,OAAOC,IAAI,kBAAkBtB,EAAEqB,OAAOC,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