{"version":3,"file":"index.production.js","sources":["../../../autocomplete-shared/dist/esm/createRef.js","../../../autocomplete-shared/dist/esm/debounce.js","../../../autocomplete-shared/dist/esm/flatten.js","../../../autocomplete-shared/dist/esm/generateAutocompleteId.js","../../../autocomplete-shared/dist/esm/getAttributeValueByPath.js","../../../autocomplete-shared/dist/esm/getItemsCount.js","../../../autocomplete-shared/dist/esm/isEqual.js","../../../autocomplete-shared/dist/esm/noop.js","../../../autocomplete-shared/dist/esm/version.js","../../../autocomplete-shared/dist/esm/userAgents.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createClickedEvent.js","../../../autocomplete-plugin-algolia-insights/dist/esm/isModernInsightsClient.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createSearchInsightsApi.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createViewedEvents.js","../../../autocomplete-plugin-algolia-insights/dist/esm/isAlgoliaInsightsHit.js","../../../autocomplete-plugin-algolia-insights/dist/esm/createAlgoliaInsightsPlugin.js","../../../autocomplete-shared/dist/esm/safelyRunOnBrowser.js","../../../autocomplete-core/dist/esm/utils/createCancelablePromise.js","../../../autocomplete-core/dist/esm/utils/getNextActiveItemId.js","../../../autocomplete-core/dist/esm/utils/getNormalizedSources.js","../../../autocomplete-core/dist/esm/utils/getActiveItem.js","../../../autocomplete-core/dist/esm/utils/getAutocompleteElementId.js","../../../autocomplete-core/dist/esm/utils/isSamsung.js","../../../autocomplete-core/dist/esm/utils/getNativeEvent.js","../../../autocomplete-core/dist/esm/createStore.js","../../../autocomplete-core/dist/esm/utils/createCancelablePromiseList.js","../../../autocomplete-core/dist/esm/getAutocompleteSetters.js","../../../autocomplete-core/dist/esm/getDefaultProps.js","../../../autocomplete-core/dist/esm/reshape.js","../../../autocomplete-core/dist/esm/resolve.js","../../../autocomplete-core/dist/esm/utils/mapToAlgoliaResponse.js","../../../autocomplete-core/dist/esm/onInput.js","../../../autocomplete-core/dist/esm/utils/createConcurrentSafePromise.js","../../../autocomplete-core/dist/esm/onKeyDown.js","../../../autocomplete-core/dist/esm/getPropGetters.js","../../../autocomplete-core/dist/esm/utils/isOrContainsNode.js","../../../autocomplete-core/dist/esm/metadata.js","../../../autocomplete-core/dist/esm/getCompletion.js","../../../autocomplete-core/dist/esm/stateReducer.js","../../../autocomplete-core/dist/esm/createAutocomplete.js","../../../../node_modules/htm/dist/htm.mjs","../../src/elements/ClearIcon.ts","../../src/utils/getHTMLElement.ts","../../src/utils/mergeClassNames.ts","../../src/utils/mergeDeep.ts","../../src/utils/pickBy.ts","../../src/utils/setProperties.ts","../../src/getCreateDomElement.ts","../../src/elements/LoadingIcon.ts","../../src/elements/SearchIcon.ts","../../src/createAutocompleteDom.ts","../../src/elements/Input.ts","../../../../node_modules/preact/dist/preact.mjs","../../../autocomplete-preset-algolia/dist/esm/constants/index.js","../../../autocomplete-preset-algolia/dist/esm/highlight/parseAttribute.js","../../../autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitHighlight.js","../../../autocomplete-preset-algolia/dist/esm/highlight/isPartHighlighted.js","../../../autocomplete-preset-algolia/dist/esm/highlight/reverseHighlightedParts.js","../../../autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitSnippet.js","../../../autocomplete-preset-algolia/dist/esm/requester/createRequester.js","../../../autocomplete-preset-algolia/dist/esm/search/fetchAlgoliaResults.js","../../src/components/Highlight.ts","../../src/components/ReverseHighlight.ts","../../../autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseHighlight.js","../../src/components/ReverseSnippet.ts","../../../autocomplete-preset-algolia/dist/esm/highlight/parseAlgoliaHitReverseSnippet.js","../../src/components/Snippet.ts","../../src/getDefaultOptions.ts","../../src/getPanelPlacementStyle.ts","../../src/userAgents.ts","../../src/requesters/createAlgoliaRequester.ts","../../../autocomplete-preset-algolia/dist/esm/utils/getAppIdAndApiKey.js","../../src/requesters/getAlgoliaResults.ts","../../src/autocomplete.ts","../../src/createReactiveWrapper.ts","../../src/createEffectWrapper.ts","../../src/render.tsx","../../src/requesters/getAlgoliaFacets.ts"],"sourcesContent":["export function createRef(initialValue) {\n return {\n current: initialValue\n };\n}","export function debounce(fn, time) {\n var timerId = undefined;\n return function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (timerId) {\n clearTimeout(timerId);\n }\n timerId = setTimeout(function () {\n return fn.apply(void 0, args);\n }, time);\n };\n}","export function flatten(values) {\n return values.reduce(function (a, b) {\n return a.concat(b);\n }, []);\n}","var autocompleteId = 0;\nexport function generateAutocompleteId() {\n return \"autocomplete-\".concat(autocompleteId++);\n}","export function getAttributeValueByPath(record, path) {\n return path.reduce(function (current, key) {\n return current && current[key];\n }, record);\n}","export function getItemsCount(state) {\n if (state.collections.length === 0) {\n return 0;\n }\n return state.collections.reduce(function (sum, collection) {\n return sum + collection.items.length;\n }, 0);\n}","function isPrimitive(obj) {\n return obj !== Object(obj);\n}\nexport function isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (isPrimitive(first) || isPrimitive(second) || typeof first === 'function' || typeof second === 'function') {\n return first === second;\n }\n if (Object.keys(first).length !== Object.keys(second).length) {\n return false;\n }\n for (var _i = 0, _Object$keys = Object.keys(first); _i < _Object$keys.length; _i++) {\n var key = _Object$keys[_i];\n if (!(key in second)) {\n return false;\n }\n if (!isEqual(first[key], second[key])) {\n return false;\n }\n }\n return true;\n}","export var noop = function noop() {};","export var version = '1.18.1';","import { version } from './version';\nexport var userAgents = [{\n segment: 'autocomplete-core',\n version: version\n}];","export function createClickedEvent(_ref) {\n var item = _ref.item,\n _ref$items = _ref.items,\n items = _ref$items === void 0 ? [] : _ref$items;\n return {\n index: item.__autocomplete_indexName,\n items: [item],\n positions: [1 + items.findIndex(function (x) {\n return x.objectID === item.objectID;\n })],\n queryID: item.__autocomplete_queryID,\n algoliaSource: ['autocomplete']\n };\n}","function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : \"undefined\" != typeof Symbol && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n/**\n * Determines if a given insights `client` supports the optional call to `init`\n * and the ability to set credentials via extra parameters when sending events.\n */\nexport function isModernInsightsClient(client) {\n var _split$map = (client.version || '').split('.').map(Number),\n _split$map2 = _slicedToArray(_split$map, 2),\n major = _split$map2[0],\n minor = _split$map2[1];\n\n /* eslint-disable @typescript-eslint/camelcase */\n var v3 = major >= 3;\n var v2_4 = major === 2 && minor >= 4;\n var v1_10 = major === 1 && minor >= 10;\n return v3 || v2_4 || v1_10;\n /* eslint-enable @typescript-eslint/camelcase */\n}","var _excluded = [\"items\"],\n _excluded2 = [\"items\"];\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isModernInsightsClient } from './isModernInsightsClient';\nfunction chunk(item) {\n var chunkSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 20;\n var chunks = [];\n for (var i = 0; i < item.objectIDs.length; i += chunkSize) {\n chunks.push(_objectSpread(_objectSpread({}, item), {}, {\n objectIDs: item.objectIDs.slice(i, i + chunkSize)\n }));\n }\n return chunks;\n}\nfunction mapToInsightsParamsApi(params) {\n return params.map(function (_ref) {\n var items = _ref.items,\n param = _objectWithoutProperties(_ref, _excluded);\n return _objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref2) {\n var objectID = _ref2.objectID;\n return objectID;\n })) || param.objectIDs\n });\n });\n}\nexport function createSearchInsightsApi(searchInsights) {\n var canSendHeaders = isModernInsightsClient(searchInsights);\n function sendToInsights(method, payloads, items) {\n if (canSendHeaders && typeof items !== 'undefined') {\n var _items$0$__autocomple = items[0].__autocomplete_algoliaCredentials,\n appId = _items$0$__autocomple.appId,\n apiKey = _items$0$__autocomple.apiKey;\n var headers = {\n 'X-Algolia-Application-Id': appId,\n 'X-Algolia-API-Key': apiKey\n };\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads), [{\n headers: headers\n }]));\n } else {\n searchInsights.apply(void 0, [method].concat(_toConsumableArray(payloads)));\n }\n }\n return {\n /**\n * Initializes Insights with Algolia credentials.\n */\n init: function init(appId, apiKey) {\n searchInsights('init', {\n appId: appId,\n apiKey: apiKey\n });\n },\n /**\n * Sets the authenticated user token to attach to events.\n * Unsets the authenticated token by passing `undefined`.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/set-authenticated-user-token/\n */\n setAuthenticatedUserToken: function setAuthenticatedUserToken(authenticatedUserToken) {\n searchInsights('setAuthenticatedUserToken', authenticatedUserToken);\n },\n /**\n * Sets the user token to attach to events.\n */\n setUserToken: function setUserToken(userToken) {\n searchInsights('setUserToken', userToken);\n },\n /**\n * Sends click events to capture a query and its clicked items and positions.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids-after-search/\n */\n clickedObjectIDsAfterSearch: function clickedObjectIDsAfterSearch() {\n for (var _len = arguments.length, params = new Array(_len), _key = 0; _key < _len; _key++) {\n params[_key] = arguments[_key];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-object-ids/\n */\n clickedObjectIDs: function clickedObjectIDs() {\n for (var _len2 = arguments.length, params = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n params[_key2] = arguments[_key2];\n }\n if (params.length > 0) {\n sendToInsights('clickedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends click events to capture the filters a user clicks on.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/clicked-filters/\n */\n clickedFilters: function clickedFilters() {\n for (var _len3 = arguments.length, params = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n params[_key3] = arguments[_key3];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['clickedFilters'].concat(params));\n }\n },\n /**\n * Sends conversion events to capture a query and its clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids-after-search/\n */\n convertedObjectIDsAfterSearch: function convertedObjectIDsAfterSearch() {\n for (var _len4 = arguments.length, params = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n params[_key4] = arguments[_key4];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDsAfterSearch', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-object-ids/\n */\n convertedObjectIDs: function convertedObjectIDs() {\n for (var _len5 = arguments.length, params = new Array(_len5), _key5 = 0; _key5 < _len5; _key5++) {\n params[_key5] = arguments[_key5];\n }\n if (params.length > 0) {\n sendToInsights('convertedObjectIDs', mapToInsightsParamsApi(params), params[0].items);\n }\n },\n /**\n * Sends conversion events to capture the filters a user uses when converting.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/converted-filters/\n */\n convertedFilters: function convertedFilters() {\n for (var _len6 = arguments.length, params = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n params[_key6] = arguments[_key6];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['convertedFilters'].concat(params));\n }\n },\n /**\n * Sends view events to capture clicked items.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-object-ids/\n */\n viewedObjectIDs: function viewedObjectIDs() {\n for (var _len7 = arguments.length, params = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {\n params[_key7] = arguments[_key7];\n }\n if (params.length > 0) {\n params.reduce(function (acc, _ref3) {\n var items = _ref3.items,\n param = _objectWithoutProperties(_ref3, _excluded2);\n return [].concat(_toConsumableArray(acc), _toConsumableArray(chunk(_objectSpread(_objectSpread({}, param), {}, {\n objectIDs: (items === null || items === void 0 ? void 0 : items.map(function (_ref4) {\n var objectID = _ref4.objectID;\n return objectID;\n })) || param.objectIDs\n })).map(function (payload) {\n return {\n items: items,\n payload: payload\n };\n })));\n }, []).forEach(function (_ref5) {\n var items = _ref5.items,\n payload = _ref5.payload;\n return sendToInsights('viewedObjectIDs', [payload], items);\n });\n }\n },\n /**\n * Sends view events to capture the filters a user uses when viewing.\n *\n * @link https://www.algolia.com/doc/api-reference/api-methods/viewed-filters/\n */\n viewedFilters: function viewedFilters() {\n for (var _len8 = arguments.length, params = new Array(_len8), _key8 = 0; _key8 < _len8; _key8++) {\n params[_key8] = arguments[_key8];\n }\n if (params.length > 0) {\n searchInsights.apply(void 0, ['viewedFilters'].concat(params));\n }\n }\n };\n}","export function createViewedEvents(_ref) {\n var items = _ref.items;\n var itemsByIndexName = items.reduce(function (acc, current) {\n var _acc$current$__autoco;\n acc[current.__autocomplete_indexName] = ((_acc$current$__autoco = acc[current.__autocomplete_indexName]) !== null && _acc$current$__autoco !== void 0 ? _acc$current$__autoco : []).concat(current);\n return acc;\n }, {});\n return Object.keys(itemsByIndexName).map(function (indexName) {\n var items = itemsByIndexName[indexName];\n return {\n index: indexName,\n items: items,\n algoliaSource: ['autocomplete']\n };\n });\n}","export function isAlgoliaInsightsHit(hit) {\n return hit.objectID && hit.__autocomplete_indexName && hit.__autocomplete_queryID;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createRef, debounce, isEqual, noop, safelyRunOnBrowser } from '@algolia/autocomplete-shared';\nimport { createClickedEvent } from './createClickedEvent';\nimport { createSearchInsightsApi } from './createSearchInsightsApi';\nimport { createViewedEvents } from './createViewedEvents';\nimport { isAlgoliaInsightsHit } from './isAlgoliaInsightsHit';\nvar VIEW_EVENT_DELAY = 400;\nvar ALGOLIA_INSIGHTS_VERSION = '2.15.0';\nvar ALGOLIA_INSIGHTS_SRC = \"https://cdn.jsdelivr.net/npm/search-insights@\".concat(ALGOLIA_INSIGHTS_VERSION, \"/dist/search-insights.min.js\");\nvar sendViewedObjectIDs = debounce(function (_ref) {\n var onItemsChange = _ref.onItemsChange,\n items = _ref.items,\n insights = _ref.insights,\n state = _ref.state;\n onItemsChange({\n insights: insights,\n insightsEvents: createViewedEvents({\n items: items\n }).map(function (event) {\n return _objectSpread({\n eventName: 'Items Viewed'\n }, event);\n }),\n state: state\n });\n}, VIEW_EVENT_DELAY);\nexport function createAlgoliaInsightsPlugin(options) {\n var _getOptions = getOptions(options),\n providedInsightsClient = _getOptions.insightsClient,\n insightsInitParams = _getOptions.insightsInitParams,\n onItemsChange = _getOptions.onItemsChange,\n onSelectEvent = _getOptions.onSelect,\n onActiveEvent = _getOptions.onActive,\n __autocomplete_clickAnalytics = _getOptions.__autocomplete_clickAnalytics;\n var insightsClient = providedInsightsClient;\n if (!providedInsightsClient) {\n safelyRunOnBrowser(function (_ref2) {\n var window = _ref2.window;\n var pointer = window.AlgoliaAnalyticsObject || 'aa';\n if (typeof pointer === 'string') {\n insightsClient = window[pointer];\n }\n if (!insightsClient) {\n window.AlgoliaAnalyticsObject = pointer;\n if (!window[pointer]) {\n window[pointer] = function () {\n if (!window[pointer].queue) {\n window[pointer].queue = [];\n }\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n window[pointer].queue.push(args);\n };\n }\n window[pointer].version = ALGOLIA_INSIGHTS_VERSION;\n insightsClient = window[pointer];\n loadInsights(window);\n }\n });\n }\n\n // We return an empty plugin if `insightsClient` is still undefined at\n // this stage, which can happen in server environments.\n if (!insightsClient) {\n return {};\n }\n if (insightsInitParams) {\n insightsClient('init', _objectSpread({\n partial: true\n }, insightsInitParams));\n }\n var insights = createSearchInsightsApi(insightsClient);\n var previousItems = createRef([]);\n var debouncedOnStateChange = debounce(function (_ref3) {\n var state = _ref3.state;\n if (!state.isOpen) {\n return;\n }\n var items = state.collections.reduce(function (acc, current) {\n return [].concat(_toConsumableArray(acc), _toConsumableArray(current.items));\n }, []).filter(isAlgoliaInsightsHit);\n if (!isEqual(previousItems.current.map(function (x) {\n return x.objectID;\n }), items.map(function (x) {\n return x.objectID;\n }))) {\n previousItems.current = items;\n if (items.length > 0) {\n sendViewedObjectIDs({\n onItemsChange: onItemsChange,\n items: items,\n insights: insights,\n state: state\n });\n }\n }\n }, 0);\n return {\n name: 'aa.algoliaInsightsPlugin',\n subscribe: function subscribe(_ref4) {\n var setContext = _ref4.setContext,\n onSelect = _ref4.onSelect,\n onActive = _ref4.onActive;\n function setInsightsContext(userToken) {\n setContext({\n algoliaInsightsPlugin: {\n __algoliaSearchParameters: _objectSpread(_objectSpread({}, __autocomplete_clickAnalytics ? {\n clickAnalytics: true\n } : {}), userToken ? {\n userToken: normalizeUserToken(userToken)\n } : {}),\n insights: insights\n }\n });\n }\n insightsClient('addAlgoliaAgent', 'insights-plugin');\n setInsightsContext();\n\n // Handles user token changes\n insightsClient('onUserTokenChange', function (userToken) {\n setInsightsContext(userToken);\n });\n insightsClient('getUserToken', null, function (_error, userToken) {\n setInsightsContext(userToken);\n });\n onSelect(function (_ref5) {\n var item = _ref5.item,\n state = _ref5.state,\n event = _ref5.event,\n source = _ref5.source;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onSelectEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Selected'\n }, createClickedEvent({\n item: item,\n items: source.getItems().filter(isAlgoliaInsightsHit)\n }))]\n });\n });\n onActive(function (_ref6) {\n var item = _ref6.item,\n source = _ref6.source,\n state = _ref6.state,\n event = _ref6.event;\n if (!isAlgoliaInsightsHit(item)) {\n return;\n }\n onActiveEvent({\n state: state,\n event: event,\n insights: insights,\n item: item,\n insightsEvents: [_objectSpread({\n eventName: 'Item Active'\n }, createClickedEvent({\n item: item,\n items: source.getItems().filter(isAlgoliaInsightsHit)\n }))]\n });\n });\n },\n onStateChange: function onStateChange(_ref7) {\n var state = _ref7.state;\n debouncedOnStateChange({\n state: state\n });\n },\n __autocomplete_pluginOptions: options\n };\n}\nfunction getAlgoliaSources() {\n var _context$algoliaInsig;\n var algoliaSourceBase = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var context = arguments.length > 1 ? arguments[1] : undefined;\n return [].concat(_toConsumableArray(algoliaSourceBase), ['autocomplete-internal'], _toConsumableArray((_context$algoliaInsig = context.algoliaInsightsPlugin) !== null && _context$algoliaInsig !== void 0 && _context$algoliaInsig.__automaticInsights ? ['autocomplete-automatic'] : []));\n}\nfunction getOptions(options) {\n return _objectSpread({\n onItemsChange: function onItemsChange(_ref8) {\n var insights = _ref8.insights,\n insightsEvents = _ref8.insightsEvents,\n state = _ref8.state;\n insights.viewedObjectIDs.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)\n });\n })));\n },\n onSelect: function onSelect(_ref9) {\n var insights = _ref9.insights,\n insightsEvents = _ref9.insightsEvents,\n state = _ref9.state;\n insights.clickedObjectIDsAfterSearch.apply(insights, _toConsumableArray(insightsEvents.map(function (event) {\n return _objectSpread(_objectSpread({}, event), {}, {\n algoliaSource: getAlgoliaSources(event.algoliaSource, state.context)\n });\n })));\n },\n onActive: noop,\n __autocomplete_clickAnalytics: true\n }, options);\n}\nfunction loadInsights(environment) {\n var errorMessage = \"[Autocomplete]: Could not load search-insights.js. Please load it manually following https://alg.li/insights-autocomplete\";\n try {\n var script = environment.document.createElement('script');\n script.async = true;\n script.src = ALGOLIA_INSIGHTS_SRC;\n script.onerror = function () {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n };\n document.body.appendChild(script);\n } catch (cause) {\n // eslint-disable-next-line no-console\n console.error(errorMessage);\n }\n}\n\n/**\n * While `search-insights` supports both string and number user tokens,\n * the Search API only accepts strings. This function normalizes the user token.\n */\nfunction normalizeUserToken(userToken) {\n return typeof userToken === 'number' ? userToken.toString() : userToken;\n}","/**\n * Safely runs code meant for browser environments only.\n */\nexport function safelyRunOnBrowser(callback) {\n if (typeof window !== 'undefined') {\n return callback({\n window: window\n });\n }\n return undefined;\n}","function createInternalCancelablePromise(promise, initialState) {\n var state = initialState;\n return {\n then: function then(onfulfilled, onrejected) {\n return createInternalCancelablePromise(promise.then(createCallback(onfulfilled, state, promise), createCallback(onrejected, state, promise)), state);\n },\n catch: function _catch(onrejected) {\n return createInternalCancelablePromise(promise.catch(createCallback(onrejected, state, promise)), state);\n },\n finally: function _finally(onfinally) {\n if (onfinally) {\n state.onCancelList.push(onfinally);\n }\n return createInternalCancelablePromise(promise.finally(createCallback(onfinally && function () {\n state.onCancelList = [];\n return onfinally();\n }, state, promise)), state);\n },\n cancel: function cancel() {\n state.isCanceled = true;\n var callbacks = state.onCancelList;\n state.onCancelList = [];\n callbacks.forEach(function (callback) {\n callback();\n });\n },\n isCanceled: function isCanceled() {\n return state.isCanceled === true;\n }\n };\n}\nexport function createCancelablePromise(executor) {\n return createInternalCancelablePromise(new Promise(function (resolve, reject) {\n return executor(resolve, reject);\n }), {\n isCanceled: false,\n onCancelList: []\n });\n}\ncreateCancelablePromise.resolve = function (value) {\n return cancelable(Promise.resolve(value));\n};\ncreateCancelablePromise.reject = function (reason) {\n return cancelable(Promise.reject(reason));\n};\nexport function cancelable(promise) {\n return createInternalCancelablePromise(promise, {\n isCanceled: false,\n onCancelList: []\n });\n}\nfunction createCallback(onResult, state, fallback) {\n if (!onResult) {\n return fallback;\n }\n return function callback(arg) {\n if (state.isCanceled) {\n return arg;\n }\n return onResult(arg);\n };\n}","/**\n * Returns the next active item ID from the current state.\n *\n * We allow circular keyboard navigation from the base index.\n * The base index can either be `null` (nothing is highlighted) or `0`\n * (the first item is highlighted).\n * The base index is allowed to get assigned `null` only if\n * `props.defaultActiveItemId` is `null`. This pattern allows to \"stop\"\n * by the actual query before navigating to other suggestions as seen on\n * Google or Amazon.\n *\n * @param moveAmount The offset to increment (or decrement) the last index\n * @param baseIndex The current index to compute the next index from\n * @param itemCount The number of items\n * @param defaultActiveItemId The default active index to fallback to\n */\nexport function getNextActiveItemId(moveAmount, baseIndex, itemCount, defaultActiveItemId) {\n if (!itemCount) {\n return null;\n }\n if (moveAmount < 0 && (baseIndex === null || defaultActiveItemId !== null && baseIndex === 0)) {\n return itemCount + moveAmount;\n }\n var numericIndex = (baseIndex === null ? -1 : baseIndex) + moveAmount;\n if (numericIndex <= -1 || numericIndex >= itemCount) {\n return defaultActiveItemId === null ? null : 0;\n }\n return numericIndex;\n}","function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nimport { invariant, decycle, noop } from '@algolia/autocomplete-shared';\nexport function getNormalizedSources(getSources, params) {\n var seenSourceIds = [];\n return Promise.resolve(getSources(params)).then(function (sources) {\n invariant(Array.isArray(sources), function () {\n return \"The `getSources` function must return an array of sources but returned type \".concat(JSON.stringify(_typeof(sources)), \":\\n\\n\").concat(JSON.stringify(decycle(sources), null, 2));\n });\n return Promise.all(sources\n // We allow `undefined` and `false` sources to allow users to use\n // `Boolean(query) && source` (=> `false`).\n // We need to remove these values at this point.\n .filter(function (maybeSource) {\n return Boolean(maybeSource);\n }).map(function (source) {\n invariant(typeof source.sourceId === 'string', 'A source must provide a `sourceId` string.');\n if (seenSourceIds.includes(source.sourceId)) {\n throw new Error(\"[Autocomplete] The `sourceId` \".concat(JSON.stringify(source.sourceId), \" is not unique.\"));\n }\n seenSourceIds.push(source.sourceId);\n var defaultSource = {\n getItemInputValue: function getItemInputValue(_ref) {\n var state = _ref.state;\n return state.query;\n },\n getItemUrl: function getItemUrl() {\n return undefined;\n },\n onSelect: function onSelect(_ref2) {\n var setIsOpen = _ref2.setIsOpen;\n setIsOpen(false);\n },\n onActive: noop,\n onResolve: noop\n };\n Object.keys(defaultSource).forEach(function (key) {\n defaultSource[key].__default = true;\n });\n var normalizedSource = _objectSpread(_objectSpread({}, defaultSource), source);\n return Promise.resolve(normalizedSource);\n }));\n });\n}","// We don't have access to the autocomplete source when we call `onKeyDown`\n// or `onClick` because those are native browser events.\n// However, we can get the source from the suggestion index.\nfunction getCollectionFromActiveItemId(state) {\n // Given 3 sources with respectively 1, 2 and 3 suggestions: [1, 2, 3]\n // We want to get the accumulated counts:\n // [1, 1 + 2, 1 + 2 + 3] = [1, 3, 3 + 3] = [1, 3, 6]\n var accumulatedCollectionsCount = state.collections.map(function (collections) {\n return collections.items.length;\n }).reduce(function (acc, collectionsCount, index) {\n var previousValue = acc[index - 1] || 0;\n var nextValue = previousValue + collectionsCount;\n acc.push(nextValue);\n return acc;\n }, []);\n\n // Based on the accumulated counts, we can infer the index of the suggestion.\n var collectionIndex = accumulatedCollectionsCount.reduce(function (acc, current) {\n if (current <= state.activeItemId) {\n return acc + 1;\n }\n return acc;\n }, 0);\n return state.collections[collectionIndex];\n}\n\n/**\n * Gets the highlighted index relative to a suggestion object (not the absolute\n * highlighted index).\n *\n * Example:\n * [['a', 'b'], ['c', 'd', 'e'], ['f']]\n * ↑\n * (absolute: 3, relative: 1)\n */\nfunction getRelativeActiveItemId(_ref) {\n var state = _ref.state,\n collection = _ref.collection;\n var isOffsetFound = false;\n var counter = 0;\n var previousItemsOffset = 0;\n while (isOffsetFound === false) {\n var currentCollection = state.collections[counter];\n if (currentCollection === collection) {\n isOffsetFound = true;\n break;\n }\n previousItemsOffset += currentCollection.items.length;\n counter++;\n }\n return state.activeItemId - previousItemsOffset;\n}\nexport function getActiveItem(state) {\n var collection = getCollectionFromActiveItemId(state);\n if (!collection) {\n return null;\n }\n var item = collection.items[getRelativeActiveItemId({\n state: state,\n collection: collection\n })];\n var source = collection.source;\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: state\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: state\n });\n return {\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n source: source\n };\n}","/**\n * Returns a full element id for an autocomplete element.\n *\n * @param autocompleteInstanceId The id of the autocomplete instance\n * @param elementId The specific element id\n * @param source The source of the element, when it needs to be scoped\n */\nexport function getAutocompleteElementId(autocompleteInstanceId, elementId, source) {\n return [autocompleteInstanceId, source === null || source === void 0 ? void 0 : source.sourceId, elementId].filter(Boolean).join('-').replace(/\\s/g, '');\n}","var regex = /((gt|sm)-|galaxy nexus)|samsung[- ]|samsungbrowser/i;\nexport function isSamsung(userAgent) {\n return Boolean(userAgent && userAgent.match(regex));\n}","export function getNativeEvent(event) {\n return event.nativeEvent || event;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createCancelablePromiseList } from './utils';\nexport function createStore(reducer, props, onStoreStateChange) {\n var state = props.initialState;\n return {\n getState: function getState() {\n return state;\n },\n dispatch: function dispatch(action, payload) {\n var prevState = _objectSpread({}, state);\n state = reducer(state, {\n type: action,\n props: props,\n payload: payload\n });\n onStoreStateChange({\n state: state,\n prevState: prevState\n });\n },\n pendingRequests: createCancelablePromiseList()\n };\n}","export function createCancelablePromiseList() {\n var list = [];\n return {\n add: function add(cancelablePromise) {\n list.push(cancelablePromise);\n return cancelablePromise.finally(function () {\n list = list.filter(function (item) {\n return item !== cancelablePromise;\n });\n });\n },\n cancelAll: function cancelAll() {\n list.forEach(function (promise) {\n return promise.cancel();\n });\n },\n isEmpty: function isEmpty() {\n return list.length === 0;\n }\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function getAutocompleteSetters(_ref) {\n var store = _ref.store;\n var setActiveItemId = function setActiveItemId(value) {\n store.dispatch('setActiveItemId', value);\n };\n var setQuery = function setQuery(value) {\n store.dispatch('setQuery', value);\n };\n var setCollections = function setCollections(rawValue) {\n var baseItemId = 0;\n var value = rawValue.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n // We flatten the stored items to support calling `getAlgoliaResults`\n // from the source itself.\n items: flatten(collection.items).map(function (item) {\n return _objectSpread(_objectSpread({}, item), {}, {\n __autocomplete_id: baseItemId++\n });\n })\n });\n });\n store.dispatch('setCollections', value);\n };\n var setIsOpen = function setIsOpen(value) {\n store.dispatch('setIsOpen', value);\n };\n var setStatus = function setStatus(value) {\n store.dispatch('setStatus', value);\n };\n var setContext = function setContext(value) {\n store.dispatch('setContext', value);\n };\n return {\n setActiveItemId: setActiveItemId,\n setQuery: setQuery,\n setCollections: setCollections,\n setIsOpen: setIsOpen,\n setStatus: setStatus,\n setContext: setContext\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, generateAutocompleteId, flatten } from '@algolia/autocomplete-shared';\nimport { getNormalizedSources } from './utils';\nexport function getDefaultProps(props, pluginSubscribers) {\n var _props$id;\n /* eslint-disable no-restricted-globals */\n var environment = typeof window !== 'undefined' ? window : {};\n /* eslint-enable no-restricted-globals */\n var plugins = props.plugins || [];\n return _objectSpread(_objectSpread({\n debug: false,\n openOnFocus: false,\n enterKeyHint: undefined,\n ignoreCompositionEvents: false,\n placeholder: '',\n autoFocus: false,\n defaultActiveItemId: null,\n stallThreshold: 300,\n insights: undefined,\n environment: environment,\n shouldPanelOpen: function shouldPanelOpen(_ref) {\n var state = _ref.state;\n return getItemsCount(state) > 0;\n },\n reshape: function reshape(_ref2) {\n var sources = _ref2.sources;\n return sources;\n }\n }, props), {}, {\n // Since `generateAutocompleteId` triggers a side effect (it increments\n // an internal counter), we don't want to execute it if unnecessary.\n id: (_props$id = props.id) !== null && _props$id !== void 0 ? _props$id : generateAutocompleteId(),\n plugins: plugins,\n // The following props need to be deeply defaulted.\n initialState: _objectSpread({\n activeItemId: null,\n query: '',\n completion: null,\n collections: [],\n isOpen: false,\n status: 'idle',\n context: {}\n }, props.initialState),\n onStateChange: function onStateChange(params) {\n var _props$onStateChange;\n (_props$onStateChange = props.onStateChange) === null || _props$onStateChange === void 0 ? void 0 : _props$onStateChange.call(props, params);\n plugins.forEach(function (x) {\n var _x$onStateChange;\n return (_x$onStateChange = x.onStateChange) === null || _x$onStateChange === void 0 ? void 0 : _x$onStateChange.call(x, params);\n });\n },\n onSubmit: function onSubmit(params) {\n var _props$onSubmit;\n (_props$onSubmit = props.onSubmit) === null || _props$onSubmit === void 0 ? void 0 : _props$onSubmit.call(props, params);\n plugins.forEach(function (x) {\n var _x$onSubmit;\n return (_x$onSubmit = x.onSubmit) === null || _x$onSubmit === void 0 ? void 0 : _x$onSubmit.call(x, params);\n });\n },\n onReset: function onReset(params) {\n var _props$onReset;\n (_props$onReset = props.onReset) === null || _props$onReset === void 0 ? void 0 : _props$onReset.call(props, params);\n plugins.forEach(function (x) {\n var _x$onReset;\n return (_x$onReset = x.onReset) === null || _x$onReset === void 0 ? void 0 : _x$onReset.call(x, params);\n });\n },\n getSources: function getSources(params) {\n return Promise.all([].concat(_toConsumableArray(plugins.map(function (plugin) {\n return plugin.getSources;\n })), [props.getSources]).filter(Boolean).map(function (getSources) {\n return getNormalizedSources(getSources, params);\n })).then(function (nested) {\n return flatten(nested);\n }).then(function (sources) {\n return sources.map(function (source) {\n return _objectSpread(_objectSpread({}, source), {}, {\n onSelect: function onSelect(params) {\n source.onSelect(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onSelect;\n return (_x$onSelect = x.onSelect) === null || _x$onSelect === void 0 ? void 0 : _x$onSelect.call(x, params);\n });\n },\n onActive: function onActive(params) {\n source.onActive(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onActive;\n return (_x$onActive = x.onActive) === null || _x$onActive === void 0 ? void 0 : _x$onActive.call(x, params);\n });\n },\n onResolve: function onResolve(params) {\n source.onResolve(params);\n pluginSubscribers.forEach(function (x) {\n var _x$onResolve;\n return (_x$onResolve = x.onResolve) === null || _x$onResolve === void 0 ? void 0 : _x$onResolve.call(x, params);\n });\n }\n });\n });\n });\n },\n navigator: _objectSpread({\n navigate: function navigate(_ref3) {\n var itemUrl = _ref3.itemUrl;\n environment.location.assign(itemUrl);\n },\n navigateNewTab: function navigateNewTab(_ref4) {\n var itemUrl = _ref4.itemUrl;\n var windowReference = environment.open(itemUrl, '_blank', 'noopener');\n windowReference === null || windowReference === void 0 ? void 0 : windowReference.focus();\n },\n navigateNewWindow: function navigateNewWindow(_ref5) {\n var itemUrl = _ref5.itemUrl;\n environment.open(itemUrl, '_blank', 'noopener');\n }\n }, props.navigator)\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { flatten } from '@algolia/autocomplete-shared';\nexport function reshape(_ref) {\n var collections = _ref.collections,\n props = _ref.props,\n state = _ref.state;\n // Sources are grouped by `sourceId` to conveniently pick them via destructuring.\n // Example: `const { recentSearchesPlugin } = sourcesBySourceId`\n var originalSourcesBySourceId = collections.reduce(function (acc, collection) {\n return _objectSpread(_objectSpread({}, acc), {}, _defineProperty({}, collection.source.sourceId, _objectSpread(_objectSpread({}, collection.source), {}, {\n getItems: function getItems() {\n // We provide the resolved items from the collection to the `reshape` prop.\n return flatten(collection.items);\n }\n })));\n }, {});\n var _props$plugins$reduce = props.plugins.reduce(function (acc, plugin) {\n if (plugin.reshape) {\n return plugin.reshape(acc);\n }\n return acc;\n }, {\n sourcesBySourceId: originalSourcesBySourceId,\n state: state\n }),\n sourcesBySourceId = _props$plugins$reduce.sourcesBySourceId;\n var reshapeSources = props.reshape({\n sourcesBySourceId: sourcesBySourceId,\n sources: Object.values(sourcesBySourceId),\n state: state\n });\n\n // We reconstruct the collections with the items modified by the `reshape` prop.\n return flatten(reshapeSources).filter(Boolean).map(function (source) {\n return {\n source: source,\n items: source.getItems()\n };\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { decycle, flatten, invariant } from '@algolia/autocomplete-shared';\nimport { mapToAlgoliaResponse } from './utils';\nfunction isDescription(item) {\n return Boolean(item.execute);\n}\nfunction isRequesterDescription(description) {\n return Boolean(description === null || description === void 0 ? void 0 : description.execute);\n}\nexport function preResolve(itemsOrDescription, sourceId, state) {\n if (isRequesterDescription(itemsOrDescription)) {\n var contextParameters = itemsOrDescription.requesterId === 'algolia' ? Object.assign.apply(Object, [{}].concat(_toConsumableArray(Object.keys(state.context).map(function (key) {\n var _state$context$key;\n return (_state$context$key = state.context[key]) === null || _state$context$key === void 0 ? void 0 : _state$context$key.__algoliaSearchParameters;\n })))) : {};\n return _objectSpread(_objectSpread({}, itemsOrDescription), {}, {\n requests: itemsOrDescription.queries.map(function (query) {\n return {\n query: itemsOrDescription.requesterId === 'algolia' ? _objectSpread(_objectSpread({}, query), {}, {\n params: _objectSpread(_objectSpread({}, contextParameters), query.params)\n }) : query,\n sourceId: sourceId,\n transformResponse: itemsOrDescription.transformResponse\n };\n })\n });\n }\n return {\n items: itemsOrDescription,\n sourceId: sourceId\n };\n}\nexport function resolve(items) {\n var packed = items.reduce(function (acc, current) {\n if (!isDescription(current)) {\n acc.push(current);\n return acc;\n }\n var searchClient = current.searchClient,\n execute = current.execute,\n requesterId = current.requesterId,\n requests = current.requests;\n var container = acc.find(function (item) {\n return isDescription(current) && isDescription(item) && item.searchClient === searchClient && Boolean(requesterId) && item.requesterId === requesterId;\n });\n if (container) {\n var _container$items;\n (_container$items = container.items).push.apply(_container$items, _toConsumableArray(requests));\n } else {\n var request = {\n execute: execute,\n requesterId: requesterId,\n items: requests,\n searchClient: searchClient\n };\n acc.push(request);\n }\n return acc;\n }, []);\n var values = packed.map(function (maybeDescription) {\n if (!isDescription(maybeDescription)) {\n return Promise.resolve(maybeDescription);\n }\n var _ref = maybeDescription,\n execute = _ref.execute,\n items = _ref.items,\n searchClient = _ref.searchClient;\n return execute({\n searchClient: searchClient,\n requests: items\n });\n });\n return Promise.all(values).then(function (responses) {\n return flatten(responses);\n });\n}\nexport function postResolve(responses, sources, store) {\n return sources.map(function (source) {\n var matches = responses.filter(function (response) {\n return response.sourceId === source.sourceId;\n });\n var results = matches.map(function (_ref2) {\n var items = _ref2.items;\n return items;\n });\n var transform = matches[0].transformResponse;\n var items = transform ? transform(mapToAlgoliaResponse(results)) : results;\n source.onResolve({\n source: source,\n results: results,\n items: items,\n state: store.getState()\n });\n invariant(Array.isArray(items), function () {\n return \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned type \").concat(JSON.stringify(_typeof(items)), \":\\n\\n\").concat(JSON.stringify(decycle(items), null, 2), \".\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\");\n });\n invariant(items.every(Boolean), \"The `getItems` function from source \\\"\".concat(source.sourceId, \"\\\" must return an array of items but returned \").concat(JSON.stringify(undefined), \".\\n\\nDid you forget to return items?\\n\\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/core-concepts/sources/#param-getitems\"));\n return {\n source: source,\n items: items\n };\n });\n}","export function mapToAlgoliaResponse(rawResults) {\n return {\n results: rawResults,\n hits: rawResults.map(function (result) {\n return result.hits;\n }).filter(Boolean),\n facetHits: rawResults.map(function (result) {\n var _facetHits;\n return (_facetHits = result.facetHits) === null || _facetHits === void 0 ? void 0 : _facetHits.map(function (facetHit) {\n // Bring support for the highlighting components.\n return {\n label: facetHit.value,\n count: facetHit.count,\n _highlightResult: {\n label: {\n value: facetHit.highlighted\n }\n }\n };\n });\n }).filter(Boolean)\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"nextState\", \"props\", \"query\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { reshape } from './reshape';\nimport { preResolve, resolve, postResolve } from './resolve';\nimport { cancelable, createConcurrentSafePromise, getActiveItem } from './utils';\nvar lastStalledId = null;\nvar runConcurrentSafePromise = createConcurrentSafePromise();\nexport function onInput(_ref) {\n var event = _ref.event,\n _ref$nextState = _ref.nextState,\n nextState = _ref$nextState === void 0 ? {} : _ref$nextState,\n props = _ref.props,\n query = _ref.query,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n var setCollections = setters.setCollections,\n setIsOpen = setters.setIsOpen,\n setQuery = setters.setQuery,\n setActiveItemId = setters.setActiveItemId,\n setStatus = setters.setStatus,\n setContext = setters.setContext;\n setQuery(query);\n setActiveItemId(props.defaultActiveItemId);\n if (!query && props.openOnFocus === false) {\n var _nextState$isOpen;\n var collections = store.getState().collections.map(function (collection) {\n return _objectSpread(_objectSpread({}, collection), {}, {\n items: []\n });\n });\n setStatus('idle');\n setCollections(collections);\n setIsOpen((_nextState$isOpen = nextState.isOpen) !== null && _nextState$isOpen !== void 0 ? _nextState$isOpen : props.shouldPanelOpen({\n state: store.getState()\n }));\n\n // We make sure to update the latest resolved value of the tracked\n // promises to keep late resolving promises from \"cancelling\" the state\n // updates performed in this code path.\n // We chain with a void promise to respect `onInput`'s expected return type.\n var _request = cancelable(runConcurrentSafePromise(collections).then(function () {\n return Promise.resolve();\n }));\n return store.pendingRequests.add(_request);\n }\n setStatus('loading');\n lastStalledId = props.environment.setTimeout(function () {\n setStatus('stalled');\n }, props.stallThreshold);\n\n // We track the entire promise chain triggered by `onInput` before mutating\n // the Autocomplete state to make sure that any state manipulation is based on\n // fresh data regardless of when promises individually resolve.\n // We don't track nested promises and only rely on the full chain resolution,\n // meaning we should only ever manipulate the state once this concurrent-safe\n // promise is resolved.\n var request = cancelable(runConcurrentSafePromise(props.getSources(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters)).then(function (sources) {\n return Promise.all(sources.map(function (source) {\n return Promise.resolve(source.getItems(_objectSpread({\n query: query,\n refresh: refresh,\n state: store.getState()\n }, setters))).then(function (itemsOrDescription) {\n return preResolve(itemsOrDescription, source.sourceId, store.getState());\n });\n })).then(resolve).then(function (responses) {\n var __automaticInsights = responses.some(function (_ref2) {\n var items = _ref2.items;\n return isSearchResponseWithAutomaticInsightsFlag(items);\n });\n\n // No need to pollute the context if `__automaticInsights=false`\n if (__automaticInsights) {\n var _store$getState$conte;\n setContext({\n algoliaInsightsPlugin: _objectSpread(_objectSpread({}, ((_store$getState$conte = store.getState().context) === null || _store$getState$conte === void 0 ? void 0 : _store$getState$conte.algoliaInsightsPlugin) || {}), {}, {\n __automaticInsights: __automaticInsights\n })\n });\n }\n return postResolve(responses, sources, store);\n }).then(function (collections) {\n return reshape({\n collections: collections,\n props: props,\n state: store.getState()\n });\n });\n }))).then(function (collections) {\n var _nextState$isOpen2;\n // Parameters passed to `onInput` could be stale when the following code\n // executes, because `onInput` calls may not resolve in order.\n // If it becomes a problem we'll need to save the last passed parameters.\n // See: https://codesandbox.io/s/agitated-cookies-y290z\n\n setStatus('idle');\n setCollections(collections);\n var isPanelOpen = props.shouldPanelOpen({\n state: store.getState()\n });\n setIsOpen((_nextState$isOpen2 = nextState.isOpen) !== null && _nextState$isOpen2 !== void 0 ? _nextState$isOpen2 : props.openOnFocus && !query && isPanelOpen || isPanelOpen);\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }).finally(function () {\n setStatus('idle');\n if (lastStalledId) {\n props.environment.clearTimeout(lastStalledId);\n }\n });\n return store.pendingRequests.add(request);\n}\nfunction isSearchResponseWithAutomaticInsightsFlag(items) {\n return !Array.isArray(items) && Boolean(items === null || items === void 0 ? void 0 : items._automaticInsights);\n}","/**\n * Creates a runner that executes promises in a concurrent-safe way.\n *\n * This is useful to prevent older promises to resolve after a newer promise,\n * otherwise resulting in stale resolved values.\n */\nexport function createConcurrentSafePromise() {\n var basePromiseId = -1;\n var latestResolvedId = -1;\n var latestResolvedValue = undefined;\n return function runConcurrentSafePromise(promise) {\n basePromiseId++;\n var currentPromiseId = basePromiseId;\n return Promise.resolve(promise).then(function (x) {\n // The promise might take too long to resolve and get outdated. This would\n // result in resolving stale values.\n // When this happens, we ignore the promise value and return the one\n // coming from the latest resolved value.\n //\n // +----------------------------------+\n // | 100ms |\n // | run(1) +---> R1 |\n // | 300ms |\n // | run(2) +-------------> R2 (SKIP) |\n // | 200ms |\n // | run(3) +--------> R3 |\n // +----------------------------------+\n if (latestResolvedValue && currentPromiseId < latestResolvedId) {\n return latestResolvedValue;\n }\n latestResolvedId = currentPromiseId;\n latestResolvedValue = x;\n return x;\n });\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"event\", \"props\", \"refresh\", \"store\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { onInput } from './onInput';\nimport { getActiveItem, getAutocompleteElementId } from './utils';\nexport function onKeyDown(_ref) {\n var event = _ref.event,\n props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n if (event.key === 'ArrowUp' || event.key === 'ArrowDown') {\n // eslint-disable-next-line no-inner-declarations\n var triggerScrollIntoView = function triggerScrollIntoView() {\n var highlightedItem = getActiveItem(store.getState());\n var nodeItem = props.environment.document.getElementById(getAutocompleteElementId(props.id, \"item-\".concat(store.getState().activeItemId), highlightedItem === null || highlightedItem === void 0 ? void 0 : highlightedItem.source));\n if (nodeItem) {\n if (nodeItem.scrollIntoViewIfNeeded) {\n nodeItem.scrollIntoViewIfNeeded(false);\n } else {\n nodeItem.scrollIntoView(false);\n }\n }\n }; // eslint-disable-next-line no-inner-declarations\n var triggerOnActive = function triggerOnActive() {\n var highlightedItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && highlightedItem) {\n var item = highlightedItem.item,\n itemInputValue = highlightedItem.itemInputValue,\n itemUrl = highlightedItem.itemUrl,\n source = highlightedItem.source;\n source.onActive(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n }\n }; // Default browser behavior changes the caret placement on ArrowUp and\n // ArrowDown.\n event.preventDefault();\n\n // When re-opening the panel, we need to split the logic to keep the actions\n // synchronized as `onInput` returns a promise.\n if (store.getState().isOpen === false && (props.openOnFocus || Boolean(store.getState().query))) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n store.dispatch(event.key, {\n nextActiveItemId: props.defaultActiveItemId\n });\n triggerOnActive();\n // Since we rely on the DOM, we need to wait for all the micro tasks to\n // finish (which include re-opening the panel) to make sure all the\n // elements are available.\n setTimeout(triggerScrollIntoView, 0);\n });\n } else {\n store.dispatch(event.key, {});\n triggerOnActive();\n triggerScrollIntoView();\n }\n } else if (event.key === 'Escape') {\n // This prevents the default browser behavior on `input[type=\"search\"]`\n // from removing the query right away because we first want to close the\n // panel.\n event.preventDefault();\n store.dispatch(event.key, null);\n\n // Hitting the `Escape` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Tab') {\n store.dispatch('blur', null);\n\n // Hitting the `Tab` key signals the end of a user interaction with the\n // autocomplete. At this point, we should ignore any requests that are still\n // pending and could reopen the panel once they resolve, because that would\n // result in an unsolicited UI behavior.\n store.pendingRequests.cancelAll();\n } else if (event.key === 'Enter') {\n // No active item, so we let the browser handle the native `onSubmit` form\n // event.\n if (store.getState().activeItemId === null || store.getState().collections.every(function (collection) {\n return collection.items.length === 0;\n })) {\n // If requests are still pending when the panel closes, they could reopen\n // the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n return;\n }\n\n // This prevents the `onSubmit` event to be sent because an item is\n // highlighted.\n event.preventDefault();\n var _ref2 = getActiveItem(store.getState()),\n item = _ref2.item,\n itemInputValue = _ref2.itemInputValue,\n itemUrl = _ref2.itemUrl,\n source = _ref2.source;\n if (event.metaKey || event.ctrlKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewTab({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.shiftKey) {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigateNewWindow({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n }\n } else if (event.altKey) {\n // Keep native browser behavior\n } else {\n if (itemUrl !== undefined) {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n props.navigator.navigate({\n itemUrl: itemUrl,\n item: item,\n state: store.getState()\n });\n return;\n }\n onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters)).then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"props\", \"refresh\", \"store\"],\n _excluded2 = [\"inputElement\", \"formElement\", \"panelElement\"],\n _excluded3 = [\"inputElement\"],\n _excluded4 = [\"inputElement\", \"maxLength\"],\n _excluded5 = [\"source\"],\n _excluded6 = [\"item\", \"source\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nimport { noop } from '@algolia/autocomplete-shared';\nimport { onInput } from './onInput';\nimport { onKeyDown as _onKeyDown } from './onKeyDown';\nimport { getActiveItem, getAutocompleteElementId, isOrContainsNode, isSamsung, getNativeEvent } from './utils';\nexport function getPropGetters(_ref) {\n var props = _ref.props,\n refresh = _ref.refresh,\n store = _ref.store,\n setters = _objectWithoutProperties(_ref, _excluded);\n var getEnvironmentProps = function getEnvironmentProps(providedProps) {\n var inputElement = providedProps.inputElement,\n formElement = providedProps.formElement,\n panelElement = providedProps.panelElement,\n rest = _objectWithoutProperties(providedProps, _excluded2);\n function onMouseDownOrTouchStart(event) {\n // The `onTouchStart`/`onMouseDown` events shouldn't trigger the `blur`\n // handler when it's not an interaction with Autocomplete.\n // We detect it with the following heuristics:\n // - the panel is closed AND there are no pending requests\n // (no interaction with the autocomplete, no future state updates)\n // - OR the touched target is the input element (should open the panel)\n var isAutocompleteInteraction = store.getState().isOpen || !store.pendingRequests.isEmpty();\n if (!isAutocompleteInteraction || event.target === inputElement) {\n return;\n }\n\n // @TODO: support cases where there are multiple Autocomplete instances.\n // Right now, a second instance makes this computation return false.\n var isTargetWithinAutocomplete = [formElement, panelElement].some(function (contextNode) {\n return isOrContainsNode(contextNode, event.target);\n });\n if (isTargetWithinAutocomplete === false) {\n store.dispatch('blur', null);\n\n // If requests are still pending when the user closes the panel, they\n // could reopen the panel once they resolve.\n // We want to prevent any subsequent query from reopening the panel\n // because it would result in an unsolicited UI behavior.\n if (!props.debug) {\n store.pendingRequests.cancelAll();\n }\n }\n }\n return _objectSpread({\n // We do not rely on the native `blur` event of the input to close the\n // panel, but rather on a custom `touchstart`/`mousedown` event outside\n // of the autocomplete elements.\n // This ensures we don't mistakenly interpret interactions within the\n // autocomplete (but outside of the input) as a signal to close the panel.\n // For example, clicking reset button causes an input blur, but if\n // `openOnFocus=true`, it shouldn't close the panel.\n // On touch devices, scrolling results (`touchmove`) causes an input blur\n // but shouldn't close the panel.\n onTouchStart: onMouseDownOrTouchStart,\n onMouseDown: onMouseDownOrTouchStart,\n // When scrolling on touch devices (mobiles, tablets, etc.), we want to\n // mimic the native platform behavior where the input is blurred to\n // hide the virtual keyboard. This gives more vertical space to\n // discover all the suggestions showing up in the panel.\n onTouchMove: function onTouchMove(event) {\n if (store.getState().isOpen === false || inputElement !== props.environment.document.activeElement || event.target === inputElement) {\n return;\n }\n inputElement.blur();\n }\n }, rest);\n };\n var getRootProps = function getRootProps(rest) {\n return _objectSpread({\n role: 'combobox',\n 'aria-expanded': store.getState().isOpen,\n 'aria-haspopup': 'listbox',\n 'aria-controls': store.getState().isOpen ? store.getState().collections.map(function (_ref2) {\n var source = _ref2.source;\n return getAutocompleteElementId(props.id, 'list', source);\n }).join(' ') : undefined,\n 'aria-labelledby': getAutocompleteElementId(props.id, 'label')\n }, rest);\n };\n var getFormProps = function getFormProps(providedProps) {\n var inputElement = providedProps.inputElement,\n rest = _objectWithoutProperties(providedProps, _excluded3);\n return _objectSpread({\n action: '',\n noValidate: true,\n role: 'search',\n onSubmit: function onSubmit(event) {\n var _providedProps$inputE;\n event.preventDefault();\n props.onSubmit(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('submit', null);\n (_providedProps$inputE = providedProps.inputElement) === null || _providedProps$inputE === void 0 ? void 0 : _providedProps$inputE.blur();\n },\n onReset: function onReset(event) {\n var _providedProps$inputE2;\n event.preventDefault();\n props.onReset(_objectSpread({\n event: event,\n refresh: refresh,\n state: store.getState()\n }, setters));\n store.dispatch('reset', null);\n (_providedProps$inputE2 = providedProps.inputElement) === null || _providedProps$inputE2 === void 0 ? void 0 : _providedProps$inputE2.focus();\n }\n }, rest);\n };\n var getInputProps = function getInputProps(providedProps) {\n var _props$environment$na;\n function onFocus(event) {\n // We want to trigger a query when `openOnFocus` is true\n // because the panel should open with the current query.\n if (props.openOnFocus || Boolean(store.getState().query)) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: store.getState().completion || store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n store.dispatch('focus', null);\n }\n var _ref3 = providedProps || {},\n inputElement = _ref3.inputElement,\n _ref3$maxLength = _ref3.maxLength,\n maxLength = _ref3$maxLength === void 0 ? 512 : _ref3$maxLength,\n rest = _objectWithoutProperties(_ref3, _excluded4);\n var activeItem = getActiveItem(store.getState());\n var userAgent = ((_props$environment$na = props.environment.navigator) === null || _props$environment$na === void 0 ? void 0 : _props$environment$na.userAgent) || '';\n var shouldFallbackKeyHint = isSamsung(userAgent);\n var enterKeyHint = props.enterKeyHint || (activeItem !== null && activeItem !== void 0 && activeItem.itemUrl && !shouldFallbackKeyHint ? 'go' : 'search');\n return _objectSpread({\n 'aria-autocomplete': 'both',\n 'aria-activedescendant': store.getState().isOpen && store.getState().activeItemId !== null ? getAutocompleteElementId(props.id, \"item-\".concat(store.getState().activeItemId), activeItem === null || activeItem === void 0 ? void 0 : activeItem.source) : undefined,\n 'aria-controls': store.getState().isOpen ? store.getState().collections.filter(function (collection) {\n return collection.items.length > 0;\n }).map(function (_ref4) {\n var source = _ref4.source;\n return getAutocompleteElementId(props.id, 'list', source);\n }).join(' ') : undefined,\n 'aria-labelledby': getAutocompleteElementId(props.id, 'label'),\n value: store.getState().completion || store.getState().query,\n id: getAutocompleteElementId(props.id, 'input'),\n autoComplete: 'off',\n autoCorrect: 'off',\n autoCapitalize: 'off',\n enterKeyHint: enterKeyHint,\n spellCheck: 'false',\n autoFocus: props.autoFocus,\n placeholder: props.placeholder,\n maxLength: maxLength,\n type: 'search',\n onChange: function onChange(event) {\n var value = event.currentTarget.value;\n if (props.ignoreCompositionEvents && getNativeEvent(event).isComposing) {\n setters.setQuery(value);\n return;\n }\n onInput(_objectSpread({\n event: event,\n props: props,\n query: value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onCompositionEnd: function onCompositionEnd(event) {\n onInput(_objectSpread({\n event: event,\n props: props,\n query: event.currentTarget.value.slice(0, maxLength),\n refresh: refresh,\n store: store\n }, setters));\n },\n onKeyDown: function onKeyDown(event) {\n if (getNativeEvent(event).isComposing) {\n return;\n }\n _onKeyDown(_objectSpread({\n event: event,\n props: props,\n refresh: refresh,\n store: store\n }, setters));\n },\n onFocus: onFocus,\n // We don't rely on the `blur` event.\n // See explanation in `onTouchStart`/`onMouseDown`.\n // @MAJOR See if we need to keep this handler.\n onBlur: noop,\n onClick: function onClick(event) {\n // When the panel is closed and you click on the input while\n // the input is focused, the `onFocus` event is not triggered\n // (default browser behavior).\n // In an autocomplete context, it makes sense to open the panel in this\n // case.\n // We mimic this event by catching the `onClick` event which\n // triggers the `onFocus` for the panel to open.\n if (providedProps.inputElement === props.environment.document.activeElement && !store.getState().isOpen) {\n onFocus(event);\n }\n }\n }, rest);\n };\n var getLabelProps = function getLabelProps(rest) {\n return _objectSpread({\n htmlFor: getAutocompleteElementId(props.id, 'input'),\n id: getAutocompleteElementId(props.id, 'label')\n }, rest);\n };\n var getListProps = function getListProps(providedProps) {\n var _ref5 = providedProps || {},\n source = _ref5.source,\n rest = _objectWithoutProperties(_ref5, _excluded5);\n return _objectSpread({\n role: 'listbox',\n 'aria-labelledby': getAutocompleteElementId(props.id, 'label'),\n id: getAutocompleteElementId(props.id, 'list', source)\n }, rest);\n };\n var getPanelProps = function getPanelProps(rest) {\n return _objectSpread({\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the panel so\n // that the blur event is not triggered, otherwise it closes the\n // panel.\n event.preventDefault();\n },\n onMouseLeave: function onMouseLeave() {\n store.dispatch('mouseleave', null);\n }\n }, rest);\n };\n var getItemProps = function getItemProps(providedProps) {\n var item = providedProps.item,\n source = providedProps.source,\n rest = _objectWithoutProperties(providedProps, _excluded6);\n return _objectSpread({\n id: getAutocompleteElementId(props.id, \"item-\".concat(item.__autocomplete_id), source),\n role: 'option',\n 'aria-selected': store.getState().activeItemId === item.__autocomplete_id,\n onMouseMove: function onMouseMove(event) {\n if (item.__autocomplete_id === store.getState().activeItemId) {\n return;\n }\n store.dispatch('mousemove', item.__autocomplete_id);\n var activeItem = getActiveItem(store.getState());\n if (store.getState().activeItemId !== null && activeItem) {\n var _item = activeItem.item,\n itemInputValue = activeItem.itemInputValue,\n itemUrl = activeItem.itemUrl,\n _source = activeItem.source;\n _source.onActive(_objectSpread({\n event: event,\n item: _item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: _source,\n state: store.getState()\n }, setters));\n }\n },\n onMouseDown: function onMouseDown(event) {\n // Prevents the `activeElement` from being changed to the item so it\n // can remain with the current `activeElement`.\n event.preventDefault();\n },\n onClick: function onClick(event) {\n var itemInputValue = source.getItemInputValue({\n item: item,\n state: store.getState()\n });\n var itemUrl = source.getItemUrl({\n item: item,\n state: store.getState()\n });\n\n // If `getItemUrl` is provided, it means that the suggestion\n // is a link, not plain text that aims at updating the query.\n // We can therefore skip the state change because it will update\n // the `activeItemId`, resulting in a UI flash, especially\n // noticeable on mobile.\n var runPreCommand = itemUrl ? Promise.resolve() : onInput(_objectSpread({\n event: event,\n nextState: {\n isOpen: false\n },\n props: props,\n query: itemInputValue,\n refresh: refresh,\n store: store\n }, setters));\n runPreCommand.then(function () {\n source.onSelect(_objectSpread({\n event: event,\n item: item,\n itemInputValue: itemInputValue,\n itemUrl: itemUrl,\n refresh: refresh,\n source: source,\n state: store.getState()\n }, setters));\n });\n }\n }, rest);\n };\n return {\n getEnvironmentProps: getEnvironmentProps,\n getRootProps: getRootProps,\n getFormProps: getFormProps,\n getLabelProps: getLabelProps,\n getInputProps: getInputProps,\n getPanelProps: getPanelProps,\n getListProps: getListProps,\n getItemProps: getItemProps\n };\n}","export function isOrContainsNode(parent, child) {\n return parent === child || parent.contains(child);\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { userAgents } from '@algolia/autocomplete-shared';\nexport function getMetadata(_ref) {\n var _, _options$__autocomple, _options$__autocomple2, _options$__autocomple3;\n var plugins = _ref.plugins,\n options = _ref.options;\n var optionsKey = (_ = (((_options$__autocomple = options.__autocomplete_metadata) === null || _options$__autocomple === void 0 ? void 0 : _options$__autocomple.userAgents) || [])[0]) === null || _ === void 0 ? void 0 : _.segment;\n var extraOptions = optionsKey ? _defineProperty({}, optionsKey, Object.keys(((_options$__autocomple2 = options.__autocomplete_metadata) === null || _options$__autocomple2 === void 0 ? void 0 : _options$__autocomple2.options) || {})) : {};\n return {\n plugins: plugins.map(function (plugin) {\n return {\n name: plugin.name,\n options: Object.keys(plugin.__autocomplete_pluginOptions || [])\n };\n }),\n options: _objectSpread({\n 'autocomplete-core': Object.keys(options)\n }, extraOptions),\n ua: userAgents.concat(((_options$__autocomple3 = options.__autocomplete_metadata) === null || _options$__autocomple3 === void 0 ? void 0 : _options$__autocomple3.userAgents) || [])\n };\n}\nexport function injectMetadata(_ref3) {\n var _environment$navigato, _environment$navigato2;\n var metadata = _ref3.metadata,\n environment = _ref3.environment;\n var isMetadataEnabled = (_environment$navigato = environment.navigator) === null || _environment$navigato === void 0 ? void 0 : (_environment$navigato2 = _environment$navigato.userAgent) === null || _environment$navigato2 === void 0 ? void 0 : _environment$navigato2.includes('Algolia Crawler');\n if (isMetadataEnabled) {\n var metadataContainer = environment.document.createElement('meta');\n var headRef = environment.document.querySelector('head');\n metadataContainer.name = 'algolia:metadata';\n setTimeout(function () {\n metadataContainer.content = JSON.stringify(metadata);\n headRef.appendChild(metadataContainer);\n }, 0);\n }\n}","import { getActiveItem } from './utils';\nexport function getCompletion(_ref) {\n var _getActiveItem;\n var state = _ref.state;\n if (state.isOpen === false || state.activeItemId === null) {\n return null;\n }\n return ((_getActiveItem = getActiveItem(state)) === null || _getActiveItem === void 0 ? void 0 : _getActiveItem.itemInputValue) || null;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { getItemsCount, invariant } from '@algolia/autocomplete-shared';\nimport { getCompletion } from './getCompletion';\nimport { getNextActiveItemId } from './utils';\nexport var stateReducer = function stateReducer(state, action) {\n switch (action.type) {\n case 'setActiveItemId':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'setQuery':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n query: action.payload,\n completion: null\n });\n }\n case 'setCollections':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n collections: action.payload\n });\n }\n case 'setIsOpen':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: action.payload\n });\n }\n case 'setStatus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n status: action.payload\n });\n }\n case 'setContext':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n context: _objectSpread(_objectSpread({}, state.context), action.payload)\n });\n }\n case 'ArrowDown':\n {\n var nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload.hasOwnProperty('nextActiveItemId') ? action.payload.nextActiveItemId : getNextActiveItemId(1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, nextState), {}, {\n completion: getCompletion({\n state: nextState\n })\n });\n }\n case 'ArrowUp':\n {\n var _nextState = _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: getNextActiveItemId(-1, state.activeItemId, getItemsCount(state), action.props.defaultActiveItemId)\n });\n return _objectSpread(_objectSpread({}, _nextState), {}, {\n completion: getCompletion({\n state: _nextState\n })\n });\n }\n case 'Escape':\n {\n if (state.isOpen) {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n completion: null\n });\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n query: '',\n status: 'idle',\n collections: []\n });\n }\n case 'submit':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: null,\n isOpen: false,\n status: 'idle'\n });\n }\n case 'reset':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId:\n // Since we open the panel on reset when openOnFocus=true\n // we need to restore the highlighted index to the defaultActiveItemId. (DocSearch use-case)\n\n // Since we close the panel when openOnFocus=false\n // we lose track of the highlighted index. (Query-suggestions use-case)\n action.props.openOnFocus === true ? action.props.defaultActiveItemId : null,\n status: 'idle',\n completion: null,\n query: ''\n });\n }\n case 'focus':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId,\n isOpen: (action.props.openOnFocus || Boolean(state.query)) && action.props.shouldPanelOpen({\n state: state\n })\n });\n }\n case 'blur':\n {\n if (action.props.debug) {\n return state;\n }\n return _objectSpread(_objectSpread({}, state), {}, {\n isOpen: false,\n activeItemId: null\n });\n }\n case 'mousemove':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.payload\n });\n }\n case 'mouseleave':\n {\n return _objectSpread(_objectSpread({}, state), {}, {\n activeItemId: action.props.defaultActiveItemId\n });\n }\n default:\n invariant(false, \"The reducer action \".concat(JSON.stringify(action.type), \" is not supported.\"));\n return state;\n }\n};","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { createAlgoliaInsightsPlugin } from '@algolia/autocomplete-plugin-algolia-insights';\nimport { checkOptions } from './checkOptions';\nimport { createStore } from './createStore';\nimport { getAutocompleteSetters } from './getAutocompleteSetters';\nimport { getDefaultProps } from './getDefaultProps';\nimport { getPropGetters } from './getPropGetters';\nimport { getMetadata, injectMetadata } from './metadata';\nimport { onInput } from './onInput';\nimport { stateReducer } from './stateReducer';\nexport function createAutocomplete(options) {\n checkOptions(options);\n var subscribers = [];\n var props = getDefaultProps(options, subscribers);\n var store = createStore(stateReducer, props, onStoreStateChange);\n var setters = getAutocompleteSetters({\n store: store\n });\n var propGetters = getPropGetters(_objectSpread({\n props: props,\n refresh: refresh,\n store: store,\n navigator: props.navigator\n }, setters));\n function onStoreStateChange(_ref) {\n var _state$context, _state$context$algoli;\n var prevState = _ref.prevState,\n state = _ref.state;\n props.onStateChange(_objectSpread({\n prevState: prevState,\n state: state,\n refresh: refresh,\n navigator: props.navigator\n }, setters));\n if (!isAlgoliaInsightsPluginEnabled() && (_state$context = state.context) !== null && _state$context !== void 0 && (_state$context$algoli = _state$context.algoliaInsightsPlugin) !== null && _state$context$algoli !== void 0 && _state$context$algoli.__automaticInsights && props.insights !== false) {\n var plugin = createAlgoliaInsightsPlugin({\n __autocomplete_clickAnalytics: false\n });\n props.plugins.push(plugin);\n subscribePlugins([plugin]);\n }\n }\n function refresh() {\n return onInput(_objectSpread({\n event: new Event('input'),\n nextState: {\n isOpen: store.getState().isOpen\n },\n props: props,\n navigator: props.navigator,\n query: store.getState().query,\n refresh: refresh,\n store: store\n }, setters));\n }\n function subscribePlugins(plugins) {\n plugins.forEach(function (plugin) {\n var _plugin$subscribe;\n return (_plugin$subscribe = plugin.subscribe) === null || _plugin$subscribe === void 0 ? void 0 : _plugin$subscribe.call(plugin, _objectSpread(_objectSpread({}, setters), {}, {\n navigator: props.navigator,\n refresh: refresh,\n onSelect: function onSelect(fn) {\n subscribers.push({\n onSelect: fn\n });\n },\n onActive: function onActive(fn) {\n subscribers.push({\n onActive: fn\n });\n },\n onResolve: function onResolve(fn) {\n subscribers.push({\n onResolve: fn\n });\n }\n }));\n });\n }\n function isAlgoliaInsightsPluginEnabled() {\n return props.plugins.some(function (plugin) {\n return plugin.name === 'aa.algoliaInsightsPlugin';\n });\n }\n if (props.insights && !isAlgoliaInsightsPluginEnabled()) {\n var insightsParams = typeof props.insights === 'boolean' ? {} : props.insights;\n props.plugins.push(createAlgoliaInsightsPlugin(insightsParams));\n }\n subscribePlugins(props.plugins);\n injectMetadata({\n metadata: getMetadata({\n plugins: props.plugins,\n options: options\n }),\n environment: props.environment\n });\n return _objectSpread(_objectSpread({\n refresh: refresh,\n navigator: props.navigator\n }, propGetters), setters);\n}","var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e=\"\"},a=0;a\"===t?(r=1,e=\"\"):e=t+e[0]:u?t===u?u=\"\":e+=t:'\"'===t||\"'\"===t?u=t:\">\"===t?(p(),r=1):r&&(\"=\"===t?(r=5,s=e,e=\"\"):\"/\"===t&&(r<5||\">\"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):\" \"===t||\"\\t\"===t||\"\\n\"===t||\"\\r\"===t?(p(),r=2):e+=t),3===r&&\"!--\"===e&&(r=4,h=h[0])}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]}\n","import { AutocompleteEnvironment } from '@algolia/autocomplete-core';\n\nimport { AutocompleteElement } from '../types/AutocompleteElement';\n\nexport const ClearIcon: AutocompleteElement<\n { environment: AutocompleteEnvironment },\n SVGSVGElement\n> = ({ environment }) => {\n const element = environment.document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'svg'\n );\n element.setAttribute('class', 'aa-ClearIcon');\n element.setAttribute('viewBox', '0 0 24 24');\n element.setAttribute('width', '18');\n element.setAttribute('height', '18');\n element.setAttribute('fill', 'currentColor');\n\n const path = environment.document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'path'\n );\n path.setAttribute(\n 'd',\n 'M5.293 6.707l5.293 5.293-5.293 5.293c-0.391 0.391-0.391 1.024 0 1.414s1.024 0.391 1.414 0l5.293-5.293 5.293 5.293c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414l-5.293-5.293 5.293-5.293c0.391-0.391 0.391-1.024 0-1.414s-1.024-0.391-1.414 0l-5.293 5.293-5.293-5.293c-0.391-0.391-1.024-0.391-1.414 0s-0.391 1.024 0 1.414z'\n );\n\n element.appendChild(path);\n\n return element;\n};\n","import { AutocompleteEnvironment } from '@algolia/autocomplete-core';\nimport { invariant } from '@algolia/autocomplete-shared';\n\nexport function getHTMLElement(\n environment: AutocompleteEnvironment,\n value: string | HTMLElement\n): HTMLElement {\n if (typeof value === 'string') {\n const element = environment.document.querySelector(value);\n\n invariant(\n element !== null,\n `The element ${JSON.stringify(value)} is not in the document.`\n );\n\n return element!;\n }\n\n return value;\n}\n","import { AutocompleteClassNames } from '../types';\n\nexport function mergeClassNames(\n ...values: Array>\n) {\n return values.reduce((acc, current) => {\n Object.keys(current).forEach((key) => {\n const accValue = acc[key];\n const currentValue = current[key];\n\n if (accValue !== currentValue) {\n acc[key] = [accValue, currentValue].filter(Boolean).join(' ');\n }\n });\n\n return acc;\n }, {});\n}\n","const isPlainObject = (value: unknown) =>\n value &&\n typeof value === 'object' &&\n Object.prototype.toString.call(value) === '[object Object]';\n\nexport function mergeDeep(...values: any[]) {\n return values.reduce((acc, current) => {\n Object.keys(current).forEach((key) => {\n const accValue = acc[key];\n const currentValue = current[key];\n\n if (Array.isArray(accValue) && Array.isArray(currentValue)) {\n acc[key] = accValue.concat(...currentValue);\n } else if (isPlainObject(accValue) && isPlainObject(currentValue)) {\n acc[key] = mergeDeep(accValue, currentValue);\n } else {\n acc[key] = currentValue;\n }\n });\n\n return acc;\n }, {});\n}\n","export function pickBy(\n obj: Record,\n predicate: (value: { key: string; value: TValue }) => boolean\n) {\n return Object.entries(obj).reduce>(\n (acc, [key, value]) => {\n if (predicate({ key, value })) {\n return { ...acc, [key]: value };\n }\n\n return acc;\n },\n {}\n );\n}\n","/* eslint-disable */\n\n/**\n * Touch-specific event aliases\n *\n * See https://w3c.github.io/touch-events/#extensions-to-the-globaleventhandlers-mixin\n */\nconst TOUCH_EVENTS_ALIASES = [\n 'ontouchstart',\n 'ontouchend',\n 'ontouchmove',\n 'ontouchcancel',\n];\n\n/*\n * Taken from Preact\n *\n * See https://github.com/preactjs/preact/blob/6ab49d9020740127577bf4af66bf63f4af7f9fee/src/diff/props.js#L58-L151\n */\n\nfunction setStyle(style: object, key: string, value: any) {\n if (value === null) {\n style[key] = '';\n } else if (typeof value !== 'number') {\n style[key] = value;\n } else {\n style[key] = value + 'px';\n }\n}\n\n/**\n * Proxy an event to hooked event handlers\n */\nfunction eventProxy(this: any, event: Event) {\n this._listeners[event.type](event);\n}\n\n/**\n * Set a property value on a DOM node\n */\nexport function setProperty(dom: HTMLElement, name: string, value: any) {\n let useCapture: boolean;\n let nameLower: string;\n let oldValue = dom[name];\n\n if (name === 'style') {\n if (typeof value == 'string') {\n (dom as any).style = value;\n } else {\n if (value === null) {\n (dom as any).style = '';\n } else {\n for (name in value) {\n if (!oldValue || value[name] !== oldValue[name]) {\n setStyle(dom.style, name, value[name]);\n }\n }\n }\n }\n }\n // Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n else if (name[0] === 'o' && name[1] === 'n') {\n useCapture = name !== (name = name.replace(/Capture$/, ''));\n nameLower = name.toLowerCase();\n if (nameLower in dom || TOUCH_EVENTS_ALIASES.includes(nameLower))\n name = nameLower;\n name = name.slice(2);\n\n if (!(dom as any)._listeners) (dom as any)._listeners = {};\n (dom as any)._listeners[name] = value;\n\n if (value) {\n if (!oldValue) dom.addEventListener(name, eventProxy, useCapture);\n } else {\n dom.removeEventListener(name, eventProxy, useCapture);\n }\n } else if (\n name !== 'list' &&\n name !== 'tagName' &&\n // HTMLButtonElement.form and HTMLInputElement.form are read-only but can be set using\n // setAttribute\n name !== 'form' &&\n name !== 'type' &&\n name !== 'size' &&\n name !== 'download' &&\n name !== 'href' &&\n name in dom\n ) {\n dom[name] = value == null ? '' : value;\n } else if (typeof value != 'function' && name !== 'dangerouslySetInnerHTML') {\n if (\n value == null ||\n (value === false &&\n // ARIA-attributes have a different notion of boolean values.\n // The value `false` is different from the attribute not\n // existing on the DOM, so we can't remove it. For non-boolean\n // ARIA-attributes we could treat false as a removal, but the\n // amount of exceptions would cost us too many bytes. On top of\n // that other VDOM frameworks also always stringify `false`.\n !/^ar/.test(name))\n ) {\n dom.removeAttribute(name);\n } else {\n dom.setAttribute(name, value);\n }\n }\n}\n\nfunction getNormalizedName(name: string): string {\n switch (name) {\n case 'onChange':\n return 'onInput';\n // see: https://github.com/preactjs/preact/issues/1978\n case 'onCompositionEnd':\n return 'oncompositionend';\n default:\n return name;\n }\n}\n\nexport function setProperties(dom: HTMLElement, props: object): void {\n for (const name in props) {\n setProperty(dom, getNormalizedName(name), props[name]);\n }\n}\n\nexport function setPropertiesWithoutEvents(\n dom: HTMLElement,\n props: object\n): void {\n for (const name in props) {\n if (!(name[0] === 'o' && name[1] === 'n')) {\n setProperty(dom, getNormalizedName(name), props[name]);\n }\n }\n}\n","import { AutocompleteEnvironment } from '@algolia/autocomplete-core';\n\nimport { setProperties } from './utils';\n\ntype CreateDomElementProps = Record & {\n children?: Node[];\n};\n\nexport function getCreateDomElement(environment: AutocompleteEnvironment) {\n return function createDomElement(\n tagName: KParam,\n { children = [], ...props }: CreateDomElementProps\n ): HTMLElementTagNameMap[KParam] {\n const element = environment.document.createElement(tagName);\n setProperties(element, props);\n element.append(...children);\n\n return element;\n };\n}\n","import { AutocompleteEnvironment } from '@algolia/autocomplete-core';\n\nimport { AutocompleteElement } from '../types/AutocompleteElement';\n\nexport const LoadingIcon: AutocompleteElement<\n { environment: AutocompleteEnvironment },\n SVGSVGElement\n> = ({ environment }) => {\n const element = environment.document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'svg'\n );\n element.setAttribute('class', 'aa-LoadingIcon');\n element.setAttribute('viewBox', '0 0 100 100');\n element.setAttribute('width', '20');\n element.setAttribute('height', '20');\n\n element.innerHTML = `\n \n`;\n\n return element;\n};\n","import { AutocompleteEnvironment } from '@algolia/autocomplete-core';\n\nimport { AutocompleteElement } from '../types/AutocompleteElement';\n\nexport const SearchIcon: AutocompleteElement<\n { environment: AutocompleteEnvironment },\n SVGSVGElement\n> = ({ environment }) => {\n const element = environment.document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'svg'\n );\n element.setAttribute('class', 'aa-SubmitIcon');\n element.setAttribute('viewBox', '0 0 24 24');\n element.setAttribute('width', '20');\n element.setAttribute('height', '20');\n element.setAttribute('fill', 'currentColor');\n\n const path = environment.document.createElementNS(\n 'http://www.w3.org/2000/svg',\n 'path'\n );\n path.setAttribute(\n 'd',\n 'M16.041 15.856c-0.034 0.026-0.067 0.055-0.099 0.087s-0.060 0.064-0.087 0.099c-1.258 1.213-2.969 1.958-4.855 1.958-1.933 0-3.682-0.782-4.95-2.050s-2.050-3.017-2.050-4.95 0.782-3.682 2.050-4.95 3.017-2.050 4.95-2.050 3.682 0.782 4.95 2.050 2.050 3.017 2.050 4.95c0 1.886-0.745 3.597-1.959 4.856zM21.707 20.293l-3.675-3.675c1.231-1.54 1.968-3.493 1.968-5.618 0-2.485-1.008-4.736-2.636-6.364s-3.879-2.636-6.364-2.636-4.736 1.008-6.364 2.636-2.636 3.879-2.636 6.364 1.008 4.736 2.636 6.364 3.879 2.636 6.364 2.636c2.125 0 4.078-0.737 5.618-1.968l3.675 3.675c0.391 0.391 1.024 0.391 1.414 0s0.391-1.024 0-1.414z'\n );\n\n element.appendChild(path);\n\n return element;\n};\n","import {\n AutocompleteApi as AutocompleteCoreApi,\n AutocompleteEnvironment,\n AutocompleteScopeApi,\n BaseItem,\n} from '@algolia/autocomplete-core';\n\nimport { ClearIcon, Input, LoadingIcon, SearchIcon } from './elements';\nimport { getCreateDomElement } from './getCreateDomElement';\nimport {\n AutocompleteClassNames,\n AutocompleteDom,\n AutocompletePropGetters,\n AutocompleteState,\n AutocompleteTranslations,\n} from './types';\nimport { setProperties } from './utils';\n\ntype CreateDomProps = {\n autocomplete: AutocompleteCoreApi;\n autocompleteScopeApi: AutocompleteScopeApi;\n classNames: AutocompleteClassNames;\n environment: AutocompleteEnvironment;\n isDetached: boolean;\n placeholder?: string;\n propGetters: AutocompletePropGetters;\n setIsModalOpen(value: boolean): void;\n state: AutocompleteState;\n translations: AutocompleteTranslations;\n};\n\nexport function createAutocompleteDom({\n autocomplete,\n autocompleteScopeApi,\n classNames,\n environment,\n isDetached,\n placeholder = 'Search',\n propGetters,\n setIsModalOpen,\n state,\n translations,\n}: CreateDomProps): AutocompleteDom {\n const createDomElement = getCreateDomElement(environment);\n\n const rootProps = propGetters.getRootProps({\n state,\n props: autocomplete.getRootProps({}),\n ...autocompleteScopeApi,\n });\n const root = createDomElement('div', {\n class: classNames.root,\n ...rootProps,\n });\n const detachedContainer = createDomElement('div', {\n class: classNames.detachedContainer,\n onMouseDown(event: MouseEvent) {\n event.stopPropagation();\n },\n });\n const detachedOverlay = createDomElement('div', {\n class: classNames.detachedOverlay,\n children: [detachedContainer],\n onMouseDown() {\n setIsModalOpen(false);\n autocomplete.setIsOpen(false);\n },\n });\n\n const labelProps = propGetters.getLabelProps({\n state,\n props: autocomplete.getLabelProps({}),\n ...autocompleteScopeApi,\n });\n const submitButton = createDomElement('button', {\n class: classNames.submitButton,\n type: 'submit',\n title: translations.submitButtonTitle,\n children: [SearchIcon({ environment })],\n });\n // @MAJOR Remove the label wrapper for the submit button.\n // The submit button is sufficient for accessibility purposes, and\n // wrapping it with the label actually makes it less accessible (see CR-6077).\n const label = createDomElement('label', {\n class: classNames.label,\n children: [submitButton],\n ariaLabel: translations.submitButtonTitle,\n ...labelProps,\n });\n const clearButton = createDomElement('button', {\n class: classNames.clearButton,\n type: 'reset',\n title: translations.clearButtonTitle,\n children: [ClearIcon({ environment })],\n });\n const loadingIndicator = createDomElement('div', {\n class: classNames.loadingIndicator,\n children: [LoadingIcon({ environment })],\n });\n\n const input = Input({\n class: classNames.input,\n environment,\n state,\n getInputProps: propGetters.getInputProps,\n getInputPropsCore: autocomplete.getInputProps,\n autocompleteScopeApi,\n isDetached,\n });\n\n const inputWrapperPrefix = createDomElement('div', {\n class: classNames.inputWrapperPrefix,\n children: [label, loadingIndicator],\n });\n const inputWrapperSuffix = createDomElement('div', {\n class: classNames.inputWrapperSuffix,\n children: [clearButton],\n });\n const inputWrapper = createDomElement('div', {\n class: classNames.inputWrapper,\n children: [input],\n });\n\n const formProps = propGetters.getFormProps({\n state,\n props: autocomplete.getFormProps({ inputElement: input }),\n ...autocompleteScopeApi,\n });\n const form = createDomElement('form', {\n class: classNames.form,\n children: [inputWrapperPrefix, inputWrapper, inputWrapperSuffix],\n ...formProps,\n });\n const panelProps = propGetters.getPanelProps({\n state,\n props: autocomplete.getPanelProps({}),\n ...autocompleteScopeApi,\n });\n const panel = createDomElement('div', {\n class: classNames.panel,\n ...panelProps,\n });\n\n const detachedSearchButtonQuery = createDomElement('div', {\n class: classNames.detachedSearchButtonQuery,\n textContent: state.query,\n });\n const detachedSearchButtonPlaceholder = createDomElement('div', {\n class: classNames.detachedSearchButtonPlaceholder,\n hidden: Boolean(state.query),\n textContent: placeholder,\n });\n\n if (__TEST__) {\n setProperties(panel, {\n 'data-testid': 'panel',\n });\n }\n\n if (isDetached) {\n const detachedSearchButtonIcon = createDomElement('div', {\n class: classNames.detachedSearchButtonIcon,\n children: [SearchIcon({ environment })],\n });\n const detachedSearchButton = createDomElement('button', {\n type: 'button',\n class: classNames.detachedSearchButton,\n title: translations.detachedSearchButtonTitle,\n id: labelProps.id,\n onClick() {\n setIsModalOpen(true);\n },\n children: [\n detachedSearchButtonIcon,\n detachedSearchButtonPlaceholder,\n detachedSearchButtonQuery,\n ],\n });\n const detachedCancelButton = createDomElement('button', {\n type: 'button',\n class: classNames.detachedCancelButton,\n textContent: translations.detachedCancelButtonText,\n // Prevent `onTouchStart` from closing the panel\n // since it should be initiated by `onClick` only\n onTouchStart(event: TouchEvent) {\n event.stopPropagation();\n },\n onClick() {\n autocomplete.setIsOpen(false);\n setIsModalOpen(false);\n },\n });\n const detachedFormContainer = createDomElement('div', {\n class: classNames.detachedFormContainer,\n children: [form, detachedCancelButton],\n });\n\n detachedContainer.appendChild(detachedFormContainer);\n root.appendChild(detachedSearchButton);\n } else {\n root.appendChild(form);\n }\n\n return {\n detachedContainer,\n detachedOverlay,\n detachedSearchButtonQuery,\n detachedSearchButtonPlaceholder,\n inputWrapper,\n input,\n root,\n form,\n label,\n submitButton,\n clearButton,\n loadingIndicator,\n panel,\n };\n}\n","import {\n AutocompleteApi as AutocompleteCoreApi,\n AutocompleteEnvironment,\n AutocompleteScopeApi,\n} from '@algolia/autocomplete-core';\n\nimport { getCreateDomElement } from '../getCreateDomElement';\nimport { AutocompletePropGetters, AutocompleteState } from '../types';\nimport { AutocompleteElement } from '../types/AutocompleteElement';\nimport { setProperties } from '../utils';\n\ntype InputProps = {\n autocompleteScopeApi: AutocompleteScopeApi;\n environment: AutocompleteEnvironment;\n getInputProps: AutocompletePropGetters['getInputProps'];\n getInputPropsCore: AutocompleteCoreApi['getInputProps'];\n isDetached: boolean;\n state: AutocompleteState;\n};\n\nexport const Input: AutocompleteElement = ({\n autocompleteScopeApi,\n environment,\n classNames,\n getInputProps,\n getInputPropsCore,\n isDetached,\n state,\n ...props\n}) => {\n const createDomElement = getCreateDomElement(environment);\n const element = createDomElement('input', props);\n const inputProps = getInputProps({\n state,\n props: getInputPropsCore({ inputElement: element }),\n inputElement: element,\n ...autocompleteScopeApi,\n });\n\n setProperties(element, {\n ...inputProps,\n onKeyDown(event: KeyboardEvent) {\n // In detached mode we don't want to close the panel when hitting `Tab`.\n if (isDetached && event.key === 'Tab') {\n return;\n }\n\n inputProps.onKeyDown(event);\n },\n });\n\n return element;\n};\n","var n,l,u,i,t,r,o,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,i){var t,r,o,f={};for(o in u)\"key\"==o?t=u[o]:\"ref\"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function d(){return{current:null}}function _(n){return n.children}function k(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t.sort(f));w.__r=0}function x(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,g,m,w=i&&i.__k||s,x=w.length;for(u.__k=[],h=0;h0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=w[h])||y&&d.key==y.key&&d.type===y.type)w[h]=void 0;else for(v=0;v=0;l--)if((u=n.__k[l])&&(i=$(u)))return i;return null}function H(n,l,u,i,t){var r;for(r in u)\"children\"===r||\"key\"===r||r in l||T(n,r,null,u[r],i);for(r in l)t&&\"function\"!=typeof l[r]||\"children\"===r||\"key\"===r||\"value\"===r||\"checked\"===r||u[r]===l[r]||T(n,r,l[r],u[r],i)}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,i,t){var r;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])r=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?z:j,r):n.removeEventListener(l,r?z:j,r);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u))}}function j(n){return this.l[n.type+!1](l.event?l.event(n):n)}function z(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,b,g,m,w,A,P,C,$,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof I){if(g=u.props,m=(s=I.contextType)&&t[s.__c],w=s?m?m.props.value:s.__:t,i.__c?b=(a=u.__c=i.__c).__=a.__E:(\"prototype\"in I&&I.prototype.render?u.__c=a=new I(g,w):(u.__c=a=new k(g,w),a.constructor=I,a.render=q),m&&m.sub(a),a.props=g,a.state||(a.state={}),a.context=w,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,I.getDerivedStateFromProps(g,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==I.getDerivedStateFromProps&&g!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(g,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(g,a.__s,w)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=g,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),A=0;A2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,m(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),m(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},k.prototype.render=_,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},w.__r=0,e=0;export{k as Component,_ as Fragment,E as cloneElement,F as createContext,y as createElement,d as createRef,y as h,D as hydrate,i as isValidElement,l as options,B as render,P as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","export var HIGHLIGHT_PRE_TAG = '__aa-highlight__';\nexport var HIGHLIGHT_POST_TAG = '__/aa-highlight__';","import { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\n/**\n * Creates a data structure that allows to concatenate similar highlighting\n * parts in a single value.\n */\nfunction createAttributeSet() {\n var initialValue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var value = initialValue;\n return {\n get: function get() {\n return value;\n },\n add: function add(part) {\n var lastPart = value[value.length - 1];\n if ((lastPart === null || lastPart === void 0 ? void 0 : lastPart.isHighlighted) === part.isHighlighted) {\n value[value.length - 1] = {\n value: lastPart.value + part.value,\n isHighlighted: lastPart.isHighlighted\n };\n } else {\n value.push(part);\n }\n }\n };\n}\nexport function parseAttribute(_ref) {\n var highlightedValue = _ref.highlightedValue;\n var preTagParts = highlightedValue.split(HIGHLIGHT_PRE_TAG);\n var firstValue = preTagParts.shift();\n var parts = createAttributeSet(firstValue ? [{\n value: firstValue,\n isHighlighted: false\n }] : []);\n preTagParts.forEach(function (part) {\n var postTagParts = part.split(HIGHLIGHT_POST_TAG);\n parts.add({\n value: postTagParts[0],\n isHighlighted: true\n });\n if (postTagParts[1] !== '') {\n parts.add({\n value: postTagParts[1],\n isHighlighted: false\n });\n }\n });\n return parts.get();\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\nimport { parseAttribute } from './parseAttribute';\nexport function parseAlgoliaHitHighlight(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute;\n var path = Array.isArray(attribute) ? attribute : [attribute];\n var highlightedValue = getAttributeValueByPath(hit, ['_highlightResult'].concat(_toConsumableArray(path), ['value']));\n if (typeof highlightedValue !== 'string') {\n process.env.NODE_ENV !== 'production' ? warn(false, \"The attribute \\\"\".concat(path.join('.'), \"\\\" described by the path \").concat(JSON.stringify(path), \" does not exist on the hit. Did you set it in `attributesToHighlight`?\") + '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToHighlight/') : void 0;\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n return parseAttribute({\n highlightedValue: highlightedValue\n });\n}","var htmlEscapes = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n};\nvar hasAlphanumeric = new RegExp(/\\w/i);\nvar regexEscapedHtml = /&(amp|quot|lt|gt|#39);/g;\nvar regexHasEscapedHtml = RegExp(regexEscapedHtml.source);\nfunction unescape(value) {\n return value && regexHasEscapedHtml.test(value) ? value.replace(regexEscapedHtml, function (character) {\n return htmlEscapes[character];\n }) : value;\n}\nexport function isPartHighlighted(parts, i) {\n var _parts, _parts2;\n var current = parts[i];\n var isNextHighlighted = ((_parts = parts[i + 1]) === null || _parts === void 0 ? void 0 : _parts.isHighlighted) || true;\n var isPreviousHighlighted = ((_parts2 = parts[i - 1]) === null || _parts2 === void 0 ? void 0 : _parts2.isHighlighted) || true;\n if (!hasAlphanumeric.test(unescape(current.value)) && isPreviousHighlighted === isNextHighlighted) {\n return isPreviousHighlighted;\n }\n return current.isHighlighted;\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nimport { isPartHighlighted } from './isPartHighlighted';\nexport function reverseHighlightedParts(parts) {\n // We don't want to highlight the whole word when no parts match.\n if (!parts.some(function (part) {\n return part.isHighlighted;\n })) {\n return parts.map(function (part) {\n return _objectSpread(_objectSpread({}, part), {}, {\n isHighlighted: false\n });\n });\n }\n return parts.map(function (part, i) {\n return _objectSpread(_objectSpread({}, part), {}, {\n isHighlighted: !isPartHighlighted(parts, i)\n });\n });\n}","function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { getAttributeValueByPath, warn } from '@algolia/autocomplete-shared';\nimport { parseAttribute } from './parseAttribute';\nexport function parseAlgoliaHitSnippet(_ref) {\n var hit = _ref.hit,\n attribute = _ref.attribute;\n var path = Array.isArray(attribute) ? attribute : [attribute];\n var highlightedValue = getAttributeValueByPath(hit, ['_snippetResult'].concat(_toConsumableArray(path), ['value']));\n if (typeof highlightedValue !== 'string') {\n process.env.NODE_ENV !== 'production' ? warn(false, \"The attribute \\\"\".concat(path.join('.'), \"\\\" described by the path \").concat(JSON.stringify(path), \" does not exist on the hit. Did you set it in `attributesToSnippet`?\") + '\\nSee https://www.algolia.com/doc/api-reference/api-parameters/attributesToSnippet/') : void 0;\n highlightedValue = getAttributeValueByPath(hit, path) || '';\n }\n return parseAttribute({\n highlightedValue: highlightedValue\n });\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nexport function createRequester(fetcher, requesterId) {\n function execute(fetcherParams) {\n return fetcher({\n searchClient: fetcherParams.searchClient,\n queries: fetcherParams.requests.map(function (x) {\n return x.query;\n })\n }).then(function (responses) {\n return responses.map(function (response, index) {\n var _fetcherParams$reques = fetcherParams.requests[index],\n sourceId = _fetcherParams$reques.sourceId,\n transformResponse = _fetcherParams$reques.transformResponse;\n return {\n items: response,\n sourceId: sourceId,\n transformResponse: transformResponse\n };\n });\n });\n }\n return function createSpecifiedRequester(requesterParams) {\n return function requester(requestParams) {\n return _objectSpread(_objectSpread({\n requesterId: requesterId,\n execute: execute\n }, requesterParams), requestParams);\n };\n };\n}","function _typeof(obj) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }, _typeof(obj); }\nvar _excluded = [\"params\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nimport { userAgents as coreUserAgents, invariant } from '@algolia/autocomplete-shared';\nimport { HIGHLIGHT_PRE_TAG, HIGHLIGHT_POST_TAG } from '../constants';\nimport { getAppIdAndApiKey } from '../utils';\nexport function fetchAlgoliaResults(_ref) {\n var searchClient = _ref.searchClient,\n queries = _ref.queries,\n _ref$userAgents = _ref.userAgents,\n userAgents = _ref$userAgents === void 0 ? [] : _ref$userAgents;\n if (typeof searchClient.addAlgoliaAgent === 'function') {\n var algoliaAgents = [].concat(_toConsumableArray(coreUserAgents), _toConsumableArray(userAgents));\n algoliaAgents.forEach(function (_ref2) {\n var segment = _ref2.segment,\n version = _ref2.version;\n searchClient.addAlgoliaAgent(segment, version);\n });\n }\n var _getAppIdAndApiKey = getAppIdAndApiKey(searchClient),\n appId = _getAppIdAndApiKey.appId,\n apiKey = _getAppIdAndApiKey.apiKey;\n invariant(Boolean(appId), 'The Algolia `appId` was not accessible from the searchClient passed.');\n invariant(Boolean(apiKey), 'The Algolia `apiKey` was not accessible from the searchClient passed.');\n return searchClient.search(queries.map(function (searchParameters) {\n var params = searchParameters.params,\n headers = _objectWithoutProperties(searchParameters, _excluded);\n return _objectSpread(_objectSpread({}, headers), {}, {\n params: _objectSpread({\n hitsPerPage: 5,\n highlightPreTag: HIGHLIGHT_PRE_TAG,\n highlightPostTag: HIGHLIGHT_POST_TAG\n }, params)\n });\n })).then(function (response) {\n return response.results.map(function (result, resultIndex) {\n var _result$hits;\n return _objectSpread(_objectSpread({}, result), {}, {\n hits: (_result$hits = result.hits) === null || _result$hits === void 0 ? void 0 : _result$hits.map(function (hit) {\n return _objectSpread(_objectSpread({}, hit), {}, {\n // Bring support for the Insights plugin.\n __autocomplete_indexName: result.index || queries[resultIndex].indexName,\n __autocomplete_queryID: result.queryID,\n __autocomplete_algoliaCredentials: {\n appId: appId,\n apiKey: apiKey\n }\n });\n })\n });\n });\n });\n}","import { parseAlgoliaHitHighlight } from '@algolia/autocomplete-preset-algolia';\n\nimport { AutocompleteRenderer, HighlightHitParams, VNode } from '../types';\n\nexport function createHighlightComponent({\n createElement,\n Fragment,\n}: AutocompleteRenderer) {\n function Highlight({\n hit,\n attribute,\n tagName = 'mark',\n }: HighlightHitParams): VNode {\n return createElement(\n Fragment,\n {},\n parseAlgoliaHitHighlight({ hit, attribute }).map((x, index) =>\n x.isHighlighted\n ? createElement(tagName, { key: index }, x.value)\n : x.value\n )\n );\n }\n\n Highlight.__autocomplete_componentName = 'Highlight';\n\n return Highlight;\n}\n","import { parseAlgoliaHitReverseHighlight } from '@algolia/autocomplete-preset-algolia';\n\nimport { AutocompleteRenderer, HighlightHitParams, VNode } from '../types';\n\nexport function createReverseHighlightComponent({\n createElement,\n Fragment,\n}: AutocompleteRenderer) {\n function ReverseHighlight({\n hit,\n attribute,\n tagName = 'mark',\n }: HighlightHitParams): VNode {\n return createElement(\n Fragment,\n {},\n parseAlgoliaHitReverseHighlight({\n hit,\n attribute,\n }).map((x, index) =>\n x.isHighlighted\n ? createElement(tagName, { key: index }, x.value)\n : x.value\n )\n );\n }\n\n ReverseHighlight.__autocomplete_componentName = 'ReverseHighlight';\n\n return ReverseHighlight;\n}\n","import { parseAlgoliaHitHighlight } from './parseAlgoliaHitHighlight';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\nexport function parseAlgoliaHitReverseHighlight(props) {\n return reverseHighlightedParts(parseAlgoliaHitHighlight(props));\n}","import { parseAlgoliaHitReverseSnippet } from '@algolia/autocomplete-preset-algolia';\n\nimport { AutocompleteRenderer, HighlightHitParams, VNode } from '../types';\n\nexport function createReverseSnippetComponent({\n createElement,\n Fragment,\n}: AutocompleteRenderer) {\n function ReverseSnippet({\n hit,\n attribute,\n tagName = 'mark',\n }: HighlightHitParams): VNode {\n return createElement(\n Fragment,\n {},\n parseAlgoliaHitReverseSnippet({\n hit,\n attribute,\n }).map((x, index) =>\n x.isHighlighted\n ? createElement(tagName, { key: index }, x.value)\n : x.value\n )\n );\n }\n\n ReverseSnippet.__autocomplete_componentName = 'ReverseSnippet';\n\n return ReverseSnippet;\n}\n","import { parseAlgoliaHitSnippet } from './parseAlgoliaHitSnippet';\nimport { reverseHighlightedParts } from './reverseHighlightedParts';\nexport function parseAlgoliaHitReverseSnippet(props) {\n return reverseHighlightedParts(parseAlgoliaHitSnippet(props));\n}","import { parseAlgoliaHitSnippet } from '@algolia/autocomplete-preset-algolia';\n\nimport { AutocompleteRenderer, HighlightHitParams, VNode } from '../types';\n\nexport function createSnippetComponent({\n createElement,\n Fragment,\n}: AutocompleteRenderer) {\n function Snippet({\n hit,\n attribute,\n tagName = 'mark',\n }: HighlightHitParams): VNode {\n return createElement(\n Fragment,\n {},\n parseAlgoliaHitSnippet({ hit, attribute }).map((x, index) =>\n x.isHighlighted\n ? createElement(tagName, { key: index }, x.value)\n : x.value\n )\n );\n }\n\n Snippet.__autocomplete_componentName = 'Snippet';\n\n return Snippet;\n}\n","import { AutocompleteEnvironment, BaseItem } from '@algolia/autocomplete-core';\nimport {\n generateAutocompleteId,\n invariant,\n warn,\n} from '@algolia/autocomplete-shared';\nimport {\n createElement as preactCreateElement,\n Fragment as PreactFragment,\n render,\n} from 'preact';\n\nimport {\n createHighlightComponent,\n createReverseHighlightComponent,\n createReverseSnippetComponent,\n createSnippetComponent,\n} from './components';\nimport {\n AutocompleteClassNames,\n AutocompleteComponents,\n AutocompleteOptions,\n AutocompleteRender,\n AutocompleteRenderer,\n AutocompleteTranslations,\n} from './types';\nimport { getHTMLElement, mergeClassNames } from './utils';\n\nconst defaultClassNames: AutocompleteClassNames = {\n clearButton: 'aa-ClearButton',\n detachedCancelButton: 'aa-DetachedCancelButton',\n detachedContainer: 'aa-DetachedContainer',\n detachedFormContainer: 'aa-DetachedFormContainer',\n detachedOverlay: 'aa-DetachedOverlay',\n detachedSearchButton: 'aa-DetachedSearchButton',\n detachedSearchButtonIcon: 'aa-DetachedSearchButtonIcon',\n detachedSearchButtonPlaceholder: 'aa-DetachedSearchButtonPlaceholder',\n detachedSearchButtonQuery: 'aa-DetachedSearchButtonQuery',\n form: 'aa-Form',\n input: 'aa-Input',\n inputWrapper: 'aa-InputWrapper',\n inputWrapperPrefix: 'aa-InputWrapperPrefix',\n inputWrapperSuffix: 'aa-InputWrapperSuffix',\n item: 'aa-Item',\n label: 'aa-Label',\n list: 'aa-List',\n loadingIndicator: 'aa-LoadingIndicator',\n panel: 'aa-Panel',\n panelLayout: 'aa-PanelLayout aa-Panel--scrollable',\n root: 'aa-Autocomplete',\n source: 'aa-Source',\n sourceFooter: 'aa-SourceFooter',\n sourceHeader: 'aa-SourceHeader',\n sourceNoResults: 'aa-SourceNoResults',\n submitButton: 'aa-SubmitButton',\n};\n\nconst defaultRender: AutocompleteRender = ({ children, render }, root) => {\n render(children, root);\n};\n\nconst defaultRenderer: Required = {\n createElement: preactCreateElement,\n Fragment: PreactFragment,\n render,\n};\n\nexport function getDefaultOptions(\n options: AutocompleteOptions\n) {\n const {\n classNames,\n container,\n getEnvironmentProps,\n getFormProps,\n getInputProps,\n getItemProps,\n getLabelProps,\n getListProps,\n getPanelProps,\n getRootProps,\n panelContainer,\n panelPlacement,\n render,\n renderNoResults,\n renderer,\n detachedMediaQuery,\n components,\n translations,\n ...core\n } = options;\n\n /* eslint-disable no-restricted-globals */\n const environment: AutocompleteEnvironment = (\n typeof window !== 'undefined' ? window : {}\n ) as typeof window;\n /* eslint-enable no-restricted-globals */\n const containerElement = getHTMLElement(environment, container);\n\n invariant(\n containerElement.tagName !== 'INPUT',\n 'The `container` option does not support `input` elements. You need to change the container to a `div`.'\n );\n\n warn(\n !(render && renderer && !renderer?.render),\n `You provided the \\`render\\` option but did not provide a \\`renderer.render\\`. Since v1.6.0, you can provide a \\`render\\` function directly in \\`renderer\\`.` +\n `\\nTo get rid of this warning, do any of the following depending on your use case.` +\n \"\\n- If you are using the `render` option only to override Autocomplete's default `render` function, pass the `render` function into `renderer` and remove the `render` option.\" +\n '\\n- If you are using the `render` option to customize the layout, pass your `render` function into `renderer` and use it from the provided parameters of the `render` option.' +\n '\\n- If you are using the `render` option to work with React 18, pass an empty `render` function into `renderer`.' +\n '\\nSee https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-render'\n );\n\n warn(\n !renderer ||\n render ||\n (renderer.Fragment && renderer.createElement && renderer.render),\n `You provided an incomplete \\`renderer\\` (missing: ${[\n !renderer?.createElement && '`renderer.createElement`',\n !renderer?.Fragment && '`renderer.Fragment`',\n !renderer?.render && '`renderer.render`',\n ]\n .filter(Boolean)\n .join(', ')}). This can cause rendering issues.` +\n '\\nSee https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-renderer'\n );\n\n const defaultedRenderer = { ...defaultRenderer, ...renderer };\n\n const defaultComponents: AutocompleteComponents = {\n Highlight: createHighlightComponent(defaultedRenderer),\n ReverseHighlight: createReverseHighlightComponent(defaultedRenderer),\n ReverseSnippet: createReverseSnippetComponent(defaultedRenderer),\n Snippet: createSnippetComponent(defaultedRenderer),\n };\n\n const defaultTranslations: AutocompleteTranslations = {\n clearButtonTitle: 'Clear',\n detachedCancelButtonText: 'Cancel',\n detachedSearchButtonTitle: 'Search',\n submitButtonTitle: 'Submit',\n };\n\n return {\n renderer: {\n classNames: mergeClassNames(\n defaultClassNames,\n classNames ?? {}\n ) as AutocompleteClassNames,\n container: containerElement,\n getEnvironmentProps: getEnvironmentProps ?? (({ props }) => props),\n getFormProps: getFormProps ?? (({ props }) => props),\n getInputProps: getInputProps ?? (({ props }) => props),\n getItemProps: getItemProps ?? (({ props }) => props),\n getLabelProps: getLabelProps ?? (({ props }) => props),\n getListProps: getListProps ?? (({ props }) => props),\n getPanelProps: getPanelProps ?? (({ props }) => props),\n getRootProps: getRootProps ?? (({ props }) => props),\n panelContainer: panelContainer\n ? getHTMLElement(environment, panelContainer)\n : environment.document.body,\n panelPlacement: panelPlacement ?? 'input-wrapper-width',\n render: render ?? defaultRender,\n renderNoResults,\n renderer: defaultedRenderer,\n detachedMediaQuery:\n detachedMediaQuery ??\n getComputedStyle(environment.document.documentElement).getPropertyValue(\n '--aa-detached-media-query'\n ),\n components: {\n // @MAJOR Deal with registering components with the same name as the\n // default ones. We could disallow registering these components by\n // merging the default components second.\n ...defaultComponents,\n ...components,\n },\n translations: {\n ...defaultTranslations,\n ...translations,\n },\n },\n core: {\n ...core,\n id: core.id ?? generateAutocompleteId(),\n environment,\n },\n };\n}\n","import { AutocompleteOptions } from './types';\n\ntype GetPanelPlacementStyleParams = Pick<\n Required>,\n 'panelPlacement' | 'environment'\n> & {\n container: HTMLElement;\n form: HTMLElement;\n};\n\nexport function getPanelPlacementStyle({\n panelPlacement,\n container,\n form,\n environment,\n}: GetPanelPlacementStyleParams) {\n const containerRect = container.getBoundingClientRect();\n // Some browsers have specificities to retrieve the document scroll position.\n // See https://stackoverflow.com/a/28633515/9940315\n const scrollTop =\n (environment.pageYOffset as number) ||\n environment.document.documentElement.scrollTop ||\n environment.document.body.scrollTop ||\n 0;\n const top = scrollTop + containerRect.top + containerRect.height;\n\n switch (panelPlacement) {\n case 'start': {\n return {\n top,\n left: containerRect.left,\n };\n }\n\n case 'end': {\n return {\n top,\n right:\n environment.document.documentElement.clientWidth -\n (containerRect.left + containerRect.width),\n };\n }\n\n case 'full-width': {\n return {\n top,\n left: 0,\n right: 0,\n width: 'unset',\n maxWidth: 'unset',\n };\n }\n\n case 'input-wrapper-width': {\n const formRect = form.getBoundingClientRect();\n\n return {\n top,\n left: formRect.left,\n right:\n environment.document.documentElement.clientWidth -\n (formRect.left + formRect.width),\n width: 'unset',\n maxWidth: 'unset',\n };\n }\n\n default: {\n throw new Error(\n `[Autocomplete] The \\`panelPlacement\\` value ${JSON.stringify(\n panelPlacement\n )} is not valid.`\n );\n }\n }\n}\n","import { version } from '@algolia/autocomplete-shared';\n\nexport const userAgents = [{ segment: 'autocomplete-js', version }];\n","import {\n createRequester,\n fetchAlgoliaResults,\n} from '@algolia/autocomplete-preset-algolia';\n\nimport { userAgents } from '../userAgents';\n\nexport const createAlgoliaRequester = createRequester(\n (params) =>\n fetchAlgoliaResults({\n ...params,\n userAgents,\n }),\n 'algolia'\n);\n","// typed as any, since it accepts the _real_ js clients, not the interface we otherwise expect\nexport function getAppIdAndApiKey(searchClient) {\n var transporter = searchClient.transporter || {};\n var headers = transporter.headers || transporter.baseHeaders || {};\n var queryParameters = transporter.queryParameters || transporter.baseQueryParameters || {};\n var APP_ID = 'x-algolia-application-id';\n var API_KEY = 'x-algolia-api-key';\n var appId = headers[APP_ID] || queryParameters[APP_ID];\n var apiKey = headers[API_KEY] || queryParameters[API_KEY];\n return {\n appId: appId,\n apiKey: apiKey\n };\n}","import { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia results from multiple indices.\n */\nexport const getAlgoliaResults = createAlgoliaRequester({\n transformResponse: (response) => response.hits,\n});\n","import {\n AutocompleteScopeApi,\n BaseItem,\n createAutocomplete,\n} from '@algolia/autocomplete-core';\nimport {\n createRef,\n debounce,\n getItemsCount,\n warn,\n} from '@algolia/autocomplete-shared';\nimport htm from 'htm';\n\nimport { createAutocompleteDom } from './createAutocompleteDom';\nimport { createEffectWrapper } from './createEffectWrapper';\nimport { createReactiveWrapper } from './createReactiveWrapper';\nimport { getDefaultOptions } from './getDefaultOptions';\nimport { getPanelPlacementStyle } from './getPanelPlacementStyle';\nimport { renderPanel, renderSearchBox } from './render';\nimport {\n AutocompleteApi,\n AutocompleteOptions,\n AutocompletePropGetters,\n AutocompleteSource,\n AutocompleteState,\n VNode,\n} from './types';\nimport { userAgents } from './userAgents';\nimport { mergeDeep, pickBy, setProperties } from './utils';\n\nlet instancesCount = 0;\n\nexport function autocomplete(\n options: AutocompleteOptions\n): AutocompleteApi {\n const { runEffect, cleanupEffects, runEffects } = createEffectWrapper();\n const { reactive, runReactives } = createReactiveWrapper();\n\n const hasNoResultsSourceTemplateRef = createRef(false);\n const optionsRef = createRef(options);\n const onStateChangeRef =\n createRef['onStateChange']>(undefined);\n const props = reactive(() => getDefaultOptions(optionsRef.current));\n const isDetached = reactive(\n () =>\n props.value.core.environment.matchMedia(\n props.value.renderer.detachedMediaQuery\n ).matches\n );\n\n const autocomplete = reactive(() =>\n createAutocomplete({\n ...props.value.core,\n onStateChange(params) {\n hasNoResultsSourceTemplateRef.current = params.state.collections.some(\n (collection) =>\n (collection.source as AutocompleteSource).templates.noResults\n );\n onStateChangeRef.current?.(params as any);\n props.value.core.onStateChange?.(params as any);\n },\n shouldPanelOpen:\n optionsRef.current.shouldPanelOpen ||\n (({ state }) => {\n if (isDetached.value) {\n return true;\n }\n\n const hasItems = getItemsCount(state) > 0;\n\n if (!props.value.core.openOnFocus && !state.query) {\n return hasItems;\n }\n\n const hasNoResultsTemplate = Boolean(\n hasNoResultsSourceTemplateRef.current ||\n props.value.renderer.renderNoResults\n );\n\n return (!hasItems && hasNoResultsTemplate) || hasItems;\n }),\n __autocomplete_metadata: {\n userAgents,\n options,\n },\n })\n );\n const lastStateRef = createRef>({\n collections: [],\n completion: null,\n context: {},\n isOpen: false,\n query: '',\n activeItemId: null,\n status: 'idle',\n ...props.value.core.initialState,\n });\n\n const propGetters: AutocompletePropGetters = {\n getEnvironmentProps: props.value.renderer.getEnvironmentProps,\n getFormProps: props.value.renderer.getFormProps,\n getInputProps: props.value.renderer.getInputProps,\n getItemProps: props.value.renderer.getItemProps,\n getLabelProps: props.value.renderer.getLabelProps,\n getListProps: props.value.renderer.getListProps,\n getPanelProps: props.value.renderer.getPanelProps,\n getRootProps: props.value.renderer.getRootProps,\n };\n const autocompleteScopeApi: AutocompleteScopeApi = {\n setActiveItemId: autocomplete.value.setActiveItemId,\n setQuery: autocomplete.value.setQuery,\n setCollections: autocomplete.value.setCollections,\n setIsOpen: autocomplete.value.setIsOpen,\n setStatus: autocomplete.value.setStatus,\n setContext: autocomplete.value.setContext,\n refresh: autocomplete.value.refresh,\n navigator: autocomplete.value.navigator,\n };\n\n const html = reactive(() =>\n htm.bind(props.value.renderer.renderer.createElement)\n );\n\n const dom = reactive(() =>\n createAutocompleteDom({\n autocomplete: autocomplete.value,\n autocompleteScopeApi,\n classNames: props.value.renderer.classNames,\n environment: props.value.core.environment,\n isDetached: isDetached.value,\n placeholder: props.value.core.placeholder,\n propGetters,\n setIsModalOpen,\n state: lastStateRef.current,\n translations: props.value.renderer.translations,\n })\n );\n\n function setPanelPosition() {\n setProperties(dom.value.panel, {\n style: isDetached.value\n ? {}\n : getPanelPlacementStyle({\n panelPlacement: props.value.renderer.panelPlacement,\n container: dom.value.root,\n form: dom.value.form,\n environment: props.value.core.environment,\n }),\n });\n }\n\n function scheduleRender(state: AutocompleteState) {\n lastStateRef.current = state;\n\n const renderProps = {\n autocomplete: autocomplete.value,\n autocompleteScopeApi,\n classNames: props.value.renderer.classNames,\n components: props.value.renderer.components,\n container: props.value.renderer.container,\n html: html.value,\n dom: dom.value,\n panelContainer: isDetached.value\n ? dom.value.detachedContainer\n : props.value.renderer.panelContainer,\n propGetters,\n state: lastStateRef.current,\n renderer: props.value.renderer.renderer,\n };\n\n const render =\n (!getItemsCount(state) &&\n !hasNoResultsSourceTemplateRef.current &&\n props.value.renderer.renderNoResults) ||\n props.value.renderer.render;\n\n renderSearchBox(renderProps);\n renderPanel(render, renderProps);\n }\n\n runEffect(() => {\n const environmentProps = autocomplete.value.getEnvironmentProps({\n formElement: dom.value.form,\n panelElement: dom.value.panel,\n inputElement: dom.value.input,\n });\n\n setProperties(props.value.core.environment as any, environmentProps);\n\n return () => {\n setProperties(\n props.value.core.environment as any,\n Object.keys(environmentProps).reduce((acc, key) => {\n return {\n ...acc,\n [key]: undefined,\n };\n }, {})\n );\n };\n });\n\n runEffect(() => {\n const panelContainerElement = isDetached.value\n ? props.value.core.environment.document.body\n : props.value.renderer.panelContainer;\n const panelElement = isDetached.value\n ? dom.value.detachedOverlay\n : dom.value.panel;\n\n if (isDetached.value && lastStateRef.current.isOpen) {\n setIsModalOpen(true);\n }\n\n scheduleRender(lastStateRef.current);\n\n return () => {\n if (panelContainerElement.contains(panelElement)) {\n panelContainerElement.removeChild(panelElement);\n panelContainerElement.classList.remove('aa-Detached');\n }\n };\n });\n\n runEffect(() => {\n const containerElement = props.value.renderer.container;\n containerElement.appendChild(dom.value.root);\n\n return () => {\n containerElement.removeChild(dom.value.root);\n };\n });\n\n runEffect(() => {\n const debouncedRender = debounce<{\n state: AutocompleteState;\n }>(({ state }) => {\n scheduleRender(state);\n }, 0);\n\n onStateChangeRef.current = ({ state, prevState }) => {\n if (isDetached.value && prevState.isOpen !== state.isOpen) {\n setIsModalOpen(state.isOpen);\n }\n\n // The outer DOM might have changed since the last time the panel was\n // positioned. The layout might have shifted vertically for instance.\n // It's therefore safer to re-calculate the panel position before opening\n // it again.\n if (!isDetached.value && state.isOpen && !prevState.isOpen) {\n setPanelPosition();\n }\n\n // We scroll to the top of the panel whenever the query changes (i.e. new\n // results come in) so that users don't have to.\n if (state.query !== prevState.query) {\n const scrollablePanels =\n props.value.core.environment.document.querySelectorAll(\n '.aa-Panel--scrollable'\n );\n scrollablePanels.forEach((scrollablePanel) => {\n if (scrollablePanel.scrollTop !== 0) {\n scrollablePanel.scrollTop = 0;\n }\n });\n }\n\n debouncedRender({ state });\n };\n\n return () => {\n onStateChangeRef.current = undefined;\n };\n });\n\n runEffect(() => {\n const onResize = debounce(() => {\n const previousIsDetached = isDetached.value;\n isDetached.value = props.value.core.environment.matchMedia(\n props.value.renderer.detachedMediaQuery\n ).matches;\n\n if (previousIsDetached !== isDetached.value) {\n update({});\n } else {\n requestAnimationFrame(setPanelPosition);\n }\n }, 20);\n props.value.core.environment.addEventListener('resize', onResize);\n\n return () => {\n props.value.core.environment.removeEventListener('resize', onResize);\n };\n });\n\n runEffect(() => {\n if (!isDetached.value) {\n return () => {};\n }\n\n function toggleModalClassname(isActive: boolean) {\n dom.value.detachedContainer.classList.toggle(\n 'aa-DetachedContainer--modal',\n isActive\n );\n }\n\n function onChange(event: MediaQueryListEvent) {\n toggleModalClassname(event.matches);\n }\n\n const isModalDetachedMql = props.value.core.environment.matchMedia(\n getComputedStyle(\n props.value.core.environment.document.documentElement\n ).getPropertyValue('--aa-detached-modal-media-query')\n );\n\n toggleModalClassname(isModalDetachedMql.matches);\n\n // Prior to Safari 14, `MediaQueryList` isn't based on `EventTarget`,\n // so we must use `addListener` and `removeListener` to observe media query lists.\n // See https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/addListener\n const hasModernEventListener = Boolean(isModalDetachedMql.addEventListener);\n\n hasModernEventListener\n ? isModalDetachedMql.addEventListener('change', onChange)\n : isModalDetachedMql.addListener(onChange);\n\n return () => {\n hasModernEventListener\n ? isModalDetachedMql.removeEventListener('change', onChange)\n : isModalDetachedMql.removeListener(onChange);\n };\n });\n\n runEffect(() => {\n requestAnimationFrame(setPanelPosition);\n\n return () => {};\n });\n\n function destroy() {\n instancesCount--;\n cleanupEffects();\n }\n\n function update(updatedOptions: Partial> = {}) {\n cleanupEffects();\n\n const { components, ...rendererProps } = props.value.renderer;\n\n optionsRef.current = mergeDeep(\n rendererProps,\n props.value.core,\n {\n // We need to filter out default components so they can be replaced with\n // a new `renderer`, without getting rid of user components.\n // @MAJOR Deal with registering components with the same name as the\n // default ones. If we disallow overriding default components, we'd just\n // need to pass all `components` here.\n components: pickBy(\n components,\n ({ value }) => !value.hasOwnProperty('__autocomplete_componentName')\n ),\n initialState: lastStateRef.current,\n },\n updatedOptions\n );\n\n runReactives();\n runEffects();\n\n autocomplete.value.refresh().then(() => {\n scheduleRender(lastStateRef.current);\n });\n }\n\n function setIsModalOpen(value: boolean) {\n const prevValue = props.value.core.environment.document.body.contains(\n dom.value.detachedOverlay\n );\n\n if (value === prevValue) {\n return;\n }\n\n if (value) {\n props.value.core.environment.document.body.appendChild(\n dom.value.detachedOverlay\n );\n props.value.core.environment.document.body.classList.add('aa-Detached');\n dom.value.input.focus();\n } else {\n props.value.core.environment.document.body.removeChild(\n dom.value.detachedOverlay\n );\n props.value.core.environment.document.body.classList.remove(\n 'aa-Detached'\n );\n }\n }\n\n warn(\n instancesCount === 0,\n `Autocomplete doesn't support multiple instances running at the same time. Make sure to destroy the previous instance before creating a new one.\n\nSee: https://www.algolia.com/doc/ui-libraries/autocomplete/api-reference/autocomplete-js/autocomplete/#param-destroy`\n );\n\n instancesCount++;\n\n return {\n ...autocompleteScopeApi,\n update,\n destroy,\n };\n}\n","type ReactiveValue = () => TValue;\nexport type Reactive = {\n value: TValue;\n /**\n * @private\n */\n _fn: ReactiveValue;\n /**\n * @private\n */\n _ref: {\n current: TValue;\n };\n};\n\nexport function createReactiveWrapper() {\n const reactives: Array> = [];\n\n return {\n reactive(value: ReactiveValue) {\n const current = value();\n const reactive: Reactive = {\n _fn: value,\n _ref: { current },\n get value() {\n return this._ref.current;\n },\n set value(value) {\n this._ref.current = value;\n },\n };\n\n reactives.push(reactive);\n\n return reactive;\n },\n runReactives() {\n reactives.forEach((value) => {\n value._ref.current = value._fn();\n });\n },\n };\n}\n","type Effect = () => void;\ntype EffectFn = () => Effect;\ntype CleanupFn = () => void;\ntype EffectWrapper = {\n runEffect(fn: EffectFn): void;\n cleanupEffects(): void;\n runEffects(): void;\n};\n\nexport function createEffectWrapper(): EffectWrapper {\n let effects: EffectFn[] = [];\n let cleanups: CleanupFn[] = [];\n\n function runEffect(fn: EffectFn) {\n effects.push(fn);\n const effectCleanup = fn();\n cleanups.push(effectCleanup);\n }\n\n return {\n runEffect,\n cleanupEffects() {\n const currentCleanups = cleanups;\n cleanups = [];\n currentCleanups.forEach((cleanup) => {\n cleanup();\n });\n },\n runEffects() {\n const currentEffects = effects;\n effects = [];\n currentEffects.forEach((effect) => {\n runEffect(effect);\n });\n },\n };\n}\n","/** @jsxRuntime classic */\n/** @jsx renderer.createElement */\nimport {\n AutocompleteApi as AutocompleteCoreApi,\n AutocompleteScopeApi,\n BaseItem,\n} from '@algolia/autocomplete-core';\n\nimport {\n AutocompleteClassNames,\n AutocompleteComponents,\n AutocompleteDom,\n AutocompletePropGetters,\n AutocompleteRender,\n AutocompleteRenderer,\n AutocompleteState,\n HTMLTemplate,\n} from './types';\nimport { setProperties, setPropertiesWithoutEvents } from './utils';\n\ntype RenderProps = {\n autocomplete: AutocompleteCoreApi;\n autocompleteScopeApi: AutocompleteScopeApi;\n classNames: AutocompleteClassNames;\n components: AutocompleteComponents;\n html: HTMLTemplate;\n dom: AutocompleteDom;\n panelContainer: HTMLElement;\n propGetters: AutocompletePropGetters;\n state: AutocompleteState;\n renderer: Required;\n};\n\nexport function renderSearchBox({\n autocomplete,\n autocompleteScopeApi,\n dom,\n propGetters,\n state,\n}: RenderProps): void {\n setPropertiesWithoutEvents(\n dom.root,\n propGetters.getRootProps({\n state,\n props: autocomplete.getRootProps({}),\n ...autocompleteScopeApi,\n })\n );\n setPropertiesWithoutEvents(\n dom.input,\n propGetters.getInputProps({\n state,\n props: autocomplete.getInputProps({ inputElement: dom.input }),\n inputElement: dom.input,\n ...autocompleteScopeApi,\n })\n );\n setProperties(dom.label, { hidden: state.status === 'stalled' });\n setProperties(dom.loadingIndicator, { hidden: state.status !== 'stalled' });\n setProperties(dom.clearButton, { hidden: !state.query });\n setProperties(dom.detachedSearchButtonQuery, {\n textContent: state.query,\n });\n setProperties(dom.detachedSearchButtonPlaceholder, {\n hidden: Boolean(state.query),\n });\n}\n\nexport function renderPanel(\n render: AutocompleteRender,\n {\n autocomplete,\n autocompleteScopeApi,\n classNames,\n html,\n dom,\n panelContainer,\n propGetters,\n state,\n components,\n renderer,\n }: RenderProps\n): void {\n if (!state.isOpen) {\n if (panelContainer.contains(dom.panel)) {\n panelContainer.removeChild(dom.panel);\n }\n\n return;\n }\n\n // We add the panel element to the DOM when it's not yet appended and that the\n // items are fetched.\n if (!panelContainer.contains(dom.panel) && state.status !== 'loading') {\n panelContainer.appendChild(dom.panel);\n }\n\n dom.panel.classList.toggle('aa-Panel--stalled', state.status === 'stalled');\n\n const sections = state.collections\n .filter(\n ({ source, items }) => source.templates.noResults || items.length > 0\n )\n .map(({ source, items }, sourceIndex) => (\n \n {source.templates.header && (\n
\n {source.templates.header({\n components,\n createElement: renderer.createElement,\n Fragment: renderer.Fragment,\n items,\n source,\n state,\n html,\n })}\n
\n )}\n\n {source.templates.noResults && items.length === 0 ? (\n
\n {source.templates.noResults({\n components,\n createElement: renderer.createElement,\n Fragment: renderer.Fragment,\n source,\n state,\n html,\n })}\n
\n ) : (\n \n {items.map((item) => {\n const itemProps = autocomplete.getItemProps({\n item,\n source,\n });\n\n return (\n \n {source.templates.item({\n components,\n createElement: renderer.createElement,\n Fragment: renderer.Fragment,\n item,\n state,\n html,\n })}\n \n );\n })}\n \n )}\n\n {source.templates.footer && (\n
\n {source.templates.footer({\n components,\n createElement: renderer.createElement,\n Fragment: renderer.Fragment,\n items,\n source,\n state,\n html,\n })}\n
\n )}\n \n ));\n\n const children = (\n \n
{sections}
\n
\n \n );\n const elements = sections.reduce((acc, current) => {\n acc[current.props['data-autocomplete-source-id']] = current;\n return acc;\n }, {});\n\n render(\n {\n children,\n state,\n sections,\n elements,\n ...renderer,\n components,\n html,\n ...autocompleteScopeApi,\n },\n dom.panel\n );\n}\n","import { RequestParams } from '@algolia/autocomplete-preset-algolia';\nimport { MultipleQueriesQuery } from '@algolia/client-search';\n\nimport { createAlgoliaRequester } from './createAlgoliaRequester';\n\n/**\n * Retrieves Algolia facet hits from multiple indices.\n */\nexport function getAlgoliaFacets(requestParams: RequestParams) {\n const requester = createAlgoliaRequester({\n transformResponse: (response) => response.facetHits,\n });\n\n const queries = requestParams.queries.map((query) => ({\n ...query,\n type: 'facet',\n })) as MultipleQueriesQuery[];\n\n return requester({\n ...requestParams,\n queries,\n });\n}\n"],"names":["createRef","initialValue","current","debounce","fn","time","timerId","undefined","_len","arguments","length","args","Array","_key","clearTimeout","setTimeout","apply","flatten","values","reduce","a","b","concat","autocompleteId","generateAutocompleteId","getAttributeValueByPath","record","path","key","getItemsCount","state","collections","sum","collection","items","isPrimitive","obj","Object","isEqual","first","second","keys","_i","_Object$keys","noop","version","userAgents","segment","createClickedEvent","_ref","item","_ref$items","index","__autocomplete_indexName","positions","findIndex","x","objectID","queryID","__autocomplete_queryID","algoliaSource","_slicedToArray","arr","i","isArray","_arrayWithHoles","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","call","next","done","push","value","err","return","_iterableToArrayLimit","o","minLen","_arrayLikeToArray","n","prototype","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","TypeError","_nonIterableRest","len","arr2","_excluded","_excluded2","_typeof","_toConsumableArray","_arrayWithoutHoles","iter","_iterableToArray","_nonIterableSpread","_objectWithoutProperties","source","excluded","target","sourceKeys","indexOf","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","ownKeys","object","enumerableOnly","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","_objectSpread","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","arg","input","hint","prim","toPrimitive","res","String","Number","_toPrimitive","_toPropertyKey","configurable","writable","chunk","chunkSize","chunks","objectIDs","mapToInsightsParamsApi","params","map","param","_ref2","createSearchInsightsApi","searchInsights","_split$map2","major","minor","canSendHeaders","split","sendToInsights","method","payloads","_items$0$__autocomple","__autocomplete_algoliaCredentials","headers","appId","apiKey","init","setAuthenticatedUserToken","authenticatedUserToken","setUserToken","userToken","clickedObjectIDsAfterSearch","clickedObjectIDs","_len2","_key2","clickedFilters","_len3","_key3","convertedObjectIDsAfterSearch","_len4","_key4","convertedObjectIDs","_len5","_key5","convertedFilters","_len6","_key6","viewedObjectIDs","_len7","_key7","acc","_ref3","_ref4","payload","_ref5","viewedFilters","_len8","_key8","createViewedEvents","itemsByIndexName","_acc$current$__autoco","indexName","isAlgoliaInsightsHit","hit","ALGOLIA_INSIGHTS_VERSION","ALGOLIA_INSIGHTS_SRC","sendViewedObjectIDs","onItemsChange","insights","insightsEvents","event","eventName","createAlgoliaInsightsPlugin","options","_getOptions","_ref8","getAlgoliaSources","context","onSelect","_ref9","onActive","__autocomplete_clickAnalytics","getOptions","providedInsightsClient","insightsClient","insightsInitParams","onSelectEvent","onActiveEvent","callback","window","safelyRunOnBrowser","pointer","AlgoliaAnalyticsObject","queue","environment","errorMessage","script","document","createElement","async","src","onerror","console","error","body","appendChild","cause","loadInsights","partial","previousItems","debouncedOnStateChange","isOpen","subscribe","setContext","setInsightsContext","algoliaInsightsPlugin","__algoliaSearchParameters","clickAnalytics","normalizeUserToken","_error","getItems","_ref6","onStateChange","_ref7","__autocomplete_pluginOptions","_context$algoliaInsig","algoliaSourceBase","__automaticInsights","createInternalCancelablePromise","promise","initialState","then","onfulfilled","onrejected","createCallback","catch","finally","onfinally","onCancelList","cancel","isCanceled","callbacks","cancelable","onResult","fallback","getNextActiveItemId","moveAmount","baseIndex","itemCount","defaultActiveItemId","numericIndex","getActiveItem","collectionIndex","collectionsCount","nextValue","activeItemId","getCollectionFromActiveItemId","isOffsetFound","counter","previousItemsOffset","currentCollection","getRelativeActiveItemId","itemInputValue","getItemInputValue","itemUrl","getItemUrl","getAutocompleteElementId","autocompleteInstanceId","elementId","sourceId","Boolean","join","replace","regex","getNativeEvent","nativeEvent","createStore","reducer","props","onStoreStateChange","list","getState","dispatch","action","prevState","type","pendingRequests","add","cancelablePromise","cancelAll","isEmpty","getDefaultProps","pluginSubscribers","_props$id","plugins","debug","openOnFocus","enterKeyHint","ignoreCompositionEvents","placeholder","autoFocus","stallThreshold","shouldPanelOpen","reshape","sources","id","query","completion","status","_props$onStateChange","_x$onStateChange","onSubmit","_props$onSubmit","_x$onSubmit","onReset","_props$onReset","_x$onReset","getSources","Promise","all","plugin","seenSourceIds","resolve","maybeSource","includes","Error","JSON","stringify","defaultSource","setIsOpen","onResolve","__default","normalizedSource","getNormalizedSources","nested","_x$onSelect","_x$onActive","_x$onResolve","navigator","navigate","location","assign","navigateNewTab","windowReference","open","focus","navigateNewWindow","isDescription","execute","preResolve","itemsOrDescription","description","contextParameters","requesterId","_state$context$key","requests","queries","transformResponse","searchClient","container","find","_container$items","request","maybeDescription","responses","postResolve","store","rawResults","matches","response","results","transform","hits","result","facetHits","_facetHits","facetHit","label","count","_highlightResult","highlighted","every","basePromiseId","latestResolvedId","latestResolvedValue","lastStalledId","runConcurrentSafePromise","currentPromiseId","onInput","_ref$nextState","nextState","refresh","setters","setCollections","setQuery","setActiveItemId","setStatus","_nextState$isOpen","_request","_store$getState$conte","some","_automaticInsights","isSearchResponseWithAutomaticInsightsFlag","originalSourcesBySourceId","sourcesBySourceId","_nextState$isOpen2","isPanelOpen","highlightedItem","_excluded3","_excluded4","_excluded5","_excluded6","getPropGetters","getEnvironmentProps","providedProps","inputElement","formElement","panelElement","onMouseDownOrTouchStart","contextNode","parent","child","contains","onTouchStart","onMouseDown","onTouchMove","activeElement","blur","getRootProps","rest","role","getFormProps","noValidate","_providedProps$inputE","preventDefault","_providedProps$inputE2","getLabelProps","htmlFor","getInputProps","_props$environment$na","onFocus","_ref3$maxLength","maxLength","activeItem","shouldFallbackKeyHint","userAgent","match","isSamsung","autoComplete","autoCorrect","autoCapitalize","spellCheck","onChange","currentTarget","isComposing","onCompositionEnd","onKeyDown","triggerScrollIntoView","nodeItem","getElementById","scrollIntoViewIfNeeded","scrollIntoView","triggerOnActive","nextActiveItemId","metaKey","ctrlKey","shiftKey","altKey","_onKeyDown","onBlur","onClick","getPanelProps","onMouseLeave","getListProps","getItemProps","__autocomplete_id","onMouseMove","_item","_source","getMetadata","_","_options$__autocomple","_options$__autocomple2","_options$__autocomple3","optionsKey","__autocomplete_metadata","extraOptions","ua","getCompletion","_getActiveItem","stateReducer","hasOwnProperty","_nextState","createAutocomplete","subscribers","_state$context","_state$context$algoli","isAlgoliaInsightsPluginEnabled","subscribePlugins","rawValue","baseItemId","getAutocompleteSetters","propGetters","Event","_plugin$subscribe","insightsParams","_environment$navigato","_environment$navigato2","metadata","metadataContainer","headRef","querySelector","content","injectMetadata","t","s","r","e","u","h","p","Map","htm","get","this","set","l","ClearIcon","element","createElementNS","setAttribute","getHTMLElement","mergeClassNames","accValue","currentValue","isPlainObject","mergeDeep","pickBy","predicate","entries","TOUCH_EVENTS_ALIASES","setStyle","style","eventProxy","_listeners","setProperty","dom","useCapture","nameLower","oldValue","toLowerCase","addEventListener","removeEventListener","removeAttribute","getNormalizedName","setProperties","setPropertiesWithoutEvents","getCreateDomElement","tagName","_ref$children","children","append","LoadingIcon","innerHTML","SearchIcon","createAutocompleteDom","autocomplete","autocompleteScopeApi","classNames","isDetached","_ref$placeholder","setIsModalOpen","translations","createDomElement","rootProps","root","class","detachedContainer","stopPropagation","detachedOverlay","labelProps","submitButton","title","submitButtonTitle","ariaLabel","clearButton","clearButtonTitle","loadingIndicator","getInputPropsCore","inputProps","Input","inputWrapperPrefix","inputWrapperSuffix","inputWrapper","formProps","form","panelProps","panel","detachedSearchButtonQuery","textContent","detachedSearchButtonPlaceholder","hidden","detachedSearchButtonIcon","detachedSearchButton","detachedSearchButtonTitle","detachedCancelButton","detachedCancelButtonText","detachedFormContainer","f","c","v","parentNode","removeChild","y","defaultProps","ref","__k","__","__b","__e","__d","__c","__h","__v","vnode","k","g","base","m","w","__r","debounceRendering","sort","shift","__P","L","__n","ownerSVGElement","M","d","A","C","$","nextSibling","S","O","insertBefore","I","T","cssText","z","j","P","H","contextType","__E","render","q","sub","_sb","__s","getDerivedStateFromProps","componentWillMount","componentDidMount","componentWillReceiveProps","shouldComponentUpdate","componentWillUpdate","componentDidUpdate","getChildContext","getSnapshotBeforeUpdate","N","diffed","localName","nodeType","createTextNode","is","data","childNodes","dangerouslySetInnerHTML","attributes","__html","checked","unmount","componentWillUnmount","getDerivedStateFromError","setState","componentDidCatch","forceUpdate","bind","HIGHLIGHT_PRE_TAG","HIGHLIGHT_POST_TAG","parseAttribute","preTagParts","highlightedValue","firstValue","parts","part","lastPart","isHighlighted","createAttributeSet","postTagParts","parseAlgoliaHitHighlight","attribute","htmlEscapes","hasAlphanumeric","RegExp","regexEscapedHtml","regexHasEscapedHtml","isPartHighlighted","_parts","_parts2","isNextHighlighted","isPreviousHighlighted","character","reverseHighlightedParts","parseAlgoliaHitSnippet","createHighlightComponent","Fragment","Highlight","_ref2$tagName","__autocomplete_componentName","createReverseHighlightComponent","ReverseHighlight","createReverseSnippetComponent","ReverseSnippet","createSnippetComponent","Snippet","defaultClassNames","panelLayout","sourceFooter","sourceHeader","sourceNoResults","defaultRender","defaultRenderer","preactCreateElement","PreactFragment","firstChild","getPanelPlacementStyle","panelPlacement","containerRect","getBoundingClientRect","top","pageYOffset","documentElement","scrollTop","height","left","right","clientWidth","width","maxWidth","formRect","createAlgoliaRequester","fetcher","fetcherParams","_fetcherParams$reques","requesterParams","requestParams","createRequester","_ref$userAgents","addAlgoliaAgent","coreUserAgents","_getAppIdAndApiKey","transporter","baseHeaders","queryParameters","baseQueryParameters","APP_ID","API_KEY","getAppIdAndApiKey","search","searchParameters","hitsPerPage","highlightPreTag","highlightPostTag","resultIndex","_result$hits","fetchAlgoliaResults","getAlgoliaResults","reactives","_createEffectWrapper","effects","cleanups","runEffect","effectCleanup","cleanupEffects","currentCleanups","cleanup","runEffects","currentEffects","effect","createEffectWrapper","_createReactiveWrappe","reactive","_fn","runReactives","hasNoResultsSourceTemplateRef","optionsRef","onStateChangeRef","_core$id","panelContainer","renderNoResults","renderer","detachedMediaQuery","components","core","containerElement","defaultedRenderer","defaultComponents","getComputedStyle","getPropertyValue","defaultTranslations","getDefaultOptions","matchMedia","_onStateChangeRef$cur","_props$value$core$onS","_props$value$core","templates","noResults","hasItems","hasNoResultsTemplate","lastStateRef","html","setPanelPosition","scheduleRender","renderProps","renderSearchBox","classList","toggle","sections","sourceIndex","className","header","_extends","itemProps","footer","elements","renderPanel","update","updatedOptions","_props$value$renderer","rendererProps","remove","environmentProps","panelContainerElement","debouncedRender","querySelectorAll","scrollablePanel","onResize","previousIsDetached","requestAnimationFrame","toggleModalClassname","isActive","isModalDetachedMql","hasModernEventListener","addListener","removeListener","destroy","requester"],"mappings":";w8GAAO,SAASA,EAAUC,GACxB,MAAO,CACLC,QAASD,GCFN,SAASE,EAASC,EAAIC,GAC3B,IAAIC,OAAUC,EACd,OAAO,WACL,IAAK,IAAIC,EAAOC,UAAUC,OAAQC,EAAO,IAAIC,MAAMJ,GAAOK,EAAO,EA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